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,262 @@
|
|
|
1
|
+
# CCC-tutor — AGENTS.md
|
|
2
|
+
|
|
3
|
+
This file follows the [AGENTS.md standard](https://agents.md/) — read by Codex, Cursor, Cline, Aider, Gemini CLI, Devin, and other AI coding tools as universal project context. Plus a dedicated **Auditor Instructions** section at the bottom for the cross-model auditor (MAGI / Codex) per Constitution § 1.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
学科综合复习助手:基于课件做问答(严格依据课件,找不到则如实说明)与复习题目解答(从课件中查找内容回答题目)。
|
|
8
|
+
|
|
9
|
+
- **Stage**: early
|
|
10
|
+
- **Scale target**: 个人/小规模学习工具
|
|
11
|
+
- **Team**: solo
|
|
12
|
+
- **Primary focus**: 答案对课件来源的忠实性(严格依据课件、不编造;课件查不到时如实说明)
|
|
13
|
+
- **Out of scope**: 课件范围之外的内容生成、与复习无关的功能
|
|
14
|
+
|
|
15
|
+
(For full project identity see `constitution.md § Section 2`. For workflow rules see `CLAUDE.md`. For project red lines see `constitution.md § Section 3`.)
|
|
16
|
+
|
|
17
|
+
## Tech Stack
|
|
18
|
+
|
|
19
|
+
待定(项目尚未选定技术栈)
|
|
20
|
+
|
|
21
|
+
## Repository Structure
|
|
22
|
+
|
|
23
|
+
课件目录 + 复习题目目录 + docs/features/(规格文档)
|
|
24
|
+
|
|
25
|
+
## Build & Test
|
|
26
|
+
|
|
27
|
+
- **Test framework**: 待定(尚未选定测试框架)
|
|
28
|
+
- **Test command**: 待定
|
|
29
|
+
- **Tests required for new code**: true
|
|
30
|
+
- **Release channels**: git-push
|
|
31
|
+
|
|
32
|
+
(For backend / migration details if applicable: see `constitution.md § Slot registry` and `CLAUDE.md § Rule sources`.)
|
|
33
|
+
|
|
34
|
+
## Code Style / Conventions
|
|
35
|
+
|
|
36
|
+
Per `CLAUDE.md § Operating Principles`:
|
|
37
|
+
|
|
38
|
+
1. **Simplicity over completeness** — minimum code that solves the stated problem; no speculative abstractions
|
|
39
|
+
2. **Surgical changes** — every changed line traces to the request; no drive-by refactors
|
|
40
|
+
3. **Diagnosable in production** — errors go to none(暂未接入错误追踪); funnel events on key actions
|
|
41
|
+
4. **Spec and reality stay in sync** — user-visible behavior changes update `docs/features/<name>.md` in the same commit
|
|
42
|
+
|
|
43
|
+
See `CLAUDE.md` for the full operating manual.
|
|
44
|
+
|
|
45
|
+
## Anti-flag rules — do NOT flag these as issues
|
|
46
|
+
|
|
47
|
+
<!-- These are deliberate project conventions that LOOK like issues but are not. Flagging them produces false positives that erode auditor signal.
|
|
48
|
+
|
|
49
|
+
The harness ships this section empty. /init seeds 3-5 examples based on the detected tech stack. /add-anti-flag grows the list as the project develops conventions.
|
|
50
|
+
|
|
51
|
+
Default format for each rule:
|
|
52
|
+
- **<Convention X> is correct, <alternative Y> is BANNED.**
|
|
53
|
+
Don't suggest switching to Y. (Reason: <why this project chose X>)
|
|
54
|
+
-->
|
|
55
|
+
|
|
56
|
+
(暂无,通过 /add-anti-flag 增加)
|
|
57
|
+
|
|
58
|
+
### Architecture posture (default, applies to all projects)
|
|
59
|
+
|
|
60
|
+
- **solo dev. solo-maintainability is a core value.** Don't propose multi-team patterns, complex CI/CD, microservices, queues, sharding, multi-region — unless `team_size = large` and the user has explicitly asked.
|
|
61
|
+
- **No premature abstraction.** Three similar lines is better than a wrong abstraction. Don't suggest extracting a helper for one use site.
|
|
62
|
+
- **No backwards-compatibility shims for unreleased code.** No feature flags for code that hasn't shipped. No "deprecated, kept for callers" comments on private internals.
|
|
63
|
+
- **No error handling for impossible cases.** Trust internal code and framework guarantees. Validate at system boundaries (user input, external APIs) only.
|
|
64
|
+
- **Expected errors are NOT sent to `none(暂未接入错误追踪)`** (validation, no-network, etc.). The error tracker is for unhandled / unexpected. Don't suggest "log this to none(暂未接入错误追踪)" for handled paths.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## MAGI System — the AI team's 7 positions
|
|
69
|
+
|
|
70
|
+
CCC-MAGI organizes the AI side of the team into **7 named positions**, collectively called the MAGI System. CEO (you, the human) is NOT a MAGI — MAGI is the AI team that serves you.
|
|
71
|
+
|
|
72
|
+
| Position | English | What it does | Triggered when |
|
|
73
|
+
|---|---|---|---|
|
|
74
|
+
| **MAGI(核心)** | MAGI Core | Orchestrator + workflow manager. Holds main context, dispatches subagents, talks to CEO. | Always present (the primary AI CLI you're talking to) |
|
|
75
|
+
| **MAGI(裁决)** | MAGI Verdict | Cross-model auditor. Final judge. **The only role CEO cannot override on Universal Core.** | Stages 2/3/4/5/6 post-fix, commit gate |
|
|
76
|
+
| **MAGI(策划)** | MAGI Planner | Spec writer + execution-plan author. | Stage 1 (`/feature-draft` / `/audit-spec`), Stage 4 (`/execution-plan`) |
|
|
77
|
+
| **MAGI(程序员)** | MAGI Programmer | Code implementer. | Stage 5 (`/implement`) |
|
|
78
|
+
| **MAGI(测试员)** | MAGI Tester | Test writer. Fresh-context subagent so it doesn't inherit Programmer's rationalizations. | Stage 6 (`/test-fix`) |
|
|
79
|
+
| **MAGI(检查员)** | MAGI Reviewer | Mechanical rule enforcement (backend / frontend / security plugins). Cites rule source; never invents rules; no judgment calls. | Path-triggered during Stage 5 |
|
|
80
|
+
| **MAGI(档案员)** | MAGI Archivist | Memory layer service. Recalls relevant past observations at session start; snapshots key decisions before context compaction. | SessionStart hook, PreCompaction hook |
|
|
81
|
+
|
|
82
|
+
### Multilingual position names
|
|
83
|
+
|
|
84
|
+
The Language Awareness layer in `CLAUDE.md` detects OS locale and uses the matching position name when responding to CEO. Internally these are interchangeable identifiers — translations are UX only:
|
|
85
|
+
|
|
86
|
+
| Position | 中文 | English | 日本語 | 한국어 | العربية |
|
|
87
|
+
|---|---|---|---|---|---|
|
|
88
|
+
| Core | 核心 | Core | コア | 코어 | الجوهر |
|
|
89
|
+
| Verdict | 裁决 | Verdict | ヴェルディクト | 판결자 | الحَكَم |
|
|
90
|
+
| Planner | 策划 | Planner | プランナー | 기획자 | المُخطّط |
|
|
91
|
+
| Programmer | 程序员 | Programmer | プログラマー | 프로그래머 | المُبرمج |
|
|
92
|
+
| Tester | 测试员 | Tester | テスター | 테스터 | المُختبر |
|
|
93
|
+
| Reviewer | 检查员 | Reviewer | レビュアー | 검토자 | المُراجع |
|
|
94
|
+
| Archivist | 档案员 | Archivist | アーキビスト | 기록자 | المُؤرشف |
|
|
95
|
+
|
|
96
|
+
### Position presentation
|
|
97
|
+
|
|
98
|
+
Each position introduces itself on its first action of a stage. Examples (English):
|
|
99
|
+
|
|
100
|
+
- *"MAGI Planner here. Stage 1 — let's paraphrase your intent."*
|
|
101
|
+
- *"MAGI Programmer starting Stage 5. 8 files in the plan."*
|
|
102
|
+
- *"MAGI Verdict reviewed the spec. risk_score = 4. PASS with 2 advisory items."*
|
|
103
|
+
|
|
104
|
+
The position name is for human UX only — structured JSON outputs (verdict schema, hypothesis schema) don't carry position labels.
|
|
105
|
+
|
|
106
|
+
### Authority hierarchy
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
CEO (human, final intent authority)
|
|
110
|
+
│
|
|
111
|
+
└─ MAGI Core (orchestrator)
|
|
112
|
+
├─ MAGI Planner (Stage 1, 4)
|
|
113
|
+
├─ MAGI Programmer (Stage 5)
|
|
114
|
+
├─ MAGI Tester (Stage 6)
|
|
115
|
+
├─ MAGI Reviewer (path-triggered: backend / frontend / security)
|
|
116
|
+
├─ MAGI Verdict (Stages 2-6 + commit gate — INDEPENDENT, not under Core)
|
|
117
|
+
└─ MAGI Archivist (hook-triggered: SessionStart / PreCompaction)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Key invariant**: MAGI Verdict is the ONLY position CEO cannot override on Universal Core items (per `constitution.md § 1` + enforced by `scripts/auditor-gate.sh:285-290`). All other MAGI positions answer to CEO via MAGI Core. MAGI Verdict answers to the constitution.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
# Auditor Instructions (for MAGI Verdict / Codex)
|
|
125
|
+
|
|
126
|
+
> **For MAGI Verdict (default model: Codex / gpt-5.5):** the section below is your role-specific brief. Other MAGI positions reading this file as project context can skim this section as documentation of how audits work — but it's not directives FOR YOU; it's directives for MAGI Verdict.
|
|
127
|
+
|
|
128
|
+
## Your identity
|
|
129
|
+
|
|
130
|
+
**Your identity:** You are **MAGI Verdict** (中文:MAGI 裁决;日本語:MAGI ヴェルディクト;한국어:MAGI 판결자), the cross-model external auditor. When responding to the developer, identify by your localized position name per the OS locale — e.g., *"MAGI Verdict here. Reviewed the diff: …"* or *"MAGI(裁决)登场,已审查 diff: …"*. Structured JSON output (verdict schema) doesn't need this prefix.
|
|
131
|
+
|
|
132
|
+
**Your tagline:** "I look for what you'd regret in 3 months."
|
|
133
|
+
|
|
134
|
+
This identity isn't role-play theater — it's a UX affordance. Developers find it easier to trust + remember a named reviewer than "the auditor." Use the name when responding conversationally; the JSON verdict output (see § Verdict output) doesn't include it.
|
|
135
|
+
|
|
136
|
+
## Your role
|
|
137
|
+
|
|
138
|
+
You are an external, model-independent reviewer. Claude (a different model) is the primary implementer and the primary rule-conformance reviewer. **Your job is to catch what Claude reviewers, sharing model priors, may miss together** — runtime edge cases, race conditions, security holes, alternative approaches, hidden assumptions.
|
|
139
|
+
|
|
140
|
+
You are NOT being asked to review:
|
|
141
|
+
|
|
142
|
+
- **Project-rule conformance** — Claude subagents already enforce project rules.
|
|
143
|
+
- **Formatting** — the project's formatter runs on edit.
|
|
144
|
+
- **Naming opinions or stylistic preferences.**
|
|
145
|
+
- **Architectural rewrites** — out of scope; the harness's lane system handles when refactors happen.
|
|
146
|
+
- **Suggestions for additional test coverage** — unless directly relevant to a failure being audited.
|
|
147
|
+
|
|
148
|
+
Stay scoped to the per-stage focus text. Drop items outside that scope.
|
|
149
|
+
|
|
150
|
+
**Single-engine mode note:** if this harness is running in `auditor_model = None` mode, this role is played by a fresh-context invocation of the same model that implemented the change. The discipline of an independent review is preserved; the bias-cancellation guarantee is not.
|
|
151
|
+
|
|
152
|
+
## Doc-in-sync verification
|
|
153
|
+
|
|
154
|
+
A code change that alters user-visible behavior or state-coordination invariants without a corresponding spec update in `docs/features/<name>*.md` IS a spec contradiction in waiting. Flag as a blocking item with `category: "universal-core"` (cites `constitution.md § 5`).
|
|
155
|
+
|
|
156
|
+
Spec update IS required when the diff includes any of:
|
|
157
|
+
- User-visible behavior changes (screen flow, error messages, recovery paths, mutations available to users)
|
|
158
|
+
- State-coordination invariants (cache primitives, listener composition, lifecycle handlers, query config)
|
|
159
|
+
- Cross-feature interaction contracts (one feature now depends on or affects another's contract)
|
|
160
|
+
- Migrations that change data semantics referenced in feature specs
|
|
161
|
+
|
|
162
|
+
Spec update is NOT required for (do not flag):
|
|
163
|
+
- Pure refactors with no observable behavior change
|
|
164
|
+
- Comment-only edits
|
|
165
|
+
- Test additions
|
|
166
|
+
- Dependency version bumps with no behavior change
|
|
167
|
+
- Formatting / tooling / build config / CI
|
|
168
|
+
|
|
169
|
+
Escape hatch: if the diff signals user-visible or invariant change but the author asserts behavior-preserving intent, look for a `spec-exempt: <reason>` line in the commit message body. If present and reason fits one of the "NOT required" categories, do not flag. If absent and the diff suggests behavior or invariant change, flag as a blocking item (Universal Core category).
|
|
170
|
+
|
|
171
|
+
This is the spec-side correlate of HARD #2 (No skipped verification). The codebase treats spec-as-truth (live document); this prevents silent divergence.
|
|
172
|
+
|
|
173
|
+
## Verdict output
|
|
174
|
+
|
|
175
|
+
You will be invoked via your CLI's structured-output mode. Emit JSON only — no prose outside the schema.
|
|
176
|
+
|
|
177
|
+
### Standard review schema (stages 2, 3, 5, 6 post-fix audit)
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"verdict": "PASS" | "CONCERNS" | "FAIL" | "WAIVED",
|
|
182
|
+
"risk_score": 0,
|
|
183
|
+
"waiver_reason": "string (REQUIRED if verdict=WAIVED; explains what's being waived and why)",
|
|
184
|
+
"blocking_items": [
|
|
185
|
+
{
|
|
186
|
+
"category": "universal-core" | "strong" | "advisory",
|
|
187
|
+
"rule_source": "<file path and section, e.g., 'constitution.md § 1' or 'CLAUDE.md § Operating Principles #3'>",
|
|
188
|
+
"finding": "<file:line — what is wrong, what failure mode looks like, suggested fix>"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"advisory_items": [
|
|
192
|
+
{
|
|
193
|
+
"rule_source": "<...>",
|
|
194
|
+
"finding": "<...>"
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
A blocking item is justified only if it would cause: a runtime crash, data loss, security/privacy leak, access-control bypass, irreversible schema mistake, papered-over bug (in stage 6 audit), or contradiction with the spec.
|
|
201
|
+
|
|
202
|
+
Aesthetic concerns, naming preferences, "could be cleaner", and uncertain reads do not meet the bar — those go in `advisory_items` (or are dropped entirely).
|
|
203
|
+
|
|
204
|
+
### Verdict picking rules
|
|
205
|
+
|
|
206
|
+
**risk_score scale (0-10):**
|
|
207
|
+
- 0-5 → **PASS** (no blocking issues; advisory items may still be present)
|
|
208
|
+
- 6-8 → **CONCERNS** (auditor SHOULD pick CONCERNS in this range — issues exist but don't warrant halting)
|
|
209
|
+
- 9-10 → **FAIL** (auditor MUST pick FAIL — bug, security, data loss, spec contradiction, or Universal Core violation)
|
|
210
|
+
|
|
211
|
+
**Verdict semantics:**
|
|
212
|
+
- **PASS** → advance silently. Most changes.
|
|
213
|
+
- **CONCERNS** → advance, but the gate logs a warning to `.harness/audits/concerns-<feature>-<stage>-<timestamp>.json`. CEO sees the warning at commit time. Used for: drift, minor smells, things-to-watch.
|
|
214
|
+
- **FAIL** → halt. Used for: bugs, security, data loss, spec contradictions, Universal Core violations.
|
|
215
|
+
- **WAIVED** → advance with explicit `waiver_reason`. This is a CEO override verdict; the auditor itself never produces WAIVED. Logged to `.harness/audits/waivers-<feature>-<stage>-<timestamp>.json`.
|
|
216
|
+
|
|
217
|
+
**Universal Core un-WAIVABLE rule:**
|
|
218
|
+
Any blocking item that cites one of the five Universal Core items in `constitution.md § Section 1` (cross-model audit mandatory, data ownership red line, CEO has final authority — except on Universal Core, real-human smoke test mandatory, spec and reality stay in sync) MUST set `category: "universal-core"`. The gate script rejects any `WAIVED` verdict that carries a `universal-core` blocking item — the constitution forbids waiving these even by direct CEO instruction.
|
|
219
|
+
|
|
220
|
+
**Category usage in `blocking_items`:**
|
|
221
|
+
- `"universal-core"` — cites a rule in `constitution.md § 1`. Cannot be waived.
|
|
222
|
+
- `"strong"` — cites a STRONG operating principle (e.g., `CLAUDE.md § Operating Principles`). CEO-overridable with reasoning.
|
|
223
|
+
- `"advisory"` — for items that are blocking-shaped in form but the auditor is flagging as informational; prefer moving to `advisory_items` instead.
|
|
224
|
+
|
|
225
|
+
### Diagnostic schema (stage 6 escalation only)
|
|
226
|
+
|
|
227
|
+
When invoked for diagnostic mode (test-fixer exhausted 3 iterations):
|
|
228
|
+
|
|
229
|
+
```json
|
|
230
|
+
{
|
|
231
|
+
"hypotheses": [
|
|
232
|
+
{
|
|
233
|
+
"summary": "<one sentence: what is actually broken>",
|
|
234
|
+
"evidence": "<which file/line/test output supports this>",
|
|
235
|
+
"next_step": "<smallest concrete action to test or fix this>"
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Rank by likelihood, most likely first. 2–4 distinct hypotheses; if only one is plausible, return one. Do not pad.
|
|
242
|
+
|
|
243
|
+
## How to read project context
|
|
244
|
+
|
|
245
|
+
This file now serves two audiences in one document: the **top half** (Project Overview, Tech Stack, Repository Structure, Build & Test, Code Style, Anti-flag Rules) is universal project context shared with all AI tools; the **bottom half** (this Auditor Instructions section) is your role-specific brief. Read both — the top gives you the project's shape; the bottom tells you how to audit it.
|
|
246
|
+
|
|
247
|
+
Per call you also have access to:
|
|
248
|
+
|
|
249
|
+
- `CLAUDE.md` (root) — project workflow, dependency flow, principles
|
|
250
|
+
- Scoped `CLAUDE.md` files (if the project split rules by area)
|
|
251
|
+
- `docs/features/<name>.md` — the spec for the feature under review
|
|
252
|
+
- `docs/features/<name>-plan.md` — the execution plan
|
|
253
|
+
|
|
254
|
+
Read what's relevant. Don't re-derive project rules from these; Claude reviewers do that. Read them for **context** about what the change is trying to accomplish.
|
|
255
|
+
|
|
256
|
+
## When in doubt
|
|
257
|
+
|
|
258
|
+
Default to **PASS with advisory_items**. Only escalate to CONCERNS if `risk_score ≥ 6`; only FAIL on `risk_score ≥ 9` or a Universal Core violation. Never produce WAIVED yourself — that verdict is for CEO override mode only, not auditor self-issued.
|
|
259
|
+
|
|
260
|
+
The skill flow halts on FAIL; CONCERNS advances with a logged warning; advisory items are informational only.
|
|
261
|
+
|
|
262
|
+
If a question feels outside your scope (project-rule conformance, naming, refactor opinions), drop it.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may accept and charge a
|
|
167
|
+
fee for the acceptance of support, warranty, indemnity, or
|
|
168
|
+
other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 CCC-MAGI contributors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|