refactor(architect): remove /breakdown webhook, architect creates issues directly #1224
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/agent-hooks!1224
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/render-skill-address-review"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
/breakdownslash-command webhook path (skill file, flow YAML,dispatch_breakdownop,POST /api/breakdownroute, all capability wiring, ~1500 lines deleted)ARCHITECT_INTROsystem prompt — was claiming host-process /process.cwd()access; architect runs in a Docker container since #1133write_file,list_dir,create_label,list_repo_milestones,create_milestonetoFORGE_TOOLS_ALLOWLISTso architect can write spec files and create issues autonomouslyARCHITECT_INTROwith accurate container context + inline issue-authoring rules (dedup, label validation, native dependency registration viamcp__forge__add_blocker)Test plan
just qa— 3368 server tests pass, forge-mcp passmcp__forge__write_file, notWritetoolmcp__forge__create_issuedirectly, register blockers viamcp__forge__add_blocker🤖 Generated with Claude Code
The review-changes-requested.yml flow was dispatching with task: event.pr.title (bare PR title) — the agent received no instruction to read review comments or invoke the address-review skill. It would re-implement from scratch instead of fixing feedback. Add render_skill op (RenderSkillCapability) that calls renderPrompt against the author's agent type + skill name. The flow now renders the address-review template ({{pr_number}}, {{title}} interpolated) before dispatch. Falls back gracefully when skill is missing (found: false gate skips dispatch). Wire render_skill into live, shadow, and test capability bags. Regenerate flows.schema.json (33 ops → 32+1). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>The overall direction is correct — the ARCHITECT_INTRO was materially wrong and the breakdown infrastructure was a rube goldberg machine. The cleanup is thorough and the new
render_skillop is well-structured. Two issues need fixing before this lands.🔴 Blocker 1 —
architectProoffails for issue-creation-only sessionsFile:
apps/server/src/domain/dispatch/completion-proof.tsThe proof was updated from:
to:
Removing "Broken down" is correct — that marker was posted by the breakdown flow, which is gone. But the new workflow creates a new gap: when the operator asks architect to create issues from a spec, it will call
mcp__forge__create_issueN times, post a summary comment like "Created issues #100–#110", then stop. That summary comment contains neither "Dispatched" nor "Skill:", soarchitectProofreturnspassed: falseand the task is logged as a misroute.The old
/breakdownpath avoided this gap because the breakdown flow (not architect directly) posted the "Broken down" proof marker. The new direct-creation path has no equivalent.Fix options:
body.includes("Created")— and update the new ARCHITECT_INTRO to instruct architect to post a comment like "Created N issues: …" (which it would do naturally as a summary). The proof comment content:"Created \d+ issue"or simply"Created issue".body.includes("Created issue").Option 1 is the least invasive. The proof failure is a real operational regression — tasks that succeed functionally will be logged as incomplete, polluting the task dashboard and potentially triggering unwanted re-dispatches.
🟡 Blocker 2 — Verify
add_blocker(andcreate_issue/list_issues) are inFORGE_TOOLS_ALLOWLISTFile:
apps/server/src/domain/agent/mcp-config.tsThe new ARCHITECT_INTRO explicitly instructs:
The diff adds
write_file,list_dir,create_label,list_repo_milestones,create_milestone— all correct. Butcreate_issue,list_issues, andadd_blockerare not in the additions. Since the previous architect workflow never called these directly (breakdown dispatched code-lead to do it), they may not have been needed in the allowlist before.create_issueandlist_issuesare almost certainly in the existing allowlist (dev/reviewer use them).add_blockeris less certain — it may have been used only inside the breakdown skill, not by agents calling the allowlisted tools directly.Action required: Confirm
add_blockeris inFORGE_TOOLS_ALLOWLISTand add it if not. A quickgrep -n "add_blocker" apps/server/src/domain/agent/mcp-config.tswill confirm.🔵 Minor —
render_skill+review-changes-requested.yml: silent skip on missing skillFile:
flows/defaults/review-changes-requested.ymlThe dispatch step now gates on
steps.skill.outputs.found. If theaddress-reviewskill template isn't seeded for an agent, the dispatch is silently skipped — no task created, no error surfaced. The old behavior usedevent.pr.titleas a fallback, which was weak context but at least guaranteed a dispatch.This is probably intentional (dispatching with just a PR title as task is bad for the agent), but it's a silent behavior change. If a dev agent is misconfigured and missing the skill template, changes-requested reviews will stop triggering address-review tasks with no observable error.
Recommend adding a
commentstep after thedispatchstep that fires when!steps.skill.outputs.foundto surface the failure visibly (even just posting "⚠️ address-review skill not found for agent X — dispatch skipped" on the PR).🔵 Minor — unrelated changes bundled
Files:
apps/web/src/components/nav-sections.tsx,apps/web/src/components/sidebar-nav.test.tsxThe sessionStorage back-navigation fix is completely orthogonal to the architect refactor. It should ship in its own PR so blame history stays clean and it can be reverted independently if needed. Not a blocker, but worth separating.
✅ What's solid
process.cwd(), mentionedPOST /breakdown). The new one correctly describes the container context and gives precise MCP tool instructions.render_skillop: Well-designed, correct interface split betweenRenderSkillCapability(object input) andRenderSkillAdapterDeps(positional). Tests cover found/not-found/empty-vars paths.forgejo-api.tsPOST vs PUT fix: Real correctness fix — new files needPOST(no SHA), existing files needPUT. The error logging addition in the adapter is also welcome.shadow-capabilities.ts: Correctly falls through to live deps forrenderSkill(read-only) rather than stubbing it.Fix the proof marker and confirm the allowlist, then this is good to go.
b163cc2439addfa787f7