add-coder 0.2.0 โ†’ 0.2.1

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 (3) hide show
  1. package/README.en.md +95 -7
  2. package/README.md +245 -9
  3. package/package.json +2 -2
package/README.en.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # add-coder
2
2
 
3
- > ๐ŸŒ [๐Ÿ€„ไธญๆ–‡](./README.md) | English
3
+ > ๐ŸŒ [๐Ÿ€„ไธญๆ–‡](https://github.com/xiaomingming92/add-coder/blob/main/README.md) | ๐Ÿ”ค[English] โ€” โš ๏ธ This file is temporarily unmaintained. The English translation is now embedded in README.md (scroll to ## ๐Ÿ”ค English README). Will resume standalone maintenance when the community grows.
4
4
 
5
5
  **AI Governance, Implemented** โ€” The complete scaffolding from [codein2027](https://github.com/xiaomingming92/codein2027) for rapidly building the ADD programming paradigm. Built on the core principle of **Audit as Infrastructure**, it shatters the black-box programming process and cross-session amnesia, evolving the programming paradigm into an auditable, traceable, and convergent new era. [NPM](https://www.npmjs.com/package/add-coder) ยท [GitHub](https://github.com/xiaomingming92/add-coder)
6
6
 
@@ -181,12 +181,13 @@ npx add-coder init
181
181
  โ”‚ Handoff / DevLog Timeline Docs โ”‚
182
182
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
183
183
  โ”‚
184
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
185
- โ–ผ โ–ผ โ–ผ
186
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
187
- โ”‚ Claude โ”‚ โ”‚ Qoder โ”‚ โ”‚ VS Code โ”‚
188
- โ”‚ Hooks โ”‚ โ”‚ Hooks โ”‚ โ”‚ Config โ”‚
189
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
184
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
185
+ โ–ผ โ–ผ โ–ผ โ–ผ โ–ผ
186
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”
187
+ โ”‚Claudeโ”‚ โ”‚Qoder โ”‚ โ”‚ VS Code โ”‚ โ”‚ Trae โ”‚ โ”‚Codex โ”‚
188
+ โ”‚Hooks โ”‚ โ”‚Hooks โ”‚ โ”‚ Config โ”‚ โ”‚Hooks โ”‚ โ”‚Hooks โ”‚
189
+ โ”‚14/17 โ”‚ โ”‚10/17 โ”‚ โ”‚ 10/17 โ”‚ โ”‚ 6/17 โ”‚ โ”‚ 6/17 โ”‚
190
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
190
191
  โ”‚
191
192
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
192
193
  โ–ผ
@@ -226,3 +227,90 @@ npx add-coder init
226
227
  |------|-------------|
227
228
  | Demo Repo | A full example repository showcasing end-to-end closed-loop practice of Policy-Update-Loop and the Report system |
228
229
  | MCP Restructure | MCP toolchain architecture upgrade, improving audit and gateway tool extensibility and standalone deployment capability |
230
+ | Memory Enhancement | Long-term project knowledge memory and plan-level sparse memory |
231
+
232
+ ---
233
+ <details id="chinese-readme">
234
+ <summary>๐Ÿ€„ ไธญๆ–‡ README</summary>
235
+
236
+ **AI ไปฃ็ ๆฒป็†็š„่ฝๅœฐๆ–นๆกˆ** โ€” [codein2027](https://github.com/xiaomingming92/codein2027) ๅฟซ้€Ÿๆž„ๅปบ ADD ็ผ–็จ‹่Œƒๅผ็š„ๅฎŒๆ•ด่„šๆ‰‹ๆžถใ€‚ไปฅใ€Œๅฎก่ฎกๅณๅŸบ็ก€่ฎพๆ–ฝใ€ไธบๆ ธๅฟƒ๏ผŒๅฝปๅบ•ๆ‰“็ ด็ผ–็จ‹่ฟ‡็จ‹้ป‘็›’ไธŽ่ทจ่ฝฎๅคฑๅฟ†๏ผŒ่ฎฉ็ผ–็จ‹่Œƒๅผ่ฟ›ๅŒ–ไธบๅฏๅฎก่ฎกใ€ๅฏ่ฟฝๆบฏใ€ๅฏๆ”ถๆ•›็š„ๆ–ฐๆ—ถไปฃใ€‚ [NPM](https://www.npmjs.com/package/add-coder) ยท [GitHub](https://github.com/xiaomingming92/add-coder)
237
+
238
+ > ๐Ÿงญ **ไปŽ้›ถไธŠๆ‰‹ๅฎžๆ“๏ผŸ** ่ฏทๅ‚่ง [GUIDE.md](https://github.com/xiaomingming92/add-coder/blob/main/GUIDE.md)
239
+
240
+ ```bash
241
+ npx add-coder init
242
+ ```
243
+
244
+ ## ่ฟ™ไธๆ˜ฏๆจกๆฟๅทฅๅ…ท๏ผŒ่ฟ™ๆ˜ฏๆžถๆž„ๅทฎๅผ‚
245
+
246
+ ### โ‘  ๅฎก่ฎกๆ˜ฏๅŸบ็ก€่ฎพๆ–ฝ๏ผŒ่€Œ้žไบ‹ๅŽๆ—ฅๅฟ—
247
+ | ไผ ็ปŸๆจกๅผ | add-coder |
248
+ |---|---|
249
+ | ๆ—ฅๅฟ—ๆ˜ฏ append-only ๆ–‡ๆœฌๆ–‡ไปถ | ๅฎก่ฎกๆ˜ฏ **็ป“ๆž„ๅŒ–ๆ•ฐๆฎ่กจ**๏ผˆDevOperation + AuditLog๏ผ‰๏ผŒๆ”ฏๆŒๆŒ‰ plan/step/agent/tool ๅคš็ปดๆŸฅ่ฏข |
250
+ | ๅฎก่ฎก้ ๅผ€ๅ‘่€…่‡ช่ง‰่ฎฐๅฝ• | **MCP ๅฎก่ฎกๅทฅๅ…ท้“พ** ่‡ชๅŠจ่ฎฐๅฝ•ๆฏๆฌกๆ“ไฝœ |
251
+ | ๆ— ๅ…ณ่”ๆ€ง | Plan โ†’ Spec โ†’ Task โ†’ Step โ†’ Tool Call๏ผŒๅฝขๆˆๅฎŒๆ•ด่ฏๆฎ้“พ |
252
+
253
+ ### โ‘ก ้—จ็ฆ้ฉฑๅŠจ๏ผŒ่€Œ้ž่‡ช็”ฑๅฏน่ฏ
254
+ ```
255
+ DPS (Design-Process Symmetry) โ€” ่ฎพ่ฎก/ๅฎž็Žฐ/ๆ–‡ๆกฃ/ๅฎก่ฎก ๅ››็ปดๅ„ 25%๏ผŒ< 85% BLOCKED
256
+ RAHS (Runtime Architecture Health Score) โ€” ่ฟ่กŒๆ—ถๆžถๆž„ๅฅๅบทๅบฆ๏ผŒ< 90% BLOCKED
257
+ ```
258
+ ่ฟ™ไธๆ˜ฏใ€Œๅปบ่ฎฎใ€๏ผŒๆ˜ฏ**ๆžถๆž„้˜ปๆ–ญ** โ€” ไธ้€š่ฟ‡้—ธ้—จ็š„ Step ๆ— ๆณ•ๆŽจ่ฟ›ๅˆฐไธ‹ไธ€ๆญฅใ€‚
259
+
260
+ ### โ‘ข ่ทจ่ฝฎ่ฎฐๅฟ†๏ผŒ่€Œ้žๆฏ่ฝฎๅคฑๅฟ†
261
+ - **Handoff ๆ–‡ๆกฃ** โ€” ๆฏ่ฝฎ Session ็ป“ๆŸๆ—ถ่‡ชๅŠจ็”Ÿๆˆ็ป“ๆž„ๅŒ–ไบคๆŽฅๆ–‡ๆกฃ
262
+ - **Plan ็ดขๅผ•** โ€” ๆ‰€ๆœ‰ Plan ้€š่ฟ‡ `index.md` ้›†ไธญ็ดขๅผ•
263
+ - **DevLog ๆ—ถๅบ่ฎฐๅฝ•** โ€” ๆฏไธ€ๆญฅๆ“ไฝœๅ†™ๅ…ฅ `{YYYY-MM}/{DD}/` ๆ—ถ้—ด่ฝด
264
+
265
+ ### โ‘ฃ Policy-Update-Loop๏ผšๆฒป็†่‡ชๆˆ‘่ฟ›ๅŒ–
266
+ ```
267
+ ๆ‰ง่กŒ โ†’ ๅฎก่ฎก โ†’ ่พน็•ŒๆŠฅๅ‘Š โ†’ ่ง„ๅˆ™่ฐƒๆ•ด โ†’ ไธ‹ไธ€่ฝฎๆ‰ง่กŒ
268
+ ```
269
+ ่ฟ่กŒๆ—ถไบง็”Ÿ็š„ Report ไผšๅ่ฟ‡ๆฅๆ›ดๆ–ฐ governance rulesใ€‚
270
+
271
+ ### โ‘ค ๅคš IDE ็š„ Hook ๅณๆฒป็†ๅฑ‚
272
+ | IDE | ๆฒป็†ๆ–‡ๆกฃ | ่ฆ†็›–ไบ‹ไปถ | Hook ้…็ฝฎ |
273
+ |---|---|---|---|
274
+ | Claude Code | [ADD-governance-claude-code.md](./ADD-governance-claude-code.md) | 14/17 | `.claude/hooks/*.sh` |
275
+ | Qoder CN | [ADD-governance-qoder-cn.md](./ADD-governance-qoder-cn.md) | 10/17 | `.qoder/hooks/*.sh` |
276
+ | VS Code Copilot | [ADD-governance-vscode-copilot.md](./ADD-governance-vscode-copilot.md) | 10/17 | `.github/hooks/*.json` โ†’ `.vscode/hooks/*.sh` |
277
+ | Trae | [ADD-governance-trae.md](./ADD-governance-trae.md) | 6/17 | `hooks.json` โ†’ `.trae/hooks/*.sh` |
278
+ | Codex | [ADD-governance-codex.md](./ADD-governance-codex.md) | 0 (ๅŽŸ็”Ÿ) / 14 (ๅฏผๅ…ฅ Claude) | `.codex/hooks.json` |
279
+
280
+ ## ๅฟซ้€Ÿๅผ€ๅง‹
281
+ ```bash
282
+ npx add-coder init
283
+ ```
284
+
285
+ | ๅ‘ฝไปค | ่ฏดๆ˜Ž |
286
+ |---|---|
287
+ | `init` | ๅˆๅง‹ๅŒ– ADD ๆจกๆฟ๏ผŒๆ”ฏๆŒ `--adapter claude\|qoder\|vscode\|trae\|codex\|auto` |
288
+ | `sync` | ๅขž้‡ๅŒๆญฅ็ผบๅคฑๆ–‡ไปถ |
289
+ | `status` | ๆฃ€ๆŸฅๆจกๆฟๅฎŒๆ•ดๆ€ง |
290
+
291
+ | ้€‰้กน | ่ฏดๆ˜Ž |
292
+ |---|---|
293
+ | `--adapter <type>` | ็›ฎๆ ‡ IDE๏ผšclaude / qoder / vscode / trae / codex / auto |
294
+ | `--force` | ่ฆ†็›–ๅทฒๆœ‰ๆ–‡ไปถ |
295
+ | `--dry-run` | ้ข„่งˆๆจกๅผ๏ผŒไธๅ†™ๅ…ฅ |
296
+
297
+ ## MCP ๅฎก่ฎกๅทฅๅ…ท้“พ
298
+ | ๅทฅๅ…ท | ็”จ้€” |
299
+ |---|---|
300
+ | `record_dev_operation` | ่ฎฐๅฝ•ๅผ€ๅ‘ๆ“ไฝœๅฎก่ฎก |
301
+ | `query_audit_logs` | ๆŒ‰ planKeyword / targetId ๆŸฅ่ฏขๅฎก่ฎก่ฎฐๅฝ• |
302
+ | `check_dps` | DPS ้—ธ้—จ๏ผˆ< 85% BLOCKED๏ผ‰ |
303
+ | `check_rahs` | RAHS ้—ธ้—จ๏ผˆ< 90% BLOCKED๏ผ‰ |
304
+
305
+ ## ๅ‰็ฝฎๆกไปถ
306
+ - Node.js >= 20 ยท Prisma ^7.0 ยท PostgreSQL / SQLite
307
+
308
+ ## ๐ŸŽฌ ้ข„ๅ‘Š
309
+ | ่ฎกๅˆ’ | ่ฏดๆ˜Ž |
310
+ |---|---|
311
+ | Demo ไป“ๅบ“ๆผ”็คบ | Policy-Update-Loop ไธŽ Report ไฝ“็ณป็ซฏๅˆฐ็ซฏ้—ญ็Žฏๅฎž่ทต |
312
+ | MCP ่ƒฝๅŠ›้‡ๆž„ | MCP ๅทฅๅ…ท้“พๆžถๆž„ๅ‡็บง |
313
+ | ๅฏน่ฏ่ฎฐๅฟ†ๅขžๅผบ | ้•ฟๆœŸ้กน็›ฎ็Ÿฅ่ฏ†่ฎฐๅฟ†ๅ’Œ plan ็บงๅˆซ็š„็จ€็–่ฎฐๅฟ† |
314
+
315
+ > ๐Ÿ“ฆ [ๆ›ดๆ–ฐๆ—ฅๅฟ—](./CHANGELOG.md)
316
+ </details>
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # add-coder
2
2
 
3
- > ๐ŸŒ ๐Ÿ€„ไธญๆ–‡ | [English](./README.en.md)
3
+ > ๐Ÿ€„ไธญๆ–‡ | ๐Ÿ”ค[English](#-english-readme)
4
4
 
5
5
  **AI ไปฃ็ ๆฒป็†็š„่ฝๅœฐๆ–นๆกˆ** โ€” [codein2027](https://github.com/xiaomingming92/codein2027) ๅฟซ้€Ÿๆž„ๅปบ ADD ็ผ–็จ‹่Œƒๅผ็š„ๅฎŒๆ•ด่„šๆ‰‹ๆžถใ€‚ไปฅใ€Œๅฎก่ฎกๅณๅŸบ็ก€่ฎพๆ–ฝใ€ไธบๆ ธๅฟƒ๏ผŒๅฝปๅบ•ๆ‰“็ ด็ผ–็จ‹่ฟ‡็จ‹้ป‘็›’ไธŽ่ทจ่ฝฎๅคฑๅฟ†๏ผŒ่ฎฉ็ผ–็จ‹่Œƒๅผ่ฟ›ๅŒ–ไธบๅฏๅฎก่ฎกใ€ๅฏ่ฟฝๆบฏใ€ๅฏๆ”ถๆ•›็š„ๆ–ฐๆ—ถไปฃใ€‚ [NPM](https://www.npmjs.com/package/add-coder) ยท [GitHub](https://github.com/xiaomingming92/add-coder)
6
6
 
@@ -172,15 +172,16 @@ npx add-coder init
172
172
  โ”‚ Handoff / DevLog ๆ—ถๅบๆ–‡ๆกฃ โ”‚
173
173
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
174
174
  โ”‚
175
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
176
- โ–ผ โ–ผ โ–ผ
177
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
178
- โ”‚ Claude โ”‚ โ”‚ Qoder โ”‚ โ”‚ VS Code โ”‚
179
- โ”‚ Hooks โ”‚ โ”‚ Hooks โ”‚ โ”‚ Config โ”‚
180
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
175
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”
176
+ โ–ผ โ–ผ โ–ผ โ–ผ โ–ผ
177
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”
178
+ โ”‚Claudeโ”‚ โ”‚Qoder โ”‚ โ”‚ VS Code โ”‚ โ”‚ Trae โ”‚ โ”‚Codex โ”‚
179
+ โ”‚Hooks โ”‚ โ”‚Hooks โ”‚ โ”‚ Config โ”‚ โ”‚Hooks โ”‚ โ”‚Hooks โ”‚
180
+ โ”‚14/17 โ”‚ โ”‚10/17 โ”‚ โ”‚ 10/17 โ”‚ โ”‚ 6/17 โ”‚ โ”‚ 6/17 โ”‚
181
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
181
182
  โ”‚
182
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
183
- โ–ผ
183
+ |
184
+ โ–ผ
184
185
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
185
186
  โ”‚ Caijuehub ่ง„ๅˆ™ๅผ•ๆ“Ž โ”‚
186
187
  โ”‚ TOML ้ฉฑๅŠจ็š„็ญ–็•ฅไฝ“็ณป โ”‚
@@ -216,3 +217,238 @@ npx add-coder init
216
217
  |------|------|
217
218
  | Demo ไป“ๅบ“ๆผ”็คบ | ๆไพ›ๅฎŒๆ•ด็คบไพ‹ไป“ๅบ“๏ผŒๅฑ•็คบ Policy-Update-Loop ไธŽ Report ไฝ“็ณป็š„็ซฏๅˆฐ็ซฏ้—ญ็Žฏๅฎž่ทต |
218
219
  | MCP ่ƒฝๅŠ›้‡ๆž„ | MCP ๅทฅๅ…ท้“พๆžถๆž„ๅ‡็บง๏ผŒๆๅ‡ๅฎก่ฎกไธŽ้—จ็ฆๅทฅๅ…ท็š„ๅฏๆ‰ฉๅฑ•ๆ€งๅ’Œ็‹ฌ็ซ‹้ƒจ็ฝฒ่ƒฝๅŠ› |
220
+ | ๅฏน่ฏ่ฎฐๅฟ†ๅขžๅผบ | ้•ฟๆœŸ้กน็›ฎ็Ÿฅ่ฏ†่ฎฐๅฟ†ๅ’Œplan็บงๅˆซ็š„็จ€็–่ฎฐๅฟ† |
221
+
222
+
223
+
224
+ ---
225
+ ## ๐Ÿ”ค English README
226
+
227
+ **AI Governance, Implemented** โ€” The complete scaffolding from [codein2027](https://github.com/xiaomingming92/codein2027) for rapidly building the ADD programming paradigm. Built on the core principle of **Audit as Infrastructure**, it shatters the black-box programming process and cross-session amnesia, evolving the programming paradigm into an auditable, traceable, and convergent new era. [NPM](https://www.npmjs.com/package/add-coder) ยท [GitHub](https://github.com/xiaomingming92/add-coder)
228
+
229
+
230
+ > ๐Ÿงญ **Getting hands-on?** See [GUIDE.md](https://github.com/xiaomingming92/add-coder/blob/main/GUIDE.md) โ€” trigger word quick reference, requirements-to-Plan, and full workflow walkthrough.
231
+
232
+ ```bash
233
+ npx add-coder init
234
+ ```
235
+
236
+ ---
237
+
238
+ ## Not a Template Tool โ€” An Architectural Difference
239
+
240
+ There are already plenty of AI coding templates, hook adapters, and MCP scaffolds. What fundamentally sets add-coder apart is not "what files it generates," but a **paradigm shift at the architectural level**:
241
+
242
+ ### โ‘  Audit Is Infrastructure, Not After-the-Fact Logging
243
+
244
+ Traditional AI development: Chat โ†’ Generate code โ†’ Dig through chat history afterward to find "who changed what"
245
+
246
+ | Traditional Model | add-coder |
247
+ |-------------------|-----------|
248
+ | Logs are append-only text files | Audit is a **structured data table** (DevOperation + AuditLog), supporting multi-dimensional queries by plan/step/agent/tool |
249
+ | Auditing relies on developer discipline | The **MCP audit toolchain** automatically records every operation; system gateways enforce checks |
250
+ | No traceability | Audit events are naturally linked: Plan โ†’ Spec โ†’ Task โ†’ Step โ†’ Tool Call, forming a complete evidence chain |
251
+
252
+ ### โ‘ก Gateway-Driven, Not Free-Form Conversation
253
+
254
+ Traditional AI coding is "you say, I do" โ€” quality depends entirely on the LLM's state that day. add-coder embeds **dual quality gateways** into the architecture:
255
+
256
+ ```
257
+ DPS (Design-Process Symmetry) โ€” Design / Implementation / Docs / Audit, each weighted 25%, < 85% BLOCKED
258
+ RAHS (Runtime Architecture Health Score) โ€” Runtime architecture health, < 90% BLOCKED
259
+ ```
260
+
261
+ These are not "suggestions" โ€” they are **architectural blocks**. A Step cannot advance without passing its gateway.
262
+
263
+ ### โ‘ข Cross-Session Memory, Not Per-Session Amnesia
264
+
265
+ The fatal flaw of AI conversations: architectural decisions from last session, bugs fixed, agreements reached โ€” all forgotten in the next conversation. add-coder solves this at the architecture level:
266
+
267
+ - **Handoff Documents** โ€” Automatically generated structured handoff at the end of each session, auto-loaded by the next session
268
+ - **Plan Index** โ€” All Plans are centrally indexed via `index.md`, supporting fuzzy-match quick lookup
269
+ - **DevLog Timeline** โ€” Every operation is written to the `{YYYY-MM}/{DD}/` timeline, enabling full historical state traceability
270
+
271
+ ### โ‘ฃ Policy-Update-Loop: Self-Evolving Governance (the scaffold itself does not include this architectural capability; a DEMO repo will be provided next to better illustrate the Policy-Update-Loop and Report system)
272
+
273
+ Not a static template, but a **closed-loop adaptive system**:
274
+
275
+ ```
276
+ Execute โ†’ Audit โ†’ Boundary Report โ†’ Rule Adjustment โ†’ Next Execution
277
+ ```
278
+
279
+ Runtime-generated Reports feed back into governance rules, enabling continuous evolution of governance strategies.
280
+
281
+ ### โ‘ค Multi-IDE Hooks as the Governance Layer
282
+
283
+ Hooks are not "notification push" โ€” they are the **IDE runtime interception layer**:
284
+
285
+ | Hook Type | Function |
286
+ |-----------|----------|
287
+ | PreToolUse | Validates whitelist before tool invocation, injects context, DPS condition checks |
288
+ | PostToolUse | Automatic audit logging, Plan sync detection, format guarding |
289
+ | PreCompact | Forces retention of critical document paths during cross-session context compression |
290
+ | PromptSubmit | Injects ADD vocabulary triggers, ensuring zero-latency LLM response to commands like "acceptance" and "gateway" |
291
+
292
+ Each IDE๏ผˆClaude Code / Qoder CN / VS Code Copilot / Trae / Codex๏ผ‰has its own hook implementation, but the **governance logic is unified** โ€” the architecture is consistent, only the adapter layer differs.
293
+
294
+ | IDE | Governance Doc | Events Covered | Hook Config |
295
+ |---|---|---|---|
296
+ | Claude Code | [ADD-governance-claude-code.md](./ADD-governance-claude-code.md) | 14/17 | `.claude/hooks/*.sh` |
297
+ | Qoder CN | [ADD-governance-qoder-cn.md](./ADD-governance-qoder-cn.md) | 10/17 | `.qoder/hooks/*.sh` |
298
+ | VS Code Copilot | [ADD-governance-vscode-copilot.md](./ADD-governance-vscode-copilot.md) | 10/17 | `.github/hooks/*.json` โ†’ `.vscode/hooks/*.sh` |
299
+ | Trae | [ADD-governance-trae.md](./ADD-governance-trae.md) | 6/17 | `hooks.json` โ†’ `.trae/hooks/*.sh` |
300
+ | Codex | [ADD-governance-codex.md](./ADD-governance-codex.md) | 0 native / 14 (via Claude import) | `.codex/hooks.json` |
301
+
302
+ ---
303
+
304
+ ## Quick Start
305
+
306
+ ```bash
307
+ npx add-coder init
308
+ ```
309
+
310
+ The first `init` auto-detects your IDE and interactively guides you through database selection (PostgreSQL / SQLite / self-managed), container runtime (podman / docker / self-managed), Prisma initialization, and ADD template deployment.
311
+
312
+ ```bash
313
+ npx add-coder init
314
+ # โ†’ Choose IDE (Qoder / Claude / VS Code)
315
+ # โ†’ Choose database (PostgreSQL / SQLite / self-managed)
316
+ # โ†’ Choose container (podman / docker / self-managed)
317
+ # โ†’ prisma init + add.prisma copied
318
+ # โ†’ prisma db push (adds new tables only, no data deletion)
319
+ # โ†’ prisma generate
320
+ # โ†’ ADD governance model ready โœ“
321
+ ```
322
+
323
+ > **Env file priority**: `.env.development.local` > `.env.development` > `.env.local` > `.env`
324
+
325
+ ## Commands
326
+
327
+ | Command | Description |
328
+ |---------|-------------|
329
+ | `init` | Initialize ADD templates, supports `--adapter claude\|qoder\|vscode\|auto` |
330
+ | `sync` | Incrementally sync missing files |
331
+ | `status` | Check template integrity |
332
+
333
+ ### init Internal Flow
334
+
335
+ | Step | Action | Description |
336
+ |------|--------|-------------|
337
+ | โ‘  | Detect IDE | Scan for `.qoder/` `.claude/` `.vscode/` existence, or specify via `--adapter` |
338
+ | โ‘ก | Load config | Interactive Q&A > `add-coder.config.ts` > auto-detect > defaults |
339
+ | โ‘ข | DB deployment | `db-ensure.sh` starts container/PG connection + `injectPrisma()` Caijue layer (Prisma init โ†’ AddUser model copy โ†’ db push โ†’ generate) |
340
+ | โ‘ฃ | Render templates | 55 core template files (skills/agents/templates/plans/specs/scriptsโ€ฆ) |
341
+ | โ‘ค | Deploy adapters | Copy core content to `.add/` `.qoder/` `.claude/` directories, supplement IDE-specific hooks/mcp |
342
+ | โ‘ฅ | Write files | Four modes: interactive / yes / force / dry-run; `.sh` scripts auto `chmod` |
343
+ | โ‘ฆ | Output summary | Created / skipped / overwritten stats + next-step hints |
344
+
345
+ ### init Options
346
+
347
+ | Option | Description |
348
+ |--------|-------------|
349
+ | `--adapter <type>` | Target IDE: claude / qoder / vscode / trae / codex / auto (default) |
350
+ | `--config <path>` | Specify config file |
351
+ | `--yes` | Skip interactions, create new files only |
352
+ | `--force` | Overwrite existing files |
353
+ | `--dry-run` | Preview mode, no writes |
354
+
355
+ ## Generated Content
356
+
357
+ | Directory | Content |
358
+ |-----------|---------|
359
+ | `.add/` | ADD shared core (skills, agents, docs, scripts, rules, etc.) |
360
+ | `.claude/` | Claude Code adapter (hooks, settings.json, mcp.json) |
361
+ | `.qoder/` | Qoder adapter (hooks, settings.json, mcp.json) |
362
+ | `.vscode/` | VS Code adapter (settings.json, tasks.json) |
363
+ | `.trae/` | Trae adapter (hooks.json, settings.json) |
364
+ | `.codex/` | Codex adapter (hooks.json, settings.json) |
365
+
366
+ ## MCP Audit Toolchain
367
+
368
+ `init` automatically deploys the MCP server (`mcp-server.ts`) into the project, loaded by the IDE via `mcp.json`. The following audit and governance tools are provided:
369
+
370
+ | Tool | Purpose | Trigger Scenario |
371
+ |------|---------|-----------------|
372
+ | `record_dev_operation` | Record development operation audits (before/after/reason) | Every file change, config modification |
373
+ | `query_audit_logs` | Query audit records by planKeyword / targetId | Cross-session context recovery, iteration evidence verification |
374
+ | `get_project_context` | Get ADD workflow status snapshot | Fresh conversation start |
375
+ | `get_db_schema` | Get Prisma schema info | Database-related operations |
376
+ | `check_dps` | DPS gateway (Design/Implementation/Docs/Audit, each 25%) | End of Step 0 |
377
+ | `check_rahs` | RAHS gateway (runtime architecture health) | Step 4/8 |
378
+ | `check_add_route_status` | add-route file existence check | Before Step 3 |
379
+ | `check_spec_sync` | Spec doc checkbox status vs. code consistency | After Spec execution |
380
+ | `find_related_docs` | Search related architecture/spec documents | Context understanding |
381
+
382
+ > Full tool list: [MCP Toolchain Specification](https://github.com/xiaomingming92/codein2027/blob/main/docs/ๅคง็”ฐ็ฒพๅ‡†่€•ๆ’ญๆ™บ่ƒฝๅ†ณ็ญ–็ณป็ปŸ/knowledge/02-่ง„่Œƒ/%E3%80%8A%E5%BC%80%E5%8F%91%E6%93%8D%E4%BD%9C%E5%AE%A1%E8%AE%A1%E5%AD%98%E6%A1%A3%E8%A7%84%E8%8C%83%E3%80%8B.md).
383
+
384
+ ## Architecture Overview
385
+
386
+ ```
387
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
388
+ โ”‚ ADD Paradigmโ”‚
389
+ โ”‚ Step 0-9 โ”‚
390
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
391
+ โ”‚ Gateway-driven
392
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
393
+ โ–ผ โ–ผ โ–ผ
394
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
395
+ โ”‚DPS Gatewayโ”‚ โ”‚RAHS Gate โ”‚ โ”‚Complianceโ”‚
396
+ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜
397
+ โ”‚ โ”‚ โ”‚
398
+ โ–ผ โ–ผ โ–ผ
399
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
400
+ โ”‚ Audit Infrastructure Layer โ”‚
401
+ โ”‚ DevOperation / AuditLog Tables โ”‚
402
+ โ”‚ MCP Audit Toolchain โ”‚
403
+ โ”‚ Handoff / DevLog Timeline Docs โ”‚
404
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
405
+ โ”‚
406
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
407
+ โ–ผ โ–ผ โ–ผ โ–ผ โ–ผ
408
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”
409
+ โ”‚Claudeโ”‚ โ”‚Qoder โ”‚ โ”‚ VS Code โ”‚ โ”‚ Trae โ”‚ โ”‚Codex โ”‚
410
+ โ”‚Hooks โ”‚ โ”‚Hooks โ”‚ โ”‚ Config โ”‚ โ”‚Hooks โ”‚ โ”‚Hooks โ”‚
411
+ โ”‚14/17 โ”‚ โ”‚10/17 โ”‚ โ”‚ 10/17 โ”‚ โ”‚ 6/17 โ”‚ โ”‚ 6/17 โ”‚
412
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
413
+ โ”‚
414
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
415
+ โ–ผ
416
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
417
+ โ”‚ Caijuehub Rule Engine โ”‚
418
+ โ”‚ TOML-Driven Policy System โ”‚
419
+ โ”‚ Detect / Adapt / Prisma / Write โ€” โ”‚
420
+ โ”‚ Fully Configurable โ”‚
421
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
422
+ ```
423
+
424
+ ## Prerequisites
425
+
426
+ - Node.js >= 20
427
+ - Prisma ^7.0 (auto-detected during `init`, guided installation if missing)
428
+ - PostgreSQL / SQLite (MCP toolchain depends on DevOperation + AuditLog tables)
429
+
430
+ > **Recommended**: Run PostgreSQL via Podman/Docker, reference config:
431
+ > ```yaml
432
+ > postgres:
433
+ > image: docker.io/postgres:16-alpine
434
+ > ports: ["127.0.0.1:5433:5432"]
435
+ > environment:
436
+ > POSTGRES_DB: mydb
437
+ > POSTGRES_USER: admin
438
+ > POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
439
+ > ```
440
+ > Mount data volume to `~/data/your_project/postgres/` to avoid data loss on container removal.
441
+
442
+ > ๐Ÿ“ฆ [Changelog](./CHANGELOG.md)
443
+
444
+ ---
445
+
446
+ ## ๐ŸŽฌ Coming Soon
447
+
448
+ | Plan | Description |
449
+ |------|-------------|
450
+ | Demo Repo | A full example repository showcasing end-to-end closed-loop practice of Policy-Update-Loop and the Report system |
451
+ | MCP Restructure | MCP toolchain architecture upgrade, improving audit and gateway tool extensibility and standalone deployment capability |
452
+ | Memory Enhancement | Long-term project knowledge memory and plan-level sparse memory |
453
+
454
+ ---
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "add-coder",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
- "description": "[codein2027](https://github.com/xiaomingming92/codein2027) ๅฟซ้€Ÿๆž„ๅปบ ADD ็ผ–็จ‹่Œƒๅผ็š„ๅฎŒๆ•ด่„šๆ‰‹ๆžถโ€”โ€”AI ไปฃ็ ๆฒป็†็š„่ฝๅœฐๆ–นๆกˆใ€‚ไปฅใ€Œๅฎก่ฎกๅณๅŸบ็ก€่ฎพๆ–ฝใ€ไธบๆ ธๅฟƒ๏ผŒๅฝปๅบ•ๆ‰“็ ด็ผ–็จ‹่ฟ‡็จ‹้ป‘็›’ไธŽ่ทจ่ฝฎๅคฑๅฟ†๏ผŒ่ฎฉ็ผ–็จ‹่Œƒๅผ่ฟ›ๅŒ–ไธบๅฏๅฎก่ฎกใ€ๅฏ่ฟฝๆบฏใ€ๅฏๆ”ถๆ•›็š„ๆ–ฐๆ—ถไปฃใ€‚npx ๅณ็”จ๏ผŒไบบไบบๅฏไฝ“้ชŒใ€‚",
5
+ "description": "[codein2027](https://github.com/xiaomingming92/codein2027) - A complete scaffolding for building the ADD programming paradigm, the implementation layer for AI code governance. Core principle: Audit as Infrastructure. Breaks the black-box programming process and cross-session amnesia, evolving programming paradigms into an auditable, traceable, and convergent new era. npx-ready.\n\n[codein2027](https://github.com/xiaomingming92/codein2027) ๅฟซ้€Ÿๆž„ๅปบ ADD ็ผ–็จ‹่Œƒๅผ็š„ๅฎŒๆ•ด่„šๆ‰‹ๆžถโ€”โ€”AI ไปฃ็ ๆฒป็†็š„่ฝๅœฐๆ–นๆกˆใ€‚ไปฅใ€Œๅฎก่ฎกๅณๅŸบ็ก€่ฎพๆ–ฝใ€ไธบๆ ธๅฟƒ๏ผŒๅฝปๅบ•ๆ‰“็ ด็ผ–็จ‹่ฟ‡็จ‹้ป‘็›’ไธŽ่ทจ่ฝฎๅคฑๅฟ†๏ผŒ่ฎฉ็ผ–็จ‹่Œƒๅผ่ฟ›ๅŒ–ไธบๅฏๅฎก่ฎกใ€ๅฏ่ฟฝๆบฏใ€ๅฏๆ”ถๆ•›็š„ๆ–ฐๆ—ถไปฃใ€‚npx ๅณ็”จ๏ผŒไบบไบบๅฏไฝ“้ชŒใ€‚",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/xiaomingming92/add-coder.git"