Skip to content

feat: add learning handoff artifacts#97

Merged
azalio merged 4 commits intomainfrom
codex/2604-035-learning-handoff
Apr 12, 2026
Merged

feat: add learning handoff artifacts#97
azalio merged 4 commits intomainfrom
codex/2604-035-learning-handoff

Conversation

@azalio
Copy link
Copy Markdown
Owner

@azalio azalio commented Apr 12, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 12, 2026 17:17
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

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 + .json and record them in artifact_manifest.json under the learn_handoff stage.
  • Update MAP command templates/docs to instruct /map-efficient, /map-debug, /map-check, and /map-review to write the learning handoff and to support /map-learn zero-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.

Comment on lines +863 to +869
"artifacts": {
"workflow_fit": workflow_fit,
"artifact_manifest": manifest,
"review_handoff": review_handoff,
"known_issues": known_issues,
"active_issues": active_issues,
},
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
path
for path in [
"workflow-fit.json" if workflow_fit else "",
"artifact_manifest.json" if manifest else "",
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
"artifact_manifest.json" if manifest else "",
"artifact_manifest.json",

Copilot uses AI. Check for mistakes.
Comment on lines +863 to +869
"artifacts": {
"workflow_fit": workflow_fit,
"artifact_manifest": manifest,
"review_handoff": review_handoff,
"known_issues": known_issues,
"active_issues": active_issues,
},
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread .map/scripts/map_step_runner.py Outdated
path
for path in [
"workflow-fit.json" if workflow_fit else "",
"artifact_manifest.json" if manifest else "",
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
"artifact_manifest.json" if manifest else "",
"artifact_manifest.json",

Copilot uses AI. Check for mistakes.
@azalio azalio merged commit 781d920 into main Apr 12, 2026
6 checks passed
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