Files
Mithun Gowda B 116e9fc5f9 fix: fill implementation gaps across core modules (#544)
* fix: fill implementation gaps across core modules

- Replace ConfidenceChecker placeholder methods with real implementations
  that search the codebase for duplicates, verify architecture docs exist,
  check research references, and validate root cause specificity
- Fix intelligent_execute() error capture: collect actual errors from
  failed tasks instead of hardcoded None, format tracebacks as strings,
  and fix variable shadowing bug where loop var overwrote task parameter
- Implement ReflexionPattern mindbase integration via HTTP API with
  graceful fallback when service is unavailable
- Fix .gitignore: remove duplicate entries, add explicit !-rules for
  .claude/settings.json and .claude/skills/, remove Tests/ ignore
- Remove unnecessary sys.path hack in cli/main.py
- Fix FailureEntry.from_dict to not mutate input dict
- Add comprehensive execution module tests: 62 new tests covering
  ParallelExecutor, ReflectionEngine, SelfCorrectionEngine, and the
  intelligent_execute orchestrator (136 total, all passing)

https://claude.ai/code/session_01AnGJMAA6Qp2j9WKKHHZfB9

* chore: include test-generated reflexion artifacts

https://claude.ai/code/session_01AnGJMAA6Qp2j9WKKHHZfB9

* fix: address 5 open GitHub issues (#536, #537, #531, #517, #534)

Security fixes:
- #536: Remove shell=True and user-controlled $SHELL from _run_command()
  to prevent arbitrary code execution. Use direct list-based subprocess.run
  without passing full os.environ to child processes.
- #537: Add SHA-256 integrity verification for downloaded docker-compose
  and mcp-config files. Downloads are deleted on hash mismatch. Gateway
  config supports pinned hashes via docker_compose_sha256/mcp_config_sha256.

Bug fixes:
- #531: Add agent file installation to `superclaude install` and `update`
  commands. 20 agent markdown files are now copied to ~/.claude/agents/
  alongside command installation.
- #517: Fix MCP env var flag from --env to -e for API key passthrough,
  matching the Claude CLI's expected format.

Usability:
- #534: Replace Japanese trigger phrases and report labels in pm-agent.md
  and pm.md (both src/ and plugins/) with English equivalents for
  international accessibility.

https://claude.ai/code/session_01AnGJMAA6Qp2j9WKKHHZfB9

* docs: align documentation with Claude Code and fix version/count gaps

- Update CLAUDE.md project structure to include agents/ (20 agents),
  modes/ (7 modes), commands/ (30 commands), skills/, hooks/, mcp/,
  and core/ directories. Add Claude Code integration points section.
- Fix version references: 4.1.5 -> 4.2.0 in installation.md,
  quick-start.md, and package.json (was 4.1.7)
- Fix feature counts across all docs:
  - Commands: 21 -> 30
  - Agents: 14/16 -> 20
  - Modes: 6 -> 7
  - MCP Servers: 6 -> 8
- Update README.md agent count from 16 to 20
- Add docs/user-guide/claude-code-integration.md explaining how
  SuperClaude maps to Claude Code's native features (commands,
  agents, hooks, skills, settings, MCP servers, pytest plugin)

https://claude.ai/code/session_01AnGJMAA6Qp2j9WKKHHZfB9

* chore: update test-generated reflexion log

https://claude.ai/code/session_01AnGJMAA6Qp2j9WKKHHZfB9

* docs: comprehensive Claude Code gap analysis and integration guide

- Rewrite docs/user-guide/claude-code-integration.md with full feature
  mapping: all 28 hook events, skills system with YAML frontmatter,
  5 settings scopes, permission rules, plan mode, extended thinking,
  agent teams, voice, desktop features, and session management.
  Includes detailed gap table showing where SuperClaude under-uses
  Claude Code capabilities (skills migration, hooks integration,
  plan mode, settings profiles).
- Add Claude Code native features section to CLAUDE.md with extension
  points we use vs should use more (hooks, skills, plan mode, settings)
- Add Claude Code integration gap analysis to KNOWLEDGE.md with
  prioritized action items for skills migration, hooks leverage,
  plan mode integration, and settings profiles

https://claude.ai/code/session_01AnGJMAA6Qp2j9WKKHHZfB9

* chore: update test-generated reflexion log

https://claude.ai/code/session_01AnGJMAA6Qp2j9WKKHHZfB9

* chore: bump version to 4.3.0

Bump version across all 15 files:
- VERSION, pyproject.toml, package.json
- src/superclaude/__init__.py, src/superclaude/__version__.py
- CLAUDE.md, PLANNING.md, TASK.md, CHANGELOG.md
- README.md, README-zh.md, README-ja.md, README-kr.md
- docs/getting-started/installation.md, quick-start.md
- docs/Development/pm-agent-integration.md

Also fixes __version__.py which was out of sync at 0.4.0.
Adds comprehensive CHANGELOG entry for v4.3.0.

https://claude.ai/code/session_01AnGJMAA6Qp2j9WKKHHZfB9

* i18n: replace all Japanese/Chinese text with English in source files

Replace CJK text with English across all non-translation files:

- src/superclaude/commands/pm.md: 38 Japanese strings in PDCA cycle,
  error handling patterns, anti-patterns, document templates
- src/superclaude/agents/pm-agent.md: 20 Japanese strings in PDCA
  phases, self-evaluation, documentation sections
- plugins/superclaude/: synced from src/ copies
- .github/workflows/readme-quality-check.yml: all Chinese comments,
  table headers, report strings, and PR comment text
- .github/workflows/pull-sync-framework.yml: Japanese comment
- .github/PULL_REQUEST_TEMPLATE.md: complete rewrite from Japanese

Translation files (README-ja.md, docs/user-guide-jp/, etc.) are
intentionally kept in their respective languages.

https://claude.ai/code/session_01AnGJMAA6Qp2j9WKKHHZfB9

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-22 22:57:15 +05:30
..

Memory Directory

This directory contains memory and learning data for the SuperClaude Framework's PM Agent.

Overview

The PM Agent uses multiple memory systems to learn, improve, and maintain context across sessions:

  1. ReflexionMemory - Error learning and pattern recognition
  2. Workflow Metrics - Performance tracking and optimization
  3. Pattern Learning - Successful implementation patterns

Files

reflexion.jsonl (Auto-generated)

Purpose: Error learning database Format: JSON Lines Generated by: ReflexionMemory system (superclaude/core/pm_init/reflexion_memory.py)

Stores past errors, root causes, and solutions for instant error resolution.

Example entry:

{
  "ts": "2025-10-30T14:23:45+09:00",
  "task": "implement JWT authentication",
  "mistake": "JWT validation failed",
  "evidence": "TypeError: secret undefined",
  "rule": "Check env vars before auth implementation",
  "fix": "Added JWT_SECRET to .env",
  "tests": ["Verify .env vars", "Test JWT signing"],
  "status": "adopted"
}

User Guide: See docs/user-guide/memory-system.md

reflexion.jsonl.example

Purpose: Sample reflexion entries for reference Status: Template file (15 realistic examples)

Copy this to reflexion.jsonl if you want to start with example data, or let the system create it automatically on first error.

workflow_metrics.jsonl (Auto-generated)

Purpose: Task performance tracking Format: JSON Lines Generated by: PM Agent workflow system

Tracks token usage, execution time, and success rates for continuous optimization.

Example entry:

{
  "timestamp": "2025-10-17T01:54:21+09:00",
  "session_id": "abc123",
  "task_type": "bug_fix",
  "complexity": "light",
  "workflow_id": "progressive_v3_layer2",
  "layers_used": [0, 1, 2],
  "tokens_used": 650,
  "time_ms": 1800,
  "success": true
}

Schema: See WORKFLOW_METRICS_SCHEMA.md

patterns_learned.jsonl (Auto-generated)

Purpose: Successful implementation patterns Format: JSON Lines Generated by: PM Agent learning system

Captures reusable patterns from successful implementations.

Documentation Files

WORKFLOW_METRICS_SCHEMA.md

Complete schema definition for workflow metrics data, including field types, descriptions, and examples.

pm_context.md

Documentation of the PM Agent's context management system, including progressive loading strategy and token efficiency.

token_efficiency_validation.md

Validation results and benchmarks for token efficiency optimizations.

last_session.md

Session notes and context from previous work sessions.

next_actions.md

Planned improvements and next steps for the memory system.

File Management

Automatic Files

These files are automatically created and managed by the system:

  • reflexion.jsonl - Created on first error
  • workflow_metrics.jsonl - Created on first task
  • patterns_learned.jsonl - Created when patterns are learned

Don't manually create these files - the system handles it.

When Files Are Missing

If reflexion.jsonl doesn't exist:

  • Normal on first run
  • Will be created automatically when first error occurs
  • No action needed

Backup and Maintenance

Backup:

# Archive old learnings
tar -czf memory-backup-$(date +%Y%m%d).tar.gz docs/memory/*.jsonl

Clean old entries (if files grow too large):

# Keep last 100 entries
tail -100 docs/memory/reflexion.jsonl > reflexion.tmp
mv reflexion.tmp docs/memory/reflexion.jsonl

Validate JSON format:

# Check all lines are valid JSON
cat docs/memory/reflexion.jsonl | while read line; do
  echo "$line" | jq . >/dev/null || echo "Invalid: $line"
done

Git and Version Control

What to Commit

Should be committed:

  • reflexion.jsonl.example (template)
  • patterns_learned.jsonl (shared patterns)
  • Documentation files (*.md)

Optional to commit:

  • reflexion.jsonl (team-specific learnings)
  • workflow_metrics.jsonl (performance data)

Recommendation: Add reflexion.jsonl to .gitignore if learnings are developer-specific.

Gitignore Configuration

If you want personal memory (not shared with team):

# Add to .gitignore
echo "docs/memory/reflexion.jsonl" >> .gitignore
echo "docs/memory/workflow_metrics.jsonl" >> .gitignore

If you want shared team memory (everyone benefits):

# Keep files in git (current default)
# All team members learn from each other's mistakes

Privacy and Security

What's Stored

ReflexionMemory stores:

  • Error messages
  • Task descriptions
  • Solution approaches
  • Timestamps

It does NOT store:

  • Passwords or secrets
  • API keys
  • Personal data
  • Production data

Sensitive Information

If an error message contains sensitive info:

  1. The entry will be in reflexion.jsonl
  2. Manually edit the file to redact sensitive data
  3. Keep the learning, remove the secret

Example:

// Before (contains secret)
{"evidence": "Auth failed with key abc123xyz"}

// After (redacted)
{"evidence": "Auth failed with invalid API key"}

Performance

File Sizes

Expected file sizes:

  • reflexion.jsonl: 1-10 KB per 10 entries (~1MB per 1000 errors)
  • workflow_metrics.jsonl: 0.5-1 KB per entry
  • patterns_learned.jsonl: 2-5 KB per pattern

Search Performance

ReflexionMemory search is fast:

  • <10ms for files under 1MB
  • <50ms for files under 10MB
  • <200ms for files under 100MB

No performance concerns until 10,000+ entries.

Troubleshooting

File Permission Errors

If you get EACCES errors:

chmod 644 docs/memory/*.jsonl

Corrupted JSON

If entries are malformed:

# Find and remove invalid lines
cat reflexion.jsonl | while read line; do
  echo "$line" | jq . >/dev/null 2>&1 && echo "$line"
done > fixed.jsonl
mv fixed.jsonl reflexion.jsonl

Duplicate Entries

If you see duplicate learnings:

# Show duplicates
cat reflexion.jsonl | jq -r '.mistake' | sort | uniq -c | sort -rn

# Remove duplicates (keeps first occurrence)
cat reflexion.jsonl | jq -s 'unique_by(.mistake)' | jq -c '.[]' > deduplicated.jsonl
mv deduplicated.jsonl reflexion.jsonl

Quick Commands

# View all learnings
cat docs/memory/reflexion.jsonl | jq

# Count entries
wc -l docs/memory/reflexion.jsonl

# Search for specific topic
grep -i "auth" docs/memory/reflexion.jsonl | jq

# Latest 5 learnings
tail -5 docs/memory/reflexion.jsonl | jq

# Most common mistakes
cat docs/memory/reflexion.jsonl | jq -r '.mistake' | sort | uniq -c | sort -rn | head -10

# Export to readable format
cat docs/memory/reflexion.jsonl | jq > reflexion-readable.json

Last Updated: 2025-10-30 Maintained by: SuperClaude Framework Team