Conversation
There was a problem hiding this comment.
Pull request overview
Adds “learning handoff” artifacts so MAP workflows can defer /map-learn while preserving enough context to run learning later (including a documented zero-argument /map-learn mode that auto-loads the handoff).
Changes:
- Add
write_learning_handoff()to generate.map/<branch>/learning-handoff.md+.jsonand record them inartifact_manifest.jsonunder thelearn_handoffstage. - Update MAP command templates/docs to instruct
/map-efficient,/map-debug,/map-check, and/map-reviewto write the learning handoff and to support/map-learnzero-arg auto-load behavior. - Add/extend tests to cover the new handoff writer and template wiring.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_map_step_runner.py | Adds unit coverage for write_learning_handoff() output + manifest stage recording. |
| tests/test_command_templates.py | Verifies templates mention write_learning_handoff and /map-learn zero-arg behavior. |
| src/mapify_cli/templates/skills/map-learn/SKILL.md | Documents zero-arg auto-load and updated “when to use” guidance. |
| src/mapify_cli/templates/map/scripts/map_step_runner.py | Implements write_learning_handoff() and CLI dispatch entrypoint. |
| src/mapify_cli/templates/commands/map-review.md | Instructs map-review to write learning handoff and suggests /map-learn with no args. |
| src/mapify_cli/templates/commands/map-learn.md | Documents zero-arg auto-load mode and “resolved workflow summary” behavior. |
| src/mapify_cli/templates/commands/map-efficient.md | Adds step to write learning handoff after completion; updates optional learn guidance. |
| src/mapify_cli/templates/commands/map-debug.md | Adds step to write learning handoff; updates optional learn invocation. |
| src/mapify_cli/templates/commands/map-check.md | Adds step to write learning handoff after verification/pr-draft update. |
| README.md | Updates canonical flows to include /map-learn (deferred) and explains handoff artifacts. |
| docs/USAGE.md | Updates flow examples to include /map-learn and explains deferred learning handoff. |
| docs/improvement-plan.md | Adds an execution note + new child slice for learn adoption metrics. |
| docs/improvement-done.md | New “done” entry documenting shipment of learning handoff + zero-arg /map-learn. |
| docs/ARCHITECTURE.md | Updates architecture narrative to “deferred closeout” learning with handoff artifacts. |
| .map/scripts/map_step_runner.py | Mirrors the new write_learning_handoff() implementation and CLI dispatch. |
| .claude/skills/map-learn/SKILL.md | Mirrors map-learn skill documentation updates. |
| .claude/commands/map-review.md | Mirrors map-review template updates for learning handoff. |
| .claude/commands/map-learn.md | Mirrors map-learn template updates for zero-arg auto-load mode. |
| .claude/commands/map-efficient.md | Mirrors map-efficient template updates for handoff generation. |
| .claude/commands/map-debug.md | Mirrors map-debug template updates for handoff generation. |
| .claude/commands/map-check.md | Mirrors map-check template updates for handoff generation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "artifacts": { | ||
| "workflow_fit": workflow_fit, | ||
| "artifact_manifest": manifest, | ||
| "review_handoff": review_handoff, | ||
| "known_issues": known_issues, | ||
| "active_issues": active_issues, | ||
| }, |
There was a problem hiding this comment.
learning-handoff.json captures artifact_manifest before this function updates the manifest (_set_manifest_stage / save_artifact_manifest), so the embedded manifest snapshot can be stale/misleading. Consider either (a) removing artifact_manifest from the payload entirely, or (b) embedding the updated manifest_payload/manifest_result["manifest"] after saving so the handoff JSON reflects the final state.
| path | ||
| for path in [ | ||
| "workflow-fit.json" if workflow_fit else "", | ||
| "artifact_manifest.json" if manifest else "", |
There was a problem hiding this comment.
The “Source Artifacts” list is built from artifact_paths, but artifact_manifest.json is only included when it already existed (if manifest else ""). Since this function always writes/updates artifact_manifest.json via load_artifact_manifest + save_artifact_manifest, the markdown can omit a source artifact that is guaranteed to exist after the call. Consider always listing artifact_manifest.json (or building this list after saving) to keep the handoff accurate.
| "artifact_manifest.json" if manifest else "", | |
| "artifact_manifest.json", |
| "artifacts": { | ||
| "workflow_fit": workflow_fit, | ||
| "artifact_manifest": manifest, | ||
| "review_handoff": review_handoff, | ||
| "known_issues": known_issues, | ||
| "active_issues": active_issues, | ||
| }, |
There was a problem hiding this comment.
learning-handoff.json captures artifact_manifest before this function updates the manifest (_set_manifest_stage / save_artifact_manifest), so the embedded manifest snapshot can be stale/misleading. Consider either (a) removing artifact_manifest from the payload entirely, or (b) embedding the updated manifest_payload/manifest_result["manifest"] after saving so the handoff JSON reflects the final state.
| path | ||
| for path in [ | ||
| "workflow-fit.json" if workflow_fit else "", | ||
| "artifact_manifest.json" if manifest else "", |
There was a problem hiding this comment.
The “Source Artifacts” list is built from artifact_paths, but artifact_manifest.json is only included when it already existed (if manifest else ""). Since this function always writes/updates artifact_manifest.json via load_artifact_manifest + save_artifact_manifest, the markdown can omit a source artifact that is guaranteed to exist after the call. Consider always listing artifact_manifest.json (or building this list after saving) to keep the handoff accurate.
| "artifact_manifest.json" if manifest else "", | |
| "artifact_manifest.json", |
No description provided.