一键导入
cstatus
Show current Correctless workflow state, available commands, and suggested next steps. Run anytime to see where you are.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Show current Correctless workflow state, available commands, and suggested next steps. Run anytime to see where you are.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Post-merge bug analysis. Use when a bug escapes to production. Traces which phase missed it and strengthens the workflow.
Fully-autonomous issue-resolution pipeline. Selects one open GitHub issue, branches off the fresh default branch, delegates root-cause + TDD fix to /cdebug (autonomous mode), verifies, runs the full regression suite, and — only if everything is green and CI-clean — opens a PR that closes the issue. Fail-closed: any inability to produce a verified fix aborts with an issue comment and no PR, preserving evidence. The issue→PR sibling of /cauto.
Update project documentation after a feature lands. Updates README, .correctless/AGENT_CONTEXT.md, .correctless/ARCHITECTURE.md, and feature docs. Run before merging.
Enforced TDD workflow. Write failing tests from spec rules, then implement. Use after /creview approves a spec.
Compare current model+HARNESS_VERSION pipeline metrics against stored baselines and produce a per-feature regression report. Use after Anthropic ships a model upgrade or when /cspec/cstatus surfaces a harness version_bumped advisory. Read-only on the fingerprint store; writes only the baseline file.
Verify implementation matches spec. Check rule coverage, undocumented dependencies, architecture compliance. Writes verification report and drift debt. Run after /ctdd completes.
| name | cstatus |
| description | Show current Correctless workflow state, available commands, and suggested next steps. Run anytime to see where you are. |
| allowed-tools | Bash, Read, Grep, Glob |
| disallowed-tools | Edit, Write, MultiEdit, NotebookEdit, CreateFile |
| interaction_mode | autonomous |
Shared constraints apply. Before executing, read
_shared/constraints.mdfrom the parent of this skill's base directory. All constraints there apply to this skill.
You are the status agent. Show the human where they are in the workflow and what to do next. Be concise and actionable.
| Standard | High | Critical | |
|---|---|---|---|
| Display | Phase + next step + time in phase | add stale workflow warning | add token budget warning |
Determine the effective intensity using the computation in the shared constraints (_shared/constraints.md).
First, verify Correctless is set up in this project:
.correctless/config/workflow-config.json exist?.correctless/hooks/workflow-gate.sh exist?.correctless/ARCHITECTURE.md exist and not contain {PROJECT_NAME} or {PLACEHOLDER} template markers? (Note: a minimal .correctless/ARCHITECTURE.md with "This project is in early development" is valid — it means /csetup ran on a greenfield project and intentionally deferred architecture docs.)If not set up: "Correctless isn't configured in this project yet. Run /csetup to get started."
Run:
.correctless/hooks/workflow-advance.sh status 2>/dev/null
If no active workflow, also run:
.correctless/hooks/workflow-advance.sh status-all 2>/dev/null
If no active workflow on current branch:
"No active workflow on {branch}. You can:
git checkout -b feature/my-feature then /cspecWhen displaying the current phase, calculate and show the time spent in this phase. Read phase_entered_at from the state file, compute the duration as now - phase_entered_at, and display in human-readable format:
Format: 'Phase: {phase} ({duration})'
Proactive warnings at thresholds:
workflow-advance.sh override if needed.'If workflow is active, show a pipeline diagram with the current phase marked. Use ▶ to indicate the active phase. At standard intensity:
spec → review → [ tdd ] → verify → docs → merge
│
┌─────┴─────┐
RED → GREEN → QA
│ │
test audit │
└─ fix ◄┘
At high+ intensity, include the extra steps:
spec → model → review → [ tdd ] → verify → arch → docs → audit → merge
│
┌─────┴─────┐
RED → GREEN → QA
│ │
test audit │
└─ fix ◄┘
Mark the current phase with ▶ and show it in the diagram. For TDD sub-phases (tdd-tests, tdd-impl, tdd-qa), mark the specific position inside the TDD box.
Then show phase-specific guidance:
| Phase | Show |
|---|---|
spec | "Writing the spec. When done, the human approves and you run /creview (at standard intensity) or /creview-spec (at high+ intensity)." |
review / review-spec | "Run /creview (at standard intensity) or /creview-spec (at high+ intensity) to review the spec. After review and approval, run /ctdd to start writing tests." |
model | "Formal modeling phase. Run /cmodel to generate the Alloy model." |
tdd-tests | "RED phase — writing tests. Source files are blocked (except stubs with STUB:TDD). When tests exist and fail, advance with workflow-advance.sh impl." |
tdd-impl | "GREEN phase — implementing. Make the tests pass. When done, advance with workflow-advance.sh qa." |
tdd-qa | "QA review — edits blocked. If issues found: workflow-advance.sh fix. If a bug is hard to understand, try /cdebug. If clean: workflow-advance.sh done (at standard intensity) or workflow-advance.sh verify-phase (at high+ intensity)." |
tdd-verify | "Final verification — edits blocked. If checks pass: workflow-advance.sh done." |
done | "TDD complete. MANDATORY: run /cverify next (it advances the state automatically)." |
verified | "Verification complete. MANDATORY: run /cdocs next (it advances the state automatically)." |
documented | "All steps complete. Options: create PR (gh pr create), merge locally, keep branch, or discard. After merging: /cpostmortem if bugs escape, /cmetrics for health, /caudit for sweep (at high+ intensity)." |
audit | "Audit in progress. Run /caudit to continue the convergence loop." |
After the phase-specific guidance in section 3 and before showing available commands in section 4, emit a single advisory line about the harness fingerprint state. This sits between the workflow state section and the intensity calibration section (per harness-fingerprint spec INV-015).
Read .correctless/meta/harness-fingerprint.json if it exists. Compute the short form:
Harness: model=unknown version=? fingerprint=00000000 status=newHarness: model={X} version={Y} fingerprint={hash[:8]} status=okstatus=version_bumped was reported by the most recent harness-fingerprint.sh check (read from .correctless/artifacts/harness-notified-*.flag presence in current session): Harness: model={X} version={Y} fingerprint={hash[:8]} status=version-bumpedThe format is fixed: Harness: model=\S+ version=\d+ fingerprint=[0-9a-f]{8} status=(ok|new|version-bumped). The fingerprint short form is the first 8 hex characters of sha256(fingerprint) for compact display only — the literal fingerprint stored in the meta file is {model_name}|{HARNESS_VERSION} without hashing (INV-001).
This line is advisory — never block, never error. If the file is malformed or unreadable, emit Harness: model=unknown version=? fingerprint=00000000 status=ok and continue silently.
Based on the current state:
Available commands:
/cspec Start a new feature spec
/creview Skeptical spec review
/ctdd Enforced TDD workflow
/cverify Post-implementation verification
/cdocs Update documentation
/cstatus This command — show status and next steps
/csummary Feature summary — what the workflow caught
/cmetrics Project-wide metrics dashboard
/crefactor Structured refactoring with behavioral equivalence
/cpr-review Multi-lens PR review
/ccontribute Contribute to an open source project
/cmaintain Maintainer review for incoming contributions
/cdebug Structured bug investigation
/csetup Re-run setup / validate configuration
/chelp Quick help — workflow pipeline and commands
/cwtf Workflow accountability — did agents do their job?
/cquick Lightweight TDD — quick-start without full spec
/crelease Versioning and changelog management
/cexplain Guided codebase exploration
/cauto Semi-auto pipeline — orchestrates ctdd through PR
/cmodelupgrade Harness regression report (after model upgrade or version_bumped advisory)
/carchitect Architecture definition — reverse-engineer or greenfield
/cdashboard HTML project dashboard — metrics + artifact browser
/ctriage Bulk triage deferred findings backlog
/cprune Documentation and artifact pruning
/cpostmortem Post-merge bug analysis
/cdevadv Devil's advocate — challenge assumptions
Intensity-gated (shown at high+ unless noted):
/creview-spec Adversarial 6-agent spec review [high+]
/cmodel Formal Alloy modeling [critical+]
/caudit Olympics audit (QA/Hacker/Performance/UX) [high+]
/cupdate-arch Update .correctless/ARCHITECTURE.md [high+]
/credteam Live red team assessment [critical+]
State management:
.correctless/hooks/workflow-advance.sh status Current phase
.correctless/hooks/workflow-advance.sh status-all All active workflows
.correctless/hooks/workflow-advance.sh diagnose "file" Why a file is blocked
.correctless/hooks/workflow-advance.sh override "reason" Temporarily bypass gate
Read .correctless/config/workflow-config.json. If workflow.intensity is below high, omit the "Intensity-gated" section from the output — those commands are not available at standard intensity.
Check install freshness and display as a single status line:
source .correctless/scripts/lib.sh
output="$(check_install_freshness "$(pwd)/.correctless" 2>/dev/null)"
Parse the output and display one line:
ok:*: "Install: current"source_ahead:*: "Install: STALE — {N} source files changed since last setup (run setup)" where N is the count of source_ahead lines.modified:* or missing:* (without source_ahead): "Install: STALE ({N} files differ — run setup)" where N is the count of modified + missing lines.no_manifest: "Install: unknown (no manifest — run setup)"This is a single line in the status output, not a separate section.
After showing phase and commands, proactively check for issues:
Stale workflow: If >24 hours in a phase, this is already handled by the time-in-phase display in section 3 above — do not repeat the warning here. Only check for stale workflows if section 3 did not already display a >24h warning (e.g., if phase_entered_at was missing or unparsable).
Empty docs: Check if .correctless/ARCHITECTURE.md contains {PROJECT_NAME} or {PLACEHOLDER} markers, or if .correctless/AGENT_CONTEXT.md contains {PROJECT_NAME} or {PLACEHOLDERS}. If either is still the template: ".correctless/ARCHITECTURE.md / .correctless/AGENT_CONTEXT.md is still the default template. Run /csetup to populate it from your codebase — this significantly improves spec and review quality."
Override usage: Read override_count from the state file. If ≥2: "You've used {N} overrides on this workflow. If the gate keeps blocking legitimate edits, the workflow config or file patterns may need adjustment. Run workflow-advance.sh diagnose 'yourfile.ts' to understand why."
Measurement-overdue check (path-scoped-rules-pat001 dogfood, INV-016 / MG-003): If .correctless/meta/pat001-measurement-due.json exists, inspect it:
Read due_at_pr_count (an integer, typically 3) and created_at_commit (a commit SHA or null).
If created_at_commit is null, the feature has merged but the measurement baseline commit was never recorded — emit a one-line advisory: "pat001-measurement-due.json exists but created_at_commit is null; /cdocs or /cverify should fill it at merge time." Then stop this check.
Otherwise, count hook-touching merged PRs since created_at_commit. A hook-touching PR is any PR whose merge commit modifies a file under hooks/*.sh. Use: git log --merges --name-only "$created_at_commit"..HEAD -- 'hooks/*.sh' | grep -c '^hooks/' || true — adapt if the local git log shape is different.
If the hook-touching PR count is >= due_at_pr_count AND .correctless/verification/path-scoped-rules-pat001-measurement.md does NOT exist, emit a warning banner (prominently, above the standard status block):
WARNING — Measurement overdue: path-scoped-rules-pat001 — run measurement gate per MG-003 or roll back per PRH-002.
Include a one-line pointer: "See .correctless/specs/path-scoped-rules-pat001.md MG-003 for the procedure, and PRH-002 for the rollback steps."
If the measurement report already exists at .correctless/verification/path-scoped-rules-pat001-measurement.md, suppress the warning — the gate has been evaluated.
If the meta file is missing, this check is a no-op. Do not create it.
This check is dormant by design: it fires only when the post-merge measurement window has elapsed and the human has not yet run the gate. It is the only merge-time-enforceable signal for MG-003 (the measurement gate is evaluated post-merge via git archaeology, not at PR time).
Meta baseline pollution advisory (calibration-writer RS-013): run the detection-only helper and surface any output:
bash .correctless/scripts/meta-pollution-detect.sh 2>/dev/null
Each line it prints flags a .correctless/meta/*.json whose created_at_commit names an unknown commit in this repo — the unambiguous corruption / #226 cross-feature-pollution signal (an earlier /cdocs blanket-scan stamping one feature's merge-base onto another feature's baseline, where that commit is not reachable here). The helper no longer flags a mere merge-base divergence (MA-M4): a legitimately different feature baseline also diverges, so that sub-check was chronic false-positive signal-erosion and was removed — this advisory fires only on the unambiguous case, not on every run. This is advisory and detection-only (repair is out of scope — gitignored local state, last-write-wins): show the lines verbatim under a "meta baseline advisory" heading and suggest the human verify the flagged baseline. Empty output means clean — say nothing. If the helper is absent (un-re-setup install), skip silently.
No active workflow: "No active workflow on this branch. You can edit freely — the gate only blocks during active workflows. To start a structured workflow: git checkout -b feature/my-feature then /cspec."
Check for a pipeline manifest at .correctless/artifacts/pipeline-manifest-{branch_slug}.json (derive branch_slug via workflow-advance.sh status output or scripts/lib.sh). If the manifest exists and status is not "complete", report:
Incomplete pipeline detected. Last completed step: {last_completed}. Missing steps: {list}. Expected end phase: {expected_end_phase}, current phase: {current_phase}. Run
/cautoto resume.
If the manifest does not exist or status is "complete", produce no output for this section (dormant — PAT-019).
The workflow state is authoritative — the manifest report is a diagnostic signal, not an override of workflow state.
/cchores runs on a chore/issue-N-* branch that the user is typically not on
by the time they next open /cstatus (a chore launched overnight leaves them on
main or another feature branch in the morning). Deriving the manifest path from
the CURRENT branch would therefore miss every truncated chore run. So scan
branch-independently, exactly like the retained-branch scan below: glob
.correctless/artifacts/chore-run-*.json and report any manifest whose status is
not "complete". Name the affected branch from inside the manifest (its
branch_slug / branch field), not from the current branch.
For each globbed manifest with status != "complete":
in_progress — a truncated run. Report:
Incomplete /cchores run detected on
{branch from manifest}. Selected issue: #{selected_issue}. Status: in_progress (truncated run). Re-run/cchoresto resume.
aborted — Report:
Aborted /cchores run on
{branch from manifest}. Selected issue: #{selected_issue}. {abort_reason}. Re-run/cchoresto resume.
noop — a clean run that found no suitable issue. This is NOT a truncation;
do not tell the user to "re-run to resume". Report instead:
/cchores ran and found no suitable issues — nothing to resume. (Last run on
{branch from manifest}selected no candidate.)
Truncation/state is determined by status content equality, not mtime (EA-008). If
no chore-run-*.json manifest exists, or every manifest has status "complete",
produce no output for this section (dormant — PAT-019).
Retained abort branches: scan .correctless/artifacts/chore-abort-*.md and .correctless/artifacts/chore-report-*.md for any /cchores abort that retained a local-only chore branch (a chore branch with commits that was not pushed — unreachable from GitHub). For each retained branch, surface it so it is not lost:
Retained chore branch:
{branch}(issue #{N}) — retained locally on abort, not pushed. Resume or delete it manually.
If no abort artifact references a retained branch, produce no output for this section (dormant — PAT-019).
INV-019 names /cstatus as a consumer of the durable cross-run loop-prevention
store .correctless/meta/cchores-attempted.json (the same store
/cchores's candidate selector reads via --attempted-store). Surfacing it here
gives the user visibility into which issues /cchores has already attempted or
suppressed, so a repeatedly-skipped issue is not invisible.
Read .correctless/meta/cchores-attempted.json if it exists. It holds an
attempts array of {issue, branch_slug, outcome} records. Summarize:
/cchores attempted issues: {N} recorded. Suppressed/attempted: #{issue} ({outcome}), … — these are excluded from future autonomous selection. To re-allow one, edit the store.
If the file does not exist, is empty, or its attempts array is empty, produce no
output for this section (dormant per PAT-019 — pre-upgrade and never-run projects
see nothing).
Read .correctless/meta/deferred-findings.json if it exists. Show the following:
/ctriage to review the deferred findings backlog."When the file does not exist or has zero open findings, omit this section entirely (dormant per PAT-019 — no "0 findings" noise).
Drift detection: If review artifacts (.correctless/artifacts/review-spec-findings-*.md or .correctless/artifacts/review-findings-*.md or .correctless/artifacts/reviews/review-findings-*.md) contain "pending" findings not present in the backlog, suggest: "Review artifacts contain pending findings not in the backlog. Run bash scripts/sync-deferred-backlog.sh to re-sync."
Check the state of the cross-feature intelligence brief and its data sources. Three states:
No data: When .correctless/meta/cross-feature-intel.json does not exist AND no data sources have content (no deferred findings, no devadv reports, no overrides, no lens recommendations, no debug investigations, no workflow effectiveness data), display: "No cross-feature intelligence available yet — data accumulates as features complete review, audit, or debug phases."
Stale: When the brief exists but is older than 7 days (based on file mtime), display brief age, entry count per section, and remediation: "Cross-feature intelligence brief is {N} days old. Will refresh on next /cspec run, or run: bash .correctless/scripts/cross-feature-intel.sh"
Current: When the brief exists and is less than 7 days old, display brief age and entry count per section.
Threshold proximity reporting: When the brief exists (states 2 or 3), report threshold proximity for entries — the occurrence-level breakdown showing how many entries are at each count below the threshold. For example: "5 entries at 2/3 occurrences, 3 entries at 1/3, 2 entries above threshold." This provides diagnostic visibility for users investigating why intelligence is not surfacing in reviews. Read occurrence counts via jq '[.sections | to_entries[] | .value[] | .occurrences // 0]' .correctless/meta/cross-feature-intel.json.
Dormant when the script itself (scripts/cross-feature-intel.sh or .correctless/scripts/cross-feature-intel.sh) does not exist — pre-upgrade projects should see no intelligence health output (PAT-019). When the script does not exist, omit this section entirely.
Detect a committed-but-not-restored SFG lift sentinel. When .correctless/.sfg-lift-active exists in the working tree, display a WARNING: "Stranded SFG lift sentinel detected (.correctless/.sfg-lift-active). An AP-037 lift-and-restore is mid-flight — a lift commit removed a deliverable from sensitive-file-guard.sh DEFAULTS but the restore commit has not landed. Before pushing: restore agents/fix-diff-reviewer.md to the DEFAULTS list, run bash sync.sh, then git rm -f .correctless/.sfg-lift-active. The final-state backstop is bash scripts/check-no-pending-sfg-lift.sh (source) / bash .correctless/scripts/check-no-pending-sfg-lift.sh (installed). See .claude/rules/sfg-deliverable.md."
When the sentinel is absent, omit this section entirely.
If codex is on PATH (command -v codex) AND .workflow.external_models in
workflow-config.json is empty or absent, emit a one-time advisory:
codex detected — run /csetup to enable cross-model spec review (codex reviews specs alongside Claude in /creview-spec).
This keeps the feature discoverable rather than invisibly dormant. If codex is not on
PATH, or external_models.codex is already configured, omit this section entirely.
INV-008/RS-027 promise the pending surface (completed codex runs whose findings
have not yet been adjudicated) in BOTH /creview-spec AND /cstatus. Run the
producer's pending subcommand and report any un-adjudicated runs so a user who
deferred adjudication and never reopened /creview-spec still gets a signal
(PMB-008 lost-findings class):
bash .correctless/scripts/external-review-run.sh pending
(Use scripts/external-review-run.sh from the source tree.) When the output is
empty or "(no external-review history)", this section is dormant — emit
nothing. When it lists one or more runs, surface:
Un-adjudicated cross-model review run(s): {run_id} — {N} finding(s) awaiting disposition.
Reopen /creview-spec to adjudicate, or run: external-review-run.sh set-disposition <run_id> <finding_id> <accepted|rejected|modified|deferred|duplicate>.
If the producer script does not exist at either path, this section is dormant (PAT-019) — no error, no output.
If the human asks "is everything set up correctly?" or similar, validate:
.claude/settings.json.correctless/hooks/Report any issues with fix instructions.
Run a lightweight staleness check using scripts/prune-scan.sh (or .correctless/scripts/prune-scan.sh). If the scanner script does not exist (file does not exist at either path), this section is dormant per PAT-019 — no error, no warning, no output.
When the scanner is available, check two categories:
bash scripts/prune-scan.sh --category artifacts --base . | jq '.candidates | length' — read .candidates from the wrapped-object schema (BND-001)bash scripts/prune-scan.sh --category architecture --base . | jq 'length' — bare array, read length directlySurface the signal when either: (a) more than 10 orphaned artifact files exist, or (b) more than 3 architecture entries have all-dead file references.
Signal text: "Pruning recommended: {N} orphaned artifacts, {M} stale architecture entries. Run /cprune to clean up."
/cstatus is read-only — it reads workflow state and project files but modifies nothing. Re-run anytime safely..correctless/config/workflow-config.json exists and the hook scripts are installed at .correctless/hooks/.