Repository navigation
fix(skills): reconcile inherited secondmate plans with shipped state - #1837
Closed
kunchenguid wants to merge 3 commits into
Closed
kunchenguid wants to merge 3 commits into
kunchenguid wants to merge 3 commits into
Conversation
… domain A new mate seeded for an existing or inherited domain previously pulled in charter, inherited config, captain-shared preferences, project clones, and queued backlog rows with zero instruction about the domain's shipped history, so it assumed a greenfield domain. A live backlog keeps only the configured recent Done entries, so an inherited queue structurally over-represents plans and under-represents deliveries, and already-delivered work resurfaced as open. Add a record-intake step to the creation/seed path: classify greenfield versus existing or inherited, and for the latter reconcile every inherited plan against origin/main plus the live deployment, take only genuinely open work and still-live durable knowledge, never carry a plan row for shipped work, and record what could not be reconciled. Greenfield domains are untouched. The skill owns the procedure; the backlog handoff section carries a one-line reinforcement at the point where plan rows actually move.
Owner
Author
|
Superseded by #1853. This PR hit an unrecoverable no-mistakes custody divergence: a The identical change - one Markdown file, +22/-1 to |
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
Add a small record-intake instruction to the secondmate CREATION/seed path in firstmate's secondmate-provisioning skill, so a new mate that takes over an existing or inherited domain reconciles against authoritative shipped-state instead of inheriting a plan backlog blind.
WHY (captain's chosen safeguard, 2026-08-06): this is the fix for a stale-record recurrence forensically diagnosed in two scout reports (data/fm-stale-record-discord-forensic-s1/report.md and data/fm-stale-record-discord-attribution-s2/report.md). A predecessor secondmate home shipped 21+ merged PRs for a product; when it was retired into a successor, the handover carried backlog.md, captain.md, learnings.md and a brief, but NOT done-archive.md. Because .tasks.toml sets done_keep = 10, a live backlog structurally cannot hold more than ten completions, so the successor inherited 49 open plan rows and zero record of 21 shipped PRs. Already-delivered work therefore resurfaced as 'open'. The verified gap: creation/seeding pulls in charter + inherited config + captain-shared + project clones + (separately) QUEUED backlog only, with ZERO instruction about a domain's shipped/done history, so it assumes a greenfield mate.
CAPTAIN'S EXPLICIT REFRAME AND SCOPE DECISION: do NOT build a bespoke retirement/consolidation export process - retirement is too rare to be the leverage point. Strengthen secondmate CREATION instead, which every transfer relies on. This deliberately fixes BOTH the rare retirement/consolidation case AND the COMMON case of creating a mate for an in-progress project. The captain accepted the tradeoff that reconciliation cost is now paid at every inherited-domain creation rather than once at handover, because creation-side reconciliation works even when the predecessor's export was poor or its home is already gone.
THE FIX, as captain-specified: add a small RECORD-INTAKE instruction to secondmate-provisioning's creation/seed section requiring that, when a new mate takes over an EXISTING or INHERITED domain (a project already in development, or a predecessor's domain), the creating agent MUST (1) reconcile the inherited plans against the domain's authoritative SHIPPED-state - origin/main plus the live deployment - NOT the imported backlog and NOT an absent/fresh local view; (2) pull in only genuinely-open work plus the domain's durable knowledge (learnings/decisions still live); (3) NEVER inherit a plan backlog blind, meaning never carry plan rows for work already shipped. The greenfield-vs-inherited distinction must be explicit so a genuinely new domain is not burdened.
EXPLICIT SCOPE EXCLUSION: this ship is the record-intake creation instruction ONLY. The separate fix to close open-decisions by construction on the decision key and de-overload the 'resolved' verb (the doer's self-blindness defect, also diagnosed in those reports) is captured as its own separately queued ship, fm-decision-key-close-by-construction-r1, and must NOT be implemented here. Also deliberately out of scope: the s1 report's R1 recommendation for a mechanical export gate at retirement - the captain ruled retirement out of scope as too rare.
DELIBERATE DESIGN DECISIONS MADE WHILE IMPLEMENTING (per firstmate's firstmate-coding-guidelines, which was loaded first as the brief required):
NO TEST WAS ADDED, and this is a deliberate, correct decision rather than an oversight. Both this repo's guidelines and no-mistakes' own test-quality rule forbid a test whose only evidence is that it greps, parses, or snapshots implementation/instruction source text for particular strings. A test asserting that this skill's Markdown contains the intake step would be exactly that forbidden anti-pattern. There is no executable consumer of agent-skill prose, so no public or executable interface exists to exercise here. The brief anticipated this explicitly: 'otherwise this is a documentation-contract change and the audience check is the gate.' The gate that does apply, bin/fm-doc-audience-check.sh, was run and passes (ok surfaces=65 local_links=205).
STYLE CONSTRAINTS OBSERVED (repo rules): one full sentence per line in tracked Markdown, never multiple sentences on one physical line; plain dash '-' only, never an em dash; no agent name as commit co-author.
This is firstmate shared, tracked material, delivered under mode=no-mistakes.
What Changed
origin/mainstate and the live deployment, rather than backlogs, predecessor notes, or incomplete local views.Risk Assessment
✅ Low: The documentation-only change is narrowly scoped, conforms to the required record-intake contract, preserves the greenfield distinction, and introduces no substantiated source risk.
Testing
No baseline command was supplied; targeted validation inspected the complete one-file contract diff, confirmed its agent-runtime audience, and ran the maintained-prose/link checker successfully. No unit test was added because agent-skill prose has no executable semantic consumer and a source-text assertion is expressly forbidden. No screenshot was captured because this is an agent-only Markdown instruction surface with no rendered UI.
Evidence: Record-intake contract diff
Evidence: Documentation audience check
fm-doc-audience-check: ok surfaces=65 local_links=205Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
Inspectedgit diff --find-renames 345de4e7aad1484f46bc5115c9e57640a0b060d9..3c4463f52b2bafda4e7b9a56e0bad31d7723344d -- .agents/skills/secondmate-provisioning/SKILL.mdand recorded the contract patchRanbin/fm-doc-audience-check.shVerifieddocs/documentation-audiences.jsonclassifies.agents/skills/secondmate-provisioning/SKILL.mdasagent-runtimeVerified the worktree was clean and HEAD matched3c4463f52b2bafda4e7b9a56e0bad31d7723344d✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.