P4: capture_work — braindump → decomposed issues → filed in gitea #44

Merged
christian merged 1 commits from p4/capture-work into p4/chat-writes 2026-07-09 02:17:53 +00:00
Owner

Stacked on #43 (shares the model bridge's tool-execute). Retarget to main once #43 merges.

The last big agent capability. In Capture, a rough braindump runs real big-model decomposition into a small, estimated issue set; you review/edit the labels and approve, and the issues are opened in gitea. This is the one place the big model earns its keep.

Core (@commitea/core)

  • capture-work: PROPOSE_ISSUES_TOOL + CAPTURE_SYSTEM; captureWork(complete, dump) forces one structured decomposition and returns validated issues; parseCaptureArgs drops blank titles + invalid est/p labels. ProposedIssue / CaptureProposal.
  • gitea client: createIssue({title, body?, labelIds?})POST /issues, normalized.

App

  • model bridge model:capture runs captureWork on the (loaded) big model.
  • gitea bridge gitea:createIssues opens each approved issue with its est/* + p/* labels (reusing #41's label-id resolver — zero-pollution, no invented labels).
  • Capture screen: a configured model → "Brew tickets" runs real capture, "Approve all" files the set; otherwise the scripted demo interview runs. Fixed a race — the brew handler re-checks model status at click time so a configured model never falls into the scripted path before status resolves.

Verified

108 core tests green (7 capture + createIssue), desktop typecheck clean, 14 fixture e2e green.

Gated live e2e against gemma-4-26b: the auth braindump → 3 real tickets"Resolve token refresh + session staleness" est/3d p/1, "Fix webhook double-firing" est/2d p/2, "Write auth setup docs" est/1d p/3 — reviewable + editable; Discard so the test files nothing (the createIssue POST is unit-tested). Screenshot in PR.

The three write tools now

apply_changes (#41) · propose_change via chat (#43) · capture_work (this). Remaining agent tool: record_directive → the pm-state ledger.

🤖 Generated with Claude Code

Stacked on #43 (shares the model bridge's tool-execute). Retarget to `main` once #43 merges. The last big agent capability. In **Capture**, a rough braindump runs real **big-model decomposition** into a small, estimated issue set; you review/edit the labels and approve, and the issues are **opened in gitea**. This is the one place the big model earns its keep. ## Core (`@commitea/core`) - **capture-work**: `PROPOSE_ISSUES_TOOL` + `CAPTURE_SYSTEM`; `captureWork(complete, dump)` forces one structured decomposition and returns validated issues; `parseCaptureArgs` drops blank titles + invalid est/p labels. `ProposedIssue` / `CaptureProposal`. - **gitea client**: `createIssue({title, body?, labelIds?})` → `POST /issues`, normalized. ## App - model bridge **`model:capture`** runs `captureWork` on the (loaded) big model. - gitea bridge **`gitea:createIssues`** opens each approved issue with its `est/*` + `p/*` labels (reusing #41's label-id resolver — **zero-pollution**, no invented labels). - **Capture screen**: a configured model → "Brew tickets" runs real capture, "Approve all" files the set; otherwise the scripted demo interview runs. **Fixed a race** — the brew handler re-checks model status at click time so a configured model never falls into the scripted path before status resolves. ## Verified 108 core tests green (7 capture + `createIssue`), desktop typecheck clean, 14 fixture e2e green. **Gated live e2e** against `gemma-4-26b`: the auth braindump → **3 real tickets** — *"Resolve token refresh + session staleness"* est/3d p/1, *"Fix webhook double-firing"* est/2d p/2, *"Write auth setup docs"* est/1d p/3 — reviewable + editable; Discard so the test files nothing (the `createIssue` POST is unit-tested). Screenshot in PR. ## The three write tools now apply_changes (#41) · propose_change via chat (#43) · **capture_work (this)**. Remaining agent tool: `record_directive` → the pm-state ledger. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
christian added 1 commit 2026-07-09 02:09:05 +00:00
The last big agent capability. In the Capture screen, a rough braindump runs real
big-model decomposition into a small, estimated issue set; you review/edit the
labels and approve, and the issues are opened in gitea. This is the one place the
big model earns its keep (docs/agent-tools.md).

core (@commitea/core):
- capture-work: PROPOSE_ISSUES_TOOL + CAPTURE_SYSTEM; captureWork(complete, dump)
  forces a single structured decomposition and returns validated issues; parseCaptureArgs
  drops blank titles + invalid est/p labels. ProposedIssue / CaptureProposal.
- gitea client: createIssue({title, body?, labelIds?}) → POST /issues, normalized.

app:
- model bridge model:capture runs captureWork on the (loaded) big model.
- gitea bridge gitea:createIssues opens each approved issue with its est/* + p/*
  labels (reusing the #41 label-id resolver — zero-pollution, no invented labels).
- Capture screen: when a model is configured, "Brew tickets" runs real capture and
  "Approve all" files the set; otherwise the scripted demo interview runs. Fixed a
  race — the brew handler re-checks model status at click time so a configured
  model never falls into the scripted path before status resolves.

Verified: 108 core tests green (7 capture + createIssue added), desktop typecheck
clean, 14 fixture e2e green. Gated live e2e against gemma-4-26b: the auth braindump
→ 3 real tickets ("Resolve token refresh + session staleness" est/3d p/1, "Fix
webhook double-firing" est/2d p/2, "Write auth setup docs" est/1d p/3), reviewable
and editable; Discard so the test files nothing (createIssue POST is unit-tested).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
christian merged commit b64427c1a4 into p4/chat-writes 2026-07-09 02:17:53 +00:00
Sign in to join this conversation.
No description provided.