Skip to content

feat(ce-plan): add U-IDs and origin trace to plan template#632

Merged
tmchow merged 6 commits into
mainfrom
tmchow/ce-plan-traceability
Apr 21, 2026
Merged

feat(ce-plan): add U-IDs and origin trace to plan template#632
tmchow merged 6 commits into
mainfrom
tmchow/ce-plan-traceability

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented Apr 21, 2026

Summary

Plans now surface origin Actors / Key Flows / Acceptance Examples in Requirements Trace, carry forward the Deep-product Scope Boundaries split when origin supplies it, and assign stable plan-local U-IDs to Implementation Units that survive deepening reorders. Test scenarios can link to origin Acceptance Examples (Covers AE1.), and ce-work / ce-work-beta recognize U-IDs in blockers, verification, and task labels. End-to-end traceability now runs from a ce-brainstorm requirements doc through ce-plan's output and into ce-work's execution surface.

This is the second half of the work PR #629 opened. PR #629 added the upstream IDs (R/A/F/AE) and the Deep-product brainstorm tier. This PR completes the plan-side artifact and the execution-side recognition.

What changes

ce-plan template (Phase 4.2). Requirements Trace gains optional **Origin actors:** / **Origin flows:** / **Origin acceptance examples:** sub-blocks, included only when the upstream brainstorm supplies them. Scope Boundaries supports a conditional three-way split for Deep-product origins:

  • Deferred for later (carried — product/version sequencing)
  • Outside this product's identity (carried — positioning rejection)
  • Deferred to Follow-Up Work (plan-local — implementation work split across other PRs/issues/repos)

The plan-local subsection is renamed from "Deferred to Separate Tasks." "Task" overlapped with TaskCreate / TaskList tooling, and the section's contents are PRs, issues, or repos rather than tasks.

Stable U-IDs for Implementation Units. Each unit's heading is - [ ] U1. **[Name]**, paralleling the R / A / F / AE format from PR #629. The stability rule is explicit and restated at three locations because deepening (Phase 5.3) is the most likely accidental-renumber vector: U-IDs are never renumbered, gaps are fine, new units take the next unused number. Reordering preserves IDs in their new order.

AE-link convention for test scenarios. When a test scenario directly enforces an origin Acceptance Example, prefix it with Covers AE1. (or Covers F2 / AE3.). Sparse by design — most test scenarios are finer-grained than AEs and don't link. The link is the mechanism by which AE's disambiguation propagates into enforcement, symmetric to brainstorm's Covers: R-IDs upward trace.

Planning-side Alternatives rule. Alternatives differ on how the work is built: architecture, sequencing, integration pattern, rollout strategy. Tiny implementation variants belong in Key Technical Decisions. Product-shape alternatives go back to ce-brainstorm rather than re-litigating product questions during planning.

Phase 5.1 finalization checklist and deepening-workflow.md checklists. Both gain origin-trace preservation checks using judgment-call phrasing ("origin R / F / AE that affects implementation"), not mechanical "every ID appears." All origin-related checks are guarded by "if origin exists" so the no-origin path skips them naturally. deepening-workflow.md adds an explicit U-ID stability warning to the Implementation Units checklist and to Step 5.3.7's Allowed and Do-not lists. Deepening must never renumber existing U-IDs even when reordering or "tidying."

ce-work and ce-work-beta. Both recognize U-IDs alongside R / A / F / AE in blockers, deferred-work notes, task summaries, and final verification. When creating tasks from plan units, the U-ID becomes the task subject prefix (e.g., "U3: Add parser coverage") so blockers like "U3 blocked on missing fixture" anchor unambiguously to the source unit. Synced atomically per the repo's stable/beta convention.

