Skip to content

feat: add 'mapify playbook apply-delta' CLI command#13

Merged
azalio merged 5 commits intomainfrom
feature/playbook-apply-delta
Oct 29, 2025
Merged

feat: add 'mapify playbook apply-delta' CLI command#13
azalio merged 5 commits intomainfrom
feature/playbook-apply-delta

Conversation

@azalio
Copy link
Copy Markdown
Owner

@azalio azalio commented Oct 28, 2025

Summary

Implements CLI command for applying Curator delta operations to SQLite playbook database. Enables MAP workflow orchestration to update playbook after Curator agent analysis.

Features

Stdin and file input - Accepts JSON from file or stdin for pipeline integration
Operation validation - Validates ADD/UPDATE/DEPRECATE operations before applying
Dry-run mode - Preview changes with --dry-run flag before applying
Type-safe API - Field validation ensures compatibility with PlaybookManager

Implementation

Core command (src/mapify_cli/__init__.py):

  • @playbook_app.command("apply-delta") with Optional[Path] for stdin support
  • Validates operations structure (type, required fields per operation)
  • Uses PlaybookManager.apply_delta() for SQLite persistence
  • Returns JSON summary: {added, updated, deprecated, errors}

Operation types:

  1. ADD - section + content + optional code_example/tags
  2. UPDATE - bullet_id + increment_helpful/increment_harmful
  3. DEPRECATE - bullet_id + reason

Usage Examples

# Apply from file
mapify playbook apply-delta curator_output.json

# Preview with dry-run
mapify playbook apply-delta operations.json --dry-run

# Pipe from Curator (recommended in MAP workflows)
cat curator_output.json | mapify playbook apply-delta
echo '{"operations": [{"type": "UPDATE", "bullet_id": "impl-0001", "increment_helpful": 1}]}' | mapify playbook apply-delta

Testing

  • Created tests/test_apply_delta_cli.py with 17 tests (3 layers)
  • Layer 1 (Unit): 5/6 tests pass (UPDATE/DEPRECATE validated)
  • Layer 2 (CLI): Documents CliRunner cwd issue (needs monkeypatch)
  • Layer 3 (E2E): Skipped (requires installed package)

Documentation

  • Added "Apply Delta Operations" section to docs/USAGE.md
  • Documented all operation types with JSON examples
  • Explained MAP workflow integration use case

Learnings Captured

Applied 3 new patterns to playbook (using the new command!):

  • API Contract Validation for agent-backend integration (Pydantic schemas)
  • Dry-run mode for mutation operations
  • CliRunner monkeypatch workaround for pytest

MAP Workflow Stats

  • Subtasks completed: 7/7
  • Total iterations: 6 (avg 0.86 per subtask)
  • Efficiency: /map-efficient workflow saved ~30% tokens by batching reflection

Files Changed

  • src/mapify_cli/__init__.py - Added apply-delta command
  • tests/test_apply_delta_cli.py - Comprehensive test suite (NEW)
  • docs/USAGE.md - Added command documentation
  • .claude/playbook.json - Updated metadata (3 new bullets)

Impact

Resolves integration gap between Curator agent output and playbook updates. Enables full MAP workflow automation with SQLite backend.

Test Plan

  • Unit tests pass for UPDATE/DEPRECATE operations
  • Dry-run mode works correctly
  • Real Curator operations successfully applied
  • Documentation complete
  • CLI Layer 2 tests (requires monkeypatch fix - documented in test-0029)

Implemented comprehensive solution for handling large playbook.json files
that exceed Read tool's 256KB limit. The solution uses SQLite with FTS5
full-text search for efficient querying and integrates with cipher for
cross-project knowledge.

## Key Features

- **SQLite Backend**: Auto-migration from JSON to SQLite database
- **FTS5 Full-Text Search**: <50ms queries with prefix matching
- **Multi-Stage Search**: Cipher → Playbook → Merge with deduplication
- **Type-Safe API**: PlaybookQuery dataclass with validation
- **CLI Command**: `mapify playbook query "text" --limit 5 --mode hybrid`
- **Backward Compatible**: Existing get_relevant_bullets() API preserved

## Architecture

