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.
- package/README.en.md +95 -7
- package/README.md +245 -9
- package/package.json +2 -2
package/README.en.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# add-coder
|
|
2
2
|
|
|
3
|
-
> ๐ [๐ไธญๆ](
|
|
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
|
-
|
|
188
|
-
|
|
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
|
-
>
|
|
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
|
-
|
|
179
|
-
|
|
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.
|
|
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"
|