thachvd-kit 1.0.30 → 1.0.31

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.
Files changed (3) hide show
  1. package/README.md +6 -2
  2. package/bin/cli.js +73 -48
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -28,6 +28,7 @@ thachvd-kit doctor
28
28
  - `.agent/docs/workflow.md`: the project workflow contract.
29
29
  - `.agent/docs/tooling.md`: Superpowers, MCP, RTK, and Playwright setup.
30
30
  - `.agent/docs/getting-started.md`: member onboarding guide.
31
+ - `.agent/docs/index-project-prompt.md`: durable prompt for the first project scan.
31
32
 
32
33
  The kit does not generate `.agent/skills`, `.agent/workflows`, `.agent/agents`, Forge commands, Claude hooks, or client-specific skill copies.
33
34
 
@@ -65,13 +66,13 @@ The index is local state. Keep it out of git unless the team explicitly chooses
65
66
 
66
67
  ### RTK
67
68
 
68
- RTK is optional command-output compression, not a workflow engine:
69
+ RTK is the recommended command-output layer, not a workflow engine. Prefer it by default for verbose shell commands:
69
70
 
70
71
  ```bash
71
72
  cargo install --git https://github.com/rtk-ai/rtk --branch master rtk
72
73
  ```
73
74
 
74
- Use it for verbose git, test, build, package, and container commands when available.
75
+ Examples: `rtk git status`, `rtk npm test`, `rtk git log`. If it is not installed, run the underlying command directly.
75
76
 
76
77
  ## CLI
77
78
 
@@ -79,11 +80,14 @@ Use it for verbose git, test, build, package, and container commands when availa
79
80
  thachvd-kit init [--yes]
80
81
  thachvd-kit setup [--no-setup-mcp]
81
82
  thachvd-kit doctor
83
+ thachvd-kit prompt
82
84
  thachvd-kit --help
83
85
  ```
84
86
 
85
87
  `setup` configures MCP entries for detected clients and prints official Superpowers installation guidance. It may install npm-based MCP packages when they are missing. `doctor` is read-only and reports missing integrations without changing the machine.
86
88
 
89
+ The project-indexing prompt is saved by `init`, so installing Superpowers or RTK afterward cannot make it disappear. Run `thachvd-kit prompt` whenever you need to print it again.
90
+
87
91
  ## Development
88
92
 
89
93
  ```bash
package/bin/cli.js CHANGED
@@ -127,13 +127,15 @@ ${pc.bold('Usage:')}
127
127
  thachvd-kit init [--yes]
128
128
  thachvd-kit setup [--yes]
129
129
  thachvd-kit doctor
130
+ thachvd-kit prompt
130
131
  thachvd-kit --version
131
132
  thachvd-kit --help
132
133
 
133
134
  ${pc.bold('Commands:')}
134
135
  init Generate project context files and documentation
135
- setup Install/configure optional MCP and local tooling
136
+ setup Install/configure MCP and recommended local tooling
136
137
  doctor Check project context and local integrations
138
+ prompt Print the saved project-indexing prompt again
137
139
 
138
140
  ${pc.bold('Options:')}
139
141
  --yes Overwrite generated files or accept setup defaults
@@ -146,7 +148,7 @@ ${pc.bold('What gets generated:')}
146
148
  CLAUDE.md Claude Code entry file that imports AGENTS.md
147
149
  GEMINI.md Antigravity entry file that points to AGENTS.md
148
150
  .cursorrules Cursor entry file that points to AGENTS.md
149
- .agent/docs/ Project context, architecture, conventions, workflow, and tooling docs
151
+ .agent/docs/ Project context, architecture, workflow, tooling, and durable onboarding prompt
150
152
 
151
153
  ${pc.bold('Workflow guide:')}
152
154
  Every task Superpowers Use the matching native Superpowers skill
