Skip to content

Commit 62311c3

Browse files
committed
docs: v0.3.0 security model, sliced-batch workflow, tutorial revamp
Know-Code-Verified: fd7e02b523d0a6ba9724a001fe8097b18b3c35d5379d04bdd21911f0b12252ef
1 parent 4c5462a commit 62311c3

20 files changed

Lines changed: 1891 additions & 333 deletions

‎AGENTS.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Never set `KNOW_CODE_OVERRIDE` or `KNOW_CODE_ATTEST_PASSPHRASE` from the agent.
2121

2222
**Config:** `~/.know-code/config.json` + gitignored `.know-code/config.json`
2323

24-
CLI: `npm run know-code -- …`
24+
CLI (always local build in this repo): `npm run know-code -- …`
25+
After `npm run build`, keep bare `know-code` pointed here: `npm link -w @chtnnh/know-code`
26+
(`know-code doctor` warns if PATH still hits a stale global.)
2527

2628
Docs: https://kc.chtnnhfoundation.org

‎README.md‎

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
# k(no)w-code
22

3-
**Your agents don’t push until you know exactly what’s changed.**
3+
**Your agents don't push until you know exactly what's changed.**
44

5-
Cross-harness [Agent Skill](https://agentskills.io) + CLI that blocks `git commit`, `git push`, and PR creation until the **human** passes a comprehension quiz about the diff. **Agent-proposed grading** with human review — not self-scored. Works with Claude Code, Cursor, Codex, and plain terminals.
5+
Cross-harness [Agent Skill](https://agentskills.io) + CLI that blocks `git commit`, `git push`, and PR creation until **you** pass a comprehension quiz about the diff. The agent writes the quiz and proposes your grade — **you** answer in the browser and seal the gate. Not self-scored.
66

77
**Docs:** [kc.chtnnhfoundation.org](https://kc.chtnnhfoundation.org)
88

9-
## How it works
9+
## Who does what
1010

11-
1. **Attest key** — `know-code attest-init` once (passphrase-encrypted Ed25519).
12-
2. **Range session** — `know-code range begin` for multi-commit batches.
13-
3. **Question quota** — `know-code questions` before writing the quiz.
14-
4. **Agent grades** — writes `grade-proposal.json` after browser `ask`.
15-
5. **Human reviews** — `grade --review` → `pass` → `commit` → `range seal` → push.
16-
17-
```text
18-
attest-init → range begin → taught → questions → ask → grade propose → grade --review → pass
19-
→ commit(s) → range seal → push
20-
```
11+
| | Agent | You (human) |
12+
|---|-------|-------------|
13+
| Teach | Explains the change | `taught` (seal) |
14+
| Quiz | Writes `quiz.json`, runs `ask` | Answer in **browser** |
15+
| Grade | `grade-proposal.json` | `grade --review` → `pass` |
16+
| Stage | — (denied in agent hooks) | `git add` |
17+
| Commit | `know-code commit` | Or you, after pass |
18+
| Ship | — | `range seal`, `git push` |
2119

2220
## Install
2321

@@ -29,31 +27,25 @@ know-code skills
2927
know-code range begin
3028
```
3129

32-
## CLI highlights
33-
34-
| Phase | Command | Who |
35-
|-------|---------|-----|
36-
| Debug | `know-code doctor` · `status --json` | either |
37-
| Start range | `know-code range begin` | human |
38-
| Question quota | `know-code questions --template` | agent |
39-
| Validate quiz | `know-code quiz validate` | agent |
40-
| Teach receipt | `know-code taught` | human |
41-
| Quiz | `know-code ask` | human (browser) |
42-
| Grade proposal | agent writes `grade-proposal.json` | agent |
43-
| Review + pass | `know-code grade --review` · `pass` | human |
44-
| Ship checklist | `know-code ship` | human |
45-
| Commit | `know-code commit -m "…"` or `-F file` | human |
46-
| Finish range | `know-code range seal` | human |
47-
48-
**Human review** (after agent grading proposal):
30+
## The loop
4931

50-
```bash
51-
know-code grade --review
52-
know-code pass
53-
know-code commit -m "feat: …"
32+
```text
33+
range begin → [agent teaches] → taught → [agent: quiz] → ask → [you: browser]
34+
→ [agent: grade proposal] → grade --review → pass → [agent: commit(s)] → range seal → push
5435
```
5536

56-
See [grading docs](https://kc.chtnnhfoundation.org/docs/grading) and [tutorial](https://kc.chtnnhfoundation.org/docs/tutorial).
37+
| Phase | Command | Who |
38+
|-------|---------|-----|
39+
| Debug | `status --json` · `doctor --strict` | either |
40+
| Start range | `range begin` | you |
41+
| Teach receipt | `taught` | you |
42+
| Quiz authoring | `questions` · `quiz.json` · `quiz validate` | agent |
43+
| Quiz answers | `ask` | you (browser) |
44+
| Grade | `grade-proposal.json` → `grade --review` · `pass` | agent → you |
45+
| Commit | `know-code commit -m "…"` | agent |
46+
| Finish | `range seal` · `ship` · `git push` | you |
47+
48+
Walkthrough: [tutorial](https://kc.chtnnhfoundation.org/docs/tutorial) · Mechanics: [how it works](https://kc.chtnnhfoundation.org/docs/how-it-works)
5749

5850
## Author
5951

0 commit comments

Comments
 (0)