feat(prompts): require lint alongside tests and typecheck in agent instructions

Every agent-facing quality gate that used to pair tests with typecheck now
also includes lint. Specifically:

- core/src/types.ts: QA Check skill prompt runs lint, tests, typecheck (was
  tests only) and gates task_done() on all three.
- core/src/agent-prompts.ts + engine/src/reviewer.ts: "Do NOT issue REVISE"
  exclusion list now covers lint as well, so out-of-scope fixes that
  restore lint remain allowed (matches the already-lint-aware completion
  gate text at the top of the same prompts).
- engine/src/executor.ts: task_done() pre-flight checklist adds an explicit
  "if the repo has a lint command, run it and fix failures" bullet, mirrors
  the typecheck bullet, and expands the CRITICAL line from "ALL test
  failures" to "ALL lint, test, and typecheck failures".
- core/src/store.ts: default Step 2 checklist (Testing & Verification) now
  includes Lint and Typecheck alongside "All tests pass".
- cli/src/commands/plugin-scaffold.ts: generated plugin README and the
  "Next steps" CLI output include \`pnpm lint\` between install and test.

Existing prompts that already paired lint with tests+typecheck (the
Completion section, hard quality gates, triage testing requirements) are
unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Fusion
2026-04-23 19:35:51 -07:00
committed by gsxdsm
parent 8def13ee2e
commit d62bf8e24c
12 changed files with 334 additions and 128 deletions

View File

@@ -332,7 +332,7 @@ access to the codebase and can run commands to inspect code.
### Do NOT issue REVISE for
- STATUS/formatting preferences
- Splitting outcome checkboxes into implementation sub-steps
- Necessary fixes outside the initial File Scope when they are required to restore green tests, build, or typecheck and do not delete/gut unrelated functionality
- Necessary fixes outside the initial File Scope when they are required to restore green lint, tests, build, or typecheck and do not delete/gut unrelated functionality
- Suggestions that improve quality but aren't required for correctness
## Plan Review Format
@@ -601,7 +601,7 @@ submissions to a high bar for correctness, security, and maintainability.
### Do NOT issue REVISE for
- STATUS/formatting preferences
- Splitting outcome checkboxes into implementation sub-steps
- Necessary fixes outside the initial File Scope when required to restore green tests, build, or typecheck
- Necessary fixes outside the initial File Scope when required to restore green lint, tests, build, or typecheck
## Plan Review Format

View File

@@ -5223,7 +5223,9 @@ ${deps}
### Step 2: Testing & Verification
- [ ] Lint passes
- [ ] All tests pass
- [ ] Typecheck passes
- [ ] No regressions introduced
### Step 3: Documentation & Delivery

View File

@@ -236,16 +236,18 @@ Output Requirements:
{
id: "qa-check",
name: "QA Check",
description: "Run tests and verify they pass, check for obvious bugs",
description: "Run lint, tests, and typecheck; verify they pass and check for obvious bugs",
category: "Quality",
icon: "check-circle",
toolMode: "coding",
prompt: `You are a QA tester. Verify the task implementation by running tests and checking for bugs.
prompt: `You are a QA tester. Verify the task implementation by running lint, tests, and typecheck, and checking for bugs.
Test Execution:
1. Run the project's test suite (use pnpm test, npm test, or the configured test command)
2. Verify all tests pass
3. If tests fail, analyze whether failures are related to the task changes
Quality Gate Execution (all three must pass):
1. Run the project's lint command (e.g. \`pnpm lint\`, \`npm run lint\`)
2. Run the project's test suite (e.g. \`pnpm test\`, \`npm test\`, or the configured test command)
3. Run the project's typecheck command if one exists (e.g. \`pnpm typecheck\`, \`tsc --noEmit\`)
4. Verify lint, tests, and typecheck all pass
5. If any gate fails, analyze whether failures are related to the task changes
Code Review:
1. Review the changes for obvious bugs or edge cases
@@ -254,8 +256,8 @@ Code Review:
4. Look for common issues: null pointer risks, off-by-one errors, race conditions
Output Requirements:
- If all tests pass and no bugs found: call task_done() with success status
- If tests fail: provide detailed failure information via task_log()
- If lint, tests, and typecheck all pass and no bugs found: call task_done() with success status
- If any gate fails (lint, tests, or typecheck): provide detailed failure information via task_log()
- If bugs are found: describe the bug, affected files, and suggested fix via task_log()`,
},
{