Skip to content

Compact map-resume skill body#137

Merged
azalio merged 2 commits into
mainfrom
codex/2604-033-resume-skill-lifecycle
May 20, 2026
Merged

Compact map-resume skill body#137
azalio merged 2 commits into
mainfrom
codex/2604-033-resume-skill-lifecycle

Conversation

@azalio
Copy link
Copy Markdown
Owner

@azalio azalio commented May 20, 2026

Summary

  • Move low-frequency /map-resume examples, state notes, token-budget notes, and troubleshooting into bundled resume-reference.md
  • Keep the active recovery SKILL.md focused on checkpoint detection, briefing, confirmation, and continuation
  • Add source/template regression coverage plus plan/done/learning updates for 2604.033-1

Validation

  • pytest tests/test_skills.py::TestSkillStructure::test_map_resume_keeps_recovery_skill_body_compact tests/test_template_sync.py -v
  • uv run --no-sync mapify init --no-git --mcp none, then inspected installed .claude/skills/map-resume/SKILL.md and resume-reference.md
  • make lint
  • pytest -m "not slow"
  • pytest (attempted; timed out after 30 minutes without surfaced assertion output)

Copilot AI review requested due to automatic review settings May 20, 2026 09:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures the /map-resume skill to keep the invoked SKILL.md compact for post-compaction recovery, moving low-frequency reference material into a bundled resume-reference.md. It also adds regression tests and documentation updates to prevent the skill body from regressing in size or losing the supporting reference.

Changes:

  • Externalize /map-resume examples/technical notes/token budget/troubleshooting into resume-reference.md, keeping SKILL.md focused on the active recovery path.
  • Add a skills regression test enforcing map-resume/SKILL.md size and presence/linking of the supporting reference for both .claude/skills and shipped templates.
  • Update README/usage/architecture + improvement-plan loop documentation to reflect the compact recovery surface and follow-up slices.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_skills.py Adds regression enforcing compact /map-resume skill body + supporting reference presence/linking (source + templates).
src/mapify_cli/templates/skills/map-resume/SKILL.md Removes long appendices from invoked body; adds links to supporting reference for examples/troubleshooting.
src/mapify_cli/templates/skills/map-resume/resume-reference.md New bundled appendix holding detailed examples, integration notes, token budget, troubleshooting.
.claude/skills/map-resume/SKILL.md Mirrors the compacted /map-resume skill for the source-of-truth skills directory.
.claude/skills/map-resume/resume-reference.md Mirrors the supporting reference appendix in the source-of-truth skills directory.
README.md Documents the new “compact recovery surface” design for /map-resume.
docs/USAGE.md Updates /map-resume section to mention the compact skill + supporting reference and branch-scoped checkpoint.
docs/ARCHITECTURE.md Updates /map-resume architecture table/flow to reference step_state.json and the new reference file.
docs/learned/testing-strategies.md Adds a learned rule to protect compact recovery skill bodies with regression coverage.
docs/learned/review-checks.md Adds a learned review check for supporting-file externalization end-to-end.
docs/learned/commands.md Adds a learned command to run the new /map-resume lifecycle regression tests.
docs/learned/architecture-patterns.md Adds a learned architecture pattern about externalizing recovery appendices.
docs/improvement-plan.md Records 2604.033-1 execution note + adds follow-on slices for broader skill compaction/linting.
docs/improvement-loop-log.md Logs the 2604.033-1 change, validations, and reusable learnings.
docs/improvement-done.md Marks 2604.033-1 as done and summarizes shipped changes + validations.
Comments suppressed due to low confidence (2)

src/mapify_cli/templates/skills/map-resume/resume-reference.md:182

  • These troubleshooting steps instruct users to update step_state.json directly. Elsewhere the repo warns against direct JSON mutation because partial edits can leave current_step_phase/status inconsistent (e.g. .claude/skills/map-check/SKILL.md warns against jq/sed). Consider replacing this guidance with orchestrator-driven recovery (e.g., re-run resume_from_plan / resume_single_subtask, or explicitly document a safe, atomic repair path) so users don’t corrupt state.
**Fix:**

1. Manually verify each subtask's actual completion status
2. Update `step_state.json` to match reality
3. Resume from corrected state

.claude/skills/map-resume/resume-reference.md:182

  • These troubleshooting steps instruct users to update step_state.json directly. Elsewhere the repo warns against direct JSON mutation because partial edits can leave current_step_phase/status inconsistent (e.g. .claude/skills/map-check/SKILL.md warns against jq/sed). Consider replacing this guidance with orchestrator-driven recovery (e.g., re-run resume_from_plan / resume_single_subtask, or explicitly document a safe, atomic repair path) so users don’t corrupt state.
**Fix:**

1. Manually verify each subtask's actual completion status
2. Update `step_state.json` to match reality
3. Resume from corrected state

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


Claude: ## No Workflow in Progress

No checkpoint file found at `.map/feat-auth/step_state.json`.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 97847c2 by switching the example to the generic .map/<branch>/step_state.json path.


Claude: ## No Workflow in Progress

No checkpoint file found at `.map/feat-auth/step_state.json`.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 97847c2 by syncing the same generic .map/<branch>/step_state.json example into the source skill reference.

Comment thread docs/USAGE.md
Comment on lines +467 to +471
The installed `/map-resume` skill keeps this active recovery path compact. Detailed example transcripts, state-file shape notes, token-budget notes, and troubleshooting live in `.claude/skills/map-resume/resume-reference.md` and are loaded only when the checkpoint is ambiguous or recovery fails.

**What you'll see:**

When running `/map-resume` with an existing checkpoint (`.map/progress.md`):
When running `/map-resume` with an existing branch checkpoint (`.map/<branch>/step_state.json`):
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 97847c2 by updating the adjacent security/manual recovery text to describe the current branch-scoped step_state.json checkpoint and call progress.md legacy where relevant.

Comment thread docs/ARCHITECTURE.md
Comment on lines 1925 to 1929
1. **User runs `/map-resume`** - Explicit recovery command (no auto-injection)
2. **Command checks checkpoint** - Tests if `.map/progress.md` exists
3. **YAML frontmatter parsed** - WorkflowState.load() extracts machine state
2. **Command checks checkpoint** - Tests if `.map/<branch>/step_state.json` exists
3. **Branch state parsed** - Orchestrator state identifies the current step, phase, and subtask
4. **Progress summary displayed** - Shows completed/remaining subtasks
5. **User confirms Y/n** - Simple prompt, Y resumes, n clears checkpoint
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 97847c2 by updating the diagram and surrounding architecture wording from .map/progress.md/YAML parsing to .map/<branch>/step_state.json/orchestrator JSON parsing.

@azalio azalio merged commit c9c6c0a into main May 20, 2026
6 checks passed
@azalio azalio deleted the codex/2604-033-resume-skill-lifecycle branch May 20, 2026 12:06
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.

2 participants