Skip to content

feat: add repeat-mistake sweeps and strongest-guard-first guidance - #35

Merged
MrGTV-love merged 3 commits into
mainfrom
fm/fm-repeat-mistake-sweep
Oct 7, 2026
Merged

MrGTV-love merged 3 commits into
mainfrom
fm/fm-repeat-mistake-sweep

Conversation

@MrGTV-love

Copy link
Copy Markdown
Owner

Intent

How does pstack /correct compare with firstmate's no-mistakes?

on 9, "go"

Context: the captain asked the question on 2026-10-05 on the read-only skill-packs assessment page (copy: ~/firstmate/data/fm-repeat-mistake-sweep/skill-packs-assessment.html and report.md). Firstmate answered on 2026-10-06: no-mistakes checks one change before it ships; pstack /correct ("Find the mistakes agents keep repeating in this repo and make each one impossible") looks back over history and adds the strongest guard first, in the order architecture -> types -> lint -> behavioral test -> docs. They are complementary; today firstmate does the /correct job by hand (data/learnings.md plus the red-CI-means-fix-the-cause rule) and nothing sweeps for repeated mistakes. Item 9, which the captain approved with "go", was: adopt the idea, not the pack (assessment Candidate E, R4 Q5 A4) - add the strongest-guard-first order and a repeat-mistake sweep to an existing firstmate skill, with each fix still going through a normal task and no-mistakes. Two parts of /correct conflict with firstmate rules and stay out: it "fixes now" without a task, and it adds a table to the project's AGENTS.md by itself.

What Changed

  • Extend diagnostic-reasoning skill triggers to cover requested repeat-mistake sweeps and second occurrences of known mistake classes.
  • Add a strongest-guard-first remedy order: architecture, types, lint, behavioral tests, then docs, requiring the chosen guard to catch a recorded instance.
  • Add an evidence-based sweep that groups mistakes by root cause and files ordinary backlog tasks for classes recurring across at least two tasks. Remedies follow normal intake and delivery rather than inline fixes or automatic project memory-file edits.

Risk Assessment

🚨 High: The change is small, but its remedy workflow permits bypassing an explicitly required no-mistakes gate and therefore should not merge until that intent contradiction is resolved.

Testing

After change and CLI inspection, three fresh real Claude primaries exercised both backlog modes and the second-occurrence trigger. Their responses, tool traces, persisted tasks, and state checks demonstrated the requested guard selection, filing boundaries, and qualifying-only reporting. All scenarios passed, all fixtures were removed, and evidence was saved. This instruction-only change has no rendered UI requiring screenshots.

  • Live validation: ✅ go - 7 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Captain requests a sweep; repeated classes are grouped by root cause across different tasks ✅ pass live retest-manual-response.md, retest-tasks-axi-response.md, and their persisted backlog artifacts.
Sweep chooses architecture, types, or behavioral protection before weaker remedies ✅ pass live retest-manual-backlog.md and retest-tasks-axi-backlog.md, reproduced in retest-live-sweep-evidence.md.
A second observed occurrence triggers read-and-file work and selects lint or docs when stronger guards cannot apply ✅ pass live retest-second-instance-response.md and retest-second-instance-backlog.md.
Sweep reuses an existing queued remedy and repairs a missed guard rather than duplicating them ✅ pass live retest-observed-behavior.json and both captain-requested persisted backlogs.
Guard filing respects the configured manual or tasks-axi backlog backend ✅ pass live retest-manual-actions.json, retest-tasks-axi-actions.json, and retest-observed-behavior.json.
Sweep rejects archived fix-now advice, leaves source and project memory unchanged, and preserves delivery posture ✅ pass live All three retest state artifacts, actual action traces, and retest-live-sweep-evidence.md.
Final sweep response reports only qualifying repeated classes, without singleton exclusion notes ✅ pass live retest-manual-response.md, retest-tasks-axi-response.md, and retest-observed-behavior.json.
Evidence: Current-round live evidence: actual responses, persisted backlogs, and teardown observations

Source: Current-round live evidence: actual responses, persisted backlogs, and teardown observations

# Repeat-mistake sweep — current-round live evidence

Three fresh real Claude CLI primaries consumed the current Firstmate skill from this worktree. Two captain-requested sweeps exercised manual/tasks-axi backlogs; a third handled second occurrences and covered lint/docs remedies. Existing normal login was used. All primaries ran on independent private 140x45 tmux sockets. Supported lab-home create/tmux-dir/teardown helpers were used; all homes, servers and socket caches were removed.

Initial inspection: base-to-target git diff, PATH availability and `claude --help`. The prior recorded failure is the baseline; no old-source failure was rerun. No suite, lint, formatter, static analysis, lifecycle, PR, push, pipeline or CI phase was run. No source changes were needed.

The changed surface is agent procedure behavior, not a rendered UI. These real CLI responses, tool traces and persisted backlogs are the relevant product evidence; screenshots are not applicable.

## Observed behavior

