Skip to content
Merged
31 changes: 29 additions & 2 deletions .agent-loop/CURRENT_STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,38 @@ WS-ARCH-001-04E is planned. WS-ARCH-001-04F is planned.
WS-ART-001-06A is a planned retirement. WS-ART-001-06B is a planned
retirement. WS-AUTH-001-14 is a planned retirement. WS-POL-003-08 is planned
after canonical WS-ARCH-001-04E.
WS-CON-001-05A is planned before live task readiness. WS-CON-001-06 is a planned retirement.
CP06 validation plus CP07/CP08 owner persistence are proposed before live task
readiness. WS-CON-001-06 is a planned retirement.
Submission stamps the assignment's exact attempt version, and ReviewLease
inherits that immutable Submission version without a CON lookup.
WS-CON-001-05B is planned after the 05A zero-consumer proof.
CP09 is the proposed clean legacy economic-path removal after WS-ARCH-001-03C activates
the CP08/ARCH-03B replacement behavior.
WS-REV-001-10 is planned after its named REV and CON prerequisites.
WS-AUTH-001-12H is planned after POL-07, corrected AUTH-12B2, CP05, CP06, and
CP07; CP08, WS-ARCH-001-03A/03B/03C, and CP09 remain downstream.
Merged WS-CON-001-PLAN5 remains historical evidence for same-TaskAssignment
human revision rebase; current PLAN2 supersedes its independent reviewer-policy
selection wording.

## Proposed PLAN3 correction

Do not start historical CON-05A directly. The proposed CP01-CP09 sequence owns
AUTH unavailable registration, hidden CON binding/policy behavior, exact AUTH
activations, CON validation, PROJECT guide binding, TASK attempt lineage, and
clean v0.1 legacy economic-path removal in that order. Every child remains
non-executable until PLAN3 merges and its current-main contract is expanded.

- WS-ARCH-001-PLAN3 is proposed planning only.
- WS-ARCH-001-CP01 is proposed and non-executable.
- WS-ARCH-001-CP02 is proposed and non-executable.
- WS-ARCH-001-CP03 is proposed and non-executable.
- WS-ARCH-001-CP04 is proposed and non-executable.
- WS-ARCH-001-CP05 is proposed and non-executable.
- WS-ARCH-001-CP06 is proposed and non-executable.
- WS-ARCH-001-CP07 is proposed and non-executable.
- WS-ARCH-001-CP08 is proposed and non-executable.
- WS-ARCH-001-CP09 is proposed and non-executable after WS-ARCH-001-03C.

