Skip to content

Add useblocks-vmodel preset (RST V-model as a preset, no core changes)#2

Merged
patdhlk merged 1 commit intomainfrom
useblocks/vmodel-preset
Apr 28, 2026
Merged

Add useblocks-vmodel preset (RST V-model as a preset, no core changes)#2
patdhlk merged 1 commit intomainfrom
useblocks/vmodel-preset

Conversation

@bburda
Copy link
Copy Markdown

@bburda bburda commented Apr 27, 2026

Summary

Re-implements the RST + sphinx-needs V-model workflow from #1 as a pure spec-kit preset. Zero changes to core. Drops a new directory under presets/useblocks-vmodel/ containing 9 command overrides, 6 RST templates, project-root scaffolding, and an idempotent bootstrap script.

How this relates to #1

#1 (useblocks/integration) proves the concept by modifying spec-kit core: a top-level --format rst flag, a parallel templates/commands-rst/ tree, _bootstrap_rst_project() in __init__.py, format-aware toggles in agents.py, extensions.py, presets.py, and the integration setups, plus mirrored bash and PowerShell scripts. ~4300 added lines, 46 files touched, currently CONFLICTING against main after upstream's 27-commit --ai → --integration rename, SkillsIntegration migration, and compose: replace|prepend|append|wrap preset composition strategies (PR github#2133) landed.

This PR uses those new composition strategies. Each of the nine V-model commands is declared in preset.yml with replaces: speckit.<name>, so when an agent runs /speckit-specify the preset resolver returns our RST prompt instead of the core Markdown one. No core code changes.

The two PRs are intentionally independent. #1 is not the base of this PR. They target the same use case via two different mechanisms:

#1 (integration branch) this PR (preset branch)
Mechanism Core flag (--format rst) + parallel commands-rst/ tree Preset with replaces: overrides via composition strategies
Diff vs upstream ~4300 added / 155 deleted across 46 files ~3000 added / 0 deleted across 22 new files
Files in src/specify_cli/ Modified Untouched
Upstream-mergeability Requires upstream to accept core changes Self-contained preset, no review surface in core
Status against current main CONFLICTING (27 commits behind) Clean (forks off latest main)

#1 stays open as the reference implementation that documents what the workflow actually does. The prompts originated there. This PR is the upstream-friendly path. After agreement that this preset path is preferred, #1 can be closed without losing the prompt content. It has been carried forward verbatim in this PR's commands/.

What is in

  • preset.yml: 9 command overrides (speckit.specify, plan, tasks, implement, clarify, analyze, checklist, constitution, taskstoissues), each replaces: the core command via the default replace strategy.
  • commands/: 9 RST-flavoured agent prompts. Each teaches V-model authoring (User Story, Requirement, Specification, Task plus Risk and Decision), self-validation via sphinx-build -b needs -W with up to 3 fix iterations, and the honest-unknowns rule ([NEEDS CLARIFICATION] markers inside directive bodies instead of fabricated SHOULD/MUST clauses).
  • templates/: 6 per-feature RST scaffolds (spec, plan, tasks, coverage, checklist, constitution).
  • scaffold/: 3 project-root files copied by bootstrap (ubproject.toml, conf.py, coverage.rst).
  • scripts/bash/bootstrap-vmodel.sh and scripts/powershell/bootstrap-vmodel.ps1: idempotent scaffolding helpers. The first command run (typically /speckit-specify or /speckit-constitution) instructs the agent to invoke this script. Existing project-root files are never overwritten.

What is out

Testing

End-to-end with claude -p --model sonnet --permission-mode bypassPermissions against a fresh project (specify init test --integration claude --no-git then specify preset add --dev presets/useblocks-vmodel):

  • /speckit-specify on a CSV bucket aggregator description created 21 needs with 0 schema warnings. 3 [NEEDS CLARIFICATION] markers were preserved (not invented). Bootstrap script ran (4 project-root files created).
  • /speckit-plan chained on the same project added another 17 needs for a total of 38 with 0 trace violations. Every REQ has at least one SPEC :satisfies: it. Every SPEC has at least one TC :verifies: it. Two open clarifications from spec phase resolved by DEC records. sphinx-build -b needs -W passes (build succeeded).

