@jabworks/condux 0.2.0 → 0.3.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 +27 -29
- package/index.js +21 -0
- package/package.json +6 -4
- package/skills/code-review/SKILL.md +136 -0
- package/skills/code-review/evals/trigger_eval.json +22 -0
- package/skills/discovery/SKILL.md +242 -0
- package/skills/discovery/evals/trigger_eval.json +24 -0
- package/skills/discovery/references/choice-server.js +216 -0
- package/skills/discovery/references/mockup-picker.md +90 -0
- package/skills/discovery/references/package.json +3 -0
- package/skills/draft-plan/SKILL.md +229 -0
- package/skills/draft-plan/evals/trigger_eval.json +22 -0
- package/skills/draft-plan/references/plan-template.md +96 -0
- package/skills/finalize/SKILL.md +123 -0
- package/skills/finalize/evals/trigger_eval.json +22 -0
- package/skills/finalize/references/rationalization-table.md +15 -0
- package/skills/plan-review/SKILL.md +215 -0
- package/skills/plan-review/evals/trigger_eval.json +22 -0
- package/skills/plan-review/references/annotate-server.js +465 -0
- package/skills/plan-review/references/install-codex-hook.sh +112 -0
- package/skills/plan-review/references/package.json +3 -0
- package/skills/plan-review/references/plan-review-template.html +730 -0
- package/skills/preflight/SKILL.md +128 -0
- package/skills/preflight/evals/trigger_eval.json +26 -0
- package/skills/root-cause-analysis/SKILL.md +82 -0
- package/skills/root-cause-analysis/evals/trigger_eval.json +22 -0
- package/skills/subagent-deployment/SKILL.md +105 -0
- package/skills/subagent-deployment/evals/trigger_eval.json +22 -0
- package/skills/subagent-deployment/references/safety-checklist.md +54 -0
- package/skills/subagent-execution/SKILL.md +182 -0
- package/skills/subagent-execution/agents/coder.md +55 -0
- package/skills/subagent-execution/agents/explorer.md +77 -0
- package/skills/subagent-execution/agents/planner.md +101 -0
- package/skills/subagent-execution/agents/researcher.md +78 -0
- package/skills/subagent-execution/evals/trigger_eval.json +22 -0
- package/skills/subagent-execution/references/install-codex-agents.mjs +98 -0
- package/skills/subagent-execution/references/review-package.sh +29 -0
- package/skills/subagent-execution/references/spawn-rules.md +88 -0
- package/skills/subagent-execution/references/task-brief.sh +39 -0
- package/skills/technical-spec/SKILL.md +190 -0
- package/skills/technical-spec/evals/trigger_eval.json +23 -0
- package/skills/technical-spec/references/scaffold.sh +98 -0
- package/skills/technical-spec/references/templates.md +159 -0
- package/skills/test-first-development/SKILL.md +121 -0
- package/skills/test-first-development/evals/trigger_eval.json +22 -0
- package/skills/test-first-development/references/rationalization-table.md +16 -0
- package/skills/workflow/SKILL.md +241 -0
- package/skills/workflow/evals/trigger_eval.json +30 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: preflight
|
|
3
|
+
description: "Lightweight \"am I actually done?\" checklist before calling /finalize. Prevents premature completion — catches skipped steps, missing behavior, and silent regressions. Runs before /finalize at the end of every /workflow tier (automatic on SMALL; the recommended CP-2 choice on MEDIUM/LARGE). Also trigger standalone on \"verify this\", \"am I done?\", or \"preflight\". Not for executing typecheck, lint, format, and tests; use finalize."
|
|
4
|
+
argument-hint: "[task or feature name]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /preflight
|
|
8
|
+
|
|
9
|
+
Before you call done — actually check that you're done.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/preflight # check current task
|
|
15
|
+
/preflight <task name> # explicit scope
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## How It Works
|
|
19
|
+
|
|
20
|
+
Run through this checklist. Every item must be answered honestly — not optimistically.
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
24
|
+
│ PREFLIGHT │
|
|
25
|
+
├──────────────────────────────────────────────────────────────────┤
|
|
26
|
+
│ □ REQUIREMENTS MET │
|
|
27
|
+
│ Can I point to each requirement and show it's implemented? │
|
|
28
|
+
│ Not "I think so" — actually trace it. │
|
|
29
|
+
│ │
|
|
30
|
+
│ □ PLAN STEPS COMPLETE (LARGE tasks) │
|
|
31
|
+
│ Is every task card in the plan marked done? │
|
|
32
|
+
│ Any skipped or partially completed steps? │
|
|
33
|
+
│ │
|
|
34
|
+
│ □ EDGE CASES HANDLED │
|
|
35
|
+
│ What happens with: empty input, null, zero, max value, │
|
|
36
|
+
│ concurrent requests, missing permissions, expired tokens? │
|
|
37
|
+
│ Have the relevant ones been considered? │
|
|
38
|
+
│ │
|
|
39
|
+
│ □ SPEC DRIFT (when a spec exists) │
|
|
40
|
+
│ Locate specs/<slug>/ (same lookup as the /workflow router). │
|
|
41
|
+
│ Compare the diff against each existing concern file — │
|
|
42
|
+
│ both directions count. No spec → N/A, no commentary. │
|
|
43
|
+
│ │
|
|
44
|
+
│ □ NO REGRESSIONS INTRODUCED │
|
|
45
|
+
│ Did the change touch anything outside the stated scope? │
|
|
46
|
+
│ Could it affect adjacent features or shared utilities? │
|
|
47
|
+
│ │
|
|
48
|
+
│ □ NOTHING LEFT BEHIND │
|
|
49
|
+
│ No console.log, no debug code, no TODO comments that │
|
|
50
|
+
│ weren't there before, no commented-out blocks. │
|
|
51
|
+
│ │
|
|
52
|
+
│ □ READY FOR FINALIZE │
|
|
53
|
+
│ All the above are yes → call /finalize │
|
|
54
|
+
│ Any are no → fix first, then re-check │
|
|
55
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Drift Check
|
|
59
|
+
|
|
60
|
+
Runs only when the task has a spec. Locate it the way the `/workflow`
|
|
61
|
+
router does: detect the package root, then check both scopes —
|
|
62
|
+
`<package-root>/specs/<slug>/` and `<git-root>/specs/<slug>/` (fuzzy
|
|
63
|
+
kebab-case match of the task subject; nearest match wins). No spec dir →
|
|
64
|
+
mark `N/A` and move on, without comment.
|
|
65
|
+
|
|
66
|
+
Compare the implementation against each concern file that exists — a
|
|
67
|
+
missing or scaffold-only file makes no claim, skip it:
|
|
68
|
+
|
|
69
|
+
| Concern file | Check the implementation against |
|
|
70
|
+
|---|---|
|
|
71
|
+
| `api.md` | contracts touched — shapes, error forms, external calls |
|
|
72
|
+
| `fields.md` | source-to-UI mappings and transformations |
|
|
73
|
+
| `quirks.md` | edge cases and failure modes the spec says are handled |
|
|
74
|
+
| `implementation.md` | key files and patterns the spec says to follow |
|
|
75
|
+
|
|
76
|
+
**Both directions count.** Code that violates a spec'd contract is drift;
|
|
77
|
+
a spec gone stale because the implementation legitimately evolved is drift
|
|
78
|
+
too. Scope stays at the *task's* spec dir — this is never a whole-`specs/`
|
|
79
|
+
staleness audit.
|
|
80
|
+
|
|
81
|
+
**Findings are a soft gate.** Report each divergence in the findings table
|
|
82
|
+
(see Output) and let the user decide per finding — one batched question,
|
|
83
|
+
not one at a time:
|
|
84
|
+
|
|
85
|
+
- **fix code** — the spec is right; the implementation changes
|
|
86
|
+
- **update spec** — reality is right; update the spec file visibly (never
|
|
87
|
+
silently — that's technical-spec's standing rule)
|
|
88
|
+
- **accept** — knowingly ship the divergence; record it in the output
|
|
89
|
+
|
|
90
|
+
Drift never blocks `/finalize` by itself — but an unreported divergence is
|
|
91
|
+
a preflight failure like any other.
|
|
92
|
+
|
|
93
|
+
## Common Rationalizations
|
|
94
|
+
|
|
95
|
+
| Claim | Reality |
|
|
96
|
+
| ---------------------------------------------- | -------------------------------------------------------- |
|
|
97
|
+
| "I tested it manually, it works" | Manual testing doesn't substitute for /finalize. Run it. |
|
|
98
|
+
| "I'll clean up the debug logs in a follow-up" | They ship. Clean up now. |
|
|
99
|
+
| "The edge cases are unlikely" | They happen in production. Consider them now. |
|
|
100
|
+
| "The plan steps were mostly done" | Mostly done is not done. |
|
|
101
|
+
| "I only changed one line, nothing could break" | One-line changes cause regressions too. |
|
|
102
|
+
|
|
103
|
+
## Output
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
## Preflight: [task name]
|
|
107
|
+
|
|
108
|
+
□ Requirements met ✓ / ✗ [notes]
|
|
109
|
+
□ Plan steps complete ✓ / ✗ [notes] (or N/A for SMALL/MEDIUM)
|
|
110
|
+
□ Edge cases handled ✓ / ✗ [notes]
|
|
111
|
+
□ Spec drift ✓ / ✗ / N/A [notes] (N/A = no spec for this task)
|
|
112
|
+
□ No regressions ✓ / ✗ [notes]
|
|
113
|
+
□ Nothing left behind ✓ / ✗ [notes]
|
|
114
|
+
|
|
115
|
+
→ Ready for /finalize [YES / NO — list blockers if NO]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
When Spec drift is ✗, list the findings and collect one decision per row:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
| concern file | spec says | implementation does | decision |
|
|
122
|
+
|---|---|---|---|
|
|
123
|
+
| api.md | error shape {code, msg} | throws bare string | fix code / update spec / accept |
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Accepted findings stay in the output — they ship knowingly, not silently.
|
|
127
|
+
|
|
128
|
+
If any item is NO: fix it first. Do not proceed to /finalize with known gaps.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[
|
|
2
|
+
{ "query": "am I done?", "should_trigger": true, "expected_skill": "preflight" },
|
|
3
|
+
{ "query": "verify this", "should_trigger": true, "expected_skill": "preflight" },
|
|
4
|
+
{ "query": "did I miss anything before finalize", "should_trigger": true, "expected_skill": "preflight" },
|
|
5
|
+
{ "query": "preflight check", "should_trigger": true, "expected_skill": "preflight" },
|
|
6
|
+
{ "query": "is the feature actually complete", "should_trigger": true, "expected_skill": "preflight" },
|
|
7
|
+
{ "query": "check all the requirements are met", "should_trigger": true, "expected_skill": "preflight" },
|
|
8
|
+
{ "query": "any debug logs left behind?", "should_trigger": true, "expected_skill": "preflight", "accept": ["code-review"] },
|
|
9
|
+
{ "query": "did we cover the edge cases", "should_trigger": true, "expected_skill": "preflight" },
|
|
10
|
+
{ "query": "ready to finalize?", "should_trigger": true, "expected_skill": "preflight" },
|
|
11
|
+
{ "query": "are all the plan steps done", "should_trigger": true, "expected_skill": "preflight" },
|
|
12
|
+
{ "query": "I tested it manually, ship it", "should_trigger": true, "expected_skill": "preflight", "accept": ["finalize"] },
|
|
13
|
+
{ "query": "only changed one line, can we skip the checks", "should_trigger": true, "expected_skill": "preflight" },
|
|
14
|
+
{ "query": "done-ness check b4 finalize", "should_trigger": true, "expected_skill": "preflight" },
|
|
15
|
+
{ "query": "double check my work on this feature", "should_trigger": true, "expected_skill": "preflight", "accept": ["code-review"] },
|
|
16
|
+
{ "query": "run typecheck and the tests now", "should_trigger": true, "expected_skill": "finalize" },
|
|
17
|
+
{ "query": "review the diff quality", "should_trigger": true, "expected_skill": "code-review" },
|
|
18
|
+
{ "query": "am I done shipping this skill to the marketplace", "should_trigger": true, "expected_skill": "toolkit-change-control" },
|
|
19
|
+
{ "query": "does the code still match the spec", "should_trigger": true, "expected_skill": "preflight" },
|
|
20
|
+
{ "query": "check for spec drift", "should_trigger": true, "expected_skill": "preflight" },
|
|
21
|
+
{ "query": "did the implementation diverge from what we specced", "should_trigger": true, "expected_skill": "preflight" },
|
|
22
|
+
{ "query": "update the spec with what we built", "should_trigger": true, "expected_skill": "technical-spec" },
|
|
23
|
+
{ "query": "verify the deployment is healthy in prod", "should_trigger": false, "expected_skill": null },
|
|
24
|
+
{ "query": "airplane preflight checklist template", "should_trigger": false, "expected_skill": null },
|
|
25
|
+
{ "query": "double check this math for me", "should_trigger": false, "expected_skill": null }
|
|
26
|
+
]
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: root-cause-analysis
|
|
3
|
+
description: "Enforces root-cause-first bug investigation — read the error, reproduce it, trace the data flow backward. Never propose a solution before the investigation phase completes. Trigger the moment debugging starts — never proactively — and always before any fix is proposed or any change is made."
|
|
4
|
+
argument-hint: "<error message or bug description>"
|
|
5
|
+
effort: high
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /root-cause-analysis
|
|
9
|
+
|
|
10
|
+
Investigate first. Fix second. Always.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/root-cause-analysis $ARGUMENTS
|
|
16
|
+
/root-cause-analysis "TypeError: cannot read property of undefined in checkout"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## The Four Phases
|
|
20
|
+
|
|
21
|
+
Run in order. Don't skip ahead.
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
25
|
+
│ Phase 1: ROOT CAUSE INVESTIGATION │
|
|
26
|
+
│ - Spec check FIRST: detect package root (walk up from CWD to │
|
|
27
|
+
│ git root, find nearest package manifest). Check: │
|
|
28
|
+
│ <package-root>/specs/ and <git-root>/specs/ │
|
|
29
|
+
│ Match the failing feature/domain (fuzzy kebab-case). │
|
|
30
|
+
│ If found, read quirks.md, api.md, fields.md, │
|
|
31
|
+
│ implementation.md. Note any behavior contradicting the spec.│
|
|
32
|
+
│ - Read the full error message and stack trace │
|
|
33
|
+
│ - Reproduce the failure (confirm it's real, not stale) │
|
|
34
|
+
│ - Check recent changes: git log since last known good state │
|
|
35
|
+
│ - Trace data flow backward from the failure point │
|
|
36
|
+
│ │
|
|
37
|
+
│ Phase 2: PATTERN ANALYSIS │
|
|
38
|
+
│ - Find working examples of the same pattern in the codebase │
|
|
39
|
+
│ - Compare broken path vs working path completely │
|
|
40
|
+
│ - Identify the single difference │
|
|
41
|
+
│ │
|
|
42
|
+
│ Phase 3: HYPOTHESIS + SINGLE-VARIABLE TEST │
|
|
43
|
+
│ - Form one hypothesis │
|
|
44
|
+
│ - Design a test that proves or disproves it │
|
|
45
|
+
│ - Change exactly one thing │
|
|
46
|
+
│ │
|
|
47
|
+
│ Phase 4: IMPLEMENT THE FIX │
|
|
48
|
+
│ - Write a failing test first (if /test-first-development is active) │
|
|
49
|
+
│ - Apply the single targeted fix │
|
|
50
|
+
│ - Verify the fix resolves the root cause, not symptoms │
|
|
51
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Hard Rules
|
|
55
|
+
|
|
56
|
+
**Never propose a solution in Phase 1.** Investigation comes first — no exceptions.
|
|
57
|
+
|
|
58
|
+
**Three strikes.** If three independent fixes have all failed:
|
|
59
|
+
- Stop patching.
|
|
60
|
+
- Step back and question whether the problem is where you think it is.
|
|
61
|
+
- Ask the user before continuing.
|
|
62
|
+
|
|
63
|
+
**One variable at a time.** Multiple simultaneous changes make it impossible to know what fixed what.
|
|
64
|
+
|
|
65
|
+
## Red Flags — Stop and Reassess
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
✗ Proposing solutions before reading the full stack trace
|
|
69
|
+
✗ Changing multiple things at once "to see what works"
|
|
70
|
+
✗ Continuing to patch after 3 failed attempts
|
|
71
|
+
✗ Treating a symptom as the root cause
|
|
72
|
+
✗ Skipping reproduction ("it's obvious what the problem is")
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Integration with Condux
|
|
76
|
+
|
|
77
|
+
- **Phase 4 + /test-first-development active**: write a failing test before the fix
|
|
78
|
+
- **After fixing**: run `/preflight` to confirm nothing regressed
|
|
79
|
+
- **Bug reveals architectural issue**: escalate to `/discovery` before patching further
|
|
80
|
+
- **Multiple unrelated failures**: if 2+ failures are independent (different
|
|
81
|
+
files, no shared cause), use `subagent-deployment` to fix them
|
|
82
|
+
concurrently instead of one at a time
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{ "query": "checkout crashes on empty cart", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
3
|
+
{ "query": "TypeError: cannot read property of undefined in the orders page", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
4
|
+
{ "query": "why does this test fail intermittently", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
5
|
+
{ "query": "debug the 500 on the orders endpoint", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
6
|
+
{ "query": "the app broke after the last deploy", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
7
|
+
{ "query": "trace this bug to its root cause", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
8
|
+
{ "query": "3 fixes failed already, whats the next idea", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
9
|
+
{ "query": "reproduce this issue first before touching anything", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
10
|
+
{ "query": "just patch it quickly, we can investigate later", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
11
|
+
{ "query": "systematic debugging pls", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
12
|
+
{ "query": "regression after the refactor, find the cause", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
13
|
+
{ "query": "why is prod slower since tuesday", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
14
|
+
{ "query": "what does this stack trace mean", "should_trigger": true, "expected_skill": "root-cause-analysis" },
|
|
15
|
+
{ "query": "two unrelated failures showed up, split the work", "should_trigger": true, "expected_skill": "subagent-deployment" },
|
|
16
|
+
{ "query": "add error handling to this function", "should_trigger": true, "expected_skill": "workflow" },
|
|
17
|
+
{ "query": "fix the bug — I already know exactly whats wrong", "should_trigger": true, "expected_skill": "workflow" },
|
|
18
|
+
{ "query": "my toolkit skill isnt triggering", "should_trigger": true, "expected_skill": "toolkit-debugging-playbook" },
|
|
19
|
+
{ "query": "dist looks out of date vs skills/", "should_trigger": true, "expected_skill": "toolkit-debugging-playbook" },
|
|
20
|
+
{ "query": "bug bounty writeup for the blog", "should_trigger": false, "expected_skill": null },
|
|
21
|
+
{ "query": "debug my printer connection", "should_trigger": false, "expected_skill": null }
|
|
22
|
+
]
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: subagent-deployment
|
|
3
|
+
description: "Fan out 2+ independent tasks across named agents (explorer/researcher/planner/coder) in a single message when they share no files and no dependencies. Use for ad-hoc independent work discovered outside a formal plan — unrelated bug fixes, parallel lookups, independent small tasks. Trigger when two or more genuinely independent tasks are on the table — nothing shared between them, no ordering — and any mix of named agents fits. Not for executing an ordered plan task-by-task (that's subagent-execution)."
|
|
4
|
+
argument-hint: "<list of independent tasks>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /subagent-deployment
|
|
8
|
+
|
|
9
|
+
Deploy independent agents at once, not one at a time. For genuinely unrelated work — not for executing an ordered plan.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/subagent-deployment $ARGUMENTS
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Core Principle
|
|
18
|
+
|
|
19
|
+
**Deploy together only when genuinely independent.** Two tasks are independent when neither needs the other's output, they touch no shared files, and integrating both outcomes afterward is unambiguous. Check `references/safety-checklist.md` before every deployment — it's the one place this logic lives; nothing else in condux restates it.
|
|
20
|
+
|
|
21
|
+
## How It Works
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
25
|
+
│ SUBAGENT DEPLOYMENT │
|
|
26
|
+
├──────────────────────────────────────────────────────────────────┤
|
|
27
|
+
│ Step 1: IDENTIFY INDEPENDENT DOMAINS │
|
|
28
|
+
│ Group the tasks in front of you by what's actually │
|
|
29
|
+
│ independent — different files, different subsystems, │
|
|
30
|
+
│ different unrelated bugs. Related tasks (fixing one might │
|
|
31
|
+
│ fix another) stay together as ONE task, not split. │
|
|
32
|
+
│ │
|
|
33
|
+
│ Step 2: RUN THE CHECKLIST │
|
|
34
|
+
│ For each candidate pair/group, check │
|
|
35
|
+
│ references/safety-checklist.md. Any box unchecked → that │
|
|
36
|
+
│ group runs sequentially, not together. │
|
|
37
|
+
│ │
|
|
38
|
+
│ Step 3: PICK THE AGENT PER TASK │
|
|
39
|
+
│ Read-only lookup → explorer or researcher. │
|
|
40
|
+
│ Isolated implementation/fix → coder. │
|
|
41
|
+
│ Never a generic subagent with an injected prompt — only │
|
|
42
|
+
│ condux's four named agents. │
|
|
43
|
+
│ │
|
|
44
|
+
│ Step 4: DISPATCH TOGETHER │
|
|
45
|
+
│ Issue every checklist-cleared dispatch in the SAME message — │
|
|
46
|
+
│ that's what makes them run concurrently. One dispatch per │
|
|
47
|
+
│ response = sequential, regardless of intent. │
|
|
48
|
+
│ │
|
|
49
|
+
│ Step 5: RETRIEVE AND INTEGRATE │
|
|
50
|
+
│ Read every result. Confirm no unexpected overlap or │
|
|
51
|
+
│ conflict before treating the batch as done. You are │
|
|
52
|
+
│ responsible for coherence — agents don't see each other's │
|
|
53
|
+
│ work. │
|
|
54
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Constructing Deployment Prompts
|
|
58
|
+
|
|
59
|
+
Each prompt in the batch needs the same rigor as any single dispatch:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
Good prompt:
|
|
63
|
+
✓ One clearly scoped problem/task, self-contained
|
|
64
|
+
✓ All context needed to understand it (no shared session history)
|
|
65
|
+
✓ Constraints (which files it may touch, what NOT to do)
|
|
66
|
+
✓ Expected output format
|
|
67
|
+
|
|
68
|
+
Bad prompt:
|
|
69
|
+
✗ "Look into the failing tests" (too broad, not scoped to one domain)
|
|
70
|
+
✗ Assumes the agent has seen the other tasks in the batch
|
|
71
|
+
✗ No stated output format
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Example
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
Three unrelated test files failing after a refactor:
|
|
78
|
+
- agent-tool-abort.test.ts (timing issue)
|
|
79
|
+
- batch-completion-behavior.test.ts (event structure bug)
|
|
80
|
+
- tool-approval-race-conditions.test.ts (execution count wrong)
|
|
81
|
+
|
|
82
|
+
Checklist: different files, nothing shared, no dependency between them → clear.
|
|
83
|
+
|
|
84
|
+
Dispatch all three condux:coder agents in the same message:
|
|
85
|
+
Agent 1 (coder): "Fix the 3 failures in agent-tool-abort.test.ts: ..."
|
|
86
|
+
Agent 2 (coder): "Fix the 2 failures in batch-completion-behavior.test.ts: ..."
|
|
87
|
+
Agent 3 (coder): "Fix the 1 failure in tool-approval-race-conditions.test.ts: ..."
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## What Does NOT Happen
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
✗ Splitting related tasks apart just to parallelize them
|
|
94
|
+
✗ Dispatching a generic subagent instead of a named one
|
|
95
|
+
✗ Issuing dispatches one response at a time and calling it "parallel"
|
|
96
|
+
✗ Skipping the safety checklist because the tasks "look independent"
|
|
97
|
+
✗ Using this to execute an ordered plan task-by-task (use
|
|
98
|
+
/subagent-execution instead — this skill is for ad-hoc,
|
|
99
|
+
not-yet-planned independent work)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## See Also
|
|
103
|
+
|
|
104
|
+
- `references/safety-checklist.md` — the canonical parallel-dispatch safety checklist (also referenced by `subagent-execution` and `spawn-rules.md` — this is the one place it lives)
|
|
105
|
+
- `subagent-execution` — for executing an ordered plan task-by-task; also uses this checklist internally when a plan's tasks are independent
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{ "query": "fix these 3 unrelated failing test files at once", "should_trigger": true, "expected_skill": "subagent-deployment" },
|
|
3
|
+
{ "query": "in parallel: look up the stripe api and explore the auth module", "should_trigger": true, "expected_skill": "subagent-deployment" },
|
|
4
|
+
{ "query": "two independent bugs in different packages, handle both", "should_trigger": true, "expected_skill": "subagent-deployment" },
|
|
5
|
+
{ "query": "fan out this research across agents", "should_trigger": true, "expected_skill": "subagent-deployment" },
|
|
6
|
+
{ "query": "batch these lookups together", "should_trigger": true, "expected_skill": "subagent-deployment" },
|
|
7
|
+
{ "query": "run these together, theyre totally unrelated", "should_trigger": true, "expected_skill": "subagent-deployment" },
|
|
8
|
+
{ "query": "is it safe to parallelize these two tasks", "should_trigger": true, "expected_skill": "subagent-deployment", "kind": "in-context" },
|
|
9
|
+
{ "query": "spawn a generic subagent with this custom prompt", "should_trigger": true, "expected_skill": "subagent-deployment" },
|
|
10
|
+
{ "query": "dispatch all three coders in the same message", "should_trigger": true, "expected_skill": "subagent-deployment" },
|
|
11
|
+
{ "query": "these fixes are related, one might fix the other — split them anyway?", "should_trigger": true, "expected_skill": "subagent-deployment", "kind": "in-context" },
|
|
12
|
+
{ "query": "kick off explorer and researcher while I keep working", "should_trigger": true, "expected_skill": "subagent-deployment" },
|
|
13
|
+
{ "query": "whats the safety checklist for parallel dispatch", "should_trigger": true, "expected_skill": "subagent-deployment", "kind": "in-context" },
|
|
14
|
+
{ "query": "integrate the results from the agent batch", "should_trigger": true, "expected_skill": "subagent-deployment", "kind": "in-context" },
|
|
15
|
+
{ "query": "independant tasks, no shared files, go", "should_trigger": true, "expected_skill": "subagent-deployment" },
|
|
16
|
+
{ "query": "execute plan tasks 1 through 6 in order with agents", "should_trigger": true, "expected_skill": "subagent-execution" },
|
|
17
|
+
{ "query": "one small task, just do it yourself", "should_trigger": true, "expected_skill": "workflow" },
|
|
18
|
+
{ "query": "deploy the app to production", "should_trigger": false, "expected_skill": null },
|
|
19
|
+
{ "query": "set up the deployment pipeline for staging", "should_trigger": false, "expected_skill": null },
|
|
20
|
+
{ "query": "parallelize the test suite in ci", "should_trigger": false, "expected_skill": null },
|
|
21
|
+
{ "query": "map reduce over these records", "should_trigger": false, "expected_skill": null }
|
|
22
|
+
]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Parallel Dispatch Safety Checklist
|
|
2
|
+
|
|
3
|
+
The one place this logic lives. `subagent-deployment`,
|
|
4
|
+
`subagent-execution`, and `spawn-rules.md` all point here instead
|
|
5
|
+
of restating it.
|
|
6
|
+
|
|
7
|
+
## Is it safe to dispatch these together?
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
□ Read-only combination? (explorer + explorer, researcher + researcher, or
|
|
11
|
+
explorer + researcher)
|
|
12
|
+
→ Always safe. Nothing writes, nothing to conflict. Skip the rest of
|
|
13
|
+
this checklist.
|
|
14
|
+
|
|
15
|
+
□ Any task in the group uses coder (or planner writing a doc)?
|
|
16
|
+
→ All of the following must hold:
|
|
17
|
+
□ Every write-capable task in the group writes to different files
|
|
18
|
+
than every other task in the group
|
|
19
|
+
□ No task depends on another task's output
|
|
20
|
+
□ No task needs another task's file to exist first
|
|
21
|
+
□ You (the controller) can integrate every result without conflicts
|
|
22
|
+
|
|
23
|
+
If any box is unchecked → that group runs sequentially, not together.
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Constructing the batch
|
|
27
|
+
|
|
28
|
+
- Issue every cleared dispatch in the **same message** — one Agent tool call
|
|
29
|
+
per task, all in one response. Multiple calls in one message run
|
|
30
|
+
concurrently; one call per response runs sequentially, regardless of
|
|
31
|
+
intent.
|
|
32
|
+
- Each dispatch prompt is self-contained — no dispatch should assume the
|
|
33
|
+
agent has seen any other task in the batch, or your session's history.
|
|
34
|
+
- Never dispatch two tasks together just because they're both quick — the
|
|
35
|
+
checklist is about safety (file/dependency conflicts), not speed.
|
|
36
|
+
|
|
37
|
+
## Known limitation
|
|
38
|
+
|
|
39
|
+
No filesystem isolation (no git worktrees) backs this — safety rests
|
|
40
|
+
entirely on the disjoint-files check above, not on the environment
|
|
41
|
+
enforcing it. This is a deliberate, accepted tradeoff, not an oversight: two
|
|
42
|
+
agents genuinely writing to different files carries no real conflict risk
|
|
43
|
+
at the filesystem level; the residual risk is agents running overlapping
|
|
44
|
+
git commands against the same `.git` concurrently, which none of condux's
|
|
45
|
+
current dispatch prompts do (no task is asked to commit — committing is
|
|
46
|
+
always a separate, explicit, controller-only step per this repo's own
|
|
47
|
+
convention).
|
|
48
|
+
|
|
49
|
+
## Model selection
|
|
50
|
+
|
|
51
|
+
Same tiering as sequential dispatch — see
|
|
52
|
+
`subagent-execution/references/spawn-rules.md` → Model Selection.
|
|
53
|
+
Parallelizing doesn't change which model tier a given task needs; it only
|
|
54
|
+
changes how many run at once.
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: subagent-execution
|
|
3
|
+
description: "Execute a plan using named specialist agents. Default is to implement yourself — only spawn when there is a concrete justification. Agents must be pre-defined; never create generic subagents with injected system prompts. Trigger when implementing a LARGE plan with tasks that benefit from agent specialization or parallel exploration — including task briefs, review packages, spawn rules, and resuming an interrupted plan from the `.condux/progress/` ledger (not session-handoff). Not for ad-hoc independent tasks outside a plan (that's subagent-deployment)."
|
|
4
|
+
argument-hint: "<plan file path>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /subagent-execution
|
|
8
|
+
|
|
9
|
+
Execute a plan using specialist agents. Default is to do the work yourself. Spawn only when justified.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/subagent-execution .condux/plans/YYYY-MM-DD-<feature>.md
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Core Principle
|
|
18
|
+
|
|
19
|
+
**You implement by default.** Spawning is an explicit decision with a stated reason — not the default mode of operation.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Before spawning any agent, answer:
|
|
23
|
+
1. Why can't I do this task myself?
|
|
24
|
+
2. Which named agent is right for this task?
|
|
25
|
+
3. Is this task independent enough to parallelize?
|
|
26
|
+
4. What exactly will I pass to the agent?
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If you can't answer all four, don't spawn.
|
|
30
|
+
|
|
31
|
+
## Progress Ledger
|
|
32
|
+
|
|
33
|
+
Conversation memory does not survive compaction. Track task completion in a
|
|
34
|
+
ledger file, not only in todos.
|
|
35
|
+
|
|
36
|
+
- At skill start, check for a ledger: `.condux/progress/<feature-slug>.md`
|
|
37
|
+
(slug inferred kebab-case from the plan's feature name — the same
|
|
38
|
+
convention `draft-plan` uses for its own filename). Tasks listed there as
|
|
39
|
+
complete are DONE — do not re-dispatch them; resume at the first task not
|
|
40
|
+
marked complete.
|
|
41
|
+
- If no ledger exists, create it with a header naming the plan file:
|
|
42
|
+
```
|
|
43
|
+
# Subagent Execution Progress: <feature-slug>
|
|
44
|
+
|
|
45
|
+
Plan: .condux/plans/<plan-file>.md
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
- When a task's review comes back clean, append one line in the same
|
|
49
|
+
message as other bookkeeping: `- [x] Task N: <name> — commits
|
|
50
|
+
<base7>..<head7>, review clean`.
|
|
51
|
+
- The ledger is a recovery aid, not the source of truth — the commits it
|
|
52
|
+
names exist in git even if context no longer remembers creating them.
|
|
53
|
+
After compaction or a new session, trust the ledger and `git log` over
|
|
54
|
+
your own recollection.
|
|
55
|
+
- `.condux/` is gitignored working state (see `/workflow` → Artifacts). If
|
|
56
|
+
it's ever deleted, recover progress from `git log` against the plan's task
|
|
57
|
+
list — and note the plan itself lived there too, so re-derive scope from
|
|
58
|
+
the spec in `specs/` if the plan is gone as well.
|
|
59
|
+
|
|
60
|
+
## How It Works
|
|
61
|
+
|
|
62
|
+
Before Step 1, check the **Progress Ledger** (above) for already-completed tasks and resume there if any exist.
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
66
|
+
│ SUBAGENT EXECUTION │
|
|
67
|
+
├──────────────────────────────────────────────────────────────────┤
|
|
68
|
+
│ Step 1: READ THE PLAN │
|
|
69
|
+
│ Load the plan file. Map out task dependencies. │
|
|
70
|
+
│ Identify which tasks are unblocked (all dependencies complete).│
|
|
71
|
+
│ │
|
|
72
|
+
│ Step 2: FOR EACH TASK │
|
|
73
|
+
│ Ask: can I implement this myself? │
|
|
74
|
+
│ YES → implement directly │
|
|
75
|
+
│ NO → consult spawn-rules.md, pick the right agent, │
|
|
76
|
+
│ construct the delegation prompt, spawn │
|
|
77
|
+
│ │
|
|
78
|
+
│ Step 3: GROUP INTO A WAVE │
|
|
79
|
+
│ Among this round's unblocked tasks needing an agent, check │
|
|
80
|
+
│ references/safety-checklist.md (subagent-deployment skill); │
|
|
81
|
+
│ tasks that clear it form one wave. │
|
|
82
|
+
│ │
|
|
83
|
+
│ Step 4: DISPATCH THE WAVE │
|
|
84
|
+
│ Checklist-cleared tasks get dispatched together in one message;│
|
|
85
|
+
│ otherwise dispatch one at a time. Either way, don't mix in │
|
|
86
|
+
│ unrelated off-plan work until the current wave finishes. │
|
|
87
|
+
│ │
|
|
88
|
+
│ Step 5: RETRIEVE AND INTEGRATE │
|
|
89
|
+
│ Read agent output. Integrate into the codebase. │
|
|
90
|
+
│ You are responsible for coherence — agents don't see each │
|
|
91
|
+
│ other's work. │
|
|
92
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Step 5's "mark task complete" also means appending the ledger line described in **Progress Ledger** — do this in the same message as marking the todo complete.
|
|
96
|
+
|
|
97
|
+
## Parallel Spawning Rules
|
|
98
|
+
|
|
99
|
+
For the full safety checklist (which combinations are safe, why, and how
|
|
100
|
+
to construct the batch), see
|
|
101
|
+
`subagent-deployment/references/safety-checklist.md` — the one place
|
|
102
|
+
this logic lives. Do not restate it here.
|
|
103
|
+
|
|
104
|
+
## Model Selection
|
|
105
|
+
|
|
106
|
+
Before dispatching any `coder` subagent, choose its model explicitly based
|
|
107
|
+
on task complexity — see `references/spawn-rules.md` → Model Selection for
|
|
108
|
+
the tiering table. Never omit the model on a dispatch call; an omitted
|
|
109
|
+
model inherits the session's own model, which defeats the point of
|
|
110
|
+
tiering.
|
|
111
|
+
|
|
112
|
+
## Delegation Prompt Quality
|
|
113
|
+
|
|
114
|
+
When spawning, construct the delegation prompt carefully. The agent gets only what you give it.
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Good delegation prompt includes:
|
|
118
|
+
✓ The specific task from the plan (full text, not a reference)
|
|
119
|
+
✓ Relevant file paths and their current state
|
|
120
|
+
✓ Constraints ("read-only", "no bash", "don't touch auth middleware")
|
|
121
|
+
✓ Expected output format ("return a summary of findings + file paths")
|
|
122
|
+
✓ What NOT to do
|
|
123
|
+
|
|
124
|
+
Bad delegation prompt:
|
|
125
|
+
✗ "Look into the auth stuff"
|
|
126
|
+
✗ A file reference without the content
|
|
127
|
+
✗ No stated output format
|
|
128
|
+
✗ No constraints
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## File Handoffs
|
|
132
|
+
|
|
133
|
+
Pasted plan content and diffs stay resident in context for the rest of the
|
|
134
|
+
session and get re-read on every later turn. Hand them over as files
|
|
135
|
+
instead:
|
|
136
|
+
|
|
137
|
+
- **Task brief:** before dispatching an implementer, run
|
|
138
|
+
`references/task-brief.sh <plan-file> <task-number>` — it extracts the
|
|
139
|
+
task's full text to a scratch file and prints the path. Reference that
|
|
140
|
+
path in the dispatch prompt ("read this first — it is your
|
|
141
|
+
requirements"), plus any interfaces/decisions from earlier tasks the
|
|
142
|
+
brief can't know.
|
|
143
|
+
- **Review package:** record the commit SHA before dispatching the
|
|
144
|
+
implementer (this is BASE — never `HEAD~1`, which silently drops all
|
|
145
|
+
but the last commit of a multi-commit task). After the implementer
|
|
146
|
+
reports DONE, run `references/review-package.sh <BASE> <HEAD>` and pass
|
|
147
|
+
the printed path to the task reviewer instead of pasting the diff.
|
|
148
|
+
- For the final whole-branch review, BASE is the branch's merge-base with
|
|
149
|
+
its parent (e.g. `git merge-base main HEAD`), not the per-task BASE.
|
|
150
|
+
|
|
151
|
+
## Non-Blocking Research Pattern
|
|
152
|
+
|
|
153
|
+
For research/exploration tasks, prefer non-blocking delegation:
|
|
154
|
+
|
|
155
|
+
1. Spawn the `researcher` or `explorer` agent with a clear question
|
|
156
|
+
2. Continue implementing other tasks while it runs
|
|
157
|
+
3. Retrieve the result when you need it
|
|
158
|
+
|
|
159
|
+
Don't block the main session waiting for research that isn't on the critical path.
|
|
160
|
+
|
|
161
|
+
## Codex: Installing the Named Agents
|
|
162
|
+
|
|
163
|
+
Codex plugins cannot bundle agents (the Codex plugin format has no `agents/`
|
|
164
|
+
component) — custom agents live as standalone TOML files under
|
|
165
|
+
`$CODEX_HOME/agents/` (personal) or `<repo>/.codex/agents/` (project).
|
|
166
|
+
Generate or refresh them from the canonical definitions here:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
node "$(find ~/.claude ~/.codex ~/.agents -name install-codex-agents.mjs -path '*subagent-execution*' 2>/dev/null | head -1)"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Re-run after any agent-definition change (agents ship inside the condux
|
|
173
|
+
plugin, but Codex won't load them from there). Existing TOMLs are backed up
|
|
174
|
+
to `*.bak`; your `model` / `model_reasoning_effort` / `sandbox_mode` /
|
|
175
|
+
`nickname_candidates` tuning is preserved. A custom agent named `explorer`
|
|
176
|
+
takes precedence over Codex's built-in `explorer` (documented behavior).
|
|
177
|
+
|
|
178
|
+
## See Also
|
|
179
|
+
|
|
180
|
+
- `references/spawn-rules.md` — agent cost tiers, capability boundaries, decision tree
|
|
181
|
+
- `references/task-brief.sh`, `references/review-package.sh` — file-handoff scripts (see File Handoffs above)
|
|
182
|
+
- `references/install-codex-agents.mjs` — regenerate Codex agent TOMLs from the canonical `agents/*.md`
|