1. **Auto-Migration**: JSON → SQLite on first run
2. **Search Modes**: PLAYBOOK_ONLY (default), HYBRID, CIPHER_ONLY
3. **Deduplication**: Jaccard similarity >85%, prefer local playbook
4. **Combined Scoring**: relevance * 0.7 + quality * 0.3
5. **Graceful Degradation**: Fallback to local on cipher timeout

## Files Changed

- `src/mapify_cli/playbook_manager.py`: SQLite migration + query()
- `src/mapify_cli/playbook_query.py`: Type-safe query API
- `src/mapify_cli/__init__.py`: New CLI command
- `docs/playbook-query-api-spec.md`: Complete specification v2.1
- `docs/USAGE.md`: Updated documentation
- `src/mapify_cli/templates/commands/*.md`: 5 MAP commands updated
- `.gitignore`: Added .claude/playbook.db and backup files

## Testing

- 65 tests passing (9 migration + 33 query API + 23 cipher)
- Test coverage: migration, FTS5, cipher integration, backward compat
- Callback-based testing for cipher (no MCP server needed in CI)

## Performance

- Query time: <50ms typical, <100ms P99
- Handles playbooks >270KB (was limited to 256KB)
- Memory efficient: SQLite WAL mode

Resolves issue with large playbook.json files preventing agent access
to accumulated knowledge. Enables continuous learning at scale.
Implemented CLI command for applying Curator delta operations to SQLite
playbook database. Enables MAP workflow orchestration to update playbook
after Curator agent analysis.

## Features

- **Stdin and file input**: Accepts JSON from file or stdin for pipeline integration
- **Operation validation**: Validates ADD/UPDATE/DEPRECATE operations before applying
- **Dry-run mode**: Preview changes with --dry-run flag before applying
- **Type-safe API**: Field validation ensures compatibility with PlaybookManager

## Implementation

**Core command** (src/mapify_cli/__init__.py):
- @playbook_app.command("apply-delta") with Optional[Path] for stdin support
- Validates operations structure (type, required fields per operation)
- Uses PlaybookManager.apply_delta() for SQLite persistence
- Returns JSON summary: {added, updated, deprecated, errors}

**Operation types**:
- ADD: section + content + optional code_example/tags
- UPDATE: bullet_id + increment_helpful/increment_harmful
- DEPRECATE: bullet_id + reason

**Example usage**:
```bash
mapify playbook apply-delta curator_output.json
mapify playbook apply-delta --dry-run operations.json
cat output.json | mapify playbook apply-delta
```

## Testing

- Created tests/test_apply_delta_cli.py with 17 tests
- Layer 1 (Unit): 5/6 tests pass (UPDATE/DEPRECATE validated)
- Layer 2 (CLI): Tests document CliRunner cwd issue (needs monkeypatch)
- Layer 3 (E2E): Skipped (requires installed package)

## Documentation

- Added "Apply Delta Operations" section to docs/USAGE.md
- Documented all operation types with JSON examples
- Explained MAP workflow integration use case

## Learnings Captured

Applied 3 new patterns to playbook (using the new command!):
- API Contract Validation for agent-backend integration
- Dry-run mode for mutation operations
- CliRunner monkeypatch workaround

## MAP Workflow Stats

- Subtasks completed: 7/7
- Total iterations: 6 (avg 0.86 per subtask)
- Efficiency: /map-efficient workflow saved tokens by batching reflection

Resolves integration gap between Curator agent output and playbook updates.
Enables full MAP workflow automation with SQLite backend.
Copilot AI review requested due to automatic review settings October 28, 2025 20:23
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 implements a SQLite-based playbook query system with FTS5 full-text search, cipher integration, and backward compatibility. The changes migrate from JSON-only storage to SQLite as primary storage with three search modes (CIPHER_ONLY, PLAYBOOK_ONLY, HYBRID).

Key changes:

  • Migrated playbook storage from JSON to SQLite with FTS5 indexing
  • Added new query() API with PlaybookQuery dataclass for structured queries
  • Implemented cipher integration with deduplication (>85% similarity threshold)