Retained WS-CON-001-06 and WS-CON-001-08A chunk files are historical,
non-executable evidence. CP06/CP07/CP08 replace CON-06's old dependency; future
delivery needs a fresh contract against CP02/CP04 rather than old CON-04A/04B.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,20 @@
| `WS-ARCH-001-02H` | AUTH human/fixed-service consumption activation | L1 | Complete on merge; public route remains unchanged |
| `WS-ARCH-001-02I` | Admission-only public API/dispatch cutover and complete legacy removal | L1 | Deferred after 02H plus split 03/04/05 remediation, revision, checker-output and REV admission prerequisites |
| `WS-ARCH-001-PLAN2` | Current-main reconciliation around canonical Submission-to-`allow_review` | L1 | Planned; planning contract lands on merge |
| `WS-ARCH-001-PLAN3` | ContributionPolicy registration, behavior, activation, guide/task lineage and clean legacy-removal sequencing | L1 | Proposed planning correction; no runtime |
| `WS-ARCH-001-CP01` | AUTH adapter-binding and ContributionPolicy unavailable registration | L1 | Proposed skeleton after PLAN3 |
| `WS-ARCH-001-CP02` | CON hidden adapter-binding behavior | L1 | Proposed skeleton after CP01 |
| `WS-ARCH-001-CP03` | AUTH exact adapter-binding activation | L1 | Proposed skeleton after CP02 evidence |
| `WS-ARCH-001-CP04` | CON hidden ContributionPolicy behavior | L1 | Proposed skeleton after CP03 |
| `WS-ARCH-001-CP05` | AUTH exact ContributionPolicy activation | L1 | Proposed skeleton after CP04 evidence |
| `WS-ARCH-001-CP06` | CON guide-activation/revision policy-validation port | L1 | Proposed skeleton after CP05 |
| `WS-ARCH-001-CP07` | PROJECT guide-bound ContributionPolicyVersion persistence | L1 | Proposed skeleton after CP06 |
| `WS-ARCH-001-CP08` | TASK/Assignment/Submission policy-lineage schema and public facts | L1 | Proposed foundation after CP07; no commands |
| `WS-ARCH-001-CP09` | Clean retired guide-bound economic path removal | L1 | Proposed after ARCH-03C activates the replacement; split if discovery requires |
| `WS-ARCH-001-03` | PROJECT/TASK readiness coordination parent | L1 | Split; non-executable parent |
| `WS-ARCH-001-03A` | PROJECT current approved unified-generation public facts | L1 | Planned skeleton after AUTH-12H; POL-08 cleanup remains later |
| `WS-ARCH-001-03B` | TASK readiness, claim, assignment and locked-context public commands/facts | L1 | Planned skeleton after 03A and CON-05A guide-activation policy validation/persistence contract; TASK locks the guide-bound version before claimability and claim only inherits it |
| `WS-ARCH-001-03C` | AUTH-13 task/assignment activation and integrated readiness proof | L1 | Planned skeleton after 03A/03B hidden manifests and CON-05A; no live claim before exact guide -> task -> assignment lineage proof |
| `WS-ARCH-001-03A` | PROJECT current approved unified-generation public facts | L1 | Planned after AUTH-12H, CP07, and CP08; may reuse CP07 public guide fact but cannot duplicate its write |
| `WS-ARCH-001-03B` | TASK readiness, claim, assignment and locked-context public commands/facts | L1 | Sole behavior owner after 03A and CP08; consumes CP08 fields/facts to write Task -> Assignment -> Submission lineage |
| `WS-ARCH-001-03C` | AUTH-13 task/assignment activation and integrated readiness proof | L1 | Planned after 03A/03B and CP08; activates replacement before CP09 removes the retired path |
| `WS-ARCH-001-04` | Canonical post-submit checker coordination parent | L1 | Split; non-executable parent |
| `WS-ARCH-001-04A` | CHECKER post-submit plan/run/final-result public contract | L1 | Planned skeleton after POL-07 and 03C |
| `WS-ARCH-001-04B` | ART exact verified Submission materialization | L1 | Planned skeleton after 04A and merged 02H |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,24 @@ exact frozen submitter and reviewer ContributionPolicyVersion references. All
retired economic-policy vocabulary and fields are removal debt for the owning
clean-cut chunks before public release; they are not authority and receive no
compatibility alias or fallback.

## D15: ContributionPolicy cutover is registration-behavior-activation

Adapter-binding and ContributionPolicy capabilities follow separate AUTH
registration -> hidden CON behavior -> exact AUTH activation sequences. Future
fulfillment callback authority is not a prerequisite and cannot be inherited.

## D16: Aggregate owners persist policy lineage

CON validates and returns immutable policy-version facts. PROJECTS alone binds
the version to ProjectGuide. TASKS alone locks it on Task, copies it to
TaskAssignment, and stamps it on Submission. ReviewLease later copies only the
Submission stamp. No product service imports another module's model or
repository to perform those writes.

## D17: v0.1 removal is clean, not compatible

The consolidated baseline is the current schema authority. The retired
guide-bound economic path is removed only after canonical lineage is live, with
no alias, fallback, dual read/write, guessed conversion, or historical backfill
unless future discovery proves an actual deployed-data obligation.
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,22 @@ complete unified guide compilation and approval
PR #329 is the open planning reconciliation for this boundary. No open
implementation pull request owns the executable sequence; the owner skeletons
remain non-executable until refreshed against current `main`.

