maxsimcli 3.11.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/assets/CHANGELOG.md +19 -0
- package/dist/assets/dashboard/client/assets/index-CxFKStBk.css +32 -0
- package/dist/assets/dashboard/client/assets/{index-CZ8WC97G.js → index-wtQDvXzr.js} +64 -64
- package/dist/assets/dashboard/client/index.html +2 -2
- package/dist/assets/templates/agents/AGENTS.md +82 -0
- package/dist/assets/templates/commands/maxsim/settings.md +1 -1
- package/dist/assets/templates/skills/code-review/SKILL.md +151 -0
- package/dist/assets/templates/skills/memory-management/SKILL.md +174 -0
- package/dist/assets/templates/skills/simplify/SKILL.md +137 -0
- package/dist/assets/templates/skills/using-maxsim/SKILL.md +115 -0
- package/dist/assets/templates/templates/config.json +1 -1
- package/dist/assets/templates/workflows/add-tests.md +3 -3
- package/dist/assets/templates/workflows/complete-milestone.md +1 -1
- package/dist/assets/templates/workflows/execute-phase.md +4 -14
- package/dist/assets/templates/workflows/init-existing.md +7 -3
- package/dist/assets/templates/workflows/new-milestone.md +4 -0
- package/dist/assets/templates/workflows/new-project.md +6 -2
- package/dist/assets/templates/workflows/plan-phase.md +2 -2
- package/dist/assets/templates/workflows/settings.md +8 -4
- package/dist/assets/templates/workflows/verify-work.md +1 -1
- package/dist/cli.cjs +265 -161
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +73 -204
- package/dist/cli.js.map +1 -1
- package/dist/core/commands.d.ts.map +1 -1
- package/dist/core/commands.js +4 -1
- package/dist/core/commands.js.map +1 -1
- package/dist/core/core.d.ts +18 -0
- package/dist/core/core.d.ts.map +1 -1
- package/dist/core/core.js +43 -13
- package/dist/core/core.js.map +1 -1
- package/dist/core/dashboard-launcher.d.ts +56 -0
- package/dist/core/dashboard-launcher.d.ts.map +1 -0
- package/dist/core/dashboard-launcher.js +243 -0
- package/dist/core/dashboard-launcher.js.map +1 -0
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +20 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/init.d.ts +0 -1
- package/dist/core/init.d.ts.map +1 -1
- package/dist/core/init.js +0 -1
- package/dist/core/init.js.map +1 -1
- package/dist/core/phase.d.ts.map +1 -1
- package/dist/core/phase.js +7 -1
- package/dist/core/phase.js.map +1 -1
- package/dist/core/roadmap.d.ts.map +1 -1
- package/dist/core/roadmap.js +1 -0
- package/dist/core/roadmap.js.map +1 -1
- package/dist/core/state.d.ts.map +1 -1
- package/dist/core/state.js +7 -5
- package/dist/core/state.js.map +1 -1
- package/dist/core/types.d.ts +1 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +1 -2
- package/dist/core/types.js.map +1 -1
- package/dist/install/adapters.d.ts +15 -0
- package/dist/install/adapters.d.ts.map +1 -0
- package/dist/install/adapters.js +203 -0
- package/dist/install/adapters.js.map +1 -0
- package/dist/install/copy.d.ts +15 -0
- package/dist/install/copy.d.ts.map +1 -0
- package/dist/install/copy.js +191 -0
- package/dist/install/copy.js.map +1 -0
- package/dist/install/dashboard.d.ts +16 -0
- package/dist/install/dashboard.d.ts.map +1 -0
- package/dist/install/dashboard.js +273 -0
- package/dist/install/dashboard.js.map +1 -0
- package/dist/install/hooks.d.ts +32 -0
- package/dist/install/hooks.d.ts.map +1 -0
- package/dist/install/hooks.js +285 -0
- package/dist/install/hooks.js.map +1 -0
- package/dist/install/index.d.ts +2 -0
- package/dist/install/index.d.ts.map +1 -0
- package/dist/install/index.js +598 -0
- package/dist/install/index.js.map +1 -0
- package/dist/install/manifest.d.ts +20 -0
- package/dist/install/manifest.d.ts.map +1 -0
- package/dist/install/manifest.js +135 -0
- package/dist/install/manifest.js.map +1 -0
- package/dist/install/patches.d.ts +11 -0
- package/dist/install/patches.d.ts.map +1 -0
- package/dist/install/patches.js +136 -0
- package/dist/install/patches.js.map +1 -0
- package/dist/install/shared.d.ts +50 -0
- package/dist/install/shared.d.ts.map +1 -0
- package/dist/install/shared.js +142 -0
- package/dist/install/shared.js.map +1 -0
- package/dist/install/uninstall.d.ts +6 -0
- package/dist/install/uninstall.d.ts.map +1 -0
- package/dist/install/uninstall.js +280 -0
- package/dist/install/uninstall.js.map +1 -0
- package/dist/install.cjs +763 -709
- package/dist/install.cjs.map +1 -1
- package/dist/mcp-server.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/assets/dashboard/client/assets/index-DzJChB-D.css +0 -32
- package/dist/install.d.ts +0 -2
- package/dist/install.d.ts.map +0 -1
- package/dist/install.js +0 -1841
- package/dist/install.js.map +0 -1
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800;900&family=Geist+Mono:wght@400;500;600;700&display=swap"
|
|
11
11
|
rel="stylesheet"
|
|
12
12
|
/>
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-wtQDvXzr.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CxFKStBk.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# AGENTS.md — Agent-Skill Registry
|
|
2
|
+
|
|
3
|
+
This file maps MAXSIM agents to the skills they should auto-load and enforce during execution.
|
|
4
|
+
|
|
5
|
+
## How This Registry Works
|
|
6
|
+
|
|
7
|
+
When a MAXSIM agent is spawned, it checks this registry to determine which skills apply. Skills are behavioral rules that constrain agent actions — they are not optional guidelines.
|
|
8
|
+
|
|
9
|
+
Agents load skills by reading `SKILL.md` from each skill directory listed in their entry below. Skills are loaded once at agent startup and enforced throughout the session.
|
|
10
|
+
|
|
11
|
+
## Registry
|
|
12
|
+
|
|
13
|
+
### maxsim-executor
|
|
14
|
+
|
|
15
|
+
**Skills:** `tdd`, `verification-before-completion`, `using-maxsim`
|
|
16
|
+
|
|
17
|
+
The executor implements plan tasks. TDD ensures tests are written before code. Verification ensures completion claims have evidence. Using-maxsim ensures work stays within the plan structure.
|
|
18
|
+
|
|
19
|
+
### maxsim-debugger
|
|
20
|
+
|
|
21
|
+
**Skills:** `systematic-debugging`, `verification-before-completion`
|
|
22
|
+
|
|
23
|
+
The debugger investigates bugs. Systematic-debugging enforces the reproduce-hypothesize-isolate-verify-fix cycle. Verification ensures the fix is confirmed with evidence before claiming resolution.
|
|
24
|
+
|
|
25
|
+
### maxsim-verifier
|
|
26
|
+
|
|
27
|
+
**Skills:** `verification-before-completion`
|
|
28
|
+
|
|
29
|
+
The verifier checks phase goal achievement. Verification-before-completion is its core purpose — every claim must have fresh evidence.
|
|
30
|
+
|
|
31
|
+
### maxsim-planner
|
|
32
|
+
|
|
33
|
+
**Skills:** `using-maxsim`
|
|
34
|
+
|
|
35
|
+
The planner creates PLAN.md files. Using-maxsim ensures plans reference the correct workflow structure and available skills.
|
|
36
|
+
|
|
37
|
+
### maxsim-code-reviewer
|
|
38
|
+
|
|
39
|
+
**Skills:** `verification-before-completion`
|
|
40
|
+
|
|
41
|
+
The code reviewer checks implementation quality. Verification ensures review findings are backed by evidence from the codebase, not assumptions.
|
|
42
|
+
|
|
43
|
+
### maxsim-roadmapper
|
|
44
|
+
|
|
45
|
+
**Skills:** `using-maxsim`
|
|
46
|
+
|
|
47
|
+
The roadmapper creates project roadmaps. Using-maxsim ensures roadmaps align with the MAXSIM phase structure.
|
|
48
|
+
|
|
49
|
+
### maxsim-phase-researcher
|
|
50
|
+
|
|
51
|
+
**Skills:** `memory-management`
|
|
52
|
+
|
|
53
|
+
The phase researcher gathers context for planning. Memory-management ensures valuable research findings are persisted for future sessions.
|
|
54
|
+
|
|
55
|
+
### maxsim-project-researcher
|
|
56
|
+
|
|
57
|
+
**Skills:** `memory-management`
|
|
58
|
+
|
|
59
|
+
The project researcher analyzes project structure during init. Memory-management ensures architectural patterns and conventions are saved.
|
|
60
|
+
|
|
61
|
+
### maxsim-integration-checker
|
|
62
|
+
|
|
63
|
+
**Skills:** `verification-before-completion`
|
|
64
|
+
|
|
65
|
+
The integration checker validates cross-component wiring. Verification ensures integration claims are tested, not assumed.
|
|
66
|
+
|
|
67
|
+
## Skill Reference
|
|
68
|
+
|
|
69
|
+
| Skill | Directory | Purpose |
|
|
70
|
+
|-------|-----------|---------|
|
|
71
|
+
| `systematic-debugging` | `skills/systematic-debugging/` | Root cause investigation before fixes |
|
|
72
|
+
| `tdd` | `skills/tdd/` | Failing test before implementation |
|
|
73
|
+
| `verification-before-completion` | `skills/verification-before-completion/` | Evidence before completion claims |
|
|
74
|
+
| `using-maxsim` | `skills/using-maxsim/` | Workflow routing and structure |
|
|
75
|
+
| `memory-management` | `skills/memory-management/` | Pattern and error persistence |
|
|
76
|
+
|
|
77
|
+
## Adding New Skills
|
|
78
|
+
|
|
79
|
+
1. Create a directory under `skills/` with a `SKILL.md` file
|
|
80
|
+
2. Follow the existing skill format (frontmatter + Iron Law + Gate Function + Red Flags)
|
|
81
|
+
3. Add the skill to the relevant agent entries in this registry
|
|
82
|
+
4. Add the skill to the reference table above
|
|
@@ -14,7 +14,7 @@ Interactive configuration of MAXSIM workflow agents and model profile via multi-
|
|
|
14
14
|
Routes to the settings workflow which handles:
|
|
15
15
|
- Config existence ensuring
|
|
16
16
|
- Current settings reading and parsing
|
|
17
|
-
- Interactive 5-question prompt (model, research,
|
|
17
|
+
- Interactive 5-question prompt (model, research, plan_checker, verifier, branching)
|
|
18
18
|
- Config merging and writing
|
|
19
19
|
- Confirmation display with quick command references
|
|
20
20
|
</objective>
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: Use after completing a phase or significant implementation — requires reviewing all changed code for critical issues before sign-off
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review
|
|
7
|
+
|
|
8
|
+
Shipping unreviewed code is shipping unknown risk. Review before sign-off.
|
|
9
|
+
|
|
10
|
+
**If you have not reviewed every changed file, you cannot approve the phase.**
|
|
11
|
+
|
|
12
|
+
## The Iron Law
|
|
13
|
+
|
|
14
|
+
<HARD-GATE>
|
|
15
|
+
NO PHASE SIGN-OFF WITHOUT REVIEWING ALL CHANGED CODE.
|
|
16
|
+
If you have not read every diff introduced in this phase, you CANNOT mark it complete.
|
|
17
|
+
"It works" is not "it's correct." Passing tests do not prove code quality.
|
|
18
|
+
Violating this rule is a violation — not a shortcut.
|
|
19
|
+
</HARD-GATE>
|
|
20
|
+
|
|
21
|
+
## The Gate Function
|
|
22
|
+
|
|
23
|
+
Follow these steps IN ORDER before approving any phase or significant implementation.
|
|
24
|
+
|
|
25
|
+
### 1. SCOPE — Identify All Changes
|
|
26
|
+
|
|
27
|
+
- Run `git diff` against the phase's starting point to see every changed file
|
|
28
|
+
- List all new files, modified files, and deleted files
|
|
29
|
+
- Do NOT skip generated files, config changes, or "minor" edits
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Example: see all changes since phase branch point
|
|
33
|
+
git diff --stat main...HEAD
|
|
34
|
+
git diff main...HEAD
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. SECURITY — Check for Vulnerabilities
|
|
38
|
+
|
|
39
|
+
Review every changed file for:
|
|
40
|
+
|
|
41
|
+
| Category | What to Look For |
|
|
42
|
+
|----------|-----------------|
|
|
43
|
+
| Injection | Unsanitized user input in SQL, shell commands, HTML output, template strings |
|
|
44
|
+
| Authentication | Missing auth checks, hardcoded credentials, tokens in source |
|
|
45
|
+
| Authorization | Missing permission checks, privilege escalation paths |
|
|
46
|
+
| Data exposure | Secrets in logs, overly broad API responses, sensitive data in error messages |
|
|
47
|
+
| Dependencies | New dependencies with known vulnerabilities, unnecessary dependencies |
|
|
48
|
+
|
|
49
|
+
**Any security issue is a blocking finding. No exceptions.**
|
|
50
|
+
|
|
51
|
+
### 3. INTERFACES — Verify API Contracts
|
|
52
|
+
|
|
53
|
+
- Do public function signatures match their documentation?
|
|
54
|
+
- Are return types accurate and complete?
|
|
55
|
+
- Do error types cover all failure modes?
|
|
56
|
+
- Are breaking changes documented and intentional?
|
|
57
|
+
- Do exported interfaces maintain backward compatibility (or is the break intentional)?
|
|
58
|
+
|
|
59
|
+
### 4. ERROR HANDLING — Check Failure Paths
|
|
60
|
+
|
|
61
|
+
- Are all external calls (I/O, network, user input) wrapped in error handling?
|
|
62
|
+
- Do error messages provide enough context to diagnose the issue?
|
|
63
|
+
- Are errors propagated correctly (not swallowed silently)?
|
|
64
|
+
- Are edge cases handled (empty input, null values, boundary conditions)?
|
|
65
|
+
|
|
66
|
+
### 5. TESTS — Evaluate Coverage
|
|
67
|
+
|
|
68
|
+
- Does every new public function have corresponding tests?
|
|
69
|
+
- Do tests cover both success and failure paths?
|
|
70
|
+
- Are edge cases tested (empty, null, boundary, error conditions)?
|
|
71
|
+
- Do tests verify behavior, not implementation details?
|
|
72
|
+
|
|
73
|
+
### 6. QUALITY — Assess Maintainability
|
|
74
|
+
|
|
75
|
+
- Is naming consistent with the existing codebase conventions?
|
|
76
|
+
- Are there code duplication opportunities that should be extracted?
|
|
77
|
+
- Is the complexity justified by the requirements?
|
|
78
|
+
- Are comments present where logic is non-obvious (and absent where code is self-evident)?
|
|
79
|
+
|
|
80
|
+
## Critical Issues — Block Phase Sign-Off
|
|
81
|
+
|
|
82
|
+
These categories MUST be resolved before the phase can be marked complete:
|
|
83
|
+
|
|
84
|
+
| Severity | Category | Example |
|
|
85
|
+
|----------|----------|---------|
|
|
86
|
+
| **Blocker** | Security vulnerability | SQL injection, XSS, hardcoded secrets |
|
|
87
|
+
| **Blocker** | Broken interface | Public API returns wrong type, missing required field |
|
|
88
|
+
| **Blocker** | Missing error handling | Unhandled promise rejection, swallowed exceptions on I/O |
|
|
89
|
+
| **Blocker** | Data loss risk | Destructive operation without confirmation, missing transaction |
|
|
90
|
+
| **High** | Performance regression | O(n^2) where O(n) is trivial, unbounded memory allocation |
|
|
91
|
+
| **High** | Missing critical tests | No tests for error paths, no tests for new public API |
|
|
92
|
+
| **Medium** | Naming inconsistency | Convention mismatch with existing codebase |
|
|
93
|
+
| **Medium** | Dead code | Unreachable branches, unused imports, commented-out code |
|
|
94
|
+
|
|
95
|
+
**Blocker and High severity issues block sign-off. Medium issues should be filed for follow-up.**
|
|
96
|
+
|
|
97
|
+
## Common Rationalizations — REJECT THESE
|
|
98
|
+
|
|
99
|
+
| Excuse | Why It Violates the Rule |
|
|
100
|
+
|--------|--------------------------|
|
|
101
|
+
| "Tests pass, so the code is fine" | Tests verify behavior, not code quality. Review is separate. |
|
|
102
|
+
| "I wrote it, so I know it's correct" | Author bias is real. Review as if someone else wrote it. |
|
|
103
|
+
| "It's just a small change" | Small changes cause large outages. Review proportional effort, not zero effort. |
|
|
104
|
+
| "We'll clean it up later" | "Later" accumulates. Fix blockers now, file medium issues. |
|
|
105
|
+
| "The deadline is tight" | Shipping broken code costs more time than reviewing. |
|
|
106
|
+
| "Generated code doesn't need review" | Generated code has the same bugs. Review it. |
|
|
107
|
+
|
|
108
|
+
## Red Flags — STOP If You Catch Yourself:
|
|
109
|
+
|
|
110
|
+
- Skipping files because they "look fine" from the diff stat
|
|
111
|
+
- Approving without reading the actual code changes
|
|
112
|
+
- Ignoring a gut feeling that something is wrong
|
|
113
|
+
- Rushing through review to meet a deadline
|
|
114
|
+
- Assuming tests cover everything without checking
|
|
115
|
+
- Skipping error handling review because "the happy path works"
|
|
116
|
+
|
|
117
|
+
**If any red flag triggers: STOP. Go back to step 1 (SCOPE) and review properly.**
|
|
118
|
+
|
|
119
|
+
## Verification Checklist
|
|
120
|
+
|
|
121
|
+
Before signing off on a phase, confirm:
|
|
122
|
+
|
|
123
|
+
- [ ] All changed files have been reviewed (not just the "important" ones)
|
|
124
|
+
- [ ] No security vulnerabilities found (or all found issues resolved)
|
|
125
|
+
- [ ] Public interfaces match their contracts and documentation
|
|
126
|
+
- [ ] Error handling covers all external calls and edge cases
|
|
127
|
+
- [ ] Test coverage exists for new public functions and error paths
|
|
128
|
+
- [ ] Naming and style are consistent with codebase conventions
|
|
129
|
+
- [ ] No blocker or high severity issues remain open
|
|
130
|
+
|
|
131
|
+
## Review Output Format
|
|
132
|
+
|
|
133
|
+
Produce a review summary for phase documentation:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
REVIEW SCOPE: [number] files changed, [number] additions, [number] deletions
|
|
137
|
+
SECURITY: PASS | ISSUES FOUND (list)
|
|
138
|
+
INTERFACES: PASS | ISSUES FOUND (list)
|
|
139
|
+
ERROR HANDLING: PASS | ISSUES FOUND (list)
|
|
140
|
+
TEST COVERAGE: PASS | GAPS FOUND (list)
|
|
141
|
+
QUALITY: PASS | ISSUES FOUND (list)
|
|
142
|
+
VERDICT: APPROVED | BLOCKED (list blocking issues)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## In MAXSIM Plan Execution
|
|
146
|
+
|
|
147
|
+
Code review applies at phase boundaries:
|
|
148
|
+
- After all tasks in a phase are complete, run this review before marking the phase done
|
|
149
|
+
- Blocking issues must be resolved before phase completion
|
|
150
|
+
- Medium issues should be captured as todos for the next phase
|
|
151
|
+
- The review summary should be included in the phase SUMMARY.md
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memory-management
|
|
3
|
+
description: Use when encountering recurring patterns, errors, or decisions that should persist across sessions — defines when and how to save to project memory
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Memory Management
|
|
7
|
+
|
|
8
|
+
Context dies with each session. Patterns discovered but not saved are patterns lost.
|
|
9
|
+
|
|
10
|
+
**If you encountered it twice, save it. You will encounter it again.**
|
|
11
|
+
|
|
12
|
+
## The Iron Law
|
|
13
|
+
|
|
14
|
+
<HARD-GATE>
|
|
15
|
+
RECURRING PATTERNS MUST BE PERSISTED.
|
|
16
|
+
If you have seen the same error, pattern, or decision twice in this session or across sessions, you MUST save it.
|
|
17
|
+
"I'll remember" is a lie — your context resets. Write it down.
|
|
18
|
+
Violating this rule guarantees repeated mistakes across sessions.
|
|
19
|
+
</HARD-GATE>
|
|
20
|
+
|
|
21
|
+
## When to Save
|
|
22
|
+
|
|
23
|
+
### Auto-Save Triggers (MUST save)
|
|
24
|
+
|
|
25
|
+
These situations require immediate memory persistence:
|
|
26
|
+
|
|
27
|
+
| Trigger | Threshold | What to Save |
|
|
28
|
+
|---------|-----------|-------------|
|
|
29
|
+
| Same error encountered | 2+ occurrences | Error pattern, root cause, fix |
|
|
30
|
+
| Same debugging path followed | 2+ times | The shortcut or solution |
|
|
31
|
+
| Architectural decision made | Once (if significant) | Decision, rationale, alternatives rejected |
|
|
32
|
+
| Non-obvious convention discovered | Once | The convention and where it applies |
|
|
33
|
+
| Workaround for tooling/framework quirk | Once | The quirk and the workaround |
|
|
34
|
+
| Project-specific pattern confirmed | 2+ uses | The pattern and when to apply it |
|
|
35
|
+
|
|
36
|
+
### Do NOT Save
|
|
37
|
+
|
|
38
|
+
- Session-specific context (current task details, in-progress work)
|
|
39
|
+
- Information already in CLAUDE.md or project documentation
|
|
40
|
+
- Speculative conclusions from reading a single file
|
|
41
|
+
- Temporary workarounds that will be removed
|
|
42
|
+
- Obvious patterns that any developer would know
|
|
43
|
+
|
|
44
|
+
## Where to Save
|
|
45
|
+
|
|
46
|
+
Memory files live in `.claude/memory/` (for Claude Code) or the equivalent runtime memory directory.
|
|
47
|
+
|
|
48
|
+
### File Organization
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
.claude/memory/
|
|
52
|
+
MEMORY.md # Index file — always loaded into context
|
|
53
|
+
patterns.md # Code patterns and conventions
|
|
54
|
+
errors.md # Error patterns and solutions
|
|
55
|
+
architecture.md # Architectural decisions and rationale
|
|
56
|
+
tooling.md # Tool quirks and workarounds
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- **MEMORY.md** is the index: keep it under 200 lines, link to topic files for details
|
|
60
|
+
- Topic files hold detailed notes organized by subject
|
|
61
|
+
- Use headers and bullet points for scannability
|
|
62
|
+
|
|
63
|
+
### Memory Entry Format
|
|
64
|
+
|
|
65
|
+
Each entry should follow this structure:
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
## [Short descriptive title]
|
|
69
|
+
|
|
70
|
+
**Context:** When this applies
|
|
71
|
+
**Pattern/Error:** What was observed
|
|
72
|
+
**Solution/Decision:** What to do about it
|
|
73
|
+
**Evidence:** How this was confirmed (dates, occurrences, test results)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## The Gate Function
|
|
77
|
+
|
|
78
|
+
When you encounter something worth remembering:
|
|
79
|
+
|
|
80
|
+
### 1. DETECT — Recognize the Pattern
|
|
81
|
+
|
|
82
|
+
- Is this the same error/pattern you saw before?
|
|
83
|
+
- Is this a decision that will affect future work?
|
|
84
|
+
- Is this a non-obvious convention or quirk?
|
|
85
|
+
|
|
86
|
+
### 2. CHECK — Avoid Duplicates
|
|
87
|
+
|
|
88
|
+
- Read the existing memory files first
|
|
89
|
+
- If the pattern is already documented, update it (don't duplicate)
|
|
90
|
+
- If it contradicts existing memory, investigate which is correct
|
|
91
|
+
|
|
92
|
+
### 3. WRITE — Persist the Memory
|
|
93
|
+
|
|
94
|
+
- Add to the appropriate topic file
|
|
95
|
+
- Update MEMORY.md index if adding a new topic
|
|
96
|
+
- Keep entries concise — future you needs the answer, not the journey
|
|
97
|
+
|
|
98
|
+
### 4. VERIFY — Confirm the Save
|
|
99
|
+
|
|
100
|
+
- Re-read the file to confirm the entry was written correctly
|
|
101
|
+
- Ensure the entry is actionable (someone reading it can act on it)
|
|
102
|
+
|
|
103
|
+
## Error Pattern Detection
|
|
104
|
+
|
|
105
|
+
When debugging, track errors in a mental tally:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Error seen once → Note it, move on
|
|
109
|
+
Error seen twice → Save to errors.md with pattern and fix
|
|
110
|
+
Error seen 3+ times → Save AND add to MEMORY.md index for immediate visibility
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### What Makes a Good Error Memory
|
|
114
|
+
|
|
115
|
+
Good:
|
|
116
|
+
```markdown
|
|
117
|
+
## Vitest "cannot find module" for path aliases
|
|
118
|
+
|
|
119
|
+
**Context:** When running tests that import from `@maxsim/core`
|
|
120
|
+
**Error:** `Cannot find module '@maxsim/core/types'`
|
|
121
|
+
**Fix:** Add `resolve.alias` to `vitest.config.ts` matching tsconfig paths
|
|
122
|
+
**Evidence:** Hit 3 times across phases 01-03 (Feb 2026)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Bad:
|
|
126
|
+
```markdown
|
|
127
|
+
## Test error
|
|
128
|
+
There was an error with tests. Fixed it by changing config.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Common Rationalizations — REJECT THESE
|
|
132
|
+
|
|
133
|
+
| Excuse | Why It Violates the Rule |
|
|
134
|
+
|--------|--------------------------|
|
|
135
|
+
| "I'll remember this" | No you won't. Context resets. Write it down. |
|
|
136
|
+
| "It's too specific to save" | Specific is good. Generic memories are useless. |
|
|
137
|
+
| "Memory files are messy" | Organize them. Messy files > lost knowledge. |
|
|
138
|
+
| "This only applies to this project" | Project memory IS project-scoped. Save it. |
|
|
139
|
+
| "Someone else documented this" | If it's not in your memory files, you won't find it next session. |
|
|
140
|
+
| "I'll save it later" | You'll forget to. Save it now. |
|
|
141
|
+
|
|
142
|
+
## Red Flags — STOP If You Catch Yourself:
|
|
143
|
+
|
|
144
|
+
- Encountering the same error for the second time without saving it
|
|
145
|
+
- Making the same architectural decision you made in a previous session
|
|
146
|
+
- Debugging a problem you already solved before
|
|
147
|
+
- Saying "I think we fixed this before" without finding the memory entry
|
|
148
|
+
- Leaving a session without updating memory for patterns discovered
|
|
149
|
+
|
|
150
|
+
**If any red flag triggers: STOP. Write the memory entry NOW, before continuing.**
|
|
151
|
+
|
|
152
|
+
## Verification Checklist
|
|
153
|
+
|
|
154
|
+
Before ending a work session:
|
|
155
|
+
|
|
156
|
+
- [ ] All errors encountered 2+ times are saved to `errors.md`
|
|
157
|
+
- [ ] All significant decisions are saved to `architecture.md`
|
|
158
|
+
- [ ] All discovered patterns are saved to `patterns.md`
|
|
159
|
+
- [ ] MEMORY.md index is up to date
|
|
160
|
+
- [ ] No duplicate entries were created
|
|
161
|
+
- [ ] All entries follow the format (Context, Pattern, Solution, Evidence)
|
|
162
|
+
|
|
163
|
+
## Integration with MAXSIM
|
|
164
|
+
|
|
165
|
+
During plan execution, the executor and researcher agents load memory files at startup:
|
|
166
|
+
- **Executor:** Reads MEMORY.md to avoid known pitfalls before implementing
|
|
167
|
+
- **Researcher:** Saves findings to memory for future phases
|
|
168
|
+
- **Debugger:** Checks error memories before starting investigation — the fix may already be known
|
|
169
|
+
|
|
170
|
+
Memory persistence happens at natural breakpoints:
|
|
171
|
+
- After resolving a bug (save to errors.md)
|
|
172
|
+
- After completing a phase (save patterns discovered)
|
|
173
|
+
- After making an architectural decision (save to architecture.md)
|
|
174
|
+
- At checkpoints (save current understanding before context resets)
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: simplify
|
|
3
|
+
description: Use after implementation and before commit — requires reviewing changed code for reuse opportunities, quality issues, and unnecessary complexity
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Simplify
|
|
7
|
+
|
|
8
|
+
Every line of code is a liability. Less code that does the same thing is always better.
|
|
9
|
+
|
|
10
|
+
**If you have not looked for ways to simplify, you are shipping the first draft.**
|
|
11
|
+
|
|
12
|
+
## The Iron Law
|
|
13
|
+
|
|
14
|
+
<HARD-GATE>
|
|
15
|
+
NO COMMIT WITHOUT REVIEWING FOR SIMPLIFICATION.
|
|
16
|
+
If you have not checked for duplication, dead code, and unnecessary complexity, you CANNOT commit.
|
|
17
|
+
"It works" is the starting point, not the finish line.
|
|
18
|
+
Violating this rule is a violation — not a preference.
|
|
19
|
+
</HARD-GATE>
|
|
20
|
+
|
|
21
|
+
## The Gate Function
|
|
22
|
+
|
|
23
|
+
After implementation is complete and tests pass, BEFORE committing:
|
|
24
|
+
|
|
25
|
+
### 1. DIFF — Review What Changed
|
|
26
|
+
|
|
27
|
+
- Run `git diff --staged` (or `git diff` for unstaged changes)
|
|
28
|
+
- Read every line you are about to commit
|
|
29
|
+
- Flag anything that feels "off" — trust that instinct
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Review staged changes
|
|
33
|
+
git diff --staged
|
|
34
|
+
# Or all uncommitted changes
|
|
35
|
+
git diff
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 2. DUPLICATION — Find Reuse Opportunities
|
|
39
|
+
|
|
40
|
+
- Does any new code duplicate existing logic in the codebase?
|
|
41
|
+
- Are there two or more blocks that do similar things and could share a helper?
|
|
42
|
+
- Could an existing utility, library function, or helper replace new code?
|
|
43
|
+
- Is there copy-paste from another file that should be extracted?
|
|
44
|
+
|
|
45
|
+
**Rule of three:** If the same pattern appears three times, extract it. Two occurrences are acceptable.
|
|
46
|
+
|
|
47
|
+
### 3. DEAD CODE — Remove What Is Not Used
|
|
48
|
+
|
|
49
|
+
- Are there unused imports, variables, or functions?
|
|
50
|
+
- Are there commented-out code blocks? (Delete them — git has history)
|
|
51
|
+
- Are there unreachable branches or impossible conditions?
|
|
52
|
+
- Are there parameters that are always passed the same value?
|
|
53
|
+
|
|
54
|
+
**If it is not called, it does not belong. Delete it.**
|
|
55
|
+
|
|
56
|
+
### 4. COMPLEXITY — Question Every Abstraction
|
|
57
|
+
|
|
58
|
+
- Is there a wrapper that adds no value beyond indirection?
|
|
59
|
+
- Is there a generic solution where a specific one would be simpler?
|
|
60
|
+
- Are there feature flags, configuration options, or extension points for hypothetical future needs?
|
|
61
|
+
- Could a 3-line inline block replace a 20-line abstraction?
|
|
62
|
+
|
|
63
|
+
**The right amount of abstraction is the minimum needed for the current requirements.**
|
|
64
|
+
|
|
65
|
+
### 5. CLARITY — Improve Readability
|
|
66
|
+
|
|
67
|
+
- Are variable and function names self-explanatory?
|
|
68
|
+
- Could a confusing block be rewritten more clearly without comments?
|
|
69
|
+
- Are there nested conditions that could be flattened with early returns?
|
|
70
|
+
- Is the control flow straightforward or unnecessarily clever?
|
|
71
|
+
|
|
72
|
+
### 6. EFFICIENCY — Check for Obvious Issues
|
|
73
|
+
|
|
74
|
+
- Are there O(n^2) operations where O(n) is straightforward?
|
|
75
|
+
- Are there repeated computations that could be cached or hoisted?
|
|
76
|
+
- Are there unnecessary allocations in hot paths?
|
|
77
|
+
- Is data being transformed multiple times when once would suffice?
|
|
78
|
+
|
|
79
|
+
**Only fix efficiency issues that are obvious. Do not optimize without evidence of a problem.**
|
|
80
|
+
|
|
81
|
+
## Review Checklist
|
|
82
|
+
|
|
83
|
+
| Category | Question | Action if Yes |
|
|
84
|
+
|----------|----------|---------------|
|
|
85
|
+
| Duplication | Same logic exists elsewhere? | Extract shared helper or reuse existing |
|
|
86
|
+
| Duplication | Copy-paste from another file? | Extract to shared module |
|
|
87
|
+
| Dead code | Unused imports or variables? | Delete them |
|
|
88
|
+
| Dead code | Commented-out code? | Delete it (git has history) |
|
|
89
|
+
| Complexity | Abstraction for one call site? | Inline it |
|
|
90
|
+
| Complexity | Generic where specific suffices? | Simplify to specific |
|
|
91
|
+
| Complexity | Config for hypothetical needs? | Remove until needed |
|
|
92
|
+
| Clarity | Confusing variable name? | Rename to describe purpose |
|
|
93
|
+
| Clarity | Deep nesting? | Flatten with early returns |
|
|
94
|
+
| Efficiency | O(n^2) with obvious O(n) fix? | Fix it now |
|
|
95
|
+
| Efficiency | Same computation in a loop? | Hoist outside the loop |
|
|
96
|
+
|
|
97
|
+
## Common Rationalizations — REJECT THESE
|
|
98
|
+
|
|
99
|
+
| Excuse | Why It Violates the Rule |
|
|
100
|
+
|--------|--------------------------|
|
|
101
|
+
| "It works, don't touch it" | Working is the minimum bar. Simplify before it becomes legacy. |
|
|
102
|
+
| "We might need the flexibility later" | YAGNI. Add flexibility when you need it, not before. |
|
|
103
|
+
| "Refactoring is risky" | Small simplifications with passing tests are safe. Large refactors are a separate task. |
|
|
104
|
+
| "The duplication is minor" | Minor duplication compounds. Three occurrences is the threshold, not six. |
|
|
105
|
+
| "I'll clean it up in a follow-up" | Follow-ups rarely happen. Simplify now while context is fresh. |
|
|
106
|
+
| "It's just a few extra lines" | Every unnecessary line is maintenance cost. Delete it. |
|
|
107
|
+
|
|
108
|
+
## Red Flags — STOP If You Catch Yourself:
|
|
109
|
+
|
|
110
|
+
- Committing without reading your own diff
|
|
111
|
+
- Keeping dead code "just in case"
|
|
112
|
+
- Adding a utility class for a single use case
|
|
113
|
+
- Building configuration for features no one has requested
|
|
114
|
+
- Writing a comment to explain code that could be rewritten to be self-evident
|
|
115
|
+
- Skipping simplification because "it's good enough"
|
|
116
|
+
|
|
117
|
+
**If any red flag triggers: STOP. Review the diff again. Simplify before committing.**
|
|
118
|
+
|
|
119
|
+
## Verification Checklist
|
|
120
|
+
|
|
121
|
+
Before committing, confirm:
|
|
122
|
+
|
|
123
|
+
- [ ] All staged changes have been reviewed line by line
|
|
124
|
+
- [ ] No duplication with existing codebase logic (or duplication is below threshold)
|
|
125
|
+
- [ ] No dead code: unused imports, variables, unreachable branches, commented code
|
|
126
|
+
- [ ] No unnecessary abstractions, wrappers, or premature generalizations
|
|
127
|
+
- [ ] Naming is clear and consistent with codebase conventions
|
|
128
|
+
- [ ] No obvious efficiency issues (unnecessary O(n^2), repeated computations)
|
|
129
|
+
- [ ] Tests still pass after simplification changes
|
|
130
|
+
|
|
131
|
+
## In MAXSIM Plan Execution
|
|
132
|
+
|
|
133
|
+
Simplification applies at the task level, after implementation and before commit:
|
|
134
|
+
- After task implementation is complete and tests pass, run this review
|
|
135
|
+
- Make simplification changes as part of the same commit (not a separate task)
|
|
136
|
+
- If simplification reveals a larger refactoring opportunity, file a todo — do not scope-creep
|
|
137
|
+
- Track significant simplifications in the task's commit message (e.g., "extracted shared helper for X")
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: using-maxsim
|
|
3
|
+
description: Entry skill that establishes MAXSIM workflow rules — triggers before any action to route work through the correct MAXSIM commands, skills, and agents
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Using MAXSIM
|
|
7
|
+
|
|
8
|
+
MAXSIM is a spec-driven development system. Work flows through phases, plans, and tasks — not ad-hoc coding.
|
|
9
|
+
|
|
10
|
+
**If you are about to write code without a plan, STOP. Route through MAXSIM first.**
|
|
11
|
+
|
|
12
|
+
## The Iron Law
|
|
13
|
+
|
|
14
|
+
<HARD-GATE>
|
|
15
|
+
NO IMPLEMENTATION WITHOUT A PLAN.
|
|
16
|
+
If there is no .planning/ directory, run `/maxsim:init` first.
|
|
17
|
+
If there is no current phase, run `/maxsim:plan-phase` first.
|
|
18
|
+
If there is no PLAN.md for the current phase, run `/maxsim:plan-phase` first.
|
|
19
|
+
If there IS a plan, run `/maxsim:execute-phase` to execute it.
|
|
20
|
+
Skipping the workflow is a violation — not a shortcut.
|
|
21
|
+
</HARD-GATE>
|
|
22
|
+
|
|
23
|
+
## When This Skill Triggers
|
|
24
|
+
|
|
25
|
+
This skill applies to ALL work sessions. Before starting any task:
|
|
26
|
+
|
|
27
|
+
1. **Check for `.planning/` directory** — if missing, initialize with `/maxsim:init`
|
|
28
|
+
2. **Check STATE.md** — resume from last checkpoint if one exists
|
|
29
|
+
3. **Check current phase** — determine what phase is active in ROADMAP.md
|
|
30
|
+
4. **Route to the correct command** based on the situation (see routing table below)
|
|
31
|
+
|
|
32
|
+
## Routing Table
|
|
33
|
+
|
|
34
|
+
| Situation | Route To |
|
|
35
|
+
|-----------|----------|
|
|
36
|
+
| No `.planning/` directory | `/maxsim:init` |
|
|
37
|
+
| No ROADMAP.md or empty roadmap | `/maxsim:plan-roadmap` |
|
|
38
|
+
| Active phase has no PLAN.md | `/maxsim:plan-phase` |
|
|
39
|
+
| Active phase has PLAN.md, not started | `/maxsim:execute-phase` |
|
|
40
|
+
| Checkpoint exists in STATE.md | `/maxsim:resume-work` |
|
|
41
|
+
| Bug found during execution | `/maxsim:debug` (triggers systematic-debugging skill) |
|
|
42
|
+
| Phase complete, needs verification | `/maxsim:verify-phase` (triggers verification-before-completion skill) |
|
|
43
|
+
| Quick standalone task | `/maxsim:quick` |
|
|
44
|
+
| User asks for help | `/maxsim:help` |
|
|
45
|
+
|
|
46
|
+
## Available Skills
|
|
47
|
+
|
|
48
|
+
Skills are behavioral rules that activate automatically based on context:
|
|
49
|
+
|
|
50
|
+
| Skill | Triggers When |
|
|
51
|
+
|-------|---------------|
|
|
52
|
+
| `systematic-debugging` | Any bug, test failure, or unexpected behavior encountered |
|
|
53
|
+
| `tdd` | Implementing any feature or bug fix (write test first) |
|
|
54
|
+
| `verification-before-completion` | Before claiming any work is complete or passing |
|
|
55
|
+
| `memory-management` | Recurring patterns, errors, or decisions worth persisting |
|
|
56
|
+
| `using-maxsim` | Always — entry point for all MAXSIM work |
|
|
57
|
+
|
|
58
|
+
## Available Agents
|
|
59
|
+
|
|
60
|
+
Agents are specialized subagent prompts spawned by MAXSIM commands:
|
|
61
|
+
|
|
62
|
+
| Agent | Purpose | Triggered By |
|
|
63
|
+
|-------|---------|-------------|
|
|
64
|
+
| `maxsim-executor` | Executes plans with atomic commits | `/maxsim:execute-phase` |
|
|
65
|
+
| `maxsim-planner` | Creates structured PLAN.md files | `/maxsim:plan-phase` |
|
|
66
|
+
| `maxsim-debugger` | Investigates bugs systematically | `/maxsim:debug` |
|
|
67
|
+
| `maxsim-verifier` | Verifies phase goal achievement | `/maxsim:verify-phase` |
|
|
68
|
+
| `maxsim-roadmapper` | Creates project roadmaps | `/maxsim:plan-roadmap` |
|
|
69
|
+
| `maxsim-phase-researcher` | Researches phase requirements | `/maxsim:plan-phase` |
|
|
70
|
+
| `maxsim-code-reviewer` | Reviews code changes | `/maxsim:review` |
|
|
71
|
+
| `maxsim-spec-reviewer` | Reviews specifications | `/maxsim:plan-roadmap` |
|
|
72
|
+
| `maxsim-plan-checker` | Validates plan completeness | `/maxsim:plan-phase` |
|
|
73
|
+
| `maxsim-project-researcher` | Researches project context | `/maxsim:init` |
|
|
74
|
+
| `maxsim-research-synthesizer` | Synthesizes research findings | `/maxsim:plan-phase` |
|
|
75
|
+
| `maxsim-codebase-mapper` | Maps codebase structure | `/maxsim:init` |
|
|
76
|
+
| `maxsim-integration-checker` | Checks integration points | `/maxsim:verify-phase` |
|
|
77
|
+
|
|
78
|
+
## Common Rationalizations — REJECT THESE
|
|
79
|
+
|
|
80
|
+
| Excuse | Why It Violates the Rule |
|
|
81
|
+
|--------|--------------------------|
|
|
82
|
+
| "It's just a small fix" | Small fixes have context and consequences. Use `/maxsim:quick`. |
|
|
83
|
+
| "I know what to do, I don't need a plan" | Plans catch what you miss. The plan is the checkpoint. |
|
|
84
|
+
| "MAXSIM overhead is too much for this" | `/maxsim:quick` exists for lightweight tasks. Use it. |
|
|
85
|
+
| "I'll plan it in my head" | Plans in your head die with context. Write them down. |
|
|
86
|
+
| "The user said 'just do it'" | Route through `/maxsim:quick` — it is fast and still tracked. |
|
|
87
|
+
|
|
88
|
+
## Red Flags — STOP If You Catch Yourself:
|
|
89
|
+
|
|
90
|
+
- Writing implementation code without a PLAN.md
|
|
91
|
+
- Skipping `/maxsim:init` because "the project is simple"
|
|
92
|
+
- Ignoring STATE.md checkpoints from previous sessions
|
|
93
|
+
- Working outside the current phase without explicit user approval
|
|
94
|
+
- Making architectural decisions without documenting them in STATE.md
|
|
95
|
+
- Finishing work without running verification
|
|
96
|
+
|
|
97
|
+
**If any red flag triggers: STOP. Check the routing table. Follow the workflow.**
|
|
98
|
+
|
|
99
|
+
## Verification Checklist
|
|
100
|
+
|
|
101
|
+
Before ending any work session:
|
|
102
|
+
|
|
103
|
+
- [ ] All work was routed through MAXSIM commands (not ad-hoc)
|
|
104
|
+
- [ ] STATE.md reflects current progress and decisions
|
|
105
|
+
- [ ] Any bugs encountered were debugged systematically (not guessed)
|
|
106
|
+
- [ ] Tests were written before implementation (TDD)
|
|
107
|
+
- [ ] Completion claims have verification evidence
|
|
108
|
+
- [ ] Recurring patterns or errors were saved to memory
|
|
109
|
+
|
|
110
|
+
## Integration with CLAUDE.md
|
|
111
|
+
|
|
112
|
+
When a project has a `CLAUDE.md`, both apply:
|
|
113
|
+
- `CLAUDE.md` defines project-specific conventions (language, tools, style)
|
|
114
|
+
- MAXSIM skills define workflow rules (how work is structured and verified)
|
|
115
|
+
- If they conflict, `CLAUDE.md` project conventions take priority for code style; MAXSIM takes priority for workflow structure
|