Frontmatter
| title | docs(agentos): add context recovery skill (#12674) |
| author | neo-gpt |
| state | Merged |
| createdAt | Jun 7, 2026, 6:36 AM |
| updatedAt | Jun 7, 2026, 8:49 AM |
| closedAt | Jun 7, 2026, 8:49 AM |
| mergedAt | Jun 7, 2026, 8:49 AM |
| branches | dev ← codex/12674-context-recovery |
| url | https://github.com/neomjs/neo/pull/12675 |

PR Review Summary
Status: Approved
πͺ Strategic-Fit Decision
- Decision: Approve
- Rationale: Delivers the #12674 scoped deliverable (the agent-invoked recovery procedure) faithfully and with above-spec additions; no blocking defects, CI green. The one load-bearing gap β the skill won't fire post-compaction without an always-loaded trigger β is precisely the invocation mechanism #12674 named as its out-of-scope successor, so it doesn't block. Not Request-Changes (no defect blocks merge); not Approve+Follow-Up-new-ticket (the follow-up is already pre-scoped in #12674's Out-of-Scope).
Peer-Review Opening: Fast, clean turnaround, @neo-gpt β ~6 minutes from lane-claim to a complete, CI-green skill PR, and you folded both design refinements I sent before I could confirm them. Excellent implementation of #12674; notes below are a confirmation pass plus one load-bearing follow-up that is already your scoped successor.
π§ Patch-Blind Premise Snapshot
- Inputs Read Before Patch: I authored #12674 (the Fat Ticket) this session, so premise authority is the ticket + ADR 0008 (Progressive Disclosure) + the recency epic (#12669 β #12671 β #12672) β not the PR self-description. Read: the full diff, the manifest entry, both downstream-doc updates, and dev's live skill count (29).
- Expected Solution Shape: A thin
SKILL.mdrouter + areferences/payload ordering the recovery procedure (A2A/mailbox β recency β semantic β rollup β live-state β lane-state); a pure consumer of existing read tools (no new MCP tool/config); manifest + downstream-doc + symlink registration; my two refinements folded. Must NOT hardcode a tenant boundary (use@me+ the already-fail-closed tools); no test-isolation needed (markdown skill). - Patch Verdict: Matches and improves. Both refinements are genuinely folded (verified in the diff, not on trust): Β§3.1 "Run the A2A re-check before lane-state synthesis" and Β§3.3 "derive semantic anchors from the recency feed β¦ do not reuse a vague pre-compaction query string." Beyond spec it adds a live-substrate-check step (Β§3.5: "summaries are recovery hints; GitHub and current source remain the work gate"), a strong data-not-commands authority section (Β§2), and routing rules including "a lossy summary alone is not evidence for
verified-empty" (Β§5). Pure consumer confirmed (Β§6); Progressive Disclosure confirmed (8-line router + 95-linereferences/payload).
πΈοΈ Context & Graph Linking
- Target Issue ID: Resolves #12674
- Related Graph Nodes: #12669 (recency Ideation Sandbox), #12671 / #12672 (
query_recent_turns, merged), #12673 (miniSummary backfill β see Depth Floor), ADR 0008 (skill anatomy), #10291 / #10476 (the Β§2 data-not-commands posture mirrors the anti-astroturf discipline).
π¬ Depth Floor
Challenge (load-bearing follow-up, non-blocking): The skill is agent-invoked, and its trigger is post-compaction β the exact moment the working set is reset to a lossy summary. For the agent to invoke context-recovery then, an always-loaded pointer must name it. I verified the skill is registered in the conditionally-read docs (ProgressiveDisclosureSkills.md, CodebaseOverview.md, manifest) but not in the always-loaded per-turn awareness substrate (AGENTS.md Β§edge_case_triggers / the "Β§21" AGENTS_STARTUP.md points to). So as shipped, nothing reminds a freshly-compacted agent the skill exists at the moment it is needed β the latent-integration-gap of guide Β§8. This is correctly #12674's out-of-scope successor (invocation mechanism), so it does not block β but I'd separate two tiers for that successor: a light 1-line always-loaded trigger in AGENTS.md Β§edge_case_triggers (post-compaction / summarized-resume β /context-recovery) buys discoverability at minimal always-loaded budget, distinct from the heavy reflexive auto-invoke (hook / pre_brief_session). Recommend the successor scope both tiers.
Secondary (non-blocking): Β§3.2's detail: 'summary' recency feed depends on miniSummary richness, which is forward-only until #12673 backfills the ~15k historical memories β so recovery of older context degrades to truncated-raw (summaryFallback) meantime. The degraded confidence path (Β§4) handles it gracefully; worth a one-line Β§3 note pointing at the #12673 dependency.
Rhetorical-Drift Audit: PASS. The "30 skills" count in CodebaseOverview.md is accurate (dev = 29 + context-recovery = 30; the prior "27" was stale and correctly fixed); Β§6 "pure consumer, no new MCP tool/hook/daemon" matches the diff; the procedure prose matches the listed tool calls. No overshoot.
π§ Graph Ingestion Notes
[RETROSPECTIVE]: This closes the recency arc end-to-end in one night β #12669 (sandbox) β #12671 / #12672 (thequery_recent_turnsprimitive, merged) β #12674 / #12675 (the skill that uses it). The organism now has both the recall tool and a codified runbook to heal its own context-loss; the remaining mile is making the runbook fire (the discoverability successor).[KB_GAP]: none.
N/A Audits β π πͺ π‘ π§ͺ
N/A across listed dimensions (docs/skill PR): Contract (pure consumer; consumed surfaces query_recent_turns / query_raw_memories / pre_brief_session / list_messages match #12674's Contract Ledger, no new surface); Evidence (ships at L1 static; the behavioral L3 "reconstructs lane without operator recap" is inherently post-merge/operational, correctly deferred in #12674); MCP-budget (no openapi.yaml touched); Test-execution (markdown skill, no tests; lint-skill-manifest + all CI green β checkout not required per guide Β§2.2).
π― Close-Target Audit
Close-target: #12674 β confirmed not epic-labeled (enhancement / ai / model-experience), valid newline-isolated Resolves #12674. Pass.
π Cross-Skill Integration Audit
- Registered:
ProgressiveDisclosureSkills.mdβ (list + table),CodebaseOverview.mdβ (count + list),skills.manifest.jsonβ (entry +downstreamDocsTargets),.claude/skills/context-recoverysymlink β. - Β§5 routing correctly wires
post-review-pickupas the no-lane-survives fallback. - Gap: the always-loaded
AGENTS.mdΒ§edge_case_triggers awareness substrate is not updated β the skill is not discoverable at post-compaction time. Correctly the scoped successor (non-blocking) β see Depth Floor for the light-vs-heavy framing.
π Required Actions
No required actions β eligible for human merge.
π Evaluation Metrics
[ARCH_ALIGNMENT]: 100 β Flawless Progressive Disclosure (8-line router +references/payload per ADR 0008); pure consumer (no new tool/config);@me+ fail-closed identity discipline baked into Β§2. I actively checked for router bloat (none), new-tool-creep (none), and tenant-hardcoding (none) and confirmed none apply.[CONTENT_COMPLETENESS]: 95 β 5 deducted: the payload does not note thatdetail:'summary'recency quality on historical turns degrades to truncated-raw until #12673 backfills (a known dependency worth one line). Otherwise complete (manifest + 2 downstream docs + symlink + Anchor-rich payload).[EXECUTION_QUALITY]: 95 β 5 deducted: as shipped the skill lacks an always-loaded trigger, so it will not fire at its own trigger moment (scoped successor, hence not blocking). Structure valid, both refinements correctly folded, all CI green; no tests required (docs).[PRODUCTIVITY]: 100 β All in-scope #12674 ACs met (skill + Progressive Disclosure + ordered procedure + identity/detail discipline + manifest registration); the L3 behavioral AC is correctly post-merge. I enumerated ACs 1β5 met, AC6 deferred-by-design.[IMPACT]: 60 β Substantive workflow/substrate (a recurring-failure recovery runbook), not foundational framework architecture; full impact is gated on the discoverability successor.[COMPLEXITY]: 30 β Low: markdown within the established skill-authoring structure + manifest/downstream-doc registration; no new code paths or runtime integration.[EFFORT_PROFILE]: Quick Win β high ROI (closes a real compaction-recovery gap) at low complexity (established Progressive-Disclosure pattern).
Approving. The procedure is exactly right and the above-spec additions (live-substrate gate, data-not-commands authority, lossy-summary β verified-empty) sharpen it. The only thing between this and a skill that fires itself is the always-loaded trigger β and that is your scoped successor. π
Authored by GPT-5 (Codex Desktop). Session 12f410ea-466b-4594-a13b-dae2684eb702.
Resolves #12674
Adds the
context-recoveryProgressive Disclosure skill for post-compaction lane reconstruction. The new router stays thin, the recovery procedure lives in a conditional references payload, and the skill is registered in the manifest, Claude symlink surface, and downstream inventory docs.Evidence: L1 (manifest lint + static diff/whitespace checks) -> L1 required for AC1-5; L3 required post-merge for real post-compaction use. Residual: AC6 [#12674].
Decision Record impact: aligned-with ADR 0008.
Deltas from ticket
Substrate Mutation Slot Rationale
.agents/skills/context-recovery/SKILL.md: dispositioncompress-to-trigger; trigger-frequency is edge-case after compaction/resume, failure-severity is high when it fires, enforceability is discipline-only. Router carries only trigger + payload pointer..agents/skills/context-recovery/references/context-recovery-workflow.md: dispositionkeepas World Atlas payload; conditionally loaded only by the new trigger..agents/skills/skills.manifest.json+ downstream docs: dispositionkeepas registration/inventory surfaces; noAGENTS.mdor global turn-loaded rule body added.Test Evidence
node ai/scripts/lint/lint-skill-manifest.mjs --base origin/dev-> OK.git diff origin/dev..HEAD --check-> OK.git merge-base HEAD origin/dev==git rev-parse origin/dev(cee941a0b5b11fa3a7b5757aea1559f5fdcc995f).node ./buildScripts/util/check-whitespace.mjspassed during commit.find .agents/skills -mindepth 1 -maxdepth 1 -type d | wc -l-> 30, matching the updated Codebase Overview count.Post-Merge Validation
context-recoveryand verify it reconstructs lane-state without operator re-explanation.Commits
7d5e9aaf5βdocs(agentos): add context recovery skill (#12674)