claude-code-autoconfig 1.0.134 → 1.0.136

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.
@@ -858,35 +858,20 @@
858
858
  <span class="tree-folder-icon">📁</span>
859
859
  <span class="folder">.claude</span>
860
860
  </div>
861
- <div class="tree-item indent-2 folder-row hidden collapsed" data-info="agents" data-folder="agents" data-parent="claude-dir">
862
- <span class="tree-chevron">›</span>
863
- <span class="tree-folder-icon">📁</span>
864
- <span class="folder">agents</span>
865
- </div>
866
- <div class="tree-item indent-3 hidden" data-info="create-retro-item" data-parent="agents">
867
- <span class="tree-spacer"></span>
868
- <span class="tree-file-icon">📄</span>
869
- <span class="file">create-retro-item.md</span>
870
- </div>
871
- <div class="tree-item indent-3 hidden" data-info="docs-refresh-agent" data-parent="agents">
872
- <span class="tree-spacer"></span>
873
- <span class="tree-file-icon">📄</span>
874
- <span class="file">docs-refresh.md</span>
875
- </div>
876
861
  <div class="tree-item indent-2 folder-row hidden collapsed" data-info="commands" data-folder="commands" data-parent="claude-dir">
877
862
  <span class="tree-chevron">›</span>
878
863
  <span class="tree-folder-icon">📁</span>
879
864
  <span class="folder">commands</span>
880
865
  </div>
881
- <div class="tree-item indent-3 hidden" data-info="autoconfig" data-parent="commands">
866
+ <div class="tree-item indent-3 hidden" data-info="autoconfig-update" data-parent="commands">
882
867
  <span class="tree-spacer"></span>
883
868
  <span class="tree-file-icon">📄</span>
884
- <span class="file">autoconfig.md</span>
869
+ <span class="file">autoconfig-update.md</span>
885
870
  </div>
886
- <div class="tree-item indent-3 hidden" data-info="autoconfig-update" data-parent="commands">
871
+ <div class="tree-item indent-3 hidden" data-info="autoconfig" data-parent="commands">
887
872
  <span class="tree-spacer"></span>
888
873
  <span class="tree-file-icon">📄</span>
889
- <span class="file">autoconfig-update.md</span>
874
+ <span class="file">autoconfig.md</span>
890
875
  </div>
891
876
  <div class="tree-item indent-3 hidden" data-info="commit-and-push" data-parent="commands">
892
877
  <span class="tree-spacer"></span>
@@ -903,12 +888,17 @@
903
888
  <span class="tree-file-icon">📄</span>
904
889
  <span class="file">gls.md</span>
905
890
  </div>
891
+ <div class="tree-item indent-3 hidden" data-info="publish" data-parent="commands">
892
+ <span class="tree-spacer"></span>
893
+ <span class="tree-file-icon">📄</span>
894
+ <span class="file">publish.md</span>
895
+ </div>
906
896
  <div class="tree-item indent-3 hidden" data-info="recover-context" data-parent="commands">
907
897
  <span class="tree-spacer"></span>
908
898
  <span class="tree-file-icon">📄</span>
909
899
  <span class="file">recover-context.md</span>
910
900
  </div>
911
- <div class="tree-item indent-3 hidden" data-info="docs-cmd" data-parent="commands">
901
+ <div class="tree-item indent-3 hidden" data-info="show-docs" data-parent="commands">
912
902
  <span class="tree-spacer"></span>
913
903
  <span class="tree-file-icon">📄</span>
914
904
  <span class="file">show-docs.md</span>
@@ -923,12 +913,27 @@
923
913
  <span class="tree-file-icon">📄</span>
924
914
  <span class="file">test.md</span>
925
915
  </div>
916
+ <div class="tree-item indent-2 folder-row hidden collapsed" data-info="agents" data-folder="agents" data-parent="claude-dir">
917
+ <span class="tree-chevron">›</span>
918
+ <span class="tree-folder-icon">📁</span>
919
+ <span class="folder">agents</span>
920
+ </div>
921
+ <div class="tree-item indent-3 hidden" data-info="create-retro-item-agent" data-parent="agents">
922
+ <span class="tree-spacer"></span>
923
+ <span class="tree-file-icon">📄</span>
924
+ <span class="file">create-retro-item.md</span>
925
+ </div>
926
+ <div class="tree-item indent-3 hidden" data-info="docs-refresh-agent" data-parent="agents">
927
+ <span class="tree-spacer"></span>
928
+ <span class="tree-file-icon">📄</span>
929
+ <span class="file">docs-refresh.md</span>
930
+ </div>
926
931
  <div class="tree-item indent-2 folder-row hidden collapsed" data-info="feedback" data-folder="feedback" data-parent="claude-dir">
927
932
  <span class="tree-chevron">›</span>
928
933
  <span class="tree-folder-icon">📁</span>
929
934
  <span class="folder">feedback</span>
930
935
  </div>
931
- <div class="tree-item indent-3 hidden" data-info="feedback-template" data-parent="feedback">
936
+ <div class="tree-item indent-3 hidden" data-info="feedback-feedback" data-parent="feedback">
932
937
  <span class="tree-spacer"></span>
933
938
  <span class="tree-file-icon">📄</span>
934
939
  <span class="file">FEEDBACK.md</span>
@@ -968,16 +973,6 @@
968
973
  <span class="tree-folder-icon">📁</span>
969
974
  <span class="folder">rules</span>
970
975
  </div>
971
- <div class="tree-item indent-2 folder-row hidden collapsed" data-info="updates" data-folder="updates" data-parent="claude-dir">
972
- <span class="tree-chevron">›</span>
973
- <span class="tree-folder-icon">📁</span>
974
- <span class="folder">updates</span>
975
- </div>
976
- <div class="tree-item indent-3 hidden" data-info="updates" data-parent="updates">
977
- <span class="tree-spacer"></span>
978
- <span class="tree-file-icon">📄</span>
979
- <span class="file">NNN-*.md</span>
980
- </div>
981
976
  <div class="tree-item indent-2 hidden" data-info="mcp" data-parent="claude-dir">
982
977
  <span class="tree-spacer"></span>
983
978
  <span class="tree-file-icon">🔌</span>
@@ -988,13 +983,7 @@
988
983
  <span class="tree-file-icon">⚙️</span>
989
984
  <span class="file">settings.json</span>
990
985
  </div>
991
- <div class="tree-item indent-1" data-info="claude-md" data-parent="root">
992
- <span class="tree-spacer"></span>
993
- <span class="tree-file-icon">📄</span>
994
- <span class="file">CLAUDE.md</span>
995
986
  </div>
996
- </div>
997
- <div class="tree-footer-hint">Double-click any file to preview contents</div>
998
987
  </div>
999
988
  <div class="info-side">
1000
989
  <div class="info-panel" id="infoPanel">
@@ -1274,116 +1263,121 @@
1274
1263
  title: '.claude/ Directory',
1275
1264
  desc: 'Commands, rules, settings, and these docs. Keeps configuration organized as your project grows.'
1276
1265
  },
1277
- 'settings': {
1278
- title: 'settings.json',
1279
- desc: 'Permissions, security, and hooks. Controls which commands Claude can run and which files it can access.',
1280
- trigger: 'Claude Code loads this automatically at the start of every session'
1281
- },
1282
- 'mcp': {
1283
- title: '.mcp.json',
1284
- desc: 'MCP (Model Context Protocol) server configuration. Add your MCP server configs here when you\'re ready.<br><br>See <a href="https://docs.anthropic.com/en/docs/claude-code/mcp" target="_blank" style="color: var(--accent-cyan);">MCP documentation</a> for setup instructions.'
1285
- },
1286
- 'agents': {
1287
- title: 'agents/',
1288
- desc: 'Custom agent definitions for specialized tasks. Agents are autonomous workers that can be spawned to handle complex operations independently.'
1289
- },
1290
- 'create-retro-item': {
1291
- title: 'create-retro-item.md',
1292
- desc: '(Experimental) Agent that creates structured retro items for tech debt tracking. Used by the /enable-retro feature.'
1293
- },
1294
- 'docs-refresh-agent': {
1295
- title: 'docs-refresh.md',
1296
- desc: 'Agent that refreshes and updates the interactive docs after configuration changes.'
1266
+ 'rules': {
1267
+ title: 'rules/',
1268
+ desc: 'Path-scoped context that loads when Claude works on matching files.'
1297
1269
  },
1298
1270
  'commands': {
1299
1271
  title: 'commands/',
1300
1272
  desc: 'On-demand workflows you trigger with <code>/name</code>. Each .md file becomes a <a href="https://docs.anthropic.com/en/docs/claude-code/slash-commands" target="_blank" style="color: var(--accent-cyan);">slash command</a>.'
1301
1273
  },
1302
- 'enable-retro': {
1303
- title: 'enable-retro.md',
1304
- desc: '(Experimental) Enables tech debt tracking. Creates <code>.claude/retro/</code> directory and configures Claude to log improvement opportunities as structured story files.',
1305
- trigger: '/enable-retro'
1306
- },
1307
- 'feedback': {
1308
- title: 'feedback/',
1309
- desc: 'Team-maintained corrections and guidance for Claude. Add notes here when Claude does something wrong — it learns for next time. This directory persists across <code>/autoconfig</code> runs.'
1310
- },
1311
- 'feedback-template': {
1312
- title: 'FEEDBACK.md',
1313
- desc: 'Starter template for team feedback. Add dated entries when Claude makes mistakes — include what went wrong and the correct approach. Claude reads this on every session.'
1274
+ 'agents': {
1275
+ title: 'agents/',
1276
+ desc: 'Reusable agent definitions that Claude can invoke for specialized tasks.'
1314
1277
  },
1315
1278
  'hooks': {
1316
1279
  title: 'hooks/',
1317
- desc: 'Executable scripts that run in response to Claude Code events. Unlike commands (which are prompts you invoke), hooks trigger automatically based on tool usage patterns.'
1280
+ desc: 'Executable hook scripts that trigger on Claude Code events like PostToolUse.'
1318
1281
  },
1319
- 'feedback-rule-check-hook': {
1320
- title: 'feedback-rule-check.js',
1321
- desc: 'Validates that Claude never writes to FEEDBACK.md. Runs as a PostToolUse hook on Write/Edit operations.',
1322
- trigger: 'PostToolUse on Write|Edit'
1323
- },
1324
- 'format-hook': {
1325
- title: 'format.js',
1326
- desc: 'Runs the project formatter after Write/Edit operations on source files. Filters by file extension and skips generated directories like node_modules.',
1327
- trigger: 'PostToolUse on Write|Edit (JS/TS projects only)'
1282
+ 'feedback': {
1283
+ title: 'feedback/',
1284
+ desc: 'Team-maintained corrections and guidance for Claude. Add notes here when Claude does something wrong it learns for next time. This directory persists across <code>/autoconfig</code> runs.'
1328
1285
  },
1329
- 'migrate-feedback-hook': {
1330
- title: 'migrate-feedback.js',
1331
- desc: 'Migrates custom content from FEEDBACK.md to the Discoveries section in CLAUDE.md. Runs as a PostToolUse hook.',
1332
- trigger: 'PostToolUse on Write|Edit'
1286
+ 'autoconfig-update': {
1287
+ title: 'autoconfig-update.md',
1288
+ desc: 'Manages and installs updates to Claude Code configuration.',
1289
+ trigger: '/autoconfig-update'
1333
1290
  },
1334
1291
  'autoconfig': {
1335
1292
  title: 'autoconfig.md',
1336
1293
  desc: 'The command you just ran. Analyzes your project and populates CLAUDE.md with real context. Re-run anytime your stack changes.',
1337
1294
  trigger: '/autoconfig'
1338
1295
  },
1339
- 'autoconfig-update': {
1340
- title: 'autoconfig-update.md',
1341
- desc: 'Checks for and installs configuration updates. Tracks which updates have been applied and only runs new ones.',
1342
- trigger: '/autoconfig-update'
1296
+ 'commit-and-push': {
1297
+ title: 'commit-and-push.md',
1298
+ desc: 'Runs tests, then stages all changes, generates a conventional commit message, commits, and pushes.',
1299
+ trigger: '/commit-and-push'
1300
+ },
1301
+ 'enable-retro': {
1302
+ title: 'enable-retro.md',
1303
+ desc: '(Experimental) Enable Claude to log tech debt it encounters into .claude/retro.',
1304
+ trigger: '/enable-retro'
1343
1305
  },
1344
1306
  'gls': {
1345
1307
  title: 'gls.md',
1346
- desc: 'Gets and displays your latest screenshot(s) for visual context. Auto-detects your screenshot directory on first use.',
1308
+ desc: 'gls.md in commands/',
1347
1309
  trigger: '/gls'
1348
1310
  },
1311
+ 'publish': {
1312
+ title: 'publish.md',
1313
+ desc: 'Runs tests, bumps version, commits, and publishes to npm.',
1314
+ trigger: '/publish'
1315
+ },
1349
1316
  'recover-context': {
1350
1317
  title: 'recover-context.md',
1351
- desc: 'Recovers conversation context after compaction. Reads the session transcript to rebuild awareness of what was discussed and decided.',
1318
+ desc: 'Recovers conversation context from the session transcript after compaction.',
1352
1319
  trigger: '/recover-context'
1353
1320
  },
1321
+ 'show-docs': {
1322
+ title: 'show-docs.md',
1323
+ desc: 'Opens the interactive docs in your browser.',
1324
+ trigger: '/show-docs'
1325
+ },
1354
1326
  'sync-claude-md': {
1355
1327
  title: 'sync-claude-md.md',
1356
- desc: 'Re-analyzes your project and updates CLAUDE.md to reflect current state. Run when your stack changes significantly.',
1328
+ desc: 'Re-analyzes your project and updates CLAUDE.md to reflect current state.',
1357
1329
  trigger: '/sync-claude-md'
1358
1330
  },
1359
- 'docs-cmd': {
1360
- title: 'show-docs.md',
1361
- desc: 'Opens this interactive docs in your browser. Auto-syncs any changed files before opening.',
1362
- trigger: '/show-docs'
1363
- },
1364
1331
  'test': {
1365
1332
  title: 'test.md',
1366
1333
  desc: 'Runs your test suite. Auto-detects Jest, Vitest, Pytest, Go, RSpec, or falls back to npm test.',
1367
1334
  trigger: '/test'
1368
1335
  },
1369
- 'commit-and-push': {
1370
- title: 'commit-and-push.md',
1371
- desc: 'Stages all changes, generates a conventional commit message from the diff, commits, and pushes. One command, full workflow.',
1372
- trigger: '/commit-and-push'
1336
+ 'create-retro-item-agent': {
1337
+ title: 'create-retro-item.md',
1338
+ desc: 'Creates a formatted retro item when tech debt or improvements are spotted.',
1339
+ trigger: 'Background agent'
1373
1340
  },
1374
- 'rules': {
1375
- title: 'rules/',
1376
- desc: 'Path-scoped context that loads when Claude works on matching files. Optimized rules are based on your project\'s needs, patterns and practices.<br><br><div style="background: var(--bg-elevated); border: 1px solid var(--accent-cyan); border-radius: 8px; padding: 16px; margin-top: 8px;"><strong style="color: var(--accent-orange);">Want optimized rules for your project?</strong><br>Reach out: <a href="mailto:info@adac1001.com" style="color: var(--accent-cyan);">info@adac1001.com</a></div>'
1341
+ 'docs-refresh-agent': {
1342
+ title: 'docs-refresh.md',
1343
+ desc: 'Background worker that syncs the docs when .claude/ files change.',
1344
+ trigger: 'Background agent'
1377
1345
  },
1378
- 'updates': {
1379
- title: 'updates/',
1380
- desc: 'Pending configuration updates shipped with new versions. Each update file (NNN-*.md) contains instructions Claude follows to apply changes. Managed by <code>/autoconfig-update</code>.',
1381
- trigger: '/autoconfig-update'
1346
+ 'feedback-rule-check-hook': {
1347
+ title: 'feedback-rule-check.js',
1348
+ desc: 'After FEEDBACK.md is edited, notifies Claude to evaluate',
1349
+ trigger: 'PostToolUse on Write|Edit'
1350
+ },
1351
+ 'format-hook': {
1352
+ title: 'format.js',
1353
+ desc: 'format.js in hooks/',
1354
+ trigger: 'PostToolUse hook'
1355
+ },
1356
+ 'migrate-feedback-hook': {
1357
+ title: 'migrate-feedback.js',
1358
+ desc: 'On session start, migrates custom FEEDBACK.md content to',
1359
+ trigger: 'SessionStart'
1360
+ },
1361
+ 'feedback-feedback': {
1362
+ title: 'FEEDBACK.md',
1363
+ desc: 'Human-authored corrections and guidance for Claude. Reserved for team feedback only — Claude must not write here. This directory persists across /autoconfig runs.'
1382
1364
  },
1383
1365
  'docs': {
1384
1366
  title: 'docs/autoconfig.docs.html',
1385
1367
  desc: 'This interactive docs. Open it anytime to review what each file does.',
1386
1368
  trigger: '/show-docs'
1369
+ },
1370
+ 'rules': {
1371
+ title: 'rules/',
1372
+ desc: 'Path-scoped context that loads when Claude works on matching files. Optimized rules are based on your project\'s needs, patterns and practices.<br><br><div style="background: var(--bg-elevated); border: 1px solid var(--accent-cyan); border-radius: 8px; padding: 16px; margin-top: 8px;"><strong style="color: var(--accent-orange);">Want optimized rules for your project?</strong><br>Reach out: <a href="mailto:info@adac1001.com" style="color: var(--accent-cyan);">info@adac1001.com</a></div>'
1373
+ },
1374
+ 'mcp': {
1375
+ title: '.mcp.json',
1376
+ desc: 'MCP (Model Context Protocol) server configuration. Add your MCP servers here.'
1377
+ },
1378
+ 'settings': {
1379
+ title: 'settings.json',
1380
+ desc: 'Permissions and security settings. Controls what Claude can auto-approve (allow) and what is always blocked (deny).'
1387
1381
  }
1388
1382
  };
1389
1383
 
@@ -1575,229 +1569,282 @@ CRITICAL: A plausible-looking cause from code reading is NOT confirmed evidence.
1575
1569
 
1576
1570
  > Run \`/autoconfig\` to populate this based on your project.`
1577
1571
  },
1578
- 'settings': {
1579
- filename: 'settings.json',
1580
- content: `{
1581
- "permissions": {
1582
- "allow": [
1583
- "Read(./**)",
1584
- "Edit(./**)",
1585
- "Write(./**)",
1586
- "Glob",
1587
- "Grep",
1588
- "WebSearch",
1589
- "WebFetch",
1590
- "Bash(npm run dev)",
1591
- "Bash(npm run build)",
1592
- "Bash(npm run lint)",
1593
- "Bash(npm run lint:fix)",
1594
- "Bash(npm run typecheck)",
1595
- "Bash(npm run test)",
1596
- "Bash(npm run test:*)",
1597
- "Bash(npm run validate)",
1598
- "Bash(git status)",
1599
- "Bash(git diff:*)",
1600
- "Bash(git add:*)",
1601
- "Bash(git commit:*)",
1602
- "Bash(git push:*)",
1603
- "Bash(git pull)",
1604
- "Bash(git checkout:*)",
1605
- "Bash(git branch:*)",
1606
- "Bash(ls:*)",
1607
- "Bash(dir:*)",
1608
- "Bash(mkdir:*)",
1609
- "Bash(mkdir -p:*)",
1610
- "Bash(start:*)",
1611
- "Bash(start .claude:*)",
1612
- "Bash(open:*)",
1613
- "Bash(open .claude:*)",
1614
- "Bash(xdg-open:*)",
1615
- "Bash(xdg-open .claude:*)"
1616
- ],
1617
- "deny": [
1618
- "Read(./.env)",
1619
- "Read(./.env.*)",
1620
- "Read(./secrets/**)",
1621
- "Read(./**/credentials.*)",
1622
- "Read(./**/*.pem)",
1623
- "Read(./**/*.key)",
1624
- "Write(./nul)",
1625
- "Edit(./nul)",
1626
- "Bash(rm -rf:*)",
1627
- "Bash(curl:*)",
1628
- "Bash(wget:*)"
1629
- ]
1630
- }
1631
- }`
1632
- },
1633
- 'mcp': {
1634
- filename: '.mcp.json',
1635
- content: `{
1636
- "mcpServers": {}
1637
- }
1572
+ 'autoconfig-update': {
1573
+ filename: 'autoconfig-update.md',
1574
+ content: `<!-- @applied
1575
+ -->
1638
1576
 
1639
- // Add your MCP server configs here when you're ready.
1640
- // See: https://docs.anthropic.com/en/docs/claude-code/mcp`
1641
- },
1642
- 'create-retro-item': {
1643
- filename: 'create-retro-item.md',
1644
- content: `# Create Retro Item Agent
1577
+ # Autoconfig Update
1645
1578
 
1646
- Create a fully-scoped story file in \`.claude/retro/\` when tech debt or improvement opportunities are identified.
1579
+ Check for and install pending updates to your Claude Code configuration.
1647
1580
 
1648
- ## When to Trigger
1581
+ **Style guideline**: Work silently through Steps 1-3. Do not narrate internal steps, implementation details, or progress messages (e.g., "Let me check...", "The @applied block is empty..."). The first output the user sees should be the formatted summary in Step 4 (or the "up to date" message).
1649
1582
 
1650
- Call this agent when you notice:
1651
- - Tech debt that should be addressed later
1652
- - Code that works but could be improved
1653
- - Missing tests, documentation, or error handling
1654
- - Architectural improvements worth tracking
1583
+ ## Step 1: Pull Latest Updates
1655
1584
 
1656
- ## Input
1585
+ Run this command via Bash to pull new update files from the latest package:
1657
1586
 
1658
- Provide these details when calling:
1659
- - **title**: Short descriptive name (used for filename)
1660
- - **problem**: What's wrong or what friction was encountered
1661
- - **criteria**: Specific, testable acceptance criteria
1662
- - **approach**: How to fix it
1663
- - **priority**: Critical | High | Medium | Low
1664
- - **effort**: S | M | L | XL
1665
- - **files**: List of files involved
1587
+ \`\`\`bash
1588
+ npx claude-code-autoconfig@latest --pull-updates
1589
+ \`\`\`
1666
1590
 
1667
- ## Behavior
1591
+ This copies any new update \`.md\` files into \`.claude/updates/\` and refreshes this command file (preserving the \`@applied\` block above).
1668
1592
 
1669
- 1. Generate filename from title: \`kebab-case.md\`
1670
- 2. Create story file in \`.claude/retro/\` using the template format
1671
- 3. Confirm creation with filename
1593
+ After the command completes, check \`.claude/updates/\` directory. If it doesn't exist or is empty, output:
1594
+
1595
+ \`\`\`
1596
+ No new updates available. You're up to date.
1597
+ \`\`\`
1598
+
1599
+ Then stop — do not continue to further steps.
1672
1600
 
1673
- ## Guidelines
1601
+ ## Step 2: Parse Update Files
1674
1602
 
1675
- - **Be concise**: Keep descriptions actionable, not verbose
1676
- - **Be specific**: Include actual file paths and line numbers when relevant
1677
- - **Don't duplicate**: Check if similar item already exists first
1678
- - **Don't block**: Create the item and continue with the main task`
1603
+ Read all \`.md\` files in \`.claude/updates/\` matching the pattern \`NNN-*.md\` (e.g., \`001-debug-methodology.md\`).`
1679
1604
  },
1680
- 'docs-refresh-agent': {
1681
- filename: 'docs-refresh.md',
1682
- content: `# Guide Refresh Agent
1605
+ 'autoconfig': {
1606
+ filename: 'autoconfig.md',
1607
+ content: `# Autoconfig
1683
1608
 
1684
- Incrementally update the docs's treeInfo when \`.claude/\` files are added or modified.
1609
+ Analyze this project and configure Claude Code with real context.
1685
1610
 
1686
- ## Trigger
1611
+ **Setup Note**: During autoconfig, prefer Glob/Read/Write tools over Bash commands. This ensures smooth setup without permission prompts. Only use Bash for the bootstrap step and opening the guide at the end.
1687
1612
 
1688
- - PostToolUse hook on Edit|Write to \`.claude/\`
1613
+ ## Step 0a: Bootstrap files from latest package
1689
1614
 
1690
- ## Scope
1615
+ **MANDATORY: You MUST run this Bash command before doing anything else.** Do not skip it. Do not assume it will fail. It is designed to work inside Claude Code sessions:
1691
1616
 
1692
- - Read \`.claude/**/*.md\` for \`@description\` comments
1693
- - Update \`.claude/docs/autoconfig.docs.html\` treeInfo
1617
+ \`\`\`bash
1618
+ npx claude-code-autoconfig@latest --bootstrap
1619
+ \`\`\`
1694
1620
 
1695
- ## Behavior
1621
+ This downloads the latest package and copies slash commands, hooks, agents, docs, and settings into \`.claude/\`. The \`--bootstrap\` flag makes it safe to run inside Claude Code — it copies files and exits silently with code 0. If it fails (e.g., no network), continue anyway — the existing files will still work.
1622
+
1623
+ ## Step 0b: Migrate FEEDBACK.md to Discoveries (one-time)
1696
1624
 
1697
- 1. Check which \`.claude/\` file was just modified
1698
- 2. Extract the \`<!-- @description ... -->\` comment from the top
1699
- 3. Find the corresponding entry in the docs's \`treeInfo\` object
1700
- 4. Update only that entry's \`desc\` field
1701
- 5. If file is new, add a new treeInfo entry
1702
- 6. If file was deleted, remove the treeInfo entry
1625
+ Read \`.claude/feedback/FEEDBACK.md\`. If it contains custom content beyond the default template header (sections after the first \`---\`), and \`CLAUDE.md\` does NOT already have a \`## Discoveries\` section:
1703
1626
 
1704
- ## Guidelines
1627
+ 1. Read all custom content from FEEDBACK.md (everything after the first \`---\` separator)
1628
+ 2. Append a \`## Discoveries\` section to the bottom of CLAUDE.md with that content
1629
+ 3. Reset FEEDBACK.md to the clean template:
1630
+ \`\`\`
1631
+ <!-- @description Human-authored corrections and guidance for Claude. Reserved for team feedback only — Claude must not write here. This directory persists across /autoconfig runs. -->
1705
1632
 
1706
- - **Be fast**: Only touch the affected entry
1707
- - **Be minimal**: Don't reformat or reorganize unrelated code
1708
- - **Be silent**: Run in background, no output unless error`
1633
+ # Team Feedback
1634
+
1635
+ **This file is for human-authored corrections and guidance only.**
1636
+ Claude reads this file but must never write to it. When Claude discovers project context, gotchas, or learnings, it should append to the \`## Discoveries\` section in CLAUDE.md instead.`
1709
1637
  },
1710
- 'autoconfig': {
1711
- filename: 'autoconfig.md',
1712
- content: `# Autoconfig
1638
+ 'commit-and-push': {
1639
+ filename: 'commit-and-push.md',
1640
+ content: `# Commit and Push
1713
1641
 
1714
- Analyze this project and configure Claude Code with real context.
1642
+ Run tests, stage all changes, create a commit with a good message, and push to the current branch.
1715
1643
 
1716
- **Setup Note**: During autoconfig, prefer Glob/Read/Write tools over Bash commands. This ensures smooth setup without permission prompts. Only use Bash for opening the guide at the end.
1644
+ ## Steps
1717
1645
 
1718
- ## Step 1: Detect Environment
1646
+ 1. Run the project's test suite (e.g., \`npm test\`)
1647
+ 2. **If tests fail, stop here.** Do not commit or push failing code.
1648
+ 3. Stage all changes (\`git add -A\`)
1649
+ 4. Generate a conventional commit message based on the diff
1650
+ 5. Commit the changes
1651
+ 6. Push to the current branch
1719
1652
 
1720
- **Operating System:**
1721
- Check the platform and note it for command syntax:
1722
- - Windows → use \\\`del\\\`, \\\`rmdir\\\`, backslashes, \\\`.cmd\\\`/\\\`.ps1\\\` scripts
1723
- - macOS/Linux → use \\\`rm\\\`, \\\`mkdir -p\\\`, forward slashes, \\\`.sh\\\` scripts
1653
+ ## Commit Message Format
1724
1654
 
1725
- ## Step 2: Scan the Project
1655
+ Use conventional commits: \`type(scope): description\`
1726
1656
 
1727
- Look for these indicators to understand the project:
1657
+ Types: feat, fix, docs, style, refactor, test, chore
1728
1658
 
1729
- **Package/Config Files:**
1730
- - \`package.json\` → Node.js, npm scripts, dependencies
1731
- - \`requirements.txt\` / \`pyproject.toml\` / \`setup.py\` → Python
1732
- - \`Cargo.toml\` → Rust
1733
- - \`go.mod\` Go
1734
- - \`Gemfile\` → Ruby
1735
- - \`pom.xml\` / \`build.gradle\` → Java
1736
- - \`*.csproj\` / \`*.sln\` → .NET
1737
- - \`composer.json\` → PHP
1659
+ Keep the subject line under 50 chars. Add body if the change needs explanation.`
1660
+ },
1661
+ 'enable-retro': {
1662
+ filename: 'enable-retro.md',
1663
+ content: `# Enable Retro
1738
1664
 
1739
- **Framework/Testing/Infrastructure** indicators also scanned.
1665
+ Enable the experimental Retro feature, which lets Claude log tech debt and improvement opportunities as structured story files.
1740
1666
 
1741
- ## Step 2b: Detect Version Divergence
1667
+ ## What This Does
1742
1668
 
1743
- Scans for version declarations across the project. Flags mismatches between package.json, hardcoded constants, manifest files, etc.
1669
+ 1. Creates \`.claude/retro/\` directory with a README
1670
+ 2. Creates \`.claude/agents/create-retro-item.md\` agent
1671
+ 3. Adds Retro instructions to CLAUDE.md
1744
1672
 
1745
- ## Step 3: Populate CLAUDE.md
1673
+ ## Step 1: Create Retro Directory
1746
1674
 
1747
- Focus on what Claude Code actually needs. Keep it tight — 30 lines beats 200.
1675
+ Create \`.claude/retro/README.md\` with:
1748
1676
 
1749
- **Always include:** Project name, tech stack, commands, non-obvious conventions.
1750
- **Skip:** File trees, endpoint lists, model lists — Claude discovers these.
1677
+ \`\`\`markdown
1678
+ # Retro Items
1751
1679
 
1752
- ## Step 4: Create Rules Directory
1753
- ## Step 5: Configure Formatter (JS/Node Projects)
1754
- ## Step 6: Configure Settings
1755
- ## Step 7: Update the Docs
1680
+ Tech debt and improvement opportunities identified during development.
1756
1681
 
1757
- ## After Completion
1682
+ Each item is a structured story file with:
1683
+ - Problem description
1684
+ - Acceptance criteria
1685
+ - Suggested approach
1686
+ - Priority & effort sizing
1687
+ - Files involved
1688
+
1689
+ ## Working with Retro Items
1758
1690
 
1759
- Opens interactive docs in browser. Clean finale message.`
1691
+ - "Fix retro #001" Work on a specific item
1692
+ - "What's in the retro backlog?" — List pending items`
1760
1693
  },
1761
- 'commit-and-push': {
1762
- filename: 'commit-and-push.md',
1763
- content: `# Commit and Push
1694
+ 'gls': {
1695
+ filename: 'gls.md',
1696
+ content: `Get the latest screenshot(s) and display them.
1697
+
1698
+ Usage:
1699
+ - \`/gls\` - Get and display the most recent screenshot
1700
+ - \`/gls-2\` - Get and display the 2 most recent screenshots
1701
+ - \`/gls-3\` - Get and display the 3 most recent screenshots
1702
+ - \`/gls-N\` - Get and display the N most recent screenshots
1703
+ - \`/gls /path/to/dir\` - Use a specific directory and save it
1704
+
1705
+ ## Step 1: Check for saved path
1706
+
1707
+ Check the \`@screenshotDir\` comment on line 1 of THIS file. If it has a path (not empty), use that path and skip to Step 3.
1708
+
1709
+ If it's empty (i.e., \`<!-- @screenshotDir -->\`), continue to Step 2.
1710
+
1711
+ ## Step 2: Detect screenshot directory
1712
+
1713
+ If the user provides a path as an argument (e.g., \`/gls /path/to/dir\`), use that path and skip to Step 2b.
1714
+
1715
+ Otherwise, detect the OS and find the screenshot directory. Run this **single Bash command** which finds all candidate directories and reports the newest screenshot in each:
1716
+
1717
+ \`\`\`bash
1718
+ OS=$(uname -s); echo "OS=$OS"; for d in \\
1719
+ "$HOME/OneDrive/Pictures/Screenshots"* \\
1720
+ "$HOME/Pictures/Screenshots" \\
1721
+ "$HOME/Desktop" \\
1722
+ "$HOME/Pictures" \\
1723
+ "$HOME/Videos/Captures"; do \\
1724
+ [ -d "$d" ] || continue; \\
1725
+ newest=$(ls -t "$d"/*.png "$d"/*.jpg "$d"/*.jpeg "$d"/*.bmp "$d"/*.webp "$d"/*.gif 2>/dev/null | head -1); \\`
1726
+ },
1727
+ 'publish': {
1728
+ filename: 'publish.md',
1729
+ content: `# Publish
1764
1730
 
1765
- Stage all changes, create a commit with a good message, and push to the current branch.
1731
+ Run tests, bump the patch version, commit, push, and publish to npm.
1766
1732
 
1767
1733
  ## Steps
1768
1734
 
1769
- 1. Stage all changes (\`git add -A\`)
1770
- 2. Generate a conventional commit message based on the diff
1771
- 3. Commit the changes
1772
- 4. Push to the current branch
1735
+ 1. **Sync README.md** Compare the current README against the actual state of the project (file tree, slash commands, features, settings). If anything is out of date or missing, update the README before proceeding. Check:
1736
+ - File tree matches actual \`.claude/\` directory contents
1737
+ - Slash commands table matches actual \`.claude/commands/\` files
1738
+ - Feature sections reflect current capabilities (update system, MEMORY.md, hooks, etc.)
1739
+ - No references to nonexistent commands or files
1740
+ 2. Run the project's test suite (\`npm test\`)
1741
+ 3. **If tests fail, stop here.** Do not publish broken code.
1742
+ 4. Check for uncommitted changes. If there are any:
1743
+ a. Stage all changes (\`git add -A\`)
1744
+ b. Generate a conventional commit message based on the diff
1745
+ c. Commit the changes
1746
+ 5. Bump the version: \`npm version patch\`
1747
+ 6. Push the commit and tag: \`git push && git push --tags\`
1748
+ 7. Publish to npm: \`npm publish\`
1749
+ 8. Output the new version number on success
1750
+
1751
+ ## Important
1752
+
1753
+ - Always run tests before publishing — never skip this step
1754
+ - If any step fails, stop immediately and report the error
1755
+ - Do not use \`--force\` on publish unless the user explicitly asks`
1756
+ },
1757
+ 'recover-context': {
1758
+ filename: 'recover-context.md',
1759
+ content: `Recover recent conversation context from the raw session transcript on disk.
1773
1760
 
1774
- ## Commit Message Format
1761
+ Usage:
1762
+ - \`/recover-context -60\` — last 60 minutes of conversation
1763
+ - \`/recover-context -30\` — last 30 minutes
1764
+ - \`/recover-context -120\` — last 2 hours
1765
+ - \`/recover-context -60 --show\` — same as above, but also opens the filtered transcript in default editor
1775
1766
 
1776
- Use conventional commits: \`type(scope): description\`
1767
+ The negative number means "go back N minutes from now." The minutes argument is **required**.
1777
1768
 
1778
- Types: feat, fix, docs, style, refactor, test, chore
1769
+ ## Step 1: Parse the arguments
1779
1770
 
1780
- Keep the subject line under 50 chars. Add body if the change needs explanation.`
1771
+ The arguments are: $ARGUMENTS
1772
+
1773
+ - If empty or missing, ask the user: "How many minutes back? (e.g., -60)"
1774
+ - Strip the leading \`-\` from the number and treat it as the number of minutes to look back
1775
+ - Check if \`--show\` flag is present
1776
+
1777
+ ## Step 2: Find the transcript file
1778
+
1779
+ Find the current session's transcript by looking for the most recently modified \`.jsonl\` file in the Claude projects directory:
1780
+
1781
+ \`\`\`bash
1782
+ ls -t ~/.claude/projects/*/*.jsonl 2>/dev/null | head -1
1783
+ \`\`\`
1784
+
1785
+ If no transcript is found, tell the user and stop.
1786
+
1787
+ ## Step 3: Extract conversation context`
1781
1788
  },
1782
- 'docs-cmd': {
1789
+ 'show-docs': {
1783
1790
  filename: 'show-docs.md',
1784
- content: `# Show Guide
1791
+ content: `# Show Docs
1792
+
1793
+ Open the interactive documentation for Claude Code Autoconfig.
1794
+
1795
+ ## Step 1: Sync Docs
1785
1796
 
1786
- Open the interactive docs for Claude Code Autoconfig.
1797
+ Run the sync script to ensure the docs reflect the current state of \`.claude/\`:
1787
1798
 
1788
- ## Step 1: Check for Changes
1799
+ \`\`\`bash
1800
+ node .claude/scripts/sync-docs.js
1801
+ \`\`\`
1789
1802
 
1790
- Compare modification times of files in \`.claude/\` against the docs HTML.
1803
+ This scans all files in \`.claude/\` (commands, hooks, agents, feedback, updates, settings) and updates the docs HTML file tree, info cards, and content previews automatically. It's fast and idempotent.
1791
1804
 
1792
- If any files are newer: "Syncing docs with latest changes..." proceed to delta sync.
1805
+ If the script fails (e.g., file not found), skip to Step 2 — the docs will still open with whatever content they have.
1793
1806
 
1794
- ## Step 2: Delta Sync
1807
+ ## Step 2: Open Docs
1795
1808
 
1796
- For each changed file, update only that entry in the docs's fileContents.
1809
+ Open the docs in the default browser. Use the command matching the current OS:
1797
1810
 
1798
- ## Step 3: Open Guide
1811
+ - **macOS:** \`open .claude/docs/autoconfig.docs.html\`
1812
+ - **Linux:** \`xdg-open .claude/docs/autoconfig.docs.html\`
1813
+ - **Windows:** \`powershell -NoProfile -Command "Start-Process '.claude/docs/autoconfig.docs.html'"\`
1799
1814
 
1800
- Open in default browser (macOS: open, Linux: xdg-open, Windows: start).`
1815
+ **Important:** If the command exits with a non-zero exit code or produces an error, tell the user the file failed to open and suggest they open it manually. Do NOT report success unless the command completed without error.`
1816
+ },
1817
+ 'sync-claude-md': {
1818
+ filename: 'sync-claude-md.md',
1819
+ content: `# Sync CLAUDE.md
1820
+
1821
+ Re-analyze the project and update CLAUDE.md to reflect current state.
1822
+
1823
+ Run this when your project has changed significantly:
1824
+ - Added a major framework or dependency
1825
+ - Changed npm scripts or build commands
1826
+ - Restructured the project
1827
+ - Switched databases or services
1828
+
1829
+ ## Step 1: Check for Team Feedback
1830
+
1831
+ Before regenerating, check \`.claude/feedback/FEEDBACK.md\` for any corrections or guidance from the team. Review and incorporate relevant feedback into your regeneration.
1832
+
1833
+ ## Step 2: Re-analyze the Project
1834
+
1835
+ Scan for current project indicators:
1836
+
1837
+ **Package/Config Files:**
1838
+ - \`package.json\` → dependencies, scripts
1839
+ - \`requirements.txt\` / \`pyproject.toml\` → Python deps
1840
+ - \`Cargo.toml\`, \`go.mod\`, \`Gemfile\`, etc.
1841
+
1842
+ **Framework Indicators:**
1843
+ - Config files (next.config.*, vite.config.*, etc.)
1844
+ - Directory structure (app/, src/, etc.)
1845
+
1846
+ **Infrastructure:**
1847
+ - Docker, Terraform, CI/CD configs`
1801
1848
  },
1802
1849
  'test': {
1803
1850
  filename: 'test.md',
@@ -1811,77 +1858,174 @@ If no scope provided, run the full test suite. Otherwise run tests matching the
1811
1858
 
1812
1859
  Detect the test command from project config (package.json scripts, pytest, go test, etc.) and execute it.`
1813
1860
  },
1814
- 'rules': {
1815
- filename: 'rules/',
1816
- content: null,
1817
- empty: true,
1818
- emptyMessage: 'This directory is empty.\n\nAdd .md files here to define rules for specific paths in your codebase.'
1819
- },
1820
- 'docs': {
1821
- filename: 'autoconfig.docs.html',
1822
- content: null,
1823
- empty: true,
1824
- emptyMessage: "You're looking at it! 👀"
1825
- },
1826
- 'enable-retro': {
1827
- filename: 'enable-retro.md',
1828
- content: `# Enable Retro
1861
+ 'create-retro-item-agent': {
1862
+ filename: 'create-retro-item.md',
1863
+ content: `# Create Retro Item Agent
1829
1864
 
1830
- (Experimental) Enable tech debt tracking.
1865
+ Create a fully-scoped story file in \`.claude/retro/\` when tech debt or improvement opportunities are identified.
1831
1866
 
1832
- ## What This Does
1867
+ ## When to Trigger
1833
1868
 
1834
- 1. Creates \`.claude/retro/\` directory
1835
- 2. Creates \`.claude/agents/create-retro-item.md\` agent
1836
- 3. Adds Retro instructions to CLAUDE.md
1869
+ Call this agent when you notice:
1870
+ - Tech debt that should be addressed later
1871
+ - Code that works but could be improved
1872
+ - Missing tests, documentation, or error handling
1873
+ - Architectural improvements worth tracking
1837
1874
 
1838
- ## After Enabling
1875
+ ## Input
1839
1876
 
1840
- Claude will log tech debt and improvement opportunities as structured story files:
1841
- - Problem description
1842
- - Acceptance criteria
1843
- - Suggested approach
1844
- - Priority & effort sizing
1845
- - Files involved
1877
+ Provide these details when calling:
1878
+ - **title**: Short descriptive name (used for filename)
1879
+ - **problem**: What's wrong or what friction was encountered
1880
+ - **criteria**: Specific, testable acceptance criteria
1881
+ - **approach**: How to fix it
1882
+ - **priority**: Critical | High | Medium | Low
1883
+ - **effort**: S | M | L | XL
1884
+ - **files**: List of files involved
1846
1885
 
1847
- Work through items: "Fix retro #001"`
1886
+ ## Behavior
1887
+
1888
+ 1. Generate filename from title: \`kebab-case.md\`
1889
+ 2. Create story file in \`.claude/retro/\` using this format:
1890
+
1891
+ \`\`\`markdown
1892
+ # [Title]`
1848
1893
  },
1849
- 'feedback-template': {
1850
- filename: 'FEEDBACK.md',
1851
- content: `# Team Feedback
1894
+ 'docs-refresh-agent': {
1895
+ filename: 'docs-refresh.md',
1896
+ content: `# Docs Refresh Agent
1852
1897
 
1853
- Add corrections and guidance here when Claude does something wrong.
1854
- Claude reads this directory and learns for next time.
1898
+ Sync the interactive docs with the current state of \`.claude/\`.
1855
1899
 
1856
- ---
1900
+ ## How
1857
1901
 
1858
- ## Debugging Methodology — Evidence Before Solutions
1902
+ Run:
1859
1903
 
1860
- **NEVER jump to a fix based on assumptions.** When investigating a bug:
1904
+ \`\`\`bash
1905
+ node .claude/scripts/sync-docs.js
1906
+ \`\`\`
1861
1907
 
1862
- 1. **Gather evidence first** add logging, check server logs, inspect actual data
1863
- 2. **Confirm the root cause** — present findings to the user with evidence
1864
- 3. **Only then propose a fix** — based on what you observed, not what you guessed
1908
+ This scans \`.claude/\` for all files, extracts \`@description\` metadata, and updates the docs HTML (file tree, info cards, and content previews).
1865
1909
 
1866
- ---
1910
+ ## When to Use
1911
+
1912
+ - After adding, modifying, or deleting files in \`.claude/\`
1913
+ - Before opening docs with \`/show-docs\` (already built in)
1914
+ - As a background task when \`.claude/\` files change`
1915
+ },
1916
+ 'feedback-rule-check-hook': {
1917
+ filename: 'feedback-rule-check.js',
1918
+ content: `#!/usr/bin/env node
1919
+
1920
+ /**
1921
+ * @name Feedback Rule Migration Check
1922
+ * @description After FEEDBACK.md is edited, notifies Claude to evaluate
1923
+ * whether any entries would be more reliably delivered as
1924
+ * .claude/rules/ files with glob patterns.
1925
+ * @trigger PostToolUse on Write|Edit
1926
+ */
1927
+
1928
+ // Read hook input from stdin
1929
+ let input = '';
1930
+ process.stdin.setEncoding('utf8');
1931
+ process.stdin.on('data', chunk => input += chunk);
1932
+ process.stdin.on('end', () => {
1933
+ try {
1934
+ const data = JSON.parse(input);
1935
+ const filePath = data?.tool_input?.file_path || '';
1936
+
1937
+ // Only fire for FEEDBACK.md edits
1938
+ if (!filePath.endsWith('FEEDBACK.md')) {
1939
+ process.exit(0);
1940
+ }
1941
+
1942
+ console.log([
1943
+ 'FEEDBACK.md was just modified.',
1944
+ 'Review the changes and evaluate whether any entries are tied to specific file types,',
1945
+ 'frameworks, or patterns that could be scoped with a glob (e.g., *.py, *.tsx, src/api/**).',
1946
+ '',
1947
+ 'If any entries qualify, ask the user:',`
1948
+ },
1949
+ 'format-hook': {
1950
+ filename: 'format.js',
1951
+ content: `#!/usr/bin/env node
1952
+
1953
+ /**
1954
+ * @name Format Hook
1955
+ * @description Runs project formatter after Write/Edit operations
1956
+ * @trigger PostToolUse on Write|Edit
1957
+ */
1867
1958
 
1868
- ## Design Principles
1959
+ const { execSync } = require('child_process');
1960
+ const path = require('path');
1961
+
1962
+ // Read hook input from stdin
1963
+ let input = '';
1964
+ process.stdin.setEncoding('utf8');
1965
+ process.stdin.on('data', chunk => input += chunk);
1966
+ process.stdin.on('end', () => {
1967
+ try {
1968
+ const data = JSON.parse(input);
1969
+ handleHook(data);
1970
+ } catch (err) {
1971
+ // Silent exit if no valid input
1972
+ process.exit(0);
1973
+ }
1974
+ });
1869
1975
 
1870
- - Each file should have a single responsibility
1871
- - If a file exceeds 500 LOC, look for decomposition opportunities
1872
- - Keep cyclomatic complexity under 10 per function
1976
+ function handleHook(data) {
1977
+ const filePath = data?.tool_input?.file_path || '';
1873
1978
 
1874
- ## Development Rules
1979
+ // Skip non-source files
1980
+ if (!filePath.match(/\\.(js|jsx|ts|tsx|json|css|scss|md|html)$/)) {`
1981
+ },
1982
+ 'migrate-feedback-hook': {
1983
+ filename: 'migrate-feedback.js',
1984
+ content: `#!/usr/bin/env node
1985
+
1986
+ /**
1987
+ * @name Feedback to Discoveries Migration
1988
+ * @description On session start, migrates custom FEEDBACK.md content to
1989
+ * CLAUDE.md Discoveries section. One-time, idempotent.
1990
+ * @trigger SessionStart
1991
+ */
1875
1992
 
1876
- ### Testing Requirements
1993
+ const fs = require('fs');
1994
+ const path = require('path');
1995
+
1996
+ const cwd = process.cwd();
1997
+ const claudeMdPath = path.join(cwd, 'CLAUDE.md');
1998
+ const feedbackPath = path.join(cwd, '.claude', 'feedback', 'FEEDBACK.md');
1999
+
2000
+ // Read hook input from stdin (required by hook protocol)
2001
+ let input = '';
2002
+ process.stdin.setEncoding('utf8');
2003
+ process.stdin.on('data', chunk => input += chunk);
2004
+ process.stdin.on('end', () => {
2005
+ try {
2006
+ migrate();
2007
+ } catch (err) {
2008
+ // Silent exit on any error
2009
+ }
2010
+ process.exit(0);
2011
+ });
1877
2012
 
1878
- **CRITICAL: Before committing changes to bin/cli.js, run tests:**
1879
- \\\`npm test\\\`
2013
+ function migrate() {`
2014
+ },
2015
+ 'feedback-feedback': {
2016
+ filename: 'FEEDBACK.md',
2017
+ content: `# Team Feedback
1880
2018
 
1881
- ### Box Drawing Guidelines
2019
+ **This file is for human-authored corrections and guidance only.**
2020
+ Claude reads this file but must never write to it. When Claude discovers project context, gotchas, or learnings, it should append to the \`## Discoveries\` section in CLAUDE.md instead.
1882
2021
 
1883
- All lines must be exactly 46 visible characters wide (including borders).
1884
- ANSI escape codes don't count toward visible width.`
2022
+ ---`
2023
+ },
2024
+ 'rules': {
2025
+ filename: 'rules/',
2026
+ content: null,
2027
+ empty: true,
2028
+ emptyMessage: 'Add .md files here to define rules for specific paths in your codebase.'
1885
2029
  },
1886
2030
  'hooks': {
1887
2031
  filename: 'hooks/',
@@ -1889,23 +2033,103 @@ ANSI escape codes don't count toward visible width.`
1889
2033
  empty: true,
1890
2034
  emptyMessage: 'Contains executable hook scripts that trigger on Claude Code events.'
1891
2035
  },
1892
- 'format-hook': {
1893
- filename: 'format.js',
1894
- content: `/**
1895
- * @name Format Hook
1896
- * @description Runs project formatter after Write/Edit operations
1897
- * @trigger PostToolUse on Write|Edit
1898
- */
1899
-
1900
- // Reads hook input from stdin
1901
- // Filters by file extension (.js, .ts, .json, .css, etc.)
1902
- // Skips generated directories (node_modules, dist, build)
1903
- // Runs: npm run format --silent
1904
-
1905
- // Key behavior:
1906
- // - Only triggers for source files
1907
- // - Silently runs formatter (errors are non-fatal)
1908
- // - Customizable - add your own file filters or formatting logic`
2036
+ 'docs': {
2037
+ filename: 'autoconfig.docs.html',
2038
+ content: null,
2039
+ empty: true,
2040
+ emptyMessage: "You\'re looking at it! 👀"
2041
+ },
2042
+ 'rules': {
2043
+ filename: 'rules/',
2044
+ content: null,
2045
+ empty: true,
2046
+ emptyMessage: 'This directory is empty.\nAdd .md files here to define rules for specific paths in your codebase.'
2047
+ },
2048
+ 'settings': {
2049
+ filename: 'settings.json',
2050
+ content: `{
2051
+ "env": {
2052
+ "CLAUDE_CODE_DISABLE_AUTO_MEMORY": "0"
2053
+ },
2054
+ "hooks": {
2055
+ "SessionStart": [
2056
+ {
2057
+ "matcher": "",
2058
+ "hooks": [
2059
+ {
2060
+ "type": "command",
2061
+ "command": "node .claude/hooks/migrate-feedback.js"
2062
+ }
2063
+ ]
2064
+ }
2065
+ ],
2066
+ "PostToolUse": [
2067
+ {
2068
+ "matcher": "Edit|Write",
2069
+ "hooks": [
2070
+ {
2071
+ "type": "command",
2072
+ "command": "node .claude/hooks/feedback-rule-check.js"
2073
+ }
2074
+ ]
2075
+ }
2076
+ ]
2077
+ },
2078
+ "permissions": {
2079
+ "allow": [
2080
+ "Read(./**)",
2081
+ "Edit(./**)",
2082
+ "Write(./**)",
2083
+ "Glob",
2084
+ "Grep",
2085
+ "WebSearch",
2086
+ "WebFetch",
2087
+ "Bash(npm run dev)",
2088
+ "Bash(npm run build)",
2089
+ "Bash(npm run lint)",
2090
+ "Bash(npm run lint:fix)",
2091
+ "Bash(npm run typecheck)",
2092
+ "Bash(npm run test)",
2093
+ "Bash(npm run test:*)",
2094
+ "Bash(npm run validate)",
2095
+ "Bash(git status)",
2096
+ "Bash(git diff:*)",
2097
+ "Bash(git add:*)",
2098
+ "Bash(git commit:*)",
2099
+ "Bash(git push:*)",
2100
+ "Bash(git pull)",
2101
+ "Bash(git checkout:*)",
2102
+ "Bash(git branch:*)",
2103
+ "Bash(ls:*)",
2104
+ "Bash(dir:*)",
2105
+ "Bash(mkdir:*)",
2106
+ "Bash(mkdir -p:*)",
2107
+ "Bash(start:*)",
2108
+ "Bash(start .claude:*)",
2109
+ "Bash(open:*)",
2110
+ "Bash(open .claude:*)",
2111
+ "Bash(xdg-open:*)",
2112
+ "Bash(xdg-open .claude:*)"
2113
+ ],
2114
+ "deny": [
2115
+ "Read(./.env)",
2116
+ "Read(./.env.*)",
2117
+ "Read(./secrets/**)",
2118
+ "Read(./**/credentials.*)",
2119
+ "Read(./**/*.pem)",
2120
+ "Read(./**/*.key)",
2121
+ "Bash(rm -rf:*)",
2122
+ "Bash(curl:*)",
2123
+ "Bash(wget:*)"
2124
+ ]
2125
+ }
2126
+ }`
2127
+ },
2128
+ 'mcp': {
2129
+ filename: '.mcp.json',
2130
+ content: `{
2131
+ "mcpServers": {}
2132
+ }`
1909
2133
  }
1910
2134
  };
1911
2135