Commit 41c5e39
authored
feat: automatic ACTOR retry on Monitor failure (#92)
* feat: add monitor_failed() for automatic ACTOR retry on Monitor failure
When Monitor returns valid=false, the orchestrator now has a proper
state transition back to ACTOR phase. This fixes the deadlock where
Monitor detects issues but workflow-gate blocks edits during MONITOR.
- Add monitor_failed() for sequential execution mode
- Add wave_monitor_failed() for parallel/wave execution mode
- Both persist feedback to .map/<branch>/monitor_feedback*.md
- Both enforce max_retries with escalation status
- Register as CLI commands: monitor_failed, wave_monitor_failed
- Update map-efficient.md to use orchestrator instead of pseudocode
* chore: formatting cleanup and add DevOpsConf case study link
- Add DevOpsConf 2026 case study link to README.md
- Minor formatting cleanup in ralph-iteration-logger.py, diagnostics.py, map_step_runner.py
* fix: address review findings for monitor_failed
Issues found by Monitor/Predictor/Evaluator review:
- Fix CLI feedback truncation: join all positional args for multi-word
feedback (was silently dropping words after the first)
- Fix TDD mode: always requeue only ["2.3", "2.4"] on retry, never
re-run TDD pre-steps (2.25/2.26) that were already completed
- Fix feedback overwrite: use retry-numbered filenames
(monitor_feedback_retry{N}.md) per error-patterns.md lesson
- Extract _write_feedback_file() helper to DRY the feedback persistence
- Update Phase D wave retry pseudocode to use wave_monitor_failed
- Clarify Actor feedback file path comment (explicit, not "automatic")
- Add 17 unit tests: TestMonitorFailed (10) + TestWaveMonitorFailed (7)
* fix: address review findings and add reopen_for_fixes for post-review edits
Review findings (11 items):
- Extract _check_retry_limit() helper to DRY up monitor_failed/wave_monitor_failed
- Add phase guard to monitor_failed() rejecting non-MONITOR phase calls
- Add --feedback CLI flag for symmetric argument passing
- Fix SUBTASK_ID placeholder, feedback filename comment, Continue label text
- Document serial/wave retry counter invariant in StepState
- Update ARCHITECTURE.md CLI command list
New feature: reopen_for_fixes()
- Transitions COMPLETE → ACTOR so workflow gate unlocks for review fixes
- Solves: /map-review finds issues but edits blocked in COMPLETE phase
- map-review.md updated with "Workflow Gate Unlock" section
Tests: 13 new tests (6 reopen_for_fixes + 4 review findings + 3 integration)
* fix: add test quality gate to map-tdd to prevent trivial "2+2=4" tests
TEST_WRITER prompt now includes explicit anti-patterns:
- Every test must verify semantic behavior, not just single branch execution
- Tests must assert multiple consequences (side effects, return values, state)
- Prefer scenario-based tests over single-field unit checks
- Aim for 60%+ semantic tests
TEST_FAIL_GATE now includes quality gate:
- Classifies tests as semantic vs trivial
- Rejects if >40% tests are trivial single-branch checks
- Sends feedback to TEST_WRITER to merge trivial tests into richer scenarios
Addresses feedback: 3/9 tests were trivial branch checks in production use.
* fix: prevent stale Red-phase comments in TDD test files
TEST_WRITER could add temporal comments like "currently FAILS" or
"expected to FAIL until fix is applied" that become stale after the
Green phase. Actor in code_only mode cannot clean them up.
- Add rule to TEST_WRITER prohibiting temporal state-marking comments
(map-tdd.md, map-efficient.md, actor.md)
- Add TDD Refactor cleanup step after Actor returns, before Monitor,
to scan and clean any stale Red-phase markers in test files
* chore: remove deprecated skills (map-workflows-guide, map-cli-reference, map-debate)
Remove unused skill definitions and their trigger rules from both
dev config (.claude/) and shipped templates (src/mapify_cli/templates/).
* fix: remove map-debate from expected command templates in tests
* chore: remove all map-debate references from docs, tests, and plugin metadata
Clean up remaining mentions after command/skill deletion.
CHANGELOG entries preserved as historical record.
* chore: ignore .map/scripts/.map/ in gitignore1 parent 56e2aeb commit 41c5e39
52 files changed
Lines changed: 1111 additions & 6229 deletions
File tree
- .claude-plugin
- .claude
- agents
- commands
- skills
- map-cli-reference
- scripts
- map-workflows-guide
- resources
- scripts
- .map/scripts
- docs
- src/mapify_cli
- delivery
- templates
- agents
- commands
- hooks
- map/scripts
- skills
- map-cli-reference
- scripts
- map-workflows-guide
- resources
- scripts
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
279 | 282 | | |
280 | 283 | | |
281 | 284 | | |
| |||
0 commit comments