greprag 5.60.13 → 5.61.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.
@@ -0,0 +1,74 @@
1
+ # grepragOS — the operating laws
2
+
3
+ How to work WITH greprag, not just use its tools. The tool primers (inbox,
4
+ load, email, corpus, memory) teach each surface; this entry is the layer above
5
+ them — the behavior that makes everything you build discoverable, durable, and
6
+ fixable by the next session. Tenant-agnostic: these laws are the same for
7
+ every operator, every project, every harness.
8
+
9
+ ## Law 1 — Doctrine vs state
10
+
11
+ Doctrine (methods, skills, playbooks) ships in the CLI and is served by
12
+ `greprag load`. Live state (status files, records, project data) lives in the
13
+ repo. Never blur them: a skill is not a place for today's numbers, and a repo
14
+ doc is not a place for a reusable method.
15
+
16
+ A skill that depends on repo state MUST bridge the gap explicitly — carry a
17
+ **"STATE — read these first"** block naming the exact repo paths
18
+ (`docs/<area>/status.md`, not "the status doc"). `greprag load <skill>` then
19
+ delivers both the method AND the map to the live state. Full paths only: a
20
+ bare filename collides with bundled companion docs.
21
+
22
+ ## Law 2 — Discoverability
23
+
24
+ Every durable artifact must be findable by a session that has never seen this
25
+ conversation. The registration is part of the work, not an extra:
26
+
27
+ - **Docs** auto-register (the doc-pointer system rides the Stop hook) — but
28
+ only if you write them as real `.md` files in the repo.
29
+ - **Skills** auto-mirror on use (`greprag load` serves them cross-machine).
30
+ - **Decisions** get a dated entry in the owning ADR / decision log, in the
31
+ same commit as the code.
32
+ - **Everything else** (state files, artifacts, conventions) gets its path
33
+ named in the owning skill or doc (Law 1's STATE block).
34
+
35
+ Test: if you made it and nothing points at it, you didn't finish.
36
+
37
+ ## Law 3 — Pull before derive
38
+
39
+ Before asking the operator or re-deriving what the project already knows:
40
+ `greprag memory search "<topic>"` (past sessions), `greprag corpus search`
41
+ (reference banks), `greprag load` (the method catalog). Searching is cheap;
42
+ re-explaining is expensive; guessing is worst.
43
+
44
+ ## Law 4 — Friction ⇒ fix spawn, at the moment
45
+
46
+ Friction — you repeated yourself, fought a tool, got corrected twice on the
47
+ same thing, rediscovered something already known, hit a setup failure that
48
+ wasn't your edit — is fixed at the MOMENT it happens:
49
+
50
+ greprag fix spawn "<one unit of friction>"
51
+
52
+ - **One unit = one chip.** A fix chip exists for exactly one unit of
53
+ friction. Adjacent friction gets its own spawn — a chip that absorbs new
54
+ friction loses the context each unit needs.
55
+ - **The chip's contract** (it self-enforces): INVESTIGATE first — reproduce,
56
+ locate the root mechanism, draft the durable repair, score confidence
57
+ 0–100. Then the gate: **≥90** → implement, test, commit, report DONE.
58
+ **<90** → STOP, park with findings + options, co-design the repair with
59
+ the operator before touching code. Rarely can a chip design the durable
60
+ repair alone; the gate is what keeps repairs durable instead of
61
+ workarounds.
62
+ - **Never queue friction for later.** The queue-first reflex (`fix log` →
63
+ periodic digestion) is retired; the moment that produced the friction
64
+ holds the context the fix needs. `greprag fix log` survives only for
65
+ audit trails and design-input notes that are deliberately not chips.
66
+ - Every repair is ROOT-CAUSE: fix the pattern that makes the friction class
67
+ possible, never a guard on today's trigger.
68
+
69
+ ## Law 5 — Teach the system, not the chat
70
+
71
+ If the operator explains the same thing twice, the explanation belongs in a
72
+ durable surface — a skill, a load entry, a STATE block, an ADR — not in the
73
+ conversation. Hand-taught doctrine that stays in chat dies with the session;
74
+ that is itself friction (Law 4 applies).