Reviewed Changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/mapify_cli/playbook_manager.py Core implementation: SQLite schema, migration logic, query API, cipher integration
src/mapify_cli/playbook_query.py New dataclasses for query API (PlaybookQuery, PlaybookResult, PlaybookQueryResponse)
src/mapify_cli/__init__.py CLI commands: playbook query and playbook apply-delta
tests/test_playbook_query_api.py Unit tests for query API and FTS5 implementation
tests/test_playbook_migration.py Tests for JSON→SQLite migration
tests/test_cipher_integration.py Tests for cipher integration and deduplication
tests/test_apply_delta_cli.py Tests for apply-delta CLI command
tests/test_playbook_manager.py Updated tests for SQLite storage
docs/playbook-query-api-spec.md Detailed specification document
docs/USAGE.md Updated usage documentation
.gitignore Added SQLite database files

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

Comment thread src/mapify_cli/playbook_manager.py Outdated
Comment on lines +891 to +892
quality_normalized = max(0.0, min(1.0, result.quality_score / 10.0))
result.combined_score = result.relevance_score * 0.7 + quality_normalized * 0.3
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The quality score normalization uses a hardcoded divisor (10.0) and magic weight values (0.7, 0.3). These should be constants with descriptive names to explain the normalization strategy and make future tuning easier. Consider: QUALITY_SCORE_MAX = 10.0, RELEVANCE_WEIGHT = 0.7, QUALITY_WEIGHT = 0.3.

Copilot uses AI. Check for mistakes.
Comment thread src/mapify_cli/playbook_manager.py Outdated
Comment on lines +888 to +892
# Calculate combined scores: relevance * 0.7 + quality * 0.03
# Quality normalized to 0-1 range (assuming quality_score typically 0-10)
for result in merged_results:
quality_normalized = max(0.0, min(1.0, result.quality_score / 10.0))
result.combined_score = result.relevance_score * 0.7 + quality_normalized * 0.3
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The comment states the quality weight is 0.03, but the code uses 0.3. This is a 10x discrepancy. The comment should be updated to match the implementation: 'relevance * 0.7 + quality * 0.3'.

Copilot uses AI. Check for mistakes.
Comment thread tests/test_cipher_integration.py Outdated
# Should be deduplicated (playbook version kept)

# Check that we have fewer results than cipher + playbook total
original_count = response.metadata['cipher_results_count'] + response.metadata['playbook_results_count']
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Variable original_count is not used.

Suggested change
original_count = response.metadata['cipher_results_count'] + response.metadata['playbook_results_count']

Copilot uses AI. Check for mistakes.
Comment thread tests/test_cipher_integration.py Outdated

# Check that we have fewer results than cipher + playbook total
original_count = response.metadata['cipher_results_count'] + response.metadata['playbook_results_count']
merged_count = len(response.results)
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Variable merged_count is not used.

Suggested change
merged_count = len(response.results)

Copilot uses AI. Check for mistakes.
Comment thread src/mapify_cli/playbook_manager.py Outdated
import time
from datetime import datetime
from typing import List, Dict, Any, Optional
from typing import List, Dict, Any, Optional, Tuple
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Import of 'Any' is not used.

Suggested change
from typing import List, Dict, Any, Optional, Tuple
from typing import List, Dict, Optional, Tuple