Test plan

  • Fresh specify init project, then specify preset add --dev presets/useblocks-vmodel.
  • Run /speckit-specify with any feature description. Confirm bootstrap creates ubproject.toml, conf.py, coverage.rst, .specify/config.toml.
  • Confirm specs/<feature>/spec.rst contains sphinx-needs directives and passes sphinx-build -b needs -W.
  • Run /speckit-plan and verify trace graph completeness via needs.json.
  • specify preset remove useblocks-vmodel reverts to core Markdown commands.

Known limitations

  • SkillsIntegration rewrites the rendered SKILL.md description from a hardcoded SKILL_DESCRIPTIONS dict in presets.py. The user-visible command description shows the core Markdown wording rather than the preset's V-model framing. The command body (the actual instructions the agent follows) is preserved verbatim, so behaviour is correct. A small upstream change to honour preset frontmatter would close this gap.
  • Empty-glob warnings from coverage.rst toctree fire on a fresh project with no specs yet. suppress_warnings = ["toc.empty_glob"] is set in conf.py but Sphinx 9.1's toctree warning does not pass type=, so the suppression is currently a no-op (documented intent). Agents handle these warnings as expected during the spec phase. Once any feature exists, the build is green.

@bburda bburda marked this pull request as ready for review April 27, 2026 13:30
Copilot AI review requested due to automatic review settings April 27, 2026 13:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a self-contained useblocks-vmodel preset that overrides core Spec Kit commands to generate reStructuredText (RST) artefacts compatible with sphinx-needs, including project-root scaffolding and bootstrap scripts—without modifying Spec Kit core.

Changes:

  • Introduces a new preset (preset.yml) that replaces: 9 core speckit.* commands with RST-oriented prompts.
  • Adds RST templates for spec/plan/tasks/coverage/checklist/constitution and project-root Sphinx/ubcode scaffolding.
  • Adds idempotent bootstrap scripts (bash + PowerShell) to scaffold required root files and .specify/config.toml.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
