Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .claude/skills/map-efficient/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,15 @@ Set final status from verifier and gates:

```bash
RUN_HEALTH_STATUS="${RUN_HEALTH_STATUS:?set from final decision}"
python3 .map/scripts/map_step_runner.py write_run_health_report \
map-efficient \
"$RUN_HEALTH_STATUS"
python3 .map/scripts/map_step_runner.py write_run_health_report map-efficient "$RUN_HEALTH_STATUS"
python3 .map/scripts/map_step_runner.py write_learning_handoff map-efficient "" "$RUN_HEALTH_STATUS" "Run /map-learn to preserve patterns, then /map-review" ""
```

This writes `.map/<branch>/run_health_report.json`, updates `run_health`, and gives reviewers a machine-readable terminal snapshot.
This writes `run_health_report.json` (machine-readable run snapshot) plus `learning-handoff.md`/`.json`, so a later zero-argument `/map-learn` auto-loads this run instead of reconstructing it from memory.

## Step 4: Summary

Report completed subtasks, files changed, checks run, final status, remaining issues, and next command (`/map-review` or the owning fix workflow).
Report completed subtasks, files changed, checks run, final status, remaining issues, and next command (`/map-review`, the owning fix workflow, or optional `/map-learn` to preserve patterns).

## Examples

Expand Down
9 changes: 4 additions & 5 deletions src/mapify_cli/templates/skills/map-efficient/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,15 @@ Set final status from verifier and gates:

```bash
RUN_HEALTH_STATUS="${RUN_HEALTH_STATUS:?set from final decision}"
python3 .map/scripts/map_step_runner.py write_run_health_report \
map-efficient \
"$RUN_HEALTH_STATUS"
python3 .map/scripts/map_step_runner.py write_run_health_report map-efficient "$RUN_HEALTH_STATUS"
python3 .map/scripts/map_step_runner.py write_learning_handoff map-efficient "" "$RUN_HEALTH_STATUS" "Run /map-learn to preserve patterns, then /map-review" ""
```

This writes `.map/<branch>/run_health_report.json`, updates `run_health`, and gives reviewers a machine-readable terminal snapshot.
This writes `run_health_report.json` (machine-readable run snapshot) plus `learning-handoff.md`/`.json`, so a later zero-argument `/map-learn` auto-loads this run instead of reconstructing it from memory.

## Step 4: Summary

Report completed subtasks, files changed, checks run, final status, remaining issues, and next command (`/map-review` or the owning fix workflow).
Report completed subtasks, files changed, checks run, final status, remaining issues, and next command (`/map-review`, the owning fix workflow, or optional `/map-learn` to preserve patterns).

## Examples

Expand Down
22 changes: 14 additions & 8 deletions tests/test_skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,14 +1161,20 @@ def test_closeout_prompts_write_run_health_report(
content = skill_md.read_text(encoding="utf-8")

assert "write_run_health_report" in content
expected_invocation = f'''write_run_health_report \\
{skill_name} \\
"$RUN_HEALTH_STATUS"'''
assert expected_invocation in content
hardcoded_complete = f"""write_run_health_report \\
{skill_name} \\
complete"""
assert hardcoded_complete not in content
# Accept both single-line and backslash-continued invocations (map-efficient
# is line-budget-gated and uses the compact single-line form), but still
# require the status variable rather than a hardcoded literal in either form.
token_gap = r"\s+\\?\s*"
assert re.search(
"write_run_health_report" + token_gap + re.escape(skill_name)
+ token_gap + r'"\$RUN_HEALTH_STATUS"',
content,
), f"{skill_name} must invoke write_run_health_report with $RUN_HEALTH_STATUS"
assert not re.search(
"write_run_health_report" + token_gap + re.escape(skill_name)
+ token_gap + r"""["']?(?:complete|pending|blocked|won't_do|superseded)\b""",
content,
Comment on lines +1173 to +1176
), f"{skill_name} must not hardcode a literal status into write_run_health_report"
assert "run_health_report.json" in content
assert "run_health" in content
assert "RUN_HEALTH_STATUS" in content
Expand Down
Loading