thachvd-kit 1.0.22 → 1.0.23

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,15 @@
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
+ - 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,35 @@
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
9
 
10
10
  ## Skill Selection
11
11
 
12
12
  - 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`.
13
+ - Codex global skills live in ~/.codex/skills/ and are visible via the $ menu; thachvd-kit copies selected skills there on init.
14
+ - Claude Code project skills live in .claude/skills.
15
+ - Shared fallback skills live in .agent/skills.
16
16
  - 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.
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.
20
20
 
21
21
  ## 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.
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
+ ## When To Update Docs
31
+
32
+ - Update .agent/docs/architecture.md when structure, boundaries, or entry points change.
33
+ - Update .agent/docs/conventions.md when repeated project patterns become clear.
34
+ - Update .agent/docs/project.md when stack, scripts, app root, test tooling, or routing changes.
35
+ - Keep AGENTS.md concise. Put project-specific detail in .agent/docs.
package/bin/cli.js CHANGED
@@ -1476,18 +1476,10 @@ function mergeMcpJson(filePath, withType = false) {
1476
1476
  const baseServers = {
1477
1477
  codegraph: { command: 'codegraph', args: ['serve', '--mcp'] },
1478
1478
  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, '/')] }
1479
+ context7: { command: npxCmd, args: ['-y', '@upstash/context7-mcp'] }
1481
1480
  };
1482
1481
  if (data.permissions && Array.isArray(data.permissions.allow)) {
1483
1482
  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
1483
  "mcp__context7__resolve-library-id",
1492
1484
  "mcp__context7__query-docs"
1493
1485
  ];
@@ -1500,24 +1492,6 @@ function mergeMcpJson(filePath, withType = false) {
1500
1492
  for (const [name, server] of Object.entries(baseServers)) {
1501
1493
  if (!data.mcpServers[name]) {
1502
1494
  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
1495
  }
1522
1496
  }
1523
1497
  writeJsonFile(filePath, data);
@@ -1529,7 +1503,6 @@ function appendMcpTomlIfMissing(filePath) {
1529
1503
  fs.mkdirSync(path.dirname(filePath), { recursive: true });
1530
1504
  const existing = fs.existsSync(filePath) ? fs.readFileSync(filePath, 'utf8') : '';
1531
1505
  const blocks = [];
1532
- const normalizedTarget = targetDir.replace(/\\/g, '/');
1533
1506
  const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
1534
1507
  if (!/\[mcp_servers\.context7\]/.test(existing)) {
1535
1508
  blocks.push(`[mcp_servers.context7]
@@ -1537,14 +1510,6 @@ command = "${npxCmd}"
1537
1510
  args = ["-y", "@upstash/context7-mcp"]
1538
1511
  startup_timeout_sec = 20
1539
1512
  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
1513
  `);
1549
1514
  }
1550
1515
  if (!/\[mcp_servers\.codegraph\]/.test(existing)) {
@@ -1568,7 +1533,7 @@ tool_timeout_sec = 120
1568
1533
  }
1569
1534
  const separator = existing && !existing.endsWith('\n') ? '\n\n' : existing ? '\n' : '';
1570
1535
  fs.writeFileSync(filePath, existing + separator + blocks.join('\n'), 'utf8');
1571
- return { ok: true, message: `configured context7, filesystem, codegraph, playwright MCP in ${filePath}` };
1536
+ return { ok: true, message: `configured context7, codegraph, playwright MCP in ${filePath}` };
1572
1537
  }
1573
1538
 
1574
1539
  function setupMcpServers() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thachvd-kit",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
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"