## PLAN3 current-main discovery

- ContributionPolicy and immutable version/rule/definition persistence already
exist under the CON-owned contributions module.
- AUTH contains broad compensation permission identifiers but no exact
`contribution.policy.*` ActionIds, ActionOwner custody, typed contexts, or
planned definitions suitable for the hidden service.
- The historical CON-04A contract incorrectly makes future fulfillment callback
registration a prerequisite of adapter-binding behavior.
- ProjectGuide lacks `contribution_policy_version_id`; WorkstreamTask,
TaskAssignment, and Submission lack their canonical ContributionPolicyVersion
lineage fields.
- Retired guide-bound economic fields and consumers remain live across PROJECTS,
TASKS, Submission, and CHECKERS.
- The active schema is the consolidated `0001_v01_baseline`; there is no
repository evidence requiring a compatibility alias, deployed-history
backfill, or guessed legacy-row conversion.
- No open pull request currently owns this sequence.
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,15 @@ module and every cross-module call must use a typed public API.
- CON validates one policy version at guide activation and is mandatory again
in every final Review commit. TASK and REV inherit the immutable version;
neither claim performs CON policy selection.

## PLAN3 intent

Turn PLAN2's correct ContributionPolicy lifecycle into an executable,
non-circular sequence. Success means AUTH registers before behavior, each CON
behavior activates only after hidden proof, CON exposes validation without
writing foreign aggregates, PROJECTS binds the guide, TASKS carries immutable
attempt lineage, and the retired guide-bound economic path is removed without
compatibility or invented historical migration work.

PLAN3 changes planning only. It does not register an action, activate a route,
write policy behavior, mutate schema, or start a runtime child.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ POL-03B
-> POL-04A -> AUTH-12B2 -> POL-04B
-> POL-05A -> AUTH-12F4 -> POL-05B
-> POL-06A -> AUTH-12G -> POL-06B
-> POL-07 -> AUTH-12H
-> POL-07 + corrected AUTH-12B2 + CP05 + CP06 + CP07 -> AUTH-12H
```

Each POL/AUTH chunk repairs only the public boundary and structural debt it
Expand All @@ -139,6 +139,11 @@ and hashes. POL-08 physical cleanup follows the canonical `allow_review`
milestone so it does not create a circular dependency on the Submission path;
no live call may use the transitional inference paths in the interim.

AUTH-12H requires only corrected AUTH-12B2 plus active policy behavior,
validation, and ProjectGuide binding needed for guide activation. CP08,
WS-ARCH-001-03A/03B/03C, and CP09 are downstream; making final legacy removal
a 12H prerequisite would create a cycle through task activation.

### Gate 1: current task, assignment and submitter-policy authority

Parent 03 is split into 03A-03C. PROJECTS exposes current approved compilation
Expand Down Expand Up @@ -275,3 +280,36 @@ implicit public release.
- Put orchestration in ART or AUTH: transfers lifecycle ownership.
- Create a generic shared domain/service locator: hides coupling.
- Preserve the debt ledger permanently: normalizes the architecture failure.

## PLAN3 ContributionPolicy implementation correction

PLAN2's lifecycle rule remains canonical, but its earlier instruction to begin
CON-05A is not executable on current main. ContributionPolicy persistence exists
without hidden policy behavior or exact AUTH action registration/activation;
the retired guide-bound economic path remains live across PROJECTS, TASKS, Submission,
and CHECKERS. The repository now uses one consolidated v0.1 baseline, so no
deployed-history conversion or compatibility path is assumed.

The corrected linear sequence is:

```text
CP01 AUTH unavailable registration
-> CP02 CON hidden adapter-binding behavior
-> CP03 AUTH adapter-binding activation
-> CP04 CON hidden ContributionPolicy behavior
-> CP05 AUTH ContributionPolicy activation
-> CP06 CON validation port
-> CP07 PROJECT guide binding
-> CP08 TASK/Assignment/Submission schema and public lineage facts
-> ARCH-03A PROJECT current-generation facts
-> ARCH-03B TASK readiness, claim, assignment and Submission behavior
-> ARCH-03C AUTH task/assignment activation
-> CP09 clean legacy economic-path removal
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.