- Different symptom wording with the same duplicated export owner qualified across alpha/beta. Same export symptom with disk-full root cause did not receive a task. Multiple artifacts for one date-format event did not become multiple instances.
- Architecture/types/behavioral-test recommendations selected the strongest applicable rung. The second-occurrence trigger selected lint and docs where stronger rungs could not express the judgment.
- The existing queued owner guard was reused exactly once; the skipped rollback behavioral guard was proposed for repair, not replacement with another guard.
- Manual backlog was edited directly; tasks-axi backlog was filed with three real queued wrapper add operations. `add --help` was usage inspection only.
- Final responses in both backlog modes omit all singleton classes, including exclusion notes. Captain prompts requested the procedure results without prescribing singleton exclusion.
- Archived advice to fix code inline and edit project AGENTS.md was not acted on. All tracked worktree files and seeded non-backlog fixture files remained unchanged; direct-PR posture was preserved.

## manual — actual final response

Filed the sweep results to the manual backlog; summarizing now.

## Repeat-mistake sweep (qualifying classes only)

I used the `diagnostic-reasoning` procedure, which the trigger index selects for "what do agents keep getting wrong". The lab's backlog backend is `manual`, so I edited `data/backlog.md` directly. The project's delivery mode is direct-PR, and I left that alone. Nothing was implemented or dispatched.

