thachvd-kit 1.0.16 → 1.0.17

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 (2) hide show
  1. package/bin/cli.js +97 -97
  2. package/package.json +3 -3
package/bin/cli.js CHANGED
@@ -800,7 +800,7 @@ function scanProject() {
800
800
  code_style: 'project-standard',
801
801
  architecture_notes: '<!-- Add notes -->',
802
802
  current_phase: 'Initial setup',
803
- next_phase: '—',
803
+ next_phase: '-',
804
804
  known_issues: '<!-- None yet -->'
805
805
  };
806
806
  }
@@ -903,67 +903,67 @@ This repository uses AGENTS.md as the shared cross-agent entry file. Follow the
903
903
  `;
904
904
  }
905
905
 
906
- function generateSharedGeminiMd() {
907
- return `# GEMINI.md
908
-
909
- Antigravity entry file for this project.
910
-
911
- Read AGENTS.md first, then follow the shared docs under .agent/docs/.
912
- `;
913
- }
914
-
915
- function resolveCommands(data) {
916
- const frameworks = data.frameworks || [];
917
- const primaryLang = data.primary_language || 'javascript';
918
- const pkgManager = data.package_manager || 'npm';
919
- const testFramework = data.test_framework || 'auto-detect';
920
-
921
- const isPython = primaryLang === 'python';
922
- const isGo = primaryLang === 'go';
923
- const isRust = primaryLang === 'rust';
924
- const isPhp = primaryLang === 'php';
925
-
926
- let install = 'npm install';
927
- let dev = 'npm run dev';
928
- let build = 'npm run build';
929
- let test = 'npm test';
930
- let lint = 'npm run lint';
931
-
932
- if (pkgManager === 'pnpm') { install = 'pnpm install'; dev = 'pnpm dev'; build = 'pnpm build'; test = 'pnpm test'; lint = 'pnpm lint'; }
933
- else if (pkgManager === 'yarn') { install = 'yarn'; dev = 'yarn dev'; build = 'yarn build'; test = 'yarn test'; lint = 'yarn lint'; }
934
- else if (pkgManager === 'bun') { install = 'bun install'; dev = 'bun dev'; build = 'bun run build'; test = 'bun test'; lint = 'bun run lint'; }
935
- else if (isPython) { install = 'pip install -r requirements.txt'; dev = 'python manage.py runserver'; build = '# no build step'; test = 'pytest'; lint = 'ruff check .'; }
936
- else if (isGo) { install = 'go mod download'; dev = 'go run .'; build = 'go build ./...'; test = 'go test ./...'; lint = 'golangci-lint run'; }
937
- else if (isRust) { install = 'cargo build'; dev = 'cargo run'; build = 'cargo build --release'; test = 'cargo test'; lint = 'cargo clippy'; }
938
- else if (isPhp) {
939
- install = 'composer install';
940
- build = '# no build step';
941
- test = testFramework === 'pest' ? './vendor/bin/pest' : './vendor/bin/phpunit';
942
- const isCakePHP = frameworks.some(f => f.toLowerCase().includes('cakephp'));
943
- const isSymfony = frameworks.some(f => f.toLowerCase().includes('symfony'));
944
- const isCodeIgniter = frameworks.some(f => f.toLowerCase().includes('codeigniter'));
945
- if (isCakePHP) {
946
- dev = 'bin/cake server';
947
- lint = './vendor/bin/phpcs';
948
- } else if (isSymfony) {
949
- dev = 'bin/console server:run';
950
- lint = './vendor/bin/phpcs';
951
- } else if (isCodeIgniter) {
952
- dev = 'php spark serve';
953
- lint = './vendor/bin/phpcs';
954
- } else {
955
- dev = 'php artisan serve';
956
- lint = 'php artisan pint';
957
- }
958
- }
959
-
960
- if (testFramework === 'vitest') test = `${pkgManager === 'pnpm' ? 'pnpm' : pkgManager === 'yarn' ? 'yarn' : pkgManager === 'bun' ? 'bun run' : 'npx'} vitest`;
961
- else if (testFramework === 'jest') test = `${pkgManager === 'pnpm' ? 'pnpm' : pkgManager === 'yarn' ? 'yarn' : 'npx'} jest`;
962
-
963
- return { install, dev, build, test, lint };
964
- }
965
-
966
- function generateProjectDoc(data) {
906
+ function generateSharedGeminiMd() {
907
+ return `# GEMINI.md
908
+
909
+ Antigravity entry file for this project.
910
+
911
+ Read AGENTS.md first, then follow the shared docs under .agent/docs/.
912
+ `;
913
+ }
914
+
915
+ function resolveCommands(data) {
916
+ const frameworks = data.frameworks || [];
917
+ const primaryLang = data.primary_language || 'javascript';
918
+ const pkgManager = data.package_manager || 'npm';
919
+ const testFramework = data.test_framework || 'auto-detect';
920
+
921
+ const isPython = primaryLang === 'python';
922
+ const isGo = primaryLang === 'go';
923
+ const isRust = primaryLang === 'rust';
924
+ const isPhp = primaryLang === 'php';
925
+
926
+ let install = 'npm install';
927
+ let dev = 'npm run dev';
928
+ let build = 'npm run build';
929
+ let test = 'npm test';
930
+ let lint = 'npm run lint';
931
+
932
+ if (pkgManager === 'pnpm') { install = 'pnpm install'; dev = 'pnpm dev'; build = 'pnpm build'; test = 'pnpm test'; lint = 'pnpm lint'; }
933
+ else if (pkgManager === 'yarn') { install = 'yarn'; dev = 'yarn dev'; build = 'yarn build'; test = 'yarn test'; lint = 'yarn lint'; }
934
+ else if (pkgManager === 'bun') { install = 'bun install'; dev = 'bun dev'; build = 'bun run build'; test = 'bun test'; lint = 'bun run lint'; }
935
+ else if (isPython) { install = 'pip install -r requirements.txt'; dev = 'python manage.py runserver'; build = '# no build step'; test = 'pytest'; lint = 'ruff check .'; }
936
+ else if (isGo) { install = 'go mod download'; dev = 'go run .'; build = 'go build ./...'; test = 'go test ./...'; lint = 'golangci-lint run'; }
937
+ else if (isRust) { install = 'cargo build'; dev = 'cargo run'; build = 'cargo build --release'; test = 'cargo test'; lint = 'cargo clippy'; }
938
+ else if (isPhp) {
939
+ install = 'composer install';
940
+ build = '# no build step';
941
+ test = testFramework === 'pest' ? './vendor/bin/pest' : './vendor/bin/phpunit';
942
+ const isCakePHP = frameworks.some(f => f.toLowerCase().includes('cakephp'));
943
+ const isSymfony = frameworks.some(f => f.toLowerCase().includes('symfony'));
944
+ const isCodeIgniter = frameworks.some(f => f.toLowerCase().includes('codeigniter'));
945
+ if (isCakePHP) {
946
+ dev = 'bin/cake server';
947
+ lint = './vendor/bin/phpcs';
948
+ } else if (isSymfony) {
949
+ dev = 'bin/console server:run';
950
+ lint = './vendor/bin/phpcs';
951
+ } else if (isCodeIgniter) {
952
+ dev = 'php spark serve';
953
+ lint = './vendor/bin/phpcs';
954
+ } else {
955
+ dev = 'php artisan serve';
956
+ lint = 'php artisan pint';
957
+ }
958
+ }
959
+
960
+ if (testFramework === 'vitest') test = `${pkgManager === 'pnpm' ? 'pnpm' : pkgManager === 'yarn' ? 'yarn' : pkgManager === 'bun' ? 'bun run' : 'npx'} vitest`;
961
+ else if (testFramework === 'jest') test = `${pkgManager === 'pnpm' ? 'pnpm' : pkgManager === 'yarn' ? 'yarn' : 'npx'} jest`;
962
+
963
+ return { install, dev, build, test, lint };
964
+ }
965
+
966
+ function generateProjectDoc(data) {
967
967
  const commands = resolveCommands(data);
968
968
  const agentRows = resolveAgentTable(data).map(([task, agent, skills]) => `| ${task} | \`${agent}\` | ${skills} |`).join('\n');
969
969
  const skillsList = resolveSkills(data).map(s => `- ${s}`).join('\n');
@@ -1100,16 +1100,16 @@ function copyAgentFolder() {
1100
1100
 
1101
1101
  function copyDir(src, dest) {
1102
1102
  fs.mkdirSync(dest, { recursive: true });
1103
- for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
1104
- const srcPath = path.join(src, entry.name);
1105
- const destPath = path.join(dest, entry.name);
1106
- const relativeSrc = path.relative(srcAgent, srcPath).split(path.sep).join('/');
1107
- if (relativeSrc === 'docs' || relativeSrc.startsWith('docs/')) {
1108
- continue;
1109
- }
1110
- if (entry.isDirectory()) {
1111
- copyDir(srcPath, destPath);
1112
- } else {
1103
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
1104
+ const srcPath = path.join(src, entry.name);
1105
+ const destPath = path.join(dest, entry.name);
1106
+ const relativeSrc = path.relative(srcAgent, srcPath).split(path.sep).join('/');
1107
+ if (relativeSrc === 'docs' || relativeSrc.startsWith('docs/')) {
1108
+ continue;
1109
+ }
1110
+ if (entry.isDirectory()) {
1111
+ copyDir(srcPath, destPath);
1112
+ } else {
1113
1113
  if (fs.existsSync(destPath)) {
1114
1114
  skipped++;
1115
1115
  } else {
@@ -1168,10 +1168,10 @@ async function main() {
1168
1168
  let useScan = args.includes('--scan');
1169
1169
  const assumeYes = args.includes('--yes') || args.includes('-y');
1170
1170
 
1171
- console.log(pc.bold(pc.cyan('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')));
1172
- console.log(' ' + pc.bold('thachvd-kit') + ' — Project Init Wizard');
1171
+ console.log(pc.bold(pc.cyan('='.repeat(50))));
1172
+ console.log(' ' + pc.bold('thachvd-kit') + ' - Project Init Wizard');
1173
1173
  console.log(` Generates AGENTS.md + .agent/ folder${useScan ? ' (scan-assisted)' : ''}`);
1174
- console.log(pc.bold(pc.cyan('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')) + '\n');
1174
+ console.log(pc.bold(pc.cyan('='.repeat(50))));
1175
1175
 
1176
1176
  let projectSetup = 'new';
1177
1177
  if (!useScan && !assumeYes) {
@@ -1213,12 +1213,12 @@ async function main() {
1213
1213
  if (useScan) {
1214
1214
  console.log(` ${pc.bold('Detected context:')}`);
1215
1215
  formatScanPreviewLines(scanned).forEach(([label, value]) => {
1216
- console.log(` · ${label}: ${value}`);
1216
+ console.log(` - ${label}: ${value}`);
1217
1217
  });
1218
1218
  console.log('');
1219
1219
  if ((scanned.scan_evidence || []).length > 0) {
1220
1220
  console.log(` ${pc.bold('Evidence:')}`);
1221
- scanned.scan_evidence.forEach(line => console.log(` · ${line}`));
1221
+ scanned.scan_evidence.forEach(line => console.log(` - ${line}`));
1222
1222
  console.log('');
1223
1223
  }
1224
1224
 
@@ -1313,11 +1313,11 @@ async function main() {
1313
1313
 
1314
1314
  console.log(`\n${pc.bold(pc.cyan('Generating Files'))}`);
1315
1315
 
1316
- // Shared entry files are written after the .agent folder is available.
1317
-
1318
- // Copy .agent folder
1319
- const { copied, skipped } = copyAgentFolder();
1320
- if (copied > 0) {
1316
+ // Shared entry files are written after the .agent folder is available.
1317
+
1318
+ // Copy .agent folder
1319
+ const { copied, skipped } = copyAgentFolder();
1320
+ if (copied > 0) {
1321
1321
  console.log(` ${pc.green('OK')} Copied ${pc.bold('.agent/')} (${copied} file${copied !== 1 ? 's' : ''} added${skipped > 0 ? `, ${skipped} skipped` : ''})`);
1322
1322
  } else if (skipped > 0) {
1323
1323
  console.log(` ${pc.yellow('~')} ${pc.bold('.agent/')} already exists - ${skipped} file${skipped !== 1 ? 's' : ''} skipped (no overwrite)`);
@@ -1352,21 +1352,21 @@ async function main() {
1352
1352
  - ${pc.bold('.agent/docs/')} scan-based project rules
1353
1353
  - ${pc.bold('.agent/')} skills, workflows, agents, and rules
1354
1354
 
1355
- ${pc.bold('Next steps:')}
1356
- 1. Review ${pc.bold('.agent/docs/')} and replace any TODO: refine items with real project facts
1357
- 2. Commit ${pc.bold('AGENTS.md')}, ${pc.bold('CLAUDE.md')}, ${pc.bold('GEMINI.md')}, and ${pc.bold('.agent/')}
1358
- 3. Open the project in Codex, Antigravity, or Claude Code
1359
-
1360
- ${pc.bold('Copy this prompt into your AI editor:')}
1361
- ${pc.dim('---')}
1362
- Read AGENTS.md and all files under .agent/docs/.
1363
- Scan this repository.
1364
- Update .agent/docs/project.md, .agent/docs/architecture.md, and .agent/docs/conventions.md with factual project-specific rules.
1365
- Do not implement product code.
1366
- Remove TODO: refine only when backed by evidence from the codebase.
1367
- ${pc.dim('---')}
1368
- `);
1369
- }
1355
+ ${pc.bold('Next steps:')}
1356
+ 1. Review ${pc.bold('.agent/docs/')} and replace any TODO: refine items with real project facts
1357
+ 2. Commit ${pc.bold('AGENTS.md')}, ${pc.bold('CLAUDE.md')}, ${pc.bold('GEMINI.md')}, and ${pc.bold('.agent/')}
1358
+ 3. Open the project in Codex, Antigravity, or Claude Code
1359
+
1360
+ ${pc.bold('Copy this prompt into your AI editor:')}
1361
+ ${pc.dim('---')}
1362
+ Read AGENTS.md and all files under .agent/docs/.
1363
+ Scan this repository.
1364
+ Update .agent/docs/project.md, .agent/docs/architecture.md, and .agent/docs/conventions.md with factual project-specific rules.
1365
+ Do not implement product code.
1366
+ Remove TODO: refine only when backed by evidence from the codebase.
1367
+ ${pc.dim('---')}
1368
+ `);
1369
+ }
1370
1370
 
1371
1371
  main().catch(err => {
1372
1372
  console.error(pc.red('\nError during init:'), err);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "thachvd-kit",
3
- "version": "1.0.16",
4
- "description": "Cross-agent project rules bootstrap kit for Codex, Antigravity, and Claude Code",
3
+ "version": "1.0.17",
4
+ "description": "Cross-agent project rules bootstrap kit for Codex, Antigravity, and Claude Code",
5
5
  "bin": {
6
6
  "thachvd-kit": "./bin/cli.js"
7
7
  },
@@ -22,7 +22,7 @@
22
22
  "node": ">=16.7"
23
23
  },
24
24
  "scripts": {
25
- "test": "node test/cli.test.js",
25
+ "test": "node test/cli.test.js",
26
26
  "release:patch": "npm version patch",
27
27
  "release:dry-run": "npm pack --dry-run",
28
28
  "release:publish": "npm publish"