maxsimcli 5.0.6 → 5.1.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/README.md +316 -288
- package/dist/assets/CHANGELOG.md +14 -0
- package/dist/assets/hooks/maxsim-capture-learnings.cjs +128 -0
- package/dist/assets/hooks/maxsim-capture-learnings.cjs.map +1 -0
- package/dist/assets/hooks/maxsim-check-update.cjs +126 -88
- package/dist/assets/hooks/maxsim-check-update.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-notification-sound.cjs +87 -43
- package/dist/assets/hooks/maxsim-notification-sound.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-statusline.cjs +45 -171
- package/dist/assets/hooks/maxsim-statusline.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-stop-sound.cjs +86 -43
- package/dist/assets/hooks/maxsim-stop-sound.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-sync-reminder.cjs +72 -21
- package/dist/assets/hooks/maxsim-sync-reminder.cjs.map +1 -1
- package/dist/assets/templates/agents/AGENTS.md +62 -51
- package/dist/assets/templates/agents/executor.md +44 -59
- package/dist/assets/templates/agents/planner.md +36 -31
- package/dist/assets/templates/agents/researcher.md +35 -43
- package/dist/assets/templates/agents/verifier.md +29 -31
- package/dist/assets/templates/commands/maxsim/debug.md +20 -154
- package/dist/assets/templates/commands/maxsim/execute.md +19 -33
- package/dist/assets/templates/commands/maxsim/go.md +21 -20
- package/dist/assets/templates/commands/maxsim/help.md +5 -14
- package/dist/assets/templates/commands/maxsim/init.md +18 -40
- package/dist/assets/templates/commands/maxsim/plan.md +22 -37
- package/dist/assets/templates/commands/maxsim/progress.md +15 -16
- package/dist/assets/templates/commands/maxsim/quick.md +18 -29
- package/dist/assets/templates/commands/maxsim/settings.md +18 -26
- package/dist/assets/templates/references/continuation-format.md +2 -4
- package/dist/assets/templates/references/model-profiles.md +2 -2
- package/dist/assets/templates/references/planning-config.md +10 -11
- package/dist/assets/templates/references/self-improvement.md +120 -0
- package/dist/assets/templates/rules/conventions.md +1 -1
- package/dist/assets/templates/rules/verification-protocol.md +1 -1
- package/dist/assets/templates/skills/brainstorming/SKILL.md +35 -26
- package/dist/assets/templates/skills/code-review/SKILL.md +78 -55
- package/dist/assets/templates/skills/commit-conventions/SKILL.md +70 -36
- package/dist/assets/templates/skills/github-operations/SKILL.md +142 -0
- package/dist/assets/templates/skills/handoff-contract/SKILL.md +62 -28
- package/dist/assets/templates/skills/maxsim-batch/SKILL.md +68 -42
- package/dist/assets/templates/skills/maxsim-simplify/SKILL.md +65 -40
- package/dist/assets/templates/skills/project-memory/SKILL.md +121 -0
- package/dist/assets/templates/skills/research/SKILL.md +126 -0
- package/dist/assets/templates/skills/roadmap-writing/SKILL.md +71 -68
- package/dist/assets/templates/skills/systematic-debugging/SKILL.md +37 -25
- package/dist/assets/templates/skills/tdd/SKILL.md +36 -39
- package/dist/assets/templates/skills/using-maxsim/SKILL.md +69 -55
- package/dist/assets/templates/skills/verification/SKILL.md +167 -0
- package/dist/assets/templates/workflows/batch.md +249 -268
- package/dist/assets/templates/workflows/diagnose-issues.md +225 -151
- package/dist/assets/templates/workflows/execute-plan.md +191 -981
- package/dist/assets/templates/workflows/execute.md +350 -309
- package/dist/assets/templates/workflows/go.md +119 -138
- package/dist/assets/templates/workflows/health.md +71 -114
- package/dist/assets/templates/workflows/help.md +85 -147
- package/dist/assets/templates/workflows/init-existing.md +180 -1373
- package/dist/assets/templates/workflows/init.md +53 -165
- package/dist/assets/templates/workflows/new-milestone.md +91 -334
- package/dist/assets/templates/workflows/new-project.md +165 -1384
- package/dist/assets/templates/workflows/plan-create.md +182 -73
- package/dist/assets/templates/workflows/plan-discuss.md +89 -82
- package/dist/assets/templates/workflows/plan-research.md +191 -85
- package/dist/assets/templates/workflows/plan.md +122 -58
- package/dist/assets/templates/workflows/progress.md +76 -310
- package/dist/assets/templates/workflows/quick.md +70 -495
- package/dist/assets/templates/workflows/sdd.md +231 -221
- package/dist/assets/templates/workflows/settings.md +90 -120
- package/dist/assets/templates/workflows/verify-phase.md +296 -258
- package/dist/cli.cjs +17 -23465
- package/dist/cli.cjs.map +1 -1
- package/dist/install.cjs +356 -8358
- package/dist/install.cjs.map +1 -1
- package/package.json +16 -22
- package/dist/assets/templates/skills/agent-system-map/SKILL.md +0 -92
- package/dist/assets/templates/skills/evidence-collection/SKILL.md +0 -87
- package/dist/assets/templates/skills/github-artifact-protocol/SKILL.md +0 -67
- package/dist/assets/templates/skills/github-tools-guide/SKILL.md +0 -89
- package/dist/assets/templates/skills/input-validation/SKILL.md +0 -51
- package/dist/assets/templates/skills/memory-management/SKILL.md +0 -75
- package/dist/assets/templates/skills/research-methodology/SKILL.md +0 -137
- package/dist/assets/templates/skills/sdd/SKILL.md +0 -91
- package/dist/assets/templates/skills/tool-priority-guide/SKILL.md +0 -80
- package/dist/assets/templates/skills/verification-before-completion/SKILL.md +0 -71
- package/dist/assets/templates/skills/verification-gates/SKILL.md +0 -169
- package/dist/assets/templates/workflows/discuss-phase.md +0 -683
- package/dist/assets/templates/workflows/research-phase.md +0 -73
- package/dist/assets/templates/workflows/verify-work.md +0 -572
- package/dist/core-D5zUr9cb.cjs +0 -4305
- package/dist/core-D5zUr9cb.cjs.map +0 -1
- package/dist/skills-CjFWZIGM.cjs +0 -6824
- package/dist/skills-CjFWZIGM.cjs.map +0 -1
|
@@ -1,75 +1,109 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: commit-conventions
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
or establishing commit conventions for a project.
|
|
8
|
-
user-invocable: false
|
|
4
|
+
Enforces conventional commit format with atomic changes and co-author
|
|
5
|
+
attribution. Use when committing code changes to maintain consistent git
|
|
6
|
+
history.
|
|
9
7
|
---
|
|
10
8
|
|
|
11
9
|
# Commit Conventions
|
|
12
10
|
|
|
13
|
-
Consistent commit messages
|
|
11
|
+
Consistent commit messages enable automated versioning, changelogs, and clear project history. Every commit follows this format.
|
|
14
12
|
|
|
15
|
-
##
|
|
13
|
+
## Format
|
|
16
14
|
|
|
17
15
|
```
|
|
18
|
-
|
|
16
|
+
type(scope): description
|
|
19
17
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
18
|
+
- key change 1
|
|
19
|
+
- key change 2
|
|
20
|
+
|
|
21
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Subject line under 72 characters. Body bullet points are optional for trivial commits. Co-author line always present for AI-assisted work.
|
|
25
|
+
|
|
26
|
+
## Types
|
|
25
27
|
|
|
26
|
-
| Type | When |
|
|
27
|
-
|
|
28
|
-
| `feat` | New feature or capability | Minor
|
|
29
|
-
| `fix` | Bug fix | Patch
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
28
|
+
| Type | When to Use | Version Impact |
|
|
29
|
+
|------|-------------|---------------|
|
|
30
|
+
| `feat` | New feature or capability | Minor bump |
|
|
31
|
+
| `fix` | Bug fix | Patch bump |
|
|
32
|
+
| `refactor` | Code restructure with no behavior change | No bump |
|
|
33
|
+
| `test` | Adding or correcting tests | No bump |
|
|
34
|
+
| `docs` | Documentation only | No bump |
|
|
35
|
+
| `chore` | Build, deps, config, tooling, maintenance | No bump |
|
|
36
|
+
| `style` | Formatting, whitespace, no logic change | No bump |
|
|
37
|
+
| `perf` | Performance improvement | No bump |
|
|
38
|
+
| `ci` | CI/CD pipeline changes | No bump |
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
## Breaking Changes
|
|
36
41
|
|
|
37
42
|
Append `!` after the type for breaking changes:
|
|
38
43
|
|
|
39
44
|
```
|
|
40
|
-
feat!(
|
|
45
|
+
feat!(api): require authentication on all endpoints
|
|
41
46
|
fix!(config): rename model_profile to profile
|
|
42
47
|
```
|
|
43
48
|
|
|
44
|
-
Breaking changes trigger a major version bump.
|
|
49
|
+
Breaking changes trigger a major version bump. Always explain what breaks and the migration path in the commit body.
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
## Scope
|
|
47
52
|
|
|
48
|
-
Scope identifies the area
|
|
53
|
+
Scope identifies the affected area:
|
|
49
54
|
|
|
50
|
-
-
|
|
51
|
-
- Module: `fix(install):`, `refactor(core):`
|
|
55
|
+
- Module or package: `fix(install):`, `refactor(core):`
|
|
52
56
|
- Component: `feat(dashboard):`, `test(cli):`
|
|
57
|
+
- Phase work: `feat(04-01):`, `fix(phase-04):`
|
|
58
|
+
|
|
59
|
+
Scope is required when the change is not project-wide.
|
|
53
60
|
|
|
54
61
|
## Atomic Commits
|
|
55
62
|
|
|
56
|
-
One logical change per commit
|
|
63
|
+
One logical change per commit. The diff and message should describe a single coherent unit of work.
|
|
64
|
+
|
|
65
|
+
Do:
|
|
66
|
+
- Separate feature implementation from test additions
|
|
67
|
+
- Commit each task in a plan individually
|
|
68
|
+
- Commit a refactor separately from a bug fix found during refactor
|
|
57
69
|
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
70
|
+
Do not:
|
|
71
|
+
- Bundle unrelated changes in one commit
|
|
72
|
+
- Mix "fix typo" with feature work
|
|
73
|
+
- Commit "work in progress" or partial implementations
|
|
62
74
|
|
|
63
75
|
## Co-Author Attribution
|
|
64
76
|
|
|
65
|
-
|
|
77
|
+
All AI-assisted commits include the co-author line:
|
|
66
78
|
|
|
67
79
|
```
|
|
68
80
|
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
69
81
|
```
|
|
70
82
|
|
|
71
|
-
##
|
|
83
|
+
## Common Mistakes
|
|
84
|
+
|
|
85
|
+
| Mistake | Correct Approach |
|
|
86
|
+
|---------|-----------------|
|
|
87
|
+
| `fix: fixed stuff` | `fix(auth): handle expired token on refresh` |
|
|
88
|
+
| `update things` | Missing type prefix entirely -- add `chore:` or appropriate type |
|
|
89
|
+
| `feat: add feature and also fix bug` | Two commits: one `feat`, one `fix` |
|
|
90
|
+
| `WIP` | Never commit WIP to main; finish the unit of work |
|
|
91
|
+
| Past tense: "added validation" | Imperative mood: "add validation" |
|
|
72
92
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
93
|
+
## Examples
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
feat(api): add rate limiting to public endpoints
|
|
97
|
+
|
|
98
|
+
- Default: 100 requests per minute per IP
|
|
99
|
+
- Configurable via RATE_LIMIT_RPM env var
|
|
100
|
+
- Returns 429 with Retry-After header
|
|
101
|
+
|
|
102
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
fix(install): resolve path resolution failure on Windows
|
|
107
|
+
|
|
108
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
109
|
+
```
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-operations
|
|
3
|
+
description: Unified GitHub interaction covering artifact types, comment conventions, CLI commands, and issue lifecycle. Use when reading from or writing to GitHub Issues, managing the project board, or posting structured comments.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## GitHub as Source of Truth
|
|
8
|
+
|
|
9
|
+
All project state lives on GitHub. No local `.planning/` files. The canonical record for every phase, task, decision, and progress update is an Issue or Issue comment on the configured repository.
|
|
10
|
+
|
|
11
|
+
## Issue Structure
|
|
12
|
+
|
|
13
|
+
- Phase issues: `[Phase N] Description` — labeled `type:phase`, added to board
|
|
14
|
+
- Task sub-issues: `[Task N.M] Description` — labeled `type:task`, parented to phase issue
|
|
15
|
+
- Issue bodies contain HTML comment markers for machine-readable metadata
|
|
16
|
+
|
|
17
|
+
## Comment Types
|
|
18
|
+
|
|
19
|
+
Every artifact posted to GitHub must include a type marker as the first line of the comment body.
|
|
20
|
+
|
|
21
|
+
| Type | Marker | Purpose |
|
|
22
|
+
|------|--------|---------|
|
|
23
|
+
| plan | `<!-- maxsim:type=plan -->` | Task breakdown posted after planning |
|
|
24
|
+
| research | `<!-- maxsim:type=research -->` | Investigation findings |
|
|
25
|
+
| context | `<!-- maxsim:type=context -->` | Phase context and decisions |
|
|
26
|
+
| progress | `<!-- maxsim:type=progress -->` | Status update during execution |
|
|
27
|
+
| verification | `<!-- maxsim:type=verification -->` | Verification results |
|
|
28
|
+
| summary | `<!-- maxsim:type=summary -->` | Phase or task completion summary |
|
|
29
|
+
| error | `<!-- maxsim:type=error -->` | Error report |
|
|
30
|
+
| escalation | `<!-- maxsim:type=escalation -->` | Escalation to user requiring input |
|
|
31
|
+
| handoff | `<!-- maxsim:type=handoff -->` | Agent handoff with state transfer |
|
|
32
|
+
|
|
33
|
+
## CLI Commands Reference
|
|
34
|
+
|
|
35
|
+
All commands use the MAXSIM tools router:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github <command> [--flag value]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Add `--raw` to any command for machine-readable JSON output: `{"ok": true, "result": "...", "rawValue": {...}}`.
|
|
42
|
+
|
|
43
|
+
### Core Commands
|
|
44
|
+
|
|
45
|
+
| Command | Purpose |
|
|
46
|
+
|---------|---------|
|
|
47
|
+
| `status` | Combined progress + interrupted phases + board overview |
|
|
48
|
+
| `get-issue --issue-number N` | Get issue details |
|
|
49
|
+
| `get-issue --issue-number N --include-comments` | Get issue with all comments |
|
|
50
|
+
| `post-comment --issue-number N --body "..."` | Post comment (include type marker in body) |
|
|
51
|
+
| `post-comment --issue-number N --body-file F` | Post comment from file (preferred for long content) |
|
|
52
|
+
| `move-issue --issue-number N --status "In Progress"` | Move issue to board column |
|
|
53
|
+
| `close-issue --issue-number N --state-reason completed` | Close issue as completed |
|
|
54
|
+
| `close-issue --issue-number N --state-reason not_planned` | Close issue as cancelled |
|
|
55
|
+
| `reopen-issue --issue-number N` | Reopen a closed issue |
|
|
56
|
+
|
|
57
|
+
### Phase and Task Lifecycle
|
|
58
|
+
|
|
59
|
+
| Command | Purpose |
|
|
60
|
+
|---------|---------|
|
|
61
|
+
| `create-phase --phase-number "01" --phase-name "Name" --goal "Goal"` | Create phase issue, add to board, set To Do |
|
|
62
|
+
| `create-task --phase-number "01" --task-id "T1" --title "T" --body "B" --parent-issue-number N` | Create task sub-issue |
|
|
63
|
+
| `batch-create-tasks --phase-issue N --tasks-json "[{...}]"` | Batch create tasks with rollback on failure |
|
|
64
|
+
| `post-plan-comment --phase-issue-number N --plan-content "..."` | Post plan comment on phase issue |
|
|
65
|
+
| `list-sub-issues --phase-issue-number N` | List all sub-issues under a phase |
|
|
66
|
+
| `bounce-issue --issue-number N --reason "feedback"` | Move back to In Progress with feedback comment |
|
|
67
|
+
|
|
68
|
+
### Board and Search
|
|
69
|
+
|
|
70
|
+
| Command | Purpose |
|
|
71
|
+
|---------|---------|
|
|
72
|
+
| `query-board --project-number N` | Query all board items |
|
|
73
|
+
| `query-board --project-number N --status "In Progress"` | Filter board by column |
|
|
74
|
+
| `search-issues --labels "type:phase" --state open` | Search issues by label or state |
|
|
75
|
+
| `phase-progress --phase-issue-number N` | Phase completion from sub-issue states |
|
|
76
|
+
| `all-progress` | All phases progress overview |
|
|
77
|
+
| `ensure-labels` | Create any missing standard labels |
|
|
78
|
+
| `sync-check` | Verify local mapping matches GitHub state |
|
|
79
|
+
|
|
80
|
+
### Large Text Arguments
|
|
81
|
+
|
|
82
|
+
For multi-line content, write to a temp file and use `--body-file`:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
TMPFILE=$(mktemp)
|
|
86
|
+
cat > "$TMPFILE" << 'EOF'
|
|
87
|
+
<!-- maxsim:type=summary -->
|
|
88
|
+
## Summary
|
|
89
|
+
Content here...
|
|
90
|
+
EOF
|
|
91
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number 42 --body-file "$TMPFILE"
|
|
92
|
+
rm "$TMPFILE"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Board Columns
|
|
96
|
+
|
|
97
|
+
Valid values for `--status`:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
To Do → In Progress → In Review → Done
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
- Phase issues move through all four columns
|
|
104
|
+
- Task sub-issues move: To Do → In Progress → Done (skip In Review unless a PR is involved)
|
|
105
|
+
- On review failure: Done → In Progress via `bounce-issue`
|
|
106
|
+
|
|
107
|
+
## Labels
|
|
108
|
+
|
|
109
|
+
| Label | Applied To |
|
|
110
|
+
|-------|-----------|
|
|
111
|
+
| `type:phase` | Phase issues |
|
|
112
|
+
| `type:task` | Task sub-issues |
|
|
113
|
+
| `type:bug` | Bug reports |
|
|
114
|
+
| `type:quick` | Quick tasks |
|
|
115
|
+
| `priority:p0` through `priority:p3` | All issues (p0 = critical) |
|
|
116
|
+
| `status:blocked` | Blocked issues |
|
|
117
|
+
| `status:needs-review` | Awaiting review |
|
|
118
|
+
| `maxsim:managed` | All issues created by MAXSIM |
|
|
119
|
+
|
|
120
|
+
## Write Order
|
|
121
|
+
|
|
122
|
+
1. Build full comment content in memory before any write
|
|
123
|
+
2. POST to GitHub via CLI command
|
|
124
|
+
3. If successful, operation complete
|
|
125
|
+
4. If failed, abort entirely — no partial state
|
|
126
|
+
|
|
127
|
+
## Rollback on Batch Failure
|
|
128
|
+
|
|
129
|
+
When `batch-create-tasks` partially fails:
|
|
130
|
+
|
|
131
|
+
1. Close partially-created issues with `--state-reason not_planned`
|
|
132
|
+
2. Post an `error` comment on the phase issue explaining the failure
|
|
133
|
+
3. Report what succeeded and what failed
|
|
134
|
+
4. Offer targeted retry for the failed subset
|
|
135
|
+
|
|
136
|
+
## External Edit Detection
|
|
137
|
+
|
|
138
|
+
If a body hash mismatch is detected (issue edited outside MAXSIM):
|
|
139
|
+
|
|
140
|
+
- Warn about the external modification
|
|
141
|
+
- Do not auto-incorporate changes
|
|
142
|
+
- Await explicit user instruction before proceeding
|
|
@@ -1,70 +1,104 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: handoff-contract
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
results
|
|
7
|
-
or transitioning between workflow stages.
|
|
8
|
-
user-invocable: false
|
|
4
|
+
Standardizes agent output format with key decisions, artifacts, status, and
|
|
5
|
+
deferred items. Use when any agent completes a task and needs to report
|
|
6
|
+
results to the orchestrator.
|
|
9
7
|
---
|
|
10
8
|
|
|
11
9
|
# Handoff Contract
|
|
12
10
|
|
|
13
|
-
Every agent
|
|
11
|
+
Every agent output includes exactly four sections. The orchestrator reads these sections for state tracking, artifact management, and pipeline decisions. Missing sections break the pipeline.
|
|
14
12
|
|
|
15
|
-
## Required
|
|
13
|
+
## Required Sections
|
|
16
14
|
|
|
17
15
|
### Key Decisions
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
What was decided during execution and why. Downstream agents depend on this context.
|
|
20
18
|
|
|
21
19
|
```markdown
|
|
22
20
|
### Key Decisions
|
|
23
|
-
- Chose X over Y because [reason]
|
|
24
|
-
- Deferred Z to [phase/plan] because [
|
|
21
|
+
- Chose X over Y because [reason with evidence]
|
|
22
|
+
- Deferred Z to [phase/plan] because [scope constraint]
|
|
23
|
+
- Interpreted ambiguous requirement as [interpretation] because [reasoning]
|
|
25
24
|
```
|
|
26
25
|
|
|
27
|
-
Include: technology choices, scope adjustments,
|
|
26
|
+
Include: technology choices, scope adjustments, interpretations of ambiguous requirements, tradeoffs made.
|
|
27
|
+
|
|
28
|
+
Omit: routine implementation steps, decisions with no downstream impact.
|
|
28
29
|
|
|
29
30
|
### Artifacts
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
All files created or modified, grouped by action.
|
|
32
33
|
|
|
33
34
|
```markdown
|
|
34
35
|
### Artifacts
|
|
35
|
-
- Created: path/to/new-file.ts
|
|
36
|
-
- Created: path/to/another-file.md
|
|
37
|
-
- Modified: path/to/existing-file.ts
|
|
36
|
+
- Created: /absolute/path/to/new-file.ts
|
|
37
|
+
- Created: /absolute/path/to/another-file.md
|
|
38
|
+
- Modified: /absolute/path/to/existing-file.ts
|
|
39
|
+
- Deleted: /absolute/path/to/removed-file.ts
|
|
38
40
|
```
|
|
39
41
|
|
|
40
|
-
Use absolute paths
|
|
42
|
+
Use absolute paths. Include every file touched — not just primary deliverables. Config changes, test files, and generated files all count.
|
|
41
43
|
|
|
42
44
|
### Status
|
|
43
45
|
|
|
44
|
-
One of three values:
|
|
46
|
+
One of three values with supporting evidence:
|
|
45
47
|
|
|
46
|
-
| Status | Meaning | Orchestrator Action |
|
|
47
|
-
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
48
|
+
| Status | Meaning | Required Evidence | Orchestrator Action |
|
|
49
|
+
|--------|---------|-------------------|-------------------|
|
|
50
|
+
| `PASS` | All tasks done, verification passed | Test output, build output, or explicit verification | Advance to next stage |
|
|
51
|
+
| `FAIL` | Could not complete; stopped | What failed, what was attempted | Escalate to user |
|
|
52
|
+
| `PARTIAL` | Some tasks done; stopped at checkpoint | Which tasks passed, which remain | Resume from checkpoint |
|
|
51
53
|
|
|
52
54
|
```markdown
|
|
53
55
|
### Status
|
|
54
|
-
|
|
56
|
+
PASS
|
|
57
|
+
|
|
58
|
+
Evidence:
|
|
59
|
+
- Tests: 47 passed, 0 failed (npm test output)
|
|
60
|
+
- Build: exit code 0
|
|
61
|
+
- All 4 plan tasks completed
|
|
55
62
|
```
|
|
56
63
|
|
|
64
|
+
Evidence is not optional. A status claim without evidence is treated as FAIL.
|
|
65
|
+
|
|
57
66
|
### Deferred Items
|
|
58
67
|
|
|
59
|
-
Work discovered but not implemented
|
|
68
|
+
Work discovered but not implemented. Captures scope that would otherwise be lost.
|
|
60
69
|
|
|
61
70
|
```markdown
|
|
62
71
|
### Deferred Items
|
|
63
72
|
- [feature] Add caching layer -- not in current plan scope
|
|
64
|
-
- [bug] Race condition in parallel writes -- needs investigation
|
|
65
|
-
- [refactor] Extract shared validation logic -- deferred to
|
|
73
|
+
- [bug] Race condition in parallel writes -- needs investigation in Phase 5
|
|
74
|
+
- [refactor] Extract shared validation logic -- deferred to cleanup phase
|
|
75
|
+
- [investigation] Memory growth after 100+ concurrent connections -- repro needed
|
|
66
76
|
```
|
|
67
77
|
|
|
68
|
-
If none: `### Deferred Items\nNone`
|
|
69
|
-
|
|
70
78
|
Categories: `feature`, `bug`, `refactor`, `investigation`
|
|
79
|
+
|
|
80
|
+
If none: write `### Deferred Items\nNone`
|
|
81
|
+
|
|
82
|
+
## Complete Output Template
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
### Key Decisions
|
|
86
|
+
- [decision]: [reason]
|
|
87
|
+
|
|
88
|
+
### Artifacts
|
|
89
|
+
- Created: /path/to/file
|
|
90
|
+
- Modified: /path/to/file
|
|
91
|
+
|
|
92
|
+
### Status
|
|
93
|
+
PASS | FAIL | PARTIAL
|
|
94
|
+
|
|
95
|
+
Evidence:
|
|
96
|
+
- [verification output or description]
|
|
97
|
+
|
|
98
|
+
### Deferred Items
|
|
99
|
+
- [category] [description] -- [reason deferred]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Enforcement
|
|
103
|
+
|
|
104
|
+
An orchestrator receiving output without all four sections treats the result as PARTIAL and requests re-submission. Agents cannot mark a task complete without producing a conforming handoff.
|
|
@@ -1,86 +1,112 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maxsim-batch
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
tasks.
|
|
4
|
+
Orchestrates parallel agent execution using worktree isolation following
|
|
5
|
+
Anthropic's batch pattern. Use when multiple independent tasks can be
|
|
6
|
+
executed simultaneously.
|
|
8
7
|
---
|
|
9
8
|
|
|
10
|
-
# Batch
|
|
9
|
+
# Batch Parallel Execution
|
|
11
10
|
|
|
12
|
-
Decompose large tasks into independent units
|
|
11
|
+
Decompose large tasks into independent units, spawn all agents in a single message block, track progress, collect results.
|
|
13
12
|
|
|
14
13
|
## When to Use
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
15
|
+
Use batch execution when:
|
|
16
|
+
- 3 or more tasks with no shared file modifications
|
|
17
|
+
- Each task can be verified independently
|
|
18
|
+
- Speed matters and the overhead of coordination is worth it
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Do not use for fewer than 3 tasks (overhead exceeds benefit), sequential dependencies, or tasks that modify the same files.
|
|
21
21
|
|
|
22
22
|
## Process
|
|
23
23
|
|
|
24
|
-
### 1. DECOMPOSE --
|
|
24
|
+
### 1. DECOMPOSE -- Verify Independence
|
|
25
25
|
|
|
26
|
-
List all units
|
|
26
|
+
List all units. For each unit, list the files it will create or modify. Check:
|
|
27
27
|
|
|
28
28
|
- No file appears in more than one unit
|
|
29
|
-
- No
|
|
29
|
+
- No unit's output is another unit's input
|
|
30
30
|
- Each unit's tests pass without the other units' changes
|
|
31
31
|
|
|
32
|
-
If overlap exists
|
|
32
|
+
If overlap exists: merge overlapping units, or extract shared code into a prerequisite unit that runs first (serially) before the parallel batch begins.
|
|
33
33
|
|
|
34
|
-
### 2.
|
|
34
|
+
### 2. SPAWN -- All Agents in One Message Block
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Spawn all agents in a single message. Each agent call must be self-contained -- the prompt includes all context the agent needs without relying on shared state or prior conversation.
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
- Instructions: implement, test, commit, push, create PR
|
|
38
|
+
Agent configuration:
|
|
39
|
+
- `isolation: "worktree"` -- each agent works in an isolated git worktree
|
|
40
|
+
- `run_in_background: true` -- agents run in parallel
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
Each agent prompt must include:
|
|
43
|
+
1. The specific task and acceptance criteria
|
|
44
|
+
2. The exact files it owns (and only those files)
|
|
45
|
+
3. The base branch to branch from
|
|
46
|
+
4. Instructions: implement, run tests, commit, push, create PR
|
|
47
|
+
5. Output contract (see below)
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
### 3. OUTPUT CONTRACT
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
Every agent returns a terminal line that the orchestrator reads:
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
```
|
|
54
|
+
RESULT: PASS — [brief summary]
|
|
55
|
+
RESULT: FAIL — [reason for failure]
|
|
56
|
+
```
|
|
50
57
|
|
|
51
|
-
|
|
52
|
-
|---|------|--------|----|
|
|
53
|
-
| 1 | description | done | #123 |
|
|
54
|
-
| 2 | description | in-progress | -- |
|
|
58
|
+
The line must be the last non-whitespace line of agent output. This is what the orchestrator uses to update the status table -- do not use other formats.
|
|
55
59
|
|
|
56
|
-
|
|
60
|
+
Full handoff output follows the `handoff-contract` skill format.
|
|
57
61
|
|
|
58
|
-
###
|
|
62
|
+
### 4. TRACK -- Status Table
|
|
59
63
|
|
|
60
|
-
|
|
64
|
+
Maintain a status table and re-render it after each agent completion:
|
|
61
65
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
| # | Unit | Branch | Status | PR |
|
|
67
|
+
|---|------|--------|--------|----|
|
|
68
|
+
| 1 | description | feat/unit-1 | done | #123 |
|
|
69
|
+
| 2 | description | feat/unit-2 | in-progress | -- |
|
|
70
|
+
| 3 | description | feat/unit-3 | pending | -- |
|
|
71
|
+
|
|
72
|
+
Statuses: `pending` → `in-progress` → `done` | `failed`
|
|
73
|
+
|
|
74
|
+
Update the table in place -- replace the previous table, do not append a new one each time.
|
|
75
|
+
|
|
76
|
+
### 5. COLLECT -- Handle Results
|
|
77
|
+
|
|
78
|
+
When all agents complete:
|
|
79
|
+
1. List all PRs created
|
|
80
|
+
2. Verify each PR is independently mergeable (no dependency on another PR)
|
|
81
|
+
3. Handle failures:
|
|
82
|
+
- Unit fails tests: spawn a fix agent in the same worktree (up to 2 retries)
|
|
83
|
+
- Merge conflict found: decomposition was wrong -- fix overlap and re-run the conflicting units
|
|
84
|
+
- 3+ failures on one unit: stop and escalate to user with full failure context
|
|
65
85
|
|
|
66
86
|
## Limits
|
|
67
87
|
|
|
68
|
-
- Up to 30 parallel agents
|
|
69
|
-
-
|
|
70
|
-
-
|
|
88
|
+
- Up to 30 parallel agents; typically 3-10 for manageable coordination
|
|
89
|
+
- Each unit must be independently mergeable -- prefer fast-forward, rebase if needed
|
|
90
|
+
- Context budget: each agent consumes its own context window; keep prompts focused
|
|
71
91
|
|
|
72
92
|
## Common Pitfalls
|
|
73
93
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
94
|
+
| Pitfall | Reality |
|
|
95
|
+
|---------|---------|
|
|
96
|
+
| "The overlap is minor" | Minor overlap causes merge conflicts. Extract shared code first. |
|
|
97
|
+
| "We'll merge in dependency order" | Order-dependent merges are not independent. Serialize those units. |
|
|
98
|
+
| "Only 2 units, let's use batch anyway" | Overhead is not worth it. Run sequentially. |
|
|
99
|
+
| "Agents can ask each other for context" | Agents are isolated. All context goes in the spawn prompt. |
|
|
100
|
+
| "I'll fix the prompt after spawning" | Re-spawning restarts work. Write complete prompts before spawning. |
|
|
77
101
|
|
|
78
|
-
## Verification
|
|
102
|
+
## Verification Before Completion
|
|
79
103
|
|
|
80
|
-
Before reporting
|
|
104
|
+
Before reporting batch complete:
|
|
81
105
|
|
|
82
106
|
- [ ] All units touch non-overlapping files
|
|
107
|
+
- [ ] All agents returned `RESULT: PASS`
|
|
83
108
|
- [ ] Each unit was implemented in an isolated worktree
|
|
84
109
|
- [ ] Each unit's tests pass independently
|
|
85
110
|
- [ ] Each unit has its own PR
|
|
86
111
|
- [ ] No PR depends on another PR being merged first
|
|
112
|
+
- [ ] Status table shows `done` for all units
|