Repository navigation
feat: add repeat-mistake sweeps and strongest-guard-first guidance - #35
Merged
Merged
Conversation
…ep to diagnostic-reasoning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.
Evidence: Current-round live evidence: actual responses, persisted backlogs, and teardown observations
Source: Current-round live evidence: actual responses, persisted backlogs, and teardown observations
Evidence: Manual-backend final primary response
Source: Manual-backend final primary response
Evidence: Tasks-axi-backend final primary response
Source: Tasks-axi-backend final primary response
Evidence: Second-occurrence final primary response
Source: Second-occurrence final primary response
Evidence: Generated-output, persisted-task, and isolation observations
Source: Generated-output, persisted-task, and isolation observations
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
.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.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, andclaude --helpto establish available live routes.Probed a workspace-contained private tmux socket; resolved its Unix socket path-length failure usingbin/fm-lab-home.sh tmux-dir.Created disposable marked homes withbin/fm-lab-home.sh create; launched realclaude -p --no-session-persistence --output-format stream-json --verboseprimaries through privatetmux -L fm-labsessions sized 140×45.Drove captain-requested sweeps with bothconfig/backlog-backend=manualandtasks-axi; inspected emitted responses, actual tool calls, and persisted backlogs.Drove a second-occurrence diagnostic scenario throughclaude -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 withtmux -L fm-lab kill-server, ranbin/fm-lab-home.sh teardown, removed every disposable home, and confirmed no.fm-lab-*directories remained.🔧 Fix applied.
✅ Re-checked - no issues remain.
Inspectedgit diff 4905fe8d6e20ae074fd5d23e021da6c2f8a72b55 b7a589ab9a037e4b65c00be095ff6709212d96c8, tool availability, andclaude --help.Created three workspace-local disposable homes throughbin/fm-lab-home.sh createand private socket directories throughbin/fm-lab-home.sh tmux-dir.Ran realclaude -p --no-session-persistence --setting-sources '' --strict-mcp-config --output-format stream-json --verboseprimaries through privatetmux -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 withtmux -L fm-lab kill-server, ranbin/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.