thachvd-kit 1.0.23 → 1.0.25
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/.agent/docs/conventions.md +1 -0
- package/.agent/docs/workflow.md +2 -1
- package/bin/cli.js +33 -20
- package/kit/PROMPT_RECIPE.md +3 -3
- package/package.json +1 -1
|
@@ -12,4 +12,5 @@
|
|
|
12
12
|
|
|
13
13
|
- Run the focused test or lint command that matches the touched area.
|
|
14
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.
|
|
15
16
|
- Do not claim completion without verification evidence.
|
package/.agent/docs/workflow.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
2. Read .agent/docs/project.md.
|
|
7
7
|
3. Classify the request: question, survey, simple fix, feature, refactor, debug, UI, security, or deploy.
|
|
8
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
|
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
2. Inspect dependent files before editing.
|
|
25
26
|
3. Make the smallest coherent change.
|
|
26
27
|
4. Add or update focused tests when behavior changes.
|
|
27
|
-
5. Run verification.
|
|
28
|
+
5. Run verification (prioritize using Playwright MCP for web/UI changes to automate verification and capture screenshots).
|
|
28
29
|
6. Summarize changed files and verification evidence.
|
|
29
30
|
|
|
30
31
|
## When To Update 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
|
|
@@ -1336,7 +1345,6 @@ function copyAgentFolder() {
|
|
|
1336
1345
|
|
|
1337
1346
|
const destAgent = path.join(targetDir, '.agent');
|
|
1338
1347
|
let copied = 0;
|
|
1339
|
-
let skipped = 0;
|
|
1340
1348
|
|
|
1341
1349
|
function copyDir(src, dest) {
|
|
1342
1350
|
fs.mkdirSync(dest, { recursive: true });
|
|
@@ -1350,18 +1358,14 @@ function copyAgentFolder() {
|
|
|
1350
1358
|
if (entry.isDirectory()) {
|
|
1351
1359
|
copyDir(srcPath, destPath);
|
|
1352
1360
|
} else {
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
} else {
|
|
1356
|
-
fs.copyFileSync(srcPath, destPath);
|
|
1357
|
-
copied++;
|
|
1358
|
-
}
|
|
1361
|
+
fs.copyFileSync(srcPath, destPath);
|
|
1362
|
+
copied++;
|
|
1359
1363
|
}
|
|
1360
1364
|
}
|
|
1361
1365
|
}
|
|
1362
1366
|
|
|
1363
1367
|
copyDir(srcAgent, destAgent);
|
|
1364
|
-
return { copied, skipped };
|
|
1368
|
+
return { copied, skipped: 0 };
|
|
1365
1369
|
}
|
|
1366
1370
|
|
|
1367
1371
|
function copySelectedSkillFolders(data, assumeYes) {
|
|
@@ -1379,7 +1383,6 @@ function copySelectedSkillFolders(data, assumeYes) {
|
|
|
1379
1383
|
if (codexSkillsDir) destinations.push(codexSkillsDir);
|
|
1380
1384
|
|
|
1381
1385
|
let copied = 0;
|
|
1382
|
-
let skipped = 0;
|
|
1383
1386
|
let missing = 0;
|
|
1384
1387
|
|
|
1385
1388
|
function copyDir(src, dest) {
|
|
@@ -1389,8 +1392,6 @@ function copySelectedSkillFolders(data, assumeYes) {
|
|
|
1389
1392
|
const destPath = path.join(dest, entry.name);
|
|
1390
1393
|
if (entry.isDirectory()) {
|
|
1391
1394
|
copyDir(srcPath, destPath);
|
|
1392
|
-
} else if (fs.existsSync(destPath) && !assumeYes) {
|
|
1393
|
-
skipped++;
|
|
1394
1395
|
} else {
|
|
1395
1396
|
fs.mkdirSync(path.dirname(destPath), { recursive: true });
|
|
1396
1397
|
fs.copyFileSync(srcPath, destPath);
|
|
@@ -1410,13 +1411,25 @@ function copySelectedSkillFolders(data, assumeYes) {
|
|
|
1410
1411
|
}
|
|
1411
1412
|
}
|
|
1412
1413
|
|
|
1413
|
-
return { copied, skipped, missing, skills: selectedSkills };
|
|
1414
|
+
return { copied, skipped: 0, missing, skills: selectedSkills };
|
|
1414
1415
|
}
|
|
1415
1416
|
|
|
1416
1417
|
async function writeGeneratedFile(relativePath, content, assumeYes) {
|
|
1417
1418
|
const outputPath = path.join(targetDir, relativePath);
|
|
1418
1419
|
const exists = fs.existsSync(outputPath);
|
|
1419
|
-
if (exists && !assumeYes)
|
|
1420
|
+
if (exists && !assumeYes) {
|
|
1421
|
+
const response = await prompts({
|
|
1422
|
+
type: 'confirm',
|
|
1423
|
+
name: 'overwrite',
|
|
1424
|
+
message: `File ${pc.bold(relativePath)} already exists. Do you want to overwrite it?`,
|
|
1425
|
+
initial: false
|
|
1426
|
+
});
|
|
1427
|
+
if (response.overwrite === undefined) {
|
|
1428
|
+
console.log(pc.yellow('\nCancelled.'));
|
|
1429
|
+
process.exit(130);
|
|
1430
|
+
}
|
|
1431
|
+
if (!response.overwrite) return false;
|
|
1432
|
+
}
|
|
1420
1433
|
|
|
1421
1434
|
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
|
|
1422
1435
|
fs.writeFileSync(outputPath, content, 'utf8');
|
|
@@ -1661,9 +1674,9 @@ async function main() {
|
|
|
1661
1674
|
|
|
1662
1675
|
const generatedFiles = [
|
|
1663
1676
|
['AGENTS.md', generateSharedAgentsMd(data)],
|
|
1664
|
-
['CLAUDE.md', generateSharedClaudeMd()],
|
|
1677
|
+
['CLAUDE.md', generateSharedClaudeMd(data)],
|
|
1665
1678
|
['GEMINI.md', generateSharedGeminiMd()],
|
|
1666
|
-
['.cursorrules', generateSharedCursorrules()],
|
|
1679
|
+
['.cursorrules', generateSharedCursorrules(data)],
|
|
1667
1680
|
[path.join('.agent', 'docs', 'project.md'), generateProjectDoc(data)],
|
|
1668
1681
|
[path.join('.agent', 'docs', 'architecture.md'), generateArchitectureDoc(data)],
|
|
1669
1682
|
[path.join('.agent', 'docs', 'conventions.md'), generateConventionsDoc(data)],
|
|
@@ -1714,10 +1727,10 @@ async function main() {
|
|
|
1714
1727
|
|
|
1715
1728
|
${pc.bold('Copy this prompt into your AI editor:')}
|
|
1716
1729
|
${pc.dim('---')}
|
|
1717
|
-
Read AGENTS.md and all files under .agent/docs/.
|
|
1730
|
+
Read CLAUDE.md (if using Claude Code), AGENTS.md, and all files under .agent/docs/.
|
|
1718
1731
|
Ask me what this project does and any important conventions I want preserved.
|
|
1719
1732
|
Then scan this repository.
|
|
1720
|
-
Update AGENTS.md, .cursorrules and .agent/docs/project.md, .agent/docs/architecture.md, .agent/docs/conventions.md, .agent/docs/workflow.md, and .agent/docs/tooling.md with factual project-specific rules.
|
|
1733
|
+
Update CLAUDE.md, AGENTS.md, .cursorrules and .agent/docs/project.md, .agent/docs/architecture.md, .agent/docs/conventions.md, .agent/docs/workflow.md, and .agent/docs/tooling.md with factual project-specific rules.
|
|
1721
1734
|
Do not implement product code.
|
|
1722
1735
|
Remove TODO: refine only when backed by evidence from the codebase.
|
|
1723
1736
|
${pc.dim('---')}
|
package/kit/PROMPT_RECIPE.md
CHANGED
|
@@ -5,9 +5,9 @@ Use these prompts after `thachvd-kit init` when you want the AI agent to refine
|
|
|
5
5
|
## Initial Refinement
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
|
-
Read AGENTS.md and all files under .agent/docs/.
|
|
8
|
+
Read CLAUDE.md (if using Claude Code), AGENTS.md, and all files under .agent/docs/.
|
|
9
9
|
Scan the current repository.
|
|
10
|
-
Update .agent/docs/project.md, .agent/docs/architecture.md, and .agent/docs/conventions.md with factual project-specific rules.
|
|
10
|
+
Update CLAUDE.md, AGENTS.md, .cursorrules and .agent/docs/project.md, .agent/docs/architecture.md, and .agent/docs/conventions.md with factual project-specific rules.
|
|
11
11
|
Do not implement product code.
|
|
12
12
|
Remove TODO: refine items only when you have real evidence from the codebase.
|
|
13
13
|
```
|
|
@@ -15,7 +15,7 @@ Remove TODO: refine items only when you have real evidence from the codebase.
|
|
|
15
15
|
## Before A Feature
|
|
16
16
|
|
|
17
17
|
```text
|
|
18
|
-
Read AGENTS.md and .agent/docs/workflow.md.
|
|
18
|
+
Read CLAUDE.md (if using Claude Code), AGENTS.md, and .agent/docs/workflow.md.
|
|
19
19
|
Check whether .agent/docs/architecture.md and .agent/docs/conventions.md are accurate for this task.
|
|
20
20
|
If they are stale, update the relevant docs first.
|
|
21
21
|
Then define success criteria, implement the smallest coherent change, and verify.
|