create-ccc-tutor 0.1.0
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.md +41 -0
- package/bin/cli.js +76 -0
- package/package.json +28 -0
- package/template/.claude/commands/abandon.md +7 -0
- package/template/.claude/commands/add-anti-flag.md +7 -0
- package/template/.claude/commands/add-constitution-clause.md +7 -0
- package/template/.claude/commands/audit-spec.md +7 -0
- package/template/.claude/commands/commit.md +7 -0
- package/template/.claude/commands/constitution-edit.md +7 -0
- package/template/.claude/commands/db-schema.md +7 -0
- package/template/.claude/commands/exam.md +66 -0
- package/template/.claude/commands/execution-plan.md +7 -0
- package/template/.claude/commands/feature-draft.md +7 -0
- package/template/.claude/commands/handoff.md +7 -0
- package/template/.claude/commands/implement.md +7 -0
- package/template/.claude/commands/init.md +7 -0
- package/template/.claude/commands/next.md +7 -0
- package/template/.claude/commands/offload.md +7 -0
- package/template/.claude/commands/pickup.md +7 -0
- package/template/.claude/commands/recall.md +7 -0
- package/template/.claude/commands/remember.md +7 -0
- package/template/.claude/commands/slide.md +87 -0
- package/template/.claude/commands/spec-finalize.md +7 -0
- package/template/.claude/commands/test-fix.md +7 -0
- package/template/.claude/commands/uninstall.md +7 -0
- package/template/.claude/settings.json +161 -0
- package/template/.claude-plugin/plugin.json +41 -0
- package/template/.codex/config.toml +24 -0
- package/template/.codex/hooks.json +4 -0
- package/template/.codex/install-skills.sh +18 -0
- package/template/.codex/skills/exam/SKILL.md +61 -0
- package/template/.codex/skills/slide/SKILL.md +69 -0
- package/template/.harness/agents/README.md +70 -0
- package/template/.harness/agents/_template/junior-agent-template.md +116 -0
- package/template/.harness/agents/backend-reviewer.md +153 -0
- package/template/.harness/agents/frontend-reviewer.md +158 -0
- package/template/.harness/agents/security-reviewer.md +148 -0
- package/template/.harness/agents/test-fixer.md +147 -0
- package/template/.harness/docs/doc-sync.md +29 -0
- package/template/.harness/docs/git-hygiene.md +56 -0
- package/template/.harness/docs/spec-model.md +47 -0
- package/template/.harness/docs/tool-map.md +120 -0
- package/template/.harness/docs/workflow.md +59 -0
- package/template/.harness/scripts/README.md +70 -0
- package/template/.harness/scripts/auditor-gate.sh +388 -0
- package/template/.harness/scripts/bootstrap-check.sh +103 -0
- package/template/.harness/scripts/budget-monitor.sh +223 -0
- package/template/.harness/scripts/check-prereqs.sh +165 -0
- package/template/.harness/scripts/checkpoint-recall.sh +136 -0
- package/template/.harness/scripts/checkpoint-write.sh +281 -0
- package/template/.harness/scripts/decision-log-append.sh +90 -0
- package/template/.harness/scripts/env-check.sh +286 -0
- package/template/.harness/scripts/format-edit.sh +80 -0
- package/template/.harness/scripts/lint-bans.sh +110 -0
- package/template/.harness/scripts/memory-archive.sh +129 -0
- package/template/.harness/scripts/memory-recall.sh +197 -0
- package/template/.harness/scripts/memory-snapshot.sh +124 -0
- package/template/.harness/scripts/post-migration.sh +58 -0
- package/template/.harness/scripts/precommit-cycles.sh +74 -0
- package/template/.harness/scripts/precommit-typecheck.sh +69 -0
- package/template/.harness/scripts/scratchpad-recall.sh +83 -0
- package/template/.harness/scripts/scratchpad-update.sh +39 -0
- package/template/.harness/scripts/standalone-bootstrap.md +443 -0
- package/template/.harness/skills/abandon/SKILL.md +157 -0
- package/template/.harness/skills/add-anti-flag/SKILL.md +205 -0
- package/template/.harness/skills/add-constitution-clause/SKILL.md +244 -0
- package/template/.harness/skills/audit-spec/SKILL.md +395 -0
- package/template/.harness/skills/commit/SKILL.md +270 -0
- package/template/.harness/skills/constitution-edit/SKILL.md +292 -0
- package/template/.harness/skills/db-schema/SKILL.md +145 -0
- package/template/.harness/skills/db-schema/references/methodology.md +202 -0
- package/template/.harness/skills/execution-plan/SKILL.md +346 -0
- package/template/.harness/skills/feature-draft/SKILL.md +426 -0
- package/template/.harness/skills/handoff/SKILL.md +211 -0
- package/template/.harness/skills/implement/SKILL.md +355 -0
- package/template/.harness/skills/init/SKILL.md +805 -0
- package/template/.harness/skills/next/SKILL.md +245 -0
- package/template/.harness/skills/offload/SKILL.md +134 -0
- package/template/.harness/skills/pickup/SKILL.md +213 -0
- package/template/.harness/skills/recall/SKILL.md +159 -0
- package/template/.harness/skills/remember/SKILL.md +205 -0
- package/template/.harness/skills/spec-finalize/SKILL.md +196 -0
- package/template/.harness/skills/test-fix/SKILL.md +363 -0
- package/template/.harness/skills/uninstall/SKILL.md +370 -0
- package/template/.harness/state/install.json +83 -0
- package/template/AGENTS.md +262 -0
- package/template/CCC_MAGI_LICENSE +201 -0
- package/template/CCC_MAGI_README.md +986 -0
- package/template/CLAUDE.md +658 -0
- package/template/codex.md +39 -0
- package/template/constitution.md +164 -0
- package/template/course/README.md +15 -0
- package/template/course/course_code(example)/exam/README.md +2 -0
- package/template/course/course_code(example)/slide/slide_example-1.pdf +40 -0
- package/template/course/course_code(example)/slide/slide_example-2.pdf +40 -0
- package/template/docs/features/slide-query-implementation.md +79 -0
- package/template/docs/features/slide-query.md +211 -0
- package/template/docs-harness/README.md +42 -0
- package/template/docs-harness/adoption-playbook.md +373 -0
- package/template/docs-harness/ccc-step1-driver-template.md +288 -0
- package/template/docs-harness/cli-configs-README.md +78 -0
- package/template/docs-harness/context-architecture-v2.md +249 -0
- package/template/docs-harness/design-spec.md +437 -0
- package/template/docs-harness/memory-layer.md +135 -0
- package/template/docs-harness/retrospective-notes.md +204 -0
- package/template/gitignore +106 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: uninstall
|
|
3
|
+
description: |
|
|
4
|
+
Cleanly remove CCC-MAGI from the project. Detects whether a prior harness archive exists (`old_version_harness/` from bootstrap option 1); if so, offers to restore it.
|
|
5
|
+
|
|
6
|
+
Trigger when the user says:
|
|
7
|
+
- `/uninstall` directly
|
|
8
|
+
- "卸载 CCC-MAGI" / "uninstall CCC-MAGI" / "remove CCC-MAGI"
|
|
9
|
+
- "删除 CCC-MAGI" / "delete the harness"
|
|
10
|
+
- "不要 CCC-MAGI 了" / "I don't want this harness anymore"
|
|
11
|
+
- "把 CCC-MAGI 拆掉" / "tear out CCC-MAGI"
|
|
12
|
+
- "干净卸载" / "clean uninstall"
|
|
13
|
+
argument-hint: [--restore-archive | --keep-archive | --dry-run | --force]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# /uninstall
|
|
17
|
+
|
|
18
|
+
> **MAGI position**: Operated by **MAGI Archivist** — filing the harness's own paperwork before departure.
|
|
19
|
+
|
|
20
|
+
> *Constitutional basis: per `constitution.md § 3` (CEO Final Authority), CEO has the unconditional right to remove CCC-MAGI from any project. This skill is the proper paperwork for that decision — ensures clean state, no leftover `.harness/` artifacts, and offers restoration of any archived prior harness.*
|
|
21
|
+
|
|
22
|
+
## Scope: what gets removed vs preserved
|
|
23
|
+
|
|
24
|
+
### 🔴 Removed (CCC-MAGI's installed files)
|
|
25
|
+
|
|
26
|
+
| Item | Notes |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `constitution.md`, `CLAUDE.md`, `AGENTS.md` | LOAD_BEARING — user's `/init` answers get lost |
|
|
29
|
+
| `CCC_MAGI_README.md`, `CCC_MAGI_LICENSE` | Harness's own README/LICENSE |
|
|
30
|
+
| `.harness/` (entire directory) | skills/, agents/, scripts/, state/, memory/, audits/ |
|
|
31
|
+
| `docs-harness/` (entire directory) | framework design docs |
|
|
32
|
+
| `.claude/commands/` (entire directory) | auto-generated slash command shims |
|
|
33
|
+
| `.claude/settings.json` | ⚠️ **only if matches CCC-MAGI shipped sha256** — see Step 2.5 |
|
|
34
|
+
| `.codex/config.toml`, `.codex/hooks.json` | CCC-MAGI's Codex CLI wiring |
|
|
35
|
+
| `.gitignore` — CCC-MAGI section only | Detected via marker `# CCC-MAGI — Git Policy`; user's lines preserved |
|
|
36
|
+
|
|
37
|
+
### 🟢 Preserved (user's product + history)
|
|
38
|
+
|
|
39
|
+
| Item | Why |
|
|
40
|
+
|---|---|
|
|
41
|
+
| `docs/features/*.md` | spec / implementation docs ARE the user's product, not harness artifacts |
|
|
42
|
+
| Source code (any path NOT under `.harness/`) | obvious |
|
|
43
|
+
| `git` history, branches, tags, remote | obvious |
|
|
44
|
+
| User's own `README.md`, `LICENSE`, `package.json`, build configs | not CCC-MAGI's |
|
|
45
|
+
| `~/.claude/projects/<this-project>/*.jsonl` (Claude Code's session history) | lives in user home, never project — not our scope |
|
|
46
|
+
|
|
47
|
+
### 🟡 Conditionally handled
|
|
48
|
+
|
|
49
|
+
| Item | Logic |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `old_version_harness/` (archive from bootstrap option 1) | Ask user: restore? keep? — see Step 1 |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Step 0 — Pre-flight scenario detection
|
|
56
|
+
|
|
57
|
+
Detect which of 4 scenarios applies via filesystem inspection (do NOT trust install.json — it may be missing or out of date):
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
HARNESS_DIR_EXISTS=$(test -d .harness && echo yes || echo no)
|
|
61
|
+
ARCHIVE_DIR_EXISTS=$(test -d old_version_harness && echo yes || echo no)
|
|
62
|
+
INSTALL_JSON_EXISTS=$(test -f .harness/state/install.json && echo yes || echo no)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Branch:
|
|
66
|
+
|
|
67
|
+
| .harness/ | old_version_harness/ | install.json | Scenario |
|
|
68
|
+
|---|---|---|---|
|
|
69
|
+
| ❌ | * | * | **D — Not installed.** Exit: "CCC-MAGI 没装在这个项目,无需卸载。" |
|
|
70
|
+
| ✅ | ❌ | * | **A — Clean uninstall.** (No prior harness to restore.) |
|
|
71
|
+
| ✅ | ✅ | * | **B — Archive present.** Offer restore. |
|
|
72
|
+
| ✅ | ❌ | ❌ | **C — Partial install.** Treat as A with lightweight cleanup. |
|
|
73
|
+
|
|
74
|
+
## Step 1 — Confirmation flow (mandatory, destructive operation)
|
|
75
|
+
|
|
76
|
+
**ALWAYS show the dry-run preview first.** Never delete anything before explicit user confirmation.
|
|
77
|
+
|
|
78
|
+
### Step 1a — Preview message (display in user's OS locale)
|
|
79
|
+
|
|
80
|
+
For **Scenario A or C**:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
⚠️ 你确定要卸载 CCC-MAGI 吗?
|
|
84
|
+
|
|
85
|
+
我会做的事:
|
|
86
|
+
✓ 删 .harness/(skills, agents, scripts, state, memory, audits 全部)
|
|
87
|
+
✓ 删 constitution.md, CLAUDE.md, AGENTS.md(含你 /init 填的项目身份)
|
|
88
|
+
✓ 删 CCC_MAGI_README.md, CCC_MAGI_LICENSE
|
|
89
|
+
✓ 删 docs-harness/(设计文档)
|
|
90
|
+
✓ 删 .claude/commands/(slash 命令 shim)
|
|
91
|
+
✓ 清理 .claude/settings.json 里 CCC-MAGI 的 hook 部分(如你没改过就整文件删;改过就保留 + 警告)
|
|
92
|
+
✓ 删 .codex/config.toml + hooks.json
|
|
93
|
+
✓ 清理 .gitignore 里 CCC-MAGI 的部分(按标记行定位,你原本的内容保留)
|
|
94
|
+
|
|
95
|
+
我不会动:
|
|
96
|
+
✗ 源代码(src/, app/, lib/, ...)
|
|
97
|
+
✗ docs/features/*.md(你和我一起写的 spec —— 是你的产品文档)
|
|
98
|
+
✗ git 历史、分支、tags、远端
|
|
99
|
+
✗ 你自己的 README.md、LICENSE、package.json、构建配置
|
|
100
|
+
|
|
101
|
+
回 "确认卸载" / "yes" 继续,回 "取消" / "no" 中止。
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
For **Scenario B** (archive exists):
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
⚠️ 你确定要卸载 CCC-MAGI 吗?
|
|
108
|
+
|
|
109
|
+
检测到 old_version_harness/ — 这是你装 CCC-MAGI 时备份的"之前的 harness"。
|
|
110
|
+
要怎么处理?
|
|
111
|
+
|
|
112
|
+
[a] 复原 — 删 CCC-MAGI + 把 old_version_harness/ 里的内容移回项目根目录
|
|
113
|
+
(等于回到装 CCC-MAGI 之前的状态)
|
|
114
|
+
[b] 保留归档 — 删 CCC-MAGI,old_version_harness/ 留在原地由你以后处理
|
|
115
|
+
[c] 取消卸载
|
|
116
|
+
|
|
117
|
+
不管选 a 或 b,CCC-MAGI 的删除范围是一样的(见下)。差异只在 old_version_harness/。
|
|
118
|
+
|
|
119
|
+
CCC-MAGI 卸载范围:
|
|
120
|
+
✓ .harness/, constitution.md, CLAUDE.md, AGENTS.md, ...
|
|
121
|
+
(和 scenario A 一样,列表略,详见 SKILL 文档)
|
|
122
|
+
|
|
123
|
+
不会动:
|
|
124
|
+
✗ 源代码、git 历史、你的 README.md / LICENSE / package.json
|
|
125
|
+
✗ docs/features/*.md spec 文件
|
|
126
|
+
|
|
127
|
+
回 a / b / c,或 "取消"。
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Step 1b — Wait for explicit response
|
|
131
|
+
|
|
132
|
+
Required responses:
|
|
133
|
+
- **A/C scenario**: `"确认卸载"` / `"yes uninstall"` / `"yes"` / `"确认"` → proceed to Step 2
|
|
134
|
+
- **B scenario**: `"a"` / `"复原"` / `"restore"` → proceed to Step 2 + Step 3
|
|
135
|
+
- **B scenario**: `"b"` / `"保留"` / `"keep archive"` → proceed to Step 2 only
|
|
136
|
+
- Any of: `"取消"` / `"cancel"` / `"no"` / `"算了"` → exit cleanly, no action
|
|
137
|
+
|
|
138
|
+
If response is ambiguous: ask again clearly. Don't infer.
|
|
139
|
+
|
|
140
|
+
If user provides `--force` flag: skip the confirmation but still display the preview as a record.
|
|
141
|
+
|
|
142
|
+
## Step 2 — Remove CCC-MAGI files
|
|
143
|
+
|
|
144
|
+
Track deletions for the final report:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
DELETED=()
|
|
148
|
+
PRESERVED_WITH_WARNING=()
|
|
149
|
+
|
|
150
|
+
remove_with_log() {
|
|
151
|
+
local target="$1"
|
|
152
|
+
if [ -e "$target" ]; then
|
|
153
|
+
rm -rf "$target"
|
|
154
|
+
DELETED+=("$target")
|
|
155
|
+
fi
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Step 2.1 — Root-level harness files
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
for f in constitution.md CLAUDE.md AGENTS.md CCC_MAGI_README.md CCC_MAGI_LICENSE; do
|
|
163
|
+
remove_with_log "$f"
|
|
164
|
+
done
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Step 2.2 — `.harness/` directory
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
remove_with_log .harness
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
(Single rm -rf — includes all skills, agents, scripts, state, memory, audits, checkpoints.)
|
|
174
|
+
|
|
175
|
+
### Step 2.3 — `docs-harness/` directory
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
remove_with_log docs-harness
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Step 2.4 — `.claude/commands/` directory
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
remove_with_log .claude/commands
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Step 2.5 — `.claude/settings.json` (careful — user may have added own settings)
|
|
188
|
+
|
|
189
|
+
Strategy: read current content, compare against CCC-MAGI shipped default. If matches exactly → delete. If differs → preserve + warn.
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
if [ -f .claude/settings.json ]; then
|
|
193
|
+
# CCC-MAGI's settings.json has a specific marker: top-level "_comment_top" key
|
|
194
|
+
# If that marker exists AND no other top-level keys beyond { permissions, hooks, _comment_top, _comment } exist, it's our untouched file
|
|
195
|
+
IS_OUR_DEFAULT=$(jq 'keys | length as $n | if $n <= 4 and (any(.[]; . == "_comment_top")) then "yes" else "no" end' .claude/settings.json 2>/dev/null)
|
|
196
|
+
|
|
197
|
+
if [ "$IS_OUR_DEFAULT" = "\"yes\"" ]; then
|
|
198
|
+
remove_with_log .claude/settings.json
|
|
199
|
+
else
|
|
200
|
+
PRESERVED_WITH_WARNING+=(".claude/settings.json — 你似乎修改过这个文件(不止 CCC-MAGI 的默认内容)。我保留它,你可以人工去掉 CCC-MAGI 的 hooks 段或者整个删掉。")
|
|
201
|
+
fi
|
|
202
|
+
fi
|
|
203
|
+
|
|
204
|
+
# Remove .claude/ if now empty
|
|
205
|
+
rmdir .claude 2>/dev/null
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Step 2.6 — `.codex/`
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
remove_with_log .codex/config.toml
|
|
212
|
+
remove_with_log .codex/hooks.json
|
|
213
|
+
rmdir .codex 2>/dev/null
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Step 2.7 — `.gitignore` — surgical removal of CCC-MAGI section
|
|
217
|
+
|
|
218
|
+
CCC-MAGI's `.gitignore` section is marked with:
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
# ============================================================
|
|
222
|
+
# CCC-MAGI — Git Policy
|
|
223
|
+
...
|
|
224
|
+
# ============================================================
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Strategy: extract everything NOT between our markers.
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
if [ -f .gitignore ]; then
|
|
231
|
+
if grep -q "CCC-MAGI — Git Policy" .gitignore; then
|
|
232
|
+
# Find line numbers of start and end markers
|
|
233
|
+
START_LINE=$(grep -n "CCC-MAGI — Git Policy" .gitignore | head -1 | cut -d: -f1)
|
|
234
|
+
# End is harder — we use the "last line that mentions a CCC-MAGI-specific path" + 1
|
|
235
|
+
# For robustness: just strip from START_LINE to the next blank line followed by # comment (or EOF)
|
|
236
|
+
# Simpler: backup + use awk to keep lines NOT in our marker block.
|
|
237
|
+
|
|
238
|
+
cp .gitignore .gitignore.pre-uninstall.bak
|
|
239
|
+
|
|
240
|
+
# Conservative extraction: remove from our start marker to EOF (assume our section is last,
|
|
241
|
+
# which is the install-into.sh convention). If the user added content AFTER our section,
|
|
242
|
+
# they should manually verify the .bak file.
|
|
243
|
+
head -n $((START_LINE - 1)) .gitignore.pre-uninstall.bak > .gitignore
|
|
244
|
+
|
|
245
|
+
# If the line just before our section is a blank line, trim it
|
|
246
|
+
sed -i.tmp -e :a -e '/^[[:space:]]*$/{$d;N;ba' -e '}' .gitignore 2>/dev/null
|
|
247
|
+
rm -f .gitignore.tmp
|
|
248
|
+
|
|
249
|
+
# If .gitignore is now empty, remove it entirely
|
|
250
|
+
if [ ! -s .gitignore ]; then
|
|
251
|
+
remove_with_log .gitignore
|
|
252
|
+
fi
|
|
253
|
+
|
|
254
|
+
DELETED+=(".gitignore (CCC-MAGI section removed; backup at .gitignore.pre-uninstall.bak)")
|
|
255
|
+
fi
|
|
256
|
+
fi
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Step 2.8 — Cleanup temp artifacts
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Tmp files from auditor-gate / test-fix / etc.
|
|
263
|
+
rm -f /tmp/auditor-gate.* /tmp/schema.* /tmp/test-fix-* /tmp/implement-* 2>/dev/null
|
|
264
|
+
|
|
265
|
+
# .ccc-magi-temp from manual install path B
|
|
266
|
+
[ -d .ccc-magi-temp ] && rm -rf .ccc-magi-temp
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Step 3 — Restore archive (only Scenario B + user picked "a"/restore)
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
if [ "$RESTORE" = "true" ] && [ -d old_version_harness ]; then
|
|
273
|
+
RESTORED=()
|
|
274
|
+
SKIPPED=()
|
|
275
|
+
|
|
276
|
+
# Use find to include hidden files; iterate one level deep
|
|
277
|
+
for item in old_version_harness/.[!.]* old_version_harness/..?* old_version_harness/*; do
|
|
278
|
+
[ -e "$item" ] || continue
|
|
279
|
+
base=$(basename "$item")
|
|
280
|
+
|
|
281
|
+
if [ -e "$base" ]; then
|
|
282
|
+
SKIPPED+=("$base (project root already has a file/dir with this name)")
|
|
283
|
+
else
|
|
284
|
+
mv "$item" "$base"
|
|
285
|
+
RESTORED+=("$base")
|
|
286
|
+
fi
|
|
287
|
+
done
|
|
288
|
+
|
|
289
|
+
# Clean up archive folder if now empty
|
|
290
|
+
rmdir old_version_harness 2>/dev/null
|
|
291
|
+
fi
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Surface conflicts to user clearly:
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
✓ 复原 12 个文件 (clinerules, BMAD/, agent.md, ...)
|
|
298
|
+
⚠️ 3 个文件没复原(项目根目录已存在同名):
|
|
299
|
+
- .gitignore (你装 CCC-MAGI 之后改过 — 我不覆盖)
|
|
300
|
+
- README.md (我没删过这个 — 仍是你的版本)
|
|
301
|
+
这些保留在 old_version_harness/,请手动比对 / 合并。
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## Step 4 — Final report (locale-aware)
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
✅ CCC-MAGI 已卸载
|
|
308
|
+
|
|
309
|
+
删除(CCC-MAGI 的家私):
|
|
310
|
+
✓ <list from DELETED array>
|
|
311
|
+
|
|
312
|
+
[B + restore case]
|
|
313
|
+
✓ 原 harness 已复原:
|
|
314
|
+
- <list from RESTORED>
|
|
315
|
+
[如有跳过的]
|
|
316
|
+
⚠️ 这些没复原(你需要手动决定):
|
|
317
|
+
- <list from SKIPPED>
|
|
318
|
+
备份位置: old_version_harness/.bak (如有冲突)
|
|
319
|
+
|
|
320
|
+
[B + keep archive case]
|
|
321
|
+
✓ old_version_harness/ 保留在原地。你以后可以:
|
|
322
|
+
- 手动复原: mv old_version_harness/* .
|
|
323
|
+
- 永久删除: rm -rf old_version_harness/
|
|
324
|
+
|
|
325
|
+
[A/C case]
|
|
326
|
+
(没有归档,没什么需要复原的)
|
|
327
|
+
|
|
328
|
+
未动(你的产品 + 历史):
|
|
329
|
+
✓ 源代码
|
|
330
|
+
✓ docs/features/*.md(spec / implementation 文档保留在原位)
|
|
331
|
+
✓ git 历史 + 分支 + 远端
|
|
332
|
+
✓ 你自己的 README.md / LICENSE / package.json
|
|
333
|
+
|
|
334
|
+
[如有 PRESERVED_WITH_WARNING]
|
|
335
|
+
⚠️ 部分文件保留 + 需要你手动处理:
|
|
336
|
+
- <list>
|
|
337
|
+
|
|
338
|
+
完成。再见 👋
|
|
339
|
+
|
|
340
|
+
如果以后想再装回来:
|
|
341
|
+
cd <project>
|
|
342
|
+
npx create-ccc-magi@latest
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
## Rules / Anti-patterns
|
|
346
|
+
|
|
347
|
+
- **Never delete without explicit user confirmation.** Even with `--force`, log what's being done.
|
|
348
|
+
- **Never delete files OUTSIDE the documented scope.** If unsure (e.g., `.claude/settings.json` was modified), **preserve + warn** — never silently overwrite.
|
|
349
|
+
- **Never modify git state.** No git commits, no git reset, no git rm. Untracked files just become regular files again.
|
|
350
|
+
- **Never touch the user's home directory.** `~/.claude/projects/*` is Claude Code's session storage — not in our scope.
|
|
351
|
+
- **Never block.** If a file can't be deleted (permissions, in use), surface clearly and continue with the rest.
|
|
352
|
+
|
|
353
|
+
## Edge cases
|
|
354
|
+
|
|
355
|
+
| Symptom | Response |
|
|
356
|
+
|---|---|
|
|
357
|
+
| User says "uninstall" but already uninstalled (no `.harness/`) | Exit: "CCC-MAGI 没装在这个项目" |
|
|
358
|
+
| User says "uninstall" mid-feature workflow | Warn: "你有 in-progress feature <X>. 卸载会丢失 checkpoint 和 audit 记录。确定吗?" |
|
|
359
|
+
| `.harness/` exists but contents corrupted (e.g., partial install gone wrong) | Treat as Scenario C, light cleanup, surface that things look weird |
|
|
360
|
+
| User has `.gitignore` that doesn't have our marker (manually merged?) | Don't touch `.gitignore`; surface to user that we couldn't safely remove our section |
|
|
361
|
+
| `old_version_harness/` exists but is empty | Just `rmdir` it, no restore prompt |
|
|
362
|
+
| `.claude/settings.json` is a symlink | Don't follow — refuse to delete symlinks |
|
|
363
|
+
|
|
364
|
+
## Completion criteria
|
|
365
|
+
|
|
366
|
+
- All CCC-MAGI shipped files removed (or preserved with warning if user-modified)
|
|
367
|
+
- Scenario B: archive either restored or explicitly kept per user choice
|
|
368
|
+
- Final report shows complete list of what happened (DELETED + RESTORED + SKIPPED + PRESERVED_WITH_WARNING)
|
|
369
|
+
- Skill exits without invoking any other skill — this is a terminal operation
|
|
370
|
+
- User's source code, docs/features/*.md, git state, and home directory untouched
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 2,
|
|
3
|
+
|
|
4
|
+
"installed_at": "2026-06-09T00:00:00Z",
|
|
5
|
+
"harness_version": "0.10.x",
|
|
6
|
+
"skill_set_version": null,
|
|
7
|
+
|
|
8
|
+
"onboarding": {
|
|
9
|
+
"mode": "simple",
|
|
10
|
+
"upgraded_from_simple_at": null,
|
|
11
|
+
"questions_asked": [1, 2, 5, 8, "test_required"],
|
|
12
|
+
"questions_defaulted": [3, 4, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16]
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"project_mode": "greenfield",
|
|
16
|
+
|
|
17
|
+
"slots": {
|
|
18
|
+
"_comment": "All L0 + resolved L1 slot values. Source: constitution.md § Slot registry.",
|
|
19
|
+
|
|
20
|
+
"project_name": "CCC-tutor",
|
|
21
|
+
"project_description": "学科综合复习助手:基于课件做问答(严格依据课件,找不到则如实说明)与复习题目解答(从课件中查找内容回答题目)。",
|
|
22
|
+
"project_stage": "early",
|
|
23
|
+
"project_scale_target": "个人/小规模学习工具",
|
|
24
|
+
"team_size": "solo",
|
|
25
|
+
"primary_concern": "答案对课件来源的忠实性(严格依据课件、不编造;课件查不到时如实说明)",
|
|
26
|
+
"out_of_scope_items": ["课件范围之外的内容生成", "与复习无关的功能"],
|
|
27
|
+
"auditor_model": "Codex",
|
|
28
|
+
"auditor_model_id": "gpt-5.5",
|
|
29
|
+
"language_mode": "plain",
|
|
30
|
+
"spec_dir": "docs/features/",
|
|
31
|
+
"implementation_dir": "docs/features/",
|
|
32
|
+
|
|
33
|
+
"project_audience": "使用本工具复习课程的学生(主要是项目作者本人)",
|
|
34
|
+
"project_non_goals": ["不替代课件本身", "不回答课件之外或无依据的问题", "不编造课件中不存在的内容"],
|
|
35
|
+
"project_compliance": "none",
|
|
36
|
+
"project_performance_floor": "暂无正式性能底线",
|
|
37
|
+
"project_identity_other": ["所有回答必须可追溯到课件来源;课件中查不到时必须如实告知,绝不编造"],
|
|
38
|
+
|
|
39
|
+
"tech_stack": "待定(项目尚未选定技术栈)",
|
|
40
|
+
"repo_structure": "课件目录 + 复习题目目录 + docs/features/(规格文档)",
|
|
41
|
+
"dependency_flow": "待定(尚未确定模块依赖顺序)",
|
|
42
|
+
"release_lanes": ["git-push"],
|
|
43
|
+
"backend_change_lane": "暂无后端",
|
|
44
|
+
"error_tracker": "none",
|
|
45
|
+
"test_required": true,
|
|
46
|
+
"junior_reviewers": ["security-reviewer"],
|
|
47
|
+
"rule_sources": [],
|
|
48
|
+
"supported_locales": ["zh-Hans", "en"],
|
|
49
|
+
"edge_case_categories": ["输入异常", "网络/资源异常", "并发冲突", "权限/认证", "生命周期/状态"],
|
|
50
|
+
"test_framework": "待定",
|
|
51
|
+
"test_runner_command": "待定",
|
|
52
|
+
"feature_folder_pattern": "docs/features/",
|
|
53
|
+
"client_code_paths": [],
|
|
54
|
+
"backend_code_paths": [],
|
|
55
|
+
"backend_db_type": "none",
|
|
56
|
+
"high_trap_libraries": [],
|
|
57
|
+
"migration_dir": null,
|
|
58
|
+
"pii_columns": [],
|
|
59
|
+
"rls_auth_function": null,
|
|
60
|
+
|
|
61
|
+
"_comment_l2": "L2 (grow-over-time) slots tracked separately — anti_flag_rules in AGENTS.md, project_red_lines in constitution.md § 3."
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
"environment": {
|
|
65
|
+
"_comment": "Snapshot of env-check.json content at /init time.",
|
|
66
|
+
"platform": "darwin",
|
|
67
|
+
"tier": "1-claude-codex",
|
|
68
|
+
"ai_clis_installed": {"claude": true, "codex": true, "gemini": false}
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
"magi_system": {
|
|
72
|
+
"_comment": "Which models back which MAGI positions.",
|
|
73
|
+
"core_cli": "claude",
|
|
74
|
+
"verdict_cli": "codex",
|
|
75
|
+
"verdict_model_id": "gpt-5.5"
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
"render_status": {
|
|
79
|
+
"constitution.md": {"slots_filled": 10, "warnings": []},
|
|
80
|
+
"CLAUDE.md": {"slots_filled": 25, "warnings": []},
|
|
81
|
+
"AGENTS.md": {"slots_filled": 23, "warnings": []}
|
|
82
|
+
}
|
|
83
|
+
}
|