skills/architect-review/SKILL.md
Post-implementation sign-off: Mode F (GitHub feature:<slug> — verify, close issues, docs on PR) or Mode B (.plan — review, docs, archive_plan).
npx skillsauth add roborew/opencode architect-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Hard Rules live in the architect agent markdown; this skill adds protocol detail for Mode F (GitHub-first) and Mode B (legacy
.plan). Non-negotiables—scope, scribe handoff, developer delegation for gh/git on feature branch—come from the agent.
Do not narrate the mode switch. Do not describe what you are about to do.
| Signal | Mode |
|--------|------|
| feature:<slug> handoff, orchestrate queue exhausted, impl option 5 with slug + PR URL, or user asks GitHub feature sign-off | Mode F |
| Explicit executed path .plan/<type>.<slug>.md (orchestrate ran on that artifact) | Mode B |
| Ambiguous (both slug and .plan mentioned) | Ask once: sign-off from GitHub issues (feature:<slug>) or local plan file? |
| New feature planning | Load architect-plan instead |
For new feature planning or plan-type selection, load architect-plan instead of this skill.
| Role | Responsibility | Writes? |
|------|----------------|--------|
| Architect | Mode selection; data collection; Task coordination; doc-scope human gate (Mode F) | No — read-only for app source |
| review | Sign-off vs remediation | No — read-only |
| document | Generates changelog/guides/architecture content | No — read-only |
| scribe | Writes .plan updates and doc markdown | Yes — docs/plan paths only |
| developer | gh issue transitions/close/comments; docs-only git add / commit / push on feature branch (Mode F Phase 2) | Yes — delegated only |
You may invoke: review, document, scribe, and developer (minimal load) for Mode F issue closure and doc commits. Do not invoke frontend-dev, developer for product code, or orchestrate during sign-off—user starts a new orchestrate session for remediation execution.
Remediation (both modes): Prefer to-issues on GitHub paths; .plan/review.<slug>.md via scribe only if user insists on legacy sidecar.
.plan updates and docs markdown on disk.SCRIBE_FAILED, trust the write for planning flows. Mode F / Mode B sign-off docs: always verify on disk (step 8) before Tasking developer for git or declaring Phase 2 complete.archive_plan is blocking on sign-off (see Mode B step 6). Mode F: skip archive_plan when execution was GitHub-only; state No archive_plan: issue-backed execution only. If a .plan was also executed, run archive_plan after Phase 2 (same as Mode B step 6).Brevity / formatting: Concise headings, tables, and keyed lists only; deltas only when repeating status to the user. When asking the user for a choice or handing work between agents, use a table with the exact target (feature:<slug>, PR, artifact path) and the exact prompt/input to paste next.
Use when signing off feature:<slug> vs PRD/tickets (no .plan/feature.* required). One architect session with a required pause between Phase 1 and the doc-scope question.
OC="${OPENCODE_CONFIG:-$HOME/.config/opencode}"
PRD: $SPEC_REPO/docs/prd/<slug>.md when SPEC_REPO is set
Issue scripts: $OC/skills/github-issue-run/lib/issue-state-transition.sh
Close helper: $OC/skills/architect-review/lib/mode-f-close-issues.sh
Architect bash gh and/or Task developer load: minimal:
gh issue list -l "feature:<slug>" --state all -L 200 --json number,title,url,labels,body,state
state:ready-for-review (or document exception in review context).gh pr list --head <branch> --json number,url,headRefName.$SPEC_REPO is set; parse opencode-task-yaml / legacy opencode-task-json per issue; collect verifier summaries and commit SHAs from issue comments.review)tickets[] entry for this repo maps to an issue (or recorded deferral).test_commands from issue meta are addressable in review.reviewInclude a Mode F context block:
execution_mode: github_feature_signoff
feature_slug: <slug>
prd_path: <path or N/A>
pr_url: <url>
issue_rollup: <summary or JSON>
completion_context: <orchestrate handoff>
| Verdict | Action |
|---------|--------|
| Needs changes | to-issues (preferred) or scribe .plan/review.<slug>.md if user insists; do not close issues; prompt new orchestrate session |
| Merge-ready | Proceed to ticket closure — do not write docs yet |
Task developer load: minimal with a start contract (Hard Rule #1 — bare “run this script” will be rejected). Prefer bundled close when all issues are ready.
Task prompt — issue closure (use any open feature:<slug> issue number from step 1):
load: minimal
execution_mode: github_issue_stage
issue_number: <n>
repo: <owner/name>
stage_id: mode-f-signoff-close
stage:
objective: Close all feature:<slug> issues that are state:ready-for-review
files: []
acceptance: mode-f-close-issues.sh exits 0; targeted issues are state:done and closed
test_commands:
- bash "$OC/skills/architect-review/lib/mode-f-close-issues.sh" "<slug>" "<pr_url_or_empty>"
commit_message: "chore(<slug>): architect Mode F issue closure"
Fallback per issue: issue-state-transition.sh <repo> <n> state:done, then gh issue close <n> --comment "Sign-off: <summary>. PR: <url>" — still wrap in the same github_issue_stage contract with updated test_commands.
Gate: Do not start Phase 2 until every accepted issue is state:done and closed (or deferral is explicit in review output).
Report to user with a compact Phase 1 complete table: feature slug, PR, closed issues, review verdict, deferrals, and the required doc-scope choice from step 6. Pause for doc scope.
Ask with this table-driven pattern:
## Documentation scope
| Field | Value |
|-------|-------|
| Feature | `<Display Name>` (`feature:<slug>`) |
| Required | `docs/changelog/<YYYY-MM-DD>-<slug>.md` |
| PR | `<pr_url>` |
| Option | Include? | Path |
|--------|----------|------|
| User guide | yes / no | `docs/guides/<slug>.md` |
| Architecture note | yes / no | `docs/architecture/<slug>.md` |
| README / .env.example | yes / no | `<specific paths>` |
Reply with the rows to include, for example: `guide: yes, architecture: no, README: no`.
documentexecution_mode: github_feature_signoff
feature_slug: <slug>
prd_path: <path>
doc_scope: changelog [, guide, architecture, ...]
issue_rollup + completion_context
artifact_path: <only if .plan was also executed>
scribe + verify on diskFor each doc in document output (Mode B paths):
docs/changelog/<date>-<slug>.md (required)docs/guides/<slug>.md, docs/architecture/<slug>.md, README.md, .env.example as selectedAfter each scribe call: retry once on SCRIBE_FAILED or missing file (below).
Verify (architect bash, before step 9): For every path scribe reported written:
test -f "docs/changelog/<date>-<slug>.md" && ls -la docs/changelog/<date>-<slug>.md
# repeat for each optional doc path
Collect the verified path list for step 9 files_to_change.
developer — commit docs to feature PRStart contract required — use github_issue_stage (same issue_number / repo as step 5). On the feature branch from handoff / feature-finish-pr.sh:
Task prompt — docs commit:
load: minimal
execution_mode: github_issue_stage
issue_number: <n>
repo: <owner/name>
stage_id: mode-f-signoff-docs
stage:
objective: Commit sign-off documentation to the feature branch and push
files: [<verified paths from step 8>]
acceptance: All listed doc files exist on disk, are committed, and pushed to origin on the feature branch
test_commands:
- test -f docs/changelog/<date>-<slug>.md
- git checkout <feature-branch>
- git add <verified paths>
- git commit -m "docs(<slug>): sign-off changelog and guides"
- git push origin HEAD
commit_message: "docs(<slug>): sign-off changelog and guides"
Docs-only commit; no product test re-run. If push fails, report branch and paths — do not claim Mode F complete.
No archive_plan: issue-backed execution only..plan was also executed: run Mode B step 6 (archive_plan) after step 9.Phase 2 complete message: Use a table with PR URL (including doc commit), closed issue list, doc paths written, archive status, and Next: review PR on GitHub and merge (human only). Do not use a paragraph recap.
Mode F is not complete until Phase 2 push succeeds or push failure is reported with manual next steps.
.plan review + documentation)When user reports orchestrate completed on a .plan artifact and verifier passed: review → documentation → archive_plan. Mode B is not finished until the plan file is renamed to *.completed.md or scribe reports SCRIBE_FAILED on archive after retry.
review with artifact_path and completion context..plan/review.<slug>.md; new orchestrate session — do not continue sign-off for execution.document with artifact path..env.example) as needed. If document returns no files, skip to step 6.test -f / ls per path; retry scribe once on miss; stop sign-off if files still missing.scribe with operation: archive_plan, source_path, target_path (.completed.md). Retry once on failure.Archived: <target_path> or failure), risks/deferrals, and exact next action.When Mode F also ran on a hybrid path, run Mode B step 6 after Mode F Phase 2.
tools
AI-powered code review using CodeRabbit CLI. Use only on explicit user request or when parent passes execution_mode orchestrate_coderabbit_gate. Do not run during orchestrated stage/issue work.
tools
Cross-repo companion to to-prd: after PRD frontmatter is filled, run bin/fanout <slug> from this spec repo to create child GitHub issues (one per ticket or legacy slice).
tools
Issue state machine — transition GitHub issue labels per docs/agents/triage-labels.md. Batch helpers via lib/triage.sh.
documentation
Synthesise a PRD from grill-me / research context, write docs/prd/<slug>.md, publish a GitHub issue with prd + state:ready-for-agent + feature:<slug>. Halt after publish — do not invoke fanout.