Each arrow consumes merged public behavior. No chunk imports another product
module's models or repository. Callback/fulfillment authority is excluded from
adapter-binding registration. CON validates policy facts; PROJECTS owns guide
writes; CP08 supplies TASK-owned persistence/public facts; ARCH-03B alone owns
Task readiness, claim, assignment, and Submission command writes; REV later
copies only the immutable Submission policy stamp.
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@
| Live assignment or review claim loses the one task-governing ContributionPolicyVersion | Critical | Enforce immutable guide -> task -> assignment -> Submission/allow_review -> ReviewLease lineage; missing, cross-project, stale or mismatched facts deny before claim effects, and neither claim performs CON policy lookup |
| Review decision commits without mandatory contribution consequences | Critical | Stable REV schema precedes CON-03C/07; every decision atomically creates reviewer ContributionRecord/awards and accept additionally creates FinalAcceptance plus submitter record/awards |
| Composition root absorbs domain decisions | High | Composition opens the unit of work and wires transaction-bound ports only; TASK command owns Submission sequencing and each target port enforces its own invariants |
| Policy behavior starts before exact AUTH registration | Critical | CP01 registers typed unavailable authority before CP02/CP04 behavior; CP03/CP05 activate only after hidden proof |
| Binding management inherits fulfillment callback authority | Critical | CP01-CP03 exclude delivery/callback identities and permissions entirely |
| CON writes PROJECT or TASK aggregates | Critical | CP06 returns immutable validation facts only; CP07 and CP08 own their respective writes |
| Consolidated v0.1 schema gains fake compatibility debt | High | CP09 performs a clean current-baseline cut and forbids aliases, dual paths, and invented backfills |
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@
initiative: WS-ARCH-001 remains the general boundary owner, WS-AUTH-003 owns
AUTH-specific debt, and test-structure repairs remain incremental with the
capability being touched.
- PLAN3 corrects PLAN2's first implementation dependency. CON-05A is not a
valid direct start: missing AUTH registration/activation and hidden CON
behavior must precede owner-separated guide/task lineage. CP01-CP09 are
proposed non-executable skeletons until PLAN3 is reviewed and merged.

## Proposed PLAN3 children

- WS-ARCH-001-PLAN3 is proposed planning only; runtime behavior is unchanged.
- WS-ARCH-001-CP01 is proposed: combined unavailable AUTH registration; it
must split before implementation unless current-main scope proof shows one
bounded shared catalogue/context change.
- WS-ARCH-001-CP02 is proposed: hidden adapter-binding behavior.
- WS-ARCH-001-CP03 is proposed: exact adapter-binding activation.
- WS-ARCH-001-CP04 is proposed: hidden ContributionPolicy behavior.
- WS-ARCH-001-CP05 is proposed: exact ContributionPolicy activation.
- WS-ARCH-001-CP06 is proposed: CON policy-validation port.
- WS-ARCH-001-CP07 is proposed: PROJECT guide binding.
- WS-ARCH-001-CP08 is proposed: TASK/Assignment/Submission lineage persistence
and public facts only.
- WS-ARCH-001-CP09 is proposed: clean legacy economic-path removal after
WS-ARCH-001-03C activates the replacement.

## Planned PLAN2 children

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Chunk Contract: WS-ARCH-001-CP01 — Contribution Policy AUTH Registration

Status: proposed non-executable skeleton. Risk: L1.

AUTH registers exact adapter-binding and ContributionPolicy action identifiers,
permission mappings, ActionOwner custody, Project Manager/administrative grant
semantics, typed resource contexts, and opaque PREP contracts. Every action
remains unavailable. Fulfillment callback, delivery, award reads, dispatcher,
TASK, and REV authority are excluded.

