Skip to content

docs(adr): ADR-066 — abstract hierarchy vocabulary (peat#904 Phase 0)#956

Merged
kitplummer merged 3 commits into
mainfrom
adr-066-biological-vocabulary
May 30, 2026
Merged

docs(adr): ADR-066 — abstract hierarchy vocabulary (peat#904 Phase 0)#956
kitplummer merged 3 commits into
mainfrom
adr-066-biological-vocabulary

Conversation

@kitplummer
Copy link
Copy Markdown
Collaborator

@kitplummer kitplummer commented May 30, 2026

Summary

Phase 0 of the peat#904 workspace-wide rename epic. Docs-only. Establishes:

  • Vocabulary mapping (4 tiers): Squad → Cell (consolidates the existing Cell concept), Platoon → Cohort, Company → Federation, plus a new Coalition tier (no military rename — newly-added tier 4). Platform unchanged.
  • Why Coalition is in scope now: a concrete deployment (US Army echelon scaling to 1000+ peers) needs a 4th tier today. Shipping Phase 1 without it would force a second wire-format break immediately after.
  • Why this vocabulary: domain-neutral (no single field — military, biology, K8s, civic, transport — owns these terms); K8s-collision-free (unlike Pod/Cluster/Fleet, which directionally conflict with K8s's containment + cardinality model); preserves the half-done Cell consolidation work; Federation and Coalition both carry semantic information about peat's actual coordination model (autonomous parties combining for action).
  • Hard limit at 4 tiers: tier 5+ (Brigade/Division/Corps scale, ~10000+ peers) is explicitly out of scope under this rigid-schema design. Planned ADR-067 (parametric N-tier aggregation) will lift the limit when a tier-5 deployment becomes concrete — generic AggregationSummary proto with level: uint32 + parent_level_id, tier names become deployment-config labels rather than schema types. ADR-067 is planned but not yet in flight.
  • Field/document-key/event renames + Coalition additions: full table in the ADR. squad_idcell_id (consolidates), platoon_idcohort_id, company_idfederation_id, new coalition_id. SquadSummaryCellSummary, etc., new CoalitionSummary. HierarchyLevel::{Squad,Platoon,Company}::{Cell,Cohort,Federation}, new ::Coalition.
  • Wire-format strategy: hard rename + peat-schema major version bump. No deprecated aliases. Justified by pre-1.0 posture + revealed preference for clean cuts (peat#898, peat#704).
  • CoT/TAK boundary translation: external CoT type strings (a-f-G-U-C-I) are wire artifacts and may appear in peat-transport/src/tak/bridge/; internal types translated to the new vocabulary at the boundary.
  • Phase sequence: Phase 1 peat-schema (rename + add CoalitionSummary), Phase 2 peat-protocol (rename + implement Coalition aggregation), Phase 3 peat-mesh (rename + extend hierarchy strategies for Coalition tier), Phase 4 peat-transport TAK bridge + CI grep gate. Phases 1–3 are no longer pure renames — they also add the Coalition tier's new code paths. One PR per repo per the ecosystem skill.

This PR is intentionally draft so the vocabulary + tier-count can be redirected before downstream phases consume it. Phases 1–4 are blocked on this ADR's acceptance.

Revision history

  • First push: proposed organismal biology (Cell → Tissue → Organ). Rejected on review as too scientific.
  • Second push: switched to Cell → Cohort → Federation — topology-spirit, K8s-collision-free, fully domain-neutral.
  • Third push (current): added Coalition as tier 4 (concrete 1000+-peer deployment driving the need) + ADR-067 placeholder for tier 5+ parametric model.

Test plan

  • ADR follows the established format
  • No code changes; docs-only — no CI build/test gates apply beyond ADR formatting
  • Kit confirms or redirects the Cell → Cohort → Federation → Coalition 4-tier mapping
  • Kit confirms the hard-rename + major-version-bump approach vs. deprecated-alias migration
  • Kit gives green light on a separate tracking issue for ADR-067 (parametric N-tier)
  • On accept, this ADR moves to Status: Accepted and Phase 1 PR opens against peat-schema

Tracks peat#904.

…rchy levels (peat#904 Phase 0)

Phase 0 of the peat#904 rename epic. Establishes the vocabulary mapping
(Squad→Cell, Platoon→Tissue, Company→Organ), the field/document-key
renames, and the wire-format break strategy (hard rename + peat-schema
major version bump, no deprecated aliases) before any code phase starts.

This is a docs-only PR. Phases 1–4 are blocked on Kit's vocabulary
acceptance/redirect on this ADR.
After review, biological-organismal (Cell → Tissue → Organ) was too
scientific and imported a specific domain into a substrate that's
meant to be domain-neutral. Topology-native (Pod / Cluster / Fleet)
collides directionally with K8s (a K8s Pod lives inside a Node;
a K8s Cluster is the whole installation — reusing them inverts the
aggregation direction and would confuse enterprise-architecture readers).

Cell → Cohort → Federation keeps the existing Cell consolidation work,
avoids K8s collisions, and the words are domain-neutral. Federation in
particular carries semantic information: peat's model IS independently-
managed cells coordinating with autonomy.

Renames ADR file too (066-biological-hierarchy-vocabulary.md →
066-abstract-hierarchy-vocabulary.md) since 'biological' no longer fits.

All field/document-key/event/HierarchyLevel renames + the wire-format
break strategy + boundary translation are updated accordingly.
@kitplummer kitplummer changed the title docs(adr): ADR-066 — abstract biological vocabulary for hierarchy levels (peat#904 Phase 0) docs(adr): ADR-066 — abstract hierarchy vocabulary (peat#904 Phase 0) May 30, 2026
A concrete deployment (US Army echelon scaling to 1000+ peers)
requires a 4th tier today. Folding it into peat#904 now avoids a
second wire-format break immediately after Phase 1 ships.

Vocabulary commits to four fixed, named tiers above Platform:
Platform → Cell → Cohort → Federation → Coalition

Coalition is "alliance for combined action of autonomous parties"
— stacks semantically over Federation (which is an autonomous
alliance of cohorts).

Phase 1–3 scope grows: not pure renames anymore. They also add a
new CoalitionSummary proto message, HierarchyLevel::Coalition
variant, and Coalition-tier aggregation / routing code paths in
peat-protocol and peat-mesh. Same files as the rename touches;
new exercise paths need their own tests.

Tier 5+ (Brigade / Division / Corps, ~10000+ peers) is explicitly
out of scope under the rigid-schema model and deferred to a
planned ADR-067 (parametric N-tier aggregation) — generic
AggregationSummary with level/parent fields, tier names become
deployment-config labels rather than schema types. ADR-067 is
planned but not yet in flight.
@kitplummer kitplummer marked this pull request as ready for review May 30, 2026 18:54
@kitplummer kitplummer merged commit 7bd7822 into main May 30, 2026
18 checks passed
@kitplummer kitplummer deleted the adr-066-biological-vocabulary branch May 30, 2026 18:55
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peat QA Review (SHA: c5f9746)

Scope: Docs-only ADR (Phase 0 of peat#904). No code changes; security-primitive, FFI/BLE, peat-mesh transport, and test-surface checks do not apply to this PR.


[WARNING] Verification grep gate — command is syntactically broken

The "Verification gate" section specifies:

```bash
grep -rEln '\b(Squad|Platoon|Company|Battalion|Regiment|Brigade|Division|Fireteam)\w*'
--include='.rs' --include='.proto'
-- ':!docs/adr' ':!docs/whitepaper' ':!CHANGELOG.md' ':!CLAUDE.md' ':!SKILL.md'
-- ':!/tests/fixtures/' ':!peat-transport/src/tak/bridge/**'
```

POSIX grep does not interpret :!pattern git-pathspec exclusion syntax. After --, those tokens are treated as literal file paths to search — no file named :!docs/adr exists, so grep finds no input files, returns exit 1 (or 0 with GNU grep and no matches), and the "empty output" acceptance criterion is satisfied regardless of actual codebase content. The gate silently passes even when violations are present.

Action: Replace grep with git grep, which natively supports :! pathspecs:

```bash
git grep -Eln --perl-regexp '\b(Squad|Platoon|Company|Battalion|Regiment|Brigade|Division|Fireteam)\w*'
-- '.rs' '.proto'
':!docs/adr' ':!docs/whitepaper' ':!CHANGELOG.md' ':!CLAUDE.md' ':!SKILL.md'
':!/tests/fixtures/' ':!peat-transport/src/tak/bridge/**'
```

Or, if CI runs outside a git worktree, replace each exclusion with --exclude-dir / --exclude flags. The ADR's own acceptance criterion must be executable and correct before Phase 4 ships.


[WARNING] Tier vocabulary table conflates renames with new additions

The top-level tier table uses an identical "Old (military) → New (abstract)" row format for both existing-code renames (Squad→Cell, Platoon→Cohort, Company→Federation) and for Coalition, which is a new tier addition with no existing implementation. A Phase 1 implementer reading the tier table in isolation would look for a HierarchyLevel::Battalion variant or battalion_id field to rename — neither exists in the current codebase. The field-name renames table correctly marks coalition_id and CoalitionSummary as "(new — no military analogue used in code)", but the tier table's "New tier in this ADR" annotation is in the Meaning column where it can be skimmed past.

Action: Visually separate renames from additions in the tier table — e.g., a "+" prefix on the Coalition row's Old column, a dedicated "New tiers added by this ADR" sub-table beneath the rename table, or a column annotation. The goal is that Phase 1's implementer cannot mistake Coalition for a rename when reading the authoritative ADR table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant