Compare commits
159 Commits
pre-histor
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 0b0acd5e38 | |||
| 399830f247 | |||
| e34f6dad71 | |||
| c262ea1f92 | |||
| ba0f8f40fa | |||
| 85bf6a2162 | |||
| dda5084935 | |||
| ea302bc6ff | |||
| 53bca9d4ba | |||
| 320172573f | |||
| b6bc88ca29 | |||
| 558664db0d | |||
| 5ebcc8b7a4 | |||
| 437244c611 | |||
| 8b9d3a3a19 | |||
| 5f776263ed | |||
| 045c4d94a8 | |||
| af21129106 | |||
| 17cb066a4c | |||
| 2726b8aed6 | |||
| 5535d89963 | |||
| 011e766915 | |||
| 6e65eeeaf0 | |||
| 4b3423d91b | |||
| f20f05eb38 | |||
| e216fcc7ca | |||
| fc51190d65 | |||
| 277ec801de | |||
| 8d310c6874 | |||
| 68c8c18d0d | |||
| 31f2c4675d | |||
| 0d2fb08697 | |||
| 38eae57e6f | |||
| 4c96a80836 | |||
| d08c79db9c | |||
| 4d60a2a956 | |||
| 4ce70d3f8e | |||
| 583112d064 | |||
| 68ad38188e | |||
| 83f78aa618 | |||
| 0bab80dffe | |||
| 5783bd896e | |||
| 4dfe4e200a | |||
| 1b9aa038b2 | |||
| 75a52f1da4 | |||
| 1d2b12fdbe | |||
| 51ffca5a6a | |||
| 579bf5e804 | |||
| d7c365adf7 | |||
| 99239e1e93 | |||
| bc2d3c971e | |||
| 111d34da1f | |||
| e6f92335f9 | |||
| 478ce9fd91 | |||
| e36f1ebf93 | |||
| 8784b6f669 | |||
| 7f2ebf0e9c | |||
| 62cf841db1 | |||
| 6b35878e6c | |||
| 3b80a6e6c1 | |||
| 60953e9280 | |||
| 12659c76d1 | |||
| 1d01b99ded | |||
| 961811a41c | |||
| c87a3fb41a | |||
| 4c06df571e | |||
| bb35812d45 | |||
| bcf517f033 | |||
| 760d15ed71 | |||
| 86e1a08449 | |||
| 8d51544507 | |||
| 531c214e3b | |||
| 2ae4dc4a88 | |||
| 5943180375 | |||
| 3421847c15 | |||
| 4e719008a4 | |||
| fda72effec | |||
| e66be91c73 | |||
| a6769919c1 | |||
| 49f98ba1da | |||
| 5686c254b3 | |||
| 5bed76764a | |||
| 3796889191 | |||
| 9fb6ff3aaa | |||
| aa61a3f51f | |||
| 6cb19302ea | |||
| 4b9b9f8281 | |||
| 39cd91944a | |||
| fe1ec7d08a | |||
| 6441d0f425 | |||
| 4d018ffd79 | |||
| d624bd199d | |||
| e55f6e319b | |||
| 52d3cccf30 | |||
| 8dc3e823be | |||
| e267800787 | |||
| 1b6a5c3ae8 | |||
| d324ffbf93 | |||
| 2e9e6a7f44 | |||
| 1d75c42c89 | |||
| 0d07011d71 | |||
| 6791bc045d | |||
| 4dd65c22be | |||
| e8a769864a | |||
| 196eacf1ee | |||
| 421f4a1a69 | |||
| c1643b75b9 | |||
| 87141ea76e | |||
| 39692758ed | |||
| 0a81ac6691 | |||
| ddfcdb787f | |||
| 362de528b7 | |||
| d0e02823cb | |||
| 15e995bcf6 | |||
| 9be133618c | |||
| b4a32de692 | |||
| 93e78734d3 | |||
| 82b0b65663 | |||
| 07afbe8473 | |||
| 04db0c1503 | |||
| ded5759973 | |||
| 4a112e864d | |||
| 559b95deee | |||
| 3481fbdbd2 | |||
| d704f2bbae | |||
| 2dbb579b35 | |||
| 997f435b12 | |||
| b2b1a1f286 | |||
| dcec931589 | |||
| 18d48ce850 | |||
| 794b25a666 | |||
| f19eb4bfa1 | |||
| c587a0d60f | |||
| 810ac7bb80 | |||
| e14fae6331 | |||
| 7fb4450fa8 | |||
| 517777e5df | |||
| b1b9aa09de | |||
| 246a81d0dc | |||
| 7ec15a4e9d | |||
| 03ddb4ed01 | |||
| 878a5e063d | |||
| 7cd2e44799 | |||
| 5ea282ec03 | |||
| f4fbf1438c | |||
| 46b06c584d | |||
| ad5e3a5850 | |||
| a595106cc5 | |||
| c3621678de | |||
| 51ae52709d | |||
| d96506c523 | |||
| a83a5a7213 | |||
| e36a37d0bb | |||
| b93454bbc3 | |||
| 3862514d6f | |||
| feb12b1586 | |||
| f5227325a3 | |||
| 4aebdee30a | |||
| 22951e5b79 |
4
.commit-lint.toml
Normal file
4
.commit-lint.toml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Extends commit-msg-check's closed `type` set (build, chore, ci, docs,
|
||||||
|
# feat, fix, perf, refactor, revert, style, test). Octobot's own history
|
||||||
|
# has used none beyond that set — empty for now, add here if one arises.
|
||||||
|
extra_types = []
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,3 +2,5 @@
|
|||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
.nfs*
|
.nfs*
|
||||||
|
HANDOFF.md
|
||||||
|
__pycache__/
|
||||||
|
|||||||
35
AGENTS.md
Normal file
35
AGENTS.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# octobot — agent directions
|
||||||
|
|
||||||
|
## Knowledge — read before you code
|
||||||
|
|
||||||
|
This project keeps an agent-first wiki at [`OKF/`](OKF/index.md)
|
||||||
|
(open-knowledge-format). Before extending or modifying octobot:
|
||||||
|
|
||||||
|
1. Read [`OKF/index.md`](OKF/index.md), then the pages it flags for your
|
||||||
|
task — at minimum `SUMMARY.md`; `ARCHITECTURE.md` before structural
|
||||||
|
work.
|
||||||
|
2. Use the canonical vocabulary from [`OKF/CONTEXT.md`](OKF/CONTEXT.md)
|
||||||
|
in code, tests, and commit messages. Don't coin synonyms.
|
||||||
|
3. Non-trivial changes start from a blueprint in `OKF/blueprints/` — write one
|
||||||
|
(blueprint skill) before implementing; cite its number in the commit.
|
||||||
|
4. Learned something that contradicts the wiki? Update the wiki in the
|
||||||
|
same change (supersede, don't delete) or append to
|
||||||
|
`OKF/LEARNINGS.md`.
|
||||||
|
|
||||||
|
## Behavioral guardrails
|
||||||
|
|
||||||
|
- State assumptions explicitly; name the simpler approach you are
|
||||||
|
rejecting; surface tradeoffs. Push back when warranted — if something
|
||||||
|
is unclear, stop and ask rather than guess.
|
||||||
|
- Do exactly what the task requires, nothing more. No speculative
|
||||||
|
abstractions, no drive-by refactors.
|
||||||
|
- A green test suite is a claim, not a proof — verify against the
|
||||||
|
blueprint's stated check before calling work done.
|
||||||
|
|
||||||
|
## House rules
|
||||||
|
|
||||||
|
- Skill authoring: [conjure-a-skill](skills/productivity/conjure-a-skill/SKILL.md);
|
||||||
|
`SKILL.md` ≤110 lines (reference siblings load on demand, no hard cap).
|
||||||
|
- Commits: [commit-atomic-jj](skills/productivity/commit-atomic-jj/SKILL.md) —
|
||||||
|
`type(scope): imperative`, one concern per change, foreground jj only.
|
||||||
|
- Fuller behavioral contract: [CLAUDE.md](CLAUDE.md).
|
||||||
22
CLAUDE.md
22
CLAUDE.md
@ -4,6 +4,13 @@ Behavioral guidelines to reduce common LLM coding mistakes, plus repo-local
|
|||||||
conventions for editing octobot itself. Merge with project-specific
|
conventions for editing octobot itself. Merge with project-specific
|
||||||
instructions as needed.
|
instructions as needed.
|
||||||
|
|
||||||
|
**The loop.** Octobot is a loop-engineering metaharness over an OKF
|
||||||
|
(open-knowledge-format) wiki; its shape is
|
||||||
|
[`OKF/ARCHITECTURE.md`](OKF/ARCHITECTURE.md) flow 1. This repo dogfoods it —
|
||||||
|
knowledge in [`OKF/`](OKF/index.md), agent directions in
|
||||||
|
[`AGENTS.md`](AGENTS.md), skill index in
|
||||||
|
[`skills/loop/steer/`](skills/loop/steer/SKILL.md).
|
||||||
|
|
||||||
**Tradeoff:** These guidelines bias toward caution over speed. For trivial
|
**Tradeoff:** These guidelines bias toward caution over speed. For trivial
|
||||||
tasks, use judgment.
|
tasks, use judgment.
|
||||||
|
|
||||||
@ -92,11 +99,16 @@ This repo holds Claude Code skills. When editing here:
|
|||||||
|
|
||||||
- Every skill lives at `skills/<category>/<kebab-name>/SKILL.md`.
|
- Every skill lives at `skills/<category>/<kebab-name>/SKILL.md`.
|
||||||
- `name:` in frontmatter must match the folder name exactly.
|
- `name:` in frontmatter must match the folder name exactly.
|
||||||
- `description:` must contain an explicit "Use when ..." trigger and stay
|
- `description:` stays under 1024 characters. Model-invoked skills need an
|
||||||
under 1024 characters. The description is the *only* thing the agent sees
|
explicit "Use when ..." trigger — the description is the *only* thing the
|
||||||
when deciding to load the skill — make triggers concrete.
|
agent sees when deciding to load the skill, so make triggers concrete.
|
||||||
- Keep `SKILL.md` ≤ 100 lines. Split into `REFERENCE.md` / `EXAMPLES.md` if
|
User-invoked skills (`disable-model-invocation: true`) get one
|
||||||
it grows.
|
human-facing line instead; no "Use when" boilerplate.
|
||||||
|
- Keep `SKILL.md` ≤ 110 lines. If it grows, push detail into **topic-named
|
||||||
|
siblings** in lowercase-kebab (`deepening.md`, `anti-patterns.md`) — one
|
||||||
|
topic per file, named for the topic. Never a generic catch-all name, and
|
||||||
|
never uppercase: `SKILL.md` is the only uppercase file in a skill
|
||||||
|
directory.
|
||||||
- No time-sensitive content (dates, "current" model names).
|
- No time-sensitive content (dates, "current" model names).
|
||||||
- `scripts/` is only for deterministic helpers, not prose.
|
- `scripts/` is only for deterministic helpers, not prose.
|
||||||
- Claude Code only scans one level deep under `~/.claude/skills/`; new
|
- Claude Code only scans one level deep under `~/.claude/skills/`; new
|
||||||
|
|||||||
216
LICENSE
216
LICENSE
@ -1,21 +1,203 @@
|
|||||||
MIT License
|
Copyright 2026 Lukasz Boryn
|
||||||
|
|
||||||
Copyright (c) 2026 Lukasz Boryn
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
1. Definitions.
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
the copyright owner that is granting the License.
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for describing the origin of the Work and
|
||||||
|
reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may accept and charge a
|
||||||
|
fee for the acceptance of support, warranty, indemnity, or other
|
||||||
|
liability obligations and/or rights consistent with this License.
|
||||||
|
However, in accepting such obligations, You may act only on Your
|
||||||
|
own behalf and on Your sole responsibility, not on behalf of any
|
||||||
|
other Contributor, and only if You agree to indemnify, defend,
|
||||||
|
and hold each Contributor harmless for any liability incurred by,
|
||||||
|
or claims asserted against, such Contributor by reason of your
|
||||||
|
accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|||||||
75
OKF/ARCHITECTURE.md
Normal file
75
OKF/ARCHITECTURE.md
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
---
|
||||||
|
type: Architecture
|
||||||
|
purpose: Map the skill categories, the seams between them, and the flows that cross them.
|
||||||
|
answers:
|
||||||
|
- "Which module owns a given skill, and where are the seams?"
|
||||||
|
cites:
|
||||||
|
- skills/loop
|
||||||
|
- skills/engineering/bdd/SKILL.md
|
||||||
|
- skills/productivity/conjure-a-skill/principles.md
|
||||||
|
status: live
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — architecture
|
||||||
|
|
||||||
|
## Module map
|
||||||
|
|
||||||
|
One module per skill category; the interface of each skill is its
|
||||||
|
frontmatter `description` (routing) plus its SKILL.md body (procedure).
|
||||||
|
|
||||||
|
- **loop** (`skills/loop/`) — the metaharness spine: write-okf
|
||||||
|
(knowledge), chart (plan), blueprint, ferry, rig, steer.
|
||||||
|
- **engineering** (`skills/engineering/`) — practice skills: bdd,
|
||||||
|
diagnose, review axes (review-angles, nuke-review, winnow), sieve,
|
||||||
|
vocabulary (design-codebase, model-domain), style-r, dev-* runners,
|
||||||
|
write-readme*.
|
||||||
|
- **productivity** (`skills/productivity/`) — session mechanics:
|
||||||
|
commit-atomic-jj, handoff, grill-me, caveman, spawn-cavecrew,
|
||||||
|
conjure-a-skill.
|
||||||
|
- **scaffold** (`skills/scaffold/`) — project generators: build-py-project,
|
||||||
|
build-r-package, build-r-analysis, containerize-project,
|
||||||
|
add-docker-secrets.
|
||||||
|
|
||||||
|
## Main flows
|
||||||
|
|
||||||
|
1. **The loop** — the metaharness spine, canonically rendered here
|
||||||
|
(`skills/loop/`). Two byte-copies: `README.md` §loop, `steer`
|
||||||
|
§The loop.
|
||||||
|
|
||||||
|
```
|
||||||
|
substrate (rare) write-okf — scaffold, or refresh when stale
|
||||||
|
↓
|
||||||
|
per request chart — a phase only for an arc over >1 blueprint
|
||||||
|
↓
|
||||||
|
know what to do?
|
||||||
|
┌──── yes ────┴──── no ────┐
|
||||||
|
blueprint → sound ferry — decisions + blocking edges,
|
||||||
|
→ rig resolve one per sitting
|
||||||
|
(rig closes it) ↓
|
||||||
|
blueprint per cleared decision → sound
|
||||||
|
↓
|
||||||
|
1 left → rig
|
||||||
|
N left → call-charon (agent per blueprint)
|
||||||
|
↓
|
||||||
|
moor
|
||||||
|
|
||||||
|
rig = bdd → 4-axis review → Verify → commit-atomic-jj → close (OKF refresh)
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Skill discovery** — Claude Code scans `~/.claude/skills/` one level
|
||||||
|
deep; per-skill symlinks point into `skills/<category>/<name>/`
|
||||||
|
(`README.md` §Install).
|
||||||
|
3. **Post-green review** — bdd "After green" hands to the review axes,
|
||||||
|
fixes land red-test-first (`skills/engineering/bdd/SKILL.md`).
|
||||||
|
|
||||||
|
## Seams
|
||||||
|
|
||||||
|
- **Skill frontmatter** — `disable-model-invocation` flips a skill
|
||||||
|
between description-routed and name-only invocation. Orchestrators and
|
||||||
|
rituals carry it; a read-only recon whose trigger is a detectable state
|
||||||
|
may go without ([decisions/019](decisions/R-019-recon-may-self-fire.md)).
|
||||||
|
- **Progressive disclosure** — SKILL.md bodies point to topic-named
|
||||||
|
sibling files; swapping a sibling changes behaviour without touching
|
||||||
|
the router (`skills/productivity/conjure-a-skill/principles.md`).
|
||||||
|
- **Cross-links** — skills reference each other by relative path;
|
||||||
|
category moves are renames across these links (grep before moving).
|
||||||
112
OKF/CONTEXT.md
Normal file
112
OKF/CONTEXT.md
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
---
|
||||||
|
type: Glossary
|
||||||
|
purpose: Fix octobot's own vocabulary — one canonical name per concept, with what to avoid.
|
||||||
|
answers:
|
||||||
|
- "What is the canonical name for this concept in octobot?"
|
||||||
|
cites:
|
||||||
|
- skills/productivity/conjure-a-skill/glossary.md
|
||||||
|
- skills/loop/write-okf/okf-layout.md
|
||||||
|
status: live
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — context
|
||||||
|
|
||||||
|
Vocabulary for octobot itself. Skill-authoring terms (leading word,
|
||||||
|
context load, progressive disclosure, sprawl, no-op) live in
|
||||||
|
[conjure-a-skill/glossary.md](../skills/productivity/conjure-a-skill/glossary.md)
|
||||||
|
— not duplicated here. Prose cites take a register prefix: `B-`
|
||||||
|
blueprint, `R-` why-register, `D-` ferry (R-022); links need none. A
|
||||||
|
cross-skill reference is a bare `` `/skill-name` ``, unchecked (R-023).
|
||||||
|
|
||||||
|
## Language
|
||||||
|
|
||||||
|
**Skill**:
|
||||||
|
One folder under `skills/<category>/<name>/` with a SKILL.md router and
|
||||||
|
optional topic-named siblings. _Avoid_: command, plugin, prompt.
|
||||||
|
|
||||||
|
**The loop**:
|
||||||
|
The metaharness cycle; shape in [ARCHITECTURE.md](ARCHITECTURE.md) flow 1.
|
||||||
|
_Avoid_: pipeline, workflow (those describe the develop-* orchestrators).
|
||||||
|
|
||||||
|
**OKF**:
|
||||||
|
Open-knowledge-format — the agent-first wiki at a target project's
|
||||||
|
`./OKF/`; layout contract in
|
||||||
|
[write-okf/okf-layout.md](../skills/loop/write-okf/okf-layout.md).
|
||||||
|
_Avoid_: docs folder, wiki (unqualified), knowledge base.
|
||||||
|
|
||||||
|
**Blueprint**:
|
||||||
|
A blueprint-skill-produced file `OKF/blueprints/B-NNN-<slug>.md` with
|
||||||
|
status frontmatter; the unit rig executes. Its `## Contract` section
|
||||||
|
states what the change must satisfy. _Avoid_: spec (superseded term —
|
||||||
|
renamed for skill↔artifact consistency), ticket, issue, task.
|
||||||
|
|
||||||
|
**Brief**:
|
||||||
|
The written contract a mutating subagent receives before spawning —
|
||||||
|
goal, OKF/blueprint references, verify command. A locked blueprint can serve as
|
||||||
|
the brief. _Avoid_: prompt (ambiguous).
|
||||||
|
|
||||||
|
**Seal**:
|
||||||
|
The commit-atomic-jj describe step where scratch becomes artifact; the sieve
|
||||||
|
fires here. _Avoid_: commit (mechanics), merge.
|
||||||
|
|
||||||
|
**Page plan**:
|
||||||
|
The locked set of admissible OKF pages, recorded as `index.md`'s
|
||||||
|
one-line-per-page list. write-okf proposes it from a repo scan; the user
|
||||||
|
edits and locks it. A page absent from the plan is inadmissible.
|
||||||
|
_Avoid_: TOC, sitemap, nav, wiki.json.
|
||||||
|
|
||||||
|
**Warrant**:
|
||||||
|
The frontmatter fields that justify a page's existence — `purpose`,
|
||||||
|
`answers[]`, `cites[]`, after the required `type`. No `answers` entry, or
|
||||||
|
one another page already answers, culls the page; an unresolved `cites`
|
||||||
|
path is drift. _Avoid_: metadata, header, justification.
|
||||||
|
|
||||||
|
**Derived zone**:
|
||||||
|
The `<!-- okf:derived begin/end -->` region of a page, regenerated on
|
||||||
|
every refresh. Everything outside it is the **judgement zone** —
|
||||||
|
append/supersede only, never scan-edited. _Avoid_: generated block,
|
||||||
|
managed section.
|
||||||
|
|
||||||
|
**Register**:
|
||||||
|
An append-only OKF directory or page that is the single home for one
|
||||||
|
kind of durable fact — `decisions/` (why we chose), `LEARNINGS.md` (what
|
||||||
|
we got wrong), `blueprints/` (what we built). ROADMAP holds only what is
|
||||||
|
still ahead. _Avoid_: log, archive, history.
|
||||||
|
|
||||||
|
**Why-register**:
|
||||||
|
The `OKF/decisions/` register — why we chose what we chose, indexed
|
||||||
|
question-shaped by `index.md`. _Avoid_: ADR log, decision log.
|
||||||
|
|
||||||
|
**Decision file**:
|
||||||
|
One why-register entry, `OKF/decisions/R-NNN-<slug>.md`. Numbers permanent
|
||||||
|
— supersede, never renumber. _Avoid_: ADR, decision record, register file.
|
||||||
|
|
||||||
|
**Ferry decision**:
|
||||||
|
An open question at `ferries/<topic>/D-<n>-<slug>.md` — settled by the
|
||||||
|
user, then graduated into a decision file. _Avoid_: ADR, ticket, blocker.
|
||||||
|
|
||||||
|
**Graduate**:
|
||||||
|
Moving a resolved ferry decision into the why-register at moor, leaving a
|
||||||
|
pointer in MAP.md. _Avoid_: promote, publish, merge.
|
||||||
|
|
||||||
|
**Sealed pin**:
|
||||||
|
The `sealed:` frontmatter on a moored ferry — jj change id, git hash,
|
||||||
|
date — naming the **parent** commit where the dissolved D-n files still
|
||||||
|
exist. Makes "recoverable from history" cashable. _Avoid_: ref, anchor.
|
||||||
|
|
||||||
|
**Sounding**:
|
||||||
|
The recon pass `sound` runs before a blueprint locks — the OKF, then the
|
||||||
|
nostos MCP server, then a file read only where nostos cannot answer: an
|
||||||
|
empty result, or a path with uncommitted changes. Its mark is `sounded:`
|
||||||
|
in the blueprint's frontmatter. _Avoid_: research, investigation, spike.
|
||||||
|
|
||||||
|
**Line cap**:
|
||||||
|
The per-file limit a page kind carries — 110 for SKILL.md and OKF pages,
|
||||||
|
250 for `ROADMAP.md`, `CONTEXT.md`, a guide, or a blueprint (B-031),
|
||||||
|
selected by declared `type:`, not path. Over it errors: a legal move
|
||||||
|
always exists. _Avoid_: limit, budget.
|
||||||
|
|
||||||
|
**House cap**:
|
||||||
|
The 110 itself — the line cap SKILL.md and most OKF pages share. The
|
||||||
|
wide-cap kinds are worked against, not read cold — see **Line cap**.
|
||||||
|
Topic-named siblings load on demand and carry no cap.
|
||||||
100
OKF/ROADMAP.md
Normal file
100
OKF/ROADMAP.md
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
---
|
||||||
|
type: Roadmap
|
||||||
|
purpose: Carry only what is still ahead — phases, their verify steps, and live risk.
|
||||||
|
answers:
|
||||||
|
- "What is octobot building next, and how is each phase verified?"
|
||||||
|
cites:
|
||||||
|
- OKF/decisions/index.md
|
||||||
|
status: live
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot Roadmap
|
||||||
|
|
||||||
|
Octobot becomes a loop-engineering metaharness: the loop
|
||||||
|
([ARCHITECTURE.md](ARCHITECTURE.md) flow 1) over an OKF substrate,
|
||||||
|
alongside the existing practice/scaffold skills. Vocabulary:
|
||||||
|
[CONTEXT.md](CONTEXT.md).
|
||||||
|
|
||||||
|
## Why (gap vs prior art)
|
||||||
|
|
||||||
|
Octobot's slot: a file-based loop over OKF (open-knowledge-format), jj-native.
|
||||||
|
mattpocock/skills has the blueprint pipeline but no substrate;
|
||||||
|
obra/superpowers has subagent execution but no persistent wiki; neither
|
||||||
|
carries the R/Py scaffolds or the debloat/review axes. The prior-art scan
|
||||||
|
behind that claim: [learnings/index.md](learnings/index.md).
|
||||||
|
|
||||||
|
## Locked decisions
|
||||||
|
|
||||||
|
23 live, in the why-register: [decisions/index.md](decisions/index.md).
|
||||||
|
Each line is the question its decision settles. Cite by number.
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
See [ARCHITECTURE.md](ARCHITECTURE.md); the loop is its flow 1.
|
||||||
|
|
||||||
|
## Phases
|
||||||
|
|
||||||
|
Numbers stay as issued — append-only. Phases 1–8 closed 2026-07-19/22 and left
|
||||||
|
this page per [013](decisions/R-013-roadmap-is-a-plan.md); what they shipped is
|
||||||
|
in [blueprints/](blueprints/) and [decisions/index.md](decisions/index.md). A
|
||||||
|
phase is opened for an arc spanning more than one blueprint or session; a
|
||||||
|
single request traces to `user request <date>` instead, as B-008–B-017 did.
|
||||||
|
|
||||||
|
9. **sound — verified recon before lock** — ✅ 2026-07-22, [007](blueprints/B-007-add-sound.md).
|
||||||
|
10. **skills-consistency hardening** — ✅ 2026-07-31, closed inline; F8's ruling in `conjure-a-skill`.
|
||||||
|
11. **the loop's shape stops being a hand-copied string** — ✅ 2026-07-30, [019](blueprints/B-019-add-a-render-lint-over-the-loop-shape.md).
|
||||||
|
12. **the spine gets nautical names and one honest fork** — ✅ 2026-07-31, [024](blueprints/B-024-rename-the-spine-and-give-chart-its-ferry-edge.md).
|
||||||
|
|
||||||
|
13. **the loop learns to carry an analysis** — an analysis blueprint's Contract
|
||||||
|
is a pre-registered estimand and its Verify is reproducibility (clean
|
||||||
|
re-run from a pinned snapshot yielding the named artifact), never the
|
||||||
|
result, which cannot be written before it is known. Findings get the
|
||||||
|
register they lack: `OKF/findings/`, append-only, with provenance enough
|
||||||
|
to re-check. A `survey` skill for exploratory sittings waits until a real
|
||||||
|
analysis has one with nowhere to land. **Verify:** `OKF/findings/` holds
|
||||||
|
one finding `okf-check OKF/` validates 0/0; `blueprint` states the rule.
|
||||||
|
|
||||||
|
14. **the skills tree installs into any harness** — ✅ 2026-09-23, [028](blueprints/B-028-convert-cross-skill-links-to-skill-names.md).
|
||||||
|
|
||||||
|
15. **decision and blueprint files carry a searchable prefix** — ✅
|
||||||
|
2026-09-23, [029](blueprints/B-029-prefix-register-filenames-and-validate-okf-structure.md),
|
||||||
|
[030](blueprints/B-030-migrate-register-filenames-to-their-prefix.md).
|
||||||
|
|
||||||
|
## Risks & gotchas
|
||||||
|
|
||||||
|
- **A self-firing skill fires when nobody asked.** Believed: every loop skill
|
||||||
|
must be user-invoked. True: that holds for orchestrators and rituals, which
|
||||||
|
interrupt a person mid-ritual; recon only reads, so
|
||||||
|
[019](decisions/R-019-recon-may-self-fire.md) carves it out. The risk moves to
|
||||||
|
sound's triggers — vague ones make it fire on every question.
|
||||||
|
- **A rule bound to pressure that never arrives is not enforced** — the prune
|
||||||
|
triggered at cap+1, never reached. Moved onto `✅ verified` and mechanised
|
||||||
|
([020](blueprints/B-020-enforce-the-prune-and-validate-every-cite.md)).
|
||||||
|
- **A live decision can be contradicted by the skill that owns the file, and
|
||||||
|
by the validator that checks it** — `chart` and `okf-check` both
|
||||||
|
contradicted R-020 for months, with nothing to catch either. Closed by
|
||||||
|
[021](blueprints/B-021-align-validator-and-doctrine.md) and
|
||||||
|
[022](blueprints/B-022-validate-every-cite-at-every-status.md).
|
||||||
|
- **A ruling recorded only in a roadmap phase does not outlive the phase.**
|
||||||
|
Believed: settling a question where it was raised is enough. True: R-020
|
||||||
|
prunes a discharged phase to one line, so the *reason* evaporates and the
|
||||||
|
question reopens as drift. A convention must land where its next reader
|
||||||
|
looks — F8's ruling went to `conjure-a-skill`. Source: phase 10, 2026-07-31.
|
||||||
|
- **A lint that walks the filesystem gates on files the repo does not own.**
|
||||||
|
Believed: a repo-wide walk's scope is the repo. True: it is the working
|
||||||
|
directory, so one gitignored page can red a repo-wide gate — it already cost
|
||||||
|
[024](blueprints/B-024-rename-the-spine-and-give-chart-its-ferry-edge.md) a run
|
||||||
|
condition, and two of the four lints carry that walk byte for byte. Ruled by
|
||||||
|
[026](blueprints/B-026-walk-only-what-git-does-not-ignore.md). Source:
|
||||||
|
2026-07-31.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- Issue-tracker backends (GitHub/GitLab) for blueprints — files only.
|
||||||
|
- OpenWiki CLI dependency — import-compat at most.
|
||||||
|
- Full auto-generated API reference (every symbol) — the derived zone carries
|
||||||
|
the public seam a caller needs, nothing more.
|
||||||
|
- Diagram generation and mermaid validation — deepwiki-skill territory.
|
||||||
|
- Scheduled/CI wiki regeneration (OpenWiki's Action) — refresh stays human.
|
||||||
|
- Renaming grandfathered non-verb skills.
|
||||||
|
- Matt's writing-* / teach / wizard / obsidian skill families.
|
||||||
28
OKF/SUMMARY.md
Normal file
28
OKF/SUMMARY.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
type: Summary
|
||||||
|
purpose: Orient an agent landing cold — what octobot is, how it runs, what to read next.
|
||||||
|
answers:
|
||||||
|
- "What is octobot and how do I run it?"
|
||||||
|
cites:
|
||||||
|
- README.md
|
||||||
|
- skills
|
||||||
|
status: live
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — summary
|
||||||
|
|
||||||
|
**What**: Personal, reusable Claude Code skills — a loop-engineering
|
||||||
|
metaharness plus language-agnostic productivity workflows that travel
|
||||||
|
across projects. Skills live here; per-skill symlinks under
|
||||||
|
`~/.claude/skills/` make Claude Code discover them.
|
||||||
|
|
||||||
|
**Stack**: Markdown skills (SKILL.md + progressive-disclosure siblings),
|
||||||
|
jujutsu (jj) for VCS, no build step.
|
||||||
|
|
||||||
|
**Run it**: nothing to run — install via the symlink loop in
|
||||||
|
[README.md](../README.md#install); verify a skill appears in a fresh
|
||||||
|
Claude Code session.
|
||||||
|
|
||||||
|
**Read next**: [ARCHITECTURE.md](ARCHITECTURE.md) for the category map
|
||||||
|
and the loop, [CONTEXT.md](CONTEXT.md) for vocabulary,
|
||||||
|
[ROADMAP.md](ROADMAP.md) for the metaharness build-out.
|
||||||
108
OKF/blueprints/B-001-add-write-readme-r.md
Normal file
108
OKF/blueprints/B-001-add-write-readme-r.md
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: dropped
|
||||||
|
traces-to: README.md §Roadmap ("write-readme-r" gap); write-readme-py/SKILL.md §Out of scope
|
||||||
|
sounded: 2026-07-22
|
||||||
|
---
|
||||||
|
|
||||||
|
# 001 — add write-readme-r skill
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
Named gap in `README.md:231-234` §Roadmap and declared out of scope in
|
||||||
|
`skills/engineering/write-readme-py/SKILL.md:72-74`, with its interface
|
||||||
|
already sketched there: "reading `DESCRIPTION` for packages and
|
||||||
|
`_targets.R` + `index.qmd` for analyses is the planned interface".
|
||||||
|
|
||||||
|
The gap is **depth, not coverage**: generic `write-readme` already
|
||||||
|
detects both R types (`write-readme/SKILL.md:23-24`) and extracts their
|
||||||
|
fields (`write-readme/REFERENCE.md:22-40`). What R lacks is what
|
||||||
|
`write-readme-py` gives Python — a template, the Saduko license block,
|
||||||
|
and justfile-derived usage. A dedicated skill must earn its place
|
||||||
|
against that generic path, or fold into it.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
A skill `skills/engineering/write-readme-r/` that:
|
||||||
|
- Detects project type: `DESCRIPTION` → r-package (fields: Package,
|
||||||
|
Title, Description, License, Authors@R); `_targets.R` → r-analysis
|
||||||
|
(sources: `reports/index.qmd` title/description + `justfile`).
|
||||||
|
- Materialises `README.md` from a template following write-readme-py's
|
||||||
|
Saduko-style layout (logo block, install block, justfile-derived usage
|
||||||
|
sections, license block — Apache-aware rich block, one-liner
|
||||||
|
otherwise).
|
||||||
|
- **Derives the install block from the project, never from a default.**
|
||||||
|
Scaffolded R projects run through `docker compose`, and their
|
||||||
|
`renv::restore()` happens at image build
|
||||||
|
(`containerize-project/Dockerfile.r-*.tpl`), so a README telling a
|
||||||
|
reader to restore on the host is wrong — the entry point is
|
||||||
|
`just build-dev` → `just up`. Read the justfile, the Dockerfile and
|
||||||
|
the lockfile; no evidence → omit the section.
|
||||||
|
- Refuses to invent: empty Description → ask; no fabricated deps,
|
||||||
|
recipes, authors, or URLs. Omits sections lacking source data.
|
||||||
|
- Guards an existing README.md (diff + explicit confirmation).
|
||||||
|
- Stops on `jj diff` for review; never commits.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
- New skill folder: `skills/engineering/write-readme-r/{SKILL.md,
|
||||||
|
readme-r.template.md}`, plus its `~/.claude/skills/write-readme-r`
|
||||||
|
symlink — discovery is one level deep.
|
||||||
|
- `write-readme-py/SKILL.md:72` — the "not yet written" note, the only
|
||||||
|
live instance of that string.
|
||||||
|
- `write-readme/SKILL.md` §See also — one line. Its `REFERENCE.md`
|
||||||
|
install rule was corrected ahead of this blueprint; inherit it.
|
||||||
|
- `build-r-package/SKILL.md:42-44` — its suggestion now points at
|
||||||
|
generic write-readme and at this blueprint; it becomes the R skill.
|
||||||
|
- `build-r-analysis/SKILL.md` — mentions no README at all today; gains
|
||||||
|
the suggestion its sibling already has.
|
||||||
|
- `skills/loop/steer/SKILL.md` — one row, per its own closing rule.
|
||||||
|
- `README.md` §Skills engineering list, §Roadmap (the item is spent).
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
From a fixture r-package (`DESCRIPTION.tpl` + `justfile.tpl` copied out
|
||||||
|
of `skills/scaffold/build-r-package/`), run the skill, then:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
comm -23 <(grep -o 'just [a-z-]*' README.md | sed 's/just //' | sort -u) \
|
||||||
|
<(grep -oE '^[a-z-]+:' justfile | tr -d ':' | sort -u)
|
||||||
|
grep -c 'renv::restore' README.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect empty output from `comm` — every recipe the README documents
|
||||||
|
exists in the justfile — and `0` from the grep, since the fixture has no
|
||||||
|
lockfile. Then read the README once: the License block must match
|
||||||
|
`DESCRIPTION`'s License field, and nothing may appear that no source
|
||||||
|
file carries.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
- Quarto rendering, pkgdown sites, badges.
|
||||||
|
- Changes to write-readme-py, and to generic write-readme beyond the
|
||||||
|
See-also line.
|
||||||
|
- R README generation for non-scaffolded (arbitrary) R repos — generic
|
||||||
|
`write-readme` keeps those.
|
||||||
|
|
||||||
|
## Why dropped
|
||||||
|
Failed all three sieves against its own Justification's bar — "must earn
|
||||||
|
its place against that generic path, or fold into it".
|
||||||
|
|
||||||
|
- **Real.** The need was self-asserted: `README.md` §Roadmap and
|
||||||
|
`write-readme-py/SKILL.md` §Out of scope, both written here. A "do it
|
||||||
|
properly" item must prove the current way *wrong*, not improvable. The
|
||||||
|
one genuinely wrong thing — a README telling an R reader to
|
||||||
|
`renv::restore()` on the host — was fixed in
|
||||||
|
`write-readme/REFERENCE.md:40-44` **without** this skill. That fix is
|
||||||
|
the disproof.
|
||||||
|
- **Good.** Eight of the ten Contract bullets are already generic
|
||||||
|
behaviour: both R types detected (`write-readme/SKILL.md:24-25`),
|
||||||
|
fields extracted (`REFERENCE.md:22-46`), evidence-derived install,
|
||||||
|
justfile usage, refuse-to-invent, README guard, stop-on-diff, Saduko
|
||||||
|
two-column layout. The residue is a logo block and an Apache-aware
|
||||||
|
license block — neither R-shaped. A skill named for R would improve
|
||||||
|
one of four non-python ecosystems and open a fourth home for the
|
||||||
|
refuse-to-invent rules.
|
||||||
|
- **Minimal.** A folder, a template, a symlink and seven seams, against
|
||||||
|
two substitutions in `readme.template.md` reusing the existing
|
||||||
|
`saduko-license-block.md`.
|
||||||
|
|
||||||
|
The residue is real but **untriggered** — no repo has yet wanted a logo
|
||||||
|
or the rich attribution block outside python. Folding it now would build
|
||||||
|
the alternative on the same speculative footing this blueprint died of.
|
||||||
|
This file is the record; when a repo asks, a new blueprint takes it.
|
||||||
109
OKF/blueprints/B-002-extract-why-register.md
Normal file
109
OKF/blueprints/B-002-extract-why-register.md
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: ROADMAP.md phase 7 (decisions 12, 13, 16)
|
||||||
|
---
|
||||||
|
|
||||||
|
# 002 — extract the why-register from ROADMAP
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
ROADMAP.md carries two forever-growing sections against a 110-line page
|
||||||
|
cap, and sits at 184. Decisions 12, 13 and 16 settle the response; this
|
||||||
|
blueprint implements them and adds nothing they do not already state.
|
||||||
|
The validator follows the doctrine in
|
||||||
|
[project-validator.md](../../skills/engineering/add-copilot-project-skill/project-validator.md).
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**`OKF/decisions/` exists**, holding one file per settled decision plus
|
||||||
|
an index.
|
||||||
|
|
||||||
|
- `NNN-<slug>.md` per decision, zero-padded to three digits. Decisions
|
||||||
|
1–16 keep their numbers — they are cited from CONTEXT.md and commit
|
||||||
|
messages, so renumbering breaks references. The register starts
|
||||||
|
populated at 001–016.
|
||||||
|
- Decision bodies move **verbatim**. Migration adds frontmatter; it does
|
||||||
|
not reword, merge, split, or re-argue any decision.
|
||||||
|
- Frontmatter: `type: Decision`, the warrant (`purpose`, `answers[]`,
|
||||||
|
`cites[]`) per decision 8, then `status: live | superseded-by-NNN` and
|
||||||
|
`reversible:` — both lifted from the clause each decision already states.
|
||||||
|
- `decisions/index.md` lines are **question-shaped**, one per decision:
|
||||||
|
`NNN — <question it settles> — <verdict> — <status>`. That is a
|
||||||
|
requirement, not a style note — it is what makes the index answer a
|
||||||
|
query instead of listing titles. The question is **derived** from the
|
||||||
|
file's first `answers:` entry, never written twice; `okf-check` errors
|
||||||
|
when a line and its source disagree.
|
||||||
|
|
||||||
|
**ROADMAP sheds both registers.**
|
||||||
|
|
||||||
|
- §Locked decisions becomes a pointer to `decisions/index.md` with a live
|
||||||
|
count. The section header stays — architect's skeleton is unchanged.
|
||||||
|
- §Risks & gotchas keeps only forward-looking risk. Believed/true/source
|
||||||
|
entries move to `LEARNINGS.md`, which carries that schema already and
|
||||||
|
which ROADMAP already instructs mirroring into.
|
||||||
|
- ROADMAP ends ≤110 lines; the over-cap note goes with the breach.
|
||||||
|
|
||||||
|
**`adr/` is retired, and every reference with it.** The directory is
|
||||||
|
empty, so removal — but ten skill and doc files still point at it, and a
|
||||||
|
register that leaves dangling pointers has not landed. The set is defined
|
||||||
|
by `grep -rln 'OKF/adr' skills/ README.md`, which must return nothing
|
||||||
|
afterwards. `model-domain` owns the directory: its three-of-three rule is
|
||||||
|
replaced by the warrant per decision 12, and `ADR-FORMAT.md` becomes the
|
||||||
|
decision-file format rather than a separate one. `OKF/index.md`
|
||||||
|
§Decisions points at `decisions/index.md`.
|
||||||
|
|
||||||
|
**`okf-check` exists** at `skills/loop/write-okf/scripts/`, exiting 1 on
|
||||||
|
any error and 0 otherwise, listing every finding with its page path.
|
||||||
|
|
||||||
|
- Errors: page missing `type:`; page missing `purpose:` or `answers:`; an
|
||||||
|
`answers:` entry appearing on two pages; an unresolvable `cites:` path;
|
||||||
|
a page present in the tree but absent from `index.md`.
|
||||||
|
- Warnings, exit 0: page over 110 lines; page with zero `cites:`.
|
||||||
|
- It must exit 0 on octobot's OKF the moment this lands — per the
|
||||||
|
doctrine, an invariant that fails on a clean tree trains people to
|
||||||
|
ignore the validator, so what octobot cannot satisfy today is a warning
|
||||||
|
or is absent.
|
||||||
|
- Stdlib only; frontmatter parsing handles multi-line `answers:` lists.
|
||||||
|
- Script, not a skill — no SKILL.md, no invocation surface. Callers reach
|
||||||
|
it **from the skill's own base directory**, never a repo-relative path,
|
||||||
|
since `skills/loop/...` resolves only inside octobot and write-okf's
|
||||||
|
purpose is running elsewhere. The target OKF is an argument.
|
||||||
|
|
||||||
|
**write-okf gates on it** — done-criteria require running `okf-check` and
|
||||||
|
pasting output; a claim of conformance is not a gate. `okf-layout.md`
|
||||||
|
documents the register and the warrant contract.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — CLI: `okf-check <okf-dir>`,
|
||||||
|
findings on stdout, exit 0/1. The interface tests run against.
|
||||||
|
- `OKF/decisions/index.md` — question-shaped index format.
|
||||||
|
- `OKF/decisions/NNN-<slug>.md` — warrant frontmatter contract.
|
||||||
|
- `OKF/ROADMAP.md` §Locked decisions, §Risks & gotchas — pointer shape.
|
||||||
|
- `OKF/index.md` §Decisions — register link replacing `adr/`.
|
||||||
|
- `skills/loop/write-okf/SKILL.md` done-criteria + `okf-layout.md`.
|
||||||
|
- `model-domain/ADR-FORMAT.md` — decision-file format, renamed and
|
||||||
|
re-pointed. The rest of the sweep is reference edits, not seams.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/ \
|
||||||
|
&& test "$(wc -l < OKF/ROADMAP.md)" -le 110 \
|
||||||
|
&& test "$(ls OKF/decisions/[0-9][0-9][0-9]-*.md | wc -l)" -eq 16 \
|
||||||
|
&& test ! -d OKF/adr \
|
||||||
|
&& test -z "$(grep -rln 'OKF/adr' skills/ README.md)" \
|
||||||
|
&& grep -c '^- ' OKF/decisions/index.md \
|
||||||
|
&& echo PASS
|
||||||
|
```
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- Ferry graduation, directory collapse, and the `sealed:` pin, plus the
|
||||||
|
`okf-check` rule that resolves pins — blueprint 003.
|
||||||
|
- Taxonomy scan, `modules/`, `analyses/`, `okf:derived` two-zone fences —
|
||||||
|
ROADMAP phase 6.
|
||||||
|
- Rewording, merging, re-arguing, or renumbering any migrated decision.
|
||||||
|
- Making `moor` gate on `okf-check` — 003, once it has a ferry rule.
|
||||||
|
- Raising or exempting the 110-line cap.
|
||||||
110
OKF/blueprints/B-003-graduate-and-collapse-ferries.md
Normal file
110
OKF/blueprints/B-003-graduate-and-collapse-ferries.md
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: ROADMAP.md phase 7 (decisions 14, 15)
|
||||||
|
---
|
||||||
|
|
||||||
|
# 003 — graduate ferry decisions and collapse the moored ferry
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
Phase 7's second half. Decisions 14 and 15 settle the behaviour;
|
||||||
|
[002](B-002-extract-why-register.md) built the register they graduate into
|
||||||
|
and left this in its Out-of-scope block. `ls OKF/ferries/` cannot answer
|
||||||
|
what deliberation is in flight — the Real need, and decision 15's purpose.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**Resolved ferry decisions graduate.** At moor, each `D-<n>` whose
|
||||||
|
`Resolution` is filled becomes `OKF/decisions/NNN-<slug>.md` at the next
|
||||||
|
free number, carrying the warrant frontmatter of
|
||||||
|
[DECISION-FORMAT.md](../../skills/engineering/model-domain/DECISION-FORMAT.md)
|
||||||
|
and a `decisions/index.md` line. The resolution body moves verbatim; the
|
||||||
|
ferry's `Options` and `Why it must be decided` stay behind in the
|
||||||
|
collapsed page. One home, never two copies.
|
||||||
|
|
||||||
|
The **warrant test still gates**: a resolved `D-<n>` answering no question
|
||||||
|
another page lacks gets no register file — its resolution stays in the
|
||||||
|
collapsed page. Graduation is the default, not an obligation. `blocked-by`
|
||||||
|
edges drop; the register is not a dependency graph.
|
||||||
|
|
||||||
|
**Moor collapses the directory.** `ferries/<topic>/` becomes
|
||||||
|
`ferries/<topic>.md` — problem shape, rejected alternatives, pointers to
|
||||||
|
graduated numbers. Directory means open, file means moored.
|
||||||
|
|
||||||
|
- Frontmatter: `type: Ferry Map`, then `sealed:` carrying the jj change
|
||||||
|
id, the git commit hash, and the ISO date — pinned to `@-` at moor,
|
||||||
|
because the sealing commit cannot name itself and the parent is where
|
||||||
|
the `D-<n>` files still exist.
|
||||||
|
- `OKF/index.md`'s ferry line changes shape with the state:
|
||||||
|
`<topic> — n/m resolved → <topic>/MAP.md` while open,
|
||||||
|
`<topic> — moored <date> → <topic>.md` after. This is what keeps the
|
||||||
|
collapsed page reachable once its `MAP.md` is gone.
|
||||||
|
|
||||||
|
**moor's guardrails are rewritten, not appended to.** "Never delete a
|
||||||
|
ferry directory" and "never auto-promote a decision" both now contradict
|
||||||
|
decisions 14 and 15 as written. They narrow: never collapse without a
|
||||||
|
resolvable pin — the pin is what makes removal recoverable — and never
|
||||||
|
graduate a decision that fails the warrant test.
|
||||||
|
|
||||||
|
**Drift ownership splits by what each tool can see.**
|
||||||
|
|
||||||
|
- `okf-check` validates pin **shape** — a page directly under `ferries/`
|
||||||
|
must carry `sealed:` with all three fields, a hex hash and an ISO date;
|
||||||
|
a `<topic>/` and a `<topic>.md` may not coexist. Both errors. Shape
|
||||||
|
only, because `okf-check` runs against OKF trees that need not sit in a
|
||||||
|
jj repo, and per 002's doctrine a validator that cannot exit 0 outside
|
||||||
|
its home repo trains people to ignore it.
|
||||||
|
- **refresh** validates pin **resolution**, reporting DRIFT when the
|
||||||
|
change id does not resolve — it has the repo in hand. The split is
|
||||||
|
itself a decision: register 017 if warranted, in `okf-layout.md`
|
||||||
|
either way.
|
||||||
|
|
||||||
|
**moor gates on `okf-check`** — deferred from 002 pending this ferry
|
||||||
|
rule. Done-criteria require running it and pasting output.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/moor/SKILL.md` — the graduation and collapse steps, the
|
||||||
|
two narrowed guardrails, the `okf-check` gate in done-criteria.
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — the ferry shape rule. CLI
|
||||||
|
unchanged: `okf-check <okf-dir>`, findings on stdout, exit 0/1.
|
||||||
|
- `skills/loop/write-okf/okf-layout.md` — `ferries/` contract gains the
|
||||||
|
moored shape, `sealed:`, and the refresh DRIFT rule.
|
||||||
|
- `OKF/index.md` — the two ferry line shapes.
|
||||||
|
- `OKF/ROADMAP.md` phase 7 — both halves tick as one net-shedding line.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
Weave builds a throwaway fixture in the session scratchpad — a jj repo
|
||||||
|
holding a minimal OKF with one ferry, one resolved `D-1` — moors it by
|
||||||
|
hand per the rewritten `SKILL.md`, then runs this against it:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
F=$SCRATCH/fixture-okf \
|
||||||
|
&& test -f $F/ferries/fx-topic.md && test ! -d $F/ferries/fx-topic \
|
||||||
|
&& grep -q '^sealed:' $F/ferries/fx-topic.md \
|
||||||
|
&& ls $F/decisions/[0-9][0-9][0-9]-*.md \
|
||||||
|
&& (cd $F && jj show "$(sed -n 's/.*change: *//p' ferries/fx-topic.md)" >/dev/null) \
|
||||||
|
&& skills/loop/write-okf/scripts/okf-check $F \
|
||||||
|
&& mkdir $F/ferries/fx-topic && ! skills/loop/write-okf/scripts/okf-check $F \
|
||||||
|
&& rmdir $F/ferries/fx-topic \
|
||||||
|
&& skills/loop/write-okf/scripts/okf-check OKF/ \
|
||||||
|
&& test "$(wc -l < OKF/ROADMAP.md)" -le 110 \
|
||||||
|
&& test "$(wc -l < skills/loop/moor/SKILL.md)" -le 110 \
|
||||||
|
&& echo PASS
|
||||||
|
```
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- Resolving `ferries/python-siblings/` D-1..D-3. They stay `open`; that
|
||||||
|
is a real design sitting for `/ferry`, not this blueprint's fixture.
|
||||||
|
- Landing a test runner or a `prove-*.sh` harness — moor is prose, so no
|
||||||
|
script can execute its steps, and a fixture builder that cannot run the
|
||||||
|
thing under test does not earn a file.
|
||||||
|
- Backfilling `sealed:` — nothing in the tree is moored yet.
|
||||||
|
- Splitting `moor/SKILL.md` — it would let Verify's line check pass while
|
||||||
|
the skill grew. Overflow means moor wants a decision, not relief.
|
||||||
|
- Phase 6's scope: taxonomy scan, `modules/`, `analyses/`, and `cites:`
|
||||||
|
`path:symbol` pinning (ROADMAP §Risks).
|
||||||
|
- Raising or exempting the 110-line cap.
|
||||||
110
OKF/blueprints/B-004-give-cites-teeth-and-fence-derived-zone.md
Normal file
110
OKF/blueprints/B-004-give-cites-teeth-and-fence-derived-zone.md
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: ROADMAP.md phase 6, part A (decision 017)
|
||||||
|
---
|
||||||
|
|
||||||
|
# 004 — give cites teeth and fence the derived zone
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
Phase 6's first half. The warrant contract shipped with
|
||||||
|
[002](B-002-extract-why-register.md); what phase 6 still owes is the half
|
||||||
|
that *detects staleness*. `cite_resolves` (`okf-check:92-97`) already
|
||||||
|
resolves the path half, repo-free, and discards the `:suffix` it is
|
||||||
|
handed. The Real need is a cite that breaks when the thing it cites
|
||||||
|
moves — `ROADMAP.md:92-94` names that churn, and a path-only cite is the
|
||||||
|
bill without the detector.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**A cite resolves to a symbol, not just a file.** `cites:` entries take
|
||||||
|
three shapes:
|
||||||
|
|
||||||
|
- `path` — resolves iff the path exists. Unchanged.
|
||||||
|
- `path:line` — resolves iff the path exists. The line number is a
|
||||||
|
reading aid, never validated; a check that cannot fail is not a check.
|
||||||
|
- `path:symbol` — resolves iff the path exists **and** the symbol appears
|
||||||
|
in it as a literal substring.
|
||||||
|
|
||||||
|
Substring, not parsing: no language awareness, no tags file, no
|
||||||
|
dependency. The two suffixes are told apart by whether it parses as an
|
||||||
|
integer.
|
||||||
|
|
||||||
|
**Cite drift belongs to `okf-check`, not refresh.** This extends
|
||||||
|
[017](../decisions/R-017-pin-drift-splits-by-visibility.md), which splits
|
||||||
|
by *what a tool can see*: a `sealed:` pin needs `jj show`, so it goes to
|
||||||
|
refresh; a cite needs only the working tree, so it stays in the validator
|
||||||
|
already reading it. 017's doctrine is untouched — a cite needs no repo.
|
||||||
|
|
||||||
|
Consequently **refresh's DRIFT rule narrows to pins**. Its cite half is
|
||||||
|
removed, not scripted: refresh is prose, and prose claiming to detect
|
||||||
|
drift with no runner behind it is a gate nobody passes or fails.
|
||||||
|
|
||||||
|
**The derived zone gets fences.** A page may carry at most one region
|
||||||
|
delimited by `<!-- okf:derived begin -->` and `<!-- okf:derived end -->`.
|
||||||
|
Refresh regenerates the inside wholesale and may not touch a byte
|
||||||
|
outside it; outside is the judgement zone (`../CONTEXT.md:63-67`),
|
||||||
|
append/supersede only. `okf-check` validates fence *shape* — balanced,
|
||||||
|
`begin` before `end`, at most one pair. Shape only, same rule as above.
|
||||||
|
|
||||||
|
**The warrant contract moves to its own sibling.** `okf-layout.md` is at
|
||||||
|
100/110 and gains two contracts here, so the warrant and `sealed:` blocks
|
||||||
|
leave for `page-warrant.md` — headroom by splitting, not by exemption.
|
||||||
|
|
||||||
|
**Phase 6 gains one hunk, two clauses.** Its `grep -rL "^purpose:"`
|
||||||
|
clause (`ROADMAP.md:73-74`) wants a warrant on every page but `index.md`;
|
||||||
|
002 later scoped warrants to root pages plus `decisions/`, exempting
|
||||||
|
`blueprints/` and `ferries/` (`okf-check:180-183`), so it cannot pass and
|
||||||
|
narrows to the scope that holds. The phase also records its own split —
|
||||||
|
`Ships as 004 (cites + fences) then 005 (taxonomy scan).` — because a
|
||||||
|
split nobody wrote down is one the next agent re-litigates.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — `cite_resolves` gains the
|
||||||
|
symbol case; a fence-shape check joins it. CLI unchanged:
|
||||||
|
`okf-check <okf-dir>`, findings on stdout, exit 0/1.
|
||||||
|
- `skills/loop/write-okf/page-warrant.md` — **new**. The warrant contract
|
||||||
|
and the `sealed:` pin block, moved verbatim.
|
||||||
|
- `skills/loop/write-okf/okf-layout.md` — the cite grammar, the derived
|
||||||
|
fence contract, and a pointer replacing the two moved blocks.
|
||||||
|
- `skills/loop/write-okf/SKILL.md` — refresh step 4 (the cite grammar),
|
||||||
|
step 6 (narrowed to pins), and the derived-zone regeneration rule.
|
||||||
|
- `OKF/ROADMAP.md` phase 6 — the corrected Verify clause and the split
|
||||||
|
line. One hunk; the phase stays under 110.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
Weave builds a throwaway fixture in the scratchpad — **not** a jj repo,
|
||||||
|
which is the point — `src/conf.py` holding `def parse_config`, an OKF
|
||||||
|
citing `src/conf.py:parse_config` from a fenced `ARCHITECTURE.md`, and a
|
||||||
|
`before/` copy. It regenerates the zone by hand, then runs:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
S=$SCRATCH/fx-cites && Z='/okf:derived begin/,/okf:derived end/d' \
|
||||||
|
&& test ! -d $S/.jj && skills/loop/write-okf/scripts/okf-check $S/OKF \
|
||||||
|
&& sed -i 's/def parse_config/def load_config/' $S/src/conf.py \
|
||||||
|
&& ! skills/loop/write-okf/scripts/okf-check $S/OKF \
|
||||||
|
&& diff <(sed "$Z" $S/OKF/ARCHITECTURE.md) <(sed "$Z" $S/before/ARCHITECTURE.md) \
|
||||||
|
&& printf '<!-- okf:derived begin -->\n' >> $S/OKF/SUMMARY.md \
|
||||||
|
&& ! skills/loop/write-okf/scripts/okf-check $S/OKF \
|
||||||
|
&& skills/loop/write-okf/scripts/okf-check OKF/ \
|
||||||
|
&& grep -rL "^purpose:" OKF/*.md OKF/decisions/[0-9]*.md | grep -qx OKF/index.md \
|
||||||
|
&& for f in skills/loop/write-okf/okf-layout.md \
|
||||||
|
skills/loop/write-okf/page-warrant.md OKF/ROADMAP.md; do
|
||||||
|
test "$(wc -l < $f)" -le 110 || exit 1; done \
|
||||||
|
&& echo PASS
|
||||||
|
```
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- The taxonomy scan, `taxonomy-scan.md`, `modules/`, `analyses/`, and the
|
||||||
|
page-plan proposal — phase 6 part B, its own blueprint.
|
||||||
|
- A symbol parser, ctags, or language-aware resolution; and validating
|
||||||
|
`path:line` numbers. Literal substring or nothing.
|
||||||
|
- Giving refresh a runner. Its cite half moves to `okf-check`; the pin
|
||||||
|
half stays prose, per 017.
|
||||||
|
- Backfilling `path:symbol` into existing `cites:`. New grammar, no sweep.
|
||||||
|
- Resolving `ferries/python-siblings/` D-1..D-3.
|
||||||
|
- Raising or exempting the 110-line cap.
|
||||||
110
OKF/blueprints/B-005-propose-the-page-plan-from-a-repo-scan.md
Normal file
110
OKF/blueprints/B-005-propose-the-page-plan-from-a-repo-scan.md
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: ROADMAP.md phase 6, part B (decisions 007, 009, 010)
|
||||||
|
---
|
||||||
|
|
||||||
|
# 005 — propose the page plan from a repo scan
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
Phase 6's second half, the last thing owed before it ticks.
|
||||||
|
[007](../decisions/R-007-taxonomy-derived-per-repo.md) settled that the page
|
||||||
|
taxonomy is derived per repo; [009](../decisions/R-009-index-is-the-page-plan.md)
|
||||||
|
settled where the plan is recorded. Neither has a producer — scaffold
|
||||||
|
still materialises a fixed four-template skeleton (`write-okf/SKILL.md:32`),
|
||||||
|
the exact layout 007 rejects. The Real need: a scan turning a repo's shape
|
||||||
|
into a proposal a user can lock. Brief: `ROADMAP.md:70-77`.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**The scan proposes; it never writes and never culls.** `okf-scan
|
||||||
|
<repo-root>` walks the tree and prints one candidate page per line to
|
||||||
|
stdout, index.md-ready: `<dir>/<name>.md — <evidence path>`. Every line
|
||||||
|
names the disk evidence that warranted it. **No evidence, no line.**
|
||||||
|
|
||||||
|
Two signals, both directory-shaped, both language-blind:
|
||||||
|
|
||||||
|
- **`analyses/<name>.md`** — a directory named `analysis`/`analyses`, or
|
||||||
|
holding a `.ipynb`, `.Rmd`, or `.qmd`. One page each, named for it.
|
||||||
|
- **`modules/<name>.md`** — a directory holding at least one code file,
|
||||||
|
under the repo root or a single source root (`src/`, `lib/`, `R/`),
|
||||||
|
not already an analyses candidate.
|
||||||
|
|
||||||
|
Dot-directories and the repo's own `OKF/` are skipped; no thresholds, no
|
||||||
|
ranking, no language awareness — a threshold is a decision to make.
|
||||||
|
|
||||||
|
**A scan proposes only what a scan can see.** `modules/` and `analyses/`
|
||||||
|
are read off disk; the spine — `SUMMARY`, `ARCHITECTURE`, `CONTEXT`,
|
||||||
|
`ROADMAP`, `LEARNINGS`, `decisions/` — is written by loop skills out of
|
||||||
|
conversation, and no tree walk finds a glossary. `SKILL.md:34-37` draws
|
||||||
|
that producer seam already; [010](../decisions/R-010-two-zone-pages.md)
|
||||||
|
draws it from the other side, module and analysis pages being the only
|
||||||
|
ones with a derived zone at all.
|
||||||
|
|
||||||
|
**A page is listed when planned, written when its producer has something
|
||||||
|
to say.** index.md may name a page that does not exist yet; scaffold
|
||||||
|
writes no TODO shell for it. Needs no new code, and cuts both ways in
|
||||||
|
`okf-check`: absent link targets are skipped (`:76-79`), so
|
||||||
|
plan-without-page is legal, while an unlisted page errors `not reachable
|
||||||
|
from index.md` (`:199-200`). An unwritten page cannot be empty.
|
||||||
|
|
||||||
|
**A scaffold's own output must pass `okf-check`.** It does not today:
|
||||||
|
`templates/*.tpl` carry `type:` alone, so every scaffolded page errors
|
||||||
|
`missing purpose:`. Purposes are fixed already by the page contracts
|
||||||
|
(`okf-layout.md:53-87`), so the four templates carry real warrants.
|
||||||
|
`CONTEXT.md.tpl` and `ROADMAP.md.tpl` are added for their producers to
|
||||||
|
fill, unmaterialised — no pre-warranted shell slips past the check.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/okf-scan` — **new**. CLI
|
||||||
|
`okf-scan <repo-root>`, candidates on stdout, exit 0 whatever it finds
|
||||||
|
(2 on usage) — a scanner is not a validator, so
|
||||||
|
[016](../decisions/R-016-one-okf-check-validator.md) holds.
|
||||||
|
- `skills/loop/write-okf/taxonomy-scan.md` — **new**. The scan contract:
|
||||||
|
two signals, the evidence rule, the producer seam, the propose-never-
|
||||||
|
write boundary, and how a proposal becomes a locked plan.
|
||||||
|
- `skills/loop/write-okf/okf-layout.md` — `modules/` and `analyses/` in
|
||||||
|
the tree, marked proposable; a pointer to `taxonomy-scan.md`.
|
||||||
|
- `skills/loop/write-okf/SKILL.md` — scaffold step 2 becomes scan →
|
||||||
|
propose → user locks `index.md` → materialise what it lists *and* a
|
||||||
|
producer can fill.
|
||||||
|
- `skills/loop/write-okf/templates/` — warrants on the four templates;
|
||||||
|
`CONTEXT.md.tpl` and `ROADMAP.md.tpl` added, unmaterialised.
|
||||||
|
- `OKF/ROADMAP.md` phase 6 — the ✅ tick, paid for by its spent risk line
|
||||||
|
(`:94-96`; 004 shipped `path:symbol`).
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
Weave builds two scratchpad fixtures — `fx-analysis/` with
|
||||||
|
`analysis/2026-cohort/report.Rmd` and no code module, `fx-lib/` with
|
||||||
|
`src/parser/parse.py` and `src/render/render.py` and no notebook —
|
||||||
|
scaffolds `fx-analysis/OKF` per the rewritten step 2, then runs:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
S=$SCRATCH && A=$S/fx-analysis && L=$S/fx-lib && W=skills/loop/write-okf \
|
||||||
|
&& $W/scripts/okf-scan $A > $S/plan-a && $W/scripts/okf-scan $L > $S/plan-l \
|
||||||
|
&& test -s $S/plan-a && test -s $S/plan-l && ! diff -q $S/plan-a $S/plan-l \
|
||||||
|
&& grep -q '^analyses/' $S/plan-a && ! grep -q '^modules/' $S/plan-a \
|
||||||
|
&& grep -q '^modules/' $S/plan-l && ! grep -q '^analyses/' $S/plan-l \
|
||||||
|
&& ! grep -qv ' — ' $S/plan-a \
|
||||||
|
&& ! test -e $A/OKF/ROADMAP.md && grep -q ROADMAP.md $A/OKF/index.md \
|
||||||
|
&& $W/scripts/okf-check $A/OKF && $W/scripts/okf-check OKF/ \
|
||||||
|
&& for f in $W/okf-layout.md $W/taxonomy-scan.md $W/SKILL.md OKF/ROADMAP.md; do
|
||||||
|
test "$(wc -l < $f)" -le 110 || exit 1; done \
|
||||||
|
&& echo PASS
|
||||||
|
```
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- Rescanning on refresh — the standing keep/expand criterion and the
|
||||||
|
remove-if-wholly-derived rule are 006, on 010's grant and
|
||||||
|
[015](../decisions/R-015-moor-collapses-ferry-directory.md)'s doctrine.
|
||||||
|
- Recording the producer seam as a decision — settle at moor.
|
||||||
|
- `context/<subroot>.md` proposals — a bounded context has no disk
|
||||||
|
signal; model-domain owns it.
|
||||||
|
- The scan writing pages, editing `index.md`, or ranking candidates.
|
||||||
|
- Language-aware module detection, import graphs, size thresholds.
|
||||||
|
- Backfilling `modules/`/`analyses/` into octobot's own OKF. No sweep.
|
||||||
|
- Raising or exempting the 110-line cap.
|
||||||
110
OKF/blueprints/B-006-rescan-the-page-plan-on-refresh.md
Normal file
110
OKF/blueprints/B-006-rescan-the-page-plan-on-refresh.md
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: 005's Out of scope (rescan on refresh); ROADMAP.md phase 8, added by this change
|
||||||
|
---
|
||||||
|
|
||||||
|
# 006 — rescan the page plan on refresh
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
005 shipped the scaffold path only — a scan proposes a plan once, at
|
||||||
|
birth. Refresh (`write-okf/SKILL.md:50-73`) never runs it, so a repo that
|
||||||
|
grows a module gets no page and one that loses a module keeps a stale
|
||||||
|
page forever. [007](../decisions/R-007-taxonomy-derived-per-repo.md) makes
|
||||||
|
the taxonomy derived per repo; today it is derived *once*.
|
||||||
|
|
||||||
|
Removal is the part nobody has ruled on: the doctrine falls out of
|
||||||
|
[010](../decisions/R-010-two-zone-pages.md)'s derived zone and
|
||||||
|
[015](../decisions/R-015-moor-collapses-ferry-directory.md)'s "history is
|
||||||
|
the archive of record", but neither states it — so it becomes decision
|
||||||
|
018 here, before this locks. The last two items are flags 005's weave
|
||||||
|
raised, both in `okf-scan`, both reproduced.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**Refresh proposes a plan delta; it still never writes and never culls.**
|
||||||
|
Rescan runs `okf-scan <repo-root>` and sorts every candidate, and every
|
||||||
|
`modules/`/`analyses/` line already in `index.md`, into three buckets:
|
||||||
|
|
||||||
|
- **new** — a candidate `index.md` does not list → propose to add.
|
||||||
|
- **standing** — listed and still proposed → keep. Its derived zone is
|
||||||
|
regenerated wholesale, its judgement zone untouched, per 010.
|
||||||
|
- **unwarranted** — listed but no longer proposed → propose to remove or
|
||||||
|
supersede, per the doctrine below.
|
||||||
|
|
||||||
|
The user locks the delta as at scaffold (`taxonomy-scan.md:52`); no
|
||||||
|
bucket is applied unasked. **Jurisdiction is `modules/` and `analyses/`
|
||||||
|
only** — a page no scan can see is never proposed for removal.
|
||||||
|
|
||||||
|
**An unwarranted page is deleted only if it is wholly derived** —
|
||||||
|
nothing outside its `okf:derived` fences but frontmatter and title. One
|
||||||
|
byte of judgement and it is superseded instead, struck with a pointer per
|
||||||
|
`SKILL.md:53`. A wholly derived page loses nothing a rescan cannot
|
||||||
|
rebuild; for the rest 015's ground holds — history is the archive.
|
||||||
|
|
||||||
|
**A container proposes nothing; its members do.** A directory matched by
|
||||||
|
name alone (`analysis`/`analyses`) that has a descendant candidate yields
|
||||||
|
no page; a directory holding a notebook is a candidate whatever its name.
|
||||||
|
Today `analysis/2026-cohort/report.Rmd` proposes both
|
||||||
|
`analyses/2026-cohort.md` and `analyses/analysis.md`; the user culls that
|
||||||
|
container at scaffold, but on refresh it would return every scan.
|
||||||
|
|
||||||
|
**The scan exits 0 whatever it finds.** `iterdir()` on an unreadable
|
||||||
|
directory raises today (`okf-scan:38,48`), exiting 1 against 005's seam
|
||||||
|
promise. Such a directory yields no evidence — a permission bit is not a
|
||||||
|
page plan.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/okf-scan` — container suppression;
|
||||||
|
unreadable directories yield no evidence. No new flag, no new mode —
|
||||||
|
the delta is read by refresh, not computed by the scanner.
|
||||||
|
- `skills/loop/write-okf/taxonomy-scan.md` (64/110) — a **Rescan on
|
||||||
|
refresh** section: three buckets, removal doctrine, container rule.
|
||||||
|
- `skills/loop/write-okf/SKILL.md` (103/110) — refresh step 1 gains the
|
||||||
|
rescan and its lock. **≤7 net new lines** — the whole slack it has.
|
||||||
|
- `OKF/decisions/018-<slug>.md` + `decisions/index.md` — the removal
|
||||||
|
doctrine. 018 is spent here, so 004's carried cite/pin-split question
|
||||||
|
takes a later number if it ever lands.
|
||||||
|
- `OKF/ROADMAP.md` (108/110) — **phase 8, ≤4 lines**, paid for by
|
||||||
|
collapsing the three-line execution-order note (`:90-92`) to one; the
|
||||||
|
append-only sentence phase 8 rides on survives. Ends ≤110.
|
||||||
|
- `OKF/index.md` — the 006 blueprint line; "17 live" → 18.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
Weave builds `$SCRATCH/fx-refresh/` — `analysis/2026-cohort/report.Rmd`,
|
||||||
|
`src/parser/parse.py`, `src/render/render.py`, unreadable `src/sealed/`
|
||||||
|
(mode restored after) — and an `OKF/` listing `modules/parser.md`,
|
||||||
|
`modules/render.md`, `modules/gone.md` (wholly derived) and
|
||||||
|
`modules/kept.md` (one sentinel paragraph outside the fences); copies
|
||||||
|
`parser.md` to `parser.before`; drops `src/render/`; adds
|
||||||
|
`src/emit/emit.py`; refreshes per the rewritten steps; then runs:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
S=$SCRATCH/fx-refresh && O=$S/OKF && W=skills/loop/write-okf \
|
||||||
|
&& $W/scripts/okf-scan $S > $S/plan \
|
||||||
|
&& grep -q '^analyses/2026-cohort\.md ' $S/plan \
|
||||||
|
&& grep -q '^modules/emit\.md ' $S/plan \
|
||||||
|
&& ! grep -qE '^(analyses/analysis|modules/render)\.md ' $S/plan \
|
||||||
|
&& grep -q 'modules/emit.md' $O/index.md \
|
||||||
|
&& ! test -e $O/modules/gone.md && ! grep -q 'modules/gone.md' $O/index.md \
|
||||||
|
&& grep -qF "$(cat $S/sentinel)" $O/modules/kept.md \
|
||||||
|
&& diff <(sed '/okf:derived begin/,/okf:derived end/d' $S/parser.before) \
|
||||||
|
<(sed '/okf:derived begin/,/okf:derived end/d' $O/modules/parser.md) \
|
||||||
|
&& $W/scripts/okf-check $O && $W/scripts/okf-check OKF/ \
|
||||||
|
&& for f in $W/SKILL.md $W/taxonomy-scan.md OKF/ROADMAP.md; do
|
||||||
|
test "$(wc -l < $f)" -le 110 || exit 1; done \
|
||||||
|
&& echo PASS
|
||||||
|
```
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- A runner for the plan delta — refresh reads it, as it reads DRIFT
|
||||||
|
(003's precedent: prose rule, no second validator).
|
||||||
|
- Applying any bucket without the user's lock; auto-refresh on a hook.
|
||||||
|
- Ranking, thresholds, language-aware module detection — still 005's.
|
||||||
|
- Recording the producer seam as a decision — still moor's.
|
||||||
|
- Backfilling `modules/`/`analyses/` into octobot's own OKF. No sweep.
|
||||||
|
- Raising or exempting the 110-line cap.
|
||||||
116
OKF/blueprints/B-007-add-sound.md
Normal file
116
OKF/blueprints/B-007-add-sound.md
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: ROADMAP.md phase 9; decision 019
|
||||||
|
sounded: 2026-07-22
|
||||||
|
---
|
||||||
|
|
||||||
|
# 007 — add sound, the recon that precedes a lock
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
A blueprint locks on a human's yes, and that yes rests on knowledge
|
||||||
|
nothing checked. `README.md:74` already claims something this repo is
|
||||||
|
about to stop doing — the kind of drift a lock cannot see. Phase 9 in
|
||||||
|
[ROADMAP.md](../ROADMAP.md) buys the check;
|
||||||
|
[019](../decisions/R-019-recon-may-self-fire.md) says who may run it
|
||||||
|
unasked.
|
||||||
|
|
||||||
|
This blueprint is itself the first sounding — hence the stamp, and
|
||||||
|
hence `README.md:74` in the seams. Ports mattpocock's `research`,
|
||||||
|
re-founded on the OKF.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**The spine.** Three steps, in order, every run:
|
||||||
|
|
||||||
|
1. **OKF** — read the pages the question touches. No `./OKF/` → say so
|
||||||
|
in one line, name `/write-okf`, stop. Nothing else runs — which is
|
||||||
|
also what keeps a wrong self-fire costing two lines, not a recon.
|
||||||
|
2. **nostos** — query the nostos MCP server when one is configured, via
|
||||||
|
its `find` / `provenance_of` tools. Presence comes from the agent's
|
||||||
|
MCP configuration, never from a filesystem path. Absent → one line
|
||||||
|
naming `nostos install`, run from the repo to be indexed, then
|
||||||
|
continue.
|
||||||
|
3. **Live code** — confirm what steps 1 and 2 claimed against the files
|
||||||
|
themselves. Either can be stale; this step is what makes the run
|
||||||
|
worth its context. A claim with no internal owner — a third-party
|
||||||
|
API, a spec — is followed to its primary source and cited. Nothing
|
||||||
|
else leaves the repo.
|
||||||
|
|
||||||
|
**Two mouths.** Reached **by name** — by the user or by `blueprint` —
|
||||||
|
sound refines the blueprint it sounded and stamps `sounded: <date>`.
|
||||||
|
**Self-fired it reports and writes nothing**, per 019: the stamp is what
|
||||||
|
a lock leans on, so a run nobody asked for may not make it.
|
||||||
|
|
||||||
|
**Idempotence.** Already stamped and no cited file changed since →
|
||||||
|
report `sounded <date>, unchanged` and stop.
|
||||||
|
|
||||||
|
**Triggers are states, not topics.** The description routes on
|
||||||
|
*blueprint*, *OKF*, *lock*, *cite* — nouns absent from repos where sound
|
||||||
|
does not belong. "Researching how code works" is the failure shape.
|
||||||
|
|
||||||
|
**Runs inline**, never in a subagent: the findings are the deliverable
|
||||||
|
and belong in the calling context.
|
||||||
|
|
||||||
|
**The mark.** `sounded: YYYY-MM-DD`, fourth field in a blueprint's
|
||||||
|
frontmatter after `traces-to`. Sounding is a precondition of lock.
|
||||||
|
`okf-check` gains one warning — `<path>: locked without sounded:` —
|
||||||
|
raised only at `status: locked`. Never at `draft` (not-yet-sounded is
|
||||||
|
correct there) nor at `implemented` (noise, and it would retro-flag
|
||||||
|
002–006). Warning, not error: exit status stays 0.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/sound/SKILL.md` — new; the router. Plus its
|
||||||
|
`~/.claude/skills/sound` symlink, since discovery is one level deep.
|
||||||
|
- `skills/loop/blueprint/SKILL.md` — a sound step between Process 3 and
|
||||||
|
4; the precondition in *Status discipline* (`:43-47`).
|
||||||
|
- `skills/loop/blueprint/blueprint-format.md` — `sounded:` in the
|
||||||
|
frontmatter template.
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — the gate, above the
|
||||||
|
blueprint escape at `:213`.
|
||||||
|
- `skills/loop/steer/SKILL.md` — one row in the loop table.
|
||||||
|
- `README.md:74` — "All loop skills are user-invoked" is now false.
|
||||||
|
- `OKF/ARCHITECTURE.md` — invocation seam bullet gains the rule, so
|
||||||
|
019's cite lands on it.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
tmp=$(mktemp -d) && cp -r OKF "$tmp/OKF"
|
||||||
|
f="$tmp/OKF/blueprints/B-006-rescan-the-page-plan-on-refresh.md"
|
||||||
|
for s in draft locked implemented; do
|
||||||
|
sed -i "s/^status: .*/status: $s/" "$f"
|
||||||
|
printf '%s: %s\n' "$s" \
|
||||||
|
"$(skills/loop/write-okf/scripts/okf-check "$tmp/OKF" \
|
||||||
|
| grep -c 'locked without sounded')"
|
||||||
|
done
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect `draft: 0` `locked: 1` `implemented: 0`, then `0 error(s)` live.
|
||||||
|
|
||||||
|
Four session checks the script cannot make, run once each:
|
||||||
|
|
||||||
|
1. A repo with no `OKF/` — sound stops and names `/write-okf`.
|
||||||
|
✅ 2026-07-22 (no-OKF fixture — one line naming `/write-okf` after a
|
||||||
|
single directory listing, nothing else run)
|
||||||
|
2. A repo with no nostos MCP — one line naming `nostos install`, then
|
||||||
|
the run continues.
|
||||||
|
✅ 2026-07-22 (the 001 sounding — one line, the run continued)
|
||||||
|
3. A self-fired run leaves its blueprint byte-identical (`jj diff`).
|
||||||
|
⏳ pending
|
||||||
|
4. Fresh session, repo with no `OKF/`, ten ordinary code questions —
|
||||||
|
sound fires zero times.
|
||||||
|
✅ 2026-07-22 (no-OKF fixture, fresh session — zero self-fires over ten
|
||||||
|
ordinary code questions)
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- A new OKF page type — sound writes only into the blueprint it sounded.
|
||||||
|
- Writing on a self-fire, in any form, however small.
|
||||||
|
- Subagents, background or otherwise.
|
||||||
|
- Web research past the no-internal-owner gap — upstream `research`.
|
||||||
|
- Retro-sounding 001–006, and any change to `write-okf`.
|
||||||
|
- Wiring nostos into octobot; the live-nostos leg is tested elsewhere.
|
||||||
@ -0,0 +1,110 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-23
|
||||||
|
sounded: 2026-07-23
|
||||||
|
---
|
||||||
|
|
||||||
|
# 008 — make nostos primary and file reads the fallback
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
[007](B-007-add-sound.md) made the live-code read step 3 of every sounding,
|
||||||
|
on the warrant that the OKF and the index can both go stale
|
||||||
|
(`../CONTEXT.md:85-89`). That warrant predates nostos being on the
|
||||||
|
machine. Nostos serves codegraph over MCP, and codegraph's `node` and
|
||||||
|
`explore` return **source**, not metadata — so querying it is a change of
|
||||||
|
retrieval path, not a loss of ground truth, and step 3 as written re-reads
|
||||||
|
bytes step 2 already returned.
|
||||||
|
|
||||||
|
Two things the index cannot answer survive, and only those justify a
|
||||||
|
file read: what its parsers do not cover, and what no commit has seen yet.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**The spine.** Three steps, step 3 now conditional:
|
||||||
|
|
||||||
|
1. **OKF** — unchanged from 007.
|
||||||
|
2. **nostos** — query the nostos MCP server. Primary source for what the
|
||||||
|
code says, not a hint feeding a later read. Absent or unconfigured →
|
||||||
|
every query returns empty, routing every claim to step 3; say so once
|
||||||
|
and continue.
|
||||||
|
3. **File read — fallback only.** A file is opened for a claim in
|
||||||
|
exactly two cases:
|
||||||
|
- **Empty result.** Nostos returned nothing. Empty means *not
|
||||||
|
indexed*, never *not there* — an unindexed repo and a file type
|
||||||
|
codegraph's parsers do not own are indistinguishable here, and both
|
||||||
|
are answered the same way.
|
||||||
|
- **Dirty path.** The claim touches a path with uncommitted changes,
|
||||||
|
per one `jj st` per run.
|
||||||
|
|
||||||
|
Neither condition → the nostos answer stands, unread.
|
||||||
|
|
||||||
|
**One rule, both triggers.** The dirty-path fallback is correct under
|
||||||
|
either nostos `--trigger` mode: under `poll` the dirty set is exactly the
|
||||||
|
index's blind spot; under `watch` the re-reads are redundant but few,
|
||||||
|
since a sounding's dirty set is small. Sound therefore **never detects or
|
||||||
|
depends on the configured trigger**, and nothing states a trigger as a
|
||||||
|
precondition.
|
||||||
|
|
||||||
|
**MCP only.** Sound talks to the nostos MCP server and never shells out
|
||||||
|
to `codegraph`. Freshness is nostos's job by construction. Sound's
|
||||||
|
disjoint knowledge is the working copy — which is why `jj st` is sound's
|
||||||
|
call and `codegraph status` is not.
|
||||||
|
|
||||||
|
**No coverage sweep.** `codegraph files` is never called; its output is
|
||||||
|
the repo's file list. Coverage is answered lazily by the empty-result
|
||||||
|
rule, at zero cost.
|
||||||
|
|
||||||
|
**Cites prefer `path:symbol`.** Sound's cites adopt the rule
|
||||||
|
`okf-layout.md:46-51` already sets for page frontmatter — symbol where a
|
||||||
|
symbol carries the claim, since that is the shape that breaks when the
|
||||||
|
thing it cites moves, while a line suffix is a reading aid that nothing
|
||||||
|
validates. Extending it to sound's prose cites, which `okf-check` does
|
||||||
|
not reach, is the whole of this clause.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/sound/SKILL.md` — *The spine* (`:14-29`), step 3 becomes
|
||||||
|
conditional; the cite rule (`:26`). The `Never` at `:67-68` stands
|
||||||
|
unchanged — skipping step 1 is still the failure shape.
|
||||||
|
- `OKF/CONTEXT.md:85-89` — the **Sounding** entry states the old order.
|
||||||
|
- `README.md:61-62` — the same claim, one line.
|
||||||
|
|
||||||
|
`OKF/ARCHITECTURE.md` is **not** a seam: it names the invocation seam
|
||||||
|
(`:47-50`) and 019, never the spine. `OKF/ROADMAP.md` phase 9 is **not**
|
||||||
|
a seam: `:62-67` records what was verified on 2026-07-22 and is
|
||||||
|
append-only per [013](../decisions/R-013-roadmap-is-a-plan.md). Neither is
|
||||||
|
touched. `blueprint`, `blueprint-format.md`, `okf-check` and the
|
||||||
|
`sounded:` gate are untouched — see *Out of scope*.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
awk 'END{print NR}' skills/loop/sound/SKILL.md
|
||||||
|
grep -rni 'live code' README.md OKF/CONTEXT.md skills/loop/sound/SKILL.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect `0 error(s)`, a count ≤ 110, and the grep matching nothing.
|
||||||
|
|
||||||
|
Two session checks the script cannot make, run once each:
|
||||||
|
|
||||||
|
1. A sounding in a repo with no `.codegraph` — every query empty, sound
|
||||||
|
falls back to file reads for every claim and completes as today.
|
||||||
|
2. A sounding where a cited file has uncommitted changes — that file is
|
||||||
|
read, and the nostos answer for it is not taken on trust.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **Sounding marks in code** (`TODO(bp-NNN)` or any form), and any
|
||||||
|
`okf-check` rule enforcing their removal. Cut during grilling: sound
|
||||||
|
stamps at draft, `Seams touched` is not fixed until lock, so no point
|
||||||
|
in the lifecycle gives a mark a stable owner — and it duplicates
|
||||||
|
`Seams touched` besides.
|
||||||
|
- Shelling out to `codegraph` for any purpose, `codegraph status`
|
||||||
|
included.
|
||||||
|
- Any change to the two-mouths discipline, the `sounded:` stamp, or the
|
||||||
|
lock gate — 007's contract stands.
|
||||||
|
- Indexing octobot itself, and any `nostos` invocation from this repo.
|
||||||
|
- Retro-sounding 001–007.
|
||||||
105
OKF/blueprints/B-009-give-every-page-a-growth-path.md
Normal file
105
OKF/blueprints/B-009-give-every-page-a-growth-path.md
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-24
|
||||||
|
---
|
||||||
|
|
||||||
|
# 009 — give every page a growth path so the line cap can be enforced
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
The ≤110-line cap is prose-only in effect: `okf-check` emits it as a
|
||||||
|
warning, and a warning is what a rule decays into when breaching it has no
|
||||||
|
consequence. Measured, in a repo running this skill (nostos, 2026-07-22):
|
||||||
|
twelve pages over cap, the worst at 201 lines, while the one *mechanical*
|
||||||
|
rule — frontmatter `type:` — is obeyed without exception. In octobot,
|
||||||
|
seven of eight blueprints sit at exactly 110: the cap is not being obeyed
|
||||||
|
there either, it is deforming the prose to fit.
|
||||||
|
|
||||||
|
The cap cannot be promoted to an error while pages exist that have no
|
||||||
|
legal move at cap+1. `blueprints/`, `ferries/`, `context/` and
|
||||||
|
`decisions/` each have a named growth path; `LEARNINGS.md`,
|
||||||
|
`ARCHITECTURE.md` and `ROADMAP.md` have none. `LEARNINGS.md` is the acute
|
||||||
|
case — its contract is append-only, so unbounded growth is *mandatory* and
|
||||||
|
breach is only a matter of time.
|
||||||
|
|
||||||
|
Sieve — Real: measured breach, not speculation. Good: the cap becomes
|
||||||
|
enforceable, and ARCHITECTURE stops being a page that grows with the
|
||||||
|
codebase. Minimal: one new directory (`learnings/`), one companion file,
|
||||||
|
one constant; the other three growth paths reuse `modules/`/`analyses/`,
|
||||||
|
`context/` and `blueprints/`, which already exist.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**Caps.** `blueprints/` pages ≤150 lines; every other page ≤110. Over-cap
|
||||||
|
is an `okf-check` **error**, not a warning.
|
||||||
|
|
||||||
|
**Growth path, per page kind.** Every kind has exactly one legal move at
|
||||||
|
cap+1:
|
||||||
|
|
||||||
|
| page | move |
|
||||||
|
|---|---|
|
||||||
|
| `blueprints/NNN-<slug>.md` | over 150 is a **scope** signal, not a length one: one session and compound → split into two blueprints; more than one session → `ferry`. The `NNN-<slug>/` directory form stays available for notes. |
|
||||||
|
| `ARCHITECTURE.md` | sheds per-module prose into the `modules/`/`analyses/` pages that repo's taxonomy scan proposed, keeping the module map, seams and flows. Shed prose lands **outside** any `okf:derived` fence. |
|
||||||
|
| `ROADMAP.md` | does not split — **prunes**. A discharged phase collapses to one line naming what shipped and its blueprint numbers. |
|
||||||
|
| `CONTEXT.md` | `context/<subroot>.md` when the repo is genuinely multi-context. Otherwise over-cap is a breach of its existing contract — issue-local terms that belong in a blueprint. |
|
||||||
|
| `LEARNINGS.md` | splits into `learnings/<theme>.md`; the parent becomes an index. |
|
||||||
|
|
||||||
|
**Splitting is a pure move.** Entries move verbatim; nothing is reworded,
|
||||||
|
merged or dropped; the split lands in its own commit, verified by an entry
|
||||||
|
count that is equal before and after. New content lands in a later commit.
|
||||||
|
|
||||||
|
**Split axis is the layer that must change.** An entry belongs to the
|
||||||
|
theme of the layer that has to change because of it. Theme *names* are per
|
||||||
|
repo — the skill prescribes the routing rule and never the names.
|
||||||
|
|
||||||
|
**Split-outs are indexed from their own parent.** `index.md` carries one
|
||||||
|
line to the parent page; the parent alone lists its subpages. Generalises
|
||||||
|
the `ferries/` and `decisions/` precedent over the `context/` one, and
|
||||||
|
keeps `index.md` from growing every time a theme is added.
|
||||||
|
|
||||||
|
**Supersession is cross-page.** A superseded entry keeps its original text
|
||||||
|
verbatim wherever it lives and gains a dated note; the note records **what
|
||||||
|
survives**, not only what was wrong. The superseding entry lives in its own
|
||||||
|
theme and back-references.
|
||||||
|
|
||||||
|
**Directories are created lazily.** No growth-path directory is scaffolded
|
||||||
|
at init. `learnings/` appears when the cap forces it, never before.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/okf-layout.md` — layout tree, page contracts,
|
||||||
|
Rules: per-kind caps, growth paths, indexing rule, supersession.
|
||||||
|
- `skills/loop/write-okf/split-page.md` — **new**: the split procedure.
|
||||||
|
- `skills/loop/write-okf/SKILL.md` — refresh gains the trigger that routes
|
||||||
|
an over-cap error to `split-page.md`; the ≤110 guardrail restates.
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — per-kind cap, warning → error.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd skills/loop/write-okf && d=$(mktemp -d) && mkdir -p "$d/blueprints" &&
|
||||||
|
printf -- '---\nokf_version: "0.1"\n---\n- [a](a.md)\n- [b](blueprints/b.md)\n- [c](blueprints/c.md)\n' > "$d/index.md" &&
|
||||||
|
for f in "a:120:Learnings" "blueprints/b:140:Blueprint" "blueprints/c:160:Blueprint"; do
|
||||||
|
p=${f%%:*}; r=${f#*:}; n=${r%%:*}; t=${r##*:}
|
||||||
|
{ printf -- '---\ntype: %s\npurpose: p\nanswers:\n - "q %s"\ncites:\n - index.md\n---\n' "$t" "$p"
|
||||||
|
seq "$n"; } > "$d/$p.md"
|
||||||
|
done
|
||||||
|
scripts/okf-check "$d"; scripts/okf-check ../../../OKF
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect: `a.md` errors over the 110-line cap, `blueprints/b.md` (140) does
|
||||||
|
not, `blueprints/c.md` errors over the 150-line cap, and octobot's own
|
||||||
|
`OKF/` still reports 0 errors.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- Migrating any other repo's OKF — this ships the contract and the
|
||||||
|
procedure, not a sweep of nostos.
|
||||||
|
- A `roadmap/done.md` history page; discharged detail stays in
|
||||||
|
`blueprints/` and in history.
|
||||||
|
- Recursion — whether a `learnings/<theme>.md` may itself split, or that
|
||||||
|
signals a theme too broad. Untested, no page is near cap.
|
||||||
|
- Prescribed theme names.
|
||||||
|
- Renaming `ARCHITECTURE.md` for analysis repos; design-codebase
|
||||||
|
vocabulary already maps to pipeline stages.
|
||||||
141
OKF/blueprints/B-010-add-muster-the-human-review-gate.md
Normal file
141
OKF/blueprints/B-010-add-muster-the-human-review-gate.md
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: superseded-by-011
|
||||||
|
traces-to: user request 2026-07-24
|
||||||
|
sounded: 2026-07-24
|
||||||
|
---
|
||||||
|
|
||||||
|
# 010 — add muster, the opt-in human review gate on the loop's close
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
**Superseded 2026-07-24 — split per growth-doctrine
|
||||||
|
[020](../decisions/R-020-every-page-has-a-growth-path.md): the blueprint-level
|
||||||
|
gate ships as [011](B-011-add-blueprint-level-muster.md) (implemented); the
|
||||||
|
ferry-level gate — which needs the `ferry` skill as a seam this blueprint
|
||||||
|
never declared — becomes [012](B-012-add-ferry-level-muster.md). The
|
||||||
|
justification and sounding below stand for both.**
|
||||||
|
|
||||||
|
The loop reviews before it seals — [review-angles](../../engineering/review-angles/SKILL.md),
|
||||||
|
[review-blueprint](../../engineering/review-blueprint/SKILL.md),
|
||||||
|
[nuke-review](../../engineering/nuke-review/SKILL.md) — but all of it is
|
||||||
|
*agent* eyes. The human running the loop is present at the keyboard yet, by
|
||||||
|
their own account, does not read the diff after a weave and does not confirm
|
||||||
|
the agents' verdicts. So the diff a blueprint ships is, in practice, never
|
||||||
|
read by the person who owns the intent. That is the gap: not access, but a
|
||||||
|
forced checkpoint.
|
||||||
|
|
||||||
|
Muster is that checkpoint — an opt-in mode that **halts the loop** after the
|
||||||
|
seal and refuses to advance until the human has read the whole change against
|
||||||
|
what they meant and recorded a verdict.
|
||||||
|
|
||||||
|
Sieve — **Real**: the need is the user's own testimony, not speculation; the
|
||||||
|
loop has no human gate today. **Good**: adds a correctness surface the agent
|
||||||
|
axes cannot supply — *did this do what I intended* — nameable and distinct
|
||||||
|
from the four axes. **Minimal**: opt-in, so it costs **nothing** when off (no
|
||||||
|
marker, no prompt, no artifact); reuses the existing `[ -d .jj ]` VCS split,
|
||||||
|
the existing seal, and existing pages for storage; mandates no new
|
||||||
|
dependency — hunk is a viewer, and plain `jj diff` / `git diff` is the
|
||||||
|
fallback.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**Muster is a mode, off by default.** Set at generation, on the unit that
|
||||||
|
owns the gate: `muster: true` in a blueprint's frontmatter, or in a ferry's
|
||||||
|
`MAP.md`. Absent or false → weave and moor behave exactly as today: no base
|
||||||
|
marker, no halt, no tally. The zero-overhead path is the default path.
|
||||||
|
|
||||||
|
**The base is a stored ref, not a repo marker.** When muster is set, the
|
||||||
|
generating step records `review-base: <changeid-or-sha>` on the same page —
|
||||||
|
the parent of where work begins (`@-` for jj, `git rev-parse HEAD` for git).
|
||||||
|
The whole change is then the range `review-base..@`, which unions every
|
||||||
|
atomic commit the seal produced and, for a ferry, every blueprint it spawned.
|
||||||
|
Nothing is planted in the repo; storage is VCS-agnostic, the range command is
|
||||||
|
not.
|
||||||
|
|
||||||
|
**The gate halts the loop, opt-in only.**
|
||||||
|
|
||||||
|
| unit | halts | reviews |
|
||||||
|
|---|---|---|
|
||||||
|
| blueprint (`weave`) | after Seal, before status flips to `implemented` | `review-base..@` |
|
||||||
|
| ferry (`moor`) | after GATHER SIGNAL, before COLLAPSE | `review-base..@` |
|
||||||
|
|
||||||
|
At the halt, the whole-change diff is piped into **hunk** as a patch —
|
||||||
|
`hunk patch -` reads a unified diff from stdin and is VCS-agnostic (hunk
|
||||||
|
README, `github.com/modem-dev/hunk`). `[ -d .jj ]` — the same idiom as
|
||||||
|
[commit-atomic-jj](../../productivity/commit-atomic-jj/SKILL.md) /
|
||||||
|
commit-atomic-git — selects only the diff *producer*:
|
||||||
|
|
||||||
|
- jj: `jj diff --from <base> --to @ --git | hunk patch -`
|
||||||
|
- git: `git diff <base>..HEAD | hunk patch -`
|
||||||
|
|
||||||
|
When hunk is not installed, the same range is shown raw (`jj diff --from
|
||||||
|
<base> --to @` / `git diff <base>..HEAD`). The teeth are the tally, not the
|
||||||
|
viewer — an absent hunk degrades the review surface, it never blocks the loop.
|
||||||
|
|
||||||
|
**The teeth are the tally, not the viewer.** The human records a `tally:`
|
||||||
|
block on the unit's page:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
tally:
|
||||||
|
intent: <what the change was meant to do>
|
||||||
|
matches: yes | no
|
||||||
|
note: <optional>
|
||||||
|
```
|
||||||
|
|
||||||
|
`matches: yes` → the loop resumes and advances. `matches: no` → the loop
|
||||||
|
**stays halted** for the human to fix, then re-muster; it never advances a
|
||||||
|
known miss.
|
||||||
|
|
||||||
|
**The tally is machine-enforced where it can be seen.** `okf-check` errors on
|
||||||
|
any blueprint with `muster: true` and `status: implemented` that carries no
|
||||||
|
`tally:` block — the artifact cannot be skipped even if the prose halt is
|
||||||
|
bypassed. Detecting the block needs a dedicated parser mirroring
|
||||||
|
`okf-check:pin`, because the generic `frontmatter()` flattens a nested block
|
||||||
|
to an empty list. Existing implemented blueprints carry no `muster` field, so
|
||||||
|
the rule never retro-flags them. The **ferry**-level tally is prose-enforced
|
||||||
|
at moor — `check_ferries` is shape-only — and the halt itself is prose in
|
||||||
|
weave/moor: okf-check cannot see live behaviour (decision
|
||||||
|
[017](../decisions/R-017-pin-drift-splits-by-visibility.md)).
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/weave/SKILL.md` — Process gains a **Muster** step between Seal
|
||||||
|
and Close-the-loop, guarded by `muster: true`; records `review-base` at
|
||||||
|
Frame when the mode is on.
|
||||||
|
- `skills/loop/moor/SKILL.md` — a **Muster** step before COLLAPSE, guarded by
|
||||||
|
the ferry's `muster: true`.
|
||||||
|
- `skills/loop/blueprint/blueprint-format.md` — documents `muster`,
|
||||||
|
`review-base`, and the `tally` block.
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — the tally-required-when-implemented
|
||||||
|
rule, via a `tally:` block parser modelled on the existing `pin()`.
|
||||||
|
- `skills/loop/write-okf/okf-layout.md` — the new frontmatter fields in the
|
||||||
|
blueprint and ferry-map contracts.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd skills/loop/write-okf && d=$(mktemp -d) && mkdir -p "$d/blueprints" &&
|
||||||
|
printf -- '---\nokf_version: "0.1"\n---\n- [a](blueprints/a.md)\n- [b](blueprints/b.md)\n' > "$d/index.md" &&
|
||||||
|
base='---\ntype: Blueprint\nstatus: implemented\ntraces-to: t\nmuster: true\n'
|
||||||
|
printf -- "${base}---\n# a\n" > "$d/blueprints/a.md" # muster+implemented, NO tally
|
||||||
|
printf -- "${base}tally:\n intent: x\n matches: yes\n---\n# b\n" > "$d/blueprints/b.md" # has tally
|
||||||
|
scripts/okf-check "$d"; echo "exit=$?"; scripts/okf-check ../../../OKF
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect: `blueprints/a.md` errors (muster + implemented, no `tally:`),
|
||||||
|
`blueprints/b.md` passes, and octobot's own `OKF/` still reports 0 errors.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **GitHub** — no push, branch, or PR flow; muster is a local terminal
|
||||||
|
review, hunk is a local viewer.
|
||||||
|
- **The agent review axes** — muster adds a human gate beside review+verify,
|
||||||
|
it does not replace or modify them.
|
||||||
|
- **Any default-mode behaviour** — mode-off weave/moor stay byte-identical.
|
||||||
|
- **Auto-fixing on `matches: no`** — the loop halts for the human; it does
|
||||||
|
not attempt the fix itself.
|
||||||
|
- **Promoting `muster` / `tally` to `CONTEXT.md`** — issue-local vocabulary
|
||||||
|
until it recurs (blueprint-format's rule); a follow-up promotes it.
|
||||||
|
- **A decision-register entry** for "does the loop have a human gate" —
|
||||||
|
graduate it separately if it earns the warrant test.
|
||||||
105
OKF/blueprints/B-011-add-blueprint-level-muster.md
Normal file
105
OKF/blueprints/B-011-add-blueprint-level-muster.md
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-24
|
||||||
|
sounded: 2026-07-24
|
||||||
|
---
|
||||||
|
|
||||||
|
# 011 — add blueprint-level muster, the opt-in human review gate in weave
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
Splits the blueprint-level half out of
|
||||||
|
[010](B-010-add-muster-the-human-review-gate.md) per growth-doctrine
|
||||||
|
[020](../decisions/R-020-every-page-has-a-growth-path.md); 010 carries the full
|
||||||
|
justification and sounding. The ferry-level half —
|
||||||
|
which needs the `ferry` skill as a seam 010 never declared — is
|
||||||
|
[012](B-012-add-ferry-level-muster.md).
|
||||||
|
|
||||||
|
The loop's review before it seals is all *agent* eyes; the human running it
|
||||||
|
does not read the diff after a weave. Muster is the forced human checkpoint,
|
||||||
|
opt-in, that halts weave after the seal and refuses to advance until the
|
||||||
|
human has read the whole change against intent and recorded a verdict.
|
||||||
|
|
||||||
|
Sieve — **Real**: the user's own testimony; the loop has no human gate today.
|
||||||
|
**Good**: a *did-this-do-what-I-intended* surface the four axes cannot
|
||||||
|
supply. **Minimal**: opt-in, so mode-off weave is byte-identical; reuses the
|
||||||
|
`[ -d .jj ]` split, the existing seal, and the blueprint page for storage; no
|
||||||
|
mandated dependency — hunk is a viewer, raw `jj diff` / `git diff` the fallback.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**Muster is a mode, off by default.** `muster: true` in a blueprint's
|
||||||
|
frontmatter opts in. Absent or false → weave behaves exactly as today: no
|
||||||
|
base, no halt, no tally.
|
||||||
|
|
||||||
|
**The base is a stored ref.** With muster on, weave records `review-base:
|
||||||
|
<changeid-or-sha>` on the blueprint at Frame — `@-` (jj) or `git rev-parse
|
||||||
|
HEAD` (git), the parent of where Build begins. The whole change is the range
|
||||||
|
`review-base..@`, unioning every atomic commit the seal produced.
|
||||||
|
|
||||||
|
**The gate halts weave** after Seal, before status flips to `implemented`. At
|
||||||
|
the halt the whole-change diff is piped into **hunk** — `hunk patch -` reads
|
||||||
|
a unified diff from stdin, VCS-agnostic (hunk README,
|
||||||
|
`github.com/modem-dev/hunk`). `[ -d .jj ]` selects only the producer:
|
||||||
|
|
||||||
|
- jj: `jj diff --from <review-base> --to @ --git | hunk patch -`
|
||||||
|
- git: `git diff <review-base>..HEAD | hunk patch -`
|
||||||
|
|
||||||
|
No hunk → the same range shown raw. The teeth are the tally, not the viewer.
|
||||||
|
|
||||||
|
**The teeth are the tally.** The human records a `tally:` block on the
|
||||||
|
blueprint:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
tally:
|
||||||
|
intent: <what the change was meant to do>
|
||||||
|
matches: yes | no
|
||||||
|
note: <optional>
|
||||||
|
```
|
||||||
|
|
||||||
|
`matches: yes` → weave resumes and flips to `implemented`. `matches: no` →
|
||||||
|
weave **stays halted** for a fix + re-muster; never a known miss.
|
||||||
|
|
||||||
|
**The tally is machine-enforced.** `okf-check` errors on any blueprint with
|
||||||
|
`muster: true` and `status: implemented` carrying no `tally:` block. The
|
||||||
|
block needs a parser mirroring `okf-check:pin`, because the generic
|
||||||
|
`frontmatter()` flattens a nested block to an empty list. Blueprints without
|
||||||
|
`muster` never retro-flag. The halt itself is prose in weave: okf-check
|
||||||
|
cannot see live behaviour (decision
|
||||||
|
[017](../decisions/R-017-pin-drift-splits-by-visibility.md)).
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/weave/SKILL.md` — a **Muster** step between Seal and
|
||||||
|
Close-the-loop, guarded by `muster: true`; `review-base` recorded at Frame.
|
||||||
|
- `skills/loop/blueprint/blueprint-format.md` — documents `muster`,
|
||||||
|
`review-base`, and the `tally` block.
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — the tally-required-when-implemented
|
||||||
|
rule, via a `tally:` block parser modelled on `pin()`.
|
||||||
|
- `skills/loop/write-okf/okf-layout.md` — the new fields in the blueprint
|
||||||
|
contract.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd skills/loop/write-okf && d=$(mktemp -d) && mkdir -p "$d/blueprints" &&
|
||||||
|
printf -- '---\nokf_version: "0.1"\n---\n- [a](blueprints/a.md)\n- [b](blueprints/b.md)\n' > "$d/index.md" &&
|
||||||
|
base='---\ntype: Blueprint\nstatus: implemented\ntraces-to: t\nmuster: true\n'
|
||||||
|
printf -- "${base}---\n# a\n" > "$d/blueprints/a.md" # muster+implemented, NO tally
|
||||||
|
printf -- "${base}tally:\n intent: x\n matches: yes\n---\n# b\n" > "$d/blueprints/b.md" # has tally
|
||||||
|
scripts/okf-check "$d"; echo "exit=$?"; scripts/okf-check ../../../OKF
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect: `blueprints/a.md` errors (muster + implemented, no `tally:`),
|
||||||
|
`blueprints/b.md` passes, and octobot's own `OKF/` still reports 0 errors.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **Ferry-level muster** — the moor halt and the ferry's `review-base` writer
|
||||||
|
are [012](B-012-add-ferry-level-muster.md).
|
||||||
|
- **GitHub** — no push, branch, or PR; muster is a local terminal review.
|
||||||
|
- **The agent review axes** — muster is a human gate beside them, not a change to them.
|
||||||
|
- **Any default-mode behaviour** — mode-off weave stays byte-identical.
|
||||||
|
- **Auto-fixing on `matches: no`** — weave halts for the human.
|
||||||
|
- **Promoting `muster` / `tally` to `CONTEXT.md`** — issue-local until it recurs.
|
||||||
77
OKF/blueprints/B-012-add-ferry-level-muster.md
Normal file
77
OKF/blueprints/B-012-add-ferry-level-muster.md
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-24
|
||||||
|
sounded: 2026-07-24
|
||||||
|
---
|
||||||
|
|
||||||
|
# 012 — add ferry-level muster, the human review gate at moor
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
The ferry-level half split out of
|
||||||
|
[010](B-010-add-muster-the-human-review-gate.md) per growth-doctrine
|
||||||
|
[020](../decisions/R-020-every-page-has-a-growth-path.md): 010 bundled the
|
||||||
|
weave gate and the moor gate, and the moor gate's `review-base` had no writer
|
||||||
|
among 010's declared seams. [011](B-011-add-blueprint-level-muster.md) shipped
|
||||||
|
the weave gate. Sounding (2026-07-24) resolved the base question — the
|
||||||
|
ferry's `review-base` is **derivable at moor**, so this needs no ferry-skill
|
||||||
|
seam and no weave coupling. 010 carries the full justification and sounding
|
||||||
|
of the muster concept; this ships the gate that gives a whole delivered ferry
|
||||||
|
one human read before moor finalises it.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**Opt in on the ferry's `MAP.md`** with `muster: true`. Absent → moor behaves
|
||||||
|
exactly as today.
|
||||||
|
|
||||||
|
**The base is derived at moor.** moor's GATHER SIGNAL already reads `jj log`
|
||||||
|
since the ferry started and the ferry's blueprint numbers; `review-base` =
|
||||||
|
the parent of the earliest commit citing one of those blueprints (weave seals
|
||||||
|
cite `blueprint NNN` — commit-atomic-jj principle 5). moor persists it as
|
||||||
|
`review-base:` on the collapsed page for the record. Nothing is stored at
|
||||||
|
generation.
|
||||||
|
|
||||||
|
**The gate is moor's first act.** moor halts **after GATHER SIGNAL (2, the
|
||||||
|
last read-only step), before CONSOLIDATE (3, its first mutation)**: review the
|
||||||
|
whole-ferry diff `review-base..@` — unioning every blueprint the ferry
|
||||||
|
spawned — via `hunk patch -` (raw diff fallback). The human records a `tally:`
|
||||||
|
block. `matches: no` **halts moor before it consolidates, graduates, or
|
||||||
|
collapses anything**; `matches: yes` → moor proceeds. This is the gate on the
|
||||||
|
arrival → moor transition: nothing in moor mutates until the human signs off.
|
||||||
|
|
||||||
|
**Prose-enforced.** `check_ferries` is shape-only, so `okf-check` does not
|
||||||
|
gate the ferry tally — halt and tally both live in moor's prose (decision
|
||||||
|
[017](../decisions/R-017-pin-drift-splits-by-visibility.md): okf-check enforces
|
||||||
|
only what it can see).
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/moor/SKILL.md` — a **Muster** step as moor's first act (after
|
||||||
|
GATHER SIGNAL, before CONSOLIDATE), guarded by the ferry's `muster: true`;
|
||||||
|
derives and persists `review-base`.
|
||||||
|
- `skills/loop/write-okf/okf-layout.md` — the `muster: true` (+ persisted
|
||||||
|
`review-base:`) fields in the ferry-map contract.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
To settle at lock: a scratch moored-ferry walkthrough — a `muster: true`
|
||||||
|
ferry halts moor before CONSOLIDATE and refuses to mutate on `matches: no`,
|
||||||
|
versus a mode-off ferry that moors unchanged. A prose gate resists a
|
||||||
|
one-command Verify; this is what lock must scrutinise. (`okf-check` has no
|
||||||
|
ferry-tally rule by design — see Contract.)
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **Everything 011 owns** — the weave gate, the `okf-check` tally rule, the
|
||||||
|
`tally:` block format.
|
||||||
|
- **A ferry-skill seam** — the base is derived at moor, not stamped at ferry
|
||||||
|
generation.
|
||||||
|
- **Clean isolation of interleaved work** — `review-base..@` is a contiguous
|
||||||
|
range, so any non-ferry commit woven between the ferry's blueprints shows in
|
||||||
|
the muster diff. Accept for solo / one-ferry-at-a-time; a per-commit union
|
||||||
|
is a larger design.
|
||||||
|
- **1-blueprint muster-ferries** — the ferry muster would re-review the single
|
||||||
|
blueprint's diff; use blueprint-level muster (011) there. Flag only
|
||||||
|
multi-blueprint ferries.
|
||||||
|
- **GitHub**, the agent axes, default-mode behaviour, auto-fix — as 011.
|
||||||
64
OKF/blueprints/B-013-split-moor-into-skill-and-reference.md
Normal file
64
OKF/blueprints/B-013-split-moor-into-skill-and-reference.md
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-24
|
||||||
|
sounded: 2026-07-24
|
||||||
|
---
|
||||||
|
|
||||||
|
# 013 — split moor into SKILL.md + REFERENCE.md to hold the line cap
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
weave of [012](B-012-add-ferry-level-muster.md) added moor's MUSTER step and
|
||||||
|
pushed `skills/loop/moor/SKILL.md` to 115 lines, over the repo's ≤110 skill
|
||||||
|
cap (CLAUDE.md §5). The cap's own remedy is a `REFERENCE.md` split, not
|
||||||
|
trimming load-bearing prose — the LEARNINGS note of 2026-07-24 records that a
|
||||||
|
step added to a near-cap skill must price the split. This is that split.
|
||||||
|
|
||||||
|
Sieve — **Real**: the file is over a live convention. **Good**: the process
|
||||||
|
spine stays the one page a moor run reads top-to-bottom; mechanical detail
|
||||||
|
moves where it stops crowding the steps. **Minimal**: one new file,
|
||||||
|
cross-linked, no behaviour change. Precedent:
|
||||||
|
`skills/engineering/write-readme/REFERENCE.md`.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
`skills/loop/moor/SKILL.md` ends **≤110 lines** and keeps the full process
|
||||||
|
spine — every numbered step (ORIENT … PRUNE + INDEX), its guard, and its
|
||||||
|
one-line intent readable without leaving the page. Mechanical detail a step
|
||||||
|
*invokes but need not inline* — the COLLAPSE `sealed:` / `review-base:` pin
|
||||||
|
block with its `jj log` template, the GRADUATE frontmatter-move specifics —
|
||||||
|
moves **verbatim** to a new `skills/loop/moor/REFERENCE.md`, each migrated
|
||||||
|
block linked from its step. No step, guardrail, or done-criterion is dropped;
|
||||||
|
moor's behaviour is byte-for-byte the same run. `REFERENCE.md` opens with no
|
||||||
|
frontmatter — it is skill support, not an OKF page.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/moor/SKILL.md` — each step keeps name + intent + guard; inlined
|
||||||
|
mechanical detail is replaced by a link into REFERENCE.md.
|
||||||
|
- `skills/loop/moor/REFERENCE.md` — new; holds the migrated detail.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
[ "$(wc -l < skills/loop/moor/SKILL.md)" -le 110 ] && echo "cap ok"
|
||||||
|
test -f skills/loop/moor/REFERENCE.md && echo "reference exists"
|
||||||
|
grep -q 'REFERENCE.md' skills/loop/moor/SKILL.md && echo "linked"
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect three lines: `cap ok`, `reference exists`, `linked`. A read confirms
|
||||||
|
every step name + guard survived in SKILL.md and the moved blocks are intact
|
||||||
|
in REFERENCE.md.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **Any change to moor's behaviour** — pure relocation; a moor run reads the
|
||||||
|
same instructions in the same order.
|
||||||
|
- **Splitting other over-cap skills** — one skill per blueprint.
|
||||||
|
- **The MUSTER step's semantics** — [012](B-012-add-ferry-level-muster.md) owns
|
||||||
|
those; this only relocates prose.
|
||||||
|
- **okf-check enforcing the skill cap** — it gates OKF pages, not skills; the
|
||||||
|
cap stays a prose convention (CLAUDE.md §5).
|
||||||
|
</content>
|
||||||
|
</invoke>
|
||||||
133
OKF/blueprints/B-014-unify-skill-sibling-file-naming.md
Normal file
133
OKF/blueprints/B-014-unify-skill-sibling-file-naming.md
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-30
|
||||||
|
sounded: 2026-07-30
|
||||||
|
cites:
|
||||||
|
- skills/productivity/conjure-a-skill/SKILL.md:topic-named siblings
|
||||||
|
- skills/loop/write-okf/scripts/okf-check:cite_resolves
|
||||||
|
---
|
||||||
|
|
||||||
|
# 014 — unify skill sibling-file naming on lowercase-kebab topic names
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
Two findings from the 2026-07-24 skills consistency review (F2, F3): sibling
|
||||||
|
offload files split between UPPERCASE (8 files) and lowercase-kebab (41), and
|
||||||
|
two skills offload to a generic `REFERENCE.md` while
|
||||||
|
[conjure-a-skill](../../skills/productivity/conjure-a-skill/SKILL.md) step 4
|
||||||
|
mandates **topic-named siblings**, "one topic per file, named for the topic".
|
||||||
|
|
||||||
|
The review framed F2 as the newest work violating the house rule. It is not —
|
||||||
|
`CLAUDE.md` §5 says *"Split into `REFERENCE.md` / `EXAMPLES.md` if it grows"*,
|
||||||
|
so `moor/REFERENCE.md` obeyed CLAUDE.md and broke conjure-a-skill. **The
|
||||||
|
defect is a contradiction between the two authorities, and renaming files
|
||||||
|
without resolving it leaves the next skill author to recreate the violation.**
|
||||||
|
This blueprint fixes the doctrine first, then the files.
|
||||||
|
|
||||||
|
Ordering: this precedes the line-cap fixes (F1, `call-charon` and
|
||||||
|
`commit-atomic-jj` both at 117) because those splits create new sibling files.
|
||||||
|
Settle the naming rule, then split under it, or the same files get touched
|
||||||
|
twice.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**One naming rule, stated once.** A skill's offload files are named for their
|
||||||
|
topic in lowercase-kebab (`deepening.md`, `anti-patterns.md`). `REFERENCE.md`,
|
||||||
|
`EXAMPLES.md`, and any generic or UPPERCASE sibling name are non-conforming.
|
||||||
|
`SKILL.md` keeps its uppercase name — it is the entry point, not an offload.
|
||||||
|
|
||||||
|
Two authorities state it, without conflict:
|
||||||
|
- `CLAUDE.md` §5 — the `≤ 110 lines` bullet stops prescribing
|
||||||
|
`REFERENCE.md` / `EXAMPLES.md` and points at topic-named siblings instead.
|
||||||
|
- `conjure-a-skill` step 4 — its existing topic-named-siblings sentence gains
|
||||||
|
the casing rule it currently omits.
|
||||||
|
|
||||||
|
**Eight files renamed**, content unchanged except where a link inside them
|
||||||
|
points at a renamed sibling:
|
||||||
|
|
||||||
|
| current | becomes |
|
||||||
|
|---|---|
|
||||||
|
| `engineering/design-codebase/DEEPENING.md` | `deepening.md` |
|
||||||
|
| `engineering/design-codebase/DESIGN-IT-TWICE.md` | `design-it-twice.md` |
|
||||||
|
| `engineering/model-domain/CONTEXT-FORMAT.md` | `context-format.md` |
|
||||||
|
| `engineering/model-domain/DECISION-FORMAT.md` | `decision-format.md` |
|
||||||
|
| `engineering/write-readme/REFERENCE.md` | `ecosystems.md` |
|
||||||
|
| `loop/moor/REFERENCE.md` | `graduate.md` + `collapse.md` |
|
||||||
|
| `productivity/conjure-a-skill/GLOSSARY.md` | `glossary.md` |
|
||||||
|
| `productivity/conjure-a-skill/PRINCIPLES.md` | `principles.md` |
|
||||||
|
|
||||||
|
`moor/REFERENCE.md` splits in two because it holds two topics (`#graduate`,
|
||||||
|
`#collapse`) and the rule is one topic per file; moor's two links lose their
|
||||||
|
anchors and address the files directly. Every other rename is one file to one
|
||||||
|
file, moved with `jj`-visible `mv` so history follows.
|
||||||
|
|
||||||
|
**Every inbound reference updated** — 33 references across 21 files: `skills/`,
|
||||||
|
`README.md`, `CLAUDE.md`, and four OKF `cites:` blocks (`OKF/CONTEXT.md`,
|
||||||
|
`OKF/ARCHITECTURE.md`, `OKF/decisions/004`, `OKF/decisions/012`). The `cites:`
|
||||||
|
updates are mandatory, not cosmetic:
|
||||||
|
`okf-check:cite_resolves` feeds `errors`, not `warnings`, so a stale cite fails
|
||||||
|
the run outright. `AGENTS.md` and every `scripts/` helper reference none of
|
||||||
|
these files — checked, not assumed.
|
||||||
|
|
||||||
|
**Historical blueprints are left alone.** Three name the old paths inside
|
||||||
|
`Contract` sections: `001` (`dropped`), `003` and `013` (both `implemented`).
|
||||||
|
Their Contracts are immutable per
|
||||||
|
[blueprint-format.md](../../skills/loop/blueprint/blueprint-format.md) — they
|
||||||
|
record what was true when sealed, and a record edited to match the present is
|
||||||
|
no longer a record. They keep their text, as does `OKF/index.md`'s 013 title.
|
||||||
|
|
||||||
|
**One upstream URL keeps its uppercase.**
|
||||||
|
`model-domain/context-format.md` closes with an attribution link to
|
||||||
|
`mattpocock/skills/.../CONTEXT-FORMAT.md`. That is a real path in another
|
||||||
|
repository, not a local reference, and is not rewritten.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `CLAUDE.md` §5 — the sibling-naming bullet.
|
||||||
|
- `skills/productivity/conjure-a-skill/SKILL.md` step 4 — the
|
||||||
|
progressive-disclosure bullet.
|
||||||
|
- The 8 renamed files and their 33 referring sites across 21 files.
|
||||||
|
- `OKF/` frontmatter `cites:` — 4 pages, read by
|
||||||
|
`skills/loop/write-okf/scripts/okf-check`.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```bash
|
||||||
|
old='REFERENCE\.md|GLOSSARY\.md|PRINCIPLES\.md|CONTEXT-FORMAT\.md|DECISION-FORMAT\.md|DEEPENING\.md|DESIGN-IT-TWICE\.md'
|
||||||
|
stale=$(grep -rnE "$old" --include='*.md' skills README.md CLAUDE.md OKF \
|
||||||
|
| grep -vE '^OKF/(blueprints/(001|003|013|014)|index\.md)' | grep -v 'https\?://')
|
||||||
|
upper=$(find skills -type f -name '*.md' ! -name 'SKILL.md' | grep -E '/[A-Z][A-Z0-9-]*\.md$')
|
||||||
|
[ -z "$stale" ] && [ -z "$upper" ] && python3 skills/loop/write-okf/scripts/okf-check OKF
|
||||||
|
```
|
||||||
|
|
||||||
|
Green when no old name survives outside the four exempted OKF files and the
|
||||||
|
upstream URL, no UPPERCASE sibling remains, and `okf-check OKF` exits 0 —
|
||||||
|
which also proves the four `cites:` still resolve. Run against the tree at
|
||||||
|
draft time it reports 33 stale references and 8 UPPERCASE siblings, so it is
|
||||||
|
red before the sweep and can only go green by completing it.
|
||||||
|
|
||||||
|
A bare dangling-link sweep is deliberately *not* the gate: `skills/` already
|
||||||
|
carries 8 illustrative link targets that do not resolve (`context/billing.md`,
|
||||||
|
`NNN-<slug>.md`, and similar template placeholders), so that check has a
|
||||||
|
non-zero baseline and cannot express pass/fail.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **F1** — the `call-charon` / `commit-atomic-jj` 117-line breaches. Separate
|
||||||
|
blueprint, deliberately after this one.
|
||||||
|
- **F9** — whether `model-domain/decision-format.md` and
|
||||||
|
`ferry/decision-format.md` are a genuine concept collision. Both are
|
||||||
|
`type: Decision` at different lifecycle stages: ferry's is the in-flight
|
||||||
|
`D-<n>` form, model-domain's the graduated `decisions/NNN` register form.
|
||||||
|
**The present casing accidentally disambiguates them, and this blueprint
|
||||||
|
removes that accident** — after the sweep the two basenames are identical
|
||||||
|
and only the directory separates them. That is accepted deliberately:
|
||||||
|
renaming either one for *meaning* is a vocabulary decision needing
|
||||||
|
model-domain's warrant test, and burying it in a 33-site mechanical diff
|
||||||
|
would defeat `review-blueprint`'s scope check. F9 inherits the coincidence.
|
||||||
|
- `write-okf/` — the folder's uppercase `OKF` is a skill name, not a sibling
|
||||||
|
file. Untouched.
|
||||||
|
- `*.template.md` files — already lowercase, and their `.template.` infix is
|
||||||
|
deliberate.
|
||||||
|
- Rewriting `OKF/blueprints/001`, `003`, or `013`, or `OKF/index.md`'s 013 title.
|
||||||
@ -0,0 +1,80 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: decision 021
|
||||||
|
sounded: 2026-07-30
|
||||||
|
---
|
||||||
|
|
||||||
|
# 015 — record session-check discharges on the blueprint
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
[021](../decisions/R-021-session-checks-discharge-on-the-blueprint.md)
|
||||||
|
rules where a check the sealing session cannot run is recorded. Nothing
|
||||||
|
implements it: 007's four session checks still carry their state as
|
||||||
|
prose in `ROADMAP.md` phase 9, where
|
||||||
|
[020](../decisions/R-020-every-page-has-a-growth-path.md)'s prune deletes
|
||||||
|
the one still pending the first time that page hits its cap, and
|
||||||
|
[blueprint-format.md](../../skills/loop/blueprint/blueprint-format.md)
|
||||||
|
still says a locked Verify is immutable with no exemption for a stamp.
|
||||||
|
|
||||||
|
Doctrine before files, per
|
||||||
|
[014](B-014-unify-skill-sibling-file-naming.md)'s Justification — the
|
||||||
|
exemption lands first, or the next author reads the immutability rule
|
||||||
|
and reverts the stamps as an illegal edit.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**The stamp.** A numbered session check in a blueprint's `## Verify`
|
||||||
|
carries exactly one state marker on its own continuation line:
|
||||||
|
|
||||||
|
- `⏳ pending` — written when the blueprint is sealed, stands until
|
||||||
|
discharged.
|
||||||
|
- `✅ <YYYY-MM-DD> (<what discharged it> — <what was observed>)` —
|
||||||
|
replaces the pending marker. Both fields are required: a stamp with a
|
||||||
|
date and no observation records nothing.
|
||||||
|
|
||||||
|
**The exemption.** `blueprint-format.md`'s immutability rule binds the
|
||||||
|
*text* of a check, which may still only be superseded. Replacing a
|
||||||
|
check's state marker is not an edit to the check.
|
||||||
|
|
||||||
|
**ROADMAP's share.** A phase line names its blueprint and stops. No
|
||||||
|
discharge prose, no pending clause, no verification evidence — that is
|
||||||
|
already ROADMAP's stated contract (`ROADMAP.md:38-41`: how each phase
|
||||||
|
verified is in jj history).
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/blueprint/blueprint-format.md` — §Rules, the
|
||||||
|
immutability bullet gains the stamp exemption.
|
||||||
|
- `OKF/blueprints/B-007-add-sound.md` — §Verify, the four numbered
|
||||||
|
session checks gain markers.
|
||||||
|
- `OKF/ROADMAP.md` — phase 9's `✅ verified` line collapses.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
b=OKF/blueprints/B-007-add-sound.md
|
||||||
|
printf 'stamped: %s pending: %s\n' \
|
||||||
|
"$(grep -c '✅ 20' "$b")" "$(grep -c '⏳ pending' "$b")"
|
||||||
|
printf 'roadmap-stale: %s roadmap-verified: %s\n' \
|
||||||
|
"$(grep -cE 'discharged|ride the next sounding|script leg' OKF/ROADMAP.md)" \
|
||||||
|
"$(grep -c '✅ verified' OKF/ROADMAP.md)"
|
||||||
|
printf 'exemption: %s\n' \
|
||||||
|
"$(grep -c 'stamp' skills/loop/blueprint/blueprint-format.md)"
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect `stamped: 3` `pending: 1`, `roadmap-stale: 0`
|
||||||
|
`roadmap-verified: 1`, `exemption: 1`, then `0 error(s), 0 warning(s)`.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **F1 + F4** — the 117-line `call-charon` / `commit-atomic-jj` split and
|
||||||
|
the commit-variant length balance. Pushed to blueprint 016.
|
||||||
|
- **A terminal `verified` status** and an `okf-check` rule erroring on
|
||||||
|
`⏳ pending` under `implemented` — 021 rejected both as premature.
|
||||||
|
- **Discharging check 3 itself.** It needs a self-fired sound run; this
|
||||||
|
blueprint records its state, it does not run it.
|
||||||
|
- **Retro-stamping other blueprints** — 007 is the only one carrying
|
||||||
|
session checks.
|
||||||
@ -0,0 +1,146 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-30
|
||||||
|
sounded: 2026-07-30
|
||||||
|
cites:
|
||||||
|
- skills/loop/call-charon/crossing-format.md:Isolation (per mode
|
||||||
|
- skills/loop/call-charon/crossing-format.md:Reviewer brief
|
||||||
|
- skills/productivity/commit-atomic-jj/anti-patterns.md:Backgrounding a
|
||||||
|
- skills/productivity/resolve-conflicts-git/SKILL.md:git specifics worth knowing
|
||||||
|
- skills/productivity/conjure-a-skill/SKILL.md:exceed 110 lines
|
||||||
|
- skills/productivity/conjure-a-skill/principles.md:topic-named siblings
|
||||||
|
- OKF/decisions/R-020-every-page-has-a-growth-path.md:twelve pages
|
||||||
|
- CLAUDE.md:≤ 110 lines
|
||||||
|
---
|
||||||
|
|
||||||
|
# 016 — pull two skills under the line cap and level the commit twins
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
The 2026-07-24 skills review (`~/skills-review-2026-07-24.md`, outside
|
||||||
|
the repo) left F1 and F4 untriaged; they batch as one pass.
|
||||||
|
|
||||||
|
**F1** — `call-charon/SKILL.md` and `commit-atomic-jj/SKILL.md` both
|
||||||
|
measure 117 lines against CLAUDE.md §5's ≤110 cap. Same defect class
|
||||||
|
[013](B-013-split-moor-into-skill-and-reference.md) fixed for `moor`.
|
||||||
|
|
||||||
|
**F4** — the `commit-atomic-git` / `-jj` pair is asymmetric: git has no
|
||||||
|
`## When to use` body anchor and a shorter skeleton, while
|
||||||
|
`resolve-conflicts-git` / `-jj` — the pair the review names as the
|
||||||
|
template — carry identical skeletons with mode-named slots. Both commit
|
||||||
|
variants are model-invoked (neither carries
|
||||||
|
`disable-model-invocation`), and `## When to use` is the house skeleton
|
||||||
|
`conjure-a-skill` hands every new skill
|
||||||
|
(`conjure-a-skill/SKILL.md:82`).
|
||||||
|
|
||||||
|
The two findings are coupled: any cut that shortens the jj variant's
|
||||||
|
`## Principles` without the same cut on git *creates* the asymmetry F4
|
||||||
|
asks to remove. Fixing either alone makes the other worse.
|
||||||
|
|
||||||
|
Both offenders' overage is **restatement of their own siblings**, not
|
||||||
|
irreducible doctrine, so this is a dedup, not a split:
|
||||||
|
|
||||||
|
- `call-charon/SKILL.md` step 3 restates
|
||||||
|
[crossing-format.md](../../skills/loop/call-charon/crossing-format.md)
|
||||||
|
§Isolation; step 4 restates its §Reviewer-brief rationale.
|
||||||
|
- `commit-atomic-jj/SKILL.md` §Workflow's tail restates
|
||||||
|
[anti-patterns.md](../../skills/productivity/commit-atomic-jj/anti-patterns.md)
|
||||||
|
§*Skipping `jj new`*, §*Backgrounding a `jj` mutation*, and
|
||||||
|
§*Letting a `jj` op spawn an editor headlessly* — and cites two of
|
||||||
|
them while restating them.
|
||||||
|
|
||||||
|
Per [012](B-012-add-ferry-level-muster.md)'s LEARNINGS entry, a blueprint
|
||||||
|
touching a near-cap skill prices the split into its scope: `commit-atomic-git`
|
||||||
|
gains ~7 lines and sits at ~104, needing no split; if dedup alone leaves
|
||||||
|
either offender over cap, this blueprint authorises a further offload into
|
||||||
|
that skill's **existing** sibling.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**The cap.** All three files measure ≤110 by `wc -l`.
|
||||||
|
|
||||||
|
**Nothing is deleted, only relocated.** Every line leaving a `SKILL.md`
|
||||||
|
is already stated in that skill's existing sibling, or moves there.
|
||||||
|
No new sibling file, and no new duplication *between* the twins — the
|
||||||
|
overage is paid from restatement, never from doctrine.
|
||||||
|
|
||||||
|
**Positive statement, not prohibition.** `call-charon/SKILL.md` names no
|
||||||
|
VCS isolation mechanics — it names the mode and points at
|
||||||
|
`crossing-format.md` §Isolation, which owns them.
|
||||||
|
([014](B-014-unify-skill-sibling-file-naming.md)'s LEARNINGS entry: a
|
||||||
|
Verify that greps a banned string must not collide with prose that has
|
||||||
|
to say it.)
|
||||||
|
|
||||||
|
**The twins are parallel.** `commit-atomic-git/SKILL.md` and
|
||||||
|
`commit-atomic-jj/SKILL.md` carry the identical `^## ` heading sequence:
|
||||||
|
`When to use`, `Principles`, `Workflow`, `Anti-patterns`, `See also`.
|
||||||
|
`###` sub-headings and `## Workflow` bodies stay VCS-specific — the
|
||||||
|
`resolve-conflicts` pair keeps mode-named slots (`## jj specifics` /
|
||||||
|
`## git specifics`) and is still the parity template.
|
||||||
|
|
||||||
|
**The git trigger anchor.** `commit-atomic-git` gains a `## When to use`
|
||||||
|
above `## Principles`, listing its own triggers. Parity is reached by
|
||||||
|
**adding** to git, never by deleting jj's — the `resolve-conflicts` pair
|
||||||
|
is parallel *without* a `## When to use`, so subtraction would also
|
||||||
|
level the twins, and it is the wrong direction: 31 of 41 skills carry
|
||||||
|
the section, and `conjure-a-skill` hands it to every new skill.
|
||||||
|
|
||||||
|
**Back-references resolve.** `commit-atomic-jj/anti-patterns.md`'s two
|
||||||
|
`See SKILL.md …` pointers currently name `§5` (the section is §6) and
|
||||||
|
`"Workflow" step 5` (Workflow has four steps). Both are already stale
|
||||||
|
and both point into text this blueprint edits; they name existing text
|
||||||
|
when it lands.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/call-charon/SKILL.md` — §Process steps 3 (DISPATCH) and
|
||||||
|
4 (REVIEW FLOTILLA).
|
||||||
|
- `skills/productivity/commit-atomic-jj/SKILL.md` — §Workflow tail and
|
||||||
|
§Anti-patterns pointer.
|
||||||
|
- `skills/productivity/commit-atomic-git/SKILL.md` — new §When to use.
|
||||||
|
- `skills/productivity/commit-atomic-jj/anti-patterns.md` — the two
|
||||||
|
`See SKILL.md …` back-references.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
for f in skills/loop/call-charon/SKILL.md \
|
||||||
|
skills/productivity/commit-atomic-jj/SKILL.md \
|
||||||
|
skills/productivity/commit-atomic-git/SKILL.md; do
|
||||||
|
printf '%s %s\n' "$(wc -l < "$f")" "${f#skills/}"
|
||||||
|
done
|
||||||
|
diff <(grep '^## ' skills/productivity/commit-atomic-git/SKILL.md) \
|
||||||
|
<(grep '^## ' skills/productivity/commit-atomic-jj/SKILL.md) \
|
||||||
|
>/dev/null && echo 'twins: parallel' || echo 'twins: DIVERGED'
|
||||||
|
printf 'charon-mechanics: %s stale-backrefs: %s\n' \
|
||||||
|
"$(grep -cE 'workspace add|isolation: worktree' skills/loop/call-charon/SKILL.md)" \
|
||||||
|
"$(grep -cE 'SKILL\.md §5|Workflow.*step 5' \
|
||||||
|
skills/productivity/commit-atomic-jj/anti-patterns.md)"
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect all three line counts ≤ 110, then `twins: parallel`,
|
||||||
|
`charon-mechanics: 0 stale-backrefs: 0`, then
|
||||||
|
`0 error(s), 0 warning(s)`.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **A line-cap lint.** `skills/` already has both halves of
|
||||||
|
[020](../decisions/R-020-every-page-has-a-growth-path.md) *except* the
|
||||||
|
enforcement: the named move exists (topic-named siblings,
|
||||||
|
`conjure-a-skill/principles.md`) and so does the prohibition
|
||||||
|
(`conjure-a-skill/SKILL.md`: never exceed 110 lines) — but nothing
|
||||||
|
errors, which is exactly the decay 020 measured (twelve over-cap
|
||||||
|
pages while the one mechanical rule held). 013 → 016 is the second
|
||||||
|
hand-fix. The lint is the permanent answer; it is not F1, and it
|
||||||
|
lints `skills/` where `okf-check` lints `OKF/` — its own blueprint.
|
||||||
|
- **The remaining findings** — F5 (hand-copied spine string), F6, F7
|
||||||
|
(grill-family), F8 (heading dialects), F9 (two `decision-format.md`),
|
||||||
|
F11 (ADR vocabulary). Separately triaged.
|
||||||
|
- **Rewriting either sibling.** `crossing-format.md` and
|
||||||
|
`anti-patterns.md` receive relocated lines only; their existing
|
||||||
|
sections are not restructured.
|
||||||
|
- **`commit-atomic-git`'s inline `## Anti-patterns`.** It stays inline —
|
||||||
|
git is under cap and has no sibling; forcing one to mirror jj would
|
||||||
|
add the duplication this blueprint refuses.
|
||||||
148
OKF/blueprints/B-017-add-a-line-cap-lint-over-skills.md
Normal file
148
OKF/blueprints/B-017-add-a-line-cap-lint-over-skills.md
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-30
|
||||||
|
sounded: 2026-07-30
|
||||||
|
cites:
|
||||||
|
- OKF/CONTEXT.md:House cap
|
||||||
|
- OKF/CONTEXT.md:optional topic-named siblings
|
||||||
|
- OKF/decisions/R-020-every-page-has-a-growth-path.md:twelve pages
|
||||||
|
- OKF/blueprints/B-016-pull-two-skills-under-cap-and-level-commit-twins.md:A line-cap lint
|
||||||
|
- skills/productivity/conjure-a-skill/SKILL.md:exceed 110 lines
|
||||||
|
- skills/productivity/conjure-a-skill/SKILL.md:≤ 110 lines** — octobot's house cap
|
||||||
|
- skills/loop/write-okf/scripts/okf-check:CAP = 110
|
||||||
|
- skills/loop/write-okf/scripts/okf-check:a check that cannot fail
|
||||||
|
- skills/loop/write-okf/SKILL.md:output pasted
|
||||||
|
- skills/loop/write-okf/split-page.md:errors when a page passes its cap
|
||||||
|
- CLAUDE.md:≤ 110 lines
|
||||||
|
---
|
||||||
|
|
||||||
|
# 017 — add a line-cap lint over skills/
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
[020](../decisions/R-020-every-page-has-a-growth-path.md) made the cap
|
||||||
|
enforceable by naming one legal move per page kind, and `okf-check` errors
|
||||||
|
at cap+1 across `OKF/`. `skills/` has both halves of 020 *except* the
|
||||||
|
enforcement: the named move exists (topic-named siblings,
|
||||||
|
`conjure-a-skill/principles.md`) and so does the prohibition
|
||||||
|
(`conjure-a-skill/SKILL.md`: never exceed 110 lines) — but nothing errors.
|
||||||
|
That is precisely the decay 020 measured: twelve pages over cap while the
|
||||||
|
one *mechanical* rule held without exception.
|
||||||
|
|
||||||
|
Two hand-fixes have already been spent on it —
|
||||||
|
[013](B-013-split-moor-into-skill-and-reference.md) split `moor`,
|
||||||
|
[016](B-016-pull-two-skills-under-cap-and-level-commit-twins.md) deduped
|
||||||
|
`call-charon` and `commit-atomic-jj` — and 016 §Out-of-scope reserved this
|
||||||
|
blueprint, stating the warrant. The lint is the permanent answer.
|
||||||
|
|
||||||
|
**Why a sibling script, not an extension of `okf-check`.** The two trees
|
||||||
|
share the integer 110 and nothing else. `okf-check`'s loop is
|
||||||
|
OKF-page-shaped — `reachable()` from `index.md`, the warrant contract
|
||||||
|
(`purpose:`/`answers:`/`cites:`), `check_ferries`, `check_register`, the
|
||||||
|
`sealed:`/`tally:` grabs. None applies to a skill directory, whose rules
|
||||||
|
are disjoint (a folder-matched `name:`, a 1024-char `description:`,
|
||||||
|
lowercase-kebab siblings). Threading a tree-kind flag through a 275-line
|
||||||
|
validator to reuse a two-line comparison fails
|
||||||
|
[sieve](../../skills/engineering/sieve/SKILL.md)'s Minimal test.
|
||||||
|
|
||||||
|
**Why the cap alone.** Audited today, the other CLAUDE.md §5 conventions
|
||||||
|
are clean — 41 of 41 skills match `name:` to folder and hold `description:`
|
||||||
|
under 1024 chars. They show no measured decay, so checks for them are
|
||||||
|
speculative and fail Real; and a filename rule would be red on arrival over
|
||||||
|
two dot-separated template siblings, a naming question, not a cap one.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**A script at `skills/productivity/conjure-a-skill/scripts/skill-check`,
|
||||||
|
taking a skills root: `skill-check <skills-dir>`.** It mirrors
|
||||||
|
`okf-check <okf-dir>` — same argv shape, same `WARN `/`ERROR ` line
|
||||||
|
prefixes, same closing `N error(s), M warning(s)` tally, same exit codes
|
||||||
|
(1 on any error, 0 otherwise, 2 on usage). It is executable with a
|
||||||
|
`#!/usr/bin/env python3` shebang, as both existing skill scripts are, and
|
||||||
|
lives in `conjure-a-skill` because that skill owns the cap rule and the
|
||||||
|
never-exceed guardrail.
|
||||||
|
|
||||||
|
**It walks `*/*/SKILL.md` under the given root** — the
|
||||||
|
`skills/<category>/<name>/` layout CONTEXT.md's *Skill* entry fixes, where
|
||||||
|
all 41 sit — and counts lines as `wc -l` does. Nothing else in a skill
|
||||||
|
directory is read: not siblings, not frontmatter, not `scripts/`.
|
||||||
|
|
||||||
|
**Two thresholds, per the 2026-07-30 decision:**
|
||||||
|
|
||||||
|
- **`> 110` is an ERROR.** CONTEXT.md's **house cap**, stated identically
|
||||||
|
in CLAUDE.md §5 and `conjure-a-skill/SKILL.md`. Matches `okf-check`'s
|
||||||
|
`> cap`, so a file at exactly 110 is legal in both trees.
|
||||||
|
- **`> 100` is a WARNING** — the headroom band. A skill in 101–110 is
|
||||||
|
legal but has nowhere to grow; the warning is the notice that the next
|
||||||
|
edit needs a sibling, not more lines. It names the file, its count, and
|
||||||
|
its remaining headroom.
|
||||||
|
|
||||||
|
**The cap is an error, not a warning, because a legal move always exists**
|
||||||
|
— 020's rule, and the same reason `okf-check` errors rather than warns
|
||||||
|
(`split-page.md`: errors when a page passes its cap). For a skill the move
|
||||||
|
is a topic-named sibling.
|
||||||
|
|
||||||
|
**Both legs must be able to fire.** A validator whose error path is
|
||||||
|
unreachable is not a validator — `okf-check`'s own docstring makes the
|
||||||
|
point (*a check that cannot fail is not a check*). Verify therefore
|
||||||
|
exercises the error leg against a synthetic over-cap skill, not only the
|
||||||
|
green path over the real tree.
|
||||||
|
|
||||||
|
**The lint has one invocation obligation.** `conjure-a-skill`'s
|
||||||
|
done-criteria list currently asserts the cap in prose (`SKILL.md` is ≤ 110
|
||||||
|
lines); that line becomes the script call, matching how
|
||||||
|
`write-okf/SKILL.md` obliges `okf-check` to be run and its output pasted.
|
||||||
|
One line replaces one line — `conjure-a-skill` sits at 105 and stays there.
|
||||||
|
|
||||||
|
**Today's tree is green.** Zero errors; nine of 41 skills sit in the
|
||||||
|
warning band, `write-okf` and `bdd` at the cap itself. The lint changes no
|
||||||
|
skill's content.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/productivity/conjure-a-skill/scripts/skill-check` — new; the
|
||||||
|
CLI entry point (`skill-check <skills-dir>`).
|
||||||
|
- `skills/productivity/conjure-a-skill/SKILL.md` — the done-criteria line
|
||||||
|
asserting the cap becomes the script invocation.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
LINT=skills/productivity/conjure-a-skill/scripts/skill-check
|
||||||
|
"$LINT" skills/; echo "exit: $?"
|
||||||
|
tmp=$(mktemp -d); mkdir -p "$tmp/category/over-cap"
|
||||||
|
{ printf -- '---\nname: over-cap\n---\n'; seq 200; } > "$tmp/category/over-cap/SKILL.md"
|
||||||
|
"$LINT" "$tmp"; echo "exit: $?"
|
||||||
|
rm -rf "$tmp"
|
||||||
|
grep -c 'skill-check' skills/productivity/conjure-a-skill/SKILL.md
|
||||||
|
wc -l < skills/productivity/conjure-a-skill/SKILL.md
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect, in order: `0 error(s), 9 warning(s)` then `exit: 0` over the real
|
||||||
|
tree, with one WARN line per file in the 101–110 band; then
|
||||||
|
`1 error(s), 0 warning(s)` and `exit: 1` on the synthetic over-cap skill,
|
||||||
|
proving the error leg fires; then `1` and `105`; then
|
||||||
|
`0 error(s), 0 warning(s)`.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **Lowering the cap to 100.** Weighed and rejected for this blueprint on
|
||||||
|
2026-07-30: it would turn nine legal skills red on arrival and require
|
||||||
|
rewriting the 110 in CLAUDE.md §5 and `conjure-a-skill` — a shortening
|
||||||
|
pass plus a doctrine change, past what one weave run verifies. If wanted,
|
||||||
|
it is its own blueprint on top of this one.
|
||||||
|
- **Every other CLAUDE.md §5 convention** — folder/`name:` agreement, the
|
||||||
|
1024-char `description:`, lowercase-kebab siblings, `SKILL.md` as the sole
|
||||||
|
uppercase file, `scripts/` holding only deterministic helpers. All clean
|
||||||
|
today; see §Justification. A later blueprint may add them to this script.
|
||||||
|
- **Shortening any skill.** Nothing is over 110, so the lint lands green;
|
||||||
|
it is enforcement, not a fix. The nine warnings are notices.
|
||||||
|
- **Wiring beyond the one done-criterion** — no justfile, no git hook, no
|
||||||
|
CI. This repo has none, and `okf-check` is obliged by prose alone.
|
||||||
|
- **Touching `okf-check` or `OKF/`.** Unchanged; the duplicated `110`
|
||||||
|
enforces, for a second tree, a cap already stated in four places.
|
||||||
|
- **The `examples.md` §5 → §6 stale cite** left open by 016. A reference
|
||||||
|
defect, not a cap defect; it folds into whatever next edits
|
||||||
|
`commit-atomic-jj/`.
|
||||||
147
OKF/blueprints/B-018-own-the-loop-shape-in-flow-1.md
Normal file
147
OKF/blueprints/B-018-own-the-loop-shape-in-flow-1.md
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: ROADMAP.md phase 11
|
||||||
|
sounded: 2026-07-30
|
||||||
|
cites:
|
||||||
|
- OKF/ROADMAP.md:the loop's shape stops being a hand-copied string
|
||||||
|
- OKF/ARCHITECTURE.md:1. **The loop**
|
||||||
|
- OKF/CONTEXT.md:**The loop**:
|
||||||
|
- README.md:### loop — the metaharness spine
|
||||||
|
- CLAUDE.md:**The loop.**
|
||||||
|
- skills/loop/steer/SKILL.md:## The loop (the metaharness spine)
|
||||||
|
- skills/loop/ferry/SKILL.md:more than one agent
|
||||||
|
- skills/loop/call-charon/SKILL.md:implementation spans multiple blueprints
|
||||||
|
- skills/loop/moor/SKILL.md:a ferry-traced chain
|
||||||
|
- skills/loop/rig/SKILL.md:Close the loop
|
||||||
|
- skills/loop/blueprint/blueprint-format.md:traces-to:
|
||||||
|
- skills/loop/chart/SKILL.md:Owns `OKF/ROADMAP.md`
|
||||||
|
---
|
||||||
|
|
||||||
|
# 018 — own the loop's shape in ARCHITECTURE flow 1
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
[ROADMAP.md](../ROADMAP.md) phase 11 states the defect: the spine is
|
||||||
|
written out in six sites (§Seams touched) in three divergent forms, and a
|
||||||
|
flat arrow string cannot state cadence. Three end at `commit-atomic-jj`,
|
||||||
|
three continue to `moor` — what hand-copying produces, not a decision.
|
||||||
|
|
||||||
|
The cost is not cosmetic. The string asserts a straight line; four cited
|
||||||
|
facts contradict it. `write-okf` fires on scaffold or staleness, not per
|
||||||
|
request. `ferry` is for work more than one agent session can hold, so it
|
||||||
|
*branches* off blueprint rather than following it. `call-charon` is the
|
||||||
|
multi-blueprint form of weave, not a tier above it. `moor` closes only a
|
||||||
|
ferry-traced chain — a lone blueprint ends at weave's close-the-loop step.
|
||||||
|
|
||||||
|
**Why ARCHITECTURE.md owns it.** The shape is a flow — where control goes
|
||||||
|
and under what condition — which is that page's stated `purpose:`, and
|
||||||
|
`index.md` already bills it as carrying "the loop". A glossary that also
|
||||||
|
fixes an ordering is what let six sites drift.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**The canonical rendering** — this exact block, fenced, no other content
|
||||||
|
inside the fence:
|
||||||
|
|
||||||
|
```
|
||||||
|
substrate (rare) write-okf — scaffold, or refresh when stale
|
||||||
|
↓
|
||||||
|
per request architect — a phase only for an arc over >1 blueprint
|
||||||
|
↓
|
||||||
|
know what to do?
|
||||||
|
┌──── yes ────┴──── no ────┐
|
||||||
|
blueprint → sound ferry — decisions + blocking edges,
|
||||||
|
→ weave resolve one per sitting
|
||||||
|
(weave closes it) ↓
|
||||||
|
blueprint per cleared decision → sound
|
||||||
|
↓
|
||||||
|
1 left → weave
|
||||||
|
N left → call-charon (agent per blueprint)
|
||||||
|
↓
|
||||||
|
moor
|
||||||
|
|
||||||
|
weave = bdd → 4-axis review → Verify → commit-atomic-jj → close (OKF refresh)
|
||||||
|
```
|
||||||
|
|
||||||
|
The legend is part of the block, not commentary: it carries the OKF-refresh
|
||||||
|
edge `README.md` draws as a return arrow — the shape's only cycle.
|
||||||
|
|
||||||
|
**One owner.** `OKF/ARCHITECTURE.md` §Main flows item 1 carries it, keeping
|
||||||
|
its `1. **The loop**` label and its `skills/loop/` pointer; the item's
|
||||||
|
present three-line prose spine is replaced by the block.
|
||||||
|
|
||||||
|
**Two copies, byte-for-byte.** `README.md` §loop and `steer` §The loop each
|
||||||
|
carry the block verbatim — entry surfaces a reader hits before `OKF/`,
|
||||||
|
where a pointer costs a hop for the one thing they came for. `steer`'s loop
|
||||||
|
*table* stays; the block replaces only its one-line spine.
|
||||||
|
|
||||||
|
**Four pointers.** `OKF/CONTEXT.md`'s *The loop* entry, `OKF/ROADMAP.md`'s
|
||||||
|
opening paragraph and `CLAUDE.md`'s loop paragraph stop restating the
|
||||||
|
stages and reference flow 1 instead; `CONTEXT.md` keeps the canonical name
|
||||||
|
and its `_Avoid_` line, a glossary's job. That also settles the interim
|
||||||
|
`→ moor` that entry was owed — a pointer cannot be stale about an ordering
|
||||||
|
it does not carry. `ROADMAP.md:33` is already a pointer but aimed at a copy
|
||||||
|
(*loop diagram in `README.md`*); it is re-aimed at flow 1.
|
||||||
|
|
||||||
|
**Crossing architect's file, deliberately.** `architect/SKILL.md:9` owns
|
||||||
|
`OKF/ROADMAP.md` — meaning the *plan*: phases, locked decisions, verify
|
||||||
|
steps, supersede-never-delete. Both lines touched are prose about the
|
||||||
|
loop's shape, and weave step 7 already routes a blueprint back into that
|
||||||
|
file. No phase, decision or verify step moves.
|
||||||
|
|
||||||
|
**One adjacent claim, same file, same defect.** `steer/SKILL.md:8` glosses
|
||||||
|
user-invoked as *"zero context load"*. It is not — naming a skill loads its
|
||||||
|
body. The flag buys routing control: a skill fires when named, not when a
|
||||||
|
description matches. The parenthetical is replaced with that.
|
||||||
|
|
||||||
|
**After the change no file outside this blueprint renders the flat spine**
|
||||||
|
— the state the lint will later hold, checked today by grep.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `OKF/ARCHITECTURE.md` — §Main flows item 1; the sole owner.
|
||||||
|
- `README.md` — §loop, the fenced diagram block.
|
||||||
|
- `skills/loop/steer/SKILL.md` — §The loop, the fenced spine block; and
|
||||||
|
the intro's `zero context load` parenthetical.
|
||||||
|
- `OKF/CONTEXT.md` — the *The loop* entry body.
|
||||||
|
- `OKF/ROADMAP.md` — the opening paragraph's parenthetical spine, and
|
||||||
|
§Architecture's `loop diagram in README.md` pointer.
|
||||||
|
- `CLAUDE.md` — the loop paragraph's backticked spine.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
CANON=$(sed -n '/^substrate (rare)/,/^weave = bdd/p' OKF/ARCHITECTURE.md)
|
||||||
|
[ -n "$CANON" ] && echo "owner: $(printf '%s\n' "$CANON" | wc -l) lines"
|
||||||
|
for f in README.md skills/loop/steer/SKILL.md; do
|
||||||
|
[ "$(sed -n '/^substrate (rare)/,/^weave = bdd/p' "$f")" = "$CANON" ] \
|
||||||
|
&& echo "match $f" || echo "DIFFER $f"
|
||||||
|
done
|
||||||
|
grep -rln 'architect → blueprint' --include='*.md' --exclude='018-*' .
|
||||||
|
echo "strays exit: $?"
|
||||||
|
grep -rn 'zero context load\|loop diagram in' --include='*.md' --exclude='018-*' .
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-check skills/ | tail -1
|
||||||
|
wc -l OKF/ARCHITECTURE.md OKF/CONTEXT.md skills/loop/steer/SKILL.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect, in order: `owner: 17 lines`; `match` for both copies, no `DIFFER`;
|
||||||
|
nothing from either grep and `strays exit: 1`, retiring the flat form and
|
||||||
|
both folded-in claims; `0 error(s), 0 warning(s)`; then
|
||||||
|
`0 error(s), 9 warning(s)` — today's nine, `steer` not among them.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **The lint.** Phase 11 pairs this with a script so the copies cannot
|
||||||
|
diverge again; that is blueprint 019, and phase 11 does not verify until
|
||||||
|
it lands. Its three open questions are in the 2026-07-30 handoff.
|
||||||
|
- **Phase 10.** F5's ownership question is what this blueprint answers; the
|
||||||
|
`steer:8` line is F6-shaped, taken because the file is already open. F6
|
||||||
|
proper, F7 and F8 stay phase 10, untouched.
|
||||||
|
- **Any change to the loop itself.** No skill's triggers, process or
|
||||||
|
frontmatter changes — including `disable-model-invocation`, weighed and
|
||||||
|
kept this session. Every branch drawn traces to its owning skill.
|
||||||
|
- **`OKF/ARCHITECTURE.md`'s module-map line** — found stale while sounding:
|
||||||
|
blueprint, ferry, weave and steer *land per* `ROADMAP.md`; all four
|
||||||
|
shipped. Different section. Untriaged; folds into the next module-map edit.
|
||||||
148
OKF/blueprints/B-019-add-a-render-lint-over-the-loop-shape.md
Normal file
148
OKF/blueprints/B-019-add-a-render-lint-over-the-loop-shape.md
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: superseded-by-026
|
||||||
|
traces-to: ROADMAP.md phase 11
|
||||||
|
sounded: 2026-07-30
|
||||||
|
cites:
|
||||||
|
- OKF/blueprints/B-018-own-the-loop-shape-in-flow-1.md:**The lint.**
|
||||||
|
- OKF/blueprints/B-017-add-a-line-cap-lint-over-skills.md:Why a sibling script
|
||||||
|
- OKF/decisions/R-016-one-okf-check-validator.md:One `okf-check` validator
|
||||||
|
- OKF/decisions/R-013-roadmap-is-a-plan.md:plan, not an archive
|
||||||
|
- OKF/ARCHITECTURE.md:substrate (rare)
|
||||||
|
- README.md:### loop — the metaharness spine
|
||||||
|
- skills/loop/steer/SKILL.md:## The loop
|
||||||
|
- skills/loop/write-okf/scripts/okf-check:a check that cannot fail
|
||||||
|
- skills/loop/write-okf/SKILL.md:run and output pasted
|
||||||
|
- skills/productivity/conjure-a-skill/scripts/skill-check:usage: skill-check
|
||||||
|
- OKF/learnings/index.md:Append-only
|
||||||
|
---
|
||||||
|
|
||||||
|
# 019 — add a render lint over the loop's shape
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
[ROADMAP.md](../ROADMAP.md) phase 11 pairs the ownership move with a lint
|
||||||
|
*"so the copies cannot diverge again"*, and its Verify names the mechanism:
|
||||||
|
**checked by script**. [018](B-018-own-the-loop-shape-in-flow-1.md) landed the
|
||||||
|
first half and reserved this one; phase 11 does not verify until it lands.
|
||||||
|
The warrant is not speculative — divergence already happened once, six sites
|
||||||
|
in three forms. What holds them together today is 018's §Verify, a `sed`
|
||||||
|
range typed into a blueprint, which expires with it.
|
||||||
|
|
||||||
|
**And that check carries a live defect.** `CANON=$(sed -n …)` yields the
|
||||||
|
empty string on a file missing the block; both copies then compare
|
||||||
|
empty-to-empty and print `match`. Only the separate `owner: 17 lines`
|
||||||
|
expectation catches it —
|
||||||
|
[`okf-check`](../../skills/loop/write-okf/scripts/okf-check)'s own docstring
|
||||||
|
names the failure: *a check that cannot fail is not a check*. 018 sits at 149
|
||||||
|
of its 150-line cap, so the fix lands here.
|
||||||
|
|
||||||
|
**Why a third script.** README.md sits at the repo root — outside `okf-check
|
||||||
|
<okf-dir>` and outside `skill-check <skills-dir>` both. No existing walker
|
||||||
|
sees all three sites, and widening either one's root changes the argv
|
||||||
|
contract [017](B-017-add-a-line-cap-lint-over-skills.md) built `skill-check` to
|
||||||
|
mirror. [016](../decisions/R-016-one-okf-check-validator.md) is not crossed: it
|
||||||
|
fixes how *OKF conformance* is enforced, and 017 already shipped a second
|
||||||
|
validator under it.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**A script at `skills/loop/write-okf/scripts/render-check`, taking a repo
|
||||||
|
root: `render-check <repo-root>`.** It mirrors its two siblings — same argv
|
||||||
|
shape, same `WARN `/`ERROR ` prefixes, same closing `N error(s), M
|
||||||
|
warning(s)` tally, same exit codes (1 on any error, 0 otherwise, 2 on usage),
|
||||||
|
same `#!/usr/bin/env python3` shebang. Under `write-okf` because the owner
|
||||||
|
page is a write-okf page.
|
||||||
|
|
||||||
|
**The owner is a fixed path; the copies are discovered.** `OKF/ARCHITECTURE.md`
|
||||||
|
is the sole owner per 018, so the script names it. Copies come from walking
|
||||||
|
`*.md` from the root, dot-directories skipped: a **render site** is any fenced
|
||||||
|
block whose first line is the canonical block's. A file with no such fence is
|
||||||
|
a pointer, which phase 11 declares legal. **Three error legs, each able to fire:**
|
||||||
|
|
||||||
|
- **No owner block.** Zero blocks at the owner path matching the sentinel, or
|
||||||
|
more than one, is an ERROR that stops the comparison — the false-green fix:
|
||||||
|
the script never compares against a vacuum.
|
||||||
|
- **A copy diverges.** Compared **byte-for-byte** against the owner, after
|
||||||
|
stripping trailing whitespace per line; nothing else is normalised. The
|
||||||
|
block is box-drawing art whose column positions carry the fork, so a
|
||||||
|
reflowed copy is a broken diagram, not a legal variant — and this is how
|
||||||
|
the copies are produced: spliced, never transcribed.
|
||||||
|
- **The retired flat form survives.** `architect → blueprint` anywhere under
|
||||||
|
the root is an ERROR; 018 retired it, its §Verify grepped for it once.
|
||||||
|
|
||||||
|
**`OKF/blueprints/` is skipped.** A locked blueprint's Contract is immutable
|
||||||
|
by [blueprint-format](../../skills/loop/blueprint/blueprint-format.md), so a
|
||||||
|
rule that could turn one red would be unfixable by design, and blueprints
|
||||||
|
quote retired forms as record. 018's `--exclude='018-*'` becomes a rule.
|
||||||
|
|
||||||
|
**One invocation obligation, one line for one line.** `write-okf/SKILL.md:83`
|
||||||
|
obliges `okf-check` to be run and its output pasted; that line grows to name
|
||||||
|
both scripts. The file sits at exactly 110 — the cap — so it must not grow.
|
||||||
|
|
||||||
|
**One `LEARNINGS.md` entry** in the file's believed/true/source form: a
|
||||||
|
Contract carrying a byte-exact artifact eats the blueprint cap. Confirmed
|
||||||
|
twice — 018 crossed 150 five times in drafting, every fix prose, and then had
|
||||||
|
no room to absorb its own Verify defect.
|
||||||
|
|
||||||
|
**Phase 11 closes** — its entry ticked and pruned to the
|
||||||
|
`✅ verified <date>, [019](…)` form phase 9 already carries, per
|
||||||
|
[013](../decisions/R-013-roadmap-is-a-plan.md): a verified phase keeps no verify
|
||||||
|
step. **Today's tree is green** — three sites matching, no stray form; the
|
||||||
|
lint changes no rendered content.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/render-check` — new; the CLI entry point
|
||||||
|
(`render-check <repo-root>`).
|
||||||
|
- `skills/loop/write-okf/SKILL.md` — the §Output done-criteria line at :83.
|
||||||
|
- `OKF/LEARNINGS.md` — one appended entry.
|
||||||
|
- `OKF/ROADMAP.md` — phase 11's entry, ticked and pruned.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
LINT=skills/loop/write-okf/scripts/render-check
|
||||||
|
"$LINT" .; echo "exit: $?"
|
||||||
|
tmp=$(mktemp -d); mkdir -p "$tmp/OKF" "$tmp/skills/loop/steer"
|
||||||
|
cp OKF/ARCHITECTURE.md "$tmp/OKF/"; cp README.md "$tmp/"
|
||||||
|
cp skills/loop/steer/SKILL.md "$tmp/skills/loop/steer/"
|
||||||
|
"$LINT" "$tmp"; echo "clean exit: $?"
|
||||||
|
echo 'architect → blueprint' > "$tmp/stray.md"
|
||||||
|
"$LINT" "$tmp"; echo "stray exit: $?"; rm "$tmp/stray.md"
|
||||||
|
sed -i 's/^ blueprint → sound/ blueprint → sound/' "$tmp/README.md"
|
||||||
|
"$LINT" "$tmp"; echo "divergent exit: $?"
|
||||||
|
sed -i '/^substrate (rare)/,/^weave = bdd/d' "$tmp/OKF/ARCHITECTURE.md"
|
||||||
|
"$LINT" "$tmp"; echo "no-owner exit: $?"
|
||||||
|
rm -rf "$tmp"
|
||||||
|
grep -c 'render-check' skills/loop/write-okf/SKILL.md
|
||||||
|
wc -l skills/loop/write-okf/SKILL.md OKF/LEARNINGS.md OKF/ROADMAP.md
|
||||||
|
grep -n '^11\.' OKF/ROADMAP.md
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-check skills/ | tail -1
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect `0 error(s), 0 warning(s)` / exit 0 over the real repo and again over
|
||||||
|
the pristine copy, then each leg firing alone at exit 1: `stray.md` naming
|
||||||
|
the retired form, `README.md` diverging on one added space, and the missing
|
||||||
|
owner block reported as an error — **not** as a `match`, the defect this
|
||||||
|
blueprint exists to remove. Then `1`; `110` for `write-okf/SKILL.md` with
|
||||||
|
both OKF pages at or under 110; a phase 11 line carrying `✅`; and
|
||||||
|
`0 error(s), 0 warning(s)` / `0 error(s), 9 warning(s)` from the siblings.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **Two `okf-check` rules — blueprint 020.** A phase entry carrying both `✅`
|
||||||
|
and `**Verify:**` should error (the trigger `ROADMAP.md` §Risks calls
|
||||||
|
unenforced); and `okf-check:245` skips `blueprints/` before the cite loop,
|
||||||
|
so no blueprint's cites are validated — found sounding this one. Both trace
|
||||||
|
to those defects, not to phase 11; 020 owns them and the second learning.
|
||||||
|
- **Wiring beyond the one done-criterion** — no justfile, no git hook, no CI.
|
||||||
|
This repo has none; `okf-check` is obliged by prose alone.
|
||||||
|
- **Touching the rendered block or any site's content.** The lint is
|
||||||
|
enforcement; 018 already placed what it enforces.
|
||||||
|
- **A general "one owner, N copies" mechanism** — an abstraction over a
|
||||||
|
single instance fails [sieve](../../skills/engineering/sieve/SKILL.md)'s
|
||||||
|
Real test.
|
||||||
|
- **`OKF/ARCHITECTURE.md`'s stale module-map line**, carried open from 018,
|
||||||
|
and **phase 10**'s F6/F7/F8. Untouched.
|
||||||
@ -0,0 +1,149 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: superseded-by-022
|
||||||
|
traces-to: user request 2026-07-30
|
||||||
|
sounded: 2026-07-30
|
||||||
|
cites:
|
||||||
|
- OKF/ROADMAP.md:A live decision can be contradicted
|
||||||
|
- OKF/decisions/R-020-every-page-has-a-growth-path.md:a discharged phase to one
|
||||||
|
- OKF/decisions/R-017-pin-drift-splits-by-visibility.md:pin drift splits by what each tool can see
|
||||||
|
- OKF/blueprints/B-019-add-a-render-lint-over-the-loop-shape.md:Two `okf-check` rules
|
||||||
|
- skills/loop/write-okf/page-warrant.md:cite drift does not split the same way
|
||||||
|
- skills/loop/write-okf/scripts/okf-check:carry their own frontmatter contracts
|
||||||
|
- skills/loop/write-okf/split-page.md
|
||||||
|
- skills/loop/chart/SKILL.md
|
||||||
|
- skills/loop/chart/revise.md
|
||||||
|
- OKF/learnings/index.md:Append-only
|
||||||
|
---
|
||||||
|
|
||||||
|
# 020 — enforce the roadmap prune and validate every page's cites
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
[B-019](B-019-add-a-render-lint-over-the-loop-shape.md)'s §Out of scope hands
|
||||||
|
this blueprint two `okf-check` defects by name, both found sounding it and
|
||||||
|
both in [ROADMAP.md](../ROADMAP.md) §Risks: a live decision with nothing to
|
||||||
|
enforce it, and a validator skipping the pages it was built to check. Not
|
||||||
|
phase 10 or 11 — drift against a live
|
||||||
|
[R-020](../decisions/R-020-every-page-has-a-growth-path.md).
|
||||||
|
|
||||||
|
**The doc edits are not a separate concern.** A prune rule shipped while
|
||||||
|
[architect](../../skills/loop/architect/SKILL.md) still tells its revision
|
||||||
|
loop to tick *on* the verify line is a skill teaching a lint violation; the
|
||||||
|
same holds for a validated `cites:` its own format never declares. A rule
|
||||||
|
and the doc contradicting it are one unit.
|
||||||
|
|
||||||
|
**Sizing the cite hole.** Fixing it turns four cites in three landed
|
||||||
|
blueprints red — and **all four** were erased by the blueprint that cited
|
||||||
|
them, two named in B-018's own §Seams. A finding, not a stray repair.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**Rule 1 — a discharged phase keeps no verify step.** In a `type: Roadmap`
|
||||||
|
page, a phase entry — a `^\d+\. ` line plus its continuations, up to the
|
||||||
|
next such line or the next `## ` heading — carrying both `✅` and
|
||||||
|
`**Verify:**` is an **ERROR**. R-020's prune has had nothing to enforce it;
|
||||||
|
this is the mechanical half.
|
||||||
|
|
||||||
|
**Rule 2 — every page's cites resolve.** The `continue` at
|
||||||
|
[`okf-check`](../../skills/loop/write-okf/scripts/okf-check):245 skips
|
||||||
|
`blueprints`/`ferries` *before* the cite loop, so no blueprint's or ferry's
|
||||||
|
cites are validated at all. The resolvability loop moves **above** that
|
||||||
|
`continue`; the `no cites:` warning stays **below** it, gated to warrant
|
||||||
|
pages — the format requires `traces-to`, not `cites:`, and eighteen live
|
||||||
|
pages carry none. Cites validate **whole**, path and symbol, per
|
||||||
|
[page-warrant.md](../../skills/loop/write-okf/page-warrant.md): a cite needs
|
||||||
|
no repo, so it does not split the way
|
||||||
|
[R-017](../decisions/R-017-pin-drift-splits-by-visibility.md) splits a pin.
|
||||||
|
|
||||||
|
**Four stale cites are repaired**, not exempted: B-014's
|
||||||
|
`CLAUDE.md:EXAMPLES.md`, B-017's `conjure-a-skill/SKILL.md:is ≤ 110 lines`,
|
||||||
|
B-018's `steer/SKILL.md:zero context load` and `ROADMAP.md:loop diagram in`.
|
||||||
|
**Repairing a cite on a locked blueprint is legal** — the format freezes
|
||||||
|
Contract and Verify, and a cite is a working pointer whose historical form
|
||||||
|
lives in jj history. With no live target, a cite is dropped, never
|
||||||
|
repointed at approximate text.
|
||||||
|
|
||||||
|
**Rule 3 — architect stops contradicting R-020.** The skeleton line at
|
||||||
|
`SKILL.md:36` and the done-criterion at `:54` both say *every* phase
|
||||||
|
carries a verify step; `revise.md:15` sends a discharged phase's tick
|
||||||
|
*onto* its verify line. Each narrows to the open phase and points at
|
||||||
|
R-020's pruned form — the `✅ verified <date>, [NNN](…)` shape phase 9
|
||||||
|
already carries. Neither file may pass 110 (74 and 41 today).
|
||||||
|
|
||||||
|
**One `LEARNINGS.md` entry**, believed/true/source: a blueprint's `cites:`
|
||||||
|
point at the text it is about to change, so validating them makes the
|
||||||
|
implementing weave the repairer of its own pointers — and the durable
|
||||||
|
practice is to cite a file the blueprint edits by **path alone**, symbol
|
||||||
|
omitted. This blueprint cites every file it edits that way.
|
||||||
|
|
||||||
|
**`LEARNINGS.md` ends at or under 110 with the entry present.** It sits at
|
||||||
|
105 and B-019 owes it one too; whichever weave crosses the cap performs
|
||||||
|
R-020's named move, the split into `learnings/<theme>.md`, per
|
||||||
|
[split-page.md](../../skills/loop/write-okf/split-page.md) — pure
|
||||||
|
relocation, alone in its own change. **Both new rules fire today** — rule 1
|
||||||
|
on a fixture, rule 2 on the four real cites before repair — and nothing
|
||||||
|
rendered changes.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — `main()`'s per-page loop
|
||||||
|
(rule 2's move) plus one new roadmap check reached from it (rule 1); the
|
||||||
|
module docstring's error list names both.
|
||||||
|
- `skills/loop/architect/SKILL.md` — `:36`, `:54`.
|
||||||
|
- `skills/loop/architect/revise.md` — `:15`.
|
||||||
|
- `OKF/blueprints/014-…`, `017-…`, `018-…` — `cites:` frontmatter only.
|
||||||
|
- `OKF/LEARNINGS.md` — one appended entry, under its cap.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
CHECK=skills/loop/write-okf/scripts/okf-check
|
||||||
|
"$CHECK" OKF/; echo "real exit: $?"
|
||||||
|
tmp=$(mktemp -d); cp -r OKF "$tmp/"
|
||||||
|
for f in skills README.md CLAUDE.md; do ln -s "$PWD/$f" "$tmp/$f"; done
|
||||||
|
"$CHECK" "$tmp/OKF"; echo "copy exit: $?"
|
||||||
|
sed -i '48,49s|✅ verified 2026-07-22,|✅ verified 2026-07-22, **Verify:** x,|' \
|
||||||
|
"$tmp/OKF/ROADMAP.md"
|
||||||
|
"$CHECK" "$tmp/OKF" | grep -c 'ROADMAP'; echo "prune exit: $?"
|
||||||
|
cp OKF/ROADMAP.md "$tmp/OKF/ROADMAP.md"
|
||||||
|
sed -i 's|^ - OKF/CONTEXT.md:House cap| - OKF/nope.md:x|' \
|
||||||
|
"$tmp/OKF/blueprints/B-017-add-a-line-cap-lint-over-skills.md"
|
||||||
|
"$CHECK" "$tmp/OKF" | grep -c 'unresolvable cite'
|
||||||
|
sed -i '/^cites:/,/^status:/{/^ - /d}' \
|
||||||
|
"$tmp/OKF/blueprints/B-019-add-a-render-lint-over-the-loop-shape.md"
|
||||||
|
"$CHECK" "$tmp/OKF" | grep -c 'no cites'
|
||||||
|
rm -rf "$tmp" skills/loop/write-okf/scripts/__pycache__
|
||||||
|
grep -n 'every phase\|verify line\|\*\*Verify:\*\*' \
|
||||||
|
skills/loop/architect/SKILL.md skills/loop/architect/revise.md
|
||||||
|
wc -l OKF/LEARNINGS.md skills/loop/architect/SKILL.md \
|
||||||
|
skills/loop/architect/revise.md
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-check skills/ | tail -1
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect `0 error(s), 0 warning(s)` / exit 0 on the real tree **after** the
|
||||||
|
four repairs, and the same on the pristine copy. Then each rule firing
|
||||||
|
alone: `1` ROADMAP line and exit 1 for the phase that kept its
|
||||||
|
`**Verify:**`; `1` unresolvable cite from a blueprint — the invisible
|
||||||
|
class; `0` from stripping a blueprint's cites, proving `no cites:` stayed
|
||||||
|
gated. Then architect's three lines each scoped to an open phase or naming
|
||||||
|
R-020's pruned form; all three files under 110; and
|
||||||
|
`0 error(s), 9 warning(s)` from the sibling.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **R-022's prefix lint — blueprint 021.** Its §Consequences names "the
|
||||||
|
`okf-check` blueprint" as owner, but a bare three-digit number is also
|
||||||
|
`110`, `150` and `SKILL.md:36`; the hard part is exclusion design, not
|
||||||
|
placement. Deferred whole.
|
||||||
|
- **`revise.md:19`**, routing a new gotcha to §Risks where R-013 routes a
|
||||||
|
debunked claim to `LEARNINGS.md`. A different decision; untouched.
|
||||||
|
- **Enforcing a pruned entry's *length*.** R-020 says "one line"; wrapping
|
||||||
|
makes that unmechanical, and an invented budget is not the rule.
|
||||||
|
- **`blueprint-format.md` declaring `cites:`** — it names `traces-to` and
|
||||||
|
`sounded:` only, yet every blueprint since B-014 carries a cite rule 2
|
||||||
|
now validates. An undeclared *optional* field instructs nobody into
|
||||||
|
failure, unlike rule 3's sites; found sounding this one, deferred.
|
||||||
|
- **`type: Decision` colliding across a ferry `D-n` and a register entry**
|
||||||
|
— R-022's unfinished half. **B-018's Verify false-green**, **phase 10's
|
||||||
|
F6/F7/F8**, **`ARCHITECTURE.md:20-21`**: carried, untouched.
|
||||||
149
OKF/blueprints/B-021-align-validator-and-doctrine.md
Normal file
149
OKF/blueprints/B-021-align-validator-and-doctrine.md
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-30 (the split drift); B-020 §Out of scope
|
||||||
|
sounded: 2026-07-30
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/split-page.md
|
||||||
|
- skills/loop/write-okf/okf-layout.md
|
||||||
|
- skills/loop/write-okf/scripts/okf-check
|
||||||
|
- skills/loop/blueprint/blueprint-format.md
|
||||||
|
- OKF/decisions/R-022-prose-cites-carry-a-register-prefix.md
|
||||||
|
- OKF/learnings/index.md
|
||||||
|
- OKF/index.md
|
||||||
|
- OKF/decisions/R-020-every-page-has-a-growth-path.md:alone **splits**
|
||||||
|
- OKF/blueprints/B-020-enforce-the-prune-and-validate-every-cite.md:declaring `cites:`
|
||||||
|
---
|
||||||
|
|
||||||
|
# 021 — align the validator and the doctrine on splits, prefixes and cites
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
Three sites where doctrine and `okf-check` disagree, found sounding
|
||||||
|
[B-020](B-020-enforce-the-prune-and-validate-every-cite.md): doctrine
|
||||||
|
instructing into a validator error, doctrine with no validator, and a
|
||||||
|
validated field no format declares — the defect class B-020's
|
||||||
|
§Justification names when it refuses to ship a rule beside the doc
|
||||||
|
contradicting it.
|
||||||
|
|
||||||
|
**The first is load-bearing today.**
|
||||||
|
[split-page.md](../../skills/loop/write-okf/split-page.md) §Rewiring the
|
||||||
|
index says the capped page keeps its name and becomes its subpages' index;
|
||||||
|
`okf-check`'s `reachable()` propagates only through pages named `index.md`
|
||||||
|
or `MAP.md`, so `learnings/<theme>.md` linked from `LEARNINGS.md` errors
|
||||||
|
*not reachable from index.md*. Proved by running the validator over a
|
||||||
|
copied tree, not by reading it.
|
||||||
|
[R-020](../decisions/R-020-every-page-has-a-growth-path.md) grants every page
|
||||||
|
kind a growth path; this one cannot be taken. `LEARNINGS.md` sits at
|
||||||
|
exactly 110, so the next entry meets the drift.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**Rule 1 — the split renames the parent.** `split-page.md` §Rewiring the
|
||||||
|
index and `okf-layout.md`'s `LEARNINGS.md` contract both say: at cap+1 the
|
||||||
|
parent moves to `<theme-dir>/index.md`, subpages land beside it, and
|
||||||
|
`index.md`'s single line repoints at the new parent. Reachability then
|
||||||
|
holds through the existing `index.md` rule — **`reachable()` is not
|
||||||
|
touched.** Widening it to follow any page's links was rejected: the
|
||||||
|
spine guarantee (every page hangs off the map) is what the narrow rule
|
||||||
|
buys, and a split is rare enough to pay a rename instead.
|
||||||
|
|
||||||
|
**`LEARNINGS.md` splits, under this blueprint, into `learnings/`.** This
|
||||||
|
blueprint owes an entry, the page is at 110, so R-020's cap+1 trigger
|
||||||
|
fires — the doctrine is proved by running it, not by fixture. The split is
|
||||||
|
**pure relocation, alone in its own change**: sixteen entries in, sixteen
|
||||||
|
out, nothing reworded or resequenced. Themes are named for the layer each
|
||||||
|
entry forces to change, per split-page.md §Choosing the axis; the names
|
||||||
|
are the weave's, not this blueprint's. `learnings/index.md` carries
|
||||||
|
`type: Index` like `decisions/index.md`; theme pages carry
|
||||||
|
`type: Learnings` and the append-only contract each.
|
||||||
|
|
||||||
|
**Rule 2 — an unprefixed register cite in prose is an ERROR.** A bare
|
||||||
|
three-digit run matching an existing `blueprints/NNN-` or `decisions/NNN-`
|
||||||
|
file, in the body of a root page or a `decisions/` page, is
|
||||||
|
[R-022](../decisions/R-022-prose-cites-carry-a-register-prefix.md)'s
|
||||||
|
ambiguity unenforced. Exclusions are the rule's hard half, all mechanical:
|
||||||
|
frontmatter, fenced blocks, code spans, markdown link text and targets, a
|
||||||
|
number touching `/`, `-`, `.` or a word character (so a path or
|
||||||
|
`superseded-by-020` never fires), the page's own `# NNN — …` H1, and
|
||||||
|
`type: Learnings` pages — R-022 §Consequences exempts the append-only
|
||||||
|
register, and typing the exemption survives rule 1's rename. Blueprints
|
||||||
|
and ferries are outside the check for the same reason their warrants are:
|
||||||
|
a locked blueprint's prose cannot be legally repaired. **One live site
|
||||||
|
fires** — R-022's own example sentence naming the collided numbers —
|
||||||
|
repaired with code spans, which is what the rule already permits.
|
||||||
|
|
||||||
|
**Rule 3 — `blueprint-format.md` declares `cites:`.** It names `traces-to`
|
||||||
|
and `sounded:` only, while every blueprint since B-014 but B-015 carries a
|
||||||
|
`cites:` that B-020 makes the validator enforce. Declared as **optional**
|
||||||
|
— B-015 is why — with the cite grammar owned by
|
||||||
|
[okf-layout.md](../../skills/loop/write-okf/okf-layout.md) and referenced,
|
||||||
|
not restated.
|
||||||
|
|
||||||
|
**Nothing rendered by `render-check` changes**, and every touched file
|
||||||
|
stays under its cap.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — one new check reached from
|
||||||
|
`main()`'s per-page loop, plus the module docstring's error list.
|
||||||
|
`reachable()` unchanged.
|
||||||
|
- `skills/loop/write-okf/split-page.md` — §Rewiring the index.
|
||||||
|
- `skills/loop/write-okf/okf-layout.md` — the tree comment on
|
||||||
|
`LEARNINGS.md` and its page contract.
|
||||||
|
- `skills/loop/blueprint/blueprint-format.md` — skeleton + one Rules bullet.
|
||||||
|
- `OKF/decisions/022-…` — one sentence, code spans only.
|
||||||
|
- `OKF/LEARNINGS.md` → `OKF/learnings/` — relocation, own change.
|
||||||
|
- `OKF/index.md` — one line repointed.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
CHECK=skills/loop/write-okf/scripts/okf-check
|
||||||
|
"$CHECK" OKF/; echo "real exit: $?"
|
||||||
|
skills/loop/write-okf/scripts/render-check .
|
||||||
|
ls OKF/LEARNINGS.md; ls OKF/learnings/
|
||||||
|
grep -c '^- Believed:' OKF/learnings/*.md | awk -F: '{s+=$2} END{print "entries:",s}'
|
||||||
|
grep -n 'learnings/index.md' OKF/index.md
|
||||||
|
tmp=$(mktemp -d); cp -r OKF "$tmp/"
|
||||||
|
for f in skills README.md CLAUDE.md; do ln -s "$PWD/$f" "$tmp/$f"; done
|
||||||
|
"$CHECK" "$tmp/OKF"; echo "copy exit: $?"
|
||||||
|
printf '\nA bare 017 standing in prose.\n' \
|
||||||
|
>> "$tmp/OKF/decisions/R-012-one-why-register.md"
|
||||||
|
"$CHECK" "$tmp/OKF" | grep -c 'unprefixed register cite'
|
||||||
|
rm -rf "$tmp" skills/loop/write-okf/scripts/__pycache__
|
||||||
|
grep -n 'index.md' skills/loop/write-okf/split-page.md | head -5
|
||||||
|
grep -n 'cites' skills/loop/blueprint/blueprint-format.md
|
||||||
|
wc -l skills/loop/write-okf/split-page.md skills/loop/write-okf/okf-layout.md \
|
||||||
|
skills/loop/blueprint/blueprint-format.md OKF/learnings/*.md OKF/index.md
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-check skills/ | tail -1
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect `0 error(s), 0 warning(s)` and exit 0 from `okf-check` on the real
|
||||||
|
tree and on the copy, and the same from `render-check`; `ls` reporting
|
||||||
|
`LEARNINGS.md` gone and `learnings/` populated; `entries: 16`, the count
|
||||||
|
before; `index.md` pointing at `learnings/index.md`. Then the lint alone:
|
||||||
|
`1` unprefixed cite from the injected line, against a **clean pristine
|
||||||
|
copy** — every H1, path, link and `type: Learnings` entry carrying a bare
|
||||||
|
number is an exclusion the copy's `0 errors` already proves. Then
|
||||||
|
split-page.md naming the `<theme-dir>/index.md` move, `blueprint-format.md`
|
||||||
|
naming `cites:`, all listed files under their caps, and
|
||||||
|
`0 error(s), 9 warning(s)` from the sibling.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **B-020's supersession.** Rule 1 deletes `OKF/LEARNINGS.md`, which
|
||||||
|
B-020's **immutable** §Verify runs `wc -l` over and its §Contract pins
|
||||||
|
the entry to; B-020 is therefore unimplementable as written and is owed
|
||||||
|
a superseding blueprint against the `learnings/` paths. Named here,
|
||||||
|
done there — B-020 was sounded before the drift was understood.
|
||||||
|
- **Prefix lint over `skills/` prose.** R-022's retrofit touched
|
||||||
|
`moor/SKILL.md` and `build-r-package/SKILL.md`; `okf-check`'s domain is
|
||||||
|
the OKF bundle, so the skills half would belong to `skill-check`.
|
||||||
|
- **Register numbers reaching 100.** Rule 2's number set would then hold
|
||||||
|
`110` and `150`, colliding with the caps quoted in prose. A known limit
|
||||||
|
~80 blueprints out, not an invented exclusion today.
|
||||||
|
- **`type: Decision` colliding across a ferry `D-n` and a register entry**
|
||||||
|
— R-022's unfinished half. **Phase 10's F6/F7/F8**,
|
||||||
|
**`ARCHITECTURE.md:20-21`**, **B-018's Verify false-green**: carried,
|
||||||
|
untouched.
|
||||||
149
OKF/blueprints/B-022-validate-every-cite-at-every-status.md
Normal file
149
OKF/blueprints/B-022-validate-every-cite-at-every-status.md
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-31 (B-020 stranded by the learnings/ split)
|
||||||
|
sounded: 2026-07-31
|
||||||
|
cites:
|
||||||
|
- OKF/blueprints/B-020-enforce-the-prune-and-validate-every-cite.md
|
||||||
|
- OKF/blueprints/B-021-align-validator-and-doctrine.md
|
||||||
|
- OKF/learnings/loop.md
|
||||||
|
- OKF/index.md
|
||||||
|
- skills/loop/write-okf/scripts/okf-check
|
||||||
|
- skills/loop/chart/SKILL.md
|
||||||
|
- skills/loop/chart/revise.md
|
||||||
|
- OKF/ROADMAP.md:A live decision can be contradicted
|
||||||
|
- OKF/decisions/R-020-every-page-has-a-growth-path.md:a discharged phase to one
|
||||||
|
- OKF/decisions/R-017-pin-drift-splits-by-visibility.md:pin drift splits by what each tool can see
|
||||||
|
- skills/loop/write-okf/page-warrant.md:cite drift does not split the same way
|
||||||
|
- skills/loop/blueprint/blueprint-format.md:sections are immutable
|
||||||
|
---
|
||||||
|
|
||||||
|
# 022 — enforce the roadmap prune and validate every cite at every status
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
[B-020](B-020-enforce-the-prune-and-validate-every-cite.md) is **locked and
|
||||||
|
stranded**: its immutable §Verify runs `wc -l` over `OKF/LEARNINGS.md`, a
|
||||||
|
path [B-021](B-021-align-validator-and-doctrine.md) deleted in the split to
|
||||||
|
`OKF/learnings/`. Its defects are still in the tree and supersession is the
|
||||||
|
only exit, per the learning B-021 filed at
|
||||||
|
[learnings/loop.md](../learnings/loop.md).
|
||||||
|
|
||||||
|
**Two things changed under it.** B-021 landed B-020's deferred halves —
|
||||||
|
R-022's prefix lint and `cites:` declared in `blueprint-format.md` — and took
|
||||||
|
the cite hole from four stale cites to **nine**, three from the split, one on
|
||||||
|
a blueprint already `implemented`: a ruling B-020 never had to make.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**Rule 1 — a discharged phase keeps no verify step.** In a `type: Roadmap`
|
||||||
|
page, a phase entry — a `^\d+\. ` line plus its continuations, up to the next
|
||||||
|
such line or the next `## ` heading — carrying both `✅` and `**Verify:**` is
|
||||||
|
an **ERROR**: the mechanical half R-020's prune never had. As in B-020.
|
||||||
|
|
||||||
|
**Rule 2 — every page's cites resolve.** The `continue` at
|
||||||
|
[`okf-check`](../../skills/loop/write-okf/scripts/okf-check):272 skips
|
||||||
|
`blueprints`/`ferries` *before* the cite loop, so no blueprint's or ferry's
|
||||||
|
cites are validated at all. The resolvability loop moves **above** that
|
||||||
|
`continue`; the `no cites:` warning stays **below** it, gated to warrant
|
||||||
|
pages — the format requires `traces-to`, not `cites:`. Cites validate
|
||||||
|
**whole**, path and symbol, per
|
||||||
|
[page-warrant.md](../../skills/loop/write-okf/page-warrant.md): a cite needs
|
||||||
|
no repo, so it does not split the way
|
||||||
|
[R-017](../decisions/R-017-pin-drift-splits-by-visibility.md) splits a pin.
|
||||||
|
|
||||||
|
**Rule 3 — the rule reaches backwards, and status buys no exemption.** A
|
||||||
|
cite is validated wherever it appears, at `draft`, `locked`, `implemented`
|
||||||
|
and `superseded-by-NNN` alike. `blueprint-format.md` freezes a locked
|
||||||
|
blueprint's **Contract and Verify**; `cites:` is neither — it is a working
|
||||||
|
pointer whose form at lock is already in jj history, so repairing it destroys
|
||||||
|
nothing. Exempting `implemented` leaves the oldest, largest body of cites
|
||||||
|
unchecked forever; grandfathering "resolved at lock" asks for a fact about
|
||||||
|
the past that the tree does not carry.
|
||||||
|
|
||||||
|
**Nine stale cites are repaired**, not exempted — **repointed** at live text
|
||||||
|
making the same claim, **dropped** when the claim is gone, never repointed at
|
||||||
|
approximate text. Dropped: B-014 `CLAUDE.md:EXAMPLES.md` (file gone); B-018
|
||||||
|
`steer/SKILL.md:zero context load` (that page no longer says *context*);
|
||||||
|
B-018 `ROADMAP.md:loop diagram in` and B-019 `ROADMAP.md:checked by script`
|
||||||
|
(erased when phase 11 discharged). Repointed: B-017
|
||||||
|
`conjure-a-skill/SKILL.md:is ≤ 110 lines`, live at `:55`; B-019
|
||||||
|
`write-okf/SKILL.md:run and its output pasted`, live at `:84`; B-019 and
|
||||||
|
B-020 `OKF/LEARNINGS.md:Append-only` and B-021 `OKF/LEARNINGS.md`, all onto
|
||||||
|
`OKF/learnings/index.md`, the page the split renamed it to.
|
||||||
|
|
||||||
|
**Rule 4 — architect stops contradicting R-020.** `SKILL.md:36` and `:54`
|
||||||
|
both say *every* phase carries a verify step; `revise.md:15` sends a
|
||||||
|
discharged phase's tick *onto* its verify line. Each narrows to the open
|
||||||
|
phase and points at R-020's pruned form — the `✅ verified <date>, [NNN](…)`
|
||||||
|
shape phases 9 and 11 already carry. Neither file may pass 110 (74, 41).
|
||||||
|
|
||||||
|
**B-020 flips to `superseded-by-022`** in its frontmatter and on its
|
||||||
|
`OKF/index.md` line; its Contract and Verify are not touched.
|
||||||
|
|
||||||
|
**One [learnings/loop.md](../learnings/loop.md) entry**, believed/true/source:
|
||||||
|
a blueprint's `cites:` point at the text it is about to change, so validating
|
||||||
|
them makes the implementing weave the repairer of its own pointers — the
|
||||||
|
durable practice is to cite a file the blueprint edits by **path alone**, as
|
||||||
|
every path cite above does. **Both new rules fire today** — rule 1 on a fixture,
|
||||||
|
rule 2 on the nine real cites before repair — and nothing rendered changes.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — `main()`'s per-page loop (rule
|
||||||
|
2's move), one new roadmap check reached from it (rule 1), the docstring.
|
||||||
|
- `skills/loop/architect/SKILL.md` `:36`, `:54`; `revise.md` `:15`.
|
||||||
|
- `OKF/blueprints/014-…`, `017-…`, `018-…`, `019-…`, `021-…` — `cites:`
|
||||||
|
frontmatter only; `020-…` — `cites:` and `status:` only.
|
||||||
|
- `OKF/learnings/loop.md` — one appended entry, under its cap.
|
||||||
|
- `OKF/index.md` — B-020's status, plus this blueprint's own line.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
CHECK=skills/loop/write-okf/scripts/okf-check
|
||||||
|
"$CHECK" OKF/; echo "real exit: $?"
|
||||||
|
tmp=$(mktemp -d); cp -r OKF "$tmp/"
|
||||||
|
for f in skills README.md CLAUDE.md; do ln -s "$PWD/$f" "$tmp/$f"; done
|
||||||
|
"$CHECK" "$tmp/OKF"; echo "copy exit: $?"
|
||||||
|
sed -i 's|✅ verified 2026-07-22,|✅ verified 2026-07-22, **Verify:** x,|' \
|
||||||
|
"$tmp/OKF/ROADMAP.md"
|
||||||
|
"$CHECK" "$tmp/OKF" > "$tmp/prune.log"; echo "prune exit: $?"
|
||||||
|
grep -c 'ROADMAP' "$tmp/prune.log"
|
||||||
|
cp OKF/ROADMAP.md "$tmp/OKF/ROADMAP.md"
|
||||||
|
sed -i '0,/^cites:/s|^cites:|cites:\n - OKF/nope.md:x|' \
|
||||||
|
"$tmp/OKF/blueprints/B-017-add-a-line-cap-lint-over-skills.md"
|
||||||
|
"$CHECK" "$tmp/OKF" | grep -c 'unresolvable cite'
|
||||||
|
sed -i '/^cites:/,/^---$/{/^ - /d}' \
|
||||||
|
"$tmp/OKF/blueprints/B-019-add-a-render-lint-over-the-loop-shape.md"
|
||||||
|
"$CHECK" "$tmp/OKF" | grep -c 'no cites'
|
||||||
|
rm -rf "$tmp" skills/loop/write-okf/scripts/__pycache__
|
||||||
|
grep -n 'every phase\|verify line\|\*\*Verify:\*\*' \
|
||||||
|
skills/loop/architect/SKILL.md skills/loop/architect/revise.md
|
||||||
|
grep -h '^status:' OKF/blueprints/020-*.md
|
||||||
|
wc -l OKF/learnings/loop.md skills/loop/architect/SKILL.md \
|
||||||
|
skills/loop/architect/revise.md
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-check skills/ | tail -1
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect `0 error(s), 0 warning(s)` / exit 0 on the real tree **after** the
|
||||||
|
nine repairs, and the same on the pristine copy. Then each rule alone:
|
||||||
|
`prune exit: 1` with `1` ROADMAP line; `1` unresolvable cite from a
|
||||||
|
blueprint — the invisible class; `0` from stripping a blueprint's cites,
|
||||||
|
proving `no cites:` stayed gated. Then architect's three lines each scoped
|
||||||
|
to an open phase or naming R-020's pruned form; `superseded-by-022` on
|
||||||
|
B-020; all three files under 110; `0 error(s), 9 warning(s)` from the
|
||||||
|
sibling.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **Enforcing a pruned entry's *length*.** R-020 says "one line"; wrapping
|
||||||
|
makes that unmechanical, and an invented budget is not the rule.
|
||||||
|
- **The eight out-of-bundle pointers still naming `OKF/LEARNINGS.md`** —
|
||||||
|
prose links in `AGENTS.md`, `CONTEXT.md` and six skills. Some are correct
|
||||||
|
for a repo that has not split; the triage is not this rule's.
|
||||||
|
- Carried, untouched: **validating a `traces-to`** (no decision form);
|
||||||
|
**`revise.md:19`**, routing a new gotcha where R-013 routes a debunked
|
||||||
|
claim; **`type: Decision` colliding** across a ferry `D-n` and a register
|
||||||
|
entry; **B-018's Verify false-green**; **phase 10's F6/F7/F8**;
|
||||||
|
**`ARCHITECTURE.md:20-21`**.
|
||||||
150
OKF/blueprints/B-023-add-a-link-lint-over-relative-md-links.md
Normal file
150
OKF/blueprints/B-023-add-a-link-lint-over-relative-md-links.md
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: superseded-by-026
|
||||||
|
traces-to: ROADMAP.md phase 12
|
||||||
|
sounded: 2026-07-31
|
||||||
|
cites:
|
||||||
|
- OKF/ROADMAP.md
|
||||||
|
- OKF/ARCHITECTURE.md:Cross-links
|
||||||
|
- OKF/blueprints/B-002-extract-why-register.md:ADR-FORMAT.md
|
||||||
|
- skills/loop/write-okf/scripts/_pages.py:dot-directories and blueprints out
|
||||||
|
- OKF/blueprints/B-019-add-a-render-lint-over-the-loop-shape.md:Why a third script
|
||||||
|
- OKF/blueprints/B-017-add-a-line-cap-lint-over-skills.md:Why a sibling script
|
||||||
|
- OKF/decisions/R-016-one-okf-check-validator.md:One `okf-check` validator
|
||||||
|
- skills/productivity/conjure-a-skill/scripts/skill-check:usage: skill-check
|
||||||
|
- skills/loop/write-okf/SKILL.md:run and output pasted
|
||||||
|
---
|
||||||
|
|
||||||
|
# 023 — add a link lint over relative markdown links
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
[ROADMAP.md](../ROADMAP.md) phase 12 names this as its **Precondition**: the
|
||||||
|
rename moves 26 of the 421 non-external link targets in `skills/`, across 14
|
||||||
|
files, and nothing validates any of them. Phase 12's own grep proves the old
|
||||||
|
names are *absent* — it cannot prove the new paths *resolve*, so a typo'd
|
||||||
|
replacement passes it silently.
|
||||||
|
|
||||||
|
**The links are load-bearing, and silent when broken.** A skill installs as a
|
||||||
|
symlink into `~/.claude/skills/<name>/`; `..` traverses it physically, so a
|
||||||
|
link written for the repo layout resolves identically from the installed base
|
||||||
|
directory (verified for `../../engineering/…` and `../../../OKF/…`). But
|
||||||
|
nothing follows a link automatically — the agent reads it, and a dangling one
|
||||||
|
surfaces as a failed read, not an error. No runtime signal: hence a static one.
|
||||||
|
|
||||||
|
**The obligation exists; only its enforcement is missing.**
|
||||||
|
[ARCHITECTURE.md](../ARCHITECTURE.md) §Seams states it as prose — *"category
|
||||||
|
moves are renames across these links (grep before moving)"*. This repo has
|
||||||
|
mechanised that same shape three times, each after prose failed to hold:
|
||||||
|
[017](B-017-add-a-line-cap-lint-over-skills.md) the line cap,
|
||||||
|
[019](B-019-add-a-render-lint-over-the-loop-shape.md) the loop diagram,
|
||||||
|
[020](B-020-enforce-the-prune-and-validate-every-cite.md) the prune.
|
||||||
|
|
||||||
|
**What sounding found.** A naive walk reports **28** unresolvable links; two
|
||||||
|
principled exclusions account for 26. **17 sit inside fenced code blocks** —
|
||||||
|
templates and worked examples, where a link is illustration, not navigation.
|
||||||
|
**9 sit in `OKF/blueprints/`** — sealed history, some genuinely stale (one
|
||||||
|
cites `DECISION-FORMAT.md`, renamed by [002](B-002-extract-why-register.md));
|
||||||
|
linting it would force a rename to edit a sealed record, which append-only
|
||||||
|
forbids, and `render-check` excludes `blueprints/` for the same reason. That
|
||||||
|
leaves **2** real defects, both ellipsis placeholders in the very skill this
|
||||||
|
phase renames — `architect/SKILL.md:55` `[NNN](…)` and `revise.md:16`
|
||||||
|
`[NNN](blueprints/…)`: links to nothing, pretending to be links. Repaired
|
||||||
|
here, since a lint that cannot go green is no precondition at all.
|
||||||
|
|
||||||
|
**Why a fourth script.** `okf-check` validates frontmatter `cites:`, not prose
|
||||||
|
links; `skill-check` counts lines; `render-check` compares fenced blocks. None
|
||||||
|
resolves a link target, and widening one changes the argv contract
|
||||||
|
[019](B-019-add-a-render-lint-over-the-loop-shape.md) §*Why a third script* set
|
||||||
|
for this case. [016](../decisions/R-016-one-okf-check-validator.md) is not
|
||||||
|
crossed: it settles how *OKF conformance* is enforced, and 017 already shipped
|
||||||
|
a second validator under it.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**A script at `skills/loop/write-okf/scripts/link-check`, taking a repo root:
|
||||||
|
`link-check <repo-root>`.** It mirrors its three siblings — same argv shape,
|
||||||
|
`WARN `/`ERROR ` prefixes, closing `N error(s), M warning(s)` tally, exit
|
||||||
|
codes (1 on any error, 0 otherwise, 2 on usage), and `python3` shebang.
|
||||||
|
|
||||||
|
**What it walks.** Every `*.md` from the repo root, **dot-directories and
|
||||||
|
`OKF/blueprints/` skipped** — `render-check`'s walk, exactly. The root is the
|
||||||
|
repo, not either subtree, because the loop's links cross `skills/`↔`OKF/` both
|
||||||
|
ways. `decisions/`, `learnings/` and `ferries/` stay linted: they hold no path
|
||||||
|
into a renameable skill directory. **Fenced blocks are skipped** — a line
|
||||||
|
opening or closing a ``` fence toggles the skip, and links between them are
|
||||||
|
not read.
|
||||||
|
|
||||||
|
**What counts as a link, and how it resolves.** The target inside `](...)`,
|
||||||
|
excluding any beginning `http://`, `https://`, `mailto:` or `#`. Split the
|
||||||
|
fragment off at `#`, resolve the remaining path against the **containing
|
||||||
|
file's directory**; it resolves if that path exists — existence only, so a
|
||||||
|
directory target resolves as a directory.
|
||||||
|
|
||||||
|
**What it reports.** One `ERROR` line per unresolvable link — repo-relative
|
||||||
|
file, 1-indexed line, raw target: `ERROR skills/loop/moor/SKILL.md:41:
|
||||||
|
unresolvable link: ../architect/SKILL.md`. Errors only; an unresolvable link
|
||||||
|
is always a defect, so there is no warning band, though the tally still prints
|
||||||
|
both counts — `render-check` hardcodes `0 warning(s)` for the same reason.
|
||||||
|
|
||||||
|
**Where it lives, and registration.** Under `write-okf/scripts/` beside
|
||||||
|
`okf-check` and `render-check`, per
|
||||||
|
[019](B-019-add-a-render-lint-over-the-loop-shape.md)'s placement rule.
|
||||||
|
`write-okf/SKILL.md`'s *run and output pasted* line grows to name it.
|
||||||
|
|
||||||
|
**The two repairs.** `architect/SKILL.md:55` and `architect/revise.md:16` stop
|
||||||
|
being links: `[NNN](…)` becomes `` `NNN` ``, `[NNN](blueprints/…)` becomes
|
||||||
|
`` `blueprints/NNN-<slug>.md` ``. Same information, no dangling target.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/link-check` — the CLI (argv arity, exit codes
|
||||||
|
0/1/2, `ERROR ` format, tally) and target classification (skipped: external,
|
||||||
|
fragment-only, fenced, under `OKF/blueprints/`).
|
||||||
|
- `skills/loop/write-okf/SKILL.md` — the run-and-paste obligation.
|
||||||
|
- `skills/loop/architect/SKILL.md`, `skills/loop/architect/revise.md` — the
|
||||||
|
two ellipsis placeholders, as prose not links.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd <repo-root>; LINT=skills/loop/write-okf/scripts/link-check
|
||||||
|
B=skills/loop/moor/SKILL.md; L='[x](../nonexistent-abc/SKILL.md)'
|
||||||
|
F=$(printf '\140\140\140') # a fence, without closing this one
|
||||||
|
|
||||||
|
$LINT . && echo "OK clean" || echo "FAIL clean" # two repairs make this reachable
|
||||||
|
printf '\n%s\n' "$L" >> $B # the check can fail
|
||||||
|
$LINT . | grep -q "ERROR $B:[0-9]*: .*nonexistent-abc" && echo "OK caught" || echo "FAIL caught"
|
||||||
|
$LINT . >/dev/null; [ $? -eq 1 ] && echo "OK exit1" || echo "FAIL exit1"
|
||||||
|
jj restore $B # git: git checkout -- $B
|
||||||
|
printf '\n%s\n%s\n%s\n' "$F" "$L" "$F" >> $B # a fenced break is illustration
|
||||||
|
$LINT . >/dev/null && echo "OK fenced" || echo "FAIL fenced"
|
||||||
|
jj restore $B
|
||||||
|
$LINT . | grep -q 'OKF/blueprints/' && echo "FAIL bp" || echo "OK bp"
|
||||||
|
$LINT >/dev/null 2>&1; [ $? -eq 2 ] && echo "OK usage" || echo "FAIL usage"
|
||||||
|
$LINT /nonexistent >/dev/null 2>&1; [ $? -eq 2 ] && echo "OK root" || echo "FAIL root"
|
||||||
|
$LINT . | grep -qE 'https?://|mailto:' && echo "FAIL ext" || echo "OK ext"
|
||||||
|
```
|
||||||
|
|
||||||
|
Every check prints `OK`, no `FAIL` appears, and the clean-tree tally reads
|
||||||
|
`0 error(s), 0 warning(s)`.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **Moving the 26 links phase 12 breaks** — phase 12's work; this builds the
|
||||||
|
net. Only the two ellipsis placeholders are repaired here, without which the
|
||||||
|
lint cannot reach green and the precondition is unsatisfiable.
|
||||||
|
- **Repairing the 9 stale links inside `OKF/blueprints/`** (`003:21`,
|
||||||
|
`010:19-21,66`) — sealed history; the exclusion is the ruling, not an
|
||||||
|
oversight.
|
||||||
|
- **Inline-code spans.** A link inside backticks in prose is still read. No
|
||||||
|
live page does that outside a fence, so a rule would fail
|
||||||
|
[sieve](../../skills/engineering/sieve/SKILL.md)'s Real test.
|
||||||
|
- **Anchor validation, external URL liveness, reference-style links, HTML
|
||||||
|
`<a href>`, non-`.md` files.** Different failure modes; a rename breaks the
|
||||||
|
path of an inline markdown link, which is the whole surface the loop uses.
|
||||||
|
- **Wiring beyond the run-and-paste line** — no justfile, hook or CI; the
|
||||||
|
three existing lints are obliged by prose alone.
|
||||||
|
- **Absorbing any sibling into one validator** — four scripts sharing one argv
|
||||||
|
contract is [019](B-019-add-a-render-lint-over-the-loop-shape.md)'s settled
|
||||||
|
shape.
|
||||||
@ -0,0 +1,150 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: ROADMAP.md phase 12
|
||||||
|
sounded: 2026-07-31
|
||||||
|
cites:
|
||||||
|
- OKF/ROADMAP.md:the spine gets nautical names
|
||||||
|
- OKF/ARCHITECTURE.md
|
||||||
|
- skills/loop/chart/SKILL.md
|
||||||
|
- skills/loop/rig/SKILL.md
|
||||||
|
- skills/loop/ferry/SKILL.md
|
||||||
|
- skills/loop/steer/SKILL.md
|
||||||
|
- skills/loop/write-okf/scripts/render-check
|
||||||
|
- OKF/blueprints/B-022-validate-every-cite-at-every-status.md
|
||||||
|
- OKF/learnings/loop.md
|
||||||
|
- OKF/decisions/R-019-recon-may-self-fire.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# 024 — rename the spine to chart and rig, and give chart its ferry edge
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
[ROADMAP.md](../ROADMAP.md) phase 12, its **Precondition** cleared by
|
||||||
|
[023](B-023-add-a-link-lint-over-relative-md-links.md). `architect` and `weave`
|
||||||
|
are the only spine skills named for a trade, not a passage — unlike ferry,
|
||||||
|
moor, sound, call-charon and steer.
|
||||||
|
|
||||||
|
**The rename is not the risk; the pointers are.** A directory rename silently
|
||||||
|
breaks four kinds of pointer, each caught by a different check or by none:
|
||||||
|
**26 relative links** across **24 files** (`link-check`); **9 `cites:`** —
|
||||||
|
live at `decisions/002:7`, `005:7`, `learnings/loop.md:8`, sealed at
|
||||||
|
`018:16,18`, `020:14-15`, `022:12-13` (`okf-check`); **`render-check`'s
|
||||||
|
`RETIRED` constant** at `:23`, a string and not a link yet a hit for the
|
||||||
|
phase's own grep; and **two symlinks** in `~/.claude/skills/`, checked by
|
||||||
|
nothing.
|
||||||
|
|
||||||
|
**Sealed pages move their cites, and only their cites.**
|
||||||
|
[022](B-022-validate-every-cite-at-every-status.md) settled it: *a cite is a
|
||||||
|
working pointer, so every page carries the rule at every status — a
|
||||||
|
blueprint's `cites:` are not frozen by lock*. The nine repairs are therefore
|
||||||
|
obligations, not append-only violations — while the *prose* of those same
|
||||||
|
pages (`020:93-94`, `022:95`, `010:103`, `011:74`, every `Source: weave of
|
||||||
|
blueprint N`) is the record and stays. Frontmatter moves, body does not.
|
||||||
|
|
||||||
|
**Four implemented Verifies name what this deletes** — `018` and `019` the
|
||||||
|
strings `weave = bdd` and `architect → blueprint`, `020` and `022` the path
|
||||||
|
`skills/loop/architect/…`. [learnings/loop.md](../learnings/loop.md) records
|
||||||
|
that a blueprint moving a path owes this census, and that B-019 was stranded
|
||||||
|
so by B-021. All four are `implemented`: never run again, never repairable.
|
||||||
|
|
||||||
|
**The honest fork.** `ferry` names `architect` three times; `architect` names
|
||||||
|
`ferry` never — so a phase too big to blueprint has no documented exit from
|
||||||
|
the skill that wrote it. Phase 12 rules the edge is opened by `chart` itself,
|
||||||
|
**never** by flipping ferry's `disable-model-invocation`, since
|
||||||
|
[019](../decisions/R-019-recon-may-self-fire.md) exempts read-only recon only.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**`architect` becomes `chart`; `weave` becomes `rig`.** Directory
|
||||||
|
`skills/loop/<new>/`, frontmatter `name:`, `# <heading>`, every occurrence in
|
||||||
|
any `description:`, and every word-boundary use in prose across `skills/`,
|
||||||
|
`README.md` and the live OKF pages. Where the old word carried a verb sense
|
||||||
|
the new one does not (`mid-weave`, `weaves`), the sentence is rephrased, not
|
||||||
|
substituted. Sibling files (`greenfield.md`, `revise.md`) move with the
|
||||||
|
directory under their existing names.
|
||||||
|
|
||||||
|
**The 26 links** repoint to `…/chart/` and `…/rig/`; only the last segment
|
||||||
|
moves, so `../../loop/weave/…` from `engineering/` keeps its depth.
|
||||||
|
|
||||||
|
**Flow 1 and its two byte-copies** — [ARCHITECTURE.md](../ARCHITECTURE.md)
|
||||||
|
§Main flows, `README.md` §loop, `steer` §The loop — change names only; the
|
||||||
|
box-drawing shape, the yes/no fork and the 1-vs-N executor fork are unchanged,
|
||||||
|
and `render-check` proves the three stay identical. **§Module map** also drops
|
||||||
|
*"Blueprint, ferry, weave, steer land per ROADMAP.md"* — all four shipped.
|
||||||
|
|
||||||
|
**`render-check`'s `RETIRED` becomes `"chart → blueprint"`.** It guards the
|
||||||
|
retired *flat* form — a spine with no fork — and after the rename that form
|
||||||
|
can only be hand-copied back under the new name. Both literals survive only in
|
||||||
|
`OKF/blueprints/`, which `render-check` skips.
|
||||||
|
|
||||||
|
**Eleven `cites:` repoint** — the nine above (`018`'s two keeping their
|
||||||
|
surviving `:symbol` suffixes) **plus this blueprint's own two**: it cites what
|
||||||
|
it edits by path alone, per `learnings/loop.md`, so the run that lands it
|
||||||
|
repairs its own pointers before the tally is read.
|
||||||
|
|
||||||
|
**`chart` gains the ferry edge** as prose, not a new fork in the diagram: a
|
||||||
|
phase whose arc spans more than one blueprint or session hands to
|
||||||
|
[ferry](../../skills/loop/ferry/SKILL.md), and `chart`'s See-also names it.
|
||||||
|
`chart` also states the **single-request terminal as designed** — a lone
|
||||||
|
request traces to `user request <date>` and opens no phase
|
||||||
|
([ROADMAP.md](../ROADMAP.md) §Phases), so its absence reads as a rule, not a
|
||||||
|
gap. Ferry's `disable-model-invocation` stays `true`.
|
||||||
|
|
||||||
|
**The two symlinks** `~/.claude/skills/{architect,weave}` become
|
||||||
|
`{chart,rig}` on the new directories; the old two are removed, not dangling.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/chart/`, `skills/loop/rig/` — the two skill interfaces:
|
||||||
|
frontmatter `name:`/`description:`, SKILL.md body, directory path.
|
||||||
|
- `skills/loop/chart/SKILL.md` — the ferry hand-off and the single-request
|
||||||
|
terminal, in §Shared rules and §See also.
|
||||||
|
- `OKF/ARCHITECTURE.md` flow 1 — the canonical render, plus its byte-copy
|
||||||
|
sites in `README.md` and `steer/SKILL.md`.
|
||||||
|
- `skills/loop/write-okf/scripts/render-check` — the `RETIRED` constant.
|
||||||
|
- Frontmatter `cites:` on `OKF/decisions/002`, `005`, `learnings/loop.md`,
|
||||||
|
`OKF/blueprints/018`, `020`, `022`, `024`.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd <repo-root>; S=skills/loop/write-okf/scripts; K=~/.claude/skills
|
||||||
|
$S/link-check . ; $S/render-check . ; $S/okf-check OKF/
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-check skills/ | tail -1
|
||||||
|
grep -rniw 'architect\|weave' skills/ README.md AGENTS.md && echo "FAIL names" || echo "OK names"
|
||||||
|
[ -d skills/loop/chart ] && [ -d skills/loop/rig ] && echo "OK dirs" || echo "FAIL dirs"
|
||||||
|
[ ! -e skills/loop/architect ] && [ ! -e skills/loop/weave ] && echo "OK old" || echo "FAIL old"
|
||||||
|
grep -qx 'name: chart' skills/loop/chart/SKILL.md &&
|
||||||
|
grep -qx 'name: rig' skills/loop/rig/SKILL.md && echo "OK fm" || echo "FAIL fm"
|
||||||
|
[ "$(readlink $K/chart)" = "$PWD/skills/loop/chart" ] &&
|
||||||
|
[ "$(readlink $K/rig)" = "$PWD/skills/loop/rig" ] && echo "OK sym" || echo "FAIL sym"
|
||||||
|
[ ! -L $K/architect ] && [ ! -L $K/weave ] && echo "OK unsym" || echo "FAIL unsym"
|
||||||
|
grep -q '\.\./ferry/SKILL\.md' skills/loop/chart/SKILL.md && echo "OK edge" || echo "FAIL edge"
|
||||||
|
grep -qx 'disable-model-invocation: true' skills/loop/ferry/SKILL.md && echo "OK ferry" || echo "FAIL ferry"
|
||||||
|
```
|
||||||
|
|
||||||
|
`link-check`, `render-check` and `okf-check` each print
|
||||||
|
`0 error(s), 0 warning(s)`; `skill-check` prints `0 error(s), 9 warning(s)`;
|
||||||
|
every other line prints `OK`, no `FAIL` appears. **Run condition:** clear
|
||||||
|
gitignored `HANDOFF.md` first — `link-check` walks it (see §Out of scope).
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **Repairing the four stranded Verify blocks** (`018`–`020`, `022`).
|
||||||
|
Immutable and `implemented`; the census above is the deliverable.
|
||||||
|
- **Sealed prose naming the old skills** — `020:93-94`, `022:95`, `010:103`,
|
||||||
|
`011:74`, `decisions/002`'s title and filename, every `Source: weave of
|
||||||
|
blueprint N`, `index.md:36`. The phase's grep spans `skills/`, `README.md`
|
||||||
|
and `AGENTS.md` only; the record says what was true when written.
|
||||||
|
- **The nine live pre-split `OKF/LEARNINGS.md` pointers**, one in
|
||||||
|
`weave/SKILL.md:54` — a separate census, carried by `HANDOFF.md`.
|
||||||
|
- **Teaching `link-check` to skip gitignored files or backticked spans.**
|
||||||
|
[023](B-023-add-a-link-lint-over-relative-md-links.md) ruled inline-code spans
|
||||||
|
unreal; `HANDOFF.md` makes them real, but that Contract is sealed — the fix
|
||||||
|
is a supersession, not a line in a rename.
|
||||||
|
- **Any change to the loop's shape** — no fork added or removed, no
|
||||||
|
`disable-model-invocation` flipped. Names, and one documented hand-off.
|
||||||
|
- **Renaming any other skill, or flattening `skills/<category>/`** — phase 14.
|
||||||
|
- **Glossary entries for `chart`/`rig`** beyond the one word at
|
||||||
|
`CONTEXT.md:38` — neither is contested, and the page is at 109/110.
|
||||||
104
OKF/blueprints/B-025-rule-muster-on-every-blueprint.md
Normal file
104
OKF/blueprints/B-025-rule-muster-on-every-blueprint.md
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-31
|
||||||
|
sounded: 2026-07-31
|
||||||
|
muster: true
|
||||||
|
review-base: llookqnr
|
||||||
|
tally:
|
||||||
|
intent: blueprint rules muster out loud — true on the form-not-meaning criterion, else an explicit false carrying its reason — and step 5 shows the ruling before the lock
|
||||||
|
matches: yes
|
||||||
|
note: reviewed at the halt over review-base..@, 2 files +7/-2; first muster ever run in this repo
|
||||||
|
cites:
|
||||||
|
- skills/loop/blueprint/SKILL.md
|
||||||
|
- OKF/blueprints/B-011-add-blueprint-level-muster.md
|
||||||
|
- skills/loop/rig/SKILL.md:Muster (only if
|
||||||
|
- skills/loop/blueprint/blueprint-format.md:opts into the human review gate
|
||||||
|
- skills/loop/write-okf/scripts/okf-check:muster is opt-in
|
||||||
|
---
|
||||||
|
|
||||||
|
# 025 — rule muster on every blueprint
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
**The gate works and has never fired.** [011](B-011-add-blueprint-level-muster.md)
|
||||||
|
shipped blueprint-level muster: `muster: true` makes `rig` halt after the
|
||||||
|
seal, show the whole `review-base..@` diff, and record a `tally:` the human
|
||||||
|
signs. `okf-check` enforces it — a muster blueprint cannot reach
|
||||||
|
`implemented` without its tally. Yet **no blueprint has ever carried the
|
||||||
|
field**: `grep -c '^muster:' OKF/blueprints/*.md` hits nothing across all 24.
|
||||||
|
The machinery is live everywhere else — `rig:27,44`, `moor:27`,
|
||||||
|
`okf-layout.md:92`, the format page — and no page has ever fired it. An
|
||||||
|
opt-in nobody reaches is a feature that exists only in the record.
|
||||||
|
|
||||||
|
**Absence is not a ruling.** Today a missing `muster:` is indistinguishable
|
||||||
|
from a considered no — `rig` step 6 skips silently either way, so nothing
|
||||||
|
marks whether the gate was declined or forgotten. B-011 already made
|
||||||
|
`muster: false` legal — *absent or false → no base, no halt, no tally* — so
|
||||||
|
the explicit no needs no new grammar, only the discipline to write it. B-024
|
||||||
|
renamed 38 files on green lints that prove links resolve and blocks stay
|
||||||
|
byte-identical, and prove nothing about whether the renamed prose reads
|
||||||
|
right. That is exactly the shape muster was built for, and it was never
|
||||||
|
considered.
|
||||||
|
|
||||||
|
**Cheapest true fix: rule it, don't default it.** The user's ruling this
|
||||||
|
session: keep the opt-in, make `blueprint` decide out loud. The decision then
|
||||||
|
lands where it is already reviewed — step 5 shows the draft, and the lock is
|
||||||
|
the user's yes. No new question, no interview; `blueprint` is synthesis and
|
||||||
|
stays synthesis.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**`blueprint` rules muster before showing the draft.** §Process step 3 gains
|
||||||
|
a fourth sub-bullet, *Muster*: rule the gate on or off and record the ruling.
|
||||||
|
On → `muster: true`; off → **`muster: false`**, the form B-011 already
|
||||||
|
allows, with the reason in the same line's trailing comment. Silent absence
|
||||||
|
stops being a legal outcome of writing a blueprint, and the ruling stays
|
||||||
|
grep-able instead of buried in prose.
|
||||||
|
|
||||||
|
**The criterion is what the Verify cannot see.** Muster on when the Verify
|
||||||
|
proves form but not meaning — prose, doctrine, renames, any change whose
|
||||||
|
checks go green on text that reads wrong. Off when the Verify observes the
|
||||||
|
behaviour the change is for: a script's output, a failing test made to pass.
|
||||||
|
|
||||||
|
**Step 5 carries the ruling to the user.** "Show the blueprint" states the
|
||||||
|
muster ruling in one line so an unwanted gate is overruled before the lock,
|
||||||
|
not after. The lock itself is unchanged.
|
||||||
|
|
||||||
|
**This blueprint rules itself on.** It edits doctrine prose; its Verify can
|
||||||
|
grep that the words exist and cannot see whether they are followed.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/blueprint/SKILL.md` — §Process step 3 (the ruling) and
|
||||||
|
step 5 (showing it). The skill's interface: its procedure.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd <repo-root>
|
||||||
|
grep -q 'muster: false' skills/loop/blueprint/SKILL.md && echo "OK step" || echo "FAIL step"
|
||||||
|
grep -qx 'muster: true' OKF/blueprints/B-025-rule-muster-on-every-blueprint.md &&
|
||||||
|
echo "OK self" || echo "FAIL self"
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-check skills/ | tail -1
|
||||||
|
skills/loop/write-okf/scripts/link-check . ; skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
```
|
||||||
|
|
||||||
|
`skill-check` prints `0 error(s), 9 warning(s)`; `link-check` and `okf-check`
|
||||||
|
print `0 error(s), 0 warning(s)`; both greps print `OK`. `rig` halts at step 6
|
||||||
|
for the muster tally before flipping this blueprint's status.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **Changing muster's default.** Absent stays off, exactly as B-011 rules it;
|
||||||
|
this makes the choice visible, not automatic.
|
||||||
|
- **Any validator change.** `okf-check` keeps its one muster rule
|
||||||
|
(`muster: true` → `tally:` required at `implemented`); `muster: false` stays
|
||||||
|
inert to it and nothing checks that a ruling was made. The rule lands where
|
||||||
|
its next reader looks — phase 10's lesson, `ROADMAP.md` §Risks.
|
||||||
|
- **`blueprint-format.md`** — the `muster:` / `review-base:` / `tally:`
|
||||||
|
grammar already exists and is correct; only the procedure changes.
|
||||||
|
- **Ferry-level muster** at `moor` ([012](B-012-add-ferry-level-muster.md)) —
|
||||||
|
a different gate on a different unit.
|
||||||
|
- **Retro-mustering implemented blueprints**, B-024 included. Muster gates a
|
||||||
|
close; a closed one has nothing left to gate.
|
||||||
150
OKF/blueprints/B-026-walk-only-what-git-does-not-ignore.md
Normal file
150
OKF/blueprints/B-026-walk-only-what-git-does-not-ignore.md
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-07-31
|
||||||
|
sounded: 2026-07-31
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/scripts/link-check
|
||||||
|
- skills/loop/write-okf/scripts/render-check
|
||||||
|
- OKF/blueprints/B-023-add-a-link-lint-over-relative-md-links.md:What it walks
|
||||||
|
- OKF/blueprints/B-019-add-a-render-lint-over-the-loop-shape.md:dot-directories skipped
|
||||||
|
- OKF/blueprints/B-024-rename-the-spine-and-give-chart-its-ferry-edge.md:that Contract is sealed
|
||||||
|
- OKF/blueprints/B-022-validate-every-cite-at-every-status.md:its Contract and Verify are not touched
|
||||||
|
- OKF/ROADMAP.md
|
||||||
|
muster: true
|
||||||
|
review-base: yommvsuw
|
||||||
|
tally:
|
||||||
|
intent: share one git-aware walk so an ignored page cannot redden a gate
|
||||||
|
matches: yes
|
||||||
|
---
|
||||||
|
|
||||||
|
# 026 — walk only what git does not ignore
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
**A repo-wide gate reddens on a file the repo does not own.** `HANDOFF.md` is
|
||||||
|
gitignored, yet both lints walk it, so scratch prose can fail the tree. The
|
||||||
|
cost is paid: [024](B-024-rename-the-spine-and-give-chart-its-ferry-edge.md)
|
||||||
|
carries *clear gitignored `HANDOFF.md` first* as a **run condition**, and a
|
||||||
|
handoff must be written link-free, quoting no lint constant. 024 §Out of scope
|
||||||
|
declines it *"but that Contract is sealed — the fix is a supersession, not a
|
||||||
|
line in a rename."*
|
||||||
|
|
||||||
|
**The measured census.** Exactly **one** `.md` in the walk is ignored —
|
||||||
|
`HANDOFF.md`; nothing untracked. **Zero** of 516 relative links sit inside
|
||||||
|
inline-code spans, so [023](B-023-add-a-link-lint-over-relative-md-links.md)'s
|
||||||
|
ruling that inline-code spans are unreal holds for every page left once the
|
||||||
|
ignored one goes — the only page wanting one is the only ignored page. The
|
||||||
|
backtick rule earns nothing, failing
|
||||||
|
[sieve](../../skills/engineering/sieve/SKILL.md)'s Real test.
|
||||||
|
|
||||||
|
**Why both lints.** `pages()` is **byte-identical** in the two, `SKIP`
|
||||||
|
included, and `render-check` holds a retired-form constant a handoff cannot
|
||||||
|
quote either. Fixing one and leaving its twin is the shape this repo has
|
||||||
|
mechanised three times — [017](B-017-add-a-line-cap-lint-over-skills.md),
|
||||||
|
[019](B-019-add-a-render-lint-over-the-loop-shape.md) and
|
||||||
|
[020](B-020-enforce-the-prune-and-validate-every-cite.md). `okf-check` and
|
||||||
|
`skill-check` cannot reach an ignored page.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**One shared walk, at `skills/loop/write-okf/scripts/_pages.py`.** Both lints
|
||||||
|
import it and neither keeps a private `pages()`. A sibling module is importable
|
||||||
|
because `python3 <script>` puts the script's directory on `sys.path`; the
|
||||||
|
scripts keep their extensionless names and shebangs.
|
||||||
|
|
||||||
|
**What the walk yields.** Every `*.md` under the root that **git does not
|
||||||
|
ignore**, still with **dot-directories and `OKF/blueprints/` skipped**, still
|
||||||
|
sorted, still as `(page, rel)`. Ignoredness comes from one
|
||||||
|
`git -C <root> ls-files -z --cached --others --exclude-standard -- '*.md'`
|
||||||
|
call: tracked plus untracked-but-not-ignored is exactly *not ignored*, so a
|
||||||
|
page is walked **before it is ever added** — a `.md` census, not a staging
|
||||||
|
gate.
|
||||||
|
|
||||||
|
**Outside a repo git owns, the walk does not shrink.** If the call fails for
|
||||||
|
any reason — not a git repo, no git on `PATH` — the walk falls back to today's
|
||||||
|
`rglob`. A lint that goes quiet is worse than one that over-reports, so the
|
||||||
|
failure mode is the old behaviour, not an empty census.
|
||||||
|
|
||||||
|
**Neither lint changes in any other way** — argv shape, `ERROR ` format,
|
||||||
|
tallies, exit codes 0/1/2, fence handling, link classification, render-site
|
||||||
|
comparison, all as [023](B-023-add-a-link-lint-over-relative-md-links.md) and
|
||||||
|
[019](B-019-add-a-render-lint-over-the-loop-shape.md) set them.
|
||||||
|
|
||||||
|
**Both superseded blueprints flip status only.** 023 and 019 each state the old
|
||||||
|
walk in their Contract; that sentence stops being true, so each takes
|
||||||
|
`superseded-by-026` in frontmatter and on its `OKF/index.md` line. **Their
|
||||||
|
Contract and Verify are not touched**, per
|
||||||
|
[022](B-022-validate-every-cite-at-every-status.md) — every clause not re-ruled
|
||||||
|
above stands as written there. 019 is superseded although the loop shape, its
|
||||||
|
subject, is untouched: the test is whether a Contract sentence stops being
|
||||||
|
true, not whether the blueprint's subject moved.
|
||||||
|
|
||||||
|
**`HANDOFF.md` stops being a special case.** Its two writing constraints and
|
||||||
|
024's run condition are lifted; nothing need be written around a lint.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/_pages.py` — **new**: `pages(root)`, its git
|
||||||
|
call, and the fallback.
|
||||||
|
- `skills/loop/write-okf/scripts/link-check` — imports `pages`, drops its own
|
||||||
|
and its now-unused `SKIP`; docstring gains the walk's rule.
|
||||||
|
- `skills/loop/write-okf/scripts/render-check` — the same two edits; `SKIP`
|
||||||
|
moves, `OWNER`/`SENTINEL`/`RETIRED` stay.
|
||||||
|
- `OKF/blueprints/023-*.md`, `019-*.md`, `OKF/index.md` — status words only.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd <repo-root>
|
||||||
|
LINK=skills/loop/write-okf/scripts/link-check
|
||||||
|
REND=skills/loop/write-okf/scripts/render-check
|
||||||
|
L='[x](../nonexistent-abc/SKILL.md)'
|
||||||
|
R=$(grep -m1 '^RETIRED' $REND | cut -d'"' -f2) # the constant, never quoted
|
||||||
|
|
||||||
|
$LINK . && echo "OK link clean" || echo "FAIL link clean"
|
||||||
|
$REND . && echo "OK rend clean" || echo "FAIL rend clean"
|
||||||
|
|
||||||
|
cp HANDOFF.md /tmp/h.bak # the ignored page leaves both
|
||||||
|
printf '\n%s\n%s\n' "$L" "$R" >> HANDOFF.md
|
||||||
|
$LINK . >/dev/null && echo "OK link skips ignored" || echo "FAIL link skips ignored"
|
||||||
|
$REND . >/dev/null && echo "OK rend skips ignored" || echo "FAIL rend skips ignored"
|
||||||
|
cp /tmp/h.bak HANDOFF.md; rm /tmp/h.bak
|
||||||
|
|
||||||
|
B=skills/loop/moor/SKILL.md # a tracked page is still walked
|
||||||
|
printf '\n%s\n' "$L" >> $B
|
||||||
|
$LINK . | grep -q "ERROR $B:" && echo "OK tracked caught" || echo "FAIL tracked caught"
|
||||||
|
jj restore $B # git: git checkout -- $B
|
||||||
|
|
||||||
|
N=OKF/zz-probe.md # walked before any add
|
||||||
|
printf '# probe\n\n%s\n' "$L" > $N
|
||||||
|
$LINK . | grep -q "ERROR $N:" && echo "OK new page walked" || echo "FAIL new page walked"
|
||||||
|
rm $N
|
||||||
|
|
||||||
|
T=$(mktemp -d); printf '# t\n\n[x](nope.md)\n' > $T/a.md # no repo, no shrink
|
||||||
|
$LINK $T | grep -q 'ERROR a.md' && echo "OK non-git" || echo "FAIL non-git"
|
||||||
|
rm -rf $T
|
||||||
|
|
||||||
|
$LINK . | grep -q 'OKF/blueprints/' && echo "FAIL bp" || echo "OK bp"
|
||||||
|
$LINK >/dev/null 2>&1; [ $? -eq 2 ] && echo "OK usage" || echo "FAIL usage"
|
||||||
|
$LINK /nonexistent >/dev/null 2>&1; [ $? -eq 2 ] && echo "OK root" || echo "FAIL root"
|
||||||
|
```
|
||||||
|
|
||||||
|
Every check prints `OK`, no `FAIL` appears, and both clean-tree tallies read
|
||||||
|
`0 error(s), 0 warning(s)` — with **no run condition**, `HANDOFF.md` left
|
||||||
|
exactly as the session wrote it.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- **Skipping backticked spans.** 023 ruled it unreal at 0 live occurrences; the
|
||||||
|
census above still reads 0, and this walk removes the only page that wanted
|
||||||
|
it. Re-rule it when a *tracked* page needs a link inside backticks.
|
||||||
|
- **`ROADMAP.md` §Risks & gotchas.** [chart](../../skills/loop/chart/SKILL.md)
|
||||||
|
owns that page and has already carried the entry — this blueprint does not
|
||||||
|
edit it.
|
||||||
|
- **`okf-check` and `skill-check`.** Neither walk can reach an ignored page;
|
||||||
|
changing them would be a fix to nothing.
|
||||||
|
- **Absorbing any sibling into one validator** — four scripts sharing one argv
|
||||||
|
contract stays [019](B-019-add-a-render-lint-over-the-loop-shape.md)'s shape.
|
||||||
|
`_pages.py` is a helper, not a fifth lint: it has no `main`.
|
||||||
|
- **Honouring `.jjignore` apart from git** — this colocated repo's are git's.
|
||||||
98
OKF/blueprints/B-027-error-on-implemented-with-matches-no.md
Normal file
98
OKF/blueprints/B-027-error-on-implemented-with-matches-no.md
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-09-23
|
||||||
|
sounded: 2026-09-23
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/scripts/okf-check:muster is opt-in
|
||||||
|
- skills/loop/write-okf/scripts/okf-check:tally
|
||||||
|
- skills/loop/rig/SKILL.md:never flip on a known miss
|
||||||
|
- skills/loop/blueprint/blueprint-format.md:tally
|
||||||
|
muster: false # Verify constructs the exact matches:no/implemented/muster:true
|
||||||
|
# case and asserts the new error fires — it proves the
|
||||||
|
# semantic gap is closed, not just that the tree stays green.
|
||||||
|
---
|
||||||
|
|
||||||
|
# 027 — error when a mustered blueprint reaches implemented on matches: no
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
`okf-check` errors when a `muster: true` blueprint reaches `implemented`
|
||||||
|
without a `tally:` block at all
|
||||||
|
([okf-check:muster is opt-in](../../skills/loop/write-okf/scripts/okf-check)),
|
||||||
|
but it only checks that the block **exists** — it never reads the verdict
|
||||||
|
inside it. A blueprint carrying `tally: matches: no` passes the same check
|
||||||
|
`implemented` requires, silently. [rig](../../skills/loop/rig/SKILL.md)'s
|
||||||
|
prose already says the loop must
|
||||||
|
[never flip on a known miss](../../skills/loop/rig/SKILL.md), but nothing
|
||||||
|
enforces it — the exact shape
|
||||||
|
[025](B-025-rule-muster-on-every-blueprint.md) closed one level up, where an
|
||||||
|
absent ruling was indistinguishable from a considered no. Carried across four
|
||||||
|
handoffs as an open question; flagged a blueprint candidate since the
|
||||||
|
2026-07-31 handoff.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
`okf-check` errors on a page under `blueprints/` whose frontmatter has
|
||||||
|
`muster: true`, `status: implemented`, and a `tally:` block whose `matches`
|
||||||
|
field is `no`. The error fires whether or not `tally:` carries other fields.
|
||||||
|
It does not fire when `matches: yes`, when `muster` is absent or false, or
|
||||||
|
when `status` is not `implemented`. The existing missing-`tally:` error is
|
||||||
|
unchanged.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — the muster/tally check
|
||||||
|
(currently the block starting `# muster is opt-in`, ~line 289) and the
|
||||||
|
`tally()` helper it calls.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```bash
|
||||||
|
d=$(mktemp -d) && mkdir -p "$d/blueprints"
|
||||||
|
cat > "$d/index.md" <<'EOF'
|
||||||
|
---
|
||||||
|
type: Index
|
||||||
|
---
|
||||||
|
# Index
|
||||||
|
- [999](blueprints/999-fixture.md)
|
||||||
|
EOF
|
||||||
|
cat > "$d/blueprints/999-fixture.md" <<'EOF'
|
||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-09-23
|
||||||
|
muster: true
|
||||||
|
tally:
|
||||||
|
intent: fixture for the matches:no gap
|
||||||
|
matches: no
|
||||||
|
---
|
||||||
|
# 999 — fixture
|
||||||
|
## Justification
|
||||||
|
Fixture.
|
||||||
|
## Contract
|
||||||
|
Fixture.
|
||||||
|
## Seams touched
|
||||||
|
None.
|
||||||
|
## Verify
|
||||||
|
None.
|
||||||
|
## Out of scope
|
||||||
|
None.
|
||||||
|
EOF
|
||||||
|
skills/loop/write-okf/scripts/okf-check "$d" | grep "muster: true, implemented" && \
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
```
|
||||||
|
The fixture run must print an error naming the fixture page; the real-tree
|
||||||
|
run after it must stay `0 error(s), 0 warning(s)` (no existing blueprint
|
||||||
|
carries `matches: no` on an `implemented` page — checked by hand this
|
||||||
|
session).
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- Does not change [rig](../../skills/loop/rig/SKILL.md)'s halt behaviour —
|
||||||
|
that prose already exists; this only makes the mechanical gate agree with
|
||||||
|
it.
|
||||||
|
- Does not add or rename any frontmatter field.
|
||||||
|
- Does not retroactively re-check blueprints already `implemented` outside
|
||||||
|
this session's manual audit.
|
||||||
|
- Does not touch `skill-check`'s unrelated 9-warning baseline.
|
||||||
142
OKF/blueprints/B-028-convert-cross-skill-links-to-skill-names.md
Normal file
142
OKF/blueprints/B-028-convert-cross-skill-links-to-skill-names.md
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: ROADMAP.md phase 14
|
||||||
|
sounded: 2026-09-23
|
||||||
|
cites:
|
||||||
|
- OKF/ROADMAP.md
|
||||||
|
- OKF/decisions/R-023-cross-skill-references-are-unchecked-skill-names.md
|
||||||
|
- skills/loop/write-okf/scripts/link-check
|
||||||
|
- skills/productivity/conjure-a-skill/scripts/skill-check
|
||||||
|
- README.md
|
||||||
|
muster: true
|
||||||
|
review-base: myplnols
|
||||||
|
tally:
|
||||||
|
intent: convert 290 cross-skill links to unchecked /skill-name prose
|
||||||
|
so skill content resolves under any install depth, and stand up the
|
||||||
|
replacement lint plus install tooling
|
||||||
|
matches: yes
|
||||||
|
---
|
||||||
|
|
||||||
|
# 028 — convert cross-skill links to unchecked skill names
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
[ROADMAP.md phase 14](../ROADMAP.md) — the skills tree must resolve under
|
||||||
|
any install (symlink, flat copy, whole-tree). [023](../decisions/R-023-cross-skill-references-are-unchecked-skill-names.md)
|
||||||
|
already locked the mechanism: a cross-skill reference becomes a
|
||||||
|
backtick-wrapped `` `/skill-name` ``, never a path — mattpocock/skills'
|
||||||
|
own convention, verified upstream. This blueprint is the mechanical
|
||||||
|
conversion 023 left undone.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
Every markdown link in `skills/` whose target is a *different skill*
|
||||||
|
(`](../<name>/...)`, same category, or `](../../<category>/<name>/...)`,
|
||||||
|
cross category) is rewritten to plain prose: `` `/skill-name` `` —
|
||||||
|
backtick-wrapped, leading slash, kebab-case, the skill folder's own
|
||||||
|
name, no brackets, no path. 290 such links across 59 files. The
|
||||||
|
surrounding sentence is edited only as much as the changed reference
|
||||||
|
requires — no unrelated rewording.
|
||||||
|
|
||||||
|
**Untouched, explicitly:**
|
||||||
|
- The 7 links from a skill file to something repo-root-only — 5 into
|
||||||
|
`OKF/decisions/`, 2 into `../../../CLAUDE.md` — stay real relative
|
||||||
|
paths, `link-check` keeps validating them.
|
||||||
|
- A skill's link to its own sibling file (never names another skill) —
|
||||||
|
stays a real relative path.
|
||||||
|
- `skills/engineering/add-copilot-project-skill/skill-templates.md:104`
|
||||||
|
— a `](../AGENTS.md)` example inside a fenced block, template output
|
||||||
|
for a *consumer* project's own `AGENTS.md`, not an octobot link.
|
||||||
|
`link-check` already skips fenced blocks for this reason; the
|
||||||
|
conversion does too.
|
||||||
|
|
||||||
|
**New lint**, `skill-ref-check` (new script,
|
||||||
|
`skills/productivity/conjure-a-skill/scripts/skill-ref-check`, sibling to
|
||||||
|
`skill-check`, same single-purpose-validator convention): scans `skills/`
|
||||||
|
for `` `/skill-name` `` mentions, errors on any that don't match an
|
||||||
|
existing `skills/*/<name>/` folder. Same CLI contract as `skill-check`
|
||||||
|
(`skill-ref-check <skills-dir>`, exit 1 on any error).
|
||||||
|
|
||||||
|
**New script**, `scripts/link-skills.sh` (repo root — first file in a
|
||||||
|
`scripts/` directory at that level): symlinks every `skills/*/*/`
|
||||||
|
directory into both `~/.claude/skills/<name>` and
|
||||||
|
`~/.agents/skills/<name>`, mirroring mattpocock/skills'
|
||||||
|
`scripts/link-skills.sh` (existing symlink or non-symlink file at the
|
||||||
|
target path is removed and relinked; a destination that is itself a
|
||||||
|
symlink into this repo aborts with an error instead of self-linking).
|
||||||
|
|
||||||
|
**README.md** `## Install` section: the manual `for s in skills/*/*/`
|
||||||
|
loop is replaced with a pointer to running `scripts/link-skills.sh`. A
|
||||||
|
new paragraph documents `npx skills@latest add <owner/repo>` as the
|
||||||
|
install path for non-Claude-Code harnesses — the command is documented,
|
||||||
|
not live-verified here, since `lukabor/octobot` is private and unpushed
|
||||||
|
(user's call, tracked separately, not this blueprint's scope).
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/**/*.md` — every file carrying one of the 290 links (59 files).
|
||||||
|
- `skills/productivity/conjure-a-skill/scripts/skill-ref-check` (new) —
|
||||||
|
entry point `skill-ref-check <skills-dir>`.
|
||||||
|
- `scripts/link-skills.sh` (new) — entry point `scripts/link-skills.sh`,
|
||||||
|
no arguments.
|
||||||
|
- `README.md` — `## Install` section.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd <repo-root>
|
||||||
|
|
||||||
|
# 1. every cross-skill link is gone; the 7 escapes, sibling links, and
|
||||||
|
# the one fenced-block template example remain
|
||||||
|
grep -rEn '\]\(\.\./' skills/ | grep -vE '\.\./\.\./\.\./' \
|
||||||
|
| grep -v 'skill-templates.md:104' \
|
||||||
|
&& echo "FAIL leftover cross-skill links" || echo "OK links converted"
|
||||||
|
|
||||||
|
# 2. link-check still passes — OKF escapes + sibling links still resolve
|
||||||
|
skills/loop/write-okf/scripts/link-check . && echo "OK link-check" || echo "FAIL link-check"
|
||||||
|
|
||||||
|
# 3. new lint passes clean, and catches a planted typo
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-ref-check skills/ \
|
||||||
|
&& echo "OK skill-ref-check clean" || echo "FAIL skill-ref-check clean"
|
||||||
|
B=skills/loop/chart/SKILL.md
|
||||||
|
printf '\nSee `/skill-that-does-not-exist`.\n' >> $B
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-ref-check skills/ | grep -q 'skill-that-does-not-exist' \
|
||||||
|
&& echo "OK typo caught" || echo "FAIL typo caught"
|
||||||
|
head -n -2 $B > $B.tmp && mv $B.tmp $B # undo exactly the 2 appended lines —
|
||||||
|
# `jj restore`/`git checkout --` would
|
||||||
|
# discard any other uncommitted work on $B too
|
||||||
|
|
||||||
|
# 4. link-skills.sh symlinks resolve into this repo
|
||||||
|
scripts/link-skills.sh
|
||||||
|
for d in ~/.claude/skills ~/.agents/skills; do
|
||||||
|
for s in skills/*/*/; do
|
||||||
|
n=$(basename "${s%/}")
|
||||||
|
[ "$(readlink -f "$d/$n")" = "$(readlink -f "$s")" ] \
|
||||||
|
&& echo "OK $d/$n" || echo "FAIL $d/$n"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
# 5. tree still green
|
||||||
|
skills/loop/write-okf/scripts/render-check .
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-check skills/
|
||||||
|
```
|
||||||
|
|
||||||
|
Every check prints `OK`, no `FAIL` appears; all three tallies read
|
||||||
|
`0 error(s), 0 warning(s)` (skill-check's pre-existing 9 warnings are a
|
||||||
|
different, unrelated baseline — unchanged by this blueprint). `npx
|
||||||
|
skills@latest add <owner/repo>` is documented in README.md but not run
|
||||||
|
here — it needs the repo public, a separate decision.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- Flattening `skills/<category>/<name>/` itself — 023 rejected this.
|
||||||
|
- An install-time link-rewrite script — 023 rejected this.
|
||||||
|
- Making `lukabor/octobot` public, or pushing `main` — separate,
|
||||||
|
user-gated decisions (see `HANDOFF.md`).
|
||||||
|
- The 7 links from skill files into `OKF/decisions/` (5) and
|
||||||
|
`../../../CLAUDE.md` (2) — untouched, real paths.
|
||||||
|
- `~/.agents/skills` actually being scanned by any installed harness —
|
||||||
|
`link-skills.sh` populates it to mirror mattpocock's convention;
|
||||||
|
whether an agent reads from there is that harness's concern.
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: ROADMAP.md phase 15
|
||||||
|
sounded: 2026-09-23
|
||||||
|
cites:
|
||||||
|
- OKF/ROADMAP.md
|
||||||
|
- OKF/decisions/R-024-register-filenames-carry-their-prefix.md
|
||||||
|
- OKF/decisions/R-022-prose-cites-carry-a-register-prefix.md
|
||||||
|
- OKF/decisions/R-016-one-okf-check-validator.md
|
||||||
|
- OKF/decisions/R-009-index-is-the-page-plan.md
|
||||||
|
- OKF/decisions/R-015-moor-collapses-ferry-directory.md
|
||||||
|
- OKF/decisions/R-020-every-page-has-a-growth-path.md
|
||||||
|
- skills/loop/write-okf/scripts/okf-check
|
||||||
|
- OKF/index.md
|
||||||
|
- OKF/decisions/index.md
|
||||||
|
- OKF/learnings/index.md
|
||||||
|
muster: true
|
||||||
|
review-base: pxryqqmw
|
||||||
|
tally:
|
||||||
|
intent: okf-check validates OKF directory completeness (every dir with
|
||||||
|
.md files has an index.md, MAP.md-exempt for open ferry topics; every
|
||||||
|
index.md directly links its own .md siblings), and blueprints/ferries
|
||||||
|
normalize from root-inline to the delegate index.md pattern
|
||||||
|
matches: yes
|
||||||
|
---
|
||||||
|
|
||||||
|
# 029 — validate OKF directory completeness and normalize blueprints/ferries indexing
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
[ROADMAP.md phase 15](../ROADMAP.md) opens this arc; this blueprint is its
|
||||||
|
first piece. [024](../decisions/R-024-register-filenames-carry-their-prefix.md)
|
||||||
|
rules that decision and blueprint filenames carry their `R-`/`B-` prefix
|
||||||
|
going forward, superseding
|
||||||
|
[022](../decisions/R-022-prose-cites-carry-a-register-prefix.md)'s
|
||||||
|
bare-filename ruling. That decision's own Consequences note the gap this
|
||||||
|
blueprint closes: `blueprints/` and `ferries/` have no `index.md` today —
|
||||||
|
`OKF/index.md` inlines their listings directly instead — so a
|
||||||
|
filename-search workflow (`ls OKF/blueprints/ | grep B-`) has nowhere
|
||||||
|
directory-local to land for those two, unlike `decisions/` and
|
||||||
|
`learnings/`, which already delegate. [016](../decisions/R-016-one-okf-check-validator.md)
|
||||||
|
rules a single `okf-check` validator carries OKF conformance, so the two
|
||||||
|
new checks this blueprint adds extend it rather than starting a sibling
|
||||||
|
script. The retroactive rename of existing `NNN-<slug>.md` files to
|
||||||
|
`R-NNN-`/`B-NNN-<slug>.md` and the repo-wide link repair it requires is
|
||||||
|
**out of scope here** — a separate, later blueprint in the same phase.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
`okf-check` gains two errors, scoped to `OKF/` only (not `skills/`, which
|
||||||
|
keeps its `SKILL.md` entry-point convention untouched):
|
||||||
|
|
||||||
|
1. **Missing directory entry point.** Every directory under `OKF/` that
|
||||||
|
contains at least one `.md` file must itself contain an `index.md` —
|
||||||
|
*except* an open ferry topic directory (`OKF/ferries/<topic>/`, per
|
||||||
|
[015](../decisions/R-015-moor-collapses-ferry-directory.md)), which
|
||||||
|
satisfies this with `MAP.md` instead; a moored ferry is a single file,
|
||||||
|
not a directory, so it never triggers this check.
|
||||||
|
2. **Incomplete `index.md`.** Every `index.md` (not `MAP.md`, which has
|
||||||
|
its own D-n table format and is unaffected by this check) must
|
||||||
|
directly link every `.md` file that is a physical sibling in its own
|
||||||
|
directory — a page missing from its own directory's `index.md` is an
|
||||||
|
error, independent of `okf-check`'s existing transitive
|
||||||
|
reachable-from-root check, which this does not replace.
|
||||||
|
|
||||||
|
`OKF/index.md`'s `## Blueprints` and `## Ferries` sections stop inlining
|
||||||
|
every entry; each becomes one summary line + a link to a new
|
||||||
|
`blueprints/index.md` / `ferries/index.md`, matching the `## Decisions` /
|
||||||
|
learnings pattern already in `OKF/index.md`. `blueprints/index.md` lists
|
||||||
|
every blueprint (`NNN — <title> — <status>`, mirroring
|
||||||
|
`OKF/index.md`'s current inline line shape); `ferries/index.md` lists
|
||||||
|
every ferry (open topics linking their `MAP.md`, moored ones linking the
|
||||||
|
collapsed page), mirroring the current inline `## Ferries` section this
|
||||||
|
replaces.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — two new check functions,
|
||||||
|
parallel in shape to the existing `reachable()` check.
|
||||||
|
- `OKF/blueprints/index.md` — new file.
|
||||||
|
- `OKF/ferries/index.md` — new file.
|
||||||
|
- `OKF/index.md` — `## Blueprints` and `## Ferries` sections replaced with
|
||||||
|
summary + link.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
```
|
||||||
|
skills/loop/write-okf/scripts/render-check .
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
skills/loop/write-okf/scripts/link-check .
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-ref-check skills/
|
||||||
|
```
|
||||||
|
All four `0 error(s)`, and `okf-check` errors (verified by a temporary
|
||||||
|
probe: a directory or `index.md` deliberately missing an entry) on
|
||||||
|
exactly the two new conditions this blueprint adds — confirming the
|
||||||
|
checks fire, not just that the tree happens to pass.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
- Renaming any existing `OKF/decisions/NNN-*.md` or `OKF/blueprints/NNN-*.md`
|
||||||
|
file to its `R-`/`B-`-prefixed form, and the repo-wide link repair that
|
||||||
|
rename requires — the next blueprint in phase 15.
|
||||||
|
- `skills/loop/blueprint/SKILL.md`'s numbering step and `okf-check`'s own
|
||||||
|
number-extraction regex accounting for the new prefix — needed once
|
||||||
|
files are actually renamed, so it belongs with that same later
|
||||||
|
blueprint, not this one.
|
||||||
|
- Any change to `skills/` — it keeps `SKILL.md` as its entry-point file;
|
||||||
|
this blueprint's `index.md` requirement is `OKF/`-scoped only.
|
||||||
|
- Retrofitting bare, unlinked prose numbers in `OKF/LEARNINGS.md` /
|
||||||
|
`OKF/learnings/` — untouched per 022's precedent, unchanged by 024.
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: ROADMAP.md phase 15
|
||||||
|
sounded: 2026-09-23
|
||||||
|
cites:
|
||||||
|
- OKF/decisions/R-024-register-filenames-carry-their-prefix.md
|
||||||
|
- OKF/decisions/R-022-prose-cites-carry-a-register-prefix.md
|
||||||
|
- OKF/ROADMAP.md
|
||||||
|
- skills/loop/write-okf/scripts/okf-check
|
||||||
|
- skills/loop/blueprint/SKILL.md
|
||||||
|
- skills/loop/blueprint/blueprint-format.md
|
||||||
|
- skills/engineering/model-domain/decision-format.md
|
||||||
|
- skills/loop/write-okf/scripts/link-check
|
||||||
|
muster: true
|
||||||
|
review-base: tklwumrx
|
||||||
|
tally:
|
||||||
|
intent: rename every OKF/decisions and OKF/blueprints file to its R-/B-
|
||||||
|
prefix, repair every repo-wide link/cites: reference, and fix the
|
||||||
|
two callers (blueprint SKILL.md's numbering step, okf-check's
|
||||||
|
register_numbers) that read the old bare-NNN filename shape
|
||||||
|
matches: yes
|
||||||
|
---
|
||||||
|
|
||||||
|
# 030 — migrate decision and blueprint filenames to their R-/B- prefix
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
[024](../decisions/R-024-register-filenames-carry-their-prefix.md) rules
|
||||||
|
that decision and blueprint filenames carry their `R-`/`B-` prefix,
|
||||||
|
rejecting a forward-only retrofit as leaving two dialects on disk. Its
|
||||||
|
own Consequences name the two callers that read the old bare-`NNN`
|
||||||
|
filename shape and would silently misbehave once files are renamed
|
||||||
|
without them: `skills/loop/blueprint/SKILL.md`'s numbering step and
|
||||||
|
`okf-check`'s `register_numbers()`. [029](B-029-prefix-register-filenames-and-validate-okf-structure.md)
|
||||||
|
(implemented) deliberately left the actual rename out of scope — this
|
||||||
|
blueprint is that second, later piece of
|
||||||
|
[ROADMAP.md phase 15](../ROADMAP.md).
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
- Every `OKF/decisions/NNN-<slug>.md` is renamed to
|
||||||
|
`OKF/decisions/R-NNN-<slug>.md` — 24 files, `001`–`024`. Content,
|
||||||
|
frontmatter (other than the filename itself) and body text are
|
||||||
|
byte-identical; the number is not renumbered.
|
||||||
|
- Every `OKF/blueprints/NNN-<slug>.md` is renamed to
|
||||||
|
`OKF/blueprints/B-NNN-<slug>.md` — the 29 existing files (`001`–`029`)
|
||||||
|
plus this blueprint itself, which becomes
|
||||||
|
`OKF/blueprints/B-B-030-migrate-register-filenames-to-their-prefix.md`
|
||||||
|
once implemented. A locked blueprint's Contract/Verify prose is not
|
||||||
|
touched — only its filename — so [blueprint-format.md](../../skills/loop/blueprint/blueprint-format.md)'s
|
||||||
|
immutability rule is not in tension with this rename.
|
||||||
|
- Every reference to a renamed file — a markdown link target, or a
|
||||||
|
`cites:` frontmatter entry — is repointed to the new filename,
|
||||||
|
repo-wide. A bare, unlinked prose number in `OKF/LEARNINGS.md` /
|
||||||
|
`OKF/learnings/` is not retrofitted, per
|
||||||
|
[022](../decisions/R-022-prose-cites-carry-a-register-prefix.md)'s
|
||||||
|
precedent, carried forward by 024.
|
||||||
|
- `skills/loop/blueprint/SKILL.md`'s numbering step computes the next
|
||||||
|
blueprint number correctly against `B-NNN-<slug>.md` filenames.
|
||||||
|
- `okf-check`'s `register_numbers()` recognizes `R-NNN-<slug>.md` and
|
||||||
|
`B-NNN-<slug>.md` as naming numbers `NNN`, so
|
||||||
|
`prose_cites`'s unprefixed-cite check keeps working against the
|
||||||
|
renamed files.
|
||||||
|
- `skills/loop/blueprint/blueprint-format.md`,
|
||||||
|
`skills/engineering/model-domain/decision-format.md`, and
|
||||||
|
`OKF/CONTEXT.md`'s **Blueprint** / **why-register entry** terms
|
||||||
|
document the `B-NNN-`/`R-NNN-` filename pattern, not the old bare one.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
- `OKF/decisions/*.md`, `OKF/blueprints/*.md` — renamed.
|
||||||
|
- `OKF/index.md`, `OKF/decisions/index.md`, `OKF/blueprints/index.md`,
|
||||||
|
`OKF/ferries/index.md`, `OKF/learnings/*.md` — link targets updated.
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — `register_numbers()`.
|
||||||
|
- `skills/loop/blueprint/SKILL.md` — numbering step.
|
||||||
|
- `skills/loop/blueprint/blueprint-format.md`,
|
||||||
|
`skills/engineering/model-domain/decision-format.md`,
|
||||||
|
`OKF/CONTEXT.md` — documented filename pattern.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
```
|
||||||
|
skills/loop/write-okf/scripts/render-check .
|
||||||
|
skills/loop/write-okf/scripts/okf-check OKF/
|
||||||
|
skills/loop/write-okf/scripts/link-check .
|
||||||
|
skills/productivity/conjure-a-skill/scripts/skill-ref-check skills/
|
||||||
|
ls OKF/decisions/ | grep -c '^R-[0-9]\{3\}-' # 24
|
||||||
|
ls OKF/blueprints/ | grep -c '^B-[0-9]\{3\}-' # 30
|
||||||
|
grep -rE '\]\([^)]*(decisions|blueprints)/[0-9]{3}-' --include='*.md' . \
|
||||||
|
| grep -v OKF/LEARNINGS.md # empty
|
||||||
|
```
|
||||||
|
All four lints `0 error(s)`; the two counts match; the final grep for a
|
||||||
|
surviving bare-filename link outside `LEARNINGS.md` prose returns
|
||||||
|
nothing.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
- Ferry `D-n` files or their numbering — untouched; they already carry
|
||||||
|
the prefix that R-022/024 exist to keep distinct.
|
||||||
|
- Any change to `skills/`'s own file-naming or entry-point convention.
|
||||||
|
- Retrofitting bare, unlinked prose numbers in `OKF/LEARNINGS.md` /
|
||||||
|
`OKF/learnings/`.
|
||||||
|
- Renumbering any decision or blueprint — the number stays permanent;
|
||||||
|
only the prefix is added.
|
||||||
|
- New doctrine beyond what
|
||||||
|
[024](../decisions/R-024-register-filenames-carry-their-prefix.md)
|
||||||
|
already settled — this blueprint is mechanical rename + link repair.
|
||||||
@ -0,0 +1,126 @@
|
|||||||
|
---
|
||||||
|
type: Blueprint
|
||||||
|
status: implemented
|
||||||
|
traces-to: user request 2026-10-01
|
||||||
|
sounded: 2026-10-01
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/scripts/okf-check
|
||||||
|
- skills/loop/write-okf/okf-layout.md
|
||||||
|
- skills/loop/write-okf/split-page.md
|
||||||
|
- OKF/learnings/okf-format.md
|
||||||
|
muster: false # Verify runs okf-check against real + synthetic fixtures and checks exit codes — observes the cap/type logic directly, not just "tests pass"
|
||||||
|
---
|
||||||
|
|
||||||
|
# 031 — widen the OKF line cap and add a Guide page type
|
||||||
|
|
||||||
|
## Justification
|
||||||
|
|
||||||
|
A downstream consumer (`gcbds-ta-tgt-report`) wants `OKF/` to be a repo's
|
||||||
|
single source of truth, with nothing durable left in `docs/` for a human
|
||||||
|
to read and silently drift out of sync with what an agent sees. Two
|
||||||
|
gaps block that: (1) `ROADMAP.md` and `CONTEXT.md` have no split
|
||||||
|
mechanism — `ROADMAP.md` prunes, never splits; `CONTEXT.md` is "one
|
||||||
|
canonical glossary... never splits" — so the current 110-line cap is the
|
||||||
|
only ceiling they have, with nowhere to go at cap+1 besides losing
|
||||||
|
content; (2) worked-example/howto docs (dataset-config walkthroughs,
|
||||||
|
external-notebook provenance writeups) have no spine page at all to live
|
||||||
|
on — `modules/`/`analyses/` are warrant-exempt but still capped at 110,
|
||||||
|
too tight for a tutorial with inline code.
|
||||||
|
|
||||||
|
This traces to a user request in conversation, reconciled against prior
|
||||||
|
art already in this repo's history: an unmerged branch
|
||||||
|
(commit `e84fdf486ae6`, blueprints then-numbered 027/028, both now stale
|
||||||
|
— collide with `main`'s current B-030 numbering and predate the
|
||||||
|
`R-`/`B-` filename-prefix convention B-030 introduced) had independently
|
||||||
|
raised `ROADMAP.md`+blueprint+`CONTEXT.md` caps to 250 using a
|
||||||
|
`type:`-frontmatter-based selection. That design is reused here; the
|
||||||
|
branch itself is not merged or rebased — redone fresh against `main`.
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
- `scripts/okf-check`'s line-cap check changes from two tiers
|
||||||
|
(`CAP = 110`, `BLUEPRINT_CAP = 150`) to two tiers at different
|
||||||
|
thresholds: `CAP = 110` stays the default; a new `WIDE_CAP = 250`
|
||||||
|
applies when either `"blueprints" in rel.parts` (unchanged path rule)
|
||||||
|
**or** the page's frontmatter `type:` is `"Roadmap"`, `"Glossary"`, or
|
||||||
|
`"Guide"` (new — type-based, not path-based, so it follows `ROADMAP.md`
|
||||||
|
/ `CONTEXT.md` by declared kind rather than filename).
|
||||||
|
- A new page type `Guide` is added to the OKF spine: pages live at
|
||||||
|
`OKF/guides/<name>.md`, carry `type: Guide`, and are warrant-exempt the
|
||||||
|
same way `modules/`/`analyses/` are (not root-scoped per
|
||||||
|
`page-warrant.md`'s "root pages and `decisions/`" scope line).
|
||||||
|
`OKF/guides/` is proposed nowhere by `taxonomy-scan.md` — a guide is
|
||||||
|
always authored, never scan-proposed, so it carries no `okf:derived`
|
||||||
|
fence.
|
||||||
|
- A guide over the 250-line cap grows from `<name>.md` into `<name>/`
|
||||||
|
(`guide.md` + sibling files) the same directory-growth shape
|
||||||
|
blueprints already use at their own cap — except a guide's sibling
|
||||||
|
files are typically extracted runnable code (the inline R/Python block
|
||||||
|
pulled out of the prose into a real script the guide then cites),
|
||||||
|
not blueprint-style notes.
|
||||||
|
- `okf-layout.md`'s page-set diagram, Conformance page-type list, Page
|
||||||
|
contracts section (a new `Guide` bullet), and Rules section's cap
|
||||||
|
sentence are updated to state the above.
|
||||||
|
- `split-page.md`'s opening cap sentence and a new "When the page is a
|
||||||
|
guide" section (parallel to the existing "When the page is a
|
||||||
|
blueprint" one) are added, naming code-extraction as the move.
|
||||||
|
- `OKF/learnings/okf-format.md` gains one new believed/true/source entry
|
||||||
|
recording a real footgun found while rigging the stale branch's B-028:
|
||||||
|
a blueprint's Verify step that pads and then restores (`jj restore` /
|
||||||
|
`git restore`) a file the *same blueprint* edits silently loses the
|
||||||
|
edit, because restore pulls from the parent and `describe` does not
|
||||||
|
move the change there until `jj new` — so the file reverts to
|
||||||
|
pre-edit state while the Verify still prints `OK`.
|
||||||
|
|
||||||
|
## Seams touched
|
||||||
|
|
||||||
|
- `skills/loop/write-okf/scripts/okf-check` — the `CAP`/`BLUEPRINT_CAP`
|
||||||
|
constants and the cap-selection branch inside the per-page loop.
|
||||||
|
- `skills/loop/write-okf/okf-layout.md` — spine diagram, Conformance
|
||||||
|
page-type enum, Page contracts section, Rules section.
|
||||||
|
- `skills/loop/write-okf/split-page.md` — opening sentence, new Guide
|
||||||
|
section.
|
||||||
|
- `OKF/learnings/okf-format.md` — one new append-only entry.
|
||||||
|
- `OKF/CONTEXT.md` — **Line cap** / **House cap** glossary entries, which
|
||||||
|
state the current 110/150 numbers and must track the new ones.
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd skills/loop/write-okf
|
||||||
|
# 1. No regression: this repo's own OKF still validates.
|
||||||
|
python3 scripts/okf-check ../../../OKF
|
||||||
|
# 2. The new cap/type logic actually fires, both directions.
|
||||||
|
python3 - <<'PY'
|
||||||
|
import pathlib, subprocess, sys, tempfile
|
||||||
|
root = pathlib.Path(tempfile.mkdtemp()) / "OKF"
|
||||||
|
root.mkdir()
|
||||||
|
(root / "index.md").write_text(
|
||||||
|
'---\nokf_version: "0.1"\n---\n# t\n- [a](a.md)\n- [b](b.md)\n'
|
||||||
|
)
|
||||||
|
filler = "\n" * 200
|
||||||
|
(root / "a.md").write_text(f'---\ntype: Roadmap\n---\n# a\n{filler}')
|
||||||
|
(root / "b.md").write_text(f'---\ntype: Architecture\n---\n# b\n{filler}')
|
||||||
|
r = subprocess.run([sys.executable, "scripts/okf-check", str(root)],
|
||||||
|
capture_output=True, text=True)
|
||||||
|
out = r.stdout + r.stderr
|
||||||
|
assert "a.md: over the" not in out, "Roadmap page wrongly capped at 110"
|
||||||
|
assert "b.md: over the 110-line cap" in out, "Architecture page should still cap at 110"
|
||||||
|
print("OK — Roadmap exempt, Architecture still capped")
|
||||||
|
PY
|
||||||
|
```
|
||||||
|
|
||||||
|
Both must exit/print clean — the real-repo check exits 0, the synthetic
|
||||||
|
check prints `OK`.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- Merging or rebasing the stale `e84fdf486ae6` branch — its design is
|
||||||
|
reused, its history is not.
|
||||||
|
- Applying this to `gcbds-ta-tgt-report`'s `docs/` — a separate
|
||||||
|
follow-up once this blueprint ships, not part of this Verify.
|
||||||
|
- Raising any cap beyond the two tiers stated (`decisions/`,
|
||||||
|
`modules/`, `analyses/`, `LEARNINGS.md`/`learnings/` stay at 110).
|
||||||
|
- A second guardrail blueprint for the Verify-restore footgun (the
|
||||||
|
stale branch's B-029) — recorded as a `LEARNINGS.md` entry only,
|
||||||
|
prose, not tooling, unless a future `/rig` run hits it again.
|
||||||
40
OKF/blueprints/index.md
Normal file
40
OKF/blueprints/index.md
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
---
|
||||||
|
type: Index
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — blueprints
|
||||||
|
|
||||||
|
One file per unit of work: `status: draft | locked | implemented |
|
||||||
|
superseded-by-NNN`. Numbers are permanent — supersede, never renumber.
|
||||||
|
|
||||||
|
- [001](B-001-add-write-readme-r.md) — add write-readme-r skill — dropped
|
||||||
|
- [002](B-002-extract-why-register.md) — extract the why-register from ROADMAP — implemented
|
||||||
|
- [003](B-003-graduate-and-collapse-ferries.md) — graduate ferry decisions and collapse the moored ferry — implemented
|
||||||
|
- [004](B-004-give-cites-teeth-and-fence-derived-zone.md) — give cites teeth and fence the derived zone — implemented
|
||||||
|
- [005](B-005-propose-the-page-plan-from-a-repo-scan.md) — propose the page plan from a repo scan — implemented
|
||||||
|
- [006](B-006-rescan-the-page-plan-on-refresh.md) — rescan the page plan on refresh — implemented
|
||||||
|
- [007](B-007-add-sound.md) — add sound, the recon that precedes a lock — implemented
|
||||||
|
- [008](B-008-make-nostos-primary-and-files-the-fallback.md) — make nostos primary and file reads the fallback — implemented
|
||||||
|
- [009](B-009-give-every-page-a-growth-path.md) — give every page a growth path so the line cap can be enforced — implemented
|
||||||
|
- [010](B-010-add-muster-the-human-review-gate.md) — add muster, the opt-in human review gate on the loop's close — superseded-by-011
|
||||||
|
- [011](B-011-add-blueprint-level-muster.md) — add blueprint-level muster, the opt-in human review gate in weave — implemented
|
||||||
|
- [012](B-012-add-ferry-level-muster.md) — add ferry-level muster, the human review gate at moor — implemented
|
||||||
|
- [013](B-013-split-moor-into-skill-and-reference.md) — split moor into SKILL.md + REFERENCE.md to hold the line cap — implemented
|
||||||
|
- [014](B-014-unify-skill-sibling-file-naming.md) — unify skill sibling-file naming on lowercase-kebab topic names — implemented
|
||||||
|
- [015](B-015-record-session-check-discharges-on-the-blueprint.md) — record session-check discharges on the blueprint — implemented
|
||||||
|
- [016](B-016-pull-two-skills-under-cap-and-level-commit-twins.md) — pull two skills under the line cap and level the commit twins — implemented
|
||||||
|
- [017](B-017-add-a-line-cap-lint-over-skills.md) — add a line-cap lint over skills/ — implemented
|
||||||
|
- [018](B-018-own-the-loop-shape-in-flow-1.md) — own the loop's shape in ARCHITECTURE flow 1 — implemented
|
||||||
|
- [019](B-019-add-a-render-lint-over-the-loop-shape.md) — add a render lint over the loop's shape — superseded-by-026
|
||||||
|
- [020](B-020-enforce-the-prune-and-validate-every-cite.md) — enforce the roadmap prune and validate every page's cites — superseded-by-022
|
||||||
|
- [021](B-021-align-validator-and-doctrine.md) — align the validator and the doctrine on splits, prefixes and cites — implemented
|
||||||
|
- [022](B-022-validate-every-cite-at-every-status.md) — enforce the roadmap prune and validate every cite at every status — implemented
|
||||||
|
- [023](B-023-add-a-link-lint-over-relative-md-links.md) — add a link lint over relative markdown links — superseded-by-026
|
||||||
|
- [024](B-024-rename-the-spine-and-give-chart-its-ferry-edge.md) — rename the spine to chart and rig, and give chart its ferry edge — implemented
|
||||||
|
- [025](B-025-rule-muster-on-every-blueprint.md) — rule muster on every blueprint — implemented
|
||||||
|
- [026](B-026-walk-only-what-git-does-not-ignore.md) — walk only what git does not ignore — implemented
|
||||||
|
- [027](B-027-error-on-implemented-with-matches-no.md) — error when a mustered blueprint reaches implemented on matches: no — implemented
|
||||||
|
- [028](B-028-convert-cross-skill-links-to-skill-names.md) — convert cross-skill links to unchecked skill names — implemented
|
||||||
|
- [029](B-029-prefix-register-filenames-and-validate-okf-structure.md) — validate OKF directory completeness and normalize blueprints/ferries indexing — implemented
|
||||||
|
- [030](B-030-migrate-register-filenames-to-their-prefix.md) — migrate decision and blueprint filenames to their R-/B- prefix — implemented
|
||||||
|
- [031](B-031-widen-the-okf-line-cap-and-add-a-guide-page-type.md) — widen the OKF line cap and add a Guide page type — implemented
|
||||||
15
OKF/decisions/R-001-okf-at-project-root.md
Normal file
15
OKF/decisions/R-001-okf-at-project-root.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Fix where a project's knowledge substrate lives and what shape it takes.
|
||||||
|
answers:
|
||||||
|
- "Where does a project's OKF live?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/okf-layout.md
|
||||||
|
status: live
|
||||||
|
reversible: it's files
|
||||||
|
---
|
||||||
|
|
||||||
|
# 001 — OKF at the target project's ./OKF/
|
||||||
|
|
||||||
|
OKF = open-knowledge-format at target project's `./OKF/` — reversible
|
||||||
|
(it's files). Karpathy-LLM-wiki style; OpenWiki-inspired, dependency-free.
|
||||||
15
OKF/decisions/R-002-architect-replaces-plan-update.md
Normal file
15
OKF/decisions/R-002-architect-replaces-plan-update.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Settle whether planning is one mode-routed skill or two skills.
|
||||||
|
answers:
|
||||||
|
- "Which skill owns project planning?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/chart/SKILL.md
|
||||||
|
status: live
|
||||||
|
reversible: by re-splitting
|
||||||
|
---
|
||||||
|
|
||||||
|
# 002 — architect replaces plan-project + update-project
|
||||||
|
|
||||||
|
architect replaces plan-project + update-project (mode-routed) —
|
||||||
|
reversible by re-splitting.
|
||||||
15
OKF/decisions/R-003-blueprints-are-files.md
Normal file
15
OKF/decisions/R-003-blueprints-are-files.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Settle the storage backend for units of planned work.
|
||||||
|
answers:
|
||||||
|
- "Where do blueprints live: files or a tracker?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/blueprint/SKILL.md
|
||||||
|
status: live
|
||||||
|
reversible: via export
|
||||||
|
---
|
||||||
|
|
||||||
|
# 003 — blueprints are files, not tracker issues
|
||||||
|
|
||||||
|
Blueprints are files with status frontmatter, not tracker issues — the
|
||||||
|
"tracker" is grep. Reversible via export.
|
||||||
14
OKF/decisions/R-004-one-glossary-per-context.md
Normal file
14
OKF/decisions/R-004-one-glossary-per-context.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Stop per-issue glossaries fragmenting the domain vocabulary.
|
||||||
|
answers:
|
||||||
|
- "How many glossaries may a bounded context have?"
|
||||||
|
cites:
|
||||||
|
- skills/engineering/model-domain/context-format.md
|
||||||
|
status: live
|
||||||
|
reversible: yes — split the glossary again
|
||||||
|
---
|
||||||
|
|
||||||
|
# 004 — one canonical glossary per bounded context
|
||||||
|
|
||||||
|
One canonical glossary per bounded context, never per issue.
|
||||||
15
OKF/decisions/R-005-handoff-gate-for-subagents.md
Normal file
15
OKF/decisions/R-005-handoff-gate-for-subagents.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Stop mutating subagents from being spawned on a bare sentence.
|
||||||
|
answers:
|
||||||
|
- "What must a mutating subagent receive before it is spawned?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/rig/SKILL.md
|
||||||
|
status: live
|
||||||
|
reversible: yes — drop the gate
|
||||||
|
---
|
||||||
|
|
||||||
|
# 005 — no mutating subagent without a brief
|
||||||
|
|
||||||
|
Handoff gate: no mutating subagent without a brief (goal, OKF/blueprint
|
||||||
|
refs, verify command); read-only lookups exempt.
|
||||||
14
OKF/decisions/R-006-imperative-verb-first-names.md
Normal file
14
OKF/decisions/R-006-imperative-verb-first-names.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Fix the naming convention new skills are held to.
|
||||||
|
answers:
|
||||||
|
- "How are new skills named?"
|
||||||
|
cites:
|
||||||
|
- skills/productivity/conjure-a-skill/SKILL.md
|
||||||
|
status: live
|
||||||
|
reversible: yes — rename
|
||||||
|
---
|
||||||
|
|
||||||
|
# 006 — new skill names are imperative-verb-first
|
||||||
|
|
||||||
|
New skill names: imperative-verb-first; legacy names grandfathered.
|
||||||
18
OKF/decisions/R-007-taxonomy-derived-per-repo.md
Normal file
18
OKF/decisions/R-007-taxonomy-derived-per-repo.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Stop a fixed page list producing empty ceremonial pages in repos it does not fit.
|
||||||
|
answers:
|
||||||
|
- "Is the OKF page taxonomy fixed or derived per repo?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/okf-layout.md
|
||||||
|
status: live
|
||||||
|
reversible: collapse to a fixed list in okf-layout.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# 007 — page taxonomy is derived per repo, never fixed
|
||||||
|
|
||||||
|
Page taxonomy is **derived per repo, never fixed** — write-okf scans
|
||||||
|
disk, proposes a page plan, user locks it. A fixed layout yields empty
|
||||||
|
ceremonial pages: analysis repos keep analyses in directories and may
|
||||||
|
have no plotting module; libraries have neither. Reversible — collapse
|
||||||
|
to a fixed list in okf-layout.md.
|
||||||
19
OKF/decisions/R-008-page-warrant.md
Normal file
19
OKF/decisions/R-008-page-warrant.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Give every page a machine-checkable justification for existing.
|
||||||
|
answers:
|
||||||
|
- "What justifies a page's existence in the OKF?"
|
||||||
|
cites:
|
||||||
|
- OKF/CONTEXT.md
|
||||||
|
- skills/loop/write-okf/scripts/okf-check
|
||||||
|
status: live
|
||||||
|
reversible: OKF v0.1 permits producer-defined fields after type
|
||||||
|
---
|
||||||
|
|
||||||
|
# 008 — every page carries a warrant
|
||||||
|
|
||||||
|
Every page carries a **warrant** after `type`: `purpose`, `answers[]`,
|
||||||
|
`cites[]`. Zero `answers`, or answers another page owns → inadmissible;
|
||||||
|
unresolved `cites` → drift. Doubles as routing index
|
||||||
|
(`grep -r "answers:" OKF/`). Reversible — OKF v0.1 permits
|
||||||
|
producer-defined fields after `type`.
|
||||||
16
OKF/decisions/R-009-index-is-the-page-plan.md
Normal file
16
OKF/decisions/R-009-index-is-the-page-plan.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Keep one file authoritative for which pages are admissible.
|
||||||
|
answers:
|
||||||
|
- "Where is the locked page plan recorded?"
|
||||||
|
cites:
|
||||||
|
- OKF/index.md
|
||||||
|
status: live
|
||||||
|
reversible: by extracting TOC.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# 009 — index.md is the locked page plan
|
||||||
|
|
||||||
|
`index.md` **is** the locked page plan; no TOC file, which would
|
||||||
|
duplicate index.md's job. Absent from index.md → inadmissible.
|
||||||
|
Reversible by extracting TOC.md.
|
||||||
17
OKF/decisions/R-010-two-zone-pages.md
Normal file
17
OKF/decisions/R-010-two-zone-pages.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Let a scan regenerate part of a page without overwriting human judgement.
|
||||||
|
answers:
|
||||||
|
- "How does a refresh regenerate a page without destroying judgement?"
|
||||||
|
cites:
|
||||||
|
- OKF/CONTEXT.md
|
||||||
|
status: live
|
||||||
|
reversible: drop fences, fall back to whole-page supersede
|
||||||
|
---
|
||||||
|
|
||||||
|
# 010 — module and analysis pages are two-zone
|
||||||
|
|
||||||
|
Module and analysis pages are **two-zone**: `<!-- okf:derived -->`
|
||||||
|
fences the scan-regenerated seam, everything outside is judgement —
|
||||||
|
append/supersede only, never scan-edited. Reversible — drop fences,
|
||||||
|
fall back to the existing whole-page supersede rule.
|
||||||
17
OKF/decisions/R-011-code-reference-inside-write-okf.md
Normal file
17
OKF/decisions/R-011-code-reference-inside-write-okf.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Keep the code-reference layer from becoming a second router.
|
||||||
|
answers:
|
||||||
|
- "Does the code-reference layer get its own skill?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/SKILL.md
|
||||||
|
status: live
|
||||||
|
reversible: by extraction if the router breaches the house cap
|
||||||
|
---
|
||||||
|
|
||||||
|
# 011 — code-reference layer stays inside write-okf
|
||||||
|
|
||||||
|
Code-reference layer stays **inside write-okf** as siblings
|
||||||
|
(`taxonomy-scan.md`, `page-warrant.md`), not a new skill — one
|
||||||
|
trigger, one mental model. Reversible by extraction if the router
|
||||||
|
breaches the house cap.
|
||||||
19
OKF/decisions/R-012-one-why-register.md
Normal file
19
OKF/decisions/R-012-one-why-register.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Collapse two competing decision homes into one indexed register.
|
||||||
|
answers:
|
||||||
|
- "Where do settled decisions live?"
|
||||||
|
cites:
|
||||||
|
- OKF/decisions/index.md
|
||||||
|
- skills/engineering/model-domain/decision-format.md
|
||||||
|
status: live
|
||||||
|
reversible: by re-splitting
|
||||||
|
---
|
||||||
|
|
||||||
|
# 012 — one why-register
|
||||||
|
|
||||||
|
**One why-register**: `OKF/decisions/NNN-<slug>.md`, indexed by the
|
||||||
|
question each settles. Absorbs this section and `adr/` (empty at
|
||||||
|
absorption — zero migration cost, and evidence three-of-three was
|
||||||
|
unusable); the warrant replaces the three-of-three rule. Reversible
|
||||||
|
by re-splitting.
|
||||||
17
OKF/decisions/R-013-roadmap-is-a-plan.md
Normal file
17
OKF/decisions/R-013-roadmap-is-a-plan.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Stop ROADMAP growing forever by carrying registers it does not own.
|
||||||
|
answers:
|
||||||
|
- "What may ROADMAP.md hold?"
|
||||||
|
cites:
|
||||||
|
- OKF/ROADMAP.md
|
||||||
|
- OKF/learnings/index.md
|
||||||
|
status: live
|
||||||
|
reversible: yes — fold the registers back in
|
||||||
|
---
|
||||||
|
|
||||||
|
# 013 — ROADMAP is a plan, not an archive
|
||||||
|
|
||||||
|
ROADMAP is a **plan, not an archive** — decisions move to the
|
||||||
|
register, debunked claims to LEARNINGS.md (which already duplicates
|
||||||
|
them by instruction), §Risks keeps only forward-looking risk.
|
||||||
15
OKF/decisions/R-014-ferry-decisions-graduate-at-moor.md
Normal file
15
OKF/decisions/R-014-ferry-decisions-graduate-at-moor.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Give resolved ferry decisions one home instead of two copies.
|
||||||
|
answers:
|
||||||
|
- "What happens to a resolved ferry decision at moor?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/moor/SKILL.md
|
||||||
|
status: live
|
||||||
|
reversible: yes — copy back into MAP.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# 014 — ferry decisions graduate at moor
|
||||||
|
|
||||||
|
Ferry decisions **graduate at moor** into the register; MAP.md keeps
|
||||||
|
a pointer, never a copy.
|
||||||
22
OKF/decisions/R-015-moor-collapses-ferry-directory.md
Normal file
22
OKF/decisions/R-015-moor-collapses-ferry-directory.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Make `ls ferries/` answer what deliberation is still in flight.
|
||||||
|
answers:
|
||||||
|
- "What shape does a ferry take once it is moored?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/moor/SKILL.md
|
||||||
|
- OKF/CONTEXT.md
|
||||||
|
status: live
|
||||||
|
reversible: OKF is not the archive of record, history is
|
||||||
|
---
|
||||||
|
|
||||||
|
# 015 — moor collapses the ferry directory into one page
|
||||||
|
|
||||||
|
Moor **collapses** `ferries/<topic>/` into `ferries/<topic>.md` —
|
||||||
|
problem shape, rejected alternatives, decision pointers. Directory
|
||||||
|
means open, file means moored, so `ls` answers what's in flight.
|
||||||
|
Deliberation stays recoverable via `sealed:` (jj change id + git
|
||||||
|
hash + date) pinned to the **parent** (`@-` at moor) — the sealing
|
||||||
|
commit cannot name itself, and the parent is where the D-n files
|
||||||
|
still exist. Unresolvable pin = drift. Reversible: OKF is not the
|
||||||
|
archive of record, history is.
|
||||||
21
OKF/decisions/R-016-one-okf-check-validator.md
Normal file
21
OKF/decisions/R-016-one-okf-check-validator.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Make the OKF done-gate a run with pasted output, not a claim.
|
||||||
|
answers:
|
||||||
|
- "How is OKF conformance enforced?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/scripts/okf-check
|
||||||
|
- skills/engineering/add-copilot-project-skill/project-validator.md
|
||||||
|
status: live
|
||||||
|
reversible: by inlining the checks as prose
|
||||||
|
---
|
||||||
|
|
||||||
|
# 016 — one okf-check validator
|
||||||
|
|
||||||
|
**One `okf-check` validator** at `write-okf/scripts/`, built to the
|
||||||
|
existing doctrine in
|
||||||
|
[add-copilot-project-skill/project-validator.md](../../skills/engineering/add-copilot-project-skill/project-validator.md);
|
||||||
|
write-okf and moor both gate on its pasted output, so the done-gate
|
||||||
|
is a run, not a claim. Per that doctrine it must pass clean on
|
||||||
|
octobot today — over-cap pages are a **warning** until phase 7, never
|
||||||
|
an error. Reversible by inlining the checks as prose.
|
||||||
21
OKF/decisions/R-017-pin-drift-splits-by-visibility.md
Normal file
21
OKF/decisions/R-017-pin-drift-splits-by-visibility.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Stop the next agent from "fixing" okf-check to resolve sealed: pins.
|
||||||
|
answers:
|
||||||
|
- "Why doesn't `okf-check` verify that a `sealed:` pin resolves?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/scripts/okf-check
|
||||||
|
- skills/loop/write-okf/SKILL.md
|
||||||
|
status: live
|
||||||
|
reversible: yes — the resolution check is a few lines either side
|
||||||
|
---
|
||||||
|
|
||||||
|
# 017 — pin drift splits by what each tool can see
|
||||||
|
|
||||||
|
`okf-check` validates the **shape** of a moored ferry's `sealed:` pin —
|
||||||
|
three fields, hex hash, ISO date — and stops there. Resolving the change
|
||||||
|
id belongs to **refresh**, which has the repo in hand. The obvious
|
||||||
|
alternative, one tool doing both, breaks the rule that gives the
|
||||||
|
validator its teeth: an OKF tree copied out of its jj repo would fail a
|
||||||
|
check it cannot possibly satisfy, and a validator that cannot exit 0
|
||||||
|
outside its home repo trains people to ignore it.
|
||||||
23
OKF/decisions/R-018-rescan-deletes-only-derived-pages.md
Normal file
23
OKF/decisions/R-018-rescan-deletes-only-derived-pages.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Let a rescan drop a page it can rebuild, and only that one.
|
||||||
|
answers:
|
||||||
|
- "What happens to a page a rescan no longer proposes?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/taxonomy-scan.md
|
||||||
|
- OKF/decisions/R-010-two-zone-pages.md
|
||||||
|
status: live
|
||||||
|
reversible: supersede every unwarranted page, delete none
|
||||||
|
---
|
||||||
|
|
||||||
|
# 018 — a rescan deletes only wholly derived pages
|
||||||
|
|
||||||
|
An **unwarranted** page — listed under `modules/`/`analyses/`, no longer
|
||||||
|
proposed — is **deleted only if it is wholly derived**: nothing outside
|
||||||
|
its [010](R-010-two-zone-pages.md) `okf:derived` fences but frontmatter and
|
||||||
|
title. Such a page loses nothing a rescan cannot rebuild. One byte of
|
||||||
|
judgement and it is **superseded** instead, struck with a pointer per
|
||||||
|
`write-okf/SKILL.md` refresh step 3; either way
|
||||||
|
[015](R-015-moor-collapses-ferry-directory.md) holds — history is the
|
||||||
|
archive of record, not the OKF. Removal is proposed, never applied
|
||||||
|
unasked: the user locks it as they lock the plan.
|
||||||
35
OKF/decisions/R-019-recon-may-self-fire.md
Normal file
35
OKF/decisions/R-019-recon-may-self-fire.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Say which skills may fire without the user asking, and on what test.
|
||||||
|
answers:
|
||||||
|
- "Which skills may fire without the user asking?"
|
||||||
|
cites:
|
||||||
|
- OKF/ARCHITECTURE.md
|
||||||
|
- skills/loop/steer/SKILL.md
|
||||||
|
status: live
|
||||||
|
reversible: yes — flag the exception user-invoked like its siblings
|
||||||
|
---
|
||||||
|
|
||||||
|
# 019 — orchestrators are asked for; recon may self-fire
|
||||||
|
|
||||||
|
**Orchestrators and rituals carry `disable-model-invocation: true`** —
|
||||||
|
the loop steps, the interviews, the commit rituals. Each interrupts a
|
||||||
|
person mid-ritual, so each must be asked for by name; the flag's
|
||||||
|
mechanics are in [ARCHITECTURE.md](../ARCHITECTURE.md).
|
||||||
|
|
||||||
|
**A recon skill may self-fire.** The test is not category but two
|
||||||
|
properties together: it only reads, and its trigger is a *state* the
|
||||||
|
agent can detect rather than a phase a person drives — "about to act on
|
||||||
|
knowledge nothing has verified". A user cannot invoke what they have not
|
||||||
|
noticed. `sound` is the first and only loop skill to pass.
|
||||||
|
|
||||||
|
The test binds the **run, not the skill**. `sound` writes when it is
|
||||||
|
reached by name and reports when it fired itself — one skill, two
|
||||||
|
mouths — so the bright line holds: **nothing a user did not ask for
|
||||||
|
edits a file.** A skill that writes on a self-fire fails, however useful
|
||||||
|
that write would be, and a stamp a self-fire cannot make is a stamp a
|
||||||
|
lock can trust.
|
||||||
|
|
||||||
|
The exception is bounded by that test, not by the loop. It survives only
|
||||||
|
while the trigger stays concrete — a vague one fires on every question,
|
||||||
|
which is the failure the audit behind phases 1–8 was avoiding.
|
||||||
35
OKF/decisions/R-020-every-page-has-a-growth-path.md
Normal file
35
OKF/decisions/R-020-every-page-has-a-growth-path.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Make the line cap enforceable by naming one legal move per page kind.
|
||||||
|
answers:
|
||||||
|
- "What happens to a page at cap+1?"
|
||||||
|
cites:
|
||||||
|
- OKF/blueprints/B-009-give-every-page-a-growth-path.md
|
||||||
|
- skills/loop/write-okf/okf-layout.md
|
||||||
|
- skills/loop/write-okf/split-page.md
|
||||||
|
- skills/loop/write-okf/scripts/okf-check
|
||||||
|
status: live
|
||||||
|
reversible: demote the cap to a warning in okf-check; splits already made stand
|
||||||
|
---
|
||||||
|
|
||||||
|
# 020 — every page kind has one named growth path
|
||||||
|
|
||||||
|
A cap with no legal move at cap+1 decays into prose: measured in a repo
|
||||||
|
running this skill, twelve pages sat over the ≤110-line cap while the one
|
||||||
|
*mechanical* rule was obeyed without exception. So each kind gets exactly
|
||||||
|
one move — `blueprints/` over 150 is a **scope** signal (split in two, or
|
||||||
|
`ferry`), `ARCHITECTURE.md` **sheds** per-module prose into
|
||||||
|
`modules/`/`analyses/`, `ROADMAP.md` **prunes** a discharged phase to one
|
||||||
|
line, `CONTEXT.md` opens `context/<subroot>.md` only when the repo is
|
||||||
|
genuinely multi-context, and `LEARNINGS.md` alone **splits**, into
|
||||||
|
`learnings/<theme>.md` — and over-cap becomes an `okf-check` error.
|
||||||
|
Directories are created lazily, never scaffolded at init.
|
||||||
|
|
||||||
|
## Considered options
|
||||||
|
|
||||||
|
A uniform `<page>/<theme>.md` rule for every kind was rejected: it invents
|
||||||
|
`architecture/` and `roadmap/` duplicating the `modules/`/`analyses/` and
|
||||||
|
`blueprints/` pages that already hold that content, where the per-kind
|
||||||
|
rule adds one directory in total. The asymmetry is the point — only
|
||||||
|
`LEARNINGS.md` has an append-only contract, so only it grows without
|
||||||
|
bound, and only it needs somewhere to go.
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Give a check the sealing session cannot run one place to be recorded and one place to be discharged.
|
||||||
|
answers:
|
||||||
|
- "Where is a discharged-session check recorded?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/blueprint/blueprint-format.md
|
||||||
|
- OKF/blueprints/B-007-add-sound.md
|
||||||
|
- OKF/ROADMAP.md
|
||||||
|
status: live
|
||||||
|
reversible: yes — strike the stamps; the checks they record stay in §Verify
|
||||||
|
---
|
||||||
|
|
||||||
|
# 021 — a session check discharges on its own blueprint
|
||||||
|
|
||||||
|
Some Verify checks a script cannot make — fresh-session behaviour, a
|
||||||
|
missing MCP server, a self-fire leaving its file byte-identical — so they
|
||||||
|
ride later sessions and are discharged one at a time. That record belongs
|
||||||
|
on the blueprint that wrote the check, appended to the numbered check
|
||||||
|
itself as `✅ <date> (<what discharged it> — <what was observed>)`, with
|
||||||
|
`⏳ pending` standing until then. `ROADMAP.md` keeps no discharge prose:
|
||||||
|
a phase line names its blueprint and stops.
|
||||||
|
|
||||||
|
The rule in
|
||||||
|
[blueprint-format.md](../../skills/loop/blueprint/blueprint-format.md)
|
||||||
|
that a locked blueprint's Verify is immutable is narrowed, not broken —
|
||||||
|
it binds the *text of a check*, which still may only be superseded. A
|
||||||
|
stamp records that an unchanged check was run.
|
||||||
|
|
||||||
|
## Considered options
|
||||||
|
|
||||||
|
Leaving the record in `ROADMAP.md`, where B-007's already sat, was
|
||||||
|
rejected on two counts. [013](R-013-roadmap-is-a-plan.md) makes ROADMAP a
|
||||||
|
plan, and a discharge is past-tense; worse,
|
||||||
|
[020](R-020-every-page-has-a-growth-path.md) prunes a discharged phase to
|
||||||
|
one line, so the prune silently deletes any check still pending — the
|
||||||
|
one thing that must survive.
|
||||||
|
|
||||||
|
A terminal `verified` status after `implemented`, with `okf-check`
|
||||||
|
erroring on a `⏳ pending` line under `implemented`, was rejected as
|
||||||
|
premature: one blueprint has ever carried a pending check. The stamps
|
||||||
|
make the state legible first; if checks start going missing, the
|
||||||
|
validator rule is a small addition on top and costs nothing now.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
- `B-007-add-sound.md` §Verify is backfilled with three `✅` stamps and one
|
||||||
|
`⏳ pending` (check 3, the self-fire byte-identity run).
|
||||||
|
- `ROADMAP.md` phase 9 loses its parenthetical discharge prose and its
|
||||||
|
trailing "Check 3 alone must ride the next sounding" clause.
|
||||||
|
- `blueprint-format.md` states the stamp exemption where it states the
|
||||||
|
immutability rule, so the next blueprint author reads both together.
|
||||||
52
OKF/decisions/R-022-prose-cites-carry-a-register-prefix.md
Normal file
52
OKF/decisions/R-022-prose-cites-carry-a-register-prefix.md
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Stop a bare three-digit number meaning two different pages at once.
|
||||||
|
answers:
|
||||||
|
- "How is a register entry cited in prose?"
|
||||||
|
cites:
|
||||||
|
- OKF/CONTEXT.md
|
||||||
|
- OKF/decisions/index.md
|
||||||
|
- skills/loop/blueprint/blueprint-format.md
|
||||||
|
- OKF/ferries/python-siblings/MAP.md
|
||||||
|
status: superseded-by-024
|
||||||
|
reversible: yes — drop the prefixes; numbers, filenames and links never moved
|
||||||
|
---
|
||||||
|
|
||||||
|
# 022 — a prose cite carries its register's prefix
|
||||||
|
|
||||||
|
Blueprints and the why-register number independently, so the same three
|
||||||
|
digits already name two unrelated pages three times over: `013`, `017`
|
||||||
|
and `019` each exist in both. A markdown link is safe — its path says which —
|
||||||
|
but a bare number in prose is not, and `B-019` (the render lint) against
|
||||||
|
`R-019` (recon may self-fire) is the kind of collision a reader resolves
|
||||||
|
wrongly without noticing. **In prose: `B-NNN` for a blueprint, `R-NNN`
|
||||||
|
for a why-register decision, `D-n` for a ferry decision.** Filenames,
|
||||||
|
link targets, `index.md` labels and `superseded-by-NNN` status values are
|
||||||
|
untouched — the prefix is a reading aid, not an identity.
|
||||||
|
|
||||||
|
## Considered options
|
||||||
|
|
||||||
|
**`D-` for the why-register** was the first proposal and is unavailable:
|
||||||
|
`D-<n>` already names a *ferry* decision, on disk at
|
||||||
|
`ferries/python-siblings/D-1..D-3` and canonical in `CONTEXT.md`. Reusing
|
||||||
|
it would fuse two namespaces that today collide only in `type:`. `R-` for
|
||||||
|
why-**R**egister keeps them apart.
|
||||||
|
|
||||||
|
**Renaming the files** (`B019-…md`, `D020-…md`) was rejected: it breaks
|
||||||
|
every link, the register index, `blueprint-format`'s `NNN-<slug>`
|
||||||
|
contract and `blueprint`'s numbering step, and contradicts *numbers are
|
||||||
|
permanent — supersede, never renumber*.
|
||||||
|
|
||||||
|
**Applying it only to new prose** was rejected as the cheaper half of the
|
||||||
|
same idea. A convention adopted forward-only leaves two dialects, which
|
||||||
|
is the defect phase 10 already exists to remove; the live pages were
|
||||||
|
retrofitted in the same change.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
- `LEARNINGS.md` is **not** retrofitted — it is append-only by its own
|
||||||
|
header, so its bare numbers stand as written and new entries carry the
|
||||||
|
prefix.
|
||||||
|
- Nothing enforces this yet. A bare three-digit number outside a link and
|
||||||
|
without a prefix is a lint the `okf-check` blueprint should carry, or
|
||||||
|
the rule decays exactly as R-020's prune did.
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Stop cross-skill links from breaking whenever the skills tree
|
||||||
|
installs somewhere its category depth does not survive.
|
||||||
|
answers:
|
||||||
|
- "How does one skill's prose reference another skill?"
|
||||||
|
cites:
|
||||||
|
- OKF/ROADMAP.md
|
||||||
|
- skills/loop/write-okf/scripts/link-check
|
||||||
|
status: live
|
||||||
|
reversible: yes — costly (290 links, 59 files), but nothing else depends
|
||||||
|
on the prose form
|
||||||
|
---
|
||||||
|
|
||||||
|
# 023 — a cross-skill reference is an unchecked `/skill-name`, not a path
|
||||||
|
|
||||||
|
`skills/<category>/<name>/SKILL.md` files reference each other with
|
||||||
|
`../<name>/` (same category) or `../../<category>/<name>/` (cross
|
||||||
|
category) links — 290 of them across 59 files. Every harness that
|
||||||
|
installs a skill outside this repo drops the category level: Copilot's
|
||||||
|
`.github/skills/<name>/`, and `npx skills add <owner/repo>` (skills.sh),
|
||||||
|
both copy or symlink one skill directory to a flat `<name>/`. A relative
|
||||||
|
link written for a source at some depth breaks the moment its target
|
||||||
|
sits at a different one, on either end of the link — one level deep
|
||||||
|
breaks exactly as fast as two.
|
||||||
|
|
||||||
|
**Decision: a cross-skill reference in prose is a backtick-wrapped,
|
||||||
|
leading-slash, kebab-case skill name — `` `/skill-name` `` — never a
|
||||||
|
markdown link, never a path.** This is mattpocock/skills' own
|
||||||
|
convention (verified against `skills/engineering/ask-matt/SKILL.md`
|
||||||
|
upstream, which routes to a dozen sibling skills by name only, zero
|
||||||
|
path links between skill directories) and it survives every install
|
||||||
|
shape by construction: a name has no depth to break.
|
||||||
|
|
||||||
|
Two link kinds are explicitly **not** touched by this decision:
|
||||||
|
- **Same-skill sibling files** (a bare filename link to a skill's own
|
||||||
|
supporting doc) never cross a category boundary and stay real
|
||||||
|
relative links.
|
||||||
|
- **A skill citing something else repo-root-only** — `OKF/decisions/`
|
||||||
|
(5) or `../../../CLAUDE.md` (2), 7 such escapes today — stays a real,
|
||||||
|
`link-check`-validated path. No installer copies either out of this
|
||||||
|
repo, so those citations only ever need to resolve here.
|
||||||
|
|
||||||
|
## Considered options
|
||||||
|
|
||||||
|
**Flatten the repo itself to `skills/<name>/`**, matching the installed
|
||||||
|
shape 1:1, was rejected — the user wants the repo organized by category
|
||||||
|
for browsing; category becomes frontmatter loses that.
|
||||||
|
|
||||||
|
**An install-time transform script**, rewriting `../../category/x` to
|
||||||
|
`../x` per install target, was rejected as machinery to build and
|
||||||
|
maintain per harness, solving a problem the name-based convention
|
||||||
|
sidesteps for free.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
- `link-check` stops validating these 290 references as resolvable
|
||||||
|
paths — it never could validate a bare name as a path anyway. A
|
||||||
|
typo'd `` `/skill-nmae` `` now fails silently unless a separate
|
||||||
|
checker exists.
|
||||||
|
- A new lint is required: scan `skills/` for `` `/skill-name` ``
|
||||||
|
mentions, confirm a matching skill folder exists. This is the
|
||||||
|
replacement coverage, not `link-check` extended — it checks name
|
||||||
|
existence, not path resolution.
|
||||||
|
- `scripts/link-skills.sh` (new, mirrors mattpocock's own dev script)
|
||||||
|
and `README.md`'s pointer to `npx skills@latest add <owner/repo>` are
|
||||||
|
the two install paths this decision makes safe; neither existed
|
||||||
|
before.
|
||||||
62
OKF/decisions/R-024-register-filenames-carry-their-prefix.md
Normal file
62
OKF/decisions/R-024-register-filenames-carry-their-prefix.md
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
purpose: Make a decision or blueprint findable by filename alone, not just by prose convention.
|
||||||
|
answers:
|
||||||
|
- "Does a register entry's filename carry its prefix, or only its prose citation?"
|
||||||
|
cites:
|
||||||
|
- OKF/decisions/R-022-prose-cites-carry-a-register-prefix.md
|
||||||
|
- OKF/CONTEXT.md
|
||||||
|
- skills/loop/blueprint/blueprint-format.md
|
||||||
|
- skills/engineering/model-domain/decision-format.md
|
||||||
|
status: live
|
||||||
|
reversible: rename back; every link this change touches was mechanically
|
||||||
|
rewritten, so the reverse rewrite is the same mechanism run backward
|
||||||
|
---
|
||||||
|
|
||||||
|
# 024 — register filenames carry the R-/B- prefix
|
||||||
|
|
||||||
|
**Supersedes [022](R-022-prose-cites-carry-a-register-prefix.md)'s filename
|
||||||
|
ruling.** R-022 kept `OKF/decisions/NNN-<slug>.md` and
|
||||||
|
`OKF/blueprints/NNN-<slug>.md` bare on disk — "a reading aid, not an
|
||||||
|
identity" — on the reasoning that renaming breaks every link for no
|
||||||
|
gain over the prose prefix. That trade flips once filename search is
|
||||||
|
itself a workflow: `ls OKF/decisions/ | grep R-024`, a fuzzy-finder
|
||||||
|
match on `B-` or `R-`, or a shell glob all need the prefix *in the
|
||||||
|
filename*, not just in prose that quotes it. Effective now:
|
||||||
|
`OKF/decisions/NNN-<slug>.md` → `R-NNN-<slug>.md`,
|
||||||
|
`OKF/blueprints/NNN-<slug>.md` → `B-NNN-<slug>.md`. Ferry `D-n` files
|
||||||
|
(`OKF/ferries/<topic>/D-<n>-<slug>.md`) are untouched — they already
|
||||||
|
carry their prefix, which is the collision R-022 exists to avoid.
|
||||||
|
|
||||||
|
The **number stays permanent and un-renumbered** — only the prefix is
|
||||||
|
added; `R-024` and the historical `024` are the same decision.
|
||||||
|
`status: superseded-by-NNN` values stay bare, per R-022's original
|
||||||
|
carve-out — they identify a number, not a filename or a prose sentence.
|
||||||
|
A `cites:` entry that names a register page in prose, or a `traces-to`
|
||||||
|
field, keeps R-022's prose form (`R-NNN`).
|
||||||
|
|
||||||
|
## Considered options
|
||||||
|
|
||||||
|
**Retrofit forward-only** (new files get the prefix, existing ones
|
||||||
|
don't) was rejected for the reason R-022 already gave for the same
|
||||||
|
choice: two dialects on disk is the defect, not a saving. A migration
|
||||||
|
retroactively renames every existing decision and blueprint file and
|
||||||
|
repairs every real link that resolves to one; a bare, unlinked prose
|
||||||
|
number in `LEARNINGS.md` is not retrofitted, matching R-022's append-only
|
||||||
|
exemption for that page specifically.
|
||||||
|
|
||||||
|
**Editing R-022 in place** instead of superseding it was rejected — R-022
|
||||||
|
remains an accurate record of the reasoning at the time it was written;
|
||||||
|
rewriting it would erase the trail future readers need to see why the
|
||||||
|
bare-filename choice was made before being reversed.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
- `OKF/blueprints/` and `OKF/ferries/` gain their own `index.md`,
|
||||||
|
delegating from `OKF/index.md` the way `decisions/` and `learnings/`
|
||||||
|
already do — the direct per-directory listing this decision's
|
||||||
|
filename search assumes did not exist for those two before.
|
||||||
|
- `skills/loop/blueprint/SKILL.md`'s numbering step and `okf-check`'s
|
||||||
|
number-extraction both read `[0-9]{3}` today; both need the `R-`/`B-`
|
||||||
|
prefix accounted for. Not fixed by this decision — the migration
|
||||||
|
blueprint that performs the rename owns that.
|
||||||
38
OKF/decisions/index.md
Normal file
38
OKF/decisions/index.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
type: Index
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — why-register
|
||||||
|
|
||||||
|
One file per settled decision. Lines are **question-shaped** — the
|
||||||
|
question is derived from the file's first `answers:` entry, so read a
|
||||||
|
line to find the decision that settles your question, then open it.
|
||||||
|
Numbers are permanent (they are cited from CONTEXT.md and commit
|
||||||
|
messages); superseding adds a file, never renumbers one.
|
||||||
|
|
||||||
|
Format: `NNN — <question it settles> — <verdict> — <status>`.
|
||||||
|
|
||||||
|
- [001](R-001-okf-at-project-root.md) — Where does a project's OKF live? — at the target project's `./OKF/` — live
|
||||||
|
- [002](R-002-architect-replaces-plan-update.md) — Which skill owns project planning? — architect, mode-routed — live
|
||||||
|
- [003](R-003-blueprints-are-files.md) — Where do blueprints live: files or a tracker? — files with status frontmatter — live
|
||||||
|
- [004](R-004-one-glossary-per-context.md) — How many glossaries may a bounded context have? — exactly one — live
|
||||||
|
- [005](R-005-handoff-gate-for-subagents.md) — What must a mutating subagent receive before it is spawned? — a brief — live
|
||||||
|
- [006](R-006-imperative-verb-first-names.md) — How are new skills named? — imperative-verb-first — live
|
||||||
|
- [007](R-007-taxonomy-derived-per-repo.md) — Is the OKF page taxonomy fixed or derived per repo? — derived, then locked — live
|
||||||
|
- [008](R-008-page-warrant.md) — What justifies a page's existence in the OKF? — its warrant — live
|
||||||
|
- [009](R-009-index-is-the-page-plan.md) — Where is the locked page plan recorded? — `index.md` itself — live
|
||||||
|
- [010](R-010-two-zone-pages.md) — How does a refresh regenerate a page without destroying judgement? — `okf:derived` fences — live
|
||||||
|
- [011](R-011-code-reference-inside-write-okf.md) — Does the code-reference layer get its own skill? — no, write-okf siblings — live
|
||||||
|
- [012](R-012-one-why-register.md) — Where do settled decisions live? — this register — live
|
||||||
|
- [013](R-013-roadmap-is-a-plan.md) — What may ROADMAP.md hold? — only what is still ahead — live
|
||||||
|
- [014](R-014-ferry-decisions-graduate-at-moor.md) — What happens to a resolved ferry decision at moor? — it graduates here — live
|
||||||
|
- [015](R-015-moor-collapses-ferry-directory.md) — What shape does a ferry take once it is moored? — one page, pinned with `sealed:` — live
|
||||||
|
- [016](R-016-one-okf-check-validator.md) — How is OKF conformance enforced? — `okf-check`, output pasted — live
|
||||||
|
- [017](R-017-pin-drift-splits-by-visibility.md) — Why doesn't `okf-check` verify that a `sealed:` pin resolves? — it cannot see the repo; refresh owns resolution — live
|
||||||
|
- [018](R-018-rescan-deletes-only-derived-pages.md) — What happens to a page a rescan no longer proposes? — deleted if wholly derived, else superseded — live
|
||||||
|
- [019](R-019-recon-may-self-fire.md) — Which skills may fire without the user asking? — orchestrators never, read-only recon may — live
|
||||||
|
- [020](R-020-every-page-has-a-growth-path.md) — What happens to a page at cap+1? — one named move per page kind, enforced as an error — live
|
||||||
|
- [021](R-021-session-checks-discharge-on-the-blueprint.md) — Where is a discharged-session check recorded? — stamped on its own blueprint's Verify check — live
|
||||||
|
- [022](R-022-prose-cites-carry-a-register-prefix.md) — How is a register entry cited in prose? — `B-NNN` blueprint, `R-NNN` why-register, `D-n` ferry — superseded-by-024
|
||||||
|
- [023](R-023-cross-skill-references-are-unchecked-skill-names.md) — How does one skill's prose reference another skill? — a backtick-wrapped `/skill-name`, never a path — live
|
||||||
|
- [024](R-024-register-filenames-carry-their-prefix.md) — Does a register entry's filename carry its prefix, or only its prose citation? — yes, `R-NNN-`/`B-NNN-` on disk too — live
|
||||||
10
OKF/ferries/index.md
Normal file
10
OKF/ferries/index.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
type: Index
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — ferries
|
||||||
|
|
||||||
|
Open ferries link their `MAP.md`; moored ones link the collapsed page
|
||||||
|
that replaced it — `<topic> — moored <date> → <topic>.md`.
|
||||||
|
|
||||||
|
- [python-siblings](python-siblings/MAP.md) — Python siblings for bdd/diagnose — 0/3 resolved
|
||||||
24
OKF/ferries/python-siblings/D-1-mirror-or-redesign.md
Normal file
24
OKF/ferries/python-siblings/D-1-mirror-or-redesign.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
status: open
|
||||||
|
blocked-by: []
|
||||||
|
---
|
||||||
|
|
||||||
|
# D-1 — mirror the R sibling structure, or redesign for Python?
|
||||||
|
|
||||||
|
## Why it must be decided
|
||||||
|
Every sibling file's outline depends on it; deciding late means
|
||||||
|
rewriting all six files.
|
||||||
|
|
||||||
|
## Options
|
||||||
|
- **A — mirror**: same file names and section shapes as the R set;
|
||||||
|
cheapest, symmetrical cross-links from bdd/diagnose already half-exist.
|
||||||
|
- **B — redesign**: Python-first outline (typing, fixtures-as-DI,
|
||||||
|
pytest idioms) where the R shape doesn't fit; better fit, more work,
|
||||||
|
asymmetric maintenance.
|
||||||
|
|
||||||
|
## Recommendation
|
||||||
|
A, with per-file deviations allowed when a section would be a no-op in
|
||||||
|
Python — mirror is reversible per file, redesign is not.
|
||||||
|
|
||||||
|
## Resolution
|
||||||
22
OKF/ferries/python-siblings/D-2-mocking-doctrine.md
Normal file
22
OKF/ferries/python-siblings/D-2-mocking-doctrine.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
status: open
|
||||||
|
blocked-by: [D-1]
|
||||||
|
---
|
||||||
|
|
||||||
|
# D-2 — mocking doctrine: facade + DI only, or bless monkeypatch?
|
||||||
|
|
||||||
|
## Why it must be decided
|
||||||
|
mocking-py.md is the normative file bdd points at before any `patch`
|
||||||
|
call; its stance decides what reviews flag.
|
||||||
|
|
||||||
|
## Options
|
||||||
|
- **A — facade + DI only**: monkeypatch/patch treated like mockery::stub
|
||||||
|
in R — a smell needing justification. Consistent with design-codebase.
|
||||||
|
- **B — bless monkeypatch at seams**: pragmatic pytest idiom, weaker
|
||||||
|
seam discipline.
|
||||||
|
|
||||||
|
## Recommendation
|
||||||
|
A — matches the R doctrine and the existing bdd "seams only" rule.
|
||||||
|
|
||||||
|
## Resolution
|
||||||
22
OKF/ferries/python-siblings/D-3-diagnose-content-split.md
Normal file
22
OKF/ferries/python-siblings/D-3-diagnose-content-split.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
type: Decision
|
||||||
|
status: open
|
||||||
|
blocked-by: [D-1]
|
||||||
|
---
|
||||||
|
|
||||||
|
# D-3 — feedback-loops-py vs instrumentation-py: where does the split fall?
|
||||||
|
|
||||||
|
## Why it must be decided
|
||||||
|
diagnose links both; overlapping content (pdb in both?) would violate
|
||||||
|
one-fact-one-home.
|
||||||
|
|
||||||
|
## Options
|
||||||
|
- **A — R-parallel split**: loops = constructing red-capable commands;
|
||||||
|
instrumentation = interactive inspection (breakpoint, --pdb, cProfile).
|
||||||
|
- **B — merge into one file**: fewer files, but breaks the R symmetry
|
||||||
|
and the diagnose phase-1/phase-4 pointer split.
|
||||||
|
|
||||||
|
## Recommendation
|
||||||
|
A — the two diagnose phases consume them separately.
|
||||||
|
|
||||||
|
## Resolution
|
||||||
16
OKF/ferries/python-siblings/MAP.md
Normal file
16
OKF/ferries/python-siblings/MAP.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
type: Ferry Map
|
||||||
|
---
|
||||||
|
|
||||||
|
# ferry — python-siblings
|
||||||
|
|
||||||
|
Destination: bdd and diagnose carry Python reference siblings of the
|
||||||
|
same depth as their R ones (tests-py, mocking-py, interface-design-py,
|
||||||
|
docstrings-py, feedback-loops-py, instrumentation-py), so /develop-python
|
||||||
|
stops pointing at acknowledged gaps.
|
||||||
|
|
||||||
|
| id | decision | status | blocked-by | blueprint |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| D-1 | mirror R sibling structure or redesign for Python? | open | — | |
|
||||||
|
| D-2 | mocking doctrine: facade+DI only, or bless pytest monkeypatch? | open | D-1 | |
|
||||||
|
| D-3 | split of feedback-loop vs instrumentation content for diagnose? | open | D-1 | |
|
||||||
32
OKF/index.md
Normal file
32
OKF/index.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
okf_version: "0.1"
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — OKF index
|
||||||
|
|
||||||
|
Open-knowledge-format wiki. Agents: read this page first, then the pages
|
||||||
|
your task needs. Humans welcome too.
|
||||||
|
|
||||||
|
## Pages
|
||||||
|
|
||||||
|
- [SUMMARY.md](SUMMARY.md) — what this project is; start here cold.
|
||||||
|
- [ARCHITECTURE.md](ARCHITECTURE.md) — skill categories, seams, the loop.
|
||||||
|
- [CONTEXT.md](CONTEXT.md) — canonical domain glossary.
|
||||||
|
- [ROADMAP.md](ROADMAP.md) — metaharness build-out, phased with verify steps.
|
||||||
|
- [learnings/index.md](learnings/index.md) — gotchas and debunked claims,
|
||||||
|
by the layer each forces to change.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
- [decisions/index.md](decisions/index.md) — the why-register, indexed by
|
||||||
|
the question each decision settles. 20 live.
|
||||||
|
|
||||||
|
## Blueprints
|
||||||
|
|
||||||
|
- [blueprints/index.md](blueprints/index.md) — one file per unit of work,
|
||||||
|
status-tracked. 30 filed.
|
||||||
|
|
||||||
|
## Ferries
|
||||||
|
|
||||||
|
- [ferries/index.md](ferries/index.md) — open deliberations and where
|
||||||
|
they moored. 1 open.
|
||||||
37
OKF/learnings/harness.md
Normal file
37
OKF/learnings/harness.md
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
type: Learnings
|
||||||
|
purpose: Keep what Claude Code turned out to do when it loads, links and routes skills.
|
||||||
|
answers:
|
||||||
|
- "What did we get wrong about how Claude Code loads and routes skills?"
|
||||||
|
cites:
|
||||||
|
- README.md
|
||||||
|
- skills/loop/sound/SKILL.md
|
||||||
|
status: live
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — learnings: the harness
|
||||||
|
|
||||||
|
<!-- Append-only. Format: believed / true / source. Supersede, never
|
||||||
|
rewrite. -->
|
||||||
|
|
||||||
|
- Believed: Claude Code scans `~/.claude/skills/` recursively.
|
||||||
|
True: one level deep only — hence per-skill symlinks, not one repo
|
||||||
|
symlink. Source: `README.md` §Install.
|
||||||
|
- Believed: skills can cross-invoke via description matching. True:
|
||||||
|
cross-links are file paths, so disable-model-invocation is safe for
|
||||||
|
linked skills; only description routing dies. Source: Claude Code
|
||||||
|
skill mechanics, README §Install.
|
||||||
|
- Believed: a model-invoked skill's zero-fire test can run in whatever
|
||||||
|
order the checks are listed. True: naming the skill loads its
|
||||||
|
description, so every question after that measures a primed router,
|
||||||
|
not a cold one — 007's check 4 (ten ordinary questions, zero fires)
|
||||||
|
had to precede check 1 (`/sound` by name), and the session running it
|
||||||
|
could not be the session that built it. A self-fire test is spoiled by
|
||||||
|
the very context that motivates it. Source: weave of blueprint 007.
|
||||||
|
- Believed: reviewing a muster range needs the piped form,
|
||||||
|
`jj diff --from <review-base> --to @ --git | hunk patch -`. True: in a
|
||||||
|
colocated repo git `HEAD` tracks `@-`, so while the rig is one commit deep
|
||||||
|
`HEAD` *is* the review-base and plain `hunk diff` shows exactly the muster
|
||||||
|
range with full TUI navigation. The pipe stays the general answer — the
|
||||||
|
moment the range spans two commits, `hunk diff` shows only the last slice.
|
||||||
|
Source: rig of B-025.
|
||||||
18
OKF/learnings/index.md
Normal file
18
OKF/learnings/index.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
type: Index
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — learnings
|
||||||
|
|
||||||
|
What was believed, what turned out true, and the source that settled it.
|
||||||
|
Append-only per page — supersede, never rewrite. Supersession works
|
||||||
|
**across** pages: a later entry may correct one filed under another theme.
|
||||||
|
|
||||||
|
Themed by the layer an entry forces to change.
|
||||||
|
|
||||||
|
- [loop.md](loop.md) — blueprint, rig, sound: scoping, Verify design,
|
||||||
|
the line cap.
|
||||||
|
- [okf-format.md](okf-format.md) — page contracts, warrants, prior art.
|
||||||
|
- [validators.md](validators.md) — okf-check and what its parsers do not see.
|
||||||
|
- [harness.md](harness.md) — how Claude Code loads and routes skills.
|
||||||
|
- [vcs.md](vcs.md) — jj under a headless agent.
|
||||||
74
OKF/learnings/loop.md
Normal file
74
OKF/learnings/loop.md
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
---
|
||||||
|
type: Learnings
|
||||||
|
purpose: Keep what the loop's own steps taught — blueprint scoping, Verify design, the cap.
|
||||||
|
answers:
|
||||||
|
- "What did we get wrong about the loop's own steps?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/blueprint/blueprint-format.md
|
||||||
|
- skills/loop/rig/SKILL.md
|
||||||
|
status: live
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — learnings: the loop
|
||||||
|
|
||||||
|
<!-- Append-only. Format: believed / true / source. Supersede, never
|
||||||
|
rewrite. -->
|
||||||
|
|
||||||
|
- Believed: a confirm-against-the-code step is what catches a stale
|
||||||
|
index, so it must run for every claim. True: an index that returns
|
||||||
|
**source** rather than metadata makes that step a re-read of bytes
|
||||||
|
already in hand — its value survives only at the gaps where the index
|
||||||
|
cannot answer (nothing indexed, and the working copy). A verification
|
||||||
|
step earns its cost only where the step before it is blind. Source:
|
||||||
|
weave of blueprint 008.
|
||||||
|
- Believed: a mandated new process step drops into a skill's leftover
|
||||||
|
headroom under the ≤110-line cap. True: `moor` sat at 106 (4 spare), but
|
||||||
|
the ferry-muster step is irreducibly ~10 lines — two VCS command examples
|
||||||
|
carry it — so 012 lands `moor` at 115; the step cannot be absorbed without
|
||||||
|
a SKILL/REFERENCE split, which exceeds the blueprint's two declared seams.
|
||||||
|
A blueprint adding a step to a near-cap skill must price the split into its
|
||||||
|
scope. Source: weave of blueprint 012.
|
||||||
|
- Believed: a Verify that greps for the old names is a sound gate for a
|
||||||
|
rename sweep. True: it collides with the sweep's own doctrine — a rule
|
||||||
|
banning a filename has to be able to *say* that filename, so prose listing
|
||||||
|
the banned names trips the very grep meant to prove the sweep finished.
|
||||||
|
014's locked Verify forced both the doctrine and this note to state the rule
|
||||||
|
positively, naming no offender. A bare-filename grep cannot separate a
|
||||||
|
*reference* from a *prohibition*; scope it to link syntax, or exempt the
|
||||||
|
files that carry the rule. Source: weave of blueprint 014.
|
||||||
|
- Believed: grepping a file for the stale form is a sound gate for "every
|
||||||
|
cross-reference resolves". True: grep is line-based and a gate only sees
|
||||||
|
the files it names, so 016's locked Verify reported one stale back-ref
|
||||||
|
where two existed — the second had wrapped between `*"Workflow"*` and
|
||||||
|
`step 5` — and was blind to the identical off-by-one in `examples.md`,
|
||||||
|
a sibling its Seams list did not name. A reference gate must assert the
|
||||||
|
**target** exists (does `### 6` resolve?), not pattern-match the citing
|
||||||
|
text, and must range over every file that cites, not only the ones being
|
||||||
|
edited. Source: weave of blueprint 016.
|
||||||
|
- Believed: a blueprint whose Contract fixes a byte-exact artifact keeps
|
||||||
|
room for its own defects. True: 018 crossed the 150-line cap five times
|
||||||
|
in drafting — every fix prose, never the artifact — and then had no room
|
||||||
|
to absorb the false-green in its own Verify; 019 carries it. Price the
|
||||||
|
cap before writing the artifact in. Source: weave of blueprint 019.
|
||||||
|
- Believed: a locked blueprint's Verify stays runnable until it weaves.
|
||||||
|
True: B-020's Verify runs `wc -l` over `OKF/LEARNINGS.md`, a path B-021
|
||||||
|
then deleted, so B-021 stranded it before it had ever run — and the
|
||||||
|
immutability that protects a Contract from drift is exactly what forbids
|
||||||
|
repairing it. A Verify naming a path is a claim on the tree's shape that
|
||||||
|
any later blueprint can invalidate; supersession is the only exit, so a
|
||||||
|
blueprint that moves a path owes a check of which locked Verify already
|
||||||
|
names it. Source: weave of B-021.
|
||||||
|
- Believed: validating a blueprint's `cites:` is a cheap lint. True: a
|
||||||
|
blueprint cites the very text it is about to change, so the rig that
|
||||||
|
lands it breaks its own pointers and must then repair them — B-022 found
|
||||||
|
nine stale cites, five of them written by blueprints that had already
|
||||||
|
landed. The durable practice is to cite a file the blueprint *edits* by
|
||||||
|
**path alone**, and spend `:symbol` only on text the change leaves
|
||||||
|
standing. Source: weave of B-022.
|
||||||
|
- Believed: shipping an opt-in gate makes it available. True: it makes it
|
||||||
|
forgettable — blueprint-level muster (B-011) shipped and 24 blueprints in a
|
||||||
|
row left the field absent, so `rig` skipped the halt every time without
|
||||||
|
anyone declining it. A gate reached only by remembering is not reached. The
|
||||||
|
fix that costs nothing is forcing the *ruling*, not the gate: on or an
|
||||||
|
explicit off, written where the reviewer already looks. Source: rig of
|
||||||
|
B-025.
|
||||||
49
OKF/learnings/okf-format.md
Normal file
49
OKF/learnings/okf-format.md
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
---
|
||||||
|
type: Learnings
|
||||||
|
purpose: Keep what the OKF format's page contracts, warrants and prior art turned out to be.
|
||||||
|
answers:
|
||||||
|
- "What did we get wrong about the OKF format itself?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/okf-layout.md
|
||||||
|
- skills/loop/write-okf/page-warrant.md
|
||||||
|
status: live
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — learnings: the OKF format
|
||||||
|
|
||||||
|
<!-- Append-only. Format: believed / true / source. Supersede, never
|
||||||
|
rewrite. -->
|
||||||
|
|
||||||
|
- Believed: OKF was an octobot coinage. True: OKF v0.1 is also what
|
||||||
|
OpenWiki emits, so import-compat is nearly free — but its output model
|
||||||
|
(hundreds of generated files, CI-refreshed) is opposite pressure to
|
||||||
|
OKF's ≤110-line durable synthesis. Source: langchain-ai/openwiki
|
||||||
|
(scanned 2026-07-21).
|
||||||
|
- Believed: declared page plans were an octobot invention. True: they are
|
||||||
|
convergent prior art — DeepWiki `pages[]{title, purpose, parent}` and
|
||||||
|
deepwiki-skill's `toc.yaml`; decision 9 is the same move minus a config
|
||||||
|
format. Source: <https://docs.devin.ai/work-with-devin/deepwiki>,
|
||||||
|
<https://github.com/natsu1211/deepwiki-skill> (scanned 2026-07-21).
|
||||||
|
- Believed: shedding both registers would bring ROADMAP under the 110-line
|
||||||
|
cap. True: the warrant `okf-check` requires costs ~7 frontmatter lines a
|
||||||
|
page, which the blueprint's arithmetic (184 − 58 − 16 = 110) did not
|
||||||
|
budget — §Why had to be compressed as well. A page-cap plan must price
|
||||||
|
the frontmatter it also mandates. Source: weave of blueprint 002.
|
||||||
|
- Believed: the cite/pin split earns its own register entry, since 004
|
||||||
|
states it as prose only. True: the warrant is a duplicate —
|
||||||
|
`page-warrant.md:36` already answers who owns cite drift, and
|
||||||
|
[017](../decisions/R-017-pin-drift-splits-by-visibility.md) supplies the
|
||||||
|
visibility principle it follows from. A decision that *extends* a live
|
||||||
|
one without changing it is that one applied, not a new one. Source:
|
||||||
|
warrant test, session 2026-07-22; 020 stays unspent.
|
||||||
|
- Believed: a Verify step that pads a file and then restores it is safe
|
||||||
|
once the padding is described in prose. True: `jj restore` (and `git
|
||||||
|
restore` / `git checkout --`) restores from the **parent** revision,
|
||||||
|
and `describe` does not move the working-copy edits there — they stay
|
||||||
|
on `@` until the next `jj new`. A Verify that pads and restores a path
|
||||||
|
the *same blueprint* also edits throws that edit away, silently,
|
||||||
|
possibly more than once, while every step still prints `OK`. A Verify
|
||||||
|
may only pad-and-restore paths outside its own blueprint's edits; a
|
||||||
|
path inside them needs a different check shape (diff against a named
|
||||||
|
commit, not restore-and-compare). Source: a prior unmerged exploration
|
||||||
|
of B-031's own cap-raise, discovered while sounding it.
|
||||||
47
OKF/learnings/validators.md
Normal file
47
OKF/learnings/validators.md
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
type: Learnings
|
||||||
|
purpose: Keep what the check scripts turned out to see, and what their parsers are blind to.
|
||||||
|
answers:
|
||||||
|
- "What did we get wrong about the OKF check scripts?"
|
||||||
|
cites:
|
||||||
|
- skills/loop/write-okf/scripts/okf-check
|
||||||
|
status: live
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — learnings: the validators
|
||||||
|
|
||||||
|
<!-- Append-only. Format: believed / true / source. Supersede, never
|
||||||
|
rewrite. -->
|
||||||
|
|
||||||
|
- Believed: a marker-shape check can match its markers anywhere in the
|
||||||
|
page. True: octobot's own blueprint 004 *documents* the `okf:derived`
|
||||||
|
markers, so an unanchored match read them as a third fence and failed
|
||||||
|
the repo's own OKF. A delimiter must be anchored to its whole line, or
|
||||||
|
the page that specifies it becomes invalid. Source: weave of blueprint
|
||||||
|
004.
|
||||||
|
- Believed: `okf-check` can read a new nested frontmatter block (like
|
||||||
|
`tally:`) through its generic `frontmatter()` parser. True: that parser
|
||||||
|
flattens a nested block to an empty list — its indented `key: value` lines
|
||||||
|
match neither its list nor its scalar branch — so a block check needs a
|
||||||
|
dedicated regex grab, the way `pin()` handles `sealed:`. Source: weave of
|
||||||
|
blueprint 011.
|
||||||
|
- Believed: a lint that proves three renders byte-identical protects the
|
||||||
|
rendered shape. True: it proves identity only. A rename inside the
|
||||||
|
box-drawing block shifts every copy the same way, so a name that shortens
|
||||||
|
by two columns leaves the right-hand column and its arrows misaligned in
|
||||||
|
all three at once and the check still passes. Re-pad the trailing columns
|
||||||
|
by hand. Source: rig of B-024.
|
||||||
|
- Believed: superseding a blueprint costs one status word, so extracting
|
||||||
|
shared code cannot touch the page it supersedes. True: a `cites:` symbol
|
||||||
|
is a substring of *a named file*, so moving the cited lines into a new
|
||||||
|
helper breaks the cite — `okf-check` went red on B-023 for a docstring
|
||||||
|
that had moved to `_pages.py`, after the diff was already sealed. Per
|
||||||
|
B-022 a cite is a working pointer at every status, so the pointer
|
||||||
|
follows the symbol. Repointing has a trap of its own: the phrase wrapped
|
||||||
|
across two lines in its new home, and a wrapped symbol never resolves,
|
||||||
|
so the obvious repoint stays red. Source: rig of B-026.
|
||||||
|
- Believed: gating `implemented` on a `tally:` block's presence gates the
|
||||||
|
muster verdict. True: `not tally(text)` only tests that the block exists
|
||||||
|
— a `tally: matches: no` block is non-empty, so it passed the same check
|
||||||
|
a missing block failed. A presence check is not a verdict check; the
|
||||||
|
field inside still has to be read. Source: rig of B-027.
|
||||||
35
OKF/learnings/vcs.md
Normal file
35
OKF/learnings/vcs.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
type: Learnings
|
||||||
|
purpose: Keep what jj turned out to do under a headless agent, against what was assumed.
|
||||||
|
answers:
|
||||||
|
- "What did we get wrong about jj under a headless agent?"
|
||||||
|
cites:
|
||||||
|
- skills/productivity/commit-atomic-jj/anti-patterns.md
|
||||||
|
- skills/productivity/resolve-conflicts-jj/SKILL.md
|
||||||
|
status: live
|
||||||
|
---
|
||||||
|
|
||||||
|
# octobot — learnings: version control
|
||||||
|
|
||||||
|
<!-- Append-only. Format: believed / true / source. Supersede, never
|
||||||
|
rewrite. -->
|
||||||
|
|
||||||
|
- Believed: `jj squash`/`describe` can run like any shell command.
|
||||||
|
True: without `-m` / `--use-destination-message` they open an editor
|
||||||
|
and hang headless sessions; backgrounded jj mutations race the
|
||||||
|
working-copy snapshot. Source:
|
||||||
|
`skills/productivity/commit-atomic-jj/anti-patterns.md`, session 2026-07-19.
|
||||||
|
- Believed: a conflicted jj chain must be resolved where it stands.
|
||||||
|
True: check topology first — a chain rebased onto the wrong root
|
||||||
|
produces phantom conflicts; rebasing onto the true destination shrank
|
||||||
|
a 2-file conflict to 1 file before any hand-resolution. Source:
|
||||||
|
session 2026-07-19 (write-readme-py conflict).
|
||||||
|
- Believed: `jj restore <path>` undoes "what I just appended to this
|
||||||
|
file." True: with no `--from`, it reverts to the parent commit's
|
||||||
|
snapshot — discarding every uncommitted edit on that path, not just
|
||||||
|
the last append. A Verify script that plants a probe line and cleans
|
||||||
|
up with `jj restore` wipes real Build work sitting uncommitted on the
|
||||||
|
same file. Fix: undo exactly the planted lines (`head -n -N`), never
|
||||||
|
a blanket restore, when other uncommitted edits may be present. Source:
|
||||||
|
[028](../blueprints/B-028-convert-cross-skill-links-to-skill-names.md),
|
||||||
|
session 2026-09-23.
|
||||||
306
README.md
306
README.md
@ -1,35 +1,155 @@
|
|||||||
# octobot
|
# octobot
|
||||||
|
|
||||||
Personal, reusable Claude Code skills — language-agnostic productivity
|
<table>
|
||||||
workflows that travel with you across every project.
|
<tr>
|
||||||
|
<td width="60%" align="center">
|
||||||
|
<img src="assets/octobot.jpeg" alt="octobot logo" width="200"/>
|
||||||
|
<h3>octobot</h3>
|
||||||
|
<p>Personal, reusable skills for long term projects - productivity workflows that travel with you across every project.</p>
|
||||||
|
</td>
|
||||||
|
<td width="60%">
|
||||||
|
|
||||||
Modeled on [mattpocock/skills](https://github.com/mattpocock/skills).
|
## Table of Contents
|
||||||
|
- [Why this exists](#why-this-exists)
|
||||||
|
- [Inspiration](#inspiration)
|
||||||
|
- [Authorship & testing](#authorship--testing)
|
||||||
|
- [Install](#install)
|
||||||
|
- [Skills](#skills)
|
||||||
|
- [Workflows](#workflows)
|
||||||
|
- [Adding a skill](#adding-a-skill)
|
||||||
|
- [Roadmap](#roadmap)
|
||||||
|
- [License](#license)
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
## Why this exists
|
||||||
|
|
||||||
|
[mattpocock/skills](https://github.com/mattpocock/skills) works perfectly
|
||||||
|
for lean, coding tasks. Octobot grew out of adapting that set with my own
|
||||||
|
experiences with analytical workflows carrying vast biological context —
|
||||||
|
reporter assays, single cell and bulk RNA-seq, genomics or clinical
|
||||||
|
pipelines. If you add the time needed to generate a hypothesis, run wet
|
||||||
|
lab experiments, the periods of time are getting very long. As a
|
||||||
|
computational biologist you also are involved in multiple parallel
|
||||||
|
projects. Bioinformatics analysis usually requires deep project
|
||||||
|
understanding and tremendous focus. This situation creates a specific
|
||||||
|
knowledge and mental gap that has to be removed quickly. This can be done
|
||||||
|
in many ways. My preferred way is to write decisions and their
|
||||||
|
justifications in human readable format and to keep a functional, project
|
||||||
|
directory structure supported by version control. This is the reason why
|
||||||
|
I made a conscious decision to extend documentation and bake it into the
|
||||||
|
loop itself (the OKF wiki, blueprints, decision files) rather than leave
|
||||||
|
it implicit, plus a Socratic front end (`grill-me`, `chart`, `sound`) and
|
||||||
|
backend (`winnow`, `nuke-review`, `sieve`, `review-angles`), to pin down
|
||||||
|
ambiguity before it becomes an expensive rewrite three months later.
|
||||||
|
Initially, I developed my own skill workflow that turned out to be very
|
||||||
|
similar to other skill repositories that got significant traction on
|
||||||
|
GitHub. Therefore, I decided to merge my workflow with current best
|
||||||
|
practices.
|
||||||
|
|
||||||
|
## Inspiration
|
||||||
|
|
||||||
|
- [Matt Pocock's skills](https://github.com/mattpocock/skills) — the base
|
||||||
|
this repo is modeled on.
|
||||||
|
- [Superpowers](https://github.com/obra/superpowers)
|
||||||
|
- [Ponytail](https://github.com/DietrichGebert/ponytail) — highly
|
||||||
|
recommended paired with octobot's skills when writing code.
|
||||||
|
- [Andrej Karpathy's skills wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f)
|
||||||
|
(also mirrored as
|
||||||
|
[andrej-karpathy-skills](https://github.com/multica-ai/andrej-karpathy-skills/blob/main/CLAUDE.md),
|
||||||
|
itself the source of `CLAUDE.md` §1–4 here)
|
||||||
|
- [Google's Open Knowledge Format](https://cloud.google.com/blog/products/data-analytics/how-the-open-knowledge-format-can-improve-data-sharing/) —
|
||||||
|
the shape behind octobot's `OKF/` wiki.
|
||||||
|
|
||||||
|
## Authorship & testing
|
||||||
|
|
||||||
|
Initial drafts of these skills were human-written and came from my own workflow.
|
||||||
|
I backed them on top of Matt Pocock's skills. During development I adapted them
|
||||||
|
with Anthropic's Sonnet and Opus models as well as Qwen's. Skills were tested
|
||||||
|
across multiple harnesses: Claude Code, GitHub Copilot, and the Pi coding
|
||||||
|
agent.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
**Claude Code, or any Agent Skills-compatible harness on this machine.**
|
||||||
Claude Code discovers skills at `~/.claude/skills/<name>/SKILL.md` (flat,
|
Claude Code discovers skills at `~/.claude/skills/<name>/SKILL.md` (flat,
|
||||||
one level deep — category subfolders are not scanned). Symlink each skill
|
one level deep — category subfolders are not scanned); Codex and similar
|
||||||
individually:
|
harnesses read `~/.agents/skills/<name>/`. Clone this repo, then run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir -p ~/.claude/skills
|
scripts/link-skills.sh
|
||||||
for s in ~/code/octobot/skills/*/*/; do
|
|
||||||
ln -s "${s%/}" "$HOME/.claude/skills/$(basename "$s")"
|
|
||||||
done
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Open any project, start Claude Code, and the skills below appear in the
|
It symlinks every skill into both directories, so a `git pull` (or `jj
|
||||||
skill list.
|
git fetch`) is all that's needed to keep them up to date. Open any
|
||||||
|
project, start your agent, and the skills below appear in the skill
|
||||||
|
list. Optionally, run `/talk-caveman` for terse mode — no preamble, no
|
||||||
|
summaries — it overlays any workflow below.
|
||||||
|
|
||||||
|
**Any other harness** (Copilot, or anywhere `~/.claude/skills` doesn't
|
||||||
|
apply): `npx skills@latest add lukabor/octobot` copies the skills you
|
||||||
|
pick into your project as ordinary files.
|
||||||
|
|
||||||
## Skills
|
## Skills
|
||||||
|
|
||||||
|
### loop — the metaharness spine
|
||||||
|
Octobot's core: a loop-engineering metaharness over an **OKF**
|
||||||
|
(open-knowledge-format) wiki at each project's `./OKF/`. First time in a
|
||||||
|
repo? Run `/init-octobot` before any of this — it bootstraps `AGENTS.md`
|
||||||
|
and a bare `OKF/` so the spine below has something to scaffold or refresh.
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="assets/octo_workflow.jpg" alt="octobot loop workflow diagram" width="600"/>
|
||||||
|
<br/>
|
||||||
|
<sub>Generated with GPT-5.6 Luna</sub>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
- **write-okf** — scaffold or refresh the OKF wiki; wires `AGENTS.md` so
|
||||||
|
every agent reads `OKF/index.md` before code.
|
||||||
|
- **chart** — plan a project or revise its plan (`OKF/ROADMAP.md`);
|
||||||
|
greenfield and revision modes (replaces plan-project + update-project).
|
||||||
|
- **blueprint** — synthesize discussed work into a justified, verifiable
|
||||||
|
blueprint at `OKF/blueprints/NNN-<slug>.md` (status: draft → locked → implemented).
|
||||||
|
- **sound** — verified recon before a lock: OKF, then the nostos MCP
|
||||||
|
server, then files only where nostos cannot answer; stamps `sounded:`.
|
||||||
|
- **ferry** — work too big for one session becomes a directory of small,
|
||||||
|
edge-declared decision files; resolve one per sitting.
|
||||||
|
- **rig** — execute one locked blueprint: bdd at its seams, four-axis
|
||||||
|
review, run its Verify with pasted output, seal citing the blueprint.
|
||||||
|
- **call-charon** — deliver an arrived ferry's blueprints via agents:
|
||||||
|
one isolated builder per blueprint, fresh-context review flotilla,
|
||||||
|
orchestrator-run Verify gate, passage logged in `MAP.md`.
|
||||||
|
- **moor** — close out a delivered ferry: reconcile the wiki with what
|
||||||
|
shipped, extract loose ends into new blueprints/ferries, shrink
|
||||||
|
index.md; status flips, nothing deleted.
|
||||||
|
- **steer** — router over every skill; most are user-invoked, steer is
|
||||||
|
the index.
|
||||||
|
|
||||||
|
Every loop skill is user-invoked (`disable-model-invocation: true`)
|
||||||
|
except **sound**, which only reads — see `OKF/decisions/019`.
|
||||||
|
|
||||||
### productivity
|
### productivity
|
||||||
- **conjure-a-skill** — meta-skill that scaffolds new skills consistently.
|
- **conjure-a-skill** — meta-skill that scaffolds new skills consistently.
|
||||||
- **handoff** — produce a structured handoff doc for a fresh session.
|
- **write-handoff** — produce a structured handoff doc for a fresh session.
|
||||||
- **grill-me** — Socratic loop to remove ambiguity before implementing.
|
- **grill-me** — Socratic loop to remove ambiguity before implementing.
|
||||||
- **caveman** — terse-mode: no preamble, no summaries, code + one-line why.
|
- **resolve-conflicts-jj** — jj conflict discipline: topology first, both
|
||||||
- **jj-atomic** — atomic-commit discipline: `jj diff` → split → semantic
|
intents preserved, headless-safe squash.
|
||||||
message; docs / docstrings / READMEs ship in the same change.
|
- **talk-caveman** — terse-mode: no preamble, no summaries, code + one-line why.
|
||||||
|
- **spawn-cavecrew** — how to invoke the plugin `caveman:cavecrew-*` agents
|
||||||
|
(investigator / builder / reviewer) without the agent-type error; octobot
|
||||||
|
defaults (`jj diff` review, `commit-atomic-jj` commit).
|
||||||
|
- **commit-atomic-jj** — atomic-commit discipline: `jj diff` → split → semantic
|
||||||
|
message; docs / docstrings / READMEs ship in the same change. Message
|
||||||
|
structure (1-3 blank-line-separated blocks, `type(scope): phrase[;
|
||||||
|
starts|extends|ends REF]`) is checked by `scripts/commit-msg-check` —
|
||||||
|
mandatory pre-`jj describe` step (jj has no hook mechanism), or a real
|
||||||
|
`git commit-msg` hook via `--install-hook` in plain git repos. Works in
|
||||||
|
any repo, not just octobot — resolve the script from this skill's own
|
||||||
|
base directory, not the target repo's cwd. Extend the closed `type`
|
||||||
|
set per repo with an optional `.commit-lint.toml` (`extra_types =
|
||||||
|
[...]`) at that repo's root; no file needed for the default set.
|
||||||
|
|
||||||
### engineering
|
### engineering
|
||||||
- **sieve** — Socratic Real / Good / Minimal gate; burden on *keeping*, not
|
- **sieve** — Socratic Real / Good / Minimal gate; burden on *keeping*, not
|
||||||
@ -37,26 +157,48 @@ skill list.
|
|||||||
`winnow`.
|
`winnow`.
|
||||||
- **winnow** — blunt after-the-fact debloat audit; `delete/stdlib/native/
|
- **winnow** — blunt after-the-fact debloat audit; `delete/stdlib/native/
|
||||||
yagni/shrink` tags, `net: -N lines`. Only ever removes. Pairs with `sieve`.
|
yagni/shrink` tags, `net: -N lines`. Only ever removes. Pairs with `sieve`.
|
||||||
- **background-work** — rules for daemon threads, trigger loops, shared
|
- **harden-background-work** — rules for daemon threads, trigger loops, shared
|
||||||
locks, readiness surfaces — the failures a green unit suite misses.
|
locks, readiness surfaces — the failures a green unit suite misses.
|
||||||
- **review-angles** — recall-biased correctness checklist for the post-green
|
- **review-angles** — recall-biased correctness checklist for the post-green
|
||||||
review pass (stale refs, TOCTOU, ordering state, durability, invalidation).
|
review pass (stale refs, TOCTOU, ordering state, durability, invalidation).
|
||||||
|
- **review-blueprint** — the blueprint-fidelity axis: diff vs `OKF/blueprints/NNN` —
|
||||||
|
complete, contained, verified (output pasted). rig's done-gate.
|
||||||
|
- **nuke-review** — exceptionally strict structural-quality review for code
|
||||||
|
judo moves; ported from cursor/plugins thermo-nuclear-code-quality-review.
|
||||||
|
Pairs with `review-angles` (correctness) and `winnow` (debloat) as the
|
||||||
|
three post-green review axes. User-invoked.
|
||||||
- **bdd** — strict red-green-refactor loop with BDD Given/When/Then
|
- **bdd** — strict red-green-refactor loop with BDD Given/When/Then
|
||||||
scenarios as the unit of work.
|
scenarios as the unit of work.
|
||||||
- **diagnose** — six-phase bug hunt: feedback loop → reproduce →
|
- **diagnose** — six-phase bug hunt: feedback loop → reproduce →
|
||||||
hypothesise → instrument → fix with regression test → cleanup.
|
hypothesise → instrument → fix with regression test → cleanup.
|
||||||
- **grill-with-docs** — docs-anchored Socratic interview; updates
|
- **grill-with-docs** — user-invoked router that runs `grill-me` using
|
||||||
`CONTEXT.md` inline, offers ADRs only on the three-of-three rule.
|
`model-domain` on an existing codebase.
|
||||||
- **r-style** — Tidyverse + `box::use` + `dtplyr` standards with
|
- **model-domain** — actively build / sharpen a project's domain
|
||||||
|
model — challenge terms, update `CONTEXT.md` inline, offer decision
|
||||||
|
files only on the warrant test.
|
||||||
|
- **design-codebase** — shared vocabulary for designing deep modules
|
||||||
|
(module, interface, seam, adapter, depth, leverage, locality);
|
||||||
|
`deepening.md` for dependency-aware seam strategy, `design-it-twice.md`
|
||||||
|
for parallel-sub-agent interface exploration.
|
||||||
|
- **style-r** — Tidyverse + `box::use` + `dtplyr` standards with
|
||||||
paired good/bad sibling docs (`box.md`, `tidyverse.md`, `dtplyr.md`).
|
paired good/bad sibling docs (`box.md`, `tidyverse.md`, `dtplyr.md`).
|
||||||
- **dev-python** — orchestrate the full Python workflow (implement →
|
- **develop-python** — orchestrate the full Python workflow (implement →
|
||||||
lint → typecheck → test → commit). Explicit trigger only.
|
lint → typecheck → test → commit). Explicit trigger only.
|
||||||
- **dev-r** — orchestrate the full R workflow; auto-detects package
|
- **develop-r** — orchestrate the full R workflow; auto-detects package
|
||||||
(`DESCRIPTION`) vs analysis (`_targets.R`).
|
(`DESCRIPTION`) vs analysis (`_targets.R`).
|
||||||
|
- **write-readme** — generate `README.md` for any project via ecosystem
|
||||||
|
detection (python / R / node / rust / generic).
|
||||||
- **write-readme-py** — generate `README.md` from `pyproject.toml` +
|
- **write-readme-py** — generate `README.md` from `pyproject.toml` +
|
||||||
`justfile`.
|
`justfile`.
|
||||||
|
- **add-copilot-project-skill** — scaffold a project-specific skill set for
|
||||||
|
GitHub Copilot in the Claude Code SKILLS structure; single-sourced from the
|
||||||
|
repo's own docs, backed by a mechanical validator. Tuned for config-driven
|
||||||
|
pipelines (e.g. R `{targets}` projects).
|
||||||
|
|
||||||
### scaffold
|
### scaffold
|
||||||
|
- **init-octobot** — bootstrap octobot's framework files (`AGENTS.md`,
|
||||||
|
optional `CLAUDE.md`, bare `OKF/`, `README.md` stub) into any repo,
|
||||||
|
greenfield or ongoing, that never ran octobot before.
|
||||||
- **build-py-project** — uv + justfile + pyproject; Docker via
|
- **build-py-project** — uv + justfile + pyproject; Docker via
|
||||||
`containerize-project`.
|
`containerize-project`.
|
||||||
- **build-r-package** — renv + DESCRIPTION + testthat; Docker via
|
- **build-r-package** — renv + DESCRIPTION + testthat; Docker via
|
||||||
@ -73,6 +215,69 @@ skill list.
|
|||||||
runtime (`env_file` / compose secrets) credentials without leaking
|
runtime (`env_file` / compose secrets) credentials without leaking
|
||||||
into image layers.
|
into image layers.
|
||||||
|
|
||||||
|
## Workflows
|
||||||
|
|
||||||
|
Common ways the skills chain together. Each recipe is a *sequence*, not a
|
||||||
|
script — read the relevant SKILL.md as you enter each step.
|
||||||
|
|
||||||
|
### Project lifecycle
|
||||||
|
- **New repo (octobot never ran here)** — `/init-octobot` (bootstrap
|
||||||
|
`AGENTS.md`, bare `OKF/`, README stub) → `/write-okf` only if
|
||||||
|
`init-octobot` found a `LEGACY` file (migrates `CONTEXT.md` /
|
||||||
|
`docs/Roadmap.md` / `docs/adr` into `OKF/`) → `/chart` (Socratic
|
||||||
|
kickoff → `OKF/ROADMAP.md`) → `/build-py-project` |
|
||||||
|
`/build-r-package` | `/build-r-analysis` (scaffold) → `/write-readme`
|
||||||
|
(replaces the stub with a real README) → feature loops below →
|
||||||
|
`/chart` (revision mode as you learn).
|
||||||
|
- **Greenfield, octobot already present** — `/write-okf` (knowledge
|
||||||
|
scaffold) → `/chart` (Socratic kickoff → `OKF/ROADMAP.md`)
|
||||||
|
→ `/build-py-project` | `/build-r-package` | `/build-r-analysis` (scaffold)
|
||||||
|
→ feature loops below → `/chart` (revision mode as you learn).
|
||||||
|
- **Feature on an existing codebase** — `/grill-with-docs` if the design needs
|
||||||
|
pinning → `/bdd` (red-green-refactor) → post-green review (next recipe)
|
||||||
|
→ `/commit-atomic-jj` (seal).
|
||||||
|
- **Bug hunt** — `/diagnose` (six phases; hands to `/bdd` at phase 5 for the
|
||||||
|
regression test) → post-green review → `/commit-atomic-jj`.
|
||||||
|
- **Multi-session epic (ferry crossing)** — `/ferry` (map decisions, resolve
|
||||||
|
one per sitting) → `/blueprint` (lock the resulting blueprints) →
|
||||||
|
`/call-charon` (one builder agent per blueprint, review flotilla,
|
||||||
|
orchestrator-run Verify) or `/rig` per blueprint by hand →
|
||||||
|
`/moor` (reconcile the wiki with what shipped, extract loose ends,
|
||||||
|
hand the ferry its rest).
|
||||||
|
|
||||||
|
### Post-green review (the four axes)
|
||||||
|
- `/review-angles` — correctness / robustness (stale refs, TOCTOU, ordering,
|
||||||
|
durability). Run *first* — these are the silent killers.
|
||||||
|
- `/nuke-review` — structural quality / code judo. Pushes for code that
|
||||||
|
*deletes* moving pieces, not rearranges them. User-invoked.
|
||||||
|
- `/winnow` — mechanical debloat with a `net: −N lines` scoreboard.
|
||||||
|
- `/review-blueprint` — blueprint fidelity: everything asked, nothing beyond,
|
||||||
|
Verify output pasted.
|
||||||
|
- Spawn any axis as a sub-agent via `/spawn-cavecrew`
|
||||||
|
(the `caveman:cavecrew-reviewer` invocation cheatsheet).
|
||||||
|
|
||||||
|
### Architecture & vocabulary
|
||||||
|
- **Design conversation** — `/design-codebase` (solution-structure vocab:
|
||||||
|
module / interface / seam / adapter / depth) + `/model-domain`
|
||||||
|
(problem-domain vocab: `CONTEXT.md`, decisions on the warrant test).
|
||||||
|
- **Stress-test a plan against the codebase** — `/grill-with-docs`
|
||||||
|
(Socratic interview against `OKF/CONTEXT.md` and `OKF/decisions/`).
|
||||||
|
|
||||||
|
### Meta
|
||||||
|
- **Author a new skill in this repo** — `/conjure-a-skill` → `/commit-atomic-jj`.
|
||||||
|
- **End of session, fresh context next time** — `/write-handoff`.
|
||||||
|
|
||||||
|
### Orthogonal modes
|
||||||
|
These overlay any workflow above:
|
||||||
|
- **Language harnesses** — `/develop-r` or `/develop-python` orchestrate the full
|
||||||
|
per-language loop (implement → lint → test → commit). Explicit trigger
|
||||||
|
only; don't auto-invoke for individual tasks.
|
||||||
|
- **Intensity** — `/talk-caveman` switches the session into terse mode
|
||||||
|
(no preamble, no summaries). `sieve` and others document `lite / full / ultra`.
|
||||||
|
- **Agent dispatch** — `/spawn-cavecrew` is the "how to call
|
||||||
|
`caveman:cavecrew-{investigator,builder,reviewer}` in this repo without
|
||||||
|
the agent-type error" cheatsheet.
|
||||||
|
|
||||||
## Adding a skill
|
## Adding a skill
|
||||||
|
|
||||||
Run `/conjure-a-skill` in any project. It will ask for name, trigger, and
|
Run `/conjure-a-skill` in any project. It will ask for name, trigger, and
|
||||||
@ -84,41 +289,70 @@ repo.
|
|||||||
Known gaps tracked here. Pick one off the list when you have a quiet
|
Known gaps tracked here. Pick one off the list when you have a quiet
|
||||||
afternoon.
|
afternoon.
|
||||||
|
|
||||||
- **`handoff` needs a filled example.** The SKILL.md ships a template but
|
- **`write-handoff` needs a filled example.** The SKILL.md ships a template but
|
||||||
no worked instance. Add `handoff/example.md` — a one-page fictional but
|
no worked instance. Add `write-handoff/example.md` — a one-page fictional but
|
||||||
realistic filled handoff doc — so a reader sees the format in motion
|
realistic filled handoff doc — so a reader sees the format in motion
|
||||||
(matches the strength of `jj-atomic/examples.md`).
|
(matches the strength of `commit-atomic-jj/examples.md`).
|
||||||
- **`grill-me` needs a filled dialogue.** Add `grill-me/example.md` —
|
- **`grill-me` needs a filled dialogue.** Add `grill-me/example.md` —
|
||||||
a short Q-by-Q transcript on a vague task that resolves into a
|
a short Q-by-Q transcript on a vague task that resolves into a
|
||||||
one-paragraph statement, mirroring `grill-with-docs/examples-r.md`.
|
one-paragraph statement, mirroring `model-domain/examples-r.md`.
|
||||||
Makes the plan-only vs docs-anchored distinction obvious at a glance.
|
Makes the plan-only vs docs-anchored distinction obvious at a glance.
|
||||||
- **Python siblings for `bdd` / `diagnose`.** R has `tests-r.md`,
|
- **Python siblings for `bdd` / `diagnose`.** R has `tests-r.md`,
|
||||||
`mocking-r.md`, `feedback-loops-r.md`, etc. Python equivalents
|
`mocking-r.md`, `feedback-loops-r.md`, etc. Python equivalents
|
||||||
(`tests-py.md`, `mocking-py.md`, `feedback-loops-py.md`) are
|
(`tests-py.md`, `mocking-py.md`, `feedback-loops-py.md`) are
|
||||||
acknowledged as missing in [`dev-python/SKILL.md`](skills/engineering/dev-python/SKILL.md).
|
acknowledged as missing in [`develop-python/SKILL.md`](skills/engineering/develop-python/SKILL.md).
|
||||||
- **`write-readme-r`.** The R counterpart to `write-readme-py` (read
|
|
||||||
`DESCRIPTION` for packages and `_targets.R` + `index.qmd` for
|
|
||||||
analyses) is noted as out of scope in
|
|
||||||
[`write-readme-py/SKILL.md`](skills/engineering/write-readme-py/SKILL.md).
|
|
||||||
|
|
||||||
### Socratic spine (toward a harness)
|
### Socratic spine (toward a harness)
|
||||||
|
|
||||||
The library is being organized around a Socratic lifecycle —
|
The library is being organized around a Socratic lifecycle —
|
||||||
**Question** (grill-me, grill-with-docs, plan-project) → **Gate** (sieve) →
|
**Question** (grill-me, grill-with-docs, chart) → **Gate** (sieve) →
|
||||||
**Build** (bdd) → **Refute** (review-angles, winnow, refute.md) →
|
**Build** (bdd) → **Refute** (review-angles, winnow, refute.md) →
|
||||||
**Seal** (jj-atomic). Done so far: the three-sieve spine in `CLAUDE.md §2`
|
**Seal** (commit-atomic-jj). Done so far: the three-sieve spine in `CLAUDE.md §2`
|
||||||
and the shared `refute.md` elenchus doctrine. Remaining, **in order — don't
|
and the shared `refute.md` elenchus doctrine. Remaining, **in order — don't
|
||||||
build the harness before the leaves are proven by real use**:
|
build the harness before the leaves are proven by real use**:
|
||||||
|
|
||||||
- **Generalize `dev-python` / `dev-r` into one Socratic harness.** Both are
|
- **Generalize `develop-python` / `develop-r` into one Socratic harness.** Both are
|
||||||
already proto-harnesses (implement → lint → test → commit). Extract one
|
already proto-harnesses (implement → lint → test → commit). Extract one
|
||||||
language-agnostic loop — *grill → plan → per-slice(bdd red/green → sieve at
|
language-agnostic loop — *grill → plan → per-slice(bdd red/green → sieve at
|
||||||
seal → jj-atomic) → review-angles + winnow → handoff* — with `dev-python` /
|
seal → commit-atomic-jj) → review-angles + winnow → write-handoff* — with `develop-python` /
|
||||||
`dev-r` as the language-flavored leaves. This is the harness target.
|
`develop-r` as the language-flavored leaves. This is the harness target.
|
||||||
- **Shared `## Intensity` convention.** `caveman` and `sieve` both have
|
- **Shared `## Intensity` convention.** `talk-caveman` and `sieve` both have
|
||||||
lite/full/ultra; standardize a one-line intensity block so the harness can
|
lite/full/ultra; standardize a one-line intensity block so the harness can
|
||||||
run the whole spine at one setting (ultra = aggressive end-to-end).
|
run the whole spine at one setting (ultra = aggressive end-to-end).
|
||||||
- **Recategorize skills by lifecycle phase** (`question/gate/build/refute/
|
- **Recategorize skills by lifecycle phase** (`question/gate/build/refute/
|
||||||
seal/`) — *only if* the harness reads categories to sequence. Claude Code
|
seal/`) — *only if* the harness reads categories to sequence. Claude Code
|
||||||
doesn't scan category dirs, so until the harness consumes them this is
|
doesn't scan category dirs, so until the harness consumes them this is
|
||||||
motion, not progress. Defer until the harness exists.
|
motion, not progress. Defer until the harness exists.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
octobot is licensed under the Apache License 2.0.
|
||||||
|
|
||||||
|
You are free to:
|
||||||
|
- Use octobot for any purpose (commercial or non-commercial)
|
||||||
|
- Modify and distribute the code
|
||||||
|
- Use it in proprietary software
|
||||||
|
- Patent protection included
|
||||||
|
|
||||||
|
### Requirements:
|
||||||
|
- Include the LICENSE file
|
||||||
|
- Preserve copyright notices
|
||||||
|
- State any changes you made
|
||||||
|
|
||||||
|
### Attribution
|
||||||
|
When using octobot, attribution such as the following is appreciated:
|
||||||
|
|
||||||
|
In your project:
|
||||||
|
> Powered by octobot by Lukasz Boryn
|
||||||
|
|
||||||
|
In academic papers:
|
||||||
|
```bibtex
|
||||||
|
@software{octobot,
|
||||||
|
author = {Boryn, Lukasz},
|
||||||
|
title = {octobot: personal, reusable Claude Code skills},
|
||||||
|
year = {2026},
|
||||||
|
url = {https://github.com/lukabor/octobot}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Full license: See [LICENSE](LICENSE).
|
||||||
|
|||||||
BIN
assets/octo_workflow.jpg
Normal file
BIN
assets/octo_workflow.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 127 KiB |
BIN
assets/octobot.jpeg
Normal file
BIN
assets/octobot.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
62
scripts/link-skills.sh
Executable file
62
scripts/link-skills.sh
Executable file
@ -0,0 +1,62 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Links every skill in this repo into the local skill directories used by
|
||||||
|
# each agent harness:
|
||||||
|
# - ~/.claude/skills: Claude Code
|
||||||
|
# - ~/.agents/skills: Codex and other Agent Skills-compatible harnesses
|
||||||
|
# Each entry is a symlink into this repo, so a `git pull` (or `jj git
|
||||||
|
# fetch`) is all that's needed to keep installed skills up to date.
|
||||||
|
# Mirrors mattpocock/skills' scripts/link-skills.sh.
|
||||||
|
|
||||||
|
REPO="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
|
DESTS=("$HOME/.claude/skills" "$HOME/.agents/skills")
|
||||||
|
|
||||||
|
names=()
|
||||||
|
srcs=()
|
||||||
|
while IFS= read -r -d '' skill_md; do
|
||||||
|
src="$(dirname "$skill_md")"
|
||||||
|
names+=("$(basename "$src")")
|
||||||
|
srcs+=("$src")
|
||||||
|
done < <(find "$REPO/skills" -name SKILL.md -print0)
|
||||||
|
|
||||||
|
for DEST in "${DESTS[@]}"; do
|
||||||
|
# If $DEST is a symlink that resolves into this repo, we'd end up writing
|
||||||
|
# the per-skill symlinks back into the repo's own skills/ tree. Detect
|
||||||
|
# and bail out instead of polluting the working copy.
|
||||||
|
if [ -L "$DEST" ]; then
|
||||||
|
resolved="$(readlink -f "$DEST")"
|
||||||
|
case "$resolved" in
|
||||||
|
"$REPO"|"$REPO"/*)
|
||||||
|
echo "error: $DEST is a symlink into this repo ($resolved)." >&2
|
||||||
|
echo "Remove it (rm \"$DEST\") and re-run; the script will recreate it as a real dir." >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$DEST"
|
||||||
|
|
||||||
|
# Prune links into this repo whose target is gone (a renamed or removed
|
||||||
|
# skill), so they don't linger as dangling entries.
|
||||||
|
for link in "$DEST"/*; do
|
||||||
|
if [ -L "$link" ] && [ ! -e "$link" ]; then
|
||||||
|
case "$(readlink "$link")" in
|
||||||
|
"$REPO"/*) rm "$link"; echo "pruned $(basename "$link") ($DEST)" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for i in "${!names[@]}"; do
|
||||||
|
name="${names[$i]}"
|
||||||
|
src="${srcs[$i]}"
|
||||||
|
target="$DEST/$name"
|
||||||
|
|
||||||
|
if [ -e "$target" ] && [ ! -L "$target" ]; then
|
||||||
|
rm -rf "$target"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -sfn "$src" "$target"
|
||||||
|
echo "linked $name -> $src ($DEST)"
|
||||||
|
done
|
||||||
|
done
|
||||||
@ -1,21 +1,25 @@
|
|||||||
---
|
---
|
||||||
name: add-copilot-project-skill
|
name: add-copilot-project-skill
|
||||||
description: Scaffold a project-specific skill set that guides contributors through a repo's repeatable, error-prone extension tasks — consumed by GitHub Copilot, authored in the Claude Code SKILLS structure, single-sourced from the repo's own docs, and backed by a mechanical validator. Tuned for config-driven pipelines (e.g. R `{targets}` projects). Use when the user says "add copilot project skills", "turn our onboarding/extension workflow into skills", "guide contributors to add datasets/modules/targets/chapters", "make a Copilot skill set for this repo", "/add-copilot-project-skill".
|
description: Scaffold a .github/skills set (Copilot cloud agent format) for a repo's extension tasks, with validator.
|
||||||
|
disable-model-invocation: true
|
||||||
---
|
---
|
||||||
|
|
||||||
# add-copilot-project-skill
|
# add-copilot-project-skill
|
||||||
|
|
||||||
Build a set of *project* skills that live in the repo and lower the error rate
|
Build a set of *project* skills that live in the repo and lower the error rate
|
||||||
on its recurring extension tasks (add a data source, a module, a pipeline node,
|
on its recurring extension tasks (add a data source, a module, a pipeline node,
|
||||||
a report section). The skills are authored once in the **Claude Code SKILLS
|
a report section). The skills follow the **GitHub Copilot cloud coding agent
|
||||||
structure** and surfaced to **GitHub Copilot** via prompt files — one body, two
|
skill format** ([docs](https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/add-skills)):
|
||||||
front doors, no drift.
|
`.github/skills/<name>/SKILL.md`, autodiscovered, routed by description
|
||||||
|
matching — no slash-invocation step required.
|
||||||
|
|
||||||
## When to use
|
## When to use
|
||||||
- A repo has a repeatable, multi-step extension task with silent failure modes
|
- A repo has a repeatable, multi-step extension task with silent failure modes
|
||||||
(something declared but not registered; a name that must match in two places).
|
(something declared but not registered; a name that must match in two places).
|
||||||
- The team uses GitHub Copilot and wants guided, in-repo workflows.
|
- The team uses GitHub Copilot's cloud agent (issue assignment / `@copilot` in
|
||||||
- The user wants Claude Code SKILLS conventions but Copilot as the consumer.
|
PR comments) and wants guided, in-repo workflows.
|
||||||
|
- The user wants the SKILLS authoring conventions (frontmatter, "Use when"
|
||||||
|
trigger, ≤100-line progressive-disclosure body) targeting Copilot.
|
||||||
|
|
||||||
## Process
|
## Process
|
||||||
1. **Interview the repo, not just the user.** Read the existing contributor
|
1. **Interview the repo, not just the user.** Read the existing contributor
|
||||||
@ -30,35 +34,49 @@ front doors, no drift.
|
|||||||
the invariants, scoped to changed files, tuned to pass clean on the main
|
the invariants, scoped to changed files, tuned to pass clean on the main
|
||||||
branch. Details + the AST-parsing and severity rules in
|
branch. Details + the AST-parsing and severity rules in
|
||||||
[project-validator.md](project-validator.md).
|
[project-validator.md](project-validator.md).
|
||||||
3. **Write the always-on conventions** — `AGENTS.md` and
|
3. **Write the always-on conventions** — `AGENTS.md` carries the house style.
|
||||||
`.github/copilot-instructions.md` carry the house style so every suggestion
|
`.github/copilot-instructions.md` is a thin redirect to `AGENTS.md` plus a
|
||||||
inherits it without a skill being invoked. Templates in
|
**skills menu** that names each skill with its trigger phrases (improves
|
||||||
|
discoverability beyond description matching alone). Templates in
|
||||||
[skill-templates.md](skill-templates.md).
|
[skill-templates.md](skill-templates.md).
|
||||||
4. **Author the leaf skills** (one per artifact task) and **parent skills** (one
|
4. **Author the leaf skills** (one per artifact task) and **parent skills** (one
|
||||||
per composite/modality). Each is a thin, conversation-style stub: interview
|
per composite/modality) at `.github/skills/<name>/SKILL.md`. Each is a thin,
|
||||||
first, point at **live repo files** as the example (zero drift), end at the
|
conversation-style stub: interview first, point at **live repo files** as
|
||||||
validator, then **hand off to the next skill by name and pause** — Copilot
|
the example (zero drift), end at the validator, then **hand off to the next
|
||||||
cannot auto-invoke a sub-prompt, so never auto-chain. Layout, the
|
skill by name and pause** — the cloud agent decides per turn whether to load
|
||||||
Claude↔Copilot mapping, and the handoff rule are in
|
a sibling skill, so never auto-chain. Layout and the handoff rule are in
|
||||||
[layout-and-surfaces.md](layout-and-surfaces.md).
|
[layout-and-surfaces.md](layout-and-surfaces.md).
|
||||||
5. **Mirror each skill to `.github/prompts/<name>.prompt.md`** — a stub that
|
5. **Add path-scoped instructions** at `.github/instructions/<name>.instructions.md`
|
||||||
points back to its canonical `SKILL.md` so the two cannot drift.
|
with `applyTo:` globs. These auto-load when a contributor opens a matching
|
||||||
|
file, surfacing the relevant skill's name and the project-specific gotchas
|
||||||
|
without requiring an explicit prompt.
|
||||||
6. **Verify**: run `just validate` on a clean tree (expect zero errors); confirm
|
6. **Verify**: run `just validate` on a clean tree (expect zero errors); confirm
|
||||||
every path a skill cites actually exists; deliberately break one invariant
|
every path a skill cites actually exists; deliberately break one invariant
|
||||||
and confirm the validator catches it, then revert.
|
and confirm the validator catches it, then revert. Assign a test issue to
|
||||||
|
Copilot that should match one skill's `description:` and confirm the
|
||||||
|
agent's plan paraphrases lines from that `SKILL.md`.
|
||||||
|
|
||||||
## Output / done criteria
|
## Output / done criteria
|
||||||
- `skills/<name>/SKILL.md` (canonical) + `.github/prompts/<name>.prompt.md`
|
- `.github/skills/<name>/SKILL.md` for each task (canonical, autodiscovered);
|
||||||
(mirror) for each task; `AGENTS.md` + `.github/copilot-instructions.md`;
|
`.github/instructions/<name>.instructions.md` for each editable surface;
|
||||||
a working `scripts/validate_extension.*` wired as `just validate`.
|
`AGENTS.md` (canonical house style); `.github/copilot-instructions.md` (thin
|
||||||
|
redirect + skills menu); a working `scripts/validate_extension.*` wired as
|
||||||
|
`just validate`.
|
||||||
- Validator passes clean on the main branch and fires on an injected break.
|
- Validator passes clean on the main branch and fires on an injected break.
|
||||||
- Skills reference live files, interview first, and hand off explicitly.
|
- Skills reference live files, interview first, and hand off explicitly.
|
||||||
|
- The cloud agent loads the matching skill when given a trigger-phrase prompt.
|
||||||
|
|
||||||
## Guardrails
|
## Guardrails
|
||||||
- **Single-source.** The procedure lives in the repo's `docs/`; `SKILL.md` and
|
- **Single-source.** The procedure lives in the repo's `docs/`; `SKILL.md`
|
||||||
`.prompt.md` are stubs that link to it. Never copy a procedure into both.
|
bodies are stubs that link to it. `AGENTS.md` is the single source of style;
|
||||||
- **No auto-chaining.** Parents guide; they don't silently run children.
|
never duplicate its content into `copilot-instructions.md`.
|
||||||
|
- **No auto-chaining.** Parents guide; they don't silently run children. The
|
||||||
|
cloud agent's description matcher routes per turn — name the next skill and
|
||||||
|
let the user (or the agent's own next decision) re-enter.
|
||||||
- **Validator must pass clean first.** Tune severities to the existing tree, or
|
- **Validator must pass clean first.** Tune severities to the existing tree, or
|
||||||
contributors learn to ignore it. Don't invent invariants the repo doesn't hold.
|
contributors learn to ignore it. Don't invent invariants the repo doesn't hold.
|
||||||
|
- **Description matching is the discovery surface.** Lead each `description:`
|
||||||
|
with "Use when the user says ..." trigger phrases. Two skills sharing a
|
||||||
|
trigger collide; sharpen the differentiators.
|
||||||
- This skill produces *another repo's* skills — keep its own SKILL.md generic;
|
- This skill produces *another repo's* skills — keep its own SKILL.md generic;
|
||||||
the worked specifics belong in the target repo's docs and live examples.
|
the worked specifics belong in the target repo's docs and live examples.
|
||||||
|
|||||||
@ -1,52 +1,56 @@
|
|||||||
# Layout, surfaces, and the handoff rule
|
# Layout, surfaces, and the handoff rule
|
||||||
|
|
||||||
How the dual-surface, single-source skill set is arranged in a target repo.
|
How the GitHub-native skill set is arranged in a target repo.
|
||||||
|
|
||||||
## File layout
|
## File layout
|
||||||
|
|
||||||
```
|
```
|
||||||
docs/ canonical procedures (the body — extend, don't duplicate)
|
docs/ canonical procedures (the body — extend, don't duplicate)
|
||||||
AGENTS.md always-on house conventions
|
AGENTS.md always-on house conventions (the single source)
|
||||||
skills/<name>/SKILL.md canonical skill, Claude Code SKILLS structure
|
|
||||||
.github/
|
.github/
|
||||||
copilot-instructions.md always-on conventions, Copilot-wide
|
copilot-instructions.md thin redirect to AGENTS.md + skills menu
|
||||||
prompts/<name>.prompt.md Copilot front door (/name in Copilot Chat)
|
skills/<name>/SKILL.md canonical skill — autodiscovered by GitHub cloud agent
|
||||||
|
instructions/<name>.instructions.md path-scoped auto-apply rules (applyTo glob)
|
||||||
scripts/validate_extension.* the mechanical checkpoint (just validate)
|
scripts/validate_extension.* the mechanical checkpoint (just validate)
|
||||||
```
|
```
|
||||||
|
|
||||||
The real procedure stays in `docs/`. `SKILL.md` and `.prompt.md` are **stubs**:
|
The real procedure stays in `docs/`. Each `SKILL.md` is a **stub**: a trigger
|
||||||
a trigger line, a short decision tree, the checklist, and links into `docs/`
|
description, a short decision tree, the checklist, and links into `docs/` plus
|
||||||
plus the live example files. One canonical body, two front doors.
|
the live example files. One canonical body per topic, no mirrors.
|
||||||
|
|
||||||
## Claude Code SKILLS structure → Copilot mapping
|
## Why this layout
|
||||||
|
|
||||||
| SKILLS convention | Copilot surface |
|
The GitHub Copilot cloud coding agent autodiscovers any `SKILL.md` under
|
||||||
|---|---|
|
`.github/skills/` and decides which to load based on description matching
|
||||||
| `skills/<name>/SKILL.md` (`/name`) | `.github/prompts/<name>.prompt.md` (`/name`) |
|
against the user's prompt. Recognised alternates: `.claude/skills/` and
|
||||||
| project memory / conventions | `.github/copilot-instructions.md` (always on) |
|
`.agents/skills/` (same semantics, different consumer expectations).
|
||||||
| auto-trigger by `description` | `.github/instructions/*.instructions.md` with `applyTo:` globs |
|
|
||||||
| supporting topic files | shared `docs/*.md` referenced by both |
|
|
||||||
|
|
||||||
The canonical skill is authored in the SKILLS structure (frontmatter, "Use
|
`AGENTS.md` is the cross-tool always-on standard (also read by Cursor, Codex,
|
||||||
when" trigger, ≤100-line body); the `.prompt.md` mirror points back to it so the
|
Cline, and Claude Code). `.github/copilot-instructions.md` exists as a
|
||||||
two cannot drift. (If the team also runs Claude Code, symlink or copy
|
Copilot-documented path; in this layout it's a thin redirect to `AGENTS.md`
|
||||||
`skills/<name>` into `.claude/skills/<name>` to make it `/`-invocable there too.)
|
with a discoverability menu of the skills — content lives in one place.
|
||||||
|
|
||||||
|
`.github/instructions/*.instructions.md` is a separate mechanism: each file
|
||||||
|
auto-applies when an editor file matches its `applyTo:` glob. They reference
|
||||||
|
the matching skill by name, so a contributor editing a config file gets the
|
||||||
|
relevant skill surfaced without having to ask.
|
||||||
|
|
||||||
## Two axes of skills
|
## Two axes of skills
|
||||||
|
|
||||||
- **Leaf skills** — one per *artifact* a contributor edits (a config, a module,
|
- **Leaf skills** — one per *artifact* a contributor edits (a config, a module,
|
||||||
a pipeline node, a report section). Standalone-invocable.
|
a pipeline node, a report section). Each is independently triggerable by its
|
||||||
|
own description phrases.
|
||||||
- **Parent skills** — one per *composite* task, sliced by the dimension the
|
- **Parent skills** — one per *composite* task, sliced by the dimension the
|
||||||
contributor actually thinks in (e.g. data modality: single-cell / bulk /
|
contributor actually thinks in (e.g. data modality: single-cell / bulk /
|
||||||
spatial). A parent interviews, then walks the leaves.
|
spatial). A parent interviews, then walks the leaves.
|
||||||
|
|
||||||
## The handoff rule (why no auto-chaining)
|
## The handoff rule (why no auto-chaining)
|
||||||
|
|
||||||
A Copilot `.prompt.md` **cannot programmatically invoke another prompt** — the
|
The cloud agent loads skills **per turn**, not in a chain. A parent skill that
|
||||||
user types `/next-skill` themselves. So parents must use **guided handoff**:
|
silently runs five children produces one wall of output the contributor can't
|
||||||
complete one stage, run the validator, then name the exact next skill and
|
intervene in. So parents use **guided handoff**: complete one stage, run the
|
||||||
**pause**. Author Claude `SKILL.md` parents the same way, for parity and so the
|
validator, then name the exact next skill and **pause**. The agent's next turn
|
||||||
contributor stays in the loop and learns the sequence. Never bury the chain.
|
re-routes via description matching — explicit, observable, debuggable.
|
||||||
|
|
||||||
## Skill anatomy (leaf or parent)
|
## Skill anatomy (leaf or parent)
|
||||||
|
|
||||||
@ -57,3 +61,15 @@ contributor stays in the loop and learns the sequence. Never bury the chain.
|
|||||||
3. **Do the edits** — the minimal set, in the repo's house style.
|
3. **Do the edits** — the minimal set, in the repo's house style.
|
||||||
4. **Validate** — end at `just validate --changed`; interpret its errors.
|
4. **Validate** — end at `just validate --changed`; interpret its errors.
|
||||||
5. **Hand off** — name the next skill (or declare done) and stop.
|
5. **Hand off** — name the next skill (or declare done) and stop.
|
||||||
|
|
||||||
|
## Frontmatter blueprint (matches GitHub's docs)
|
||||||
|
|
||||||
|
| Field | Requirement | Notes |
|
||||||
|
|---|---|---|
|
||||||
|
| `name:` | required | Lowercase, hyphen-separated; matches the directory name |
|
||||||
|
| `description:` | required | What it does AND when to use it (trigger phrases) — drives the cloud agent's matching |
|
||||||
|
| `license:` | optional | If the skill is shareable across repos |
|
||||||
|
| `allowed-tools:` | optional | Pre-approves named tools (`bash`, `shell`) — security risk; use only on read-only skills like `validate-*` |
|
||||||
|
|
||||||
|
Companion files in the same skill directory (R scripts, JSON templates,
|
||||||
|
reference snippets) are autodiscovered alongside the SKILL.md.
|
||||||
|
|||||||
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
Copy-paste starting points. Keep them thin — the procedure lives in `docs/`.
|
Copy-paste starting points. Keep them thin — the procedure lives in `docs/`.
|
||||||
|
|
||||||
## Canonical leaf skill — `skills/<name>/SKILL.md`
|
## Canonical leaf skill — `.github/skills/<name>/SKILL.md`
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
---
|
---
|
||||||
name: <verb-noun>
|
name: <verb-noun>
|
||||||
description: <one line on what it does>. Use when the user says "<trigger>", "/<verb-noun>", or <situation>.
|
description: <one line on what it does>. Use when the user says "<trigger phrase>", "<alternate phrasing>", "<situation cue>", or <situation>.
|
||||||
---
|
---
|
||||||
|
|
||||||
# <verb-noun>
|
# <verb-noun>
|
||||||
@ -26,15 +26,20 @@ Full procedure: **`docs/<relevant-doc>.md`**. Live example to copy:
|
|||||||
|
|
||||||
## Finish
|
## Finish
|
||||||
- Run **`just validate --changed`**; interpret <relevant error codes>.
|
- Run **`just validate --changed`**; interpret <relevant error codes>.
|
||||||
- Hand off: "Next, run `/<next-skill>`." Then stop.
|
- Hand off: "Next, ask for `<next-skill>`." Then stop.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Frontmatter notes: lowercase-hyphenated `name:` must match the directory name.
|
||||||
|
The `description:` is the *only* discovery surface — lead with action-verb
|
||||||
|
trigger phrases ("Use when the user says...") so the cloud agent's matcher
|
||||||
|
fires reliably.
|
||||||
|
|
||||||
## Parent (composite) skill
|
## Parent (composite) skill
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
---
|
---
|
||||||
name: <add-X-thing>
|
name: <add-X-thing>
|
||||||
description: End-to-end guide to <composite task>. Use when ... Orchestrates the leaf skills by guided handoff.
|
description: End-to-end guide to <composite task>. Use when the user says "<trigger>", "<alternate>", or <situation>. Orchestrates the leaf skills by guided handoff.
|
||||||
---
|
---
|
||||||
|
|
||||||
# <add-X-thing> (orchestrator)
|
# <add-X-thing> (orchestrator)
|
||||||
@ -47,37 +52,64 @@ leaf skill, and **pause** — do not auto-run the chain. Canonical example:
|
|||||||
<the few facts to establish before any stage>
|
<the few facts to establish before any stage>
|
||||||
|
|
||||||
## Stage sequence (hand off one at a time)
|
## Stage sequence (hand off one at a time)
|
||||||
1. `/leaf-a`
|
1. `<leaf-a>` — <what it produces>
|
||||||
2. `/leaf-b`
|
2. `<leaf-b>` — <what it produces>
|
||||||
3. ...
|
3. ...
|
||||||
|
|
||||||
## Checkpoints
|
## Checkpoints
|
||||||
Run `just validate --changed` after stages <n>; resolve errors before continuing.
|
Run `just validate --changed` after stages <n>; resolve errors before continuing.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Copilot mirror — `.github/prompts/<name>.prompt.md`
|
## Path-scoped instructions — `.github/instructions/<surface>.instructions.md`
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
---
|
---
|
||||||
mode: agent
|
applyTo: "<directory>/**/*.<ext>"
|
||||||
description: <same one-liner as the SKILL.md>.
|
description: <one-line surface summary>
|
||||||
---
|
---
|
||||||
|
|
||||||
Follow the canonical procedure in [`skills/<name>/SKILL.md`](../../skills/<name>/SKILL.md) — read it now — applying [`copilot-instructions.md`](../copilot-instructions.md).
|
When editing files under `<directory>/`, you're touching <artifact>.
|
||||||
|
|
||||||
<2–4 line compressed recap of the steps + the live example path.>
|
- **Adding <X>?** Use the `<skill-name>` skill ("<trigger phrase>",
|
||||||
|
"<alternate>").
|
||||||
Finish with `just validate --changed`, then <next skill or done>.
|
- <one specific gotcha unique to this surface, naming the validator code
|
||||||
|
that catches it>
|
||||||
|
- <one house-style rule that matters here>
|
||||||
|
- Run `just validate --changed` before committing.
|
||||||
```
|
```
|
||||||
|
|
||||||
Relative paths from `.github/prompts/`: `../../skills/...`, `../../docs/...`,
|
These don't replace `AGENTS.md` (always-on house style) — they surface
|
||||||
`../copilot-instructions.md`.
|
**surface-specific** reminders that name the relevant skill.
|
||||||
|
|
||||||
## Always-on conventions — `AGENTS.md` and `.github/copilot-instructions.md`
|
## Always-on conventions — `AGENTS.md`
|
||||||
|
|
||||||
Same content, two files. Cover: the language style rules (imports, extraction,
|
`AGENTS.md` is the single source of style. Cover: language style rules
|
||||||
iteration), the directory/naming layout, the one-token-everywhere convention
|
(imports, extraction, iteration), directory/naming layout, the one-token-
|
||||||
(prefix = cache group = log tag, or your repo's equivalent), the most common
|
everywhere convention (prefix = cache group = log tag, or your repo's
|
||||||
pipeline mistakes, the "run `just validate --changed` before finishing" rule,
|
equivalent), the most common pipeline mistakes, the "run `just validate
|
||||||
and commit conventions. Keep `copilot-instructions.md` self-contained enough to
|
--changed` before finishing" rule, and commit conventions.
|
||||||
stand alone; have it link to `AGENTS.md` and `docs/` for depth.
|
|
||||||
|
End AGENTS.md with a small table pointing at `.github/skills/` and
|
||||||
|
`.github/instructions/` so any agent reading AGENTS.md learns where the
|
||||||
|
operational skills live.
|
||||||
|
|
||||||
|
## Copilot redirect + skills menu — `.github/copilot-instructions.md`
|
||||||
|
|
||||||
|
This file exists for Copilot-tier surfaces that prefer the documented path.
|
||||||
|
Body: one sentence redirecting to `AGENTS.md`, then a discoverability table:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# GitHub Copilot instructions — <project name>
|
||||||
|
|
||||||
|
House style and conventions: **[`AGENTS.md`](../AGENTS.md)**.
|
||||||
|
|
||||||
|
## Skills (auto-triggered by description matching)
|
||||||
|
|
||||||
|
| Skill | Triggers on prompts like |
|
||||||
|
|---|---|
|
||||||
|
| [`add-X`](skills/add-X/SKILL.md) | "<trigger>", "<alternate>" |
|
||||||
|
| ... | ... |
|
||||||
|
```
|
||||||
|
|
||||||
|
Belt-and-braces: even if description matching misses, the menu surfaces the
|
||||||
|
skill names always-on.
|
||||||
|
|||||||
@ -12,20 +12,20 @@ description: Drive implementation with a strict red-green-refactor loop where ev
|
|||||||
- Behavior is observable from outside the unit (input → output, state
|
- Behavior is observable from outside the unit (input → output, state
|
||||||
change, side effect) — pure refactors are out of scope.
|
change, side effect) — pure refactors are out of scope.
|
||||||
|
|
||||||
## Language references — Python
|
## Vocabulary
|
||||||
Pytest only — `@pytest.fixture`, `parametrize`, scenario as docstring.
|
Before step 1, anchor on `/design-codebase` —
|
||||||
- [tests-py.md](tests-py.md) — paired good/bad examples.
|
module, interface, seam, adapter, depth, leverage, locality.
|
||||||
- [interface-design-py.md](interface-design-py.md) — DI, pure functions, typing, deep modules. *Before step 1.*
|
|
||||||
- [mocking-py.md](mocking-py.md) — boundaries only, façade + DI over patching. *Before `patch` / `monkeypatch`.*
|
|
||||||
- [docstrings-py.md](docstrings-py.md) — Google style, types in annotations not prose.
|
|
||||||
|
|
||||||
## Language references — R
|
## Language references
|
||||||
Testthat ed. 3+, `box::use`, `describe`/`it`.
|
**Python** (pytest only — fixtures, `parametrize`, scenario as docstring):
|
||||||
- [tests-r.md](tests-r.md) — paired good/bad examples.
|
[tests-py.md](tests-py.md), [interface-design-py.md](interface-design-py.md)
|
||||||
- [interface-design-r.md](interface-design-r.md) — DI, pure functions, minimal surface. *Before step 1.*
|
(*before step 1*), [mocking-py.md](mocking-py.md) (*before `patch` /
|
||||||
- [deep-modules-r.md](deep-modules-r.md) — small interface, large impl.
|
`monkeypatch`* — seams only, façade + DI), [docstrings-py.md](docstrings-py.md).
|
||||||
- [mocking-r.md](mocking-r.md) — boundaries only. *Before `mockery::stub` / `local_mocked_bindings`.*
|
**R** (testthat ed. 3+, `box::use`, `describe`/`it`):
|
||||||
- [refactoring-r.md](refactoring-r.md) — what to look for in step 3.
|
[tests-r.md](tests-r.md), [interface-design-r.md](interface-design-r.md)
|
||||||
|
(*before step 1*), [deep-modules-r.md](deep-modules-r.md),
|
||||||
|
[mocking-r.md](mocking-r.md) (*before `mockery::stub`* — seams only),
|
||||||
|
[refactoring-r.md](refactoring-r.md) (*step 3*).
|
||||||
|
|
||||||
## Process
|
## Process
|
||||||
|
|
||||||
@ -44,6 +44,13 @@ Testthat ed. 3+, `box::use`, `describe`/`it`.
|
|||||||
- The scenarios are a **plan**, not a batch of tests to write upfront. See
|
- The scenarios are a **plan**, not a batch of tests to write upfront. See
|
||||||
the horizontal-slicing anti-pattern below.
|
the horizontal-slicing anti-pattern below.
|
||||||
|
|
||||||
|
### 0.5 Agree the seams
|
||||||
|
- Write down the **seams under test** and confirm them with the user
|
||||||
|
before any test exists — no test at an unconfirmed seam. Up-front
|
||||||
|
agreement puts effort on critical paths, not every edge. Inside
|
||||||
|
`/rig`, the blueprint's *Seams touched*
|
||||||
|
pre-answers this — reuse it.
|
||||||
|
|
||||||
### 1. Red — one scenario at a time
|
### 1. Red — one scenario at a time
|
||||||
- Translate **only the first** scenario into the project's native test
|
- Translate **only the first** scenario into the project's native test
|
||||||
framework (pytest, testthat, vitest, go test, …). Leave the rest as
|
framework (pytest, testthat, vitest, go test, …). Leave the rest as
|
||||||
@ -81,18 +88,23 @@ Testthat ed. 3+, `box::use`, `describe`/`it`.
|
|||||||
A green suite is a *claim*, not a proof: it never exercised thread death,
|
A green suite is a *claim*, not a proof: it never exercised thread death,
|
||||||
caller ordering, stale data, or the shape the real producer emits (see
|
caller ordering, stale data, or the shape the real producer emits (see
|
||||||
[anti-patterns.md](anti-patterns.md) *"Fixtures that don't match what the
|
[anti-patterns.md](anti-patterns.md) *"Fixtures that don't match what the
|
||||||
producer emits"*). After the loop is green, **budget a recall-biased
|
producer emits"*). After the loop is green, **budget a review pass** across
|
||||||
review pass** — [`../review-angles/SKILL.md`](../review-angles/SKILL.md) — and
|
four axes: correctness (`/review-angles`),
|
||||||
refute it ([refute.md](../review-angles/refute.md)) before calling it done.
|
blueprint fidelity (`/review-blueprint`),
|
||||||
Fix findings red-test-first, like any other feature.
|
structural quality (`/nuke-review`),
|
||||||
|
mechanical debloat (`/winnow`). Refute
|
||||||
|
each finding (`/review-angles`'s `refute.md`); fix red-test-first.
|
||||||
|
|
||||||
## Guardrails
|
## Guardrails
|
||||||
- **Never** skip red, write >1 failing test at once, or refactor while red.
|
- **Never** skip red, write >1 failing test at once, or refactor while red.
|
||||||
|
- **Never** test at a seam the user hasn't confirmed (step 0.5).
|
||||||
- A scenario untestable at the chosen level gets surfaced, not dropped.
|
- A scenario untestable at the chosen level gets surfaced, not dropped.
|
||||||
|
- Refactor stays **inside** the loop (step 3) — deliberate divergence
|
||||||
|
from upstream tdd; octobot's reviews are a separate post-green pass.
|
||||||
See [anti-patterns.md](anti-patterns.md) — horizontal slicing, passing on
|
See [anti-patterns.md](anti-patterns.md) — horizontal slicing, passing on
|
||||||
first run, refactoring while red, dropping an untestable scenario.
|
first run, tautological tests, refactoring while red, dropped scenarios.
|
||||||
|
|
||||||
## See also
|
## See also
|
||||||
- [../diagnose/SKILL.md](../diagnose/SKILL.md) — chasing an existing bug?
|
- `/diagnose` — chasing an existing bug?
|
||||||
Run `/diagnose` first; phase 5 hands back here for the regression test.
|
Run `/diagnose` first; phase 5 hands back here for the regression test.
|
||||||
- [../grill-with-docs/SKILL.md](../grill-with-docs/SKILL.md) — run before step 0 so scenarios use canonical `CONTEXT.md` vocabulary.
|
- `/model-domain` — run before step 0 so scenarios use canonical `CONTEXT.md` vocabulary.
|
||||||
|
|||||||
@ -24,6 +24,22 @@ test is testing the wrong thing — the behavior was already present, or the
|
|||||||
assertion is a tautology. Fix the test before continuing. Never let a green
|
assertion is a tautology. Fix the test before continuing. Never let a green
|
||||||
bar on a brand-new test go unchallenged.
|
bar on a brand-new test go unchallenged.
|
||||||
|
|
||||||
|
## Tautological tests
|
||||||
|
|
||||||
|
An assertion that recomputes the expected value the way the code does can
|
||||||
|
never disagree with the code — it passes by construction:
|
||||||
|
|
||||||
|
```python
|
||||||
|
assert add(a, b) == a + b # recomputed the same way — tautology
|
||||||
|
assert config == load_config() # snapshot derived by the code itself
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected values come from an **independent source of truth**: a
|
||||||
|
known-good literal, a worked example done by hand, the blueprint's stated
|
||||||
|
semantics (`OKF/blueprints/NNN`). If you can't produce the expectation without
|
||||||
|
running the code under test, you don't have a test yet. (Adapted from
|
||||||
|
mattpocock/skills tdd.)
|
||||||
|
|
||||||
## Refactoring while red
|
## Refactoring while red
|
||||||
|
|
||||||
If the suite is red, fix the test or fix the code — do not "tidy while
|
If the suite is red, fix the test or fix the code — do not "tidy while
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
# Deep modules in R
|
# Deep modules in R
|
||||||
|
|
||||||
Adapted from John Ousterhout, *A Philosophy of Software Design*. A **deep
|
Vocabulary and principles in `/design-codebase`.
|
||||||
module** has a small interface and a large implementation. A **shallow
|
This file shows what deep / shallow look like with `box::use` — the R lever
|
||||||
module** has a large interface and almost no implementation — every helper
|
for controlling the interface.
|
||||||
becomes part of the public contract, which makes the code hard to reason
|
|
||||||
about *and* hard to test.
|
|
||||||
|
|
||||||
In R you control the interface with `box::use` (or NAMESPACE/`@export` in a
|
In R you control the interface with `box::use` (or NAMESPACE/`@export` in a
|
||||||
package). The interface is whatever a caller writes after `box::use(...)`.
|
package). The interface is whatever a caller writes after `box::use(...)`.
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
# Interface design for testability (Python)
|
# Interface design for testability (Python)
|
||||||
|
|
||||||
Rules to apply before writing the test, not after. A deep module (small
|
Vocabulary lives in `/design-codebase` —
|
||||||
interface, large implementation — Ousterhout) is the goal; a testable
|
module, interface, seam, adapter, depth. This file is the Python-flavored leaf.
|
||||||
interface is the side effect.
|
|
||||||
|
Rules to apply before writing the test, not after. A deep module is the goal;
|
||||||
|
a testable interface is the side effect.
|
||||||
|
|
||||||
## 1. Dependency injection — pass collaborators, don't construct them
|
## 1. Dependency injection — pass collaborators, don't construct them
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,13 @@
|
|||||||
# Interface design for testability (R)
|
# Interface design for testability (R)
|
||||||
|
|
||||||
|
Vocabulary lives in `/design-codebase` —
|
||||||
|
module, interface, seam, adapter. This file is the R-flavored leaf.
|
||||||
|
|
||||||
Three rules. Apply them before writing the test, not after.
|
Three rules. Apply them before writing the test, not after.
|
||||||
|
|
||||||
> Snippets below show only the function bodies; the `box::use(...)`
|
> Snippets below show only the function bodies; the `box::use(...)`
|
||||||
> prologue is omitted for clarity. Real files start with one — see
|
> prologue is omitted for clarity. Real files start with one — see
|
||||||
> [`../r-style/box.md`](../r-style/box.md).
|
> `/style-r`.
|
||||||
|
|
||||||
## 1. Dependency injection — pass clients, don't construct them
|
## 1. Dependency injection — pass clients, don't construct them
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
# Mocking in Python
|
# Mocking in Python
|
||||||
|
|
||||||
**Mock at system boundaries. Never mock your own internals. Don't patch
|
**Mock at system seams. Never mock your own internals. Don't patch
|
||||||
what you don't own — wrap it.**
|
what you don't own — wrap it.**
|
||||||
|
|
||||||
## Boundaries you may mock
|
## Seams you may mock
|
||||||
|
|
||||||
- HTTP / REST APIs — but through a façade you own (below), or replay
|
- HTTP / REST APIs — but through a façade you own (below), or replay
|
||||||
fixtures with `respx` / `responses`.
|
fixtures with `respx` / `responses`.
|
||||||
- Databases — prefer a real in-memory DB (`sqlite3 :memory:`) or a fake
|
- Databases — prefer a real in-memory DB (`sqlite3 :memory:`) or a fake
|
||||||
repository over patching cursors.
|
repository over patching cursors.
|
||||||
- Time — inject `now: Callable[[], datetime]`, or `monkeypatch` a clock
|
- Time — inject `now: Callable[[], datetime]`, or `monkeypatch` a clock
|
||||||
boundary; never patch `datetime.datetime` globally.
|
seam; never patch `datetime.datetime` globally.
|
||||||
- Randomness — pass an `rng: np.random.Generator` parameter; seed it in
|
- Randomness — pass an `rng: np.random.Generator` parameter; seed it in
|
||||||
the test.
|
the test.
|
||||||
- File system — `tmp_path`. Real temp files are cheaper than mocks.
|
- File system — `tmp_path`. Real temp files are cheaper than mocks.
|
||||||
@ -43,7 +43,7 @@ class EntrezClient:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# in tests — spec'd mock of the façade, or a fake
|
# in tests — blueprint'd mock of the façade, or a fake
|
||||||
client = Mock(spec_set=EntrezClient)
|
client = Mock(spec_set=EntrezClient)
|
||||||
client.fetch_summary.return_value = {"name": "TP53"}
|
client.fetch_summary.return_value = {"name": "TP53"}
|
||||||
assert annotate(["7157"], entrez=client)[0].name == "TP53"
|
assert annotate(["7157"], entrez=client)[0].name == "TP53"
|
||||||
@ -59,7 +59,7 @@ with patch("httpx.Client.get") as m:
|
|||||||
## Dependency injection over patching
|
## Dependency injection over patching
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# Easy to test — boundary passed in
|
# Easy to test — seam passed in
|
||||||
def annotate(gene_ids: list[str], entrez: EntrezClient) -> list[Annotation]: ...
|
def annotate(gene_ids: list[str], entrez: EntrezClient) -> list[Annotation]: ...
|
||||||
|
|
||||||
# Hard to test — constructs its client internally; forces patching
|
# Hard to test — constructs its client internally; forces patching
|
||||||
@ -98,7 +98,7 @@ asserted by *state* survives refactors that call-count assertions break.
|
|||||||
- **Hand-rolled `module.attr = fake`** without teardown — leaks into
|
- **Hand-rolled `module.attr = fake`** without teardown — leaks into
|
||||||
later tests; use `monkeypatch`, which undoes itself.
|
later tests; use `monkeypatch`, which undoes itself.
|
||||||
- **Mocking `pandas.read_sql` / cursors** — wrap data access in an owned
|
- **Mocking `pandas.read_sql` / cursors** — wrap data access in an owned
|
||||||
repository class; fake or spec-mock the wrapper.
|
repository class; fake or blueprint-mock the wrapper.
|
||||||
|
|
||||||
## The single-sentence test
|
## The single-sentence test
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
# Mocking in R
|
# Mocking in R
|
||||||
|
|
||||||
**Mock at system boundaries. Never mock your own code.**
|
**Mock at system seams. Never mock your own code.**
|
||||||
|
|
||||||
> Snippets below show only the function bodies; the `box::use(...)`
|
> Snippets below show only the function bodies; the `box::use(...)`
|
||||||
> prologue is omitted for clarity. Real files start with one — see
|
> prologue is omitted for clarity. Real files start with one — see
|
||||||
> [`../r-style/box.md`](../r-style/box.md).
|
> `/style-r`.
|
||||||
|
|
||||||
## Boundaries you may mock
|
## Seams you may mock
|
||||||
|
|
||||||
- HTTP / REST APIs — `httptest2`, `webmockr`, or `httr2::with_mocked_responses()`.
|
- HTTP / REST APIs — `httptest2`, `webmockr`, or `httr2::with_mocked_responses()`.
|
||||||
- Databases — prefer a real test DB (`RSQLite::SQLite()` in-memory) over a
|
- Databases — prefer a real test DB (`RSQLite::SQLite()` in-memory) over a
|
||||||
@ -27,7 +27,7 @@
|
|||||||
If a test feels like it needs to stub an internal helper, that is a signal
|
If a test feels like it needs to stub an internal helper, that is a signal
|
||||||
your function under test is doing two things. Split it.
|
your function under test is doing two things. Split it.
|
||||||
|
|
||||||
## Design for mockability at the boundary
|
## Design for mockability at the seam
|
||||||
|
|
||||||
### Dependency injection over hardcoded constructors
|
### Dependency injection over hardcoded constructors
|
||||||
|
|
||||||
@ -78,10 +78,10 @@ expectations bleeding into another.
|
|||||||
|
|
||||||
- `testthat::local_mocked_bindings(fn = function(...) ...)` — replaces a
|
- `testthat::local_mocked_bindings(fn = function(...) ...)` — replaces a
|
||||||
binding inside the package under test for the scope of one `test_that`.
|
binding inside the package under test for the scope of one `test_that`.
|
||||||
Use only at the *boundary*: stub `httr2::req_perform`, not your own
|
Use only at the *seam*: stub `httr2::req_perform`, not your own
|
||||||
`parse_response`.
|
`parse_response`.
|
||||||
- `mockery::stub(target, "boundary_fn", value)` — same idea, finer-grained.
|
- `mockery::stub(target, "seam_fn", value)` — same idea, finer-grained.
|
||||||
Same rule: only stub at the boundary.
|
Same rule: only stub at the seam.
|
||||||
- `httptest2::with_mock_dir("fixtures/")` — replay recorded HTTP fixtures.
|
- `httptest2::with_mock_dir("fixtures/")` — replay recorded HTTP fixtures.
|
||||||
Best option for integration-style tests against an HTTP service.
|
Best option for integration-style tests against an HTTP service.
|
||||||
|
|
||||||
|
|||||||
@ -44,8 +44,11 @@ parse_response <- function(raw) { ... }
|
|||||||
|
|
||||||
Two modules that always travel together, each exporting one thin function?
|
Two modules that always travel together, each exporting one thin function?
|
||||||
Merge them. A module that exports eight helpers users always call in the
|
Merge them. A module that exports eight helpers users always call in the
|
||||||
same order? Deepen — collapse them behind one entry point. (See
|
same order? Deepen — collapse them behind one entry point. See
|
||||||
`deep-modules-r.md`.)
|
[`deep-modules-r.md`](deep-modules-r.md) for the R shape, and
|
||||||
|
`/design-codebase` for the
|
||||||
|
dependency-aware strategy (replace, don't layer — old tests on the shallow
|
||||||
|
modules become waste once the deepened interface has its own tests).
|
||||||
|
|
||||||
## Feature envy → move logic to where the data lives
|
## Feature envy → move logic to where the data lives
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ inside pytest, fixtures become Given steps), never behave.
|
|||||||
## Test-file conventions
|
## Test-file conventions
|
||||||
|
|
||||||
- Files: `tests/test_<module>.py`; functions: `test_<behavior>` — the name
|
- Files: `tests/test_<module>.py`; functions: `test_<behavior>` — the name
|
||||||
reads like a spec line, not mechanics.
|
reads like a blueprint line, not mechanics.
|
||||||
- Layout: tests outside `src/` (the `/build-py-project` scaffold already
|
- Layout: tests outside `src/` (the `/build-py-project` scaffold already
|
||||||
does this); pytest docs strongly suggest src layout + `importlib` mode.
|
does this); pytest docs strongly suggest src layout + `importlib` mode.
|
||||||
- Every test carries its scenario as the docstring:
|
- Every test carries its scenario as the docstring:
|
||||||
|
|||||||
@ -66,7 +66,7 @@ below are concrete instances of these rules in R.
|
|||||||
- **One logical assertion per `it`.** Multiple `expect_*()` calls are fine
|
- **One logical assertion per `it`.** Multiple `expect_*()` calls are fine
|
||||||
if they describe one outcome (e.g. a returned data.frame's class *and*
|
if they describe one outcome (e.g. a returned data.frame's class *and*
|
||||||
its columns); two unrelated outcomes belong in two `it` blocks.
|
its columns); two unrelated outcomes belong in two `it` blocks.
|
||||||
- **The test name reads like a spec line.** A reader who sees only the
|
- **The test name reads like a blueprint line.** A reader who sees only the
|
||||||
`describe` + `it` titles understands the contract.
|
`describe` + `it` titles understands the contract.
|
||||||
|
|
||||||
### Bad tests (anti-patterns)
|
### Bad tests (anti-patterns)
|
||||||
|
|||||||
100
skills/engineering/design-codebase/SKILL.md
Normal file
100
skills/engineering/design-codebase/SKILL.md
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
---
|
||||||
|
name: design-codebase
|
||||||
|
description: Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
|
||||||
|
---
|
||||||
|
|
||||||
|
# design-codebase
|
||||||
|
|
||||||
|
Design **deep modules**: a lot of behaviour behind a small interface, placed
|
||||||
|
at a clean seam, testable through that interface. The aim is leverage for
|
||||||
|
callers, locality for maintainers, and testability for everyone.
|
||||||
|
|
||||||
|
## Glossary
|
||||||
|
|
||||||
|
Use these exactly; don't substitute "component", "service", "API", "boundary".
|
||||||
|
|
||||||
|
**Module** — anything with an interface and an implementation. Scale-agnostic:
|
||||||
|
function, class, package, tier-spanning slice. _Avoid_: unit, component, service.
|
||||||
|
|
||||||
|
**Interface** — everything a caller must know to use the module correctly:
|
||||||
|
type signature, invariants, ordering, error modes, configuration, performance.
|
||||||
|
_Avoid_: API, signature (type-level only).
|
||||||
|
|
||||||
|
**Implementation** — what's inside a module. Distinct from **Adapter**: a small
|
||||||
|
adapter can wrap a large implementation (a Postgres repo), or vice versa.
|
||||||
|
|
||||||
|
**Depth** — leverage at the interface: behaviour a caller exercises per unit
|
||||||
|
of interface learned. **Deep** = much behaviour behind a small interface;
|
||||||
|
**shallow** = interface nearly as complex as impl.
|
||||||
|
|
||||||
|
**Seam** _(Michael Feathers)_ — a place where you can alter behaviour without
|
||||||
|
editing in that place; the *location* at which a module's interface lives.
|
||||||
|
_Avoid_: boundary (overloaded with DDD's bounded context).
|
||||||
|
|
||||||
|
**Adapter** — a concrete thing that satisfies an interface at a seam. *Role*,
|
||||||
|
not substance.
|
||||||
|
|
||||||
|
**Leverage** — what callers get from depth: more capability per unit of
|
||||||
|
interface learned. One impl pays back across N call sites, M tests.
|
||||||
|
|
||||||
|
**Locality** — what maintainers get from depth: change, bugs, knowledge,
|
||||||
|
verification concentrate in one place. Fix once, fixed everywhere.
|
||||||
|
|
||||||
|
## Deep vs shallow
|
||||||
|
|
||||||
|
A **deep** module = small interface (few methods, simple params) over large
|
||||||
|
implementation (complex logic hidden). **Shallow** = the inverse, mostly
|
||||||
|
pass-through. Avoid shallow: reduce methods, simplify params, hide more inside.
|
||||||
|
|
||||||
|
## Principles
|
||||||
|
|
||||||
|
- **Depth is a property of the interface, not the implementation.** A deep
|
||||||
|
module can be composed of small mockable parts internally; **internal
|
||||||
|
seams** (private, used by its own tests) coexist with the **external seam**.
|
||||||
|
- **The deletion test.** Imagine deleting the module. If complexity vanishes,
|
||||||
|
it was a pass-through. If complexity reappears across N callers, it was
|
||||||
|
earning its keep.
|
||||||
|
- **The interface is the test surface.** Callers and tests cross the same
|
||||||
|
seam. To test *past* the interface is to find the module is the wrong shape.
|
||||||
|
- **One adapter = hypothetical seam; two = real one.** Don't introduce a seam
|
||||||
|
unless something actually varies across it.
|
||||||
|
|
||||||
|
## Designing for testability
|
||||||
|
|
||||||
|
**Accept dependencies, don't create them.**
|
||||||
|
|
||||||
|
```r
|
||||||
|
# R: pass the client; default keeps callers ergonomic
|
||||||
|
fetch_orders <- function(order_id, client = modb_client()) client$get(order_id)
|
||||||
|
```
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Python: optional parameter, same shape
|
||||||
|
def fetch_orders(order_id: str, client: ModbClient | None = None) -> Order:
|
||||||
|
return (client or ModbClient()).get(order_id)
|
||||||
|
```
|
||||||
|
|
||||||
|
Constructing the client inside buries the dependency past the interface.
|
||||||
|
|
||||||
|
**Return results, don't produce side effects.**
|
||||||
|
|
||||||
|
```r
|
||||||
|
# R: return the new value
|
||||||
|
calculate_discount <- function(cart) cart$total - discount(cart)
|
||||||
|
```
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Python: return the new value
|
||||||
|
def calculate_discount(cart: Cart) -> Decimal:
|
||||||
|
return cart.total - discount(cart)
|
||||||
|
```
|
||||||
|
|
||||||
|
Mutating in place hides the effect and couples every test to caller state.
|
||||||
|
|
||||||
|
## Rejected framings
|
||||||
|
|
||||||
|
- **Depth as impl-lines ÷ interface-lines** (Ousterhout): rewards padding. Use depth-as-leverage instead.
|
||||||
|
- **"Interface" = the TypeScript `interface` keyword or a class's public methods**: too narrow — interface here is every fact a caller must know.
|
||||||
|
- **"Boundary"**: overloaded with DDD's bounded context. Say **seam** or **interface**.
|
||||||
|
|
||||||
|
[deepening.md](deepening.md) — dependency categories, seam discipline, replace-don't-layer testing. [design-it-twice.md](design-it-twice.md) — parallel sub-agents to design the interface several radically different ways; compare on depth, locality, seam placement.
|
||||||
61
skills/engineering/design-codebase/deepening.md
Normal file
61
skills/engineering/design-codebase/deepening.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Deepening
|
||||||
|
|
||||||
|
How to deepen a cluster of shallow modules safely, given its dependencies.
|
||||||
|
Assumes the vocabulary in [SKILL.md](SKILL.md) — **module**, **interface**,
|
||||||
|
**seam**, **adapter**.
|
||||||
|
|
||||||
|
## Dependency categories
|
||||||
|
|
||||||
|
When assessing a candidate for deepening, classify its dependencies. The
|
||||||
|
category determines how the deepened module is tested across its seam.
|
||||||
|
|
||||||
|
### 1. In-process
|
||||||
|
|
||||||
|
Pure computation, in-memory state, no I/O. Always deepenable — merge the
|
||||||
|
modules and test through the new interface directly. No adapter needed.
|
||||||
|
|
||||||
|
### 2. Local-substitutable
|
||||||
|
|
||||||
|
Dependencies that have local test stand-ins (PGLite for Postgres, in-memory
|
||||||
|
filesystem, `RSQLite::SQLite()` for Postgres). Deepenable if the stand-in
|
||||||
|
exists. The deepened module is tested with the stand-in running in the test
|
||||||
|
suite. The seam is internal; no port at the module's external interface.
|
||||||
|
|
||||||
|
### 3. Remote but owned (Ports & Adapters)
|
||||||
|
|
||||||
|
Your own services across a network boundary (microservices, internal APIs).
|
||||||
|
Define a **port** (interface) at the seam. The deep module owns the logic;
|
||||||
|
the transport is injected as an **adapter**. Tests use an in-memory adapter.
|
||||||
|
Production uses an HTTP/gRPC/queue adapter.
|
||||||
|
|
||||||
|
Recommendation shape: *"Define a port at the seam, implement an HTTP adapter
|
||||||
|
for production and an in-memory adapter for testing, so the logic sits in
|
||||||
|
one deep module even though it's deployed across a network."*
|
||||||
|
|
||||||
|
### 4. True external (Mock)
|
||||||
|
|
||||||
|
Third-party services (Stripe, NCBI, UniProt) you don't control. The deepened
|
||||||
|
module takes the external dependency as an injected port; tests provide a
|
||||||
|
mock adapter.
|
||||||
|
|
||||||
|
## Seam discipline
|
||||||
|
|
||||||
|
- **One adapter means a hypothetical seam. Two adapters means a real one.**
|
||||||
|
Don't introduce a port unless at least two adapters are justified
|
||||||
|
(typically production + test). A single-adapter seam is just indirection.
|
||||||
|
- **Internal seams vs external seams.** A deep module can have internal seams
|
||||||
|
(private to its implementation, used by its own tests) as well as the
|
||||||
|
external seam at its interface. Don't expose internal seams through the
|
||||||
|
interface just because tests use them.
|
||||||
|
|
||||||
|
## Testing strategy: replace, don't layer
|
||||||
|
|
||||||
|
- Old unit tests on shallow modules become waste once tests at the deepened
|
||||||
|
module's interface exist — delete them.
|
||||||
|
- Write new tests at the deepened module's interface. The **interface is the
|
||||||
|
test surface**.
|
||||||
|
- Tests assert on observable outcomes through the interface, not internal
|
||||||
|
state.
|
||||||
|
- Tests should survive internal refactors — they describe behaviour, not
|
||||||
|
implementation. If a test has to change when the implementation changes,
|
||||||
|
it's testing past the interface.
|
||||||
66
skills/engineering/design-codebase/design-it-twice.md
Normal file
66
skills/engineering/design-codebase/design-it-twice.md
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# Design It Twice
|
||||||
|
|
||||||
|
When the user wants to explore alternative interfaces for a chosen deepening
|
||||||
|
candidate, use this parallel sub-agent pattern. Based on "Design It Twice"
|
||||||
|
(Ousterhout) — your first idea is unlikely to be the best.
|
||||||
|
|
||||||
|
Uses the vocabulary in [SKILL.md](SKILL.md) — **module**, **interface**,
|
||||||
|
**seam**, **adapter**, **leverage**.
|
||||||
|
|
||||||
|
## Process
|
||||||
|
|
||||||
|
### 1. Frame the problem space
|
||||||
|
|
||||||
|
Before spawning sub-agents, write a user-facing explanation of the problem
|
||||||
|
space for the chosen candidate:
|
||||||
|
|
||||||
|
- The constraints any new interface would need to satisfy.
|
||||||
|
- The dependencies it would rely on, and which category they fall into
|
||||||
|
(see [deepening.md](deepening.md)).
|
||||||
|
- A rough illustrative code sketch to ground the constraints — not a
|
||||||
|
proposal, just a way to make the constraints concrete.
|
||||||
|
|
||||||
|
Show this to the user, then immediately proceed to Step 2. The user reads and
|
||||||
|
thinks while the sub-agents work in parallel.
|
||||||
|
|
||||||
|
### 2. Spawn sub-agents
|
||||||
|
|
||||||
|
Spawn 3+ sub-agents in parallel using the Agent tool — **one message with
|
||||||
|
multiple Agent tool uses** so they run concurrently. Each must produce a
|
||||||
|
**radically different** interface for the deepened module. Use
|
||||||
|
`subagent_type: claude` (general-purpose) so each has full read + search.
|
||||||
|
|
||||||
|
Prompt each sub-agent with a separate technical brief (file paths, coupling
|
||||||
|
details, dependency category from [deepening.md](deepening.md), what sits
|
||||||
|
behind the seam). The brief is independent of the user-facing problem-space
|
||||||
|
explanation in Step 1. Give each agent a different design constraint:
|
||||||
|
|
||||||
|
- Agent 1: "Minimize the interface — aim for 1–3 entry points max. Maximise
|
||||||
|
leverage per entry point."
|
||||||
|
- Agent 2: "Maximise flexibility — support many use cases and extension."
|
||||||
|
- Agent 3: "Optimise for the most common caller — make the default case
|
||||||
|
trivial."
|
||||||
|
- Agent 4 (if applicable): "Design around ports & adapters for cross-seam
|
||||||
|
dependencies."
|
||||||
|
|
||||||
|
Include both [SKILL.md](SKILL.md) vocabulary and `CONTEXT.md` vocabulary in
|
||||||
|
the brief so each sub-agent names things consistently with the architecture
|
||||||
|
language and the project's domain language.
|
||||||
|
|
||||||
|
Each sub-agent outputs:
|
||||||
|
|
||||||
|
1. Interface (types, methods, params — plus invariants, ordering, error modes).
|
||||||
|
2. Usage example showing how callers use it.
|
||||||
|
3. What the implementation hides behind the seam.
|
||||||
|
4. Dependency strategy and adapters (see [deepening.md](deepening.md)).
|
||||||
|
5. Trade-offs — where leverage is high, where it's thin.
|
||||||
|
|
||||||
|
### 3. Present and compare
|
||||||
|
|
||||||
|
Present designs sequentially so the user can absorb each one, then compare
|
||||||
|
them in prose. Contrast by **depth** (leverage at the interface),
|
||||||
|
**locality** (where change concentrates), and **seam placement**.
|
||||||
|
|
||||||
|
After comparing, give your own recommendation: which design you think is
|
||||||
|
strongest and why. If elements from different designs would combine well,
|
||||||
|
propose a hybrid. Be opinionated — the user wants a strong read, not a menu.
|
||||||
@ -1,55 +0,0 @@
|
|||||||
---
|
|
||||||
name: dev-r
|
|
||||||
description: Orchestrate the full R development workflow. Auto-detects project type — `DESCRIPTION` present → R package; `_targets.R` present → R analysis — and runs the appropriate loop (implement → lint → style → test → commit). Applies /r-style throughout. Use ONLY when the user explicitly asks for the workflow ("run the R workflow", "full R dev loop", "/dev-r"). Do NOT auto-invoke for individual R tasks — those use `/bdd`, `/diagnose`, `/r-style`, or `/jj-atomic` directly.
|
|
||||||
---
|
|
||||||
|
|
||||||
# dev-r
|
|
||||||
|
|
||||||
Workflow for R repos. Detects project type from filesystem markers:
|
|
||||||
|
|
||||||
| Marker | Type | Loop file |
|
|
||||||
|---|---|---|
|
|
||||||
| `DESCRIPTION` only | R package | [`package-loop.md`](package-loop.md) |
|
|
||||||
| `_targets.R` only | R analysis | [`analysis-loop.md`](analysis-loop.md) |
|
|
||||||
| both | ambiguous | ask the user |
|
|
||||||
| neither | refuse | suggest [`/build-r-package`](../../scaffold/build-r-package/SKILL.md) or [`/build-r-analysis`](../../scaffold/build-r-analysis/SKILL.md) |
|
|
||||||
|
|
||||||
Apply [`/r-style`](../r-style/SKILL.md) at every implementation step.
|
|
||||||
|
|
||||||
## When NOT to use
|
|
||||||
- Single-task work: bug fix → `/diagnose` + `/bdd` directly.
|
|
||||||
- Writing tests → `/bdd` only.
|
|
||||||
- Reviewing R style of one file → `/r-style` only.
|
|
||||||
- Committing → `/jj-atomic` only.
|
|
||||||
|
|
||||||
## Phase 0 — Frame (both loops)
|
|
||||||
|
|
||||||
Karpathy guardrails — state assumptions explicitly, name the simpler
|
|
||||||
approach you're rejecting, surface tradeoffs. Push back when warranted; if
|
|
||||||
something is unclear, stop and ask. See
|
|
||||||
[`../../../CLAUDE.md`](../../../CLAUDE.md) for the full version.
|
|
||||||
|
|
||||||
If the task is ambiguous, hand off to
|
|
||||||
[`/grill-me`](../../productivity/grill-me/SKILL.md) (no codebase needed)
|
|
||||||
or [`/grill-with-docs`](../grill-with-docs/SKILL.md) (anchors to
|
|
||||||
`CONTEXT.md`) before entering the loop.
|
|
||||||
|
|
||||||
## Then enter the appropriate loop
|
|
||||||
|
|
||||||
- `DESCRIPTION` detected → [`package-loop.md`](package-loop.md)
|
|
||||||
(document → lint → style → test → check → commit)
|
|
||||||
- `_targets.R` detected → [`analysis-loop.md`](analysis-loop.md)
|
|
||||||
(lint → style → test → run pipeline → render → commit)
|
|
||||||
|
|
||||||
## See also
|
|
||||||
- [`../bdd/SKILL.md`](../bdd/SKILL.md) and its R siblings
|
|
||||||
(`tests-r.md`, `interface-design-r.md`, `mocking-r.md`,
|
|
||||||
`deep-modules-r.md`, `refactoring-r.md`, `anti-patterns.md`).
|
|
||||||
- [`../diagnose/SKILL.md`](../diagnose/SKILL.md) — six-phase bug hunt
|
|
||||||
with R-flavored siblings.
|
|
||||||
- [`../r-style/SKILL.md`](../r-style/SKILL.md) — coding standards.
|
|
||||||
- [`../../productivity/jj-atomic/SKILL.md`](../../productivity/jj-atomic/SKILL.md).
|
|
||||||
- [`../../scaffold/build-r-package/SKILL.md`](../../scaffold/build-r-package/SKILL.md)
|
|
||||||
and
|
|
||||||
[`../../scaffold/build-r-analysis/SKILL.md`](../../scaffold/build-r-analysis/SKILL.md)
|
|
||||||
— set up the projects this workflow assumes.
|
|
||||||
@ -1,21 +1,22 @@
|
|||||||
---
|
---
|
||||||
name: dev-python
|
name: develop-python
|
||||||
description: Orchestrate the full Python development workflow in a uv + Docker + justfile project — implement, lint, typecheck, test (TDD-BDD), commit. Use ONLY when the user explicitly asks for the workflow ("run the python workflow", "full dev loop", "/dev-python"). Do NOT auto-invoke for individual tasks like fixing a bug, adding a function, or writing tests — those use the relevant focused skill (`/bdd`, `/diagnose`, `/jj-atomic`) directly.
|
description: "Orchestrate the full Python dev loop: implement, lint, typecheck, test (bdd), commit."
|
||||||
|
disable-model-invocation: true
|
||||||
---
|
---
|
||||||
|
|
||||||
# dev-python
|
# develop-python
|
||||||
|
|
||||||
Workflow for `build-py-project`-shaped repos (uv + Docker + justfile).
|
Workflow for `build-py-project`-shaped repos (uv + Docker + justfile).
|
||||||
Each phase must pass before the next. Do not advance silently.
|
Each phase must pass before the next. Do not advance silently.
|
||||||
|
|
||||||
## When to use
|
## When to use
|
||||||
- User says "run the python workflow", "full dev loop", "/dev-python".
|
- User says "run the python workflow", "full dev loop", "/develop-python".
|
||||||
- A fresh feature or fix needs the complete loop, not a single skill.
|
- A fresh feature or fix needs the complete loop, not a single skill.
|
||||||
|
|
||||||
## When NOT to use
|
## When NOT to use
|
||||||
- Single-task work: a bug fix → `/diagnose` + `/bdd` directly.
|
- Single-task work: a bug fix → `/diagnose` + `/bdd` directly.
|
||||||
- Writing tests for an already-implemented behaviour → `/bdd` only.
|
- Writing tests for an already-implemented behaviour → `/bdd` only.
|
||||||
- Committing a single change → `/jj-atomic` only.
|
- Committing a single change → `/commit-atomic-jj` only.
|
||||||
|
|
||||||
## Phases
|
## Phases
|
||||||
|
|
||||||
@ -25,8 +26,8 @@ approach you're rejecting, surface tradeoffs. Push back when warranted; if
|
|||||||
something is unclear, stop and ask. See
|
something is unclear, stop and ask. See
|
||||||
[`../../../CLAUDE.md`](../../../CLAUDE.md) for the full version. If the
|
[`../../../CLAUDE.md`](../../../CLAUDE.md) for the full version. If the
|
||||||
task is ambiguous, hand off to
|
task is ambiguous, hand off to
|
||||||
[`/grill-me`](../../productivity/grill-me/SKILL.md) or
|
`/grill-me` or
|
||||||
[`/grill-with-docs`](../grill-with-docs/SKILL.md) first.
|
`/grill-with-docs` first.
|
||||||
|
|
||||||
### 1. Implement
|
### 1. Implement
|
||||||
- Write code under `src/<package>/`.
|
- Write code under `src/<package>/`.
|
||||||
@ -50,7 +51,7 @@ Fix type errors. Don't suppress with `# type: ignore` unless genuinely
|
|||||||
unavoidable — explain inline why.
|
unavoidable — explain inline why.
|
||||||
|
|
||||||
### 4. Test (TDD-BDD)
|
### 4. Test (TDD-BDD)
|
||||||
Hand to [`/bdd`](../bdd/SKILL.md), which loops red→green→refactor
|
Hand to `/bdd`, which loops red→green→refactor
|
||||||
**one scenario at a time** — never write all the tests upfront (that's the
|
**one scenario at a time** — never write all the tests upfront (that's the
|
||||||
horizontal-slicing anti-pattern called out in bdd itself). When every
|
horizontal-slicing anti-pattern called out in bdd itself). When every
|
||||||
scenario from step 0 is green:
|
scenario from step 0 is green:
|
||||||
@ -61,7 +62,7 @@ The full suite must be green before commit. New edge case found mid-loop
|
|||||||
→ add as the next scenario, don't skip.
|
→ add as the next scenario, don't skip.
|
||||||
|
|
||||||
### 5. Commit
|
### 5. Commit
|
||||||
Hand to [`/jj-atomic`](../../productivity/jj-atomic/SKILL.md). The fix
|
Hand to `/commit-atomic-jj`. The fix
|
||||||
+ the regression test land in the **same** atomic change.
|
+ the regression test land in the **same** atomic change.
|
||||||
|
|
||||||
## Reference: justfile commands
|
## Reference: justfile commands
|
||||||
@ -79,13 +80,13 @@ Hand to [`/jj-atomic`](../../productivity/jj-atomic/SKILL.md). The fix
|
|||||||
| `just fix-and-check` | lint-fix + fmt + typecheck + test |
|
| `just fix-and-check` | lint-fix + fmt + typecheck + test |
|
||||||
|
|
||||||
## See also
|
## See also
|
||||||
- [`../bdd/SKILL.md`](../bdd/SKILL.md) — Given/When/Then loop;
|
- `/bdd` — Given/When/Then loop;
|
||||||
Python siblings `tests-py.md`, `mocking-py.md`, `interface-design-py.md`,
|
Python siblings `tests-py.md`, `mocking-py.md`, `interface-design-py.md`,
|
||||||
`docstrings-py.md`.
|
`docstrings-py.md`.
|
||||||
- [`../diagnose/SKILL.md`](../diagnose/SKILL.md) — six-phase bug hunt.
|
- `/diagnose` — six-phase bug hunt.
|
||||||
- [`../../productivity/jj-atomic/SKILL.md`](../../productivity/jj-atomic/SKILL.md)
|
- `/commit-atomic-jj`
|
||||||
— commit discipline.
|
— commit discipline.
|
||||||
- [`../../scaffold/build-py-project/SKILL.md`](../../scaffold/build-py-project/SKILL.md)
|
- `/build-py-project`
|
||||||
— sets up the project this workflow assumes.
|
— sets up the project this workflow assumes.
|
||||||
- [`write-readme-py`](../write-readme-py/SKILL.md) — README from
|
- `/write-readme-py` — README from
|
||||||
`pyproject.toml` + `justfile`.
|
`pyproject.toml` + `justfile`.
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user