Auto-archive design specs when PRs finalize them #11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/spec-finalization"
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?
Finished design specs used to linger in the Design stage forever — the
spec would stay visible even after its implementation had shipped. This
PR makes them archive automatically: add a
Finalizes: 2026-04-05-foo.mdline to a PR's body, and when you createthe PR, orbit's webhook handler deletes the spec file from the PR branch
via the Forgejo contents API. The deletion becomes part of the feature
PR's diff, so the spec disappears atomically with the work that finalized
it.
Deletion, not a move to docs/archive
Git is already the archive — every byte is retrievable via
git log --followor Forgejo's commit browser forever. A second on-disklocation would be redundant maintenance.
Orbit-side, not AI-side
The design-folder guardrail (#2) blocks Claude from editing
design/outside a design session, but the guardrail only applies to Claude Code
tool calls. Orbit-the-server running in systemd calls the Forgejo API
directly and sidesteps the hook entirely. The guardrail stays unmodified.
Convention
A line in the PR body starting with
Finalizes:(case-insensitive), thenone or more comma-separated spec references. Accepts bare filenames
(
foo.md),specs/foo.md, ordesign/specs/foo.md— all normalize todesign/specs/<basename>. Basenames are validated against^[A-Za-z0-9._-]+\.md$to reject path traversal attempts and unexpectedextensions.
Also
Filters
README.mdout of the Design stage at thedesigns.Sourceboundary — the scaffold's placeholder was cluttering the list.
Known cuts
edited/synchronizeaction handling; onlyopened. To add aFinalizes:line after the PR exists, close and reopen.design-previewroute —once gone from HEAD, the preview 404s on that path. Forgejo's commit
browser remains the retrieval path.
arne referenced this pull request2026-04-05 21:49:23 +02:00
feat: automate design-spec finalization via PR webhookto Auto-archive design specs when PRs finalize them