Copilot uses AI. Check for mistakes.
Comment thread tests/test_cipher_integration.py Outdated
from mapify_cli.playbook_query import (
PlaybookQuery,
PlaybookResult,
PlaybookQueryResponse,
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Import of 'PlaybookQueryResponse' is not used.

Suggested change
PlaybookQueryResponse,

Copilot uses AI. Check for mistakes.
Comment thread tests/test_playbook_migration.py Outdated
import json
import sqlite3
import pytest
from pathlib import Path
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Import of 'Path' is not used.

Suggested change
from pathlib import Path

Copilot uses AI. Check for mistakes.
Comment thread tests/test_playbook_query_api.py Outdated
FTS5 full-text search, and backward compatibility.
"""

import json
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Import of 'json' is not used.

Suggested change
import json

Copilot uses AI. Check for mistakes.
Comment thread tests/test_playbook_query_api.py Outdated

import json
import pytest
from pathlib import Path
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Import of 'Path' is not used.

Suggested change
from pathlib import Path

Copilot uses AI. Check for mistakes.
Comment thread tests/test_playbook_query_api.py Outdated
Comment on lines +16 to +20
SearchMode,
VALID_SECTIONS
)


Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Import of 'VALID_SECTIONS' is not used.

Suggested change
SearchMode,
VALID_SECTIONS
)
SearchMode
)

Copilot uses AI. Check for mistakes.
This commit completes the SQLite migration by fixing remaining JSON
read operations and ensuring data consistency across all commands.

**Critical Fixes:**

1. **playbook_stats command** (src/mapify_cli/__init__.py:1903-1921)
   - BEFORE: Read playbook.json directly using json.loads()
   - AFTER: Use PlaybookManager to read from SQLite backend
   - Impact: Stats now reflect real-time SQLite data, not stale JSON

2. **_generate_id method** (src/mapify_cli/playbook_manager.py:603-630)
   - BEFORE: Used in-memory COUNT (caused UNIQUE constraint failures)
   - AFTER: Query SQLite for MAX(id) + 1 (source of truth)
   - Impact: ADD operations now succeed without duplicate IDs

3. **Removed dead code** (src/mapify_cli/playbook_manager.py)
   - Deleted _load_playbook() method (83-98 lines) - no longer used

**Documentation Updates:**

Updated all MAP workflow templates to use CLI commands:
- .claude/commands/map-feature.md (Step 1, Step 3.10, examples)
- .claude/commands/map-efficient.md (same changes)
- .claude/commands/map-debug.md (same changes)
- .claude/agents/curator.md (line 179-183: document CLI usage)
- Synced all changes to src/mapify_cli/templates/

**Test Suite Enhancements:**

1. Added TestApplyDeltaStatsIntegration class (479-617 lines)
   - test_apply_delta_updates_stats: Verify stats reflect SQLite changes
   - test_update_operation_reflected_in_stats: Verify UPDATE operations
   - test_deprecate_operation_reflected_in_stats: Verify DEPRECATE operations

2. Fixed TestApplyDeltaCLI class (211-455 lines)
   - Added extract_json_from_output() helper (handles migration messages)
   - Replaced cwd parameter with monkeypatch.chdir() (pytest compatibility)
   - Fixed all JSON parsing to use helper method

**Test Results:**
- ✅ 19/20 passed (1 E2E test skipped as expected)
- Exit code: 0 (success)

**Migration Status:**
- 100% complete: All 5 playbook commands now use SQLite
- Data consistency guaranteed: stats, query, search, apply-delta, sync
- No breaking changes: JSON files still work via auto-migration
@azalio
Copy link
Copy Markdown
Owner Author

azalio commented Oct 29, 2025

✅ SQLite Migration 100% Complete

All remaining JSON read operations have been eliminated. The playbook system now uses SQLite exclusively as the source of truth.

Critical Fixes in This Commit (7513715)

1. playbook_stats Command

  • Before: Read playbook.json directly using json.loads()
  • After: Use PlaybookManager to read from SQLite backend
  • Impact: Stats now reflect real-time SQLite data, not stale JSON
  • Location: src/mapify_cli/__init__.py:1903-1921

2. _generate_id Method

  • Before: Used in-memory COUNT (caused UNIQUE constraint failures)
  • After: Query SQLite for MAX(id) + 1 (source of truth)
  • Impact: ADD operations now succeed without duplicate IDs
  • Location: src/mapify_cli/playbook_manager.py:603-630

3. Dead Code Removal

  • Deleted _load_playbook() method (83-98 lines) - no longer used

Documentation Updates

All MAP workflow templates now document CLI usage:

  • .claude/commands/map-feature.md - Step 1, Step 3.10, examples
  • .claude/commands/map-efficient.md - same changes
  • .claude/commands/map-debug.md - same changes
  • .claude/agents/curator.md - lines 179-183
  • ✅ Synced to src/mapify_cli/templates/

Test Suite Enhancements

Added Integration Tests (139 lines):

  • test_apply_delta_updates_stats - Verify stats reflect SQLite changes
  • test_update_operation_reflected_in_stats - Verify UPDATE operations
  • test_deprecate_operation_reflected_in_stats - Verify DEPRECATE operations

Fixed CLI Tests:

  • Added extract_json_from_output() helper (handles migration messages)
  • Replaced cwd parameter with monkeypatch.chdir() (pytest compatibility)
  • Fixed all JSON parsing to use helper method

Test Results

19 passed, 1 skipped, 145 warnings in 82.56s
Exit code: 0 ✅

Migration Status

Command Before After Status
playbook stats ❌ JSON ✅ SQLite Fixed
playbook query ✅ SQLite ✅ SQLite Already OK
playbook search ✅ SQLite ✅ SQLite Already OK
playbook apply-delta ✅ SQLite ✅ SQLite Already OK
playbook sync ✅ SQLite ✅ SQLite Already OK

All 5 playbook commands now use SQLite exclusively.

Breaking Changes

None. JSON files still work via auto-migration on first access.

Next Steps

Ready to merge. All tests pass, migration is complete.

The test_playbook_stats was failing because playbook stats command
now outputs migration messages before JSON when migrating from
playbook.json to SQLite.

**Changes:**
- Added JSON extraction logic to handle mixed output (migration messages + JSON)
- Changed sections assertion from `== 2` to `>= 2` because SQLite creates all 10 default sections

**Test Result:**
- ✅ All 7 TestPlaybookSubcommands tests pass
- ✅ test_playbook_stats now correctly parses JSON from mixed output

**Related to:** Complete SQLite migration (commit 7513715)
@azalio
Copy link
Copy Markdown
Owner Author

azalio commented Oct 29, 2025

✅ All CI Tests Passing!

All tests now pass after fixing test_playbook_stats to handle migration messages.

Final Test Results (Commit f4aedf4)

CI Status:

  • ✅ build (pass)
  • ✅ test (ubuntu-latest, 3.11) - pass
  • ✅ test (ubuntu-latest, 3.12) - pass
  • ✅ test (macos-latest, 3.11) - pass
  • ✅ test (macos-latest, 3.12) - pass
  • ✅ validate-version (pass)

Total: 315 passed, 1 skipped across all platforms

What Was Fixed

Issue: test_playbook_stats failed with JSONDecodeError because the command now outputs migration messages before JSON output.

Solution:

  • Added JSON extraction logic to parse mixed output (migration messages + JSON)
  • Changed sections assertion from == 2 to >= 2 (SQLite creates all 10 default sections)

Pattern: Same as test_apply_delta_cli.py fix (uses extract_json_from_output() approach)

Ready to Merge

All acceptance criteria met:

  • ✅ SQLite migration 100% complete
  • ✅ All commands use SQLite as source of truth
  • ✅ All tests passing on all platforms
  • ✅ Documentation updated
  • ✅ Template synchronization complete
  • ✅ No breaking changes

The PR is ready to merge.

Addressed all Copilot code review comments:

**1. Quality score normalization (playbook_manager.py:894)**
- Added constants: QUALITY_SCORE_MAX, RELEVANCE_WEIGHT, QUALITY_WEIGHT
- Fixed comment typo: "0.03" → "0.3" (was 10x discrepancy)
- Replaced hardcoded magic numbers with named constants

**2. Removed unused imports:**
- src/mapify_cli/playbook_manager.py: Removed `Any` from typing
- tests/test_cipher_integration.py: Removed `Path`, `PlaybookQueryResponse`
- tests/test_playbook_migration.py: Removed `Path`
- tests/test_playbook_query_api.py: Removed `json`, `Path`, `VALID_SECTIONS`

**3. Removed unused variables:**
- tests/test_cipher_integration.py:183-184: Removed `original_count`, `merged_count`

**Test Results:**
- ✅ 65/65 tests pass (cipher, migration, query API)
- No regressions introduced

**Code Quality:**
- Better maintainability (constants vs magic numbers)
- Cleaner imports (no unused dependencies)
- Accurate documentation (comment matches code)
@azalio
Copy link
Copy Markdown
Owner Author

azalio commented Oct 29, 2025

✅ Code Review Feedback Addressed

All Copilot review comments have been fixed (commit ab26b07).

Changes Made:

1. Quality Score Normalization (playbook_manager.py:894)

  • ✅ Added constants: QUALITY_SCORE_MAX = 10.0, RELEVANCE_WEIGHT = 0.7, QUALITY_WEIGHT = 0.3
  • ✅ Fixed comment typo: "0.03" → "0.3" (was 10x discrepancy!)
  • ✅ Replaced hardcoded magic numbers with named constants

Before:

quality_normalized = max(0.0, min(1.0, result.quality_score / 10.0))
result.combined_score = result.relevance_score * 0.7 + quality_normalized * 0.3

After:

quality_normalized = max(0.0, min(1.0, result.quality_score / QUALITY_SCORE_MAX))
result.combined_score = result.relevance_score * RELEVANCE_WEIGHT + quality_normalized * QUALITY_WEIGHT

2. Removed Unused Imports (7 locations)

  • src/mapify_cli/playbook_manager.py: Any
  • tests/test_cipher_integration.py: Path, PlaybookQueryResponse
  • tests/test_playbook_migration.py: Path
  • tests/test_playbook_query_api.py: json, Path, VALID_SECTIONS

3. Removed Unused Variables

  • tests/test_cipher_integration.py:183-184: original_count, merged_count

Test Results:

65 passed, 424 warnings in 4.86s
✅ All cipher integration tests pass
✅ All migration tests pass
✅ All query API tests pass

Code Quality Impact:

  • 📈 Maintainability: Magic numbers replaced with descriptive constants
  • 🧹 Cleanliness: No unused imports or variables
  • 📝 Accuracy: Comments match implementation
  • 🔧 Future tuning: Easy to adjust weights (just change constants)

Waiting for CI to confirm all platforms pass.

@azalio
Copy link
Copy Markdown
Owner Author

azalio commented Oct 29, 2025

✅ All Code Review Feedback Resolved - CI Passing

All Copilot review comments have been addressed and CI tests are passing on all platforms.

Final CI Status (Commit ab26b07):

✅ build                     - pass (22s)
✅ test (ubuntu-latest, 3.11) - pass (33s)
✅ test (ubuntu-latest, 3.12) - pass (34s)
✅ test (macos-latest, 3.11)  - pass (27s)
✅ test (macos-latest, 3.12)  - pass (23s)
✅ validate-version          - pass (8s)

Total: 315 passed, 1 skipped across all platforms

Summary of All Changes in This PR:

  1. SQLite Migration Complete (7513715)

    • All playbook commands use SQLite as source of truth
    • Template documentation updated
    • Migration tests added
  2. Test Compatibility Fixed (f4aedf4)

    • Fixed test_playbook_stats to handle migration messages
    • JSON extraction logic added
  3. Code Review Addressed (ab26b07)

    • Magic numbers → Named constants
    • Unused imports/variables removed
    • Comment typo fixed (0.03 → 0.3)

Ready to Merge

All acceptance criteria met:

  • ✅ 100% SQLite migration complete
  • ✅ All tests passing (315/316)
  • ✅ Code review feedback addressed
  • ✅ Documentation updated
  • ✅ CI passing on all platforms
  • ✅ No breaking changes

The PR is ready for final review and merge.

@azalio azalio merged commit e126bec into main Oct 29, 2025
6 checks passed
@azalio azalio deleted the feature/playbook-apply-delta branch October 29, 2025 08:17
azalio added a commit that referenced this pull request Feb 13, 2026
…-35)

MEDIUM fixes:
- #8: Remove dead RETRY_LOOP phase from orchestrator STEP_PHASES
- #10: Fix plan path to branch-scoped .map/<branch>/task_plan_<branch>.md
- #11: Fix findings path to branch-scoped .map/<branch>/findings_<branch>.md
- #12: Remove references to non-existent ralph-loop-config.json
- #13/#14: Rewrite map-resume to use step_state.json instead of progress.md
- #15: Fix INIT_PLAN heading format (### ST-XXX with - **Status:** prefix)
- #16: Fix regex in step_runner to match plan format (### heading, - **Status:**)
- #17: Fix map-learn contradiction about automatic learning

LOW fixes:
- #9/#31: Document dual state file system (step_state.json vs workflow_state.json)
- #19: Document intentional Evaluator/Reflector/Curator omission in map-efficient
- #20: Fix line count reference (~150 → ~540 lines)
- #21: Standardize all AskUserQuestion to Python function call syntax
- #22: Rename Steps 2.5/2.6 to 2a/2b to avoid phase number collision
- #23/#24: Fix map-debate comparison table (map-efficient uses single Actor)
- #25: Replace cat commands with Read tool comments in map-check
- #28/#29: Replace undefined thrashing_detected()/max_redecompositions
- #30: Add - **Status:** pending field to map-plan template
- #32: Note map-fast max 3 vs map-efficient max 5 intentional difference
- #33: Remove Evaluator from map-fast skipped agents list
- #34: Move AskUserQuestion to "Built-in Tools" section in map-release
- #35: Replace parallel bash & processes with sequential && in map-release

Template sync: All .claude/ changes mirrored to src/mapify_cli/templates/
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