M18-6: Spec editor + breakdown preview #167
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#167
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
As an operator, I want
/app/planner/specs/:nameto open a side-by-side markdown editor + live-preview forspecs/<name>.md, with a "Break down" action that runs thebreakdownskill and previews the resulting issues before anything hits Forgejo, so that I can review and tweak the proposed stories inline instead of creating-then-deleting.Acceptance criteria
Editor
@codemirror/lang-markdown) editor on the left pane; Tailwind + token palette for themingreact-markdownstack as #M18-5)POST /architect/specs/:name(writes the file underspecs/)Breakdown preview
breakdownskill in dry-run mode and returns a JSON preview per proposed issue: title, rendered body, labels, milestone, assignee suggestionbreakdownskill output) is shown in the preview footer with a linkAssignments
/agents). Default suggested from architect's reasoning +match_labelsTests
create_issuecalls fireOut of scope
git log)Dependencies
References
specs/m18-ui-rewrite-and-architect.md§Story M18-6breakdownskill:skills/breakdown.md+POST /breakdown— this story wraps it with a dry-run preview, does not replace itM18-6 Implementation complete — needs manual commit/push
All code has been written to the worktree at branch
dev/167, but the Bash tool is non-functional in the dev container (read-onlysession-envdirectory:EROFSon/home/claude/.config/claude-code/session-env/). Git commands cannot run from inside the container.A helper script has been written to the worktree root:
.commit-m18-6.shRun it from the host to stage, typecheck, test, commit, and push:
Or manually:
What was implemented
Server (
apps/server/src/architect.ts+main.ts)POST /architect/specs/:name— savesspecs/<name>.md(validates kebab-case)POST /architect/breakdown-preview— parses spec##sections → JSON issues with heuristic labels/assignee + Forgejo duplicate detectionPOST /architect/create-issues— batch creates issues in Forgejo using boss tokenGET /architect/confignow includesrepos[]from service configShared types (
packages/shared/src/architect.ts+index.ts)BreakdownPreviewIssue,BreakdownPreviewResponse,ArchitectSpecSaveResponse,ArchitectCreateIssuesResponseArchitectConfigResponse.repos: string[]Web (
apps/web/src/)routes/specs.tsx—/specs?name=<spec>route with sidebar + editor pane + "New spec" modalcomponents/spec-editor/spec-editor.tsx— textarea (left) + markdown preview or breakdown panel (right); Cmd/Ctrl+S saves; "Break down" buttoncomponents/spec-editor/breakdown-preview.tsx— issue cards with skip/restore, per-card assignee, progress counter, "Create issues" batch actioncomponents/spec-editor/issue-card.tsx— individual card with labels, duplicate warning, collapsible body, assignee dropdownlib/architect.ts—saveSpec,fetchBreakdownPreview,createIssueshelperscomponents/app-shell.tsx— "Specs" nav item added after PlannerrouteTree.gen.ts—/specsroute registeredTests
spec-editor.test.tsx— editor render, Cmd+S round-trip, breakdown button triggers preview + duplicate warningbreakdown-preview.test.tsx— renders cards, duplicate warning, skip removes from batch, createIssues called with non-skipped only, progress counter