presets/useblocks-vmodel/preset.yml Declares the preset and command overrides via replaces:.
presets/useblocks-vmodel/README.md Documents installation, workflow, and ID/link conventions for the preset.
presets/useblocks-vmodel/commands/speckit.specify.md RST-based /speckit.specify prompt including sphinx-needs trace rules + bootstrap guidance.
presets/useblocks-vmodel/commands/speckit.plan.md RST-based /speckit.plan prompt producing plan.rst with SPEC/DEC/RISK/TC.
presets/useblocks-vmodel/commands/speckit.tasks.md RST-based /speckit.tasks prompt producing tasks.rst with TASK/TC links.
presets/useblocks-vmodel/commands/speckit.implement.md RST-based /speckit.implement prompt for executing tasks and updating statuses.
presets/useblocks-vmodel/commands/speckit.clarify.md RST-based /speckit.clarify prompt for resolving [NEEDS CLARIFICATION] markers.
presets/useblocks-vmodel/commands/speckit.analyze.md RST-based /speckit.analyze prompt for read-only analysis using needs.json.
presets/useblocks-vmodel/commands/speckit.checklist.md RST checklist-generation prompt (non-sphinx-needs artefact).
presets/useblocks-vmodel/commands/speckit.constitution.md RST constitution authoring prompt (plain RST, no sphinx-needs directives).
presets/useblocks-vmodel/commands/speckit.taskstoissues.md Converts .. task:: directives into GitHub issues with write-back guidance.
presets/useblocks-vmodel/templates/spec-template.rst RST template for feature specs (US/REQ/RISK/DEC/TC).
presets/useblocks-vmodel/templates/plan-template.rst RST template for implementation plans (SPEC/DEC/RISK/TC).
presets/useblocks-vmodel/templates/tasks-template.rst RST template for task breakdown + test cases.
presets/useblocks-vmodel/templates/coverage-template.rst RST template for coverage tables/needflow rendering.
presets/useblocks-vmodel/templates/checklist-template.rst RST template for checklists using checkbox-style list items.
presets/useblocks-vmodel/templates/constitution-template.rst RST template for project constitution (principles + governance).
presets/useblocks-vmodel/scaffold/ubproject.toml ubcode/sphinx-needs types, links, and ID regex configuration.
presets/useblocks-vmodel/scaffold/conf.py Sphinx config wiring needs_from_toml, exclude patterns, and warning suppression.
presets/useblocks-vmodel/scaffold/coverage.rst Project-root master doc aggregating specs and rendering coverage tables/needflow.
presets/useblocks-vmodel/scripts/bash/bootstrap-vmodel.sh Idempotent bootstrapper to copy root scaffolding + set .specify/config.toml.
presets/useblocks-vmodel/scripts/powershell/bootstrap-vmodel.ps1 PowerShell bootstrapper equivalent to the bash script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread presets/useblocks-vmodel/templates/tasks-template.rst Outdated
Comment thread presets/useblocks-vmodel/templates/coverage-template.rst Outdated
Comment thread presets/useblocks-vmodel/commands/speckit.implement.md Outdated
Comment thread presets/useblocks-vmodel/commands/speckit.clarify.md Outdated
Comment thread presets/useblocks-vmodel/commands/speckit.analyze.md Outdated
Comment thread presets/useblocks-vmodel/templates/plan-template.rst Outdated
Comment thread presets/useblocks-vmodel/scaffold/coverage.rst Outdated
Comment thread presets/useblocks-vmodel/commands/speckit.specify.md Outdated
Comment thread presets/useblocks-vmodel/README.md Outdated
@bburda bburda self-assigned this Apr 27, 2026
@bburda bburda requested review from Copilot and patdhlk April 27, 2026 13:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread presets/useblocks-vmodel/scaffold/coverage.rst Outdated
Comment thread presets/useblocks-vmodel/templates/coverage-template.rst Outdated
Comment thread presets/useblocks-vmodel/commands/speckit.constitution.md Outdated
Comment thread presets/useblocks-vmodel/README.md
Comment thread presets/useblocks-vmodel/README.md Outdated
Comment thread presets/useblocks-vmodel/commands/speckit.specify.md Outdated
Comment thread presets/useblocks-vmodel/commands/speckit.taskstoissues.md Outdated
…odel output

Replaces every core /speckit.* command with an RST variant that emits
sphinx-needs directives carrying the full V-model trace graph (User Story,
Functional Requirement, Architectural Specification, Implementation Task,
plus Risk and Decision). Build correctness is validated by
`sphinx-build -b needs -W` after every command.

Implementation is a pure preset, zero core changes. The preset ships
9 command overrides via `replaces:`, 6 per-feature RST templates, 3
project-root scaffolding files (ubproject.toml, conf.py, coverage.rst),
and an idempotent bootstrap script (bash + PowerShell mirrors) that
copies scaffolding to the project root on first command run.

Validated end-to-end with claude -p sonnet:
- /speckit-specify produces 21 needs, 0 schema warnings, complete
  US/REQ/RISK/TC graph with [NEEDS CLARIFICATION] markers preserved.
- /speckit-plan chained on top reaches 38 total needs, 0 trace
  violations. Every REQ satisfied by SPEC, every SPEC verified by TC,
  decisions resolve open clarifications from the spec phase.

Tested against spec-kit 0.8.2.dev0. The preset depends on the
composition strategies introduced in PR github#2133.
@bburda bburda force-pushed the useblocks/vmodel-preset branch from 532f186 to 5c47fc6 Compare April 27, 2026 16:37
@patdhlk patdhlk merged commit f091f73 into main Apr 28, 2026
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.

3 participants