Skip to content

feat(deliverables): auto-producer reconciler + DELIVERABLE_EMIT skill (Slice 3)#41

Merged
aimerdoux merged 1 commit into
mainfrom
feat/deliverable-autoproducer
Jun 2, 2026
Merged

feat(deliverables): auto-producer reconciler + DELIVERABLE_EMIT skill (Slice 3)#41
aimerdoux merged 1 commit into
mainfrom
feat/deliverable-autoproducer

Conversation

@aimerdoux

Copy link
Copy Markdown
Owner

Summary

Slice 3 of the deliverable write-path. PR #39 added the git-first write-path + verify but nothing called writeDeliverable() automatically. This makes it fire from completed Paperclip issues: an agent emits a wavex-artifact block when it finishes → the reconciler captures it as a git-committed deliverable.

Stacked on #39 — base is feat/deliverable-git-writepath. Merge #39 first.

What's here

  • artifact-block.tsparseArtifactBlock() extracts a fenced ```wavex-artifact block (kind/title/mime header + --- + body). Mirrors the wavex-contract convention.
  • reconcile-deliverables.ts
    • reconcileDeliverables()pure + testable: for each terminal-state issue carrying a block with no existing deliverable, calls writeDeliverable() (git-commits the artifact). Idempotent — one deliverable per issue.
    • fetchCompletedIssuesForCompany()defensive I/O glue: reads the paperclip-handoff, GETs local Paperclip issues, flattens to ReconcileIssue[] with field-name fallbacks (id|key, state|status, body|description) and appends comments. Any failure → [] (tick no-ops, never throws).
  • route POST /api/mission-control/:companyId/reconcile-deliverables — board-auth trigger. For the Liaison heartbeat or a cron; safe anytime.
  • DELIVERABLE_EMIT.md (liaison-ext, non-frozen) — teaches agents to emit the block. code_change/db_migration still go through the Git Engineer PR flow, not this block.

Deliberate scope call: no always-on scheduler

The producer fetch hits the local Paperclip issues API, which I could not verify against a live instance in this environment. Rather than ship an always-on loop hitting an unverified endpoint on every install, the route makes it triggerable now. Wiring it to the Liaison heartbeat (which already polls issues) is a one-line follow-up once the issues API shape is confirmed live. The fetcher degrades gracefully in the meantime.

Tests

9 new, all green (test/reconcile-deliverables.test.ts):

  • parseArtifactBlock: header/body split, no-block→null, missing-title→null, kind defaults, header-only.
  • isTerminalState: terminal hints vs open states.
  • reconcileDeliverables: terminal+block → git-committed deliverable (asserts commitSha); non-terminal/no-block → skipped; idempotent (2nd run skips, no duplicate row).

Plus the 6 from #39 still green. tsc --noEmit = baseline (only pre-existing pool-b-health + vendored sdk).

🤖 Generated with Claude Code

@aimerdoux aimerdoux changed the base branch from feat/deliverable-git-writepath to main June 2, 2026 16:15
Slice 3 — makes the git-first write-path (PR #39) fire from completed
issues, so agents capture verifiable artifacts without a manual call.

- artifact-block.ts: parseArtifactBlock() extracts a fenced
  `wavex-artifact` block (kind/title/mime header + `---` + body) from
  issue text. Mirrors the wavex-contract block convention.
- reconcile-deliverables.ts:
  - reconcileDeliverables() — pure, testable: for each terminal-state
    issue carrying a block with no existing deliverable, calls
    writeDeliverable() (which git-commits the artifact). Idempotent;
    one deliverable per issue.
  - fetchCompletedIssuesForCompany() — defensive I/O glue: reads the
    paperclip-handoff, GETs the local Paperclip issues, flattens to
    ReconcileIssue[] (field-name fallbacks; comments appended so a
    block posted as a closing comment is still scanned). Any failure
    yields [] so a tick no-ops rather than throwing.
- route POST /api/mission-control/:companyId/reconcile-deliverables —
  board-auth trigger. Intended for the Liaison heartbeat or a cron;
  safe to call anytime.
- DELIVERABLE_EMIT.md (liaison-ext, non-frozen) — teaches agents to
  emit the block on completion. code_change/db_migration still go
  through the Git Engineer PR flow, not this block.

No always-on scheduler in this PR: the producer fetch hits the local
Paperclip issues API, which isn't verified against a live instance
here. The route makes it triggerable now; wiring it to the Liaison
heartbeat is a one-line follow-up once the issues API shape is
confirmed live.

Tests: 9 new (parse: 5, isTerminalState: 1, reconcile: 3 incl.
idempotency + git-commit assertion). All green alongside Slice 1+2's 6.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aimerdoux aimerdoux force-pushed the feat/deliverable-autoproducer branch from fe2fd09 to 968a84a Compare June 2, 2026 16:17
@aimerdoux aimerdoux merged commit a858d0f into main Jun 2, 2026
@aimerdoux aimerdoux deleted the feat/deliverable-autoproducer branch June 2, 2026 16:19
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