Design notes

  • Conditionality is first-class. Every origin-derived structure has a stated trigger, a stated no-origin fallback, and HTML-comment guidance so the template doesn't render broken sections in the no-origin path. ce-plan must remain useful when no upstream brainstorm exists — piecemeal use is by design.
  • No new tier or namespace beyond U. No "Deep-product-plan" classification; planning answers HOW. No Q-IDs for open questions. No rename of "Implementation Units." The brainstorm-side decisions about avoiding ID-namespace sprawl apply equally here.
  • The three-way Scope Boundaries split triggers on observable origin content (presence of an Outside this product's identity subsection in origin), not on a propagated tier flag. The plan never has to know the origin's tier classification — it just inspects what the origin doc actually contains.
  • The AE-link convention says "should when directly enforces," not "may." "May" is too weak; agents skip optional rules under pressure. The "directly enforces" qualifier gates the rule on a real condition while still mandating compliance when it holds.
  • Three distinct concepts in Scope Boundaries, not two collapsed. Origin's Deferred for later (product sequencing), origin's Outside this product's identity (positioning), and the plan-local Deferred to Follow-Up Work (implementation split) all mean different things. An earlier draft conflated the first and third; reviewing the brainstorm-side intent restored the distinction.
  • ce-work and ce-work-beta synced. Sync decision stated in the U5 commit body: "Propagated to beta — shared traceability contract." Nothing about the experimental delegate mode interacts with ID semantics.

Validation

bun test — 831 pass, 0 fail. bun run release:validate — clean (50 agents, 45 skills, no drift).

The plan doc that drove this work is included in the diff: docs/plans/2026-04-21-001-feat-ce-plan-traceability-loop-plan.md. It's also the first plan written using the new conditionality rule (no origin doc, so no Origin Trace sub-blocks, scope boundaries collapses to single list). Demonstrates the no-origin fallback works.


Compound Engineering
Claude Code

tmchow added 6 commits April 21, 2026 15:20
Plan-local U-IDs (U1, U2, ...) for Implementation Units, with explicit
stability rule: never renumber existing IDs, gaps are fine, new units
take next unused. Restated at Phase 3.3, Phase 3.5, and as a visible
HTML comment in the Phase 4.2 template — deepening (Phase 5.3) is the
most likely accidental-renumber vector, so the rule needs to be visible
at every entry point.

Closes the execution-side ambiguity: ce-work can now reference 'U3' in
blockers and verification with stable meaning across plan edits.

Refs PR #629 (originating brainstorm-side traceability work).
Three template changes that close the brainstorm-side traceability work
on the plan-side artifact:

- Requirements Trace gains optional 'Origin actors / flows / acceptance
  examples' sub-blocks. Included only when the upstream brainstorm
  supplies them; omitted cleanly when no origin doc exists.
- Scope Boundaries supports a conditional three-way split for
  Deep-product origins: 'Deferred for later' (carried, product
  sequencing) + 'Outside this product's identity' (carried, positioning)
  + 'Deferred to Follow-Up Work' (plan-local, implementation split).
  Default single-list structure unchanged for non-product-tier origins
  and no-origin plans.
- Rename 'Deferred to Separate Tasks' → 'Deferred to Follow-Up Work'
  throughout the file. 'Task' overlapped with TaskCreate/TaskList
  tooling and the contents are PRs/issues/repos.

The conditionality design rule is applied throughout: every origin-
derived structure has a stated trigger, a no-origin fallback, and
HTML-comment guidance so the template doesn't render broken sections in
the no-origin path.

Refs PR #629.
….1 origin checks

Three small workflow rules that round out the plan-side traceability
contract:

- Phase 3.5 Test scenarios description gains an AE-link convention:
  prefix test scenarios that directly enforce an origin Acceptance
  Example with 'Covers AE<N>.'. Sparse-by-design — most test scenarios
  are finer-grained than AEs and do not link. The rule is the mechanism
  by which AE's disambiguation propagates into enforcement.

- Phase 4.1b Alternative Approaches Considered gains the planning
  mirror rule: alternatives differ on *how* the work is built
  (architecture, sequencing, integration pattern, rollout strategy).
  Tiny implementation variants belong in Key Technical Decisions.
  Product-shape alternatives belong upstream in ce-brainstorm — surface
  them back rather than re-litigating product questions during planning.

- Phase 5.1 finalization checklist gains three new bullets: U-ID
  stability check, origin R/F/AE preservation check (judgment-call
  phrasing — 'that affects implementation', not mechanical 'every ID
  appears'), and Deep-product Scope split check. All origin-related
  bullets guarded so the no-origin path skips them naturally.

Refs PR #629.
…n deepening

Update the confidence-check machinery so the new traceability contract
is enforced where plans are actually strengthened:

- Requirements Trace checklist gains an origin A/F/AE preservation
  check — flags inconsistent or dropped references across trace, units,
  and test scenarios when origin supplied them.
- Implementation Units checklist gains two new bullets: existing U-IDs
  were renumbered after reorder/split/delete, and units realizing a
  flow or enforcing an AE do not cite the corresponding F-ID/AE-ID.
- Step 5.3.7 Allowed-changes pairs the existing 'reorder or split
  implementation units' permission with an explicit no-renumber rule
  and stated rationale (breaks ce-work blocker references).
- Step 5.3.7 Do-not list forbids renumbering as part of tidying.
  Deepening is the most likely accidental-renumber vector, so the rule
  appears in both Allowed (positive framing) and Do-not (prohibition).

Refs PR #629.
Close the execution side of the brainstorm-plan-work traceability loop:

- Track Progress guidance now recognizes U-IDs alongside R/A/F/AE in
  blockers, deferred-work notes, task summaries, and final verification.
  U-IDs anchor units across plan edits; R/A/F/AE anchor product intent
  across the brainstorm-plan handoff. The 'use IDs the plan supplies,
  don't invent ones it doesn't' rule prevents synthetic ID creation.

- Create Todo List step now includes U-ID prefix preservation: when the
  plan defines U-IDs, the unit's U-ID becomes the task subject prefix
  (e.g., 'U3: Add parser coverage'). This anchors blockers and
  summaries to the same identifier the plan uses, so a 'U3 blocked'
  status update unambiguously matches the source unit even after the
  plan has been edited or reordered.

Propagated to beta — shared traceability contract. The U-ID recognition
guidance applies equally to both execution modes; nothing about delegate
mode (the experimental beta-only behavior) interacts with ID semantics.

Refs PR #629.
Mirror the ce-brainstorm requirements-capture.md legibility convention:
horizontal rules (---) between top-level sections in Standard and Deep
plans. Improves scannability of dense plans where many H2 sections sit
close together. Omit for Lightweight plans.

Adds the convention to Phase 4.3 Planning Rules and inserts separators
throughout the core template and the optional Deep-extension template.

Refs PR #629 (originated the convention in the brainstorm template).
@tmchow tmchow merged commit 44ce9dd into main Apr 21, 2026
2 checks passed
This was referenced Apr 21, 2026
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