okf-pro 1.0.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.
Files changed (93) hide show
  1. checksums.yaml +7 -0
  2. data/.okf/contract/containment-directions.md +107 -0
  3. data/.okf/contract/exit-codes.md +42 -0
  4. data/.okf/contract/gates-only-at-the-hook-door.md +39 -0
  5. data/.okf/contract/index.md +10 -0
  6. data/.okf/contract/silent-skips.md +78 -0
  7. data/.okf/contract/telemetry-does-not-lie.md +218 -0
  8. data/.okf/contract/the-contract.md +43 -0
  9. data/.okf/design/a-comment-is-not-an-implementation.md +85 -0
  10. data/.okf/design/a-rule-you-can-walk-past.md +68 -0
  11. data/.okf/design/derivation-that-writes.md +161 -0
  12. data/.okf/design/failure-modes.md +43 -0
  13. data/.okf/design/index.md +18 -0
  14. data/.okf/design/lineage.md +95 -0
  15. data/.okf/design/structure-laws.md +46 -0
  16. data/.okf/design/the-residue.md +44 -0
  17. data/.okf/design/three-laws.md +71 -0
  18. data/.okf/design/three-pillars.md +48 -0
  19. data/.okf/index.md +31 -0
  20. data/.okf/log.md +74 -0
  21. data/.okf/scaffold/collisions-and-refusals.md +76 -0
  22. data/.okf/scaffold/index.md +8 -0
  23. data/.okf/scaffold/no-date-ships.md +41 -0
  24. data/.okf/scaffold/ownership-not-subject.md +63 -0
  25. data/.okf/scaffold/the-adopters-manual.md +114 -0
  26. data/.okf/seam/bundler-scoping.md +45 -0
  27. data/.okf/seam/identity-not-existence.md +67 -0
  28. data/.okf/seam/index.md +8 -0
  29. data/.okf/seam/the-wrapper.md +42 -0
  30. data/.okf/seam/three-fail-opens.md +44 -0
  31. data/.okf/testing/drills-over-units.md +41 -0
  32. data/.okf/testing/fixture-is-a-client.md +35 -0
  33. data/.okf/testing/index.md +4 -0
  34. data/.okf/trust/index.md +7 -0
  35. data/.okf/trust/read-owed-rule.md +45 -0
  36. data/.okf/trust/scalar-verified.md +48 -0
  37. data/CHANGELOG.md +187 -0
  38. data/LICENSE.txt +201 -0
  39. data/NOTICE +10 -0
  40. data/README.md +383 -0
  41. data/lib/okf/plugin.rb +148 -0
  42. data/lib/okf/pro/attestation.rb +62 -0
  43. data/lib/okf/pro/audit.rb +161 -0
  44. data/lib/okf/pro/board/edit.rb +201 -0
  45. data/lib/okf/pro/board.rb +291 -0
  46. data/lib/okf/pro/budget.rb +144 -0
  47. data/lib/okf/pro/bundle_root.rb +241 -0
  48. data/lib/okf/pro/cli.rb +914 -0
  49. data/lib/okf/pro/closing.rb +206 -0
  50. data/lib/okf/pro/conformance.rb +127 -0
  51. data/lib/okf/pro/conserve.rb +94 -0
  52. data/lib/okf/pro/event.rb +95 -0
  53. data/lib/okf/pro/friction.rb +262 -0
  54. data/lib/okf/pro/guards.rb +92 -0
  55. data/lib/okf/pro/log/edit.rb +68 -0
  56. data/lib/okf/pro/log.rb +162 -0
  57. data/lib/okf/pro/pairing.rb +271 -0
  58. data/lib/okf/pro/reconcile.rb +76 -0
  59. data/lib/okf/pro/records.rb +90 -0
  60. data/lib/okf/pro/scaffold.rb +258 -0
  61. data/lib/okf/pro/shell_guard.rb +164 -0
  62. data/lib/okf/pro/snapshot.rb +156 -0
  63. data/lib/okf/pro/state.rb +174 -0
  64. data/lib/okf/pro/target.rb +91 -0
  65. data/lib/okf/pro/template/gem/.claude/hooks/run +119 -0
  66. data/lib/okf/pro/template/gem/.claude/skills/okf-pro/SKILL.md +233 -0
  67. data/lib/okf/pro/template/gem/.claude/skills/okf-pro/guides/attribution.md +46 -0
  68. data/lib/okf/pro/template/gem/.claude/skills/okf-pro/guides/board.md +55 -0
  69. data/lib/okf/pro/template/gem/.claude/skills/okf-pro/guides/closing.md +21 -0
  70. data/lib/okf/pro/template/gem/.claude/skills/okf-pro/guides/frontmatter.md +73 -0
  71. data/lib/okf/pro/template/gem/.claude/skills/okf-pro/guides/okf-rules.md +25 -0
  72. data/lib/okf/pro/template/gem/.githooks/pre-commit +68 -0
  73. data/lib/okf/pro/template/gem/.github/workflows/okf-pro.yml +69 -0
  74. data/lib/okf/pro/template/seed/.claude/settings.json +24 -0
  75. data/lib/okf/pro/template/seed/.okf/areas/corpus.md +73 -0
  76. data/lib/okf/pro/template/seed/.okf/areas/index.md +6 -0
  77. data/lib/okf/pro/template/seed/.okf/board.md +21 -0
  78. data/lib/okf/pro/template/seed/.okf/glossary/index.md +13 -0
  79. data/lib/okf/pro/template/seed/.okf/index.md +30 -0
  80. data/lib/okf/pro/template/seed/.okf/journal/index.md +11 -0
  81. data/lib/okf/pro/template/seed/.okf/learnings/index.md +13 -0
  82. data/lib/okf/pro/template/seed/.okf/log.md +10 -0
  83. data/lib/okf/pro/template/seed/.okf/projects/index.md +23 -0
  84. data/lib/okf/pro/template/seed/.okf/reference/index.md +16 -0
  85. data/lib/okf/pro/template/seed/.okf/roadmap.md +33 -0
  86. data/lib/okf/pro/template/seed/.tmp/.gitkeep +0 -0
  87. data/lib/okf/pro/template/seed/CLAUDE.md +61 -0
  88. data/lib/okf/pro/template/seed/README.md +488 -0
  89. data/lib/okf/pro/template/seed/gitignore +17 -0
  90. data/lib/okf/pro/version.rb +7 -0
  91. data/lib/okf/pro/writes.rb +560 -0
  92. data/lib/okf/pro.rb +198 -0
  93. metadata +169 -0
@@ -0,0 +1,68 @@
1
+ ---
2
+ type: Learning
3
+ title: A rule you can walk past is a preference
4
+ description: Why the gates block rather than warn, why three doors are not redundant, and why the day's ritual must stay silent on a day nobody worked.
5
+ ---
6
+
7
+ # The claim
8
+
9
+ Every knowledge system that has ever failed its owner failed the same way: the
10
+ discipline was real for three weeks, then it was optional, then it was gone. A
11
+ warning you can dismiss is a preference with better typography, and the dismissal
12
+ becomes reflex faster than the habit does.
13
+
14
+ So the checks refuse. The edit does not land.
15
+
16
+ # What a refusal owes the person it stops
17
+
18
+ Three properties, and a message missing any of them trains people to route
19
+ around the gate rather than to comply with it:
20
+
21
+ * **It names the rule that fired.** Not "invalid" — the rule, by number and in
22
+ words, so the refusal teaches the system it is enforcing.
23
+ * **It names the escape.** The cap is the adopter's own; going to six is
24
+ allowed. What is forbidden is going to six *silently*. A rule with no
25
+ legitimate exit gets disabled the first time it is genuinely wrong, and takes
26
+ the rest of the gates with it.
27
+ * **It forces the comparison being avoided.** To promote a sixth thing you have
28
+ to look at five commitments and say which is worth less. That comparison is
29
+ the actual work of prioritisation, and without a ceiling nobody ever performs
30
+ it — they only add.
31
+ * **The escape it names has to work.** The stop gate refuses a Snapshot line
32
+ that disagrees with the board and prints the recomputed line, because the fix
33
+ is a paste. A capture dated in the future gives a *negative* age; `render`
34
+ wrote `oldest -365d` while the parse pattern demanded a digit straight after
35
+ `oldest `, so the gate disagreed with the line it had itself just generated —
36
+ and refused the paste it had just recommended. One mistyped year, and the only
37
+ way out was to find a typo no gate was pointing at. A rule with no legitimate
38
+ exit gets disabled the first time it is genuinely wrong; a rule whose *stated*
39
+ exit does not work is that same failure with a false floor under it, because
40
+ the reader spends their patience before they start looking.
41
+
42
+ The repair is not to make the counter agree by making it lie. Clamping the age
43
+ at zero would have made the gate self-consistent and `oldest 0d` unexplainable,
44
+ which is the quiet-wrong-number failure derivation exists to refuse. A negative
45
+ age is the honest reading of a future-dated capture, so both halves read it:
46
+ render writes it and parse accepts it.
47
+
48
+ # Why three doors are not two too many
49
+
50
+ Each door sees edits the others structurally cannot. The agent hooks fire at the
51
+ tool boundary, so an edit made in an editor never reaches them — which is why
52
+ the commit door asks git directly. A clone that never ran `core.hooksPath` has
53
+ no commit door at all — which is why CI asks a third time. None of the three is
54
+ a belt-and-braces copy of another; each is the only witness to a class of edit.
55
+
56
+ # The counterweight: never bill a ritual for opening a file
57
+
58
+ A gate that fires on the calendar rather than on the work teaches people to
59
+ ignore it, and it is the same wolf-crying failure that
60
+ [Law 2](/design/three-laws.md)'s limit names. So the stop gate asks whether any
61
+ markdown in the bundle is actually dirty before it asks for anything: a session
62
+ that read the bundle and changed nothing closes in silence.
63
+
64
+ The confessed cost of that choice: a counter drifted by an editor edit stays
65
+ invisible until the next session stops, because `audit` checks that the day's
66
+ snapshot is present and not that its numbers are current. Preferring a
67
+ late-and-trusted gate to a punctual one nobody reads is the trade, made
68
+ deliberately.
@@ -0,0 +1,161 @@
1
+ ---
2
+ type: Decision
3
+ title: Derivation may write, under a conservation guard
4
+ description: Failure mode 07 forbids an LLM regenerating a view; it does not forbid a Ruby function performing a declared, line-conserving edit — and the status quo it was written against was the failure mode itself.
5
+ ---
6
+
7
+ # The verdict, read precisely
8
+
9
+ Failure mode 07 — **Agent Drift** — is stated in the lineage's design record as:
10
+
11
+ > An LLM regenerating a view drops a task, silently — no error, no diff anyone
12
+ > reads, one commitment gone. Closed by: the split. Derivation exists as a
13
+ > checker and never as a generator: a thing that computes and refuses has no
14
+ > way to drop anything in silence.
15
+
16
+ [snapshot](/design/three-laws.md) is built on that, and it stands: `okf pro
17
+ snapshot` computes the day's line and prints it, and the stop gate verifies the
18
+ line a person appended. Nothing writes it.
19
+
20
+ But the verdict names two things — **derivation** (recomputing a whole view and
21
+ writing it back) and **an LLM** (the actor). Neither is what a mechanical writer
22
+ does, and reading the rule as "no verb may ever write" left the status quo in
23
+ place: the agent rewrote `board.md` with a shell heredoc. That is the
24
+ silent-drop hazard exactly, performed by exactly the actor the record names. The
25
+ prohibition was protecting the failure mode rather than the bundle.
26
+
27
+ # What the write verbs may do, and what makes it enforceable
28
+
29
+ > **Additive and targeted, never regenerative.** A write verb may append a line
30
+ > or edit the line it was given. No verb rewrites a file it did not fully derive
31
+ > from that file's own prior contents. A writer never satisfies its own gate.
32
+
33
+ That sentence is a promise, and a promise is what mode 07 already broke once.
34
+ `Conserve` is what converts it into a property: every write verb computes its
35
+ new text purely, **declares the delta it intends** — added, removed, moved —
36
+ and hands before, after and claim to a guard that compares line multisets. If
37
+ the actual delta is not the declared one, the verb exits 2 and the file is
38
+ untouched.
39
+
40
+ The asymmetry matters in both directions. A line added that nobody claimed is a
41
+ finding; so is a claimed addition that never happened, because an edit that did
42
+ less than it said is how a promotion silently no-ops and reports success.
43
+
44
+ A Ruby function that provably cannot drop a line is the remedy for a heredoc
45
+ that can, and the difference between them is that this one is checked.
46
+
47
+ # What the guard cannot supply, and what it cannot see
48
+
49
+ **A satisfied checker is not a correct edit.** `close` marks a project index by
50
+ appending the closure marker to its first line, and guarded that by asking
51
+ whether the result satisfied `Pairing::MARKER`. It did — for a file whose first
52
+ line is `---`. `Pairing.marker?("--- — closed 2026-08-17")` is true, because
53
+ the regex needs only the word and a date. So an index carrying YAML frontmatter
54
+ had its fence destroyed, the concept silently lost its `type`, `title` and
55
+ `description`, and `okf validate` still exited 0. `Conserve` could not see it
56
+ either: the mangling *was* the declared edit.
57
+
58
+ The fix is to check the SHAPE of the line being edited, not only the shape of
59
+ the result: the first line must be a markdown heading, because that is where
60
+ the skill teaches the marker and the only place `closed?` looks. The general
61
+ form of the lesson is that a conservation guard proves a line was not dropped
62
+ and proves nothing about whether the right line was chosen — the choice needs
63
+ its own precondition.
64
+
65
+ **Decide about every file before writing any of them.** `close` touches three,
66
+ and `write_atomically` makes each write atomic and the set not. Checking as it
67
+ went produced a real half-closed bundle: a board that had lost its budget
68
+ header refused at step two with the index already marked, so the project read
69
+ as closed while its board line survived and no log entry existed — and the
70
+ refusal message said nothing had happened. Every check now runs and every new
71
+ text is computed before anything lands, so a *refusal* writes nothing at all,
72
+ which is what the message claims. The residue of a crash mid-sequence is still
73
+ real, and still visible to `okf pro audit`; the residue of a refusal is now
74
+ none.
75
+
76
+ **A verb that turns a name into a path owes a containment decision — twice.**
77
+ `File.join` resolves `..` without comment, so `okf pro close ../../somewhere`
78
+ would put a closure marker on a stranger's index. A project is one directory
79
+ segment by the structure's own rule, so anything else is refused rather than
80
+ normalised — quietly rewriting a path the caller gave is how a traversal
81
+ becomes an edit nobody sees.
82
+
83
+ A validated name is not a contained path, though, and the second half was
84
+ missing: `projects/<slug>` can be a **symlink** out of the bundle, and `close`
85
+ read and rewrote it with the uncontained pair while `Pairing.closed?` refused to
86
+ read the very same file and answered *open*. The write landed outside the bundle
87
+ and the checker then denied it had happened.
88
+ [containment-directions](/contract/containment-directions.md) carries the rule
89
+ that came out of it: the read door and the write door are two decisions about
90
+ one path, and they must agree.
91
+
92
+ **The guard's refusal is only as good as the line it names.** `set_declared`
93
+ found the budget header per line and spliced it back per substring, so a prose
94
+ line quoting the header was rewritten instead. `Conserve` saw the delta was not
95
+ the declared one and wrote nothing, exactly as designed — and then named the
96
+ prose line, leaving the board unpromotable until somebody edited text that was
97
+ never at fault. A guard that refuses correctly and points somewhere useless is
98
+ still a verb the user cannot get past.
99
+
100
+ **A selector has to name a thing.** They are keyed and never positional, and
101
+ they refuse on ambiguity — but `select` only refuses on more than one match, so
102
+ a selector that matched *everything* still went through wherever exactly one
103
+ line was in range. `/` and `/projects` chomp to a prefix that is a proper
104
+ ancestor of every linked line, and `start_with?` turns the name into a wildcard;
105
+ the empty-selector guard had the argument written down and covered one spelling
106
+ of it. A directory every project sits under names none of them.
107
+
108
+ **And a writer's first positional is content, which makes a flag data.** The
109
+ write verbs take no flags, so `okf pro capture --help` appended
110
+ `- <date> — --help` to the Inbox and exited 0. A verb whose failure mode is
111
+ committing a garbage board line has to refuse a leading dash rather than
112
+ swallow it; `--` is the escape for the rare content that really does begin with
113
+ one.
114
+
115
+ # What still may not be written
116
+
117
+ * **A view regenerated from anything but its own prior contents.** The rule is
118
+ the file's text in, the file's text out, plus a named delta.
119
+ * **`snapshot --write`.** A writer and a checker sharing a code path agree
120
+ trivially and prove nothing; the stop gate keeps its independent read.
121
+ * **A concept body.** Prose is judgment, and judgment is the skill's. `close`
122
+ performs its three mechanical moves and reports the durable extraction to
123
+ `learnings/` as owed.
124
+ * **`verified:`.** The owner's approval is the attestation
125
+ ([trust/read-owed-rule](/trust/read-owed-rule.md)); a verb that wrote it would
126
+ be manufacturing the one thing the whole trust surface measures.
127
+ * **A seeded file that is missing.** `capture` will not create `board.md` — a
128
+ board written by a verb is a board nobody decided the shape of — and the same
129
+ answer holds for `journal/index.md`, which `journal open` appends a line to.
130
+ Rebuilding it from the one line the verb knows how to write returns a file
131
+ holding only that line: the `# Journal` heading and the seeded prose gone,
132
+ under a message reporting success. That is regeneration wearing an append's
133
+ clothes, and the giveaway is that the output does not depend on the input.
134
+ The sibling policy is the rule: a write verb refuses a missing file and names
135
+ the audit that reports it.
136
+
137
+ # The safety property the guards cannot supply
138
+
139
+ A verb invoked through Bash is seen by neither `guard-verified` (Edit and Write
140
+ only) nor `shell-guard` (there is no mutator pattern in `okf pro capture`). So
141
+ the write verbs are safe **by construction** rather than by being watched:
142
+ agent-supplied text reaches a board line body or a journal entry body and
143
+ nowhere else, and text spanning lines is refused rather than escaped — a
144
+ one-line write is a write that cannot carry a `---`.
145
+
146
+ The third piece is the one that only exists because a verb now takes a *name*
147
+ from the caller and turns it into a *path*. `okf pro close <slug>` marks a
148
+ file's first line, and `File.join` resolves `..` without comment — so a slug
149
+ that can leave `projects/` puts a closure marker on a stranger's index. A
150
+ project is one directory segment by the structure's own rule, so anything else
151
+ is **refused rather than normalised**. Quietly rewriting a path the caller gave
152
+ is how a traversal becomes an edit nobody sees, and it is the same instinct
153
+ [containment-directions](/contract/containment-directions.md) records for reads:
154
+ one decision per call site, made out loud.
155
+
156
+ The selectors carry the other half. They are keyed — a `/projects/<slug>` link,
157
+ or a substring only one line holds — and they **refuse on ambiguity** instead of
158
+ picking. A positional index is what
159
+ [structure-laws](/design/structure-laws.md)'s keyed-identity rule forbids, for
160
+ the reason this whole file is about: agents rewrite, and "the third line under
161
+ Backlog" names a different commitment after any edit anyone makes.
@@ -0,0 +1,43 @@
1
+ ---
2
+ type: Finding
3
+ title: The eight failure modes
4
+ description: The named ways a personal knowledge system dies — three by lying and five by telling the truth badly — and the mechanism that answers each.
5
+ ---
6
+
7
+ # The catalogue
8
+
9
+ Every rule in this design exists because one of these demanded it. None is
10
+ hypothetical.
11
+
12
+ | # | Failure | Closed by |
13
+ |---|---------|-----------|
14
+ | 1 | **The Flood** — weeks without triage, and the tidy view cannot signal its own incompleteness | the snapshot delta: inbox count and oldest age, read against yesterday's line |
15
+ | 2 | **Contradiction Cascade** — Monday's doc says X, Wednesday's thread Y, Friday's ticket Z, all fresh, all verified | triage as a read before a write; capture the decision's timestamp, not the artifact's |
16
+ | 3 | **Cross-Cutting Meeting** — a meeting kills a project offscreen and the absence of a link is invisible | triage asking *what does this make untrue?*, not only *where does this belong?* |
17
+ | 4 | **Ghost Project** — a deprioritised project never closes and crowds the view | dormancy, derived from journal links: still in flight, or backlog pretending? |
18
+ | 5 | **The Liar** — a misheard number, captured and verified: maximum trust, false claim | not closable — [the residue](/design/the-residue.md). Mitigated by the source pointer |
19
+ | 6 | **Amnesia Week** — journal completeness inversely correlates with workload | declared reconstruction: rebuild from `log.md` and git history, and say in the entry that you did |
20
+ | 7 | **Agent Drift** — an LLM regenerating a view drops a task silently | the checker/generator split, plus the conservation guard where a verb does write — [derivation-that-writes](/design/derivation-that-writes.md) |
21
+ | 8 | **Priority Inflation** — everything becomes priority one and priority stops carrying information | the cap: promotion requires demotion, and position replaces priority syntax |
22
+
23
+ # The split that matters
24
+
25
+ Three of these are the system **lying** — 2, 3 and 5. Provenance and
26
+ reconciliation close them.
27
+
28
+ The other five are the system **telling the truth badly**: incomplete, noisy,
29
+ inflated, thin. Not one false statement between them, and the terminal state is
30
+ identical — you stop reading it. That is the finding the design is built on:
31
+ **attention, not truth, is the scarce resource**, and no frontmatter field ever
32
+ fixed an attention leak. It is why the laws are behavioural.
33
+
34
+ # The same standard, applied to the gates themselves
35
+
36
+ The enforcement layer is held to this from the other side, and its own bug
37
+ history says why: every defect it has produced failed open *while looking like
38
+ it had run* — a missing parser, a misspelled variable, a rescued error, a wrong
39
+ event shape, a stray binary on PATH. Silent incompleteness is failure mode 1
40
+ wearing the checker's uniform, which is why the gates refuse on their own
41
+ absence ([contract/the-contract](/contract/the-contract.md)) and why the suite
42
+ is weighted toward the degraded paths
43
+ ([testing/drills-over-units](/testing/drills-over-units.md)).
@@ -0,0 +1,18 @@
1
+ # Design
2
+
3
+ Why the rules exist, and what each one was paid for.
4
+
5
+ The other areas document the machinery — the contract it keeps, the seam it
6
+ enters through, what it writes, how it is tested. This one documents the
7
+ argument that machinery serves: which named failure each rule closes, which
8
+ limit it admits, and which parts are borrowed rather than invented.
9
+
10
+ * [three-pillars](three-pillars.md) - Know, Work, State — and why the third is the one neither source had.
11
+ * [three-laws](three-laws.md) - The behaviour the gates enforce, each with the limit it admits.
12
+ * [the-residue](the-residue.md) - Trust measures process, never truth. The one failure no law closes.
13
+ * [failure-modes](failure-modes.md) - The eight ways a system like this dies, and the mechanism that answers each.
14
+ * [structure-laws](structure-laws.md) - A directory is a retrieval question, not a subject.
15
+ * [a-rule-you-can-walk-past](a-rule-you-can-walk-past.md) - Why a refusal blocks instead of warning, and why it stays silent on days nobody worked.
16
+ * [a-comment-is-not-an-implementation](a-comment-is-not-an-implementation.md) - A regex that claimed to anchor `>` never did, and the guard fired on reads for its whole life.
17
+ * [derivation-that-writes](derivation-that-writes.md) - Failure mode 07 forbids an LLM regenerating a view, not a declared, line-conserving edit.
18
+ * [lineage](lineage.md) - What CODE, PARA and GTD supplied, what was deliberately left, and where this design breaks with them.
@@ -0,0 +1,95 @@
1
+ ---
2
+ type: Overview
3
+ title: Lineage
4
+ description: What CODE and PARA supplied, what GTD supplied, what was deliberately left behind, and the three points where this design breaks with both its sources.
5
+ sources:
6
+ - id: basb
7
+ resource: https://www.buildingasecondbrain.com/
8
+ title: Building a Second Brain
9
+ author: Tiago Forte
10
+ - id: gtd
11
+ resource: https://gettingthingsdone.com/
12
+ title: Getting Things Done
13
+ author: David Allen
14
+ ---
15
+
16
+ # Nothing here is invented from nothing
17
+
18
+ Two established systems supply most of the machinery. A third pillar was added
19
+ because both share the same blind spot. Stating the debts precisely is not
20
+ courtesy: a borrowed rule carries the reasoning that justified it, and a rule
21
+ whose provenance is lost gets re-argued from scratch every time someone
22
+ questions it.
23
+
24
+ # Building a Second Brain — the Know and Work pillars
25
+
26
+ CODE (Capture, Organize, Distill, Express) treats knowledge as something that
27
+ moves, and its load-bearing insight is that **distillation is a separate act
28
+ from capture**.[^basb] Systems that collapse the two become archives nobody
29
+ rereads. PARA files by actionability rather than by topic — not *where does this
30
+ belong subject-wise*, a question with no stable answer, but *what is my
31
+ relationship to this right now*.[^basb]
32
+
33
+ **Taken:** capture as a distinct, near-frictionless step; distillation as its own
34
+ act, which is why `learnings/` exists at all; actionability as the filing axis;
35
+ and projects-drive-to-done against areas-maintain-a-standard — a distinction
36
+ [Law 3](/design/three-laws.md) later needed, because legitimate stillness in an
37
+ area is what keeps the dormancy alarm from crying wolf.
38
+
39
+ **Left:** Resources as one room, split three ways because it was three retrieval
40
+ questions. Archives as a *place* — it became a status, since moving files breaks
41
+ citations. And tool-agnostic vagueness: this design commits to plain files in a
42
+ validating format.
43
+
44
+ # Getting Things Done — the Work and State pillars
45
+
46
+ GTD's durable insight is psychological before it is organisational: an open loop
47
+ held in the head consumes attention whether or not you act on it, and the cure
48
+ is externalising into a system you actually trust.[^gtd] Trust is the operative
49
+ word — a system you half-believe is worse than none, because you keep a shadow
50
+ copy in your head anyway.
51
+
52
+ **Taken:** ubiquitous capture, and the claim that trust is the whole product;
53
+ next action, singular and physical, which is why the board holds one line per
54
+ demand and the full list stays in the project; waiting-for as its own class with
55
+ a chase date, because it is the category that rots silently; and a recurring
56
+ ritual as the thing that keeps state true, which here became the end-of-day
57
+ sitting.
58
+
59
+ **Left:** contexts (`@phone`, `@computer`), an artifact of a pre-mobile world.
60
+ The unbounded next-actions list — a list with no ceiling is precisely how
61
+ priority inflation sets in. Someday/maybe as a dumping ground, replaced by a
62
+ Backlog that is visible and counted. And the habit heuristics, which are
63
+ behaviour rather than structure.
64
+
65
+ # The Board — what neither source had
66
+
67
+ Both are blind to time. PARA says where a thing lives, CODE says how knowledge
68
+ matures, and neither says what today looks like or leaves a record of what
69
+ happened. GTD has lists but no memory: it faces relentlessly forward, and a done
70
+ item evaporates. Ask any of them what you worked on in March and what changed,
71
+ and there is no answer.
72
+
73
+ What the third pillar makes computable is set out in
74
+ [three-pillars](/design/three-pillars.md); the short version is that dormancy,
75
+ invisible labour, and Law 2's deltas all require a system that remembers its own
76
+ previous state.
77
+
78
+ # Where this design breaks with its sources
79
+
80
+ * **Both assume a human author.** Accountability could stay implicit when
81
+ everything in the system was typed by the person who trusted it. Once an agent
82
+ writes a hundred concepts an hour that guarantee is gone, and provenance has to
83
+ become explicit — `generated:`, `verified:`, and the rule that an agent may
84
+ summarise but may never conclude that what it summarised needs nothing.
85
+ * **Both treat structure as personal.** This design treats it as enforceable: a
86
+ validating format, hooks that refuse, a pre-commit that audits, CI that blocks.
87
+ Not rigour for its own sake — a system co-written with agents needs rules that
88
+ are executable rather than remembered.
89
+ * **Neither confesses.** PARA never says *this folder may be incomplete*; a GTD
90
+ list never says *I have not been reviewed in three weeks*. Law 2 is the
91
+ genuinely new demand, and it is the one that most changes daily experience.
92
+
93
+ Law 1 is the other new requirement, and it belongs to the era rather than to the
94
+ sources: when writing is cheap and plentiful, the scarce discipline is
95
+ confronting what is already there.
@@ -0,0 +1,46 @@
1
+ ---
2
+ type: Decision
3
+ title: Structure laws
4
+ description: The seven rules that decide whether a room, a field or a file may exist — a directory is a retrieval question, and state lives in exactly one place.
5
+ ---
6
+
7
+ # The rules
8
+
9
+ * **A directory is a retrieval question; a type is ontology.** A room pays rent
10
+ by answering a question no other room answers. This is why `reference/`,
11
+ `learnings/` and `glossary/` are three rooms and not one: *what others
12
+ produced*, *what I concluded* and *what a word means here* are three different
13
+ questions asked at three different moments.
14
+ * **State lives in exactly one place.** Listings enumerate, never aggregate. The
15
+ second copy agrees; the third one rots, and nobody can tell which is current.
16
+ * **Location is filing; lifecycle is metadata.** Nothing moves on a status
17
+ change. Closure, deprecation and staleness are fields and markers, because a
18
+ move breaks every citation pointing into the thing that moved, to buy a
19
+ tidiness nobody asked for.
20
+ * **Capture is a line, not a file.** A staging folder is a blind spot by
21
+ construction — things enter it and are never enumerated again. The attention
22
+ claim and the artifact are separate objects, and only the first one is urgent.
23
+ * **A maintained view survives by being bounded.** Next-action-only is what
24
+ makes hand maintenance honest: if it is bounded enough to maintain, it is
25
+ bounded enough to read at a glance. A board carrying every step is a project
26
+ plan wearing a board's clothes.
27
+ * **No new room until an incident forces it.** Rooms are cheap to add and
28
+ expensive to retire, and an empty room still costs a decision every time
29
+ something is filed.
30
+ * **Instructions are not knowledge.** A file is in the bundle because it answers
31
+ a retrieval question. Rules, documentation and code live outside it, without
32
+ frontmatter. This one was paid for: `README.md` and `CLAUDE.md` once carried
33
+ `type:` for no reason but their address.
34
+
35
+ # Why they are stated as laws rather than preferences
36
+
37
+ Each one is a veto that can be applied to a proposal in the moment it is made,
38
+ by someone who was not there when the design was argued. "Where would this go?"
39
+ is a question with no stable answer; "what question does this room answer that
40
+ no other room does?" has exactly one, and it is usually *none*.
41
+
42
+ The rules also compose with the three behavioural laws
43
+ ([three-laws](/design/three-laws.md)) rather than sitting beside them. Bounded
44
+ views are Law 3 applied to a page. One-place state is what lets Law 2's
45
+ confession be recomputed and checked. Capture-as-a-line is what keeps the
46
+ five-second cost that makes Law 1's ingestion checkpoint reachable at all.
@@ -0,0 +1,44 @@
1
+ ---
2
+ type: Learning
3
+ title: The residue
4
+ description: Trust measures process, never truth — a misheard number, sourced and verified, reaches maximum trust while being false, and no law closes it.
5
+ ---
6
+
7
+ # The limit
8
+
9
+ `generated:` and `verified:` say how a claim arrived, who looked at it, and when
10
+ it expires. They never say that it is true. Mishear a number, capture it,
11
+ source it perfectly, read it yourself and attest to it, and the concept reaches
12
+ the top trust tier carrying a false claim — faithfully, exactly as designed.
13
+
14
+ This is not a gap to be closed in a later version. It is the ceiling on what any
15
+ provenance system can promise, and it is stated on every tier of the design
16
+ rather than buried, because a design that implies otherwise is more dangerous
17
+ than one that says so plainly. A reader who believes the tiers measure truth
18
+ will stop checking; a reader who knows they measure process keeps checking, which
19
+ is the behaviour the whole apparatus is trying to preserve.
20
+
21
+ A passport proves who issued it, when, and that the process was followed. It
22
+ cannot prove the bearer is a good person. Nothing in this design is a lie
23
+ detector.
24
+
25
+ # What the mitigation actually buys
26
+
27
+ The source pointer. Not truth — **falsifiability**. A claim that names where it
28
+ came from can be checked later by someone who doubts it, and everything derived
29
+ from it can be found and re-examined when it turns out to be wrong. A claim with
30
+ no pointer cannot be reconciled at all, which is why the pointer is also
31
+ [Law 1](/design/three-laws.md)'s precondition and not merely good manners.
32
+
33
+ So the honest promise is: a well-sourced mistake stays catchable. That is the
34
+ best a knowledge system can offer, and anything promising more is selling
35
+ something.
36
+
37
+ # Why the trust tiers are read off the actor, not off truthiness
38
+
39
+ The vocabulary that carries this is v0.2's — a `verified` entry by a `human:`
40
+ actor makes a concept human-reviewed, anything else machine-confirmed, no entry
41
+ at all unverified ([trust/read-owed-rule](/trust/read-owed-rule.md)). The tiers
42
+ describe *who performed which process*, which is exactly the claim the design
43
+ can support. A tier that meant "checked and correct" would be the residue
44
+ denied.
@@ -0,0 +1,71 @@
1
+ ---
2
+ type: Decision
3
+ title: Three laws
4
+ description: Nothing is written without confronting what is already there; every view confesses its blind spots; attention is a budget, renegotiable but never silently exceeded.
5
+ ---
6
+
7
+ # The laws
8
+
9
+ > **Law 1 — Writing is reconciliation.** Nothing enters the corpus without
10
+ > confronting what is already there.
11
+ >
12
+ > **Law 2 — Every view confesses its blind spots.** A view states what it
13
+ > cannot see with the same prominence as what it can.
14
+ >
15
+ > **Law 3 — Attention is budgeted, not requested.** Anything claiming attention
16
+ > draws from a finite, visible budget.
17
+
18
+ Every failure in [failure-modes](/design/failure-modes.md) traces to one of the
19
+ three, plus one thing no law closes ([the residue](/design/the-residue.md)).
20
+ They are behavioural rather than schema because the deaths they prevent are
21
+ attention leaks, and no frontmatter field has ever fixed one.
22
+
23
+ # Each law's admitted limit
24
+
25
+ The limit is the load-bearing half. A law stated without one invites the
26
+ confidence that makes it dangerous.
27
+
28
+ **Law 1 catches contradictions as well as your recall does, and no better.**
29
+ Vocabulary drift defeats it silently: two concepts that disagree in words you
30
+ did not think to search for never meet. So the law is a ratchet with two
31
+ checkpoints rather than a guarantee — search at ingestion, collision at read
32
+ time — and the consequence is that `index.md` (findability) and `glossary/`
33
+ (vocabulary) are this law's load-bearing organs, not hygiene.
34
+
35
+ **Law 2's confession must be a delta, not a status.** A permanent "47
36
+ untriaged" banner becomes wallpaper: a confession that is always present carries
37
+ zero information, and a check that always cries trains its reader to skip it —
38
+ at which point Law 2 has started violating Law 3. `inbox 14` says nothing;
39
+ `+8 inbox, oldest now 6d` says what the week did to you.
40
+
41
+ **Law 3's cap is renegotiable, never silently exceeded.** Eight critical things
42
+ against a cap of five is not a bug in the cap — it is overload made undeniable
43
+ on the day it happens, forced into a conversation instead of accumulating
44
+ privately. Raising the cap is the system working; a visible renegotiation is
45
+ journal-worthy. What is forbidden is pretending the table seats six.
46
+
47
+ # Where each law lives
48
+
49
+ * **Law 1** — `reconcile-search` fires on every new concept and returns the
50
+ colliding vocabulary while the write is still hot. What cannot be settled on
51
+ the spot becomes a dated conflict line on the board, where it competes under
52
+ the cap: an unresolved contradiction is work.
53
+ * **Law 2** — the end-of-day snapshot line in `log.md`, read against yesterday's.
54
+ The confession structurally cannot lie: the stop gate recomputes every counter
55
+ and refuses a line that disagrees with the board it summarises, carrying the
56
+ recomputed line in the refusal. A checker, never a generator — see Agent Drift
57
+ in [failure-modes](/design/failure-modes.md).
58
+ * **Law 3** — the `In flight: k/CAP` header. Promotion requires demotion.
59
+ Dormancy asks after `Budget::DORMANCY_DAYS` working days, quiet while the
60
+ journal is younger than its own window, because a bundle in its first week is
61
+ new rather than dormant. `roadmap.md` is the same budget at quarterly
62
+ wavelength.
63
+
64
+ # Every number here is a guess until use tunes it
65
+
66
+ The cap of five, the five-working-day dormancy window, the seven-day deadline
67
+ lookahead, the staleness table: none is derived from anything. They are
68
+ visible-and-wrong by design — a number in a header that someone argues with is
69
+ worth more than a number nobody can see. When one proves wrong in use, the
70
+ change is a decision in the adopter's own `areas/corpus.md` first, then the
71
+ rule, then a log line.
@@ -0,0 +1,48 @@
1
+ ---
2
+ type: Overview
3
+ title: Three pillars
4
+ description: Know, Work and State — three questions no one of them can answer alone, and why the zones of the bundle are the pillars themselves.
5
+ ---
6
+
7
+ # The three questions
8
+
9
+ * **Know** — *what do I know?* `reference/` (what other people produced),
10
+ `learnings/` (what I concluded), `glossary/` (what a word means here).
11
+ * **Work** — *what am I responsible for?* `projects/` drives to done, `areas/`
12
+ maintains a standard indefinitely.
13
+ * **State** — *what am I doing, and what did I do?* `board.md` is the forward
14
+ lens, `journal/` the backward one, and `log.md` remembers yesterday's numbers.
15
+
16
+ The zones are not a filing convenience laid over the pillars; they **are** the
17
+ pillars, which is why the tree has no room that answers to none of the three.
18
+ Everything around `.okf/` — instructions, hooks, workflows, this gem — is
19
+ enforcement or code, and none of it is knowledge.
20
+
21
+ # Why State is a pillar and not a view
22
+
23
+ Know and Work are borrowed and unoriginal, and deliberately so
24
+ ([lineage](/design/lineage.md)). State is the addition, and it earns pillar
25
+ status rather than sitting as a rendering of the other two because three
26
+ capabilities exist only once a system remembers its own previous state:
27
+
28
+ * **dormancy** — an in-flight demand no journal entry has linked in five
29
+ working days must re-justify its slot. The signal is derived from the
30
+ temporal record; a pure filing system cannot compute it.
31
+ * **invisible labour becomes evidence** — a hallway decision produces no
32
+ artifact, so the journal is its only proof at review time.
33
+ * **deltas** — the whole refinement of
34
+ [Law 2](/design/three-laws.md) needs yesterday's numbers to compare against.
35
+
36
+ Ask a filing system what happened in March and it has nothing to say. That
37
+ silence is what the third pillar answers.
38
+
39
+ # Where two pillars touch
40
+
41
+ A capture is one dated line on the board — the claim on attention lands in
42
+ State while the artifact, if there ever is one, files into Know. The inbox line
43
+ is that seam, and it costs five seconds on purpose: capture that costs more
44
+ stops happening on exactly the days it matters most, which are the busy ones.
45
+
46
+ Splitting the two is also what keeps a staging folder out of the design. An
47
+ `inbox/` directory would be a blind spot by construction — see
48
+ [structure-laws](/design/structure-laws.md).
data/.okf/index.md ADDED
@@ -0,0 +1,31 @@
1
+ ---
2
+ okf_version: "0.2"
3
+ ---
4
+
5
+ # okf-pro knowledge bundle
6
+
7
+ The non-obvious knowledge behind **okf-pro** — the gem that turns an
8
+ [okf](@okf) bundle into a working memory an agent is held to. The `README`
9
+ documents the verbs and the scaffold, and `AGENTS.md` carries the contracts a
10
+ change has to keep; this bundle deliberately restates neither.
11
+
12
+ It captures two things. The first is the argument the gem serves — three laws,
13
+ the failures each one closes, and the limit each one admits — because the rules
14
+ are borrowed and reasoned rather than obvious, and a rule whose reasoning is
15
+ lost gets re-argued from scratch every time someone questions it.
16
+
17
+ The second is the thing this gem is unusual for: **every defect here fails
18
+ in the direction of silence.** A gate that cannot run, a check that was skipped,
19
+ a shim on PATH, a status code the protocol reads as "proceed" — each of them
20
+ produces an unchecked bundle that is indistinguishable, from the outside, from a
21
+ clean one. So the knowledge worth recording is not what the checks assert; it is
22
+ where the machinery around them can stop asserting anything without saying so.
23
+
24
+ # Areas
25
+
26
+ * [Design](design/) - Why the rules exist: three pillars, three laws, the eight failures they close, and what was borrowed.
27
+ * [Contract](contract/) - Fail closed, fail loud, never fail silent — and the exit codes that make it true.
28
+ * [Seam](seam/) - The plugin entry point, the three ways it fails open, and the wrapper that closes them.
29
+ * [Scaffold](scaffold/) - What `setup` writes, who owns each file afterwards, and why no date ships.
30
+ * [Trust](trust/) - The v0.2 read-owed rule, and the four call sites that must agree about it.
31
+ * [Testing](testing/) - Drills over unit tests, and the fixture that is a client of the code it tests.