thachvd-kit 1.0.31 → 1.0.33
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.
- package/LICENSE +21 -21
- package/README.md +109 -99
- package/bin/cli.js +1223 -1814
- package/bin/entry.js +31 -0
- package/bin/policy.js +196 -0
- package/package.json +4 -4
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 thachvd
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 thachvd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,99 +1,109 @@
|
|
|
1
|
-
# thachvd-kit
|
|
2
|
-
|
|
3
|
-
`thachvd-kit` bootstraps project context for AI coding agents. It creates shared entry files and scan-based documentation so an agent can understand the repository quickly.
|
|
4
|
-
|
|
5
|
-
Workflow skills are intentionally not copied into projects. Install [Superpowers](https://github.com/obra/superpowers#installation) through the official plugin surface for the AI client each member uses.
|
|
6
|
-
|
|
7
|
-
## Quick Start
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install -g thachvd-kit
|
|
11
|
-
cd your-project
|
|
12
|
-
thachvd-kit init
|
|
13
|
-
thachvd-kit setup
|
|
14
|
-
thachvd-kit doctor
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
`init` is safe and project-focused. It does not install external tools, modify global AI skill folders, or create a second workflow engine.
|
|
18
|
-
|
|
19
|
-
## Generated Files
|
|
20
|
-
|
|
21
|
-
- `AGENTS.md`: shared project instructions.
|
|
22
|
-
- `CLAUDE.md`: Claude Code entry file importing `AGENTS.md`.
|
|
23
|
-
- `GEMINI.md`: Antigravity entry file.
|
|
24
|
-
- `.cursorrules`: Cursor entry file.
|
|
25
|
-
- `.agent/docs/project.md`: detected stack, commands, and project evidence.
|
|
26
|
-
- `.agent/docs/architecture.md`: architecture notes to refine over time.
|
|
27
|
-
- `.agent/docs/conventions.md`: coding and verification conventions.
|
|
28
|
-
- `.agent/docs/workflow.md`: the project workflow contract.
|
|
29
|
-
- `.agent/docs/tooling.md`: Superpowers, MCP, RTK, and Playwright setup.
|
|
30
|
-
- `.agent/docs/getting-started.md`: member onboarding guide.
|
|
31
|
-
- `.agent/docs/index-project-prompt.md`: durable prompt for the first project scan.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
## Workflow
|
|
36
|
-
|
|
37
|
-
Superpowers is the primary workflow backend:
|
|
38
|
-
|
|
39
|
-
1. `brainstorming` for unclear requirements.
|
|
40
|
-
2. `using-git-worktrees` for isolated work.
|
|
41
|
-
3. `writing-plans`, then explicit approval.
|
|
42
|
-
4. `test-driven-development` and `executing-plans` or `subagent-driven-development`.
|
|
43
|
-
5. `requesting-code-review` and `verification-before-completion`.
|
|
44
|
-
6. `finishing-a-development-branch`.
|
|
45
|
-
|
|
46
|
-
For bugs, use `systematic-debugging`: reproduce, inspect, test hypotheses, add regression protection, fix the root cause, and verify.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
##
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Use
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
1
|
+
# thachvd-kit
|
|
2
|
+
|
|
3
|
+
`thachvd-kit` bootstraps project context for AI coding agents. It creates shared entry files and scan-based documentation so an agent can understand the repository quickly.
|
|
4
|
+
|
|
5
|
+
Workflow skills are intentionally not copied into projects. Install [Superpowers](https://github.com/obra/superpowers#installation) through the official plugin surface for the AI client each member uses.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g thachvd-kit
|
|
11
|
+
cd your-project
|
|
12
|
+
thachvd-kit init
|
|
13
|
+
thachvd-kit setup
|
|
14
|
+
thachvd-kit doctor
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`init` is safe and project-focused. It does not install external tools, modify global AI skill folders, or create a second workflow engine.
|
|
18
|
+
|
|
19
|
+
## Generated Files
|
|
20
|
+
|
|
21
|
+
- `AGENTS.md`: shared project instructions.
|
|
22
|
+
- `CLAUDE.md`: Claude Code entry file importing `AGENTS.md`.
|
|
23
|
+
- `GEMINI.md`: Antigravity entry file.
|
|
24
|
+
- `.cursorrules`: Cursor entry file.
|
|
25
|
+
- `.agent/docs/project.md`: detected stack, commands, and project evidence.
|
|
26
|
+
- `.agent/docs/architecture.md`: architecture notes to refine over time.
|
|
27
|
+
- `.agent/docs/conventions.md`: coding and verification conventions.
|
|
28
|
+
- `.agent/docs/workflow.md`: the project workflow contract.
|
|
29
|
+
- `.agent/docs/tooling.md`: Superpowers, MCP, RTK, and Playwright setup.
|
|
30
|
+
- `.agent/docs/getting-started.md`: member onboarding guide.
|
|
31
|
+
- `.agent/docs/index-project-prompt.md`: durable prompt for the first project scan.
|
|
32
|
+
|
|
33
|
+
`init` does not generate `.agent/skills`, `.agent/workflows`, `.agent/agents`, Forge commands, or client-specific skill copies. `setup` can optionally add a Claude Code Stop hook (see below); it never adds workflow content of its own.
|
|
34
|
+
|
|
35
|
+
## Workflow
|
|
36
|
+
|
|
37
|
+
Superpowers is the primary workflow backend:
|
|
38
|
+
|
|
39
|
+
1. `brainstorming` for unclear requirements.
|
|
40
|
+
2. `using-git-worktrees` for isolated work.
|
|
41
|
+
3. `writing-plans`, then explicit approval.
|
|
42
|
+
4. `test-driven-development` and `executing-plans` or `subagent-driven-development`.
|
|
43
|
+
5. `requesting-code-review` and `verification-before-completion`.
|
|
44
|
+
6. `finishing-a-development-branch`.
|
|
45
|
+
|
|
46
|
+
For bugs, use `systematic-debugging`: reproduce, inspect, test hypotheses, add regression protection, fix the root cause, and verify.
|
|
47
|
+
|
|
48
|
+
Fast-path eligibility is based on risk and contract surface, not file count. A localized, mechanically obvious, low-risk change with focused verification can use the client fast path; a one-file security, schema, payment, concurrency, or public-contract change should not.
|
|
49
|
+
|
|
50
|
+
## Engineering Policy
|
|
51
|
+
|
|
52
|
+
The generated context optimizes for the **smallest sufficient change**, not the fewest lines of code.
|
|
53
|
+
|
|
54
|
+
- Preserve required behavior, product and architectural contracts, UX/accessibility, security/data integrity, compatibility/performance, and maintainability before optimizing for simplicity.
|
|
55
|
+
- Reuse an existing project abstraction when it satisfies the contract. Do not bypass it merely because a lower-level primitive is shorter.
|
|
56
|
+
- Avoid speculative abstractions and unrelated refactors.
|
|
57
|
+
- Do not split code solely to satisfy a hard line-count target; prefer cohesive modules and split only for a concrete design or maintenance benefit.
|
|
58
|
+
- Use the cheapest reliable context source. Read known local code directly; use structural tooling for unknown ownership, call paths, architecture, or impact; avoid duplicate retrieval when one source already provides enough evidence.
|
|
59
|
+
|
|
60
|
+
## Integrations
|
|
61
|
+
|
|
62
|
+
### Superpowers
|
|
63
|
+
|
|
64
|
+
Install it separately for each AI client. The official guide contains the current commands for Claude Code, Antigravity, Codex App, Codex CLI, and Cursor.
|
|
65
|
+
|
|
66
|
+
### codebase-memory-mcp
|
|
67
|
+
|
|
68
|
+
Use it for structural discovery when symbol ownership, call paths, architecture, or impact are not already obvious:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npm install -g codebase-memory-mcp
|
|
72
|
+
codebase-memory-mcp cli index_repository --repo-path .
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The index is local state. Keep it out of git unless the team explicitly chooses to share a snapshot. If another structural index such as CodeGraph already provides sufficient evidence, avoid querying both for the same question.
|
|
76
|
+
|
|
77
|
+
### RTK
|
|
78
|
+
|
|
79
|
+
RTK is the recommended command-output layer, not a workflow engine. Prefer it by default for verbose shell commands:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
cargo install --git https://github.com/rtk-ai/rtk --branch master rtk
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Examples: `rtk git status`, `rtk npm test`, `rtk git log`. If it is not installed, run the underlying command directly.
|
|
86
|
+
|
|
87
|
+
## CLI
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
thachvd-kit init [--yes]
|
|
91
|
+
thachvd-kit setup [--no-setup-mcp] [--no-setup-hook] [--no-install-rtk] [--no-index]
|
|
92
|
+
thachvd-kit doctor
|
|
93
|
+
thachvd-kit prompt
|
|
94
|
+
thachvd-kit --help
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
`setup` configures MCP entries for detected clients, prints official Superpowers installation guidance, and adds a Claude Code Stop hook that checks for Plan/Review/Verification evidence before a feature or refactor can be reported as done (skip with `--no-setup-hook`). The hook only checks for evidence; it never prescribes which skill must produce it, so it works whether that evidence came from Superpowers or from a manual process. It also auto-installs missing npm-based MCP packages (`codebase-memory-mcp`, `context7-mcp`, `playwright-mcp`), indexes the current repository with `codebase-memory-mcp` (skip with `--no-index`), and installs `rtk` via `cargo` when `cargo` is available (skip with `--no-install-rtk`). Superpowers itself cannot be auto-installed by this CLI — it is installed through each AI client's own plugin command (e.g. `/plugin install ...` typed in the client's chat), not a shell command this tool can run. `doctor` is read-only and reports missing integrations without changing the machine.
|
|
98
|
+
|
|
99
|
+
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.
|
|
100
|
+
|
|
101
|
+
## Development
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npm install
|
|
105
|
+
npm test
|
|
106
|
+
npm run release:verify
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Release only from a clean, verified, pushed `main` branch. `npm publish` requires valid npm authentication and any configured 2FA code.
|