thachvd-kit 1.0.22 → 1.0.24

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.
@@ -1,23 +1,15 @@
1
- # Architecture Notes
2
-
3
- ## Current Map
4
-
5
- - `bin/cli.js`: Main Node.js CLI. Handles scan detection, prompts, file generation, and `.agent/` copy.
6
- - `.agent/`: Installed kit content copied into target projects.
7
- - `agents/`, `skills/`, `workflows/`, `rules/`: Source mirrors for kit content.
8
- - `kit/`: Human-facing kit docs and prompt recipes.
9
- - `scripts/`: Helper scripts used by generated workflows.
10
-
11
- ## Output Model
12
-
13
- `thachvd-kit init` creates thin root entry files and puts project-specific knowledge in `.agent/docs/`:
14
-
15
- - `AGENTS.md`: shared instructions for Codex, Antigravity, Claude Code, and Cursor.
16
- - `CLAUDE.md`: imports `AGENTS.md` for Claude Code.
17
- - `GEMINI.md`: points to `AGENTS.md` for Antigravity.
18
- - `.cursorrules`: points to `AGENTS.md` for Cursor.
19
- - `.agent/docs/*.md`: stack, architecture, conventions, and workflow.
20
-
21
- ## Maintenance Rule
22
-
23
- Keep root entry files short. Add project-specific details to `.agent/docs/*` and reusable behavior to `.agent/skills/*` or `.agent/workflows/*`.
1
+ # Architecture Notes
2
+
3
+ ## Current Map
4
+
5
+ - App root is the repository root unless refined below.
6
+ - TODO: refine major directories and responsibilities.
7
+ - TODO: refine main entry points, routing, state boundaries, and integration boundaries.
8
+
9
+ ## Detected Evidence
10
+
11
+ - language:javascript => found package.json; package.json -> JavaScript dependency graph
12
+
13
+ ## AI Maintenance Rule
14
+
15
+ Before non-trivial implementation work, inspect this file. If it is stale or still contains TODO items relevant to the task, update it from the code before editing product code.
@@ -1,21 +1,16 @@
1
- # Coding Conventions
2
-
3
- ## JavaScript CLI
4
-
5
- - Keep CLI behavior in `bin/cli.js` unless a helper becomes clearly reusable.
6
- - Prefer simple filesystem APIs from Node.js standard library.
7
- - Keep generated Markdown ASCII-only unless the target file already requires non-ASCII.
8
- - Avoid adding dependencies for small formatting or path operations.
9
-
10
- ## Docs And Rules
11
-
12
- - Root `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, and `.cursorrules` should stay concise.
13
- - Put scan-specific or project-specific detail in `.agent/docs/`.
14
- - Keep `.agent/rules/GEMINI.md` and `rules/GEMINI.md` aligned.
15
- - Keep mirrored source folders and `.agent/` content aligned when changing kit assets.
16
-
17
- ## Verification
18
-
19
- - Syntax-check `bin/cli.js` after edits.
20
- - Run `npm test`.
21
- - Run `npm pack --dry-run` for package output changes.
1
+ # Coding Conventions
2
+
3
+ ## Current Standards
4
+
5
+ - Maximum file length: 300 lines unless the existing project standard is stricter.
6
+ - Code comments and identifiers should be written in English.
7
+ - Keep changes scoped to the user request.
8
+ - Prefer existing local patterns over introducing new abstractions.
9
+ - TODO: refine naming, formatting, folder, API, state, styling, and testing conventions from the real codebase.
10
+
11
+ ## Verification
12
+
13
+ - Run the focused test or lint command that matches the touched area.
14
+ - If no automated check exists, document the manual verification performed.
15
+ - For UI/web changes, prioritize using Playwright MCP to automatically verify client-side behavior and capture screenshots.
16
+ - Do not claim completion without verification evidence.
@@ -1,40 +1,47 @@
1
- # Project Rules
2
-
3
- Generated by thachvd-kit.
4
-
5
- ## Summary
6
-
7
- - Name: thachvd-kit
8
- - Description: Project rules bootstrap kit for Codex, Antigravity, and Claude Code.
9
- - Type: CLI package
10
- - App root: `.`
11
-
12
- ## Stack
13
-
14
- - Language: JavaScript
15
- - Runtime: Node.js
16
- - Package manager: npm
17
- - CLI entry: `bin/cli.js`
18
- - Published package files: `.agent`, `agents`, `bin`, `kit`, `rules`, `scripts`, `skills`, `workflows`, `README.md`, `LICENSE`
19
-
20
- ## Commands
21
-
22
- - Install: `npm install`
23
- - Test: `npm test`
24
- - Package dry run: `npm pack --dry-run`
25
- - Publish: `npm publish`
26
-
27
- ## Agent Routing
28
-
29
- | Task Type | Agent | Primary Skills |
30
- |-----------|-------|----------------|
31
- | CLI behavior | `backend-specialist` | `nodejs-best-practices`, `clean-code` |
32
- | Docs/rules | `documentation-writer` | `documentation-templates` |
33
- | Workflow design | `project-planner` | `plan-writing`, `executing-plans` |
34
- | Security/release | `security-auditor` / `devops-engineer` | `vulnerability-scanner`, `deployment-procedures` |
35
-
36
- ## Verification
37
-
38
- - Run `node --check bin/cli.js` after CLI edits.
39
- - Run `npm test` before claiming code changes are complete.
40
- - Run `npm pack --dry-run` before release-oriented changes.
1
+ # Project Rules
2
+
3
+ Generated by thachvd-kit on 2026-06-16.
4
+
5
+ ## Summary
6
+
7
+ - Name: thachvd-kit
8
+ - Description: Cross-agent project rules bootstrap kit for Codex, Antigravity, and Claude Code
9
+ - Type: cli
10
+ - App root: .
11
+
12
+ ## Stack
13
+
14
+ - Language: javascript
15
+ - Frameworks: none
16
+ - Database: none
17
+ - Infrastructure: none
18
+ - Package manager: npm
19
+ - Test framework: auto-detect
20
+
21
+ ## Commands
22
+
23
+ - Install: `npm install`
24
+ - Dev: `npm run dev`
25
+ - Build: `npm run build`
26
+ - Test: `npm test`
27
+ - Lint: `npm run lint`
28
+
29
+ ## Agent Routing
30
+
31
+ | Task Type | Agent | Primary Skills |
32
+ |-----------|-------|----------------|
33
+ | Backend API | `backend-specialist` | nodejs-best-practices, api-design |
34
+ | Debug | `debugger` | systematic-debugging |
35
+ | Security | `security-auditor` | vulnerability-scanner |
36
+ | Planning | `project-planner` | brainstorming, plan-writing |
37
+
38
+ ## Auto-Resolved Skills
39
+
40
+ - api-design
41
+ - clean-code
42
+ - nodejs-best-practices
43
+ - systematic-debugging
44
+
45
+ ## Scan Evidence
46
+
47
+ - language:javascript => found package.json; package.json -> JavaScript dependency graph
@@ -9,7 +9,7 @@ Use Playwright for browser and UI verification when a task touches web behavior.
9
9
  - Check availability: `npx playwright --version`
10
10
  - Install browsers: `npx playwright install`
11
11
  - Codex MCP CLI setup: `codex mcp add playwright -- npx -y @playwright/mcp`
12
- - Auto setup: `thachvd-kit init`
12
+ - Auto setup: `thachvd-kit`
13
13
  - Kit helper: `python .agent/skills/webapp-testing/scripts/playwright_runner.py <url> --screenshot`
14
14
 
15
15
  If the project already has Playwright configured, prefer the project's existing scripts.
@@ -44,7 +44,7 @@ Use codegraph for codebase exploration when the environment exposes it. The inde
44
44
  - Check CLI availability: `codegraph --help`
45
45
  - Install CLI if needed: `npm install -g @colbymchenry/codegraph`
46
46
  - Codex MCP CLI setup: `codex mcp add codegraph -- codegraph serve --mcp`
47
- - Auto setup: `thachvd-kit init`
47
+ - Auto setup: `thachvd-kit`
48
48
  - If your Codex environment provides the codegraph CLI, run its project indexing step from the repository root.
49
49
  - Keep `.codegraph/` ignored in git.
50
50
 
@@ -124,6 +124,8 @@ Common local path:
124
124
 
125
125
  - Claude Code: `~/.claude.json` or `~/.claude/settings.json`
126
126
 
127
+ ## Native Skill Folders
128
+
127
129
  The shared kit skills live in `.agent/skills/`. Antigravity reads that folder directly. Codex shows skills from `~/.codex/skills/` in the `$` menu. Claude Code reads project skills from `.claude/skills/`.
128
130
 
129
131
  - Codex global skills: `~/.codex/skills/` — installed by `thachvd-kit init`, visible in Codex `$` menu
@@ -1,35 +1,36 @@
1
- # Agent Workflow
2
-
3
- ## Before Every Task
4
-
5
- 1. Read `AGENTS.md`.
6
- 2. Read `.agent/docs/project.md`.
7
- 3. Classify the request.
8
- 4. Load only the relevant agent, skill, or workflow docs.
1
+ # Agent Workflow
2
+
3
+ ## Before Every Task
4
+
5
+ 1. Read AGENTS.md.
6
+ 2. Read .agent/docs/project.md.
7
+ 3. Classify the request: question, survey, simple fix, feature, refactor, debug, UI, security, or deploy.
8
+ 4. Read only the relevant docs under .agent/agents, .agent/skills, .claude/skills, and .agent/workflows.
9
+ 5. Check if MCP servers (like `codegraph`) are active/available and prioritize using them as the primary entry point to search and locate files, symbols, and code blocks.
9
10
 
10
11
  ## Skill Selection
11
12
 
12
13
  - Prefer native skill discovery when the client exposes it.
13
- - Codex repo skills live in `.agents/skills`.
14
- - Claude Code project skills live in `.claude/skills`.
15
- - Shared fallback skills live in `.agent/skills`.
14
+ - Codex global skills live in ~/.codex/skills/ and are visible via the $ menu; thachvd-kit copies selected skills there on init.
15
+ - Claude Code project skills live in .claude/skills.
16
+ - Shared fallback skills live in .agent/skills.
16
17
  - Do not load skill bodies by default.
17
- - Load a skill when the user mentions it, the task clearly matches its `SKILL.md` description, or `.agent/docs/project.md` routes the task to it.
18
- - Use explicit skill names in prompts for predictable behavior, for example `$webapp-testing` or `$clean-code`.
19
- - Run `thachvd-kit --help` to see common workflow and skill recommendations.
18
+ - Load a skill when the user mentions it, the task clearly matches its SKILL.md description, or .agent/docs/project.md routes the task to it.
19
+ - Use explicit skill names in prompts for predictable behavior, for example $webapp-testing or $clean-code.
20
+ - Run thachvd-kit --help to see common workflow and skill recommendations.
20
21
 
21
22
  ## Implementation Flow
22
-
23
- 1. State assumptions and success criteria when the task is not trivial.
24
- 2. Inspect dependent files before editing.
25
- 3. Make the smallest coherent change.
26
- 4. Add or update focused tests when behavior changes.
27
- 5. Run verification.
28
- 6. Summarize changed files and verification evidence.
29
-
30
- ## Release Flow
31
-
32
- 1. Update package metadata when changing publish behavior.
33
- 2. Run `npm test`.
34
- 3. Run `npm pack --dry-run`.
35
- 4. Review tarball contents before publish.
23
+
24
+ 1. State assumptions and success criteria when the task is not trivial.
25
+ 2. Inspect dependent files before editing.
26
+ 3. Make the smallest coherent change.
27
+ 4. Add or update focused tests when behavior changes.
28
+ 5. Run verification (prioritize using Playwright MCP for web/UI changes to automate verification and capture screenshots).
29
+ 6. Summarize changed files and verification evidence.
30
+
31
+ ## When To Update Docs
32
+
33
+ - Update .agent/docs/architecture.md when structure, boundaries, or entry points change.
34
+ - Update .agent/docs/conventions.md when repeated project patterns become clear.
35
+ - Update .agent/docs/project.md when stack, scripts, app root, test tooling, or routing changes.
36
+ - Keep AGENTS.md concise. Put project-specific detail in .agent/docs.
package/bin/cli.js CHANGED
@@ -931,6 +931,7 @@ If any \`.agent/docs/*.md\` file still contains \`TODO: refine\`, update the doc
931
931
  - State assumptions when the request is ambiguous.
932
932
  - Prefer the existing project style over new abstractions.
933
933
  - Keep changes surgical and remove only dead code introduced by your change.
934
+ - **MCP First**: Prioritize using MCP server tools (e.g., \`codegraph\` for codebase search/symbol tracking, \`context7\` for API/docs queries, and \`playwright\` for browser/UI testing and verification) to explore, search, and verify rather than recursively listing directories, running expensive shell commands/grep, or reading large files. This minimizes token usage and maintains a cleaner context.
934
935
  - Tests or equivalent verification are mandatory before claiming done.
935
936
  - Keep files under ${data.max_file_lines || '300'} lines unless the project already has a different standard in \`.agent/docs/conventions.md\`.
936
937
 
@@ -948,9 +949,11 @@ If any \`.agent/docs/*.md\` file still contains \`TODO: refine\`, update the doc
948
949
  `;