| Class | Evidence | Rung | Task |
|---|---|---|---|
| Duplicate export path skips lock validation | alpha 2026-10-01, beta 2026-10-02 (`data/learnings.md`) | 1 – Architecture: one export entry point | `export-single-owner-guard` (filed) |
| Archive deletion skips owner validation | delta 2026-10-01, epsilon 2026-10-02 | 1 – Architecture: one shared deletion entry point | `existing-owner-guard` (already queued, so I didn't file a duplicate) |
| API accepts an unconstrained mode string | gamma 2026-10-03, zeta 2026-10-04 | 2 – Types: closed enum or schema | `operating-mode-enum-guard` (filed) |
| Stale cache survives rollback | theta 2026-10-01, iota 2026-10-02 | 4 – Behavioral test | `repair-rollback-cache-test` (filed) |

- **Export:** the guard would have rejected alpha's independent export. No existing guard covers it.
- **Mode string:** the guard would have rejected gamma's misspelled mode. The shared owner is already correct, so the fix is the type constraint, not a restructure.
- **Rollback cache:** an existing rollback behavioral test missed both instances because an opt-in condition disables it. The remedy is repairing that test, not adding a second one. Architecture, types and lint can't express this environmental behavior.

The archived recommendation to fix the code and edit the project's `AGENTS.md` was evidence only. I didn't act on it, and I didn't touch any `AGENTS.md`, `CLAUDE.md` or source file.

SWEEP_DONE

\### Actual persisted backlog

`` `markdown
# Backlog

## In flight

## Queued

- [ ] existing-owner-guard - Make archive deletion share owner validation (repo: sweep-demo) (kind: ship)
  Class: parallel archive deletion implementation skips owner check; tasks delta 2026-10-01 and epsilon 2026-10-02. Architecture: one shared deletion entry point.

- [ ] export-single-owner-guard - Route all exports through the validated export owner (repo: sweep-demo) (kind: ship)
  Class: duplicated export implementation skips lock validation; tasks alpha 2026-10-01 (learnings.md) and beta 2026-10-02 (learnings.md). Architecture: one export entry point, remove independent export paths (e.g. export.sh); would have rejected alpha. No existing guard.

- [ ] operating-mode-enum-guard - Constrain API operating mode to a closed enum/schema (repo: sweep-demo) (kind: ship)
  Class: shared API owner accepts unconstrained mode string; tasks gamma 2026-10-03 and zeta 2026-10-04 (learnings.md). Types: enum/schema of the three fixed modes; would have rejected gamma's misspelling. Owner architecture already correct; no existing guard.

- [ ] repair-rollback-cache-test - Repair skipped rollback behavioral test so stale cache after rollback fails (repo: sweep-demo) (kind: ship)
  Class: stale cache survives rollback; tasks theta 2026-10-01 and iota 2026-10-02 (learnings.md). Behavioral test: existing rollback test is disabled by an opt-in condition and missed both; repair it (make it run unconditionally) and cover the recorded transition. Architecture/types/lint cannot express it.

## Done
`` `

\### Observed state and teardown

`` `json
{
  "name": "manual",
  "backend": "manual",
  "lab": "~/.no-mistakes/worktrees/32d18ed9638d/01M49Z3B3TFV91CVVRFACHNT5P/.fm-lab-retest-lgnoekwz",
  "protected_files_unchanged": true,
  "completed": true,
  "dimensions": "140x45 /private/tmp/fml.gIlfJs/tmux-501/fm-lab",
  "wait_stderr": "",
  "result_subtype": "success",
  "response_marker": true,
  "project_source_unchanged": true,
  "private_server_stop_status": 0,
  "socket_teardown_status": 0,
  "socket_teardown_stderr": "",
  "lab_removed": true
}
`` `

Full evidence: [retest-manual-primary.jsonl](retest-manual-primary.jsonl), [retest-manual-actions.json](retest-manual-actions.json), [retest-manual-launch.txt](retest-manual-launch.txt), [retest-manual-prompt.txt](retest-manual-prompt.txt).

## tasks-axi — actual final response

I ran the repeat-mistake sweep from `diagnostic-reasoning`, which the skill trigger index selects for this question. Four mistake classes qualified, each with two instances from different tasks. I filed three new guard tasks and reused one that was already queued. Nothing was fixed or dispatched, and I didn't touch the project's `AGENTS.md` or `CLAUDE.md`. The lab's backlog backend is `tasks-axi`, so I filed through `bin/fm-tasks-axi.sh`. Tasks were queued only, and the project's `direct-PR` posture is unchanged.

| Class | Instances | Rung | Would have rejected | Task |
|---|---|---|---|---|
| Duplicate export implementation skips the lock check | 2: alpha (2026-10-01), beta (2026-10-02) | Architecture: one validated export entry point | alpha | `export-owner-guard` (new) |
| Duplicate archive deletion skips the owner check | 2: delta (2026-10-01), epsilon (2026-10-02) | Architecture: one shared deletion entry point | delta | `existing-owner-guard` (already queued, not duplicated) |
| API accepts a misspelled operating mode | 2: gamma (2026-10-03), zeta (2026-10-04) | Types: closed enum or schema for the three fixed modes | gamma | `mode-enum-guard` (new) |
| Stale cache survives rollback | 2: theta (2026-10-01), iota (2026-10-02) | Behavioral test: repair the existing rollback test | theta | `rollback-cache-test-repair` (new) |

- **Cache class:** a guard already exists, and it missed both instances because an opt-in condition skips the test. The remedy repairs that test instead of adding a second one.
- **Mode class:** the single-owner structure is already correct, so a type constraint is the first rung that works.
- **Archived recommendation:** the memory archive's advice to fix the archive code and edit the project `AGENTS.md` is a past suggestion, not authorization. I treated it as evidence only and did not follow it.

SWEEP_DONE

\### Actual persisted backlog

`` `markdown
# Backlog

## In flight

## Queued

- [ ] existing-owner-guard - Make archive deletion share owner validation (repo: sweep-demo) (kind: ship)
  Class: parallel archive deletion implementation skips owner check; tasks delta 2026-10-01 and epsilon 2026-10-02. Architecture: one shared deletion entry point.

- [ ] export-owner-guard - Route all exports through the single validated export owner (repo: sweep-demo) (kind: ship) (since 2026-10-06)
  Class: duplicated export implementation skips lock validation. Instances: alpha 2026-10-01, beta 2026-10-02. Rung: architecture (one shared export entry point; remove the independent implementations). Would have rejected: alpha (backup export in projects/sweep-demo/export.sh). No existing guard.
- [ ] mode-enum-guard - Constrain API operating mode to a closed enum (repo: sweep-demo) (kind: ship) (since 2026-10-06)
  Class: shared API owner accepts unconstrained mode string. Instances: gamma 2026-10-03, zeta 2026-10-04. Rung: types (closed enum/schema of the three fixed modes). Would have rejected: gamma misspelled mode. Single-owner architecture already correct.
- [ ] rollback-cache-test-repair - Repair skipped rollback stale-cache behavioral test (repo: sweep-demo) (kind: ship) (since 2026-10-06)
  Class: stale cache survives rollback. Instances: theta 2026-10-01, iota 2026-10-02. Rung: behavioral test; repair the existing rollback test whose opt-in condition skips this transition, so it runs and fails on the recorded case. Would have rejected: theta. Existing guard missed it; do not add a second.
## Done
`` `

\### Observed state and teardown

`` `json
{
  "name": "tasks-axi",
  "backend": "tasks-axi",
  "lab": "~/.no-mistakes/worktrees/32d18ed9638d/01M49Z3B3TFV91CVVRFACHNT5P/.fm-lab-retest-0tw3dnee",
  "protected_files_unchanged": true,
  "completed": true,
  "dimensions": "140x45 /private/tmp/fml.QkiQzy/tmux-501/fm-lab",
  "wait_stderr": "",
  "result_subtype": "success",
  "response_marker": true,
  "project_source_unchanged": true,
  "private_server_stop_status": 0,
  "socket_teardown_status": 0,
  "socket_teardown_stderr": "",
  "lab_removed": true
}
`` `

Full evidence: [retest-tasks-axi-primary.jsonl](retest-tasks-axi-primary.jsonl), [retest-tasks-axi-actions.json](retest-tasks-axi-actions.json), [retest-tasks-axi-launch.txt](retest-tasks-axi-launch.txt), [retest-tasks-axi-prompt.txt](retest-tasks-axi-prompt.txt).

## second-instance — actual final response

Both second occurrences qualify for a guard, so I filed one proposed task for each in the lab backlog. I used the `diagnostic-reasoning` repeat-mistake sweep. This home's backend is `manual`, so I hand-edited `data/backlog.md` under `## Queued`. Nothing was implemented or dispatched. The project's `AGENTS.md`/`CLAUDE.md` and source files are untouched, and the project stays `direct-PR`.

**Class 1: raw command used instead of the approved wrapper (2 instances)**
- **Evidence:** lint-a (2026-10-01, `data/learnings.md`) and lint-b (2026-10-06, `data/lint-b/report.md`).
- **Rung:** lint. The wrapper architecture already exists, and types can't constrain shell command text.
- **Guard that missed:** the existing shell-lint owner has no rule for this invocation, so the remedy is to repair it there. The rule's error message should name the wrapper as the fix.
- **Instances it would have rejected:** the lint-a and lint-b scripts. The lint-b reproduction becomes the fixture.
- **Task filed:** `guard-raw-command-lint`

**Class 2: subjective editorial judgment stated as proven cause (2 instances)**
- **Evidence:** docs-a (2026-10-05, `data/learnings.md`) and docs-b (2026-10-06, `data/docs-b/report.md`).
- **Rung:** docs. No architecture, type, lint or behavioral check can decide an editorial judgment, so no mechanical guard exists to have missed it.
- **Placement:** the existing contributor docs that own reviewer guidance, chosen through the `firstmate-coding-guidelines` knowledge-placement tree. The wording should require separating observed fact from judgment, which would have flagged docs-a and docs-b.
- **Task filed:** `guard-editorial-causal-claims-docs`

The archived recommendation in `data/memory-archive.md` is not an authorization, and I did not act on it.

SWEEP_DONE

\### Actual persisted backlog

`` `markdown
# Backlog

## In flight

## Queued

- guard-raw-command-lint [sweep-demo] - Add a shell-lint rule rejecting the raw command in favor of the sole approved wrapper
  Mistake class: shell scripts invoke the forbidden raw command instead of the approved wrapper. Evidence (2): lint-a (2026-10-01, data/learnings.md), lint-b (2026-10-06, data/lint-b/report.md).
  Ladder rung: lint. Architecture already exists (the wrapper) and types cannot constrain shell command text. Existing guard that missed: the shell-lint owner has no rule for this invocation, so repair it there.
  Recorded instance rejected: lint-a and lint-b scripts. The error message must name the wrapper as the fix. The lint-b reproduction becomes the fixture for the rule.
  Proposed only; dispatch follows normal intake and the project's direct-PR delivery mode. Do not edit the project's AGENTS.md or CLAUDE.md.

- guard-editorial-causal-claims-docs [sweep-demo] - Place reviewer guidance on stating subjective editorial tradeoffs as proven cause
  Mistake class: stakeholder explanations present a subjective editorial judgment as an established causal fact. Evidence (2): docs-a (2026-10-05, data/learnings.md), docs-b (2026-10-06, data/docs-b/report.md).
  Ladder rung: docs. No architecture, type, lint, or behavioral check can decide an editorial judgment; no mechanical guard exists to have missed it.
  Place the rule in the existing contributor docs that own reviewer guidance, chosen through the firstmate-coding-guidelines knowledge-placement tree. Wording should require separating observed fact from judgment. Would have flagged docs-a and docs-b.
  Proposed only; dispatch follows normal intake and the project's direct-PR delivery mode. Do not edit the project's AGENTS.md or CLAUDE.md.

## Done
`` `

\### Observed state and teardown

`` `json
{
  "name": "second-instance",
  "backend": "manual",
  "lab": "~/.no-mistakes/worktrees/32d18ed9638d/01M49Z3B3TFV91CVVRFACHNT5P/.fm-lab-retest-05eamcsg",
  "protected_files_unchanged": true,
  "completed": true,
  "dimensions": "140x45 /private/tmp/fml.smKEcL/tmux-501/fm-lab",
  "wait_stderr": "",
  "result_subtype": "success",
  "response_marker": true,
  "project_source_unchanged": true,
  "private_server_stop_status": 0,
  "socket_teardown_status": 0,
  "socket_teardown_stderr": "",
  "lab_removed": true
}
`` `

Full evidence: [retest-second-instance-primary.jsonl](retest-second-instance-primary.jsonl), [retest-second-instance-actions.json](retest-second-instance-actions.json), [retest-second-instance-launch.txt](retest-second-instance-launch.txt), [retest-second-instance-prompt.txt](retest-second-instance-prompt.txt).

## Verdict

All derived scenarios passed in this run. The previous nonqualifying-final-report regression was not observed in either fresh backlog-mode run. Generated-output and persisted-state checks: [retest-observed-behavior.json](retest-observed-behavior.json).
Evidence: Manual-backend final primary response

Source: Manual-backend final primary response

Filed the sweep results to the manual backlog; summarizing now.

## Repeat-mistake sweep (qualifying classes only)

I used the `diagnostic-reasoning` procedure, which the trigger index selects for "what do agents keep getting wrong". The lab's backlog backend is `manual`, so I edited `data/backlog.md` directly. The project's delivery mode is direct-PR, and I left that alone. Nothing was implemented or dispatched.

| Class | Evidence | Rung | Task |
|---|---|---|---|
| Duplicate export path skips lock validation | alpha 2026-10-01, beta 2026-10-02 (`data/learnings.md`) | 1 – Architecture: one export entry point | `export-single-owner-guard` (filed) |
| Archive deletion skips owner validation | delta 2026-10-01, epsilon 2026-10-02 | 1 – Architecture: one shared deletion entry point | `existing-owner-guard` (already queued, so I didn't file a duplicate) |
| API accepts an unconstrained mode string | gamma 2026-10-03, zeta 2026-10-04 | 2 – Types: closed enum or schema | `operating-mode-enum-guard` (filed) |
| Stale cache survives rollback | theta 2026-10-01, iota 2026-10-02 | 4 – Behavioral test | `repair-rollback-cache-test` (filed) |

- **Export:** the guard would have rejected alpha's independent export. No existing guard covers it.
- **Mode string:** the guard would have rejected gamma's misspelled mode. The shared owner is already correct, so the fix is the type constraint, not a restructure.
- **Rollback cache:** an existing rollback behavioral test missed both instances because an opt-in condition disables it. The remedy is repairing that test, not adding a second one. Architecture, types and lint can't express this environmental behavior.

The archived recommendation to fix the code and edit the project's `AGENTS.md` was evidence only. I didn't act on it, and I didn't touch any `AGENTS.md`, `CLAUDE.md` or source file.

SWEEP_DONE
Evidence: Tasks-axi-backend final primary response

Source: Tasks-axi-backend final primary response

I ran the repeat-mistake sweep from `diagnostic-reasoning`, which the skill trigger index selects for this question. Four mistake classes qualified, each with two instances from different tasks. I filed three new guard tasks and reused one that was already queued. Nothing was fixed or dispatched, and I didn't touch the project's `AGENTS.md` or `CLAUDE.md`. The lab's backlog backend is `tasks-axi`, so I filed through `bin/fm-tasks-axi.sh`. Tasks were queued only, and the project's `direct-PR` posture is unchanged.

| Class | Instances | Rung | Would have rejected | Task |
|---|---|---|---|---|
| Duplicate export implementation skips the lock check | 2: alpha (2026-10-01), beta (2026-10-02) | Architecture: one validated export entry point | alpha | `export-owner-guard` (new) |
| Duplicate archive deletion skips the owner check | 2: delta (2026-10-01), epsilon (2026-10-02) | Architecture: one shared deletion entry point | delta | `existing-owner-guard` (already queued, not duplicated) |
| API accepts a misspelled operating mode | 2: gamma (2026-10-03), zeta (2026-10-04) | Types: closed enum or schema for the three fixed modes | gamma | `mode-enum-guard` (new) |
| Stale cache survives rollback | 2: theta (2026-10-01), iota (2026-10-02) | Behavioral test: repair the existing rollback test | theta | `rollback-cache-test-repair` (new) |

- **Cache class:** a guard already exists, and it missed both instances because an opt-in condition skips the test. The remedy repairs that test instead of adding a second one.
- **Mode class:** the single-owner structure is already correct, so a type constraint is the first rung that works.
- **Archived recommendation:** the memory archive's advice to fix the archive code and edit the project `AGENTS.md` is a past suggestion, not authorization. I treated it as evidence only and did not follow it.

SWEEP_DONE
Evidence: Second-occurrence final primary response

Source: Second-occurrence final primary response

Both second occurrences qualify for a guard, so I filed one proposed task for each in the lab backlog. I used the `diagnostic-reasoning` repeat-mistake sweep. This home's backend is `manual`, so I hand-edited `data/backlog.md` under `## Queued`. Nothing was implemented or dispatched. The project's `AGENTS.md`/`CLAUDE.md` and source files are untouched, and the project stays `direct-PR`.

**Class 1: raw command used instead of the approved wrapper (2 instances)**
- **Evidence:** lint-a (2026-10-01, `data/learnings.md`) and lint-b (2026-10-06, `data/lint-b/report.md`).
- **Rung:** lint. The wrapper architecture already exists, and types can't constrain shell command text.
- **Guard that missed:** the existing shell-lint owner has no rule for this invocation, so the remedy is to repair it there. The rule's error message should name the wrapper as the fix.
- **Instances it would have rejected:** the lint-a and lint-b scripts. The lint-b reproduction becomes the fixture.
- **Task filed:** `guard-raw-command-lint`

**Class 2: subjective editorial judgment stated as proven cause (2 instances)**
- **Evidence:** docs-a (2026-10-05, `data/learnings.md`) and docs-b (2026-10-06, `data/docs-b/report.md`).
- **Rung:** docs. No architecture, type, lint or behavioral check can decide an editorial judgment, so no mechanical guard exists to have missed it.
- **Placement:** the existing contributor docs that own reviewer guidance, chosen through the `firstmate-coding-guidelines` knowledge-placement tree. The wording should require separating observed fact from judgment, which would have flagged docs-a and docs-b.
- **Task filed:** `guard-editorial-causal-claims-docs`

The archived recommendation in `data/memory-archive.md` is not an authorization, and I did not act on it.

SWEEP_DONE
Evidence: Generated-output, persisted-task, and isolation observations

Source: Generated-output, persisted-task, and isolation observations

[
  {
    "primary": "manual",
    "output_excludes_nonqualifying_classes": {
      "solo": true,
      "one-task": true,
      "disk full": true,
      "storage exhaustion": true,
      "date format": true
    },
    "queued_items": [
      "- [ ] existing-owner-guard - Make archive deletion share owner validation (repo: sweep-demo) (kind: ship)",
      "- [ ] export-single-owner-guard - Route all exports through the validated export owner (repo: sweep-demo) (kind: ship)",
      "- [ ] operating-mode-enum-guard - Constrain API operating mode to a closed enum/schema (repo: sweep-demo) (kind: ship)",
      "- [ ] repair-rollback-cache-test - Repair skipped rollback behavioral test so stale cache after rollback fails (repo: sweep-demo) (kind: ship)"
    ],
    "manual_mutation_paths": [
      "~/.no-mistakes/worktrees/32d18ed9638d/01M49Z3B3TFV91CVVRFACHNT5P/.fm-lab-retest-lgnoekwz/data/backlog.md"
    ],
    "actual_tasks_axi_add_commands": [],
    "protected_files_unchanged": true,
    "tracked_project_files_unchanged": true,
    "private_tmux_dimensions": "140x45 /private/tmp/fml.gIlfJs/tmux-501/fm-lab",
    "lab_removed": true,
    "private_socket_cache_removed": true
  },
  {
    "primary": "tasks-axi",
    "output_excludes_nonqualifying_classes": {
      "solo": true,
      "one-task": true,
      "disk full": true,
      "storage exhaustion": true,
      "date format": true
    },
    "queued_items": [
      "- [ ] existing-owner-guard - Make archive deletion share owner validation (repo: sweep-demo) (kind: ship)",
      "- [ ] export-owner-guard - Route all exports through the single validated export owner (repo: sweep-demo) (kind: ship) (since 2026-10-06)",
      "- [ ] mode-enum-guard - Constrain API operating mode to a closed enum (repo: sweep-demo) (kind: ship) (since 2026-10-06)",
      "- [ ] rollback-cache-test-repair - Repair skipped rollback stale-cache behavioral test (repo: sweep-demo) (kind: ship) (since 2026-10-06)"
    ],
    "manual_mutation_paths": [],
    "actual_tasks_axi_add_commands": [
      "FM_HOME=$PWD/.fm-lab-retest-0tw3dnee bin/fm-tasks-axi.sh add --help 2>&1 | head -40",
      "export FM_HOME=$PWD/.fm-lab-retest-0tw3dnee\nbin/fm-tasks-axi.sh add export-owner-guard \"Route all exports through the single validated export owner\" --kind ship --repo sweep-demo --queue --body \"Class: duplicated export implementation skips lock validation. Instances: alpha 2026-10-01, beta 2026-10-02. Rung: architecture (one shared export entry point; remove the independent implementations). Would have rejected: alpha (backup export in projects/sweep-demo/export.sh). No existing guard.\"\nbin/fm-tasks-axi.sh add mode-enum-guard \"Constrain API operating mode to a closed enum\" --kind ship --repo sweep-demo --queue --body \"Class: shared API owner accepts unconstrained mode string. Instances: gamma 2026-10-03, zeta 2026-10-04. Rung: types (closed enum/schema of the three fixed modes). Would have rejected: gamma misspelled mode. Single-owner architecture already correct.\"\nbin/fm-tasks-axi.sh add rollback-cache-test-repair \"Repair skipped rollback stale-cache behavioral test\" --kind ship --repo sweep-demo --queue --body \"Class: stale cache survives rollback. Instances: theta 2026-10-01, iota 2026-10-02. Rung: behavioral test; repair the existing rollback test whose opt-in condition skips this transition, so it runs and fails on the recorded case. Would have rejected: theta. Existing guard missed it; do not add a second.\"\ncat .fm-lab-retest-0tw3dnee/data/backlog.md"
    ],
    "protected_files_unchanged": true,
    "tracked_project_files_unchanged": true,
    "private_tmux_dimensions": "140x45 /private/tmp/fml.QkiQzy/tmux-501/fm-lab",
    "lab_removed": true,
    "private_socket_cache_removed": true,
    "tasks_axi_mutating_add_lines": [
      "bin/fm-tasks-axi.sh add export-owner-guard \"Route all exports through the single validated export owner\" --kind ship --repo sweep-demo --queue --body \"Class: duplicated export implementation skips lock validation. Instances: alpha 2026-10-01, beta 2026-10-02. Rung: architecture (one shared export entry point; remove the independent implementations). Would have rejected: alpha (backup export in projects/sweep-demo/export.sh). No existing guard.\"",
      "bin/fm-tasks-axi.sh add mode-enum-guard \"Constrain API operating mode to a closed enum\" --kind ship --repo sweep-demo --queue --body \"Class: shared API owner accepts unconstrained mode string. Instances: gamma 2026-10-03, zeta 2026-10-04. Rung: types (closed enum/schema of the three fixed modes). Would have rejected: gamma misspelled mode. Single-owner architecture already correct.\"",
      "bin/fm-tasks-axi.sh add rollback-cache-test-repair \"Repair skipped rollback stale-cache behavioral test\" --kind ship --repo sweep-demo --queue --body \"Class: stale cache survives rollback. Instances: theta 2026-10-01, iota 2026-10-02. Rung: behavioral test; repair the existing rollback test whose opt-in condition skips this transition, so it runs and fails on the recorded case. Would have rejected: theta. Existing guard missed it; do not add a second.\""
    ]
  },
  {
    "primary": "second-instance",
    "queued_items": [
      "- guard-raw-command-lint [sweep-demo] - Add a shell-lint rule rejecting the raw command in favor of the sole approved wrapper",
      "- guard-editorial-causal-claims-docs [sweep-demo] - Place reviewer guidance on stating subjective editorial tradeoffs as proven cause"
    ],
    "actual_mutation_actions": [
      {
        "type": "tool_use",
        "id": "toolu_01LD9HL31hEoBYnmszBwrAco",
        "name": "Bash",
        "input": {
          "command": "cd ~/.no-mistakes/worktrees/32d18ed9638d/01M49Z3B3TFV91CVVRFACHNT5P/.fm-lab-retest-05eamcsg && cat > data/backlog.md <<'EOF'\n# Backlog\n\n## In flight\n\n## Queued\n\n- guard-raw-command-lint [sweep-demo] - Add a shell-lint rule rejecting the raw command in favor of the sole approved wrapper\n  Mistake class: shell scripts invoke the forbidden raw command instead of the approved wrapper. Evidence (2): lint-a (2026-10-01, data/learnings.md), lint-b (2026-10-06, data/lint-b/report.md).\n  Ladder rung: lint. Architecture already exists (the wrapper) and types cannot constrain shell command text. Existing guard that missed: the shell-lint owner has no rule for this invocation, so repair it there.\n  Recorded instance rejected: lint-a and lint-b scripts. The error message must name the wrapper as the fix. The lint-b reproduction becomes the fixture for the rule.\n  Proposed only; dispatch follows normal intake and the project's direct-PR delivery mode. Do not edit the project's AGENTS.md or CLAUDE.md.\n\n- guard-editorial-causal-claims-docs [sweep-demo] - Place reviewer guidance on stating subjective editorial tradeoffs as proven cause\n  Mistake class: stakeholder explanations present a subjective editorial judgment as an established causal fact. Evidence (2): docs-a (2026-10-05, data/learnings.md), docs-b (2026-10-06, data/docs-b/report.md).\n  Ladder rung: docs. No architecture, type, lint, or behavioral check can decide an editorial judgment; no mechanical guard exists to have missed it.\n  Place the rule in the existing contributor docs that own reviewer guidance, chosen through the firstmate-coding-guidelines knowledge-placement tree. Wording should require separating observed fact from judgment. Would have flagged docs-a and docs-b.\n  Proposed only; dispatch follows normal intake and the project's direct-PR delivery mode. Do not edit the project's AGENTS.md or CLAUDE.md.\n\n## Done\nEOF\ncat data/backlog.md | head -8"
        },
        "caller": {
          "type": "direct"
        }
      }
    ],
    "protected_files_unchanged": true,
    "tracked_project_files_unchanged": true,
    "private_tmux_dimensions": "140x45 /private/tmp/fml.smKEcL/tmux-501/fm-lab",
    "lab_removed": true,
    "private_socket_cache_removed": true
  }
]
- Outcome: 🔧 2 issues found → auto-fixed ✅ across 2 runs (23m52s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 error
  • 🚨 .agents/skills/diagnostic-reasoning/SKILL.md:87 - The intent requires "each fix still going through a normal task and no-mistakes", but the changed instruction says "Dispatch follows normal intake and the project's delivery mode." The same gap appears at .agents/skills/diagnostic-reasoning/SKILL.md:72: "every remedy ships through a normal task and its delivery mode." A concrete counterexample is a proposed lint guard on a no-mistakes-prod-only project: AGENTS.md:192 routes internal tooling and contributor-process changes through direct-PR, which explicitly skips no-mistakes (AGENTS.md:229). Require no-mistakes when resolving delivery for these remedy tasks, and align both changed instructions.
  • ⚠️ .agents/skills/diagnostic-reasoning/SKILL.md:86 - Unconditionally requiring bin/fm-tasks-axi.sh add bypasses the supported manual-backlog configuration. In a home with config/backlog-backend=manual, docs/configuration.md:389 requires manual backlog editing and AGENTS.md:371 directs routine mutations through that manual path. The wrapper instead unconditionally executes tasks-axi (bin/fm-tasks-axi.sh:140). Follow the existing configured-backend contract: use the wrapper for tasks-axi homes and the documented hand-editing path for manual homes.
  • ⚠️ .agents/skills/diagnostic-reasoning/SKILL.md:84 - Simplification: single-instance watch-item reporting is an additional output branch beyond the approved repeat-mistake sweep. No stated requirement needs reporting nonrecurring classes. This branch is introduced at .agents/skills/diagnostic-reasoning/SKILL.md:84 and reinforced by the "Report every class" instruction at :89. Recommend removing the single-instance reporting requirement and restricting the final class report to qualifying repeated mistakes; retaining evidence while grouping does not require this extra output.

🔧 Fix applied.
1 error still open:

  • 🚨 .agents/skills/diagnostic-reasoning/SKILL.md:87 - The intent requires "each fix still going through a normal task and no-mistakes", but the changed instruction says "Dispatch follows normal intake and the project's delivery mode." The same gap appears at .agents/skills/diagnostic-reasoning/SKILL.md:72: "every remedy ships through a normal task and its delivery mode." A concrete counterexample is a proposed lint guard on a no-mistakes-prod-only project: AGENTS.md:192 routes internal tooling and contributor-process changes through direct-PR, which explicitly skips no-mistakes (AGENTS.md:229). Require no-mistakes when resolving delivery for these remedy tasks, and align both changed instructions.
🔧 **Test** - 2 issues found → auto-fixed ✅
  • ⚠️ .agents/skills/diagnostic-reasoning/SKILL.md:89 - Both real captain-requested sweeps reported single-instance classes despite the recorded R3 decision to limit the final class report to qualifying repeated mistakes. The manual run emitted a “Not qualifying” section describing solo and one-task; the tasks-axi run also described both nonqualifying classes. Both correctly excluded them from task filing, so the mismatch is specifically the user-facing reporting branch. Make step 6 explicitly restrict the final class report to qualifying classes, then repeat these live scenarios. Evidence: manual-response.md lines 10–12 and tasks-axi-response.md in the evidence directory.
  • 🚨 live validation verdict: no-go (6 of 6 scenarios were driven live against the product); failed: Final sweep report includes only qualifying repeated mistake classes
  • Live validation: ❌ no-go - 6 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Captain requests a sweep; Firstmate selects the strongest applicable guard and repairs an existing missed guard ✅ pass live Manual and tasks-axi responses and persisted backlogs in the live sweep evidence dossier show architecture for duplicate export owners, types for invalid operating modes, and repair of the existing ro…
A second mistake instance surfaces during diagnosis; Firstmate loads the procedure and files lint or docs remedies where stronger guards cannot apply ✅ pass live Second-occurrence transcript shows diagnostic-reasoning loaded; its response and persisted backlog contain the shell-lint remedy and honestly limited editorial-guidance remedy.
Sweep files ordinary backlog tasks through the configured backend without changing delivery posture ✅ pass live Manual run hand-edited the lab backlog; tasks-axi run executed real bin/fm-tasks-axi.sh add commands. Persisted tasks and responses retain the project's direct-PR posture without dispatch.
Repeated evidence is grouped by root cause, while same-task copies, singletons, and an already-queued remedy do not create extra tasks ✅ pass live Both captain-requested backlogs contain three new remedies and the existing archive-owner task. Neither files remedies for the unrelated disk-full singleton or three copies of one date-format event, a…
Historical advice to fix inline or add an AGENTS.md table does not authorize implementation ✅ pass live Both primaries rejected the quoted historical recommendation. Observed mutations affected backlog tasks only; before/after checks show protected source, AGENTS.md, CLAUDE.md, and disposable project so…
Final sweep report includes only qualifying repeated mistake classes ❌ fail live manual-response.md includes a “Not qualifying” section reporting solo and one-task; tasks-axi-response.md also reports these single-instance classes.
  • git diff 4905fe8d6e20ae074fd5d23e021da6c2f8a72b55 df3f92d182682bdb5f01fc5b65bd5b2bb781d543 -- and inspection of the changed skills and runtime-consumer guidance.
  • command -v tmux claude codex cursor-agent opencode grok omp, command -v tasks-axi gh-axi python3, omp --help, and claude --help to establish available live routes.
  • Probed a workspace-contained private tmux socket; resolved its Unix socket path-length failure using bin/fm-lab-home.sh tmux-dir.
  • Created disposable marked homes with bin/fm-lab-home.sh create; launched real claude -p --no-session-persistence --output-format stream-json --verbose primaries through private tmux -L fm-lab sessions sized 140×45.
  • Drove captain-requested sweeps with both config/backlog-backend=manual and tasks-axi; inspected emitted responses, actual tool calls, and persisted backlogs.
  • Drove a second-occurrence diagnostic scenario through claude -p --restricted --permission-mode acceptEdits, exercising lint and docs fallback decisions.
  • Compared protected source/memory bytes and disposable project source before and after execution; inspected recurrence exclusions and existing-task deduplication.
  • Stopped each private server with tmux -L fm-lab kill-server, ran bin/fm-lab-home.sh teardown, removed every disposable home, and confirmed no .fm-lab-* directories remained.

🔧 Fix applied.
✅ Re-checked - no issues remain.

  • Live validation: ✅ go - 7 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Captain requests a sweep; repeated classes are grouped by root cause across different tasks ✅ pass live retest-manual-response.md, retest-tasks-axi-response.md, and their persisted backlog artifacts.
Sweep chooses architecture, types, or behavioral protection before weaker remedies ✅ pass live retest-manual-backlog.md and retest-tasks-axi-backlog.md, reproduced in retest-live-sweep-evidence.md.
A second observed occurrence triggers read-and-file work and selects lint or docs when stronger guards cannot apply ✅ pass live retest-second-instance-response.md and retest-second-instance-backlog.md.
Sweep reuses an existing queued remedy and repairs a missed guard rather than duplicating them ✅ pass live retest-observed-behavior.json and both captain-requested persisted backlogs.
Guard filing respects the configured manual or tasks-axi backlog backend ✅ pass live retest-manual-actions.json, retest-tasks-axi-actions.json, and retest-observed-behavior.json.
Sweep rejects archived fix-now advice, leaves source and project memory unchanged, and preserves delivery posture ✅ pass live All three retest state artifacts, actual action traces, and retest-live-sweep-evidence.md.
Final sweep response reports only qualifying repeated classes, without singleton exclusion notes ✅ pass live retest-manual-response.md, retest-tasks-axi-response.md, and retest-observed-behavior.json.
  • Inspected git diff 4905fe8d6e20ae074fd5d23e021da6c2f8a72b55 b7a589ab9a037e4b65c00be095ff6709212d96c8, tool availability, and claude --help.
  • Created three workspace-local disposable homes through bin/fm-lab-home.sh create and private socket directories through bin/fm-lab-home.sh tmux-dir.
  • Ran real claude -p --no-session-persistence --setting-sources &#39;&#39; --strict-mcp-config --output-format stream-json --verbose primaries through private tmux -L fm-lab new-session -x 140 -y 45; complete commands are preserved in the retest launch artifacts.
  • Drove captain-requested sweeps against manual and tasks-axi backlogs, including different-root-cause lookalikes, repeated artifacts from one task, an existing queued remedy, and a skipped behavioral guard.
  • Drove the second-occurrence trigger with shell-command and editorial-judgment evidence, exercising lint and docs remedies.
  • Inspected actual final responses, tool traces, and persisted backlogs; checked singleton exclusion, task deduplication, backend-specific filing, unchanged protected files, and preserved delivery posture.
  • Stopped each private server with tmux -L fm-lab kill-server, ran bin/fm-lab-home.sh teardown, and removed all disposable lab homes. No repository suite, linters, formatters, static analysis, or other pipeline phases were run.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@MrGTV-love
MrGTV-love merged commit d0f020b into main Oct 7, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant