refactor(skills): retarget canonical knowledge paths into OKF/
- refactor(domain-modeling): CONTEXT.md, adr/ and multi-context layout move under OKF/ - refactor(domain-modeling): bounded-context-only split rule; per-issue glossaries forbidden - refactor(grill-with-docs): glossary and ADR updates target OKF/ paths
This commit is contained in:
parent
7ec15a4e9d
commit
246a81d0dc
@ -1,7 +1,7 @@
|
||||
# ADR format
|
||||
|
||||
ADRs live in `docs/adr/` with sequential numbering: `0001-<slug>.md`,
|
||||
`0002-<slug>.md`, etc. Create `docs/adr/` lazily — only when the first
|
||||
ADRs live in `OKF/adr/` with sequential numbering: `0001-<slug>.md`,
|
||||
`0002-<slug>.md`, etc. Create `OKF/adr/` lazily — only when the first
|
||||
ADR is needed.
|
||||
|
||||
## Template
|
||||
@ -28,7 +28,7 @@ Add only when they add genuine value. Most ADRs won't need them.
|
||||
|
||||
## Numbering
|
||||
|
||||
Scan `docs/adr/` for the highest existing number and increment by one.
|
||||
Scan `OKF/adr/` for the highest existing number and increment by one.
|
||||
|
||||
## When to offer an ADR — three-of-three test
|
||||
|
||||
|
||||
@ -41,21 +41,20 @@ _Avoid_: Client, buyer, account.
|
||||
|
||||
## Single vs multi-context repos
|
||||
|
||||
**Single context (most repos):** one `CONTEXT.md` at the repo root.
|
||||
**Single context (most repos):** one `OKF/CONTEXT.md`.
|
||||
|
||||
**Multi-context:** a `CONTEXT-MAP.md` at the repo root lists the contexts,
|
||||
where they live, and how they relate:
|
||||
**Multi-context:** glossaries split into `OKF/context/<subroot>.md` —
|
||||
one per bounded context — with a Contexts section in `OKF/INDEX.md`
|
||||
listing them and how they relate:
|
||||
|
||||
```md
|
||||
# Context Map
|
||||
|
||||
## Contexts
|
||||
|
||||
- [Ordering](./src/ordering/CONTEXT.md) — receives and tracks customer orders
|
||||
- [Billing](./src/billing/CONTEXT.md) — generates invoices and processes payments
|
||||
- [Fulfillment](./src/fulfillment/CONTEXT.md) — warehouse picking and shipping
|
||||
- [Ordering](context/ordering.md) — receives and tracks customer orders
|
||||
- [Billing](context/billing.md) — generates invoices and processes payments
|
||||
- [Fulfillment](context/fulfillment.md) — warehouse picking and shipping
|
||||
|
||||
## Relationships
|
||||
### Relationships
|
||||
|
||||
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events;
|
||||
Fulfillment consumes them to start picking.
|
||||
@ -65,11 +64,13 @@ where they live, and how they relate:
|
||||
```
|
||||
|
||||
Decision rule:
|
||||
- If `CONTEXT-MAP.md` exists → multi-context. Read it to find contexts.
|
||||
- Else if a single root `CONTEXT.md` exists → single-context.
|
||||
- Else (neither) → create a root `CONTEXT.md` lazily when the first term
|
||||
- If `OKF/context/` exists → multi-context. Read INDEX.md to find contexts.
|
||||
- Else if `OKF/CONTEXT.md` exists → single-context.
|
||||
- Else (neither) → create `OKF/CONTEXT.md` lazily when the first term
|
||||
is resolved. Switch to multi-context only on observing ≥ 2 obvious
|
||||
sub-roots *and* a second term that clearly belongs to one of them.
|
||||
- Split by bounded context only — never per issue; issue-local terms
|
||||
stay in their `OKF/specs/` entry until they recur.
|
||||
|
||||
When multiple contexts exist, infer which one the current topic relates
|
||||
to. If unclear, ask.
|
||||
|
||||
@ -45,25 +45,28 @@ habit any skill can do; that's not this skill.
|
||||
## File layout the skill expects
|
||||
|
||||
```
|
||||
/
|
||||
├── CONTEXT.md # single-context default
|
||||
├── CONTEXT-MAP.md # only when ≥2 obvious sub-roots exist
|
||||
├── docs/adr/
|
||||
│ └── 0001-<slug>.md
|
||||
└── src/ (or R/, app/, ...)
|
||||
OKF/ # open-knowledge-format wiki (see scribe-OKF)
|
||||
├── CONTEXT.md # single-context default — THE canonical glossary
|
||||
├── context/ # multi-context mode: one <subroot>.md per
|
||||
│ └── <subroot>.md # bounded context, indexed from OKF/INDEX.md
|
||||
└── adr/
|
||||
└── 0001-<slug>.md
|
||||
```
|
||||
|
||||
Create files **lazily** — only when there's a real first thing to write.
|
||||
No `CONTEXT.md` yet? Create it when the first term is resolved. No
|
||||
`docs/adr/`? Create it when the first ADR is needed. Confirm the *first*
|
||||
write to any new file in the repo before proceeding.
|
||||
No `OKF/CONTEXT.md` yet? Create it when the first term is resolved (run
|
||||
[scribe-OKF](../../loop/scribe-OKF/SKILL.md) scaffold if `OKF/` itself is
|
||||
missing). No `OKF/adr/`? Create it when the first ADR is needed. Confirm
|
||||
the *first* write to any new file in the repo before proceeding. A legacy
|
||||
root `CONTEXT.md` or `docs/adr/` → offer to migrate into `OKF/`.
|
||||
|
||||
If `CONTEXT-MAP.md` exists at root, the repo is in **multi-context mode**.
|
||||
Default is single-context. Switch only when you observe **≥ 2 obvious
|
||||
sub-roots** (e.g. `R/ingest/`, `R/analysis/`, `R/report/`; or
|
||||
`src/ordering/`, `src/billing/`). On the second resolved term that clearly
|
||||
belongs to one of them, propose `CONTEXT-MAP.md` at the root +
|
||||
per-context `CONTEXT.md` under each sub-root.
|
||||
Default is single-context. Switch to **multi-context mode** only on
|
||||
observing **≥ 2 obvious sub-roots** (e.g. `R/ingest/`, `R/analysis/`;
|
||||
`src/ordering/`, `src/billing/`) *and* a second resolved term clearly
|
||||
belonging to one of them — then propose `OKF/context/<subroot>.md` files
|
||||
indexed from `OKF/INDEX.md`. **The split axis is the bounded context
|
||||
(stable), never the issue (transient)** — issue-local terms live in their
|
||||
`OKF/specs/` entry until they recur, then get promoted here.
|
||||
|
||||
## Language references — R
|
||||
|
||||
@ -78,8 +81,10 @@ per-context `CONTEXT.md` under each sub-root.
|
||||
glossary, not a spec.
|
||||
- **Never** open an ADR unless all three of {hard to reverse, surprising
|
||||
without context, real trade-off} are true. When in doubt, don't.
|
||||
- **Never** create a `CONTEXT.md` / `docs/adr/` in the repo without
|
||||
- **Never** create an `OKF/CONTEXT.md` / `OKF/adr/` in the repo without
|
||||
confirming the first such write.
|
||||
- **Never** create a per-issue glossary — one canonical glossary per
|
||||
bounded context, full stop.
|
||||
|
||||
## See also
|
||||
- [../codebase-design/SKILL.md](../codebase-design/SKILL.md) — sibling
|
||||
|
||||
@ -9,7 +9,7 @@ disable-model-invocation: true
|
||||
User-invoked router. Run [grill-me](../../productivity/grill-me/SKILL.md)
|
||||
(the Socratic interview) **using** [domain-modeling](../domain-modeling/SKILL.md)
|
||||
(the active glossary / ADR discipline) — interview the user about the
|
||||
plan, and update `CONTEXT.md` and `docs/adr/` as terms and decisions
|
||||
plan, and update `OKF/CONTEXT.md` and `OKF/adr/` as terms and decisions
|
||||
crystallise.
|
||||
|
||||
Skip when no codebase exists yet — use [grill-me](../../productivity/grill-me/SKILL.md)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user