Before implementation, replace this skeleton with a current-main contract that
names exact AUTH public types, catalogue rows, tests, allowed files, and
reviewers. The pre-start review must either split binding registration from
policy registration or prove the combined unavailable-only change is bounded:
one shared catalogue/context seam, no evaluator/activation/service identity,
reviewable diff size, and independent parity tests for each action family. No
CON implementation or activation belongs here.

## Merge state

- Outcome on merge: `planned`
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Chunk Contract: WS-ARCH-001-CP02 — Hidden Adapter-Binding Behavior

Status: proposed non-executable skeleton after CP01. Risk: L1.

CON implements only hidden adapter-binding create/read/suspend/resume behavior
through its public capability boundary and the registered opaque PREP protocol.
Routes remain absent and actions unavailable. Retirement, fulfillment callback,
provider behavior, policy commands, and AUTH edits are excluded.

After hidden tests and feature evidence merge, a separate AUTH activation chunk
activates only these exact binding actions.

## Merge state

- Outcome on merge: `planned`
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Chunk Contract: WS-ARCH-001-CP03 — Adapter-Binding AUTH Activation

Status: proposed non-executable skeleton after CP02. Risk: L1.

AUTH integrates the exact adapter-binding evaluator and activates only the
binding create/read/suspend/resume actions proven by CP02. It adds no CON
behavior, callback authority, policy activation, or generic compensation
management permission.

## Merge state

- Outcome on merge: `planned`
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Chunk Contract: WS-ARCH-001-CP04 — Hidden ContributionPolicy Behavior

Status: proposed non-executable skeleton after CP03. Risk: L1.

CON implements hidden ContributionPolicy read/draft/update/publish/retire
behavior using the existing persistence aggregate, exact binding lifecycle, and
opaque PREP protocol. Explicit unpaid and compensated rules remain distinct.
Routes remain absent and policy actions unavailable. PROJECT guide activation,
TASK readiness, claim, assignment, Submission, REV, awards, and AUTH edits are
excluded.

After hidden proof merges, a separate AUTH activation chunk activates only the
exact policy actions.

## Merge state

- Outcome on merge: `planned`
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Chunk Contract: WS-ARCH-001-CP05 — ContributionPolicy AUTH Activation

Status: proposed non-executable skeleton after CP04. Risk: L1.

AUTH integrates exact ContributionPolicy evaluators and activates only the
policy operations proven by CP04. It adds no ProjectGuide, TASK, REV, award,
fulfillment, or provider behavior.

## Merge state

- Outcome on merge: `planned`
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Chunk Contract: WS-ARCH-001-CP06 — ContributionPolicy Validation Port

Status: proposed non-executable skeleton after CP05. Risk: L1.

CON exposes one caller-session, flush-only public validation capability that
locks and returns the exact active, published, complete, binding-valid,
same-project ContributionPolicyVersion for guide activation or controlled
human-revision preparation. It owns no ProjectGuide, Task, TaskAssignment,
Submission, claim, ReviewLease, or authorization write.

No migration or legacy removal belongs here. Missing, ambiguous, crossed-
project, draft, incomplete, or invalid binding state fails closed.

## Merge state

- Outcome on merge: `planned`
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Chunk Contract: WS-ARCH-001-CP07 — Project Guide Policy Binding

Status: proposed non-executable skeleton after CP06. Risk: L1.

PROJECTS extends its public guide-activation composition to call the CON public
validation capability and persist the returned exact version as non-null
`ProjectGuide.contribution_policy_version_id`. PROJECTS owns the guide write and
single transaction; it imports no CON models/repositories and performs no
policy selection itself.

The covered Project Manager invokes `project.guide_sufficiency.run` through
the public HTTP route. The fixed `workstream.project.setup` service resolves
the same action only through the internal command boundary and must never call
or depend on that public route.

This chunk reconciles the current v0.1 baseline schema for ProjectGuide only.
TASK/Assignment/Submission fields and legacy economic-path removal remain later.

## Merge state

- Outcome on merge: `planned`
Loading
Loading