Skip to content

66: [P0] Add user-approved spec and blueprint file artifacts#87

Merged
sandsower merged 3 commits intomainfrom
issue-66-lifecycle-artifacts
May 10, 2026
Merged

66: [P0] Add user-approved spec and blueprint file artifacts#87
sandsower merged 3 commits intomainfrom
issue-66-lifecycle-artifacts

Conversation

@sandsower
Copy link
Copy Markdown
Owner

@sandsower sandsower commented May 10, 2026

Summary

  • Add spec_approved and blueprint_approved artifact lifecycle action semantics.
  • Document prompt/auto artifact behavior, default paths, placeholders, and path safety rules.
  • Update spec/blueprint/kickoff/downstream skill protocols so artifact paths are produced and carried through handoff context.

Verification

  • python3 scripts/validate_skills.py
  • python3 scripts/check_skill_size_budgets.py
  • git diff --check
  • Cross-host agent smoke: python3 tests/agent-smoke/run.py gate ship-it --hosts claude,codex --timeout 900 --changed-only

Review

  • Local review found one kickoff handoff gap; fixed in 3b0b568.
  • Re-review passed.
  • Fresh-eyes passed.

Closes #66.

Summary by CodeRabbit

  • New Features

    • Planning artifacts: specs and blueprints can publish approved artifact files with configurable relative paths, placeholders, and prompt/auto approval behavior.
    • Artifact lifecycle actions: added explicit support and validation for artifact-type lifecycle actions on spec/blueprint approval, including non-blocking write semantics.
  • Documentation

    • Updated workflow, setup, and skill guides to document artifact action configuration, path templating rules, routing/handoff behavior, and validation notes.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 52ec045d-a679-4065-b7ed-a7e0393669da

📥 Commits

Reviewing files that changed from the base of the PR and between 3b0b568 and 9f09796.

📒 Files selected for processing (4)
  • .beislid/workflow-md-format.md
  • docs/configuration.md
  • skills/break-spec/SKILL.md
  • skills/implement/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/break-spec/SKILL.md

📝 Walkthrough

Walkthrough

This PR adds artifact lifecycle actions for spec_approved and blueprint_approved events, enabling users to write durable spec and blueprint files to the repository after approval. Changes span format specifications, setup interviews, skill execution logic, artifact passing through kickoff, and downstream consumption with configurable paths and approval behavior.

Changes

Artifact Lifecycle Actions for Spec and Blueprint

Layer / File(s) Summary
Lifecycle Action Schema & Validation
.beislid/workflow-md-format.md, .beislid/probe-semantics.md
Defines artifact lifecycle action shape with P0 event restrictions (kickoff_start CLI-only; spec_approved/blueprint_approved artifact-only), path templating with {feature}, {kind}, {ticket_id} placeholders, and doctor validation rules for configuration shape, approval values, and path constraints.
Configuration & Setup
docs/configuration.md, skills/setup/SKILL.md
Setup interviews configure planning artifact actions with event selection, default vs. custom .md template paths, prompt vs. auto-create behavior, and merge logic for existing lifecycle_actions blocks.
Spec Skill Artifact Execution
skills/spec/SKILL.md
Spec skill Step 6 finalizes approved spec as authoritative source; Step 7 executes spec_approved artifact actions with ordered execution, configurable approval, path resolution, and result recording returned in handoffs.
Blueprint Skill Artifact Execution
skills/blueprint/SKILL.md
Blueprint skill runs blueprint_approved artifact lifecycle actions after design approval, records artifact status/path, and returns them with approved design in handoffs.
Artifact Input Selection
skills/break-spec/SKILL.md, skills/implement/SKILL.md
Downstream skills prioritize explicit artifact paths from handoffs; fall back to searching plans/ directory when not provided.
Kickoff Orchestration
skills/kickoff/step-4-readiness.md, skills/kickoff/step-5-scope.md, skills/kickoff/step-6-blueprint.md, skills/kickoff/step-8-ticket-update.md
Kickoff steps carry spec and blueprint artifact status/paths through the flow, passing them to break-spec, blueprint, implement, and ticket update for proper context and handoffs.
Doctor Validation
skills/doctor/SKILL.md
Doctor validation includes artifact lifecycle action shape checking, path template constraints, approval-value rules, and soft-constraint warnings for artifacts and reserved events.
User Documentation
docs/skills.md, docs/workflows.md, docs/configuration.md
Skill catalog and routing rules document configured artifact lifecycle actions, default paths, and spec/blueprint behavior after approval; repo-aware orchestrators list updated.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant SpecSkill
  participant WorkflowConfig
  participant Repo
  participant Kickoff
  Client->>SpecSkill: finalize approved spec
  SpecSkill->>WorkflowConfig: load spec_approved actions
  SpecSkill->>SpecSkill: validate action shapes
  SpecSkill->>Client: prompt (if approval: prompt)
  alt approved or auto
    SpecSkill->>Repo: write artifact
    SpecSkill-->>Kickoff: return artifact status/path
  else skipped
    SpecSkill-->>Kickoff: return skipped/not_configured
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

  • sandsower/beislid#81: Introduces P0 kickoff_start CLI lifecycle actions and probe semantics; related to probe and lifecycle-actions foundation extended here.

Poem

🐰 I hop with ink and paths well-kept,

Approved specs saved where teams have stepped,
Prompts ask softly, auto-writes play nice,
Plans now live in repo, tidy as spice. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding P0 artifact support for user-approved spec and blueprint files, which matches the core objective of the changeset.
Linked Issues check ✅ Passed The PR implements all acceptance criteria from issue #66: enables workflow options for spec/blueprint artifacts, requires user approval prompts, produces predictable paths, and maintains backward compatibility.
Out of Scope Changes check ✅ Passed All changes directly support artifact lifecycle action implementation for spec/blueprint events; no unrelated modifications detected across documentation and skill files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-66-lifecycle-artifacts

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
docs/configuration.md (1)