@@ -164,7 +166,7 @@ ${pc.bold('Tip:')}
164
166
  `);
165
167
  }
166
168
 
167
- function formatScanPreviewLines(scanned) {
169
+ function formatScanPreviewLines(scanned) {
168
170
  return [
169
171
  ['App root', scanned.app_root || '.'],
170
172
  ['Project type', scanned.project_type || 'unknown'],
@@ -917,6 +919,7 @@ If Superpowers is unavailable, follow the plain-language flow in \`.agent/docs/w
917
919
  - Prefer the existing project style over new abstractions.
918
920
  - Keep changes surgical and remove only dead code introduced by your change.
919
921
  - **MCP First**: Prioritize \`codebase-memory-mcp\` for symbols, call paths, architecture, and impact; use \`context7\` for API/docs queries and \`playwright\` for browser/UI verification. Fall back to normal file search when an integration is unavailable.
922
+ - Prefer \`rtk\` by default for verbose shell commands such as \`rtk git status\`, \`rtk npm test\`, and \`rtk git log\`. Run the underlying command directly only when RTK is unavailable or incompatible.
920
923
  - Tests or equivalent verification are mandatory before claiming done.
921
924
  - Keep files under ${data.max_file_lines || '300'} lines unless the project already has a different standard in \`.agent/docs/conventions.md\`.
922
925
 
@@ -925,10 +928,31 @@ If Superpowers is unavailable, follow the plain-language flow in \`.agent/docs/w
925
928
  - Project context: \`.agent/docs/\`
926
929
  - Tooling setup: \`.agent/docs/tooling.md\`
927
930
  - Superpowers: installed through the AI client's official plugin surface
928
- - RTK: optional local CLI for compact command output
931
+ - RTK: recommended local CLI for compact command output
929
932
  - Antigravity and Cursor entry rules: \`GEMINI.md\` and \`.cursorrules\`
930
933
  `;
931
934
  }
935
+
936
+ function generateIndexProjectPrompt() {
937
+ return `# Project Indexing Prompt
938
+
939
+ Read CLAUDE.md (if using Claude Code), AGENTS.md, and all files under .agent/docs/.
940
+ Use Superpowers for the workflow and use codebase-memory MCP for structural code discovery when available.
941
+ Ask me what this project does and any important conventions I want preserved.
942
+ Then scan this repository and refine the generated context docs with factual rules.
943
+ Do not implement product code during onboarding.
944
+ `;
945
+ }
946
+
947
+ function printProjectPrompt() {
948
+ const promptPath = path.join(targetDir, '.agent', 'docs', 'index-project-prompt.md');
949
+ if (!fs.existsSync(promptPath)) {
950
+ console.error(pc.yellow('No saved project prompt found. Run thachvd-kit init first.'));
951
+ process.exitCode = 1;
952
+ return;
953
+ }
954
+ console.log(fs.readFileSync(promptPath, 'utf8'));
955
+ }
932
956
 