949
950
  }
950
951
 
951
- function generateSharedClaudeMd() {
952
+ function generateSharedClaudeMd(data) {
952
953
  return `@AGENTS.md
953
954
 
955
+ ${generateSharedAgentsMd(data)}
956
+
954
957
  ## Claude Code
955
958
 
956
959
  This repository uses AGENTS.md as the shared cross-agent entry file. Follow the imported instructions and keep Claude-specific notes here only when they cannot apply to Codex or Antigravity.
@@ -966,12 +969,16 @@ Read AGENTS.md first, then follow the shared docs under .agent/docs/.
966
969
  `;
967
970
  }
968
971
 
969
- function generateSharedCursorrules() {
972
+ function generateSharedCursorrules(data) {
970
973
  return `# Cursor Rules
971
974
 
972
975
  This repository uses AGENTS.md as the shared cross-agent entry file. Follow the instructions in AGENTS.md and keep Cursor-specific notes here only when they cannot apply to Codex, Antigravity, or Claude Code.
973
976
 
974
977
  Read AGENTS.md first, then follow the shared docs under .agent/docs/.
978
+
979
+ ---
980
+
981
+ ${generateSharedAgentsMd(data)}
975
982
  `;
976
983
  }
977
984
 
@@ -1119,6 +1126,7 @@ function generateConventionsDoc(data) {
1119
1126
 
1120
1127
  - Run the focused test or lint command that matches the touched area.
1121
1128
  - If no automated check exists, document the manual verification performed.
1129
+ - For UI/web changes, prioritize using Playwright MCP to automatically verify client-side behavior and capture screenshots.
1122
1130
  - Do not claim completion without verification evidence.
1123
1131
  `;
1124
1132
  }
@@ -1132,6 +1140,7 @@ function generateWorkflowDoc() {
1132
1140
  2. Read .agent/docs/project.md.
1133
1141
  3. Classify the request: question, survey, simple fix, feature, refactor, debug, UI, security, or deploy.
1134
1142
  4. Read only the relevant docs under .agent/agents, .agent/skills, .claude/skills, and .agent/workflows.
1143
+ 5. Check if MCP servers (like \`codegraph\`) are active/available and prioritize using them as the primary entry point to search and locate files, symbols, and code blocks.
1135
1144
 
1136
1145
  ## Skill Selection
1137
1146
 
@@ -1150,7 +1159,7 @@ function generateWorkflowDoc() {
1150
1159
  2. Inspect dependent files before editing.
1151
1160
  3. Make the smallest coherent change.
1152
1161
  4. Add or update focused tests when behavior changes.
1153
- 5. Run verification.
1162
+ 5. Run verification (prioritize using Playwright MCP for web/UI changes to automate verification and capture screenshots).
1154
1163
  6. Summarize changed files and verification evidence.
1155
1164
 
1156
1165
  ## When To Update Docs
@@ -1476,18 +1485,10 @@ function mergeMcpJson(filePath, withType = false) {
1476
1485
  const baseServers = {
1477
1486
  codegraph: { command: 'codegraph', args: ['serve', '--mcp'] },
1478
1487
  playwright: { command: npxCmd, args: ['-y', '@playwright/mcp'] },
1479
- context7: { command: npxCmd, args: ['-y', '@upstash/context7-mcp'] },
1480
- filesystem: { command: npxCmd, args: ['-y', '@modelcontextprotocol/server-filesystem', targetDir.replace(/\\/g, '/')] }
1488
+ context7: { command: npxCmd, args: ['-y', '@upstash/context7-mcp'] }
1481
1489
  };
1482
1490
  if (data.permissions && Array.isArray(data.permissions.allow)) {
1483
1491
  const requiredPermissions = [
1484
- "mcp__filesystem__read_file",
1485
- "mcp__filesystem__read_multiple_files",
1486
- "mcp__filesystem__list_directory",
1487
- "mcp__filesystem__directory_tree",
1488
- "mcp__filesystem__search_files",
1489
- "mcp__filesystem__get_file_info",
1490
- "mcp__filesystem__write_file",
1491
1492
  "mcp__context7__resolve-library-id",
1492
1493
  "mcp__context7__query-docs"
1493
1494
  ];
@@ -1500,24 +1501,6 @@ function mergeMcpJson(filePath, withType = false) {
1500
1501
  for (const [name, server] of Object.entries(baseServers)) {
1501
1502
  if (!data.mcpServers[name]) {
1502
1503
  data.mcpServers[name] = withType ? { type: 'stdio', ...server } : server;
1503
- } else if (name === 'filesystem') {
1504
- const fsServer = data.mcpServers[name];
1505
- if (fsServer && Array.isArray(fsServer.args)) {
1506
- // If it points to non-existent AppData roaming file, fix it to use npx
1507
- const isLegacyNode = fsServer.command === 'node' && fsServer.args[0] && fsServer.args[0].includes('server-filesystem');
1508
- if (isLegacyNode) {
1509
- fsServer.command = npxCmd;
1510
- fsServer.args[0] = '-y';
1511
- fsServer.args.splice(1, 0, '@modelcontextprotocol/server-filesystem');
1512
- }
1513
- const normalizedTarget = targetDir.replace(/\\/g, '/');
1514
- const hasTarget = fsServer.args.some(arg => {
1515
- return typeof arg === 'string' && (arg.replace(/\\/g, '/').toLowerCase() === normalizedTarget.toLowerCase());
1516
- });
1517
- if (!hasTarget) {
1518
- fsServer.args.push(normalizedTarget);
1519
- }
1520
- }
1521
1504
  }
1522
1505
  }
1523
1506
  writeJsonFile(filePath, data);
@@ -1529,7 +1512,6 @@ function appendMcpTomlIfMissing(filePath) {
1529
1512
  fs.mkdirSync(path.dirname(filePath), { recursive: true });
1530
1513
  const existing = fs.existsSync(filePath) ? fs.readFileSync(filePath, 'utf8') : '';
1531
1514
  const blocks = [];
1532
- const normalizedTarget = targetDir.replace(/\\/g, '/');
1533
1515
  const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
1534
1516
  if (!/\[mcp_servers\.context7\]/.test(existing)) {
1535
1517
  blocks.push(`[mcp_servers.context7]
@@ -1537,14 +1519,6 @@ command = "${npxCmd}"
1537
1519
  args = ["-y", "@upstash/context7-mcp"]
1538
1520
  startup_timeout_sec = 20
1539
1521
  tool_timeout_sec = 120
1540
- `);
1541
- }
1542
- if (!/\[mcp_servers\.filesystem\]/.test(existing)) {
1543
- blocks.push(`[mcp_servers.filesystem]
1544
- command = "${npxCmd}"
1545
- args = ["-y", "@modelcontextprotocol/server-filesystem", "${normalizedTarget}"]
1546
- startup_timeout_sec = 20
1547
- tool_timeout_sec = 120
1548
1522
  `);
1549
1523
  }
1550
1524
  if (!/\[mcp_servers\.codegraph\]/.test(existing)) {
@@ -1568,7 +1542,7 @@ tool_timeout_sec = 120
1568
1542
  }
1569
1543
  const separator = existing && !existing.endsWith('\n') ? '\n\n' : existing ? '\n' : '';
1570
1544
  fs.writeFileSync(filePath, existing + separator + blocks.join('\n'), 'utf8');
1571
- return { ok: true, message: `configured context7, filesystem, codegraph, playwright MCP in ${filePath}` };
1545
+ return { ok: true, message: `configured context7, codegraph, playwright MCP in ${filePath}` };
1572
1546
  }
1573
1547
 
1574
1548
  function setupMcpServers() {
@@ -1696,9 +1670,9 @@ async function main() {
1696
1670
 
1697
1671
  const generatedFiles = [
1698
1672
  ['AGENTS.md', generateSharedAgentsMd(data)],
1699
- ['CLAUDE.md', generateSharedClaudeMd()],
1673
+ ['CLAUDE.md', generateSharedClaudeMd(data)],
1700
1674
  ['GEMINI.md', generateSharedGeminiMd()],
1701
- ['.cursorrules', generateSharedCursorrules()],
1675
+ ['.cursorrules', generateSharedCursorrules(data)],
1702
1676
  [path.join('.agent', 'docs', 'project.md'), generateProjectDoc(data)],
1703
1677
  [path.join('.agent', 'docs', 'architecture.md'), generateArchitectureDoc(data)],
1704
1678
  [path.join('.agent', 'docs', 'conventions.md'), generateConventionsDoc(data)],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thachvd-kit",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
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"