joycraft 0.5.14 → 0.5.15
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 +4 -0
- package/dist/{chunk-QU5VHXMV.js → chunk-JXSFWGIN.js} +231 -18
- package/dist/chunk-JXSFWGIN.js.map +1 -0
- package/dist/cli.js +3 -3
- package/dist/{init-CNZYAFJB.js → init-HKHXC52W.js} +2 -2
- package/dist/{init-autofix-4KNP5RRV.js → init-autofix-ZUMTB4MC.js} +2 -2
- package/dist/{upgrade-KLUUI6RP.js → upgrade-7HZBFVTT.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-QU5VHXMV.js.map +0 -1
- /package/dist/{init-CNZYAFJB.js.map → init-HKHXC52W.js.map} +0 -0
- /package/dist/{init-autofix-4KNP5RRV.js.map → init-autofix-ZUMTB4MC.js.map} +0 -0
- /package/dist/{upgrade-KLUUI6RP.js.map → upgrade-7HZBFVTT.js.map} +0 -0
package/README.md
CHANGED
|
@@ -119,6 +119,10 @@ Tests are the mechanism to autonomy — every spec includes a test plan, and the
|
|
|
119
119
|
|
|
120
120
|
A 2-3 minute risk interview generates safety boundaries, and you choose your git autonomy level. [Read the full guide →](docs/guides/tuning.md)
|
|
121
121
|
|
|
122
|
+
### Token Discipline
|
|
123
|
+
|
|
124
|
+
Joycraft produces file artifacts at every step, so your conversation context is disposable. Clear it between phases to reduce cost and improve output quality. [Read the full guide →](docs/guides/token-discipline.md)
|
|
125
|
+
|
|
122
126
|
### Level 5: The Autonomous Loop
|
|
123
127
|
|
|
124
128
|
Level 5 is where specs go in and validated software comes out — four GitHub Actions workflows, a separate scenarios repo, and two AI agents that can never see each other's work. [Read the full guide →](docs/guides/level-5-autonomy.md)
|
|
@@ -213,7 +213,7 @@ Ask: "Does this match? Comfortable with this approach?" If large/risky, suggest
|
|
|
213
213
|
|
|
214
214
|
## Phase 4: Spec the Fix
|
|
215
215
|
|
|
216
|
-
Write a bug fix spec to \`docs/specs
|
|
216
|
+
Write a bug fix spec to \`docs/specs/<feature-or-area>/bugfix-name.md\`. Use the relevant feature name or area as the subdirectory (e.g., \`auth\`, \`cli\`, \`parser\`). Create the \`docs/specs/<feature-or-area>/\` directory if it doesn't exist.
|
|
217
217
|
|
|
218
218
|
**Why:** Even bug fixes deserve a spec. It forces clarity on what "fixed" means, ensures test-first discipline, and creates a traceable record of the fix.
|
|
219
219
|
|
|
@@ -297,7 +297,7 @@ What changes will fix this? Be specific \u2014 describe the code change, not jus
|
|
|
297
297
|
Tell the user:
|
|
298
298
|
|
|
299
299
|
\`\`\`
|
|
300
|
-
Bug fix spec is ready: docs/specs
|
|
300
|
+
Bug fix spec is ready: docs/specs/<feature-or-area>/bugfix-name.md
|
|
301
301
|
|
|
302
302
|
Summary:
|
|
303
303
|
- Bug: [one sentence]
|
|
@@ -376,7 +376,7 @@ Iterate until the user approves.
|
|
|
376
376
|
|
|
377
377
|
## Step 5: Generate Atomic Specs
|
|
378
378
|
|
|
379
|
-
For each approved row, create \`docs/specs
|
|
379
|
+
For each approved row, create \`docs/specs/<feature-name>/spec-name.md\`. Derive the feature-name from the brief filename (strip the date prefix and \`.md\` \u2014 e.g., \`2026-04-06-token-discipline.md\` \u2192 \`token-discipline\`). If no brief exists, use a user-provided or inferred feature name (slugified to kebab-case). Create the \`docs/specs/<feature-name>/\` directory if it doesn't exist.
|
|
380
380
|
|
|
381
381
|
**Why:** Each spec must be self-contained \u2014 a fresh Claude session should be able to execute it without reading the Feature Brief. Copy relevant constraints and context into each spec.
|
|
382
382
|
|
|
@@ -466,6 +466,8 @@ To execute:
|
|
|
466
466
|
|
|
467
467
|
Ready to start execution?
|
|
468
468
|
\`\`\`
|
|
469
|
+
|
|
470
|
+
**Tip:** Run \`/clear\` before starting the next step. Your artifacts are saved to files \u2014 this conversation context is disposable.
|
|
469
471
|
`,
|
|
470
472
|
"joycraft-design.md": `---
|
|
471
473
|
name: joycraft-design
|
|
@@ -815,6 +817,8 @@ When you're ready to move forward:
|
|
|
815
817
|
- **Mark everything as DRAFT.** The output is a starting point, not a commitment.
|
|
816
818
|
- **Keep it short.** The draft brief should be 1-2 pages max. Capture the essence, not every detail.
|
|
817
819
|
- **Multiple interviews are fine.** The user might run this several times as their thinking evolves. Each creates a new dated draft.
|
|
820
|
+
|
|
821
|
+
**Tip:** Run \`/clear\` before starting the next step. Your artifacts are saved to files \u2014 this conversation context is disposable.
|
|
818
822
|
`,
|
|
819
823
|
"joycraft-lockdown.md": `---
|
|
820
824
|
name: joycraft-lockdown
|
|
@@ -1036,7 +1040,7 @@ Iterate until approved.
|
|
|
1036
1040
|
|
|
1037
1041
|
## Phase 3: Generate Atomic Specs
|
|
1038
1042
|
|
|
1039
|
-
For each row in the decomposition table, create a self-contained spec file at \`docs/specs
|
|
1043
|
+
For each row in the decomposition table, create a self-contained spec file at \`docs/specs/<feature-name>/spec-name.md\`. Derive the feature-name from the brief filename (strip the date prefix and \`.md\` \u2014 e.g., \`2026-04-06-token-discipline.md\` \u2192 \`token-discipline\`). Create the \`docs/specs/<feature-name>/\` directory if it doesn't exist.
|
|
1040
1044
|
|
|
1041
1045
|
**Why:** Each spec must be understandable WITHOUT reading the Feature Brief. This prevents the "Curse of Instructions" \u2014 no spec should require holding the entire feature in context. Copy relevant context into each spec.
|
|
1042
1046
|
|
|
@@ -1126,6 +1130,105 @@ Ready to start?
|
|
|
1126
1130
|
**Why:** A fresh session for execution produces better results. The interview session has too much context noise \u2014 a clean session with just the spec is more focused.
|
|
1127
1131
|
|
|
1128
1132
|
You can also use \`/joycraft-decompose\` to re-decompose a brief if the breakdown needs adjustment, or run \`/joycraft-interview\` first for a lighter brainstorm before committing to the full workflow.
|
|
1133
|
+
|
|
1134
|
+
**Tip:** Run \`/clear\` before starting the next step. Your artifacts are saved to files \u2014 this conversation context is disposable.
|
|
1135
|
+
`,
|
|
1136
|
+
"joycraft-optimize.md": `---
|
|
1137
|
+
name: joycraft-optimize
|
|
1138
|
+
description: Audit your Claude Code or Codex session overhead \u2014 harness file sizes, plugins, MCP servers, hooks \u2014 and report actionable recommendations
|
|
1139
|
+
instructions: 20
|
|
1140
|
+
---
|
|
1141
|
+
|
|
1142
|
+
# Optimize \u2014 Session Overhead Audit
|
|
1143
|
+
|
|
1144
|
+
You are auditing the user's AI development session for token overhead. Produce a conversational diagnostic report \u2014 no files created.
|
|
1145
|
+
|
|
1146
|
+
## Step 1: Detect Platform
|
|
1147
|
+
|
|
1148
|
+
Check which platform is active:
|
|
1149
|
+
- **Claude Code:** Look for \`.claude/\` directory, \`CLAUDE.md\`
|
|
1150
|
+
- **Codex:** Look for \`.agents/\` directory, \`AGENTS.md\`
|
|
1151
|
+
|
|
1152
|
+
If both exist, run both checks. If neither, default to Claude Code checks and note the uncertainty.
|
|
1153
|
+
|
|
1154
|
+
## Step 2: Audit Harness Files
|
|
1155
|
+
|
|
1156
|
+
### Claude Code Path
|
|
1157
|
+
|
|
1158
|
+
1. **CLAUDE.md** \u2014 count lines. Threshold: \u2264200 lines.
|
|
1159
|
+
2. **Skill files** \u2014 glob \`.claude/skills/**/*.md\`. Count lines per file. Threshold: \u2264200 lines each.
|
|
1160
|
+
|
|
1161
|
+
### Codex Path
|
|
1162
|
+
|
|
1163
|
+
1. **AGENTS.md** \u2014 count lines. Threshold: \u2264200 lines.
|
|
1164
|
+
2. **Skill files** \u2014 glob \`.agents/skills/**/*.md\`. Count lines per file. Threshold: \u2264200 lines each.
|
|
1165
|
+
|
|
1166
|
+
## Step 3: Audit Plugins & MCP Servers
|
|
1167
|
+
|
|
1168
|
+
### Claude Code Path
|
|
1169
|
+
|
|
1170
|
+
1. **Installed plugins** \u2014 read \`~/.claude/plugins/installed_plugins.json\`. List plugin names and versions. If not found, report "no plugins file found."
|
|
1171
|
+
2. **Enabled plugins** \u2014 read \`~/.claude/settings.json\`, check \`enabledPlugins\` array. Show enabled vs installed count.
|
|
1172
|
+
3. **MCP servers** \u2014 read \`~/.claude/settings.json\`, count entries under \`mcpServers\`. List server names.
|
|
1173
|
+
|
|
1174
|
+
### Codex Path
|
|
1175
|
+
|
|
1176
|
+
1. **Plugin config** \u2014 read \`~/.codex/config.toml\`. List any plugin toggles. Note: Codex syncs its curated plugin marketplace at startup \u2014 this is a boot cost even if you don't use them.
|
|
1177
|
+
2. **MCP servers** \u2014 check \`~/.codex/config.toml\` for MCP server entries. List server names.
|
|
1178
|
+
|
|
1179
|
+
## Step 4: Audit Hooks (Claude Code Only)
|
|
1180
|
+
|
|
1181
|
+
Read \`.claude/settings.json\` in the project directory. List all hook definitions under the \`hooks\` key \u2014 show the event name and command for each.
|
|
1182
|
+
|
|
1183
|
+
For Codex: note "hook auditing not yet supported on Codex."
|
|
1184
|
+
|
|
1185
|
+
## Step 5: Report
|
|
1186
|
+
|
|
1187
|
+
Organize findings by category. Use pass/warn indicators:
|
|
1188
|
+
|
|
1189
|
+
\`\`\`
|
|
1190
|
+
## Session Overhead Report
|
|
1191
|
+
|
|
1192
|
+
### Harness Files
|
|
1193
|
+
- CLAUDE.md: [N] lines [PASS \u2264200 / WARN >200]
|
|
1194
|
+
- Skills: [N] files, [list any over 200 lines]
|
|
1195
|
+
|
|
1196
|
+
### Plugins
|
|
1197
|
+
- Installed: [N] ([list names])
|
|
1198
|
+
- Enabled: [N] of [M] installed
|
|
1199
|
+
- [If 0: "No plugins \u2014 zero boot cost from plugins."]
|
|
1200
|
+
|
|
1201
|
+
### MCP Servers
|
|
1202
|
+
- Count: [N] ([list names])
|
|
1203
|
+
- [If 0: "No MCP servers \u2014 zero boot cost from servers."]
|
|
1204
|
+
|
|
1205
|
+
### Hooks
|
|
1206
|
+
- [N] hook definitions ([list event names])
|
|
1207
|
+
|
|
1208
|
+
### Recommendations
|
|
1209
|
+
- [Specific, actionable items for anything over threshold]
|
|
1210
|
+
- [e.g., "CLAUDE.md is 312 lines \u2014 consider splitting reference sections into docs/"]
|
|
1211
|
+
- [e.g., "3 MCP servers load at boot \u2014 disable unused ones in settings.json"]
|
|
1212
|
+
\`\`\`
|
|
1213
|
+
|
|
1214
|
+
## Step 6: Further Resources
|
|
1215
|
+
|
|
1216
|
+
End with:
|
|
1217
|
+
|
|
1218
|
+
> For deeper token optimization, see:
|
|
1219
|
+
> - [Nate B Jones's token optimization techniques](https://www.youtube.com/watch?v=bDcgHzCBgmQ)
|
|
1220
|
+
> - [OB1 repo](https://github.com/nate-b-j/OB1) \u2014 Heavy File Ingestion skill and stupid button prompt kit
|
|
1221
|
+
> - [Joycraft's token discipline guide](docs/guides/token-discipline.md)
|
|
1222
|
+
|
|
1223
|
+
## Edge Cases
|
|
1224
|
+
|
|
1225
|
+
| Scenario | Behavior |
|
|
1226
|
+
|----------|----------|
|
|
1227
|
+
| Config files don't exist | Report "not found" for that check, don't error |
|
|
1228
|
+
| No plugins installed | Report 0 plugins \u2014 this is good, say so |
|
|
1229
|
+
| CLAUDE.md/AGENTS.md exactly 200 lines | PASS \u2014 threshold is \u2264200 |
|
|
1230
|
+
| \`~/.claude/\` or \`~/.codex/\` not accessible | Skip user-level checks, note limitation |
|
|
1231
|
+
| Both platforms detected | Run both audits, report separately |
|
|
1129
1232
|
`,
|
|
1130
1233
|
"joycraft-research.md": `---
|
|
1131
1234
|
name: joycraft-research
|
|
@@ -1305,7 +1408,7 @@ Fix any failures before proceeding.
|
|
|
1305
1408
|
|
|
1306
1409
|
## 3. Update Spec Status
|
|
1307
1410
|
|
|
1308
|
-
If working from an atomic spec in \`docs/specs
|
|
1411
|
+
If working from an atomic spec in \`docs/specs/\` (scan recursively \u2014 specs may be in subdirectories like \`docs/specs/<feature-name>/\`):
|
|
1309
1412
|
- All acceptance criteria met \u2014 update status to \`Complete\`
|
|
1310
1413
|
- Partially done \u2014 update status to \`In Progress\`, note what's left
|
|
1311
1414
|
|
|
@@ -1336,6 +1439,8 @@ Session complete.
|
|
|
1336
1439
|
- PR: [opened #N / not yet \u2014 N specs remaining]
|
|
1337
1440
|
- Next: [what the next session should tackle]
|
|
1338
1441
|
\`\`\`
|
|
1442
|
+
|
|
1443
|
+
**Tip:** Run \`/clear\` before starting the next step. Your artifacts are saved to files \u2014 this conversation context is disposable.
|
|
1339
1444
|
`,
|
|
1340
1445
|
"joycraft-tune.md": `---
|
|
1341
1446
|
name: joycraft-tune
|
|
@@ -1362,7 +1467,7 @@ Read CLAUDE.md and explore the project. Score each with specific evidence:
|
|
|
1362
1467
|
|
|
1363
1468
|
| Dimension | What to Check |
|
|
1364
1469
|
|-----------|--------------|
|
|
1365
|
-
| Spec Quality | \`docs/specs/\` \u2014 structured? acceptance criteria? self-contained? |
|
|
1470
|
+
| Spec Quality | \`docs/specs/\` (scan recursively) \u2014 structured? acceptance criteria? self-contained? |
|
|
1366
1471
|
| Spec Granularity | Can each spec be done in one session? |
|
|
1367
1472
|
| Behavioral Boundaries | ALWAYS/ASK FIRST/NEVER sections (or equivalent rules under any heading) |
|
|
1368
1473
|
| Skills & Hooks | \`.claude/skills/\` files, hooks config |
|
|
@@ -1406,6 +1511,8 @@ Show a tailored roadmap: Level 2-5 table, specific next steps based on actual ga
|
|
|
1406
1511
|
- **Rules under non-standard headings:** Give credit for substance.
|
|
1407
1512
|
- **Previous assessment exists:** Read it first. If nothing to upgrade, say so.
|
|
1408
1513
|
- **Non-Joycraft content in CLAUDE.md:** Preserve as-is. Only append.
|
|
1514
|
+
|
|
1515
|
+
**Tip:** Run \`/joycraft-optimize\` to audit your session's token overhead \u2014 plugins, MCP servers, and harness file sizes.
|
|
1409
1516
|
`,
|
|
1410
1517
|
"joycraft-verify.md": `---
|
|
1411
1518
|
name: joycraft-verify
|
|
@@ -1421,9 +1528,9 @@ The user wants independent verification of an implementation. Your job is to fin
|
|
|
1421
1528
|
|
|
1422
1529
|
## Step 1: Find the Spec
|
|
1423
1530
|
|
|
1424
|
-
If the user provided a spec path (e.g., \`/joycraft-verify docs/specs/
|
|
1531
|
+
If the user provided a spec path (e.g., \`/joycraft-verify docs/specs/my-feature/add-widget.md\`), use that path directly.
|
|
1425
1532
|
|
|
1426
|
-
If no path was provided, scan \`docs/specs/\` for spec files. Pick the most recently modified \`.md\` file
|
|
1533
|
+
If no path was provided, scan \`docs/specs/\` recursively for spec files (they may be in subdirectories like \`docs/specs/<feature-name>/\`). Pick the most recently modified \`.md\` file. If \`docs/specs/\` doesn't exist or is empty, tell the user:
|
|
1427
1534
|
|
|
1428
1535
|
> No specs found in \`docs/specs/\`. Please provide a spec path: \`/joycraft-verify path/to/spec.md\`
|
|
1429
1536
|
|
|
@@ -2868,7 +2975,7 @@ jobs:
|
|
|
2868
2975
|
- name: Find changed specs
|
|
2869
2976
|
id: changed
|
|
2870
2977
|
run: |
|
|
2871
|
-
FILES=$(git diff --name-only --diff-filter=AM HEAD~1 HEAD -- 'docs/specs
|
|
2978
|
+
FILES=$(git diff --name-only --diff-filter=AM HEAD~1 HEAD -- 'docs/specs/**/*.md')
|
|
2872
2979
|
echo "files<<EOF" >> "$GITHUB_OUTPUT"
|
|
2873
2980
|
echo "$FILES" >> "$GITHUB_OUTPUT"
|
|
2874
2981
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
|
@@ -3123,7 +3230,7 @@ Ask: "Does this match? Comfortable with this approach?" If large/risky, suggest
|
|
|
3123
3230
|
|
|
3124
3231
|
## Phase 4: Spec the Fix
|
|
3125
3232
|
|
|
3126
|
-
Write a bug fix spec to \`docs/specs
|
|
3233
|
+
Write a bug fix spec to \`docs/specs/<feature-or-area>/bugfix-name.md\`. Use the relevant feature name or area as the subdirectory (e.g., \`auth\`, \`cli\`, \`parser\`). Create the \`docs/specs/<feature-or-area>/\` directory if it doesn't exist.
|
|
3127
3234
|
|
|
3128
3235
|
**Why:** Even bug fixes deserve a spec. It forces clarity on what "fixed" means, ensures test-first discipline, and creates a traceable record of the fix.
|
|
3129
3236
|
|
|
@@ -3178,7 +3285,7 @@ What changes, where?
|
|
|
3178
3285
|
## Phase 5: Hand Off
|
|
3179
3286
|
|
|
3180
3287
|
\`\`\`
|
|
3181
|
-
Bug fix spec is ready: docs/specs
|
|
3288
|
+
Bug fix spec is ready: docs/specs/<feature-or-area>/bugfix-name.md
|
|
3182
3289
|
|
|
3183
3290
|
Summary:
|
|
3184
3291
|
- Bug: [one sentence]
|
|
@@ -3254,7 +3361,7 @@ Iterate until the user approves.
|
|
|
3254
3361
|
|
|
3255
3362
|
## Step 5: Generate Atomic Specs
|
|
3256
3363
|
|
|
3257
|
-
For each approved row, create \`docs/specs
|
|
3364
|
+
For each approved row, create \`docs/specs/<feature-name>/spec-name.md\`. Derive the feature-name from the brief filename (strip the date prefix and \`.md\` \u2014 e.g., \`2026-04-06-token-discipline.md\` \u2192 \`token-discipline\`). If no brief exists, use a user-provided or inferred feature name (slugified to kebab-case). Create the \`docs/specs/<feature-name>/\` directory if it doesn't exist.
|
|
3258
3365
|
|
|
3259
3366
|
**Why:** Each spec must be self-contained \u2014 a fresh session should be able to execute it without reading the Feature Brief. Copy relevant constraints and context into each spec.
|
|
3260
3367
|
|
|
@@ -3344,6 +3451,8 @@ To execute:
|
|
|
3344
3451
|
|
|
3345
3452
|
Ready to start execution?
|
|
3346
3453
|
\`\`\`
|
|
3454
|
+
|
|
3455
|
+
**Tip:** Run \`/new\` before starting the next step. Your artifacts are saved to files \u2014 this conversation context is disposable.
|
|
3347
3456
|
`,
|
|
3348
3457
|
"joycraft-design.md": `---
|
|
3349
3458
|
name: joycraft-design
|
|
@@ -3671,6 +3780,8 @@ When you're ready to move forward:
|
|
|
3671
3780
|
- **Mark everything as DRAFT.** The output is a starting point, not a commitment.
|
|
3672
3781
|
- **Keep it short.** The draft brief should be 1-2 pages max. Capture the essence, not every detail.
|
|
3673
3782
|
- **Multiple interviews are fine.** The user might run this several times as their thinking evolves. Each creates a new dated draft.
|
|
3783
|
+
|
|
3784
|
+
**Tip:** Run \`/new\` before starting the next step. Your artifacts are saved to files \u2014 this conversation context is disposable.
|
|
3674
3785
|
`,
|
|
3675
3786
|
"joycraft-lockdown.md": `---
|
|
3676
3787
|
name: joycraft-lockdown
|
|
@@ -3890,7 +4001,7 @@ Iterate until approved.
|
|
|
3890
4001
|
|
|
3891
4002
|
## Phase 3: Generate Atomic Specs
|
|
3892
4003
|
|
|
3893
|
-
For each row in the decomposition table, create a self-contained spec file at \`docs/specs
|
|
4004
|
+
For each row in the decomposition table, create a self-contained spec file at \`docs/specs/<feature-name>/spec-name.md\`. Derive the feature-name from the brief filename (strip the date prefix and \`.md\` \u2014 e.g., \`2026-04-06-token-discipline.md\` \u2192 \`token-discipline\`). Create the \`docs/specs/<feature-name>/\` directory if it doesn't exist.
|
|
3894
4005
|
|
|
3895
4006
|
**Why:** Each spec must be understandable WITHOUT reading the Feature Brief. This prevents the "Curse of Instructions" \u2014 no spec should require holding the entire feature in context. Copy relevant context into each spec.
|
|
3896
4007
|
|
|
@@ -3980,6 +4091,104 @@ Ready to start?
|
|
|
3980
4091
|
**Why:** A fresh session for execution produces better results. The interview session has too much context noise \u2014 a clean session with just the spec is more focused.
|
|
3981
4092
|
|
|
3982
4093
|
You can also use \`$joycraft-decompose\` to re-decompose a brief if the breakdown needs adjustment, or run \`$joycraft-interview\` first for a lighter brainstorm before committing to the full workflow.
|
|
4094
|
+
|
|
4095
|
+
**Tip:** Run \`/new\` before starting the next step. Your artifacts are saved to files \u2014 this conversation context is disposable.
|
|
4096
|
+
`,
|
|
4097
|
+
"joycraft-optimize.md": `---
|
|
4098
|
+
name: joycraft-optimize
|
|
4099
|
+
description: Audit your Claude Code or Codex session overhead \u2014 harness file sizes, plugins, MCP servers, hooks \u2014 and report actionable recommendations
|
|
4100
|
+
---
|
|
4101
|
+
|
|
4102
|
+
# Optimize \u2014 Session Overhead Audit
|
|
4103
|
+
|
|
4104
|
+
You are auditing the user's AI development session for token overhead. Produce a conversational diagnostic report \u2014 no files created.
|
|
4105
|
+
|
|
4106
|
+
## Step 1: Detect Platform
|
|
4107
|
+
|
|
4108
|
+
Check which platform is active:
|
|
4109
|
+
- **Claude Code:** Look for \`.claude/\` directory, \`CLAUDE.md\`
|
|
4110
|
+
- **Codex:** Look for \`.agents/\` directory, \`AGENTS.md\`
|
|
4111
|
+
|
|
4112
|
+
If both exist, run both checks. If neither, default to Claude Code checks and note the uncertainty.
|
|
4113
|
+
|
|
4114
|
+
## Step 2: Audit Harness Files
|
|
4115
|
+
|
|
4116
|
+
### Claude Code Path
|
|
4117
|
+
|
|
4118
|
+
1. **CLAUDE.md** \u2014 count lines. Threshold: \u2264200 lines.
|
|
4119
|
+
2. **Skill files** \u2014 glob \`.claude/skills/**/*.md\`. Count lines per file. Threshold: \u2264200 lines each.
|
|
4120
|
+
|
|
4121
|
+
### Codex Path
|
|
4122
|
+
|
|
4123
|
+
1. **AGENTS.md** \u2014 count lines. Threshold: \u2264200 lines.
|
|
4124
|
+
2. **Skill files** \u2014 glob \`.agents/skills/**/*.md\`. Count lines per file. Threshold: \u2264200 lines each.
|
|
4125
|
+
|
|
4126
|
+
## Step 3: Audit Plugins & MCP Servers
|
|
4127
|
+
|
|
4128
|
+
### Claude Code Path
|
|
4129
|
+
|
|
4130
|
+
1. **Installed plugins** \u2014 read \`~/.claude/plugins/installed_plugins.json\`. List plugin names and versions. If not found, report "no plugins file found."
|
|
4131
|
+
2. **Enabled plugins** \u2014 read \`~/.claude/settings.json\`, check \`enabledPlugins\` array. Show enabled vs installed count.
|
|
4132
|
+
3. **MCP servers** \u2014 read \`~/.claude/settings.json\`, count entries under \`mcpServers\`. List server names.
|
|
4133
|
+
|
|
4134
|
+
### Codex Path
|
|
4135
|
+
|
|
4136
|
+
1. **Plugin config** \u2014 read \`~/.codex/config.toml\`. List any plugin toggles. Note: Codex syncs its curated plugin marketplace at startup \u2014 this is a boot cost even if you don't use them.
|
|
4137
|
+
2. **MCP servers** \u2014 check \`~/.codex/config.toml\` for MCP server entries. List server names.
|
|
4138
|
+
|
|
4139
|
+
## Step 4: Audit Hooks (Claude Code Only)
|
|
4140
|
+
|
|
4141
|
+
Read \`.claude/settings.json\` in the project directory. List all hook definitions under the \`hooks\` key \u2014 show the event name and command for each.
|
|
4142
|
+
|
|
4143
|
+
For Codex: note "hook auditing not yet supported on Codex."
|
|
4144
|
+
|
|
4145
|
+
## Step 5: Report
|
|
4146
|
+
|
|
4147
|
+
Organize findings by category. Use pass/warn indicators:
|
|
4148
|
+
|
|
4149
|
+
\`\`\`
|
|
4150
|
+
## Session Overhead Report
|
|
4151
|
+
|
|
4152
|
+
### Harness Files
|
|
4153
|
+
- CLAUDE.md/AGENTS.md: [N] lines [PASS \u2264200 / WARN >200]
|
|
4154
|
+
- Skills: [N] files, [list any over 200 lines]
|
|
4155
|
+
|
|
4156
|
+
### Plugins
|
|
4157
|
+
- Installed: [N] ([list names])
|
|
4158
|
+
- Enabled: [N] of [M] installed
|
|
4159
|
+
- [If 0: "No plugins \u2014 zero boot cost from plugins."]
|
|
4160
|
+
|
|
4161
|
+
### MCP Servers
|
|
4162
|
+
- Count: [N] ([list names])
|
|
4163
|
+
- [If 0: "No MCP servers \u2014 zero boot cost from servers."]
|
|
4164
|
+
|
|
4165
|
+
### Hooks
|
|
4166
|
+
- [N] hook definitions ([list event names])
|
|
4167
|
+
|
|
4168
|
+
### Recommendations
|
|
4169
|
+
- [Specific, actionable items for anything over threshold]
|
|
4170
|
+
- [e.g., "AGENTS.md is 312 lines \u2014 consider splitting reference sections into docs/"]
|
|
4171
|
+
- [e.g., "3 MCP servers load at boot \u2014 disable unused ones in config"]
|
|
4172
|
+
\`\`\`
|
|
4173
|
+
|
|
4174
|
+
## Step 6: Further Resources
|
|
4175
|
+
|
|
4176
|
+
End with:
|
|
4177
|
+
|
|
4178
|
+
> For deeper token optimization, see:
|
|
4179
|
+
> - [Nate B Jones's token optimization techniques](https://www.youtube.com/watch?v=bDcgHzCBgmQ)
|
|
4180
|
+
> - [OB1 repo](https://github.com/nate-b-j/OB1) \u2014 Heavy File Ingestion skill and stupid button prompt kit
|
|
4181
|
+
> - [Joycraft's token discipline guide](docs/guides/token-discipline.md)
|
|
4182
|
+
|
|
4183
|
+
## Edge Cases
|
|
4184
|
+
|
|
4185
|
+
| Scenario | Behavior |
|
|
4186
|
+
|----------|----------|
|
|
4187
|
+
| Config files don't exist | Report "not found" for that check, don't error |
|
|
4188
|
+
| No plugins installed | Report 0 plugins \u2014 this is good, say so |
|
|
4189
|
+
| CLAUDE.md/AGENTS.md exactly 200 lines | PASS \u2014 threshold is \u2264200 |
|
|
4190
|
+
| \`~/.claude/\` or \`~/.codex/\` not accessible | Skip user-level checks, note limitation |
|
|
4191
|
+
| Both platforms detected | Run both audits, report separately |
|
|
3983
4192
|
`,
|
|
3984
4193
|
"joycraft-research.md": `---
|
|
3985
4194
|
name: joycraft-research
|
|
@@ -4123,7 +4332,7 @@ Fix any failures before proceeding.
|
|
|
4123
4332
|
|
|
4124
4333
|
## 3. Update Spec Status
|
|
4125
4334
|
|
|
4126
|
-
If working from an atomic spec in \`docs/specs
|
|
4335
|
+
If working from an atomic spec in \`docs/specs/\` (scan recursively \u2014 specs may be in subdirectories like \`docs/specs/<feature-name>/\`):
|
|
4127
4336
|
- All acceptance criteria met \u2014 update status to \`Complete\`
|
|
4128
4337
|
- Partially done \u2014 update status to \`In Progress\`, note what's left
|
|
4129
4338
|
|
|
@@ -4154,6 +4363,8 @@ Session complete.
|
|
|
4154
4363
|
- PR: [opened #N / not yet \u2014 N specs remaining]
|
|
4155
4364
|
- Next: [what the next session should tackle]
|
|
4156
4365
|
\`\`\`
|
|
4366
|
+
|
|
4367
|
+
**Tip:** Run \`/new\` before starting the next step. Your artifacts are saved to files \u2014 this conversation context is disposable.
|
|
4157
4368
|
`,
|
|
4158
4369
|
"joycraft-tune.md": `---
|
|
4159
4370
|
name: joycraft-tune
|
|
@@ -4179,7 +4390,7 @@ Read CLAUDE.md and explore the project. Score each with specific evidence:
|
|
|
4179
4390
|
|
|
4180
4391
|
| Dimension | What to Check |
|
|
4181
4392
|
|-----------|--------------|
|
|
4182
|
-
| Spec Quality | \`docs/specs/\` \u2014 structured? acceptance criteria? self-contained? |
|
|
4393
|
+
| Spec Quality | \`docs/specs/\` (scan recursively) \u2014 structured? acceptance criteria? self-contained? |
|
|
4183
4394
|
| Spec Granularity | Can each spec be done in one session? |
|
|
4184
4395
|
| Behavioral Boundaries | ALWAYS/ASK FIRST/NEVER sections (or equivalent rules under any heading) |
|
|
4185
4396
|
| Skills & Hooks | \`.agents/skills/\` files, hooks config |
|
|
@@ -4223,6 +4434,8 @@ Show a tailored roadmap: Level 2-5 table, specific next steps based on actual ga
|
|
|
4223
4434
|
- **Rules under non-standard headings:** Give credit for substance.
|
|
4224
4435
|
- **Previous assessment exists:** Read it first. If nothing to upgrade, say so.
|
|
4225
4436
|
- **Non-Joycraft content in CLAUDE.md:** Preserve as-is. Only append.
|
|
4437
|
+
|
|
4438
|
+
**Tip:** Run \`$joycraft-optimize\` to audit your session's token overhead \u2014 plugins, MCP servers, and harness file sizes.
|
|
4226
4439
|
`,
|
|
4227
4440
|
"joycraft-verify.md": `---
|
|
4228
4441
|
name: joycraft-verify
|
|
@@ -4237,9 +4450,9 @@ The user wants independent verification of an implementation. Your job is to fin
|
|
|
4237
4450
|
|
|
4238
4451
|
## Step 1: Find the Spec
|
|
4239
4452
|
|
|
4240
|
-
If the user provided a spec path (e.g., \`$joycraft-verify docs/specs/
|
|
4453
|
+
If the user provided a spec path (e.g., \`$joycraft-verify docs/specs/my-feature/add-widget.md\`), use that path directly.
|
|
4241
4454
|
|
|
4242
|
-
If no path was provided, scan \`docs/specs/\` for spec files. Pick the most recently modified \`.md\` file
|
|
4455
|
+
If no path was provided, scan \`docs/specs/\` recursively for spec files (they may be in subdirectories like \`docs/specs/<feature-name>/\`). Pick the most recently modified \`.md\` file. If \`docs/specs/\` doesn't exist or is empty, tell the user:
|
|
4243
4456
|
|
|
4244
4457
|
> No specs found in \`docs/specs/\`. Please provide a spec path: \`$joycraft-verify path/to/spec.md\`
|
|
4245
4458
|
|
|
@@ -4376,4 +4589,4 @@ export {
|
|
|
4376
4589
|
TEMPLATES,
|
|
4377
4590
|
CODEX_SKILLS
|
|
4378
4591
|
};
|
|
4379
|
-
//# sourceMappingURL=chunk-
|
|
4592
|
+
//# sourceMappingURL=chunk-JXSFWGIN.js.map
|