933
957
  function generateSharedClaudeMd() {
934
958
  return `@AGENTS.md
@@ -1055,7 +1079,7 @@ Use these integrations when available. Run thachvd-kit doctor to check the curre
1055
1079
  | \`codebase-memory-mcp\` | Explore symbols, trace call chains, architecture, and impact |
1056
1080
  | \`context7\` | Look up library/framework docs, API signatures, migration guides |
1057
1081
  | \`playwright\` | Verify UI behavior, take screenshots, test forms and navigation |
1058
- | \`rtk\` | Reduce noisy output from git, tests, builds, and package commands |
1082
+ | \`rtk\` | Recommended proxy for noisy git, tests, builds, and package commands |
1059
1083
 
1060
1084
  > Check \`.agent/docs/tooling.md\` for setup details and additional MCP servers.
1061
1085
 
@@ -1241,8 +1265,8 @@ thachvd-kit creates project context. Superpowers owns the development workflow.
1241
1265
  ## Setup
1242
1266
 
1243
1267
  1. Run \`thachvd-kit init\` in the repository.
1244
- 2. Install Superpowers from the official plugin surface for the AI client you use.
1245
- 3. Run \`thachvd-kit setup\` to configure codebase-memory MCP and print integration guidance.
1268
+ 2. Open or print \`.agent/docs/index-project-prompt.md\` with \`thachvd-kit prompt\`.
1269
+ 3. Install Superpowers and RTK, then run \`thachvd-kit setup\`.
1246
1270
  4. Run \`thachvd-kit doctor\` and restart the AI client.
1247
1271
 
1248
1272
  ## Standard Flow
@@ -1323,7 +1347,7 @@ The plan is a gate, not a suggestion. Do not start product-code implementation b
1323
1347
  Use \`/forge-debug <symptom>\`, not the feature flow, when something is failing or the root cause is unknown:
1324
1348
 
1325
1349
  1. Capture the exact symptom, environment, reproduction, and expected result.
1326
- 2. Inspect the relevant code path with MCP/codegraph when available.
1350
+ 2. Inspect the relevant code path with codebase-memory MCP when available.
1327
1351
  3. Form and test a small number of hypotheses; do not patch by guesswork.
1328
1352
  4. Add or update a regression test that fails before the fix when practical.
1329
1353
  5. Make the smallest root-cause fix.
@@ -1411,10 +1435,11 @@ Use \`codebase-memory-mcp\` for symbol search, call paths, architecture, and imp
1411
1435
 
1412
1436
  ## RTK
1413
1437
 
1414
- RTK is optional command-output compression, not a workflow engine.
1438
+ RTK is the recommended command-output layer, not a workflow engine. Prefer it by default for verbose shell commands.
1415
1439
 
1416
1440
  - Install: \`cargo install --git https://github.com/rtk-ai/rtk --branch master rtk\`
1417
- - Prefer it for verbose git, test, build, package, and container commands when available.
1441
+ - Examples: \`rtk git status\`, \`rtk npm test\`, \`rtk git log\`.
1442
+ - If it is unavailable, run the underlying command directly.
1418
1443
 
1419
1444
  ## Playwright
1420
1445
 
@@ -1460,24 +1485,23 @@ startup_timeout_sec = 20
1460
1485
  tool_timeout_sec = 120
1461
1486
  \`\`\`
1462
1487
 
1463
- ## Codegraph
1488
+ ## Codebase Memory MCP
1464
1489
 
1465
- Use codegraph for codebase exploration when the environment exposes it. The index is local state and should not be committed.
1490
+ Use codebase-memory-mcp for codebase exploration. The index is local state and should not be committed unless the team explicitly chooses a shared snapshot.
1466
1491
 
1467
- - Check for an index: look for \`.codegraph/\`
1468
- - Check CLI availability: \`codegraph --help\`
1469
- - Install CLI if needed: \`npm install -g @colbymchenry/codegraph\`
1470
- - Codex MCP CLI setup: \`codex mcp add codegraph -- codegraph serve --mcp\`
1492
+ - Check for an index: use the codebase-memory CLI status/index commands.
1493
+ - Check CLI availability: \`codebase-memory-mcp --help\`
1494
+ - Install CLI if needed: \`npm install -g codebase-memory-mcp\`
1495
+ - Index the repository: \`codebase-memory-mcp cli index_repository --repo-path .\`
1471
1496
  - Auto setup: \`thachvd-kit\`
1472
- - If your Codex environment provides the codegraph CLI, run its project indexing step from the repository root.
1473
- - Keep \`.codegraph/\` ignored in git.
1497
+ - If your Codex environment provides the codebase-memory CLI, run its indexing step from the repository root.
1498
+ - Keep local codebase-memory state ignored in git.
1474
1499
 
1475
1500
  Codex \`config.toml\` example:
1476
1501
 
1477
1502
  \`\`\`toml
1478
- [mcp_servers.codegraph]
1479
- command = "codegraph"
1480
- args = ["serve", "--mcp"]
1503
+ [mcp_servers.codebase-memory-mcp]
1504
+ command = "codebase-memory-mcp"
1481
1505
  startup_timeout_sec = 20
1482
1506
  tool_timeout_sec = 120
1483
1507
  \`\`\`
@@ -1489,9 +1513,8 @@ Gemini CLI / Antigravity \`mcp_config.json\` example:
1489
1513
  \`\`\`json
1490
1514
  {
1491
1515
  "mcpServers": {
1492
- "codegraph": {
1493
- "command": "codegraph",
1494
- "args": ["serve", "--mcp"]
1516
+ "codebase-memory-mcp": {
1517
+ "command": "codebase-memory-mcp"
1495
1518
  },
1496
1519
  "context7": {
1497
1520
  "command": "context7-mcp"
@@ -1518,10 +1541,9 @@ Claude Code user config example:
1518
1541
  \`\`\`json
1519
1542
  {
1520
1543
  "mcpServers": {
1521
- "codegraph": {
1522
- "type": "stdio",
1523
- "command": "codegraph",
1524
- "args": ["serve", "--mcp"]
1544
+ "codebase-memory-mcp": {
1545
+ "type": "stdio",
1546
+ "command": "codebase-memory-mcp"
1525
1547
  },
1526
1548
  "context7": {
1527
1549
  "type": "stdio",
@@ -1810,19 +1832,19 @@ function runDoctor() {
1810
1832
 
1811
1833
  const tools = [
1812
1834
  [CODEBASE_MEMORY_BINARY, `npm install -g ${CODEBASE_MEMORY_PACKAGE}`],
1813
- ['rtk', RTK_INSTALL_COMMAND],
1835
+ ['rtk', `recommended: ${RTK_INSTALL_COMMAND}`],
1814
1836
  ['agy', 'install Antigravity before running its Superpowers plugin command'],
1815
1837
  ['claude', 'install Claude Code before installing its Superpowers plugin'],
1816
1838
  ['codex', 'install Codex before using its Superpowers plugin']
1817
1839
  ];
1818
- console.log(`\n${pc.bold('Local integrations')}`);
1840
+ console.log(`\n${pc.bold('Local integrations (RTK recommended)')}`);
1819
1841
  for (const [binary, hint] of tools) {
1820
1842
  const ok = commandExists(binary);
1821
1843
  console.log(` ${ok ? pc.green('OK') : pc.yellow('WARN')} ${binary}${ok ? '' : ` - ${hint}`}`);
1822
1844
  }
1823
1845
 
1824
1846
  console.log(`\n${pc.bold('Next step')}`);
1825
- console.log(' Run thachvd-kit setup to configure MCP and print client-specific Superpowers setup.');
1847
+ console.log(' Run thachvd-kit prompt to print the saved project-indexing prompt.');
1826
1848
  }
1827
1849
 
1828
1850
  async function runSetup(args) {
@@ -1836,13 +1858,14 @@ async function runSetup(args) {
1836
1858
  console.log(` ${marker} ${result.message}`);
1837
1859
  }
1838
1860
  }
1839
- console.log(`\n${pc.bold('RTK')}`);
1861
+ console.log(`\n${pc.bold('RTK (recommended)')}`);
1840
1862
  if (commandExists('rtk')) {
1841
1863
  console.log(` ${pc.green('OK')} rtk already installed`);
1842
1864
  } else {
1843
- console.log(` ${pc.yellow('WARN')} rtk is not installed; run: ${RTK_INSTALL_COMMAND}`);
1865
+ console.log(` ${pc.yellow('WARN')} recommended: rtk is not installed; run: ${RTK_INSTALL_COMMAND}`);
1844
1866
  }
1845
1867
  console.log('\nRestart your AI client after installing plugins or changing MCP configuration.');
1868
+ console.log('Your onboarding prompt is saved at .agent/docs/index-project-prompt.md. Run thachvd-kit prompt to print it again.');
1846
1869
  }
1847
1870
 
1848
1871
  function commandExists(command) {
@@ -2078,6 +2101,11 @@ async function main() {
2078
2101
  return;
2079
2102
  }
2080
2103
 
2104
+ if (command === 'prompt') {
2105
+ printProjectPrompt();
2106
+ return;
2107
+ }
2108
+
2081
2109
  if (command === 'setup') {
2082
2110
  await runSetup(rawArgs.slice(1));
2083
2111
  return;
@@ -2157,9 +2185,10 @@ async function main() {
2157
2185
  [path.join('.agent', 'docs', 'project.md'), generateProjectDoc(data)],
2158
2186
  [path.join('.agent', 'docs', 'architecture.md'), generateArchitectureDoc(data)],
2159
2187
  [path.join('.agent', 'docs', 'conventions.md'), generateConventionsDoc(data)],
2160
- [path.join('.agent', 'docs', 'workflow.md'), generateWorkflowDoc()],
2188
+ [path.join('.agent', 'docs', 'workflow.md'), generateWorkflowDoc()],
2161
2189
  [path.join('.agent', 'docs', 'tooling.md'), generateToolingDoc(data)],
2162
- [path.join('.agent', 'docs', 'getting-started.md'), generateGettingStartedDoc()]
2190
+ [path.join('.agent', 'docs', 'getting-started.md'), generateGettingStartedDoc()],
2191
+ [path.join('.agent', 'docs', 'index-project-prompt.md'), generateIndexProjectPrompt()]
2163
2192
  ];
2164
2193
 
2165
2194
  for (const [relativePath, content] of generatedFiles) {
@@ -2186,26 +2215,22 @@ async function main() {
2186
2215
  - ${pc.bold('CLAUDE.md')} Claude Code entry that imports AGENTS.md
2187
2216
  - ${pc.bold('GEMINI.md')} Antigravity entry
2188
2217
  - ${pc.bold('.cursorrules')} Cursor entry
2189
- - ${pc.bold('.agent/docs/')} scan-based project rules, including ${pc.bold('getting-started.md')} (standard flow vs fast path)
2190
- - ${pc.bold('.agent/docs/')} project context and local operating notes
2218
+ - ${pc.bold('.agent/docs/')} scan-based project rules and local operating notes
2219
+ - ${pc.bold('.agent/docs/index-project-prompt.md')} durable onboarding prompt
2191
2220
 
2192
2221
  ${pc.bold('MCP/tooling setup:')}
2193
2222
  - Superpowers is the workflow backend; install it from the official client/plugin surface
2194
- - Run ${pc.bold('thachvd-kit setup')} to configure codebase-memory MCP and optional RTK
2223
+ - Run ${pc.bold('thachvd-kit setup')} to configure codebase-memory MCP and recommended RTK
2195
2224
 
2196
2225
  ${pc.bold('Next steps:')}
2197
- 1. Read ${pc.bold('.agent/docs/getting-started.md')} for the standard Superpowers flow
2198
- 2. Run ${pc.bold('thachvd-kit setup')} for optional integrations
2226
+ 1. Run ${pc.bold('thachvd-kit prompt')} and paste the saved prompt into your AI editor
2227
+ 2. Install Superpowers and RTK, then run ${pc.bold('thachvd-kit setup')}
2199
2228
  3. Run ${pc.bold('thachvd-kit doctor')} to verify the machine
2200
- 4. Commit ${pc.bold('AGENTS.md')}, ${pc.bold('CLAUDE.md')}, ${pc.bold('GEMINI.md')}, ${pc.bold('.cursorrules')}, and ${pc.bold('.agent/docs/')}
2229
+ 4. Re-run ${pc.bold('thachvd-kit prompt')} whenever you need the onboarding prompt again
2201
2230
 
2202
- ${pc.bold('Copy this prompt into your AI editor:')}
2203
- ${pc.dim('---')}
2204
- Read CLAUDE.md (if using Claude Code), AGENTS.md, and all files under .agent/docs/.
2205
- Use Superpowers for the workflow and use codebase-memory MCP for structural code discovery when available.
2206
- Ask me what this project does and any important conventions I want preserved.
2207
- Then scan this repository and refine the generated context docs with factual rules.
2208
- Do not implement product code during onboarding.
2231
+ ${pc.bold('Onboarding prompt saved to .agent/docs/index-project-prompt.md:')}
2232
+ ${pc.dim('---')}
2233
+ ${generateIndexProjectPrompt().trim()}
2209
2234
  ${pc.dim('---')}
2210
2235
  `);
2211
2236
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thachvd-kit",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "Cross-agent project rules bootstrap kit for Codex, Antigravity, and Claude Code",
5
5
  "bin": {
6
6
  "thachvd-kit": "./bin/cli.js"