041 — maturity.code 3 is accepted and means trunk flow; level 2 is refused (#237)

Status: in progress Roadmap: #231

Why

The manual's code ladder is now 0, 1 and 3 (maturity): level 3 is agent flow, level 1 with agents doing the work between a defined story and its landing, and level 2 (CI on every pull request) is retired as never built. tp still has the old ladder: tp maturity code 3 is refused, code: 2 is taken, and a task-plus.yml saying code: 3 loads as a batch project. The rest of agent flow is built behind the declaration, so a project has to be able to make it first.

What changes

  • task-plus.yml: maturity.code is 0, 1 or 3. Any other value is a config error; 2 is named as retired.
  • maturity.code: 3 is trunk flow: stories land with tp story land and the release is made on the base branch, with or without maturity.flow: trunk. Level 3 has no batch.
  • tp maturity code 3 declares the level as code 1 does: the base branch protected, merge commits the default, the repository at rest. tp maturity code 2 is refused.
  • Reports that name the mode say trunk flow (maturity.code 3).
  • docs/maturity.md: the ladder and the table. ROADMAP.md: #51 (code level 2) leaves; its issue is closed as retired.

Acceptance

Loading task-plus.yml:

maturity.code maturity.flow Outcome
0 or absent absent trunk release, as today
0 trunk error, as today
1 absent batch, as today
1 trunk trunk flow, as today
2 any error: there is no code level 2; declare 1 or 3
3 absent trunk flow
3 trunk trunk flow
3 anything else error, as today
4 or more, negative any error: the ladder is 0, 1 or 3

tp maturity code N:

N Outcome
0, 1 as today
3 as code 1: forge and token required, at rest, base protected, merge commits the default, then the level written
2 error: there is no code level 2; nothing written, the forge not touched
4 or more, negative error: the ladder is 0, 1 or 3

At level 3 with no maturity.flow:

Command Outcome
tp story land, tp story query on a story branch run as under maturity.flow: trunk; the mode line reads trunk flow (maturity.code 3)
tp release on a story branch refused, naming tp story land
tp release, tp release query on the base release what has landed, as under maturity.flow: trunk

Out of scope

  • Everything else agent flow adds: ideas, the labels, the call, the agent's merge (#232–#235). Level 3 behaves as level 1 under trunk flow until they are built.
  • Removing maturity.flow and the batch from level 1 (#199).
  • Moving a project from 1 to 3 while a story is in flight: the at-rest rule (story 029) stands.
  • CI on pull requests, which the manual now leaves to the forge.

Decisions

ADR 0010: the ladder is 0, 1, 3; level 3 means trunk flow by itself; a declared 2 is an error, not read as 1.

Done when

  • tests express the acceptance table and pass
  • spec updated
  • ADR written if a fork was resolved
  • roadmap ticked and stamped; changelog entry
  • issue closed with a link to the release