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
5 changes: 2 additions & 3 deletions .claude-plugin/PLUGIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ MAP (Modular Agentic Planner) is a cognitive architecture that orchestrates 9 sp

**5 Automated Hooks:**
- `validate-agent-templates` — prevents accidental removal of template variables
- `auto-store-knowledge` — automatically saves successful patterns to cipher
- `auto-store-knowledge` — automatically saves successful patterns
- `enrich-context` — enriches prompts with relevant knowledge
- `session-init` — loads ACE playbook at session start
- `track-metrics` — tracks agent performance
Expand All @@ -41,7 +41,7 @@ MAP (Modular Agentic Planner) is a cognitive architecture that orchestrates 9 sp

### ACE Learning System

- **Persistent Knowledge** — solutions saved and reused via cipher MCP
- **Persistent Knowledge** — solutions saved and reused via mem0 MCP
- **Semantic Search** — find patterns by meaning (optional)
- **Quality Tracking** — monitor pattern effectiveness
- **Continuous Learning** — each workflow improves future ones
Expand Down Expand Up @@ -87,7 +87,6 @@ cp map-framework/.claude/settings.hooks.json your-project/.claude/

- **Claude Code CLI** — installed and configured
- **MCP Servers** (essential):
- `cipher` — knowledge management
- `claude-reviewer` — professional code review
- `sequential-thinking` — chain-of-thought reasoning

Expand Down
1 change: 0 additions & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"requirements": {
"claude_code": ">=1.0.0",
"mcp_servers": [
"cipher",
"claude-reviewer",
"sequential-thinking"
]
Expand Down
1 change: 0 additions & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"requirements": {
"claude_code_version": ">=1.0.0",
"mcp_servers": [
"cipher",
"claude-reviewer",
"sequential-thinking"
],
Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/actor.md
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ export class ReconnectingWebSocket {
3. test_reconnect_max_attempts_triggers_callback
4. test_reconnect_handles_immediate_disconnect

**Used Bullets**: `[]` (No similar patterns in cipher. Novel implementation.)
**Used Bullets**: `[]` (No similar patterns in mem0. Novel implementation.)

</Actor_Reference_Examples>

2 changes: 1 addition & 1 deletion .claude/agents/curator.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ run_id: "org:shared"
- **Counter**: Increment helpful_count once (not per insight)

### Contradictory Insights (Opposite Recommendations)
- **Action**: Check cipher for existing consensus (helpful_count scores)
- **Action**: Check mem0 for existing consensus (helpful_count scores)
- **Validate**: Use deepwiki to verify production patterns
- **Output**: Create bullet with BOTH approaches + tradeoffs
- **Flag**: Mark `metadata.manual_review_required = true`
Expand Down
4 changes: 2 additions & 2 deletions .claude/agents/documentation-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ IF mcp__mem0__* available:
→ Use for historical pattern matching
ELSE:
→ Skip pattern matching, rely on explicit checks only
→ Log: "cipher unavailable, no historical context"
→ Log: "mem0 unavailable, no historical context"
```

## Fallback Protocol
Expand Down Expand Up @@ -441,7 +441,7 @@ mcp__deepwiki__ask_question(
question="How does Gatekeeper handle CRD installation?"
)

# 4. Check historical patterns (if cipher available)
# 4. Check historical patterns (if mem0 available)
mcp__mem0__map_tiered_search(
query="CRD installation documentation patterns",
top_k=5,
Expand Down
6 changes: 3 additions & 3 deletions .claude/agents/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ def divide(a, b):
2. Verify parameterized queries (no string interpolation)
3. Check command execution (no shell=True with user input)
4. Validate file paths (no path traversal)
5. Search cipher for known vulnerabilities: `"security vulnerability [language]"`
5. Search mem0 for known vulnerabilities: `"security vulnerability [language]"`
6. Use deepwiki to check production security patterns

#### Pass Criteria
Expand Down Expand Up @@ -2236,7 +2236,7 @@ IF false positive rate >15%:
IF bug catch rate <70%:
→ Expand dimension checklists
→ Add more MCP tool triggers
→ Review missed patterns, add to cipher
→ Review missed patterns, add to mem0

IF review time consistently >target:
→ Optimize tool selection
Expand Down Expand Up @@ -2470,7 +2470,7 @@ def check_rate_limit(user_id, action, limit=100, window=3600):
**Before returning your review JSON:**

1. ✅ Did I use request_review for code implementations?
2. ✅ Did I search cipher for known issue patterns?
2. ✅ Did I search mem0 for known issue patterns?
3. ✅ Did I check all 10 validation dimensions systematically?
4. ✅ Did I verify documentation against source of truth (if applicable)?
5. ✅ Are all issues specific with location and actionable suggestions?
Expand Down
28 changes: 14 additions & 14 deletions .claude/agents/predictor.md
Original file line number Diff line number Diff line change
Expand Up @@ -1710,8 +1710,8 @@ Return **ONLY** valid JSON in this exact structure:
"score": 0.85,
"tier_base": 0.50,
"adjustments": [
{"category": "A", "factor": "Cipher comprehensive data", "adjustment": 0.20},
{"category": "B", "factor": "Codex+grep match", "adjustment": 0.15}
{"category": "A", "factor": "mem0 comprehensive data", "adjustment": 0.20},
{"category": "B", "factor": "mem0+grep match", "adjustment": 0.15}
],
Comment on lines 1710 to 1715
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if the predictor.md files exist and their line counts
echo "=== Checking predictor.md files ==="
if [ -f .claude/agents/predictor.md ]; then
  echo ".claude/agents/predictor.md exists"
  wc -l .claude/agents/predictor.md
else
  echo ".claude/agents/predictor.md NOT FOUND"
fi

if [ -f src/mapify_cli/templates/agents/predictor.md ]; then
  echo "src/mapify_cli/templates/agents/predictor.md exists"
  wc -l src/mapify_cli/templates/agents/predictor.md
else
  echo "src/mapify_cli/templates/agents/predictor.md NOT FOUND"
fi

echo ""
echo "=== Checking test_template_sync.py ==="
if [ -f tests/test_template_sync.py ]; then
  echo "tests/test_template_sync.py exists"
else
  echo "tests/test_template_sync.py NOT FOUND"
fi

Repository: azalio/map-framework

Length of output: 344


🏁 Script executed:

#!/bin/bash
# Check lines 1710-1715 in .claude/agents/predictor.md
echo "=== Lines 1710-1715 in .claude/agents/predictor.md ==="
sed -n '1710,1715p' .claude/agents/predictor.md || echo "File or lines not found"

echo ""
# Check lines around 1821 for MD040 issues
echo "=== Lines 1812-1830 in .claude/agents/predictor.md ==="
sed -n '1812,1830p' .claude/agents/predictor.md || echo "File or lines not found"

echo ""
# Check lines around 1925 for MD040 issues
echo "=== Lines 1916-1935 in .claude/agents/predictor.md ==="
sed -n '1916,1935p' .claude/agents/predictor.md || echo "File or lines not found"

Repository: azalio/map-framework

Length of output: 1819


🏁 Script executed:

#!/bin/bash
# Check sync status between .claude/agents/predictor.md and templates
echo "=== Checking sync status ==="
if [ -f .claude/agents/predictor.md ] && [ -f src/mapify_cli/templates/agents/predictor.md ]; then
  if diff -q .claude/agents/predictor.md src/mapify_cli/templates/agents/predictor.md > /dev/null 2>&1; then
    echo "Files are IN SYNC"
  else
    echo "Files are OUT OF SYNC"
    echo "First difference:"
    diff .claude/agents/predictor.md src/mapify_cli/templates/agents/predictor.md | head -20
  fi
else
  echo "Cannot compare - one or both files not found"
fi

Repository: azalio/map-framework

Length of output: 110


Add language identifiers to fenced code blocks to fix MD040 violations.

The .claude ↔ templates sync is verified and in good state. However, fenced code blocks at lines ~1821 and ~1925 are missing language identifiers (e.g., should bebash, ```json, etc.). Update these to comply with markdown linting standards:

  • Lines 1812-1830: Add appropriate language identifier to the code fence (appears to be example JSON/output format)
  • Lines 1916-1935: Add appropriate language identifier to the code fence (appears to be example markdown/configuration)

Run pytest tests/test_template_sync.py -v to confirm template sync verification passes, as required by project guidelines.

🤖 Prompt for AI Agents
In @.claude/agents/predictor.md around lines 1710 - 1715, In
.claude/agents/predictor.md update the two fenced code blocks that currently use
bare backticks so they include appropriate language identifiers: change the
example JSON/output block (containing keys like "score", "tier_base",
"adjustments") to use ```json and change the example markdown/configuration
block (the second fenced block shown in the file) to a suitable identifier such
as ```markdown or ```bash as appropriate; then save and run pytest
tests/test_template_sync.py -v to verify the template sync check passes.

"flags": ["MANUAL REVIEW REQUIRED"]
},
Expand Down Expand Up @@ -1811,17 +1811,17 @@ Confidence is NOT a guess—calculate it using this formula with **tier-specific

**Category A: Historical Data** (pick highest applicable)
```
+0.20: Cipher returned comprehensive patterns for this change type
+0.10: Cipher returned partial/similar patterns
+0.20: mem0 returned comprehensive patterns for this change type
+0.10: mem0 returned partial/similar patterns
+0.00: No query made (default for Tier 1)
-0.15: Cipher queried but no relevant data found
-0.15: mem0 queried but no relevant data found
```

**Category B: Tool Agreement** (pick one)
```
+0.15: Codex + grep results match (same usages found)
+0.15: mem0 + grep results match (same usages found)
+0.05: Only one tool used, results clear
-0.10: Codex and grep conflict (investigate before proceeding)
-0.10: mem0 and grep conflict (investigate before proceeding)
```
Comment on lines 1812 to 1825
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language identifiers to fenced blocks (MD040).

markdownlint reports missing fence languages here.

🛠️ Suggested fix
-```
+```text
 +0.20: mem0 returned comprehensive patterns for this change type
 +0.10: mem0 returned partial/similar patterns
 +0.00: No query made (default for Tier 1)
 -0.15: mem0 queried but no relevant data found

Category B: Tool Agreement (pick one)
- +text
+0.15: mem0 + grep results match (same usages found)
+0.05: Only one tool used, results clear
-0.10: mem0 and grep conflict (investigate before proceeding)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Category A: Historical Data** (pick highest applicable)
```
+0.20: Cipher returned comprehensive patterns for this change type
+0.10: Cipher returned partial/similar patterns
+0.20: mem0 returned comprehensive patterns for this change type
+0.10: mem0 returned partial/similar patterns
+0.00: No query made (default for Tier 1)
-0.15: Cipher queried but no relevant data found
-0.15: mem0 queried but no relevant data found
```
**Category B: Tool Agreement** (pick one)
```
+0.15: Codex + grep results match (same usages found)
+0.15: mem0 + grep results match (same usages found)
+0.05: Only one tool used, results clear
-0.10: Codex and grep conflict (investigate before proceeding)
-0.10: mem0 and grep conflict (investigate before proceeding)
```
**Category A: Historical Data** (pick highest applicable)
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

[warning] 1813-1813: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 1821-1821: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In @.claude/agents/predictor.md around lines 1812 - 1825, Add explicit language
identifiers to the fenced code blocks in the predictor document to satisfy
markdownlint MD040: replace the three backtick fences that currently lack a
language with fenced blocks labeled e.g. ```text for the two score lists shown
under "Category A: Historical Data" and "Category B: Tool Agreement". Edit the
block delimiters surrounding the lines beginning "+0.20: mem0 returned..." and
"+0.15: mem0 + grep results match..." so each opening fence includes a language
token (e.g., text) and close with the matching triple backticks; this will
resolve the missing fence language warnings.


**Category C: Code Analyzability** (pick lowest applicable)
Expand Down Expand Up @@ -1879,7 +1879,7 @@ TIER_1_MIN: 0.70 (if lower → escalate to Tier 2)
| Factor | Category | Adjustment | Running Total |
|--------|----------|------------|---------------|
| Tier 2 base score | — | 0.50 | 0.50 |
| Cipher has similar patterns | A | +0.20 | 0.70 |
| mem0 has similar patterns | A | +0.20 | 0.70 |
| Codex + grep match | B | +0.15 | 0.85 |
| Static code (no flags) | C | +0.00 | 0.85 |
| High test coverage | D | +0.10 | 0.95 |
Expand All @@ -1890,7 +1890,7 @@ TIER_1_MIN: 0.70 (if lower → escalate to Tier 2)
| Factor | Category | Adjustment | Running Total |
|--------|----------|------------|---------------|
| Tier 3 base score | — | 0.50 | 0.50 |
| Cipher queried, no data | A | -0.15 | 0.35 |
| mem0 queried, no data | A | -0.15 | 0.35 |
| Only grep used | B | +0.05 | 0.40 |
| Reflection detected | C | -0.20 | 0.20 |
| External API undocumented | D | -0.10 | 0.10 |
Expand Down Expand Up @@ -1921,17 +1921,17 @@ TIER_1_MIN: 0.70 (if lower → escalate to Tier 2)
4. Be MORE conservative with risk assessment (err on higher risk)
```

### If cipher and grep results conflict:
### If mem0 and grep results conflict:
```
Example: cipher graph finds 10 usages, grep finds 15
Example: mem0 finds 10 usages, grep finds 15

1. Trust manual verification (grep) over semantic tools
2. Investigate discrepancy:
- Check for dynamic imports
- Check for generated code
- Check for string-based references
3. Report BOTH numbers in output:
"affected_components": ["15 files (cipher: 10, grep: 15 - discrepancy noted)"]
"affected_components": ["15 files (mem0: 10, grep: 15 - discrepancy noted)"]
4. Set confidence to max 0.60 (moderate uncertainty)
Comment on lines +1924 to 1935
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add fence language to satisfy MD040.

markdownlint flags the unlabeled code fence in this block.

🛠️ Suggested fix
-```
+```text
 Example: mem0 finds 10 usages, grep finds 15
 
 1. Trust manual verification (grep) over semantic tools
 2. Investigate discrepancy:
    - Check for dynamic imports
    - Check for generated code
    - Check for string-based references
 3. Report BOTH numbers in output:
    "affected_components": ["15 files (mem0: 10, grep: 15 - discrepancy noted)"]
 4. Set confidence to max 0.60 (moderate uncertainty)
</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.20.0)</summary>

[warning] 1925-1925: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

In @.claude/agents/predictor.md around lines 1924 - 1935, The unlabeled code
fence under the "If mem0 and grep results conflict:" section should include a
language tag to satisfy markdownlint MD040; update the fenced block (the
triple-backtick block immediately after that heading) to use a language token
such as text (e.g., replace withtext) so the block becomes a labeled
code fence and re-run linting to confirm the MD040 warning is resolved.


</details>

<!-- fingerprinting:phantom:poseidon:eagle -->

<!-- This is an auto-generated comment by CodeRabbit -->

```

Expand Down Expand Up @@ -1976,7 +1976,7 @@ IF confidence < 0.30 after all adjustments:

### Catastrophic Tool Failure Protocol (All Tools Fail)

**CRITICAL**: If ALL tools fail (cipher AND grep all error/timeout):
**CRITICAL**: If ALL tools fail (mem0 AND grep all error/timeout):

```
1. DO NOT hallucinate results
Expand All @@ -1988,7 +1988,7 @@ IF confidence < 0.30 after all adjustments:
"tier_rationale": "All analysis tools failed - minimal analysis only",
"tools_used": [],
"tool_failures": {
"cipher": "timeout/error/unavailable",
"mem0": "timeout/error/unavailable",
"grep": "timeout/error/unavailable"
},
"catastrophic_failure": true
Expand Down
4 changes: 2 additions & 2 deletions .claude/agents/reflector.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ Skip if: trivial fix, no technical knowledge, no clear entities.
- **correct_approach** (REQUIRED, ≥150 chars, 5+ lines): Incorrect + correct code, why works, principle, {{language}} syntax
- **key_insight** (REQUIRED, ≥50 chars): "When X, always Y because Z", actionable, memorable
- **bullet_updates** (OPTIONAL): Only if Actor used bullets, tag helpful/harmful with reason
- **suggested_new_bullets** (OPTIONAL): Only if new (check cipher), meet quality framework, code_example for SECURITY/IMPL/PERF
- **suggested_new_bullets** (OPTIONAL): Only if new (check mem0), meet quality framework, code_example for SECURITY/IMPL/PERF

## JSON Schema (For Validation)

Expand Down Expand Up @@ -608,7 +608,7 @@ Skip if: trivial fix, no technical knowledge, no clear entities.
},
"unverified_novelty": {
"type": "boolean",
"description": "Set to true if cipher was unavailable during analysis"
"description": "Set to true if mem0 was unavailable during analysis"
},
"error": {
"type": "boolean",
Expand Down
3 changes: 0 additions & 3 deletions .claude/agents/task-decomposer.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ machine-readable blueprint for the Actor/Monitor pipeline.
│ │
│ 3. GATHER CONTEXT (if complexity ≥ 3) │
│ └─ ALWAYS: mcp__mem0__map_tiered_search (historical decompositions) │
│ └─ IF similar found: cipher_search_reasoning_patterns │
│ └─ IF ambiguous: sequentialthinking │
│ └─ IF external lib: get-library-docs │
│ └─ Handle fallbacks if tools fail/return empty │
Expand Down Expand Up @@ -83,7 +82,6 @@ machine-readable blueprint for the Actor/Monitor pipeline.
| Condition | Tool | Query Pattern |
|-----------|------|---------------|
| **ALWAYS** (complexity ≥ 3) | mcp__mem0__map_tiered_search | `"feature implementation [type]"`, `"task decomposition [domain]"` |
| Similar features found | cipher_search_reasoning_patterns | `"successful task decomposition [type]"`, `"dependency reasoning [domain]"` |
| Ambiguous/complex goal | sequentialthinking | Iterative refinement of scope and dependencies |
| External library | get-library-docs | Setup/quickstart guides for initialization order |
| Unfamiliar domain | deepwiki | `"How does [repo] structure [feature]?"` |
Expand Down Expand Up @@ -473,7 +471,6 @@ When invoked with `mode: "re_decomposition"` from the orchestrator, you receive

**Analysis Completeness**:
- [ ] Ran mcp__mem0__map_tiered_search for similar features
- [ ] Ran cipher_search_reasoning_patterns to understand decomposition thinking
- [ ] Used sequential-thinking for complex/ambiguous goals
- [ ] Checked library docs for initialization requirements
- [ ] Identified all risks (not empty for medium/high complexity)
Expand Down
18 changes: 8 additions & 10 deletions .claude/commands/map-debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ PATTERN_CONTEXT=$(mcp__mem0__map_tiered_search(query="debug [issue type]", secti
```

1. **Read error logs/stack traces** (if provided in $ARGUMENTS)
2. **Search cipher for similar issues**: `mcp__mem0__map_tiered_search("debug pattern [error_type]")`
3. **Identify affected files**: Use Grep/Glob to find relevant code
4. **Reproduce the issue** (if possible): Read test files or run commands
2. **Identify affected files**: Use Grep/Glob to find relevant code
3. **Reproduce the issue** (if possible): Read test files or run commands

## Step 2: Decompose Debugging Process

Expand All @@ -65,7 +64,7 @@ Task(
**Context:**
- Error logs: [if available]
- Affected files: [from analysis]
- Similar past issues: [from cipher search]
- Similar past issues: [from playbook search]

Output JSON with:
- subtasks: array of {id, description, debug_type: 'investigation'|'fix'|'verification', acceptance_criteria}
Expand Down Expand Up @@ -259,11 +258,10 @@ User says: `/map-debug TypeError in authentication middleware`

You should:
1. Gather context (read error logs, find middleware file)
2. Search cipher for similar authentication errors
3. Task(subagent_type="task-decomposer") → get investigation + fix steps
4. For investigation steps: Task(subagent_type="actor") to analyze
5. For fix steps: actor → monitor → predictor → evaluator → apply
6. Run tests, verify fix
7. Done! Optionally run `/map-learn` to preserve debugging patterns
2. Task(subagent_type="task-decomposer") → get investigation + fix steps
3. For investigation steps: Task(subagent_type="actor") to analyze
4. For fix steps: actor → monitor → predictor → evaluator → apply
5. Run tests, verify fix
6. Done! Optionally run `/map-learn` to preserve debugging patterns

Begin debugging now.
2 changes: 1 addition & 1 deletion .claude/commands/map-fast.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ After all subtasks completed:
2. Create commit with message
3. Summarize what was implemented

**Note:** No playbook updates, no cipher patterns stored (learning disabled).
**Note:** No playbook updates (learning disabled).

## Critical Constraints

Expand Down
10 changes: 0 additions & 10 deletions .claude/commands/map-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,6 @@ Query playbook for release-related patterns and past release issues:
RELEASE_PATTERNS=$(mcp__mem0__map_tiered_search(query="release validation PyPI CI/CD", limit=10))
```

**Also search Cipher** for cross-project release patterns:

```
mcp__mem0__map_tiered_search(
query="package release validation PyPI deployment best practices",
top_k=5,
similarity_threshold=0.3
)
```

### 1.2 Validation Gates (12 Required)

Execute all validation gates in parallel where possible:
Expand Down
Loading
Loading