168-170: ⚡ Quick win

Consider documenting explicit artifact result statuses.

The text defines behavior but not a concrete status vocabulary for existing-file/decline outcomes. Adding canonical statuses would reduce integration ambiguity for kickoff/ticket-update consumers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/configuration.md` around lines 168 - 170, Add a short canonical status
vocabulary to the configuration docs describing outcome values for artifact
writes and approvals (e.g., statuses such as "created", "skipped_exists",
"declined", "approved", "error") and show exactly when each is emitted by the
flows mentioned (spec -> spec_approved, blueprint -> blueprint_approved,
approval: prompt, approval: auto). Update the paragraph describing default paths
and parent-directory creation to state which status is returned for: newly
created files (created), when approval: auto skips because file exists
(skipped_exists), when a user rejects a prompt (declined), when an approval
completes (approved), and when an unexpected failure occurs (error); keep
terminology consistent with `{feature}`, `{kind}`, and `{ticket_id}`
placeholders and note that statuses are included in same-session handoff
context.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.beislid/workflow-md-format.md:
- Line 86: The documentation for lifecycle_actions leaves the CLI action
`approval` behavior undefined; update the spec for `lifecycle_actions` (and the
similar paragraph later around the second occurrence) to state a deterministic
default for CLI actions when `approval` is omitted — e.g., "CLI actions default
to `approval: prompt` (or choose `required` if preferred)"; explicitly mention
this applies to `events.kickoff_start.actions[]` and any other CLI-supporting
entries and show the chosen default (`prompt`/`required`/`auto`) and that it can
be overridden by setting `approval` on the action.

In `@docs/configuration.md`:
- Line 168: Change the phrase "creates a missing file without another prompt" to
use the compound modifier "auto-write" (e.g., `approval: auto` creates a missing
file via auto-write) so the doc uses consistent hyphenation; update the sentence
referencing `approval: auto` in the paragraph that also mentions `approval:
prompt`, `spec`/`spec_approved`, and `blueprint`/`blueprint_approved` to read
with "auto-write" (or a similar hyphenated phrasing) while preserving the
meaning that existing files are never overwritten.

In `@skills/break-spec/SKILL.md`:
- Line 12: The precedence logic in break-spec that picks a spec from an artifact
glob needs a tie-breaker: when resolving artifacts (after checking an explicit
handoff spec path), if the glob for plans/*-spec.md or plans/*-prd.md returns
multiple matches, do not auto-select—add a branch to surface an explicit user
prompt asking them to choose the correct file path (e.g., "Which spec file
should I use? [list matches]") and proceed with the selected path; ensure the
same multi-match prompt behavior applies to both plans/*-spec.md and
plans/*-prd.md checks and is used before falling back to tracker docs or session
spec content.

In `@skills/implement/SKILL.md`:
- Line 10: The selection logic for the primary design artifact is ambiguous when
multiple files exist under plans/; change the behavior in SKILL.md so that if
blueprint supplies an explicit design artifact path it is used, otherwise search
plans/ for files matching a deterministic ticket/feature slug (e.g., match
plans/<slug>-design.md to the task’s ticket/feature identifier) and if more than
one file matches, do not auto-pick — prompt the user to confirm the correct
artifact. Update the text that currently reads "read it as your primary input"
to specify deterministic slug matching and add a required confirmation step when
multiple candidates remain; reference the terms "blueprint", "design artifact
path", "plans/<feature>-design.md", and "ticket/feature slug" so the
implementation can locate and enforce this behavior.

---

Nitpick comments:
In `@docs/configuration.md`:
- Around line 168-170: Add a short canonical status vocabulary to the
configuration docs describing outcome values for artifact writes and approvals
(e.g., statuses such as "created", "skipped_exists", "declined", "approved",
"error") and show exactly when each is emitted by the flows mentioned (spec ->
spec_approved, blueprint -> blueprint_approved, approval: prompt, approval:
auto). Update the paragraph describing default paths and parent-directory
creation to state which status is returned for: newly created files (created),
when approval: auto skips because file exists (skipped_exists), when a user
rejects a prompt (declined), when an approval completes (approved), and when an
unexpected failure occurs (error); keep terminology consistent with `{feature}`,
`{kind}`, and `{ticket_id}` placeholders and note that statuses are included in
same-session handoff context.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e5699a0-957a-4eab-b25d-2cfec9ad5bc8

📥 Commits

Reviewing files that changed from the base of the PR and between c59961e and 3b0b568.

📒 Files selected for processing (15)
  • .beislid/probe-semantics.md
  • .beislid/workflow-md-format.md
  • docs/configuration.md
  • docs/skills.md
  • docs/workflows.md
  • skills/blueprint/SKILL.md
  • skills/break-spec/SKILL.md
  • skills/doctor/SKILL.md
  • skills/implement/SKILL.md
  • skills/kickoff/step-4-readiness.md
  • skills/kickoff/step-5-scope.md
  • skills/kickoff/step-6-blueprint.md
  • skills/kickoff/step-8-ticket-update.md
  • skills/setup/SKILL.md
  • skills/spec/SKILL.md

Comment thread .beislid/workflow-md-format.md Outdated
Comment thread docs/configuration.md Outdated
Comment thread skills/break-spec/SKILL.md Outdated
Comment thread skills/implement/SKILL.md Outdated
@sandsower sandsower merged commit 32479e2 into main May 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P0] Add user-approved spec and blueprint file artifacts

1 participant