specpro-cli 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- specpro_cli/__init__.py +16 -0
- specpro_cli/assets/commands/specpro.analyze.md +1102 -0
- specpro_cli/assets/commands/specpro.checklist.md +335 -0
- specpro_cli/assets/commands/specpro.clarify.md +581 -0
- specpro_cli/assets/commands/specpro.constitution.md +488 -0
- specpro_cli/assets/commands/specpro.feature.md +115 -0
- specpro_cli/assets/commands/specpro.implement.md +1881 -0
- specpro_cli/assets/commands/specpro.manual-test.md +206 -0
- specpro_cli/assets/commands/specpro.plan.md +3284 -0
- specpro_cli/assets/commands/specpro.qc.md +1489 -0
- specpro_cli/assets/commands/specpro.scenarios.md +154 -0
- specpro_cli/assets/commands/specpro.specify.md +1449 -0
- specpro_cli/assets/commands/specpro.status.md +863 -0
- specpro_cli/assets/commands/specpro.tasks.md +1207 -0
- specpro_cli/assets/commands/specpro.test-implement.md +462 -0
- specpro_cli/assets/commands/specpro.test-plan.md +383 -0
- specpro_cli/assets/commands/specpro.user-manual.md +178 -0
- specpro_cli/assets/scripts/bash/check-anti-coupling.sh +293 -0
- specpro_cli/assets/scripts/bash/check-prerequisites.sh +176 -0
- specpro_cli/assets/scripts/bash/common.sh +88 -0
- specpro_cli/assets/scripts/bash/create-new-feature.sh +336 -0
- specpro_cli/assets/scripts/bash/qc-auto-fix.sh +121 -0
- specpro_cli/assets/scripts/bash/setup-plan.sh +60 -0
- specpro_cli/assets/scripts/bash/verify-cumulative-records.sh +203 -0
- specpro_cli/assets/scripts/bash/verify-deliverables-tracked.sh +147 -0
- specpro_cli/assets/scripts/bash/verify-deployment.sh +239 -0
- specpro_cli/assets/scripts/bash/verify-frontmatter-yaml.sh +63 -0
- specpro_cli/assets/scripts/bash/verify-ledger.sh +376 -0
- specpro_cli/assets/scripts/bash/verify-shapes.sh +1082 -0
- specpro_cli/assets/scripts/git-hooks/pre-commit +243 -0
- specpro_cli/assets/scripts/install-git-hooks.sh +67 -0
- specpro_cli/assets/scripts/powershell/check-anti-coupling.ps1 +249 -0
- specpro_cli/assets/scripts/powershell/check-prerequisites.ps1 +148 -0
- specpro_cli/assets/scripts/powershell/common.ps1 +95 -0
- specpro_cli/assets/scripts/powershell/create-new-feature.ps1 +229 -0
- specpro_cli/assets/scripts/powershell/qc-auto-fix.ps1 +110 -0
- specpro_cli/assets/scripts/powershell/setup-plan.ps1 +61 -0
- specpro_cli/assets/scripts/powershell/verify-cumulative-records.ps1 +133 -0
- specpro_cli/assets/scripts/powershell/verify-deliverables-tracked.ps1 +112 -0
- specpro_cli/assets/scripts/powershell/verify-deployment.ps1 +278 -0
- specpro_cli/assets/scripts/powershell/verify-frontmatter-yaml.ps1 +56 -0
- specpro_cli/assets/scripts/powershell/verify-ledger.ps1 +383 -0
- specpro_cli/assets/scripts/powershell/verify-shapes.ps1 +978 -0
- specpro_cli/assets/templates/agent-context-template.md +49 -0
- specpro_cli/assets/templates/assumptions-template.md +248 -0
- specpro_cli/assets/templates/checklist-template.md +40 -0
- specpro_cli/assets/templates/clarifications-template.md +155 -0
- specpro_cli/assets/templates/constitution-template.md +50 -0
- specpro_cli/assets/templates/feature-spec-template.md +66 -0
- specpro_cli/assets/templates/plan-overview-template.md +150 -0
- specpro_cli/assets/templates/plan-template.md +387 -0
- specpro_cli/assets/templates/protocol-golden-bytes-guide.md +195 -0
- specpro_cli/assets/templates/requirements-template.md +356 -0
- specpro_cli/assets/templates/spec-template.md +267 -0
- specpro_cli/assets/templates/tasks-template.md +252 -0
- specpro_cli/assets/templates/test-tasks-template.md +174 -0
- specpro_cli/cli/__init__.py +5 -0
- specpro_cli/cli/cmd_init.py +416 -0
- specpro_cli/cli/cmd_remove.py +122 -0
- specpro_cli/cli/entry.py +181 -0
- specpro_cli/integrations/__init__.py +36 -0
- specpro_cli/integrations/base.py +601 -0
- specpro_cli/integrations/claude/__init__.py +101 -0
- specpro_cli/integrations/copilot/__init__.py +153 -0
- specpro_cli/integrations/cursor_agent/__init__.py +51 -0
- specpro_cli/integrations/gemini/__init__.py +44 -0
- specpro_cli/integrations/opencode/__init__.py +48 -0
- specpro_cli/integrations/qodercli/__init__.py +54 -0
- specpro_cli/integrations/registry.py +88 -0
- specpro_cli/packaged/__init__.py +5 -0
- specpro_cli/packaged/sync.py +106 -0
- specpro_cli-0.1.0.dist-info/METADATA +117 -0
- specpro_cli-0.1.0.dist-info/RECORD +76 -0
- specpro_cli-0.1.0.dist-info/WHEEL +4 -0
- specpro_cli-0.1.0.dist-info/entry_points.txt +2 -0
- specpro_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate or update the User Scenarios view (specs/scenarios.md) — the full scenario set from spec.md in one readable pass, for a human checking requirements during development
|
|
3
|
+
writes:
|
|
4
|
+
# This command's write surface: only what it produces AS THE PRODUCER of that
|
|
5
|
+
# (artifact, unit) pair. A write this command makes on a non-producer path is a
|
|
6
|
+
# boundary violation by definition (FR-051) and MUST NOT be declared here.
|
|
7
|
+
# The full ownership map is the UNION of every command's writes: block.
|
|
8
|
+
- artifact: specs/scenarios.md
|
|
9
|
+
unit: "whole file - every User Story (Independent Test + Acceptance Scenarios) plus the provenance block, rebuilt in full each run"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## User Input
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
$ARGUMENTS
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
19
|
+
|
|
20
|
+
**Rerun safety — fully derived, rebuilt in full on every run** ⚠️ [settled 2026-09-16]:
|
|
21
|
+
|
|
22
|
+
`specs/scenarios.md` is a **pure projection of `spec.md`**: every line in it is derived, and nothing in it is authored by hand or evolved across runs. Rebuilding it wholesale therefore destroys no work of the user's — which is why this command **does not** take the shared incremental rule that governs the spec-class artifacts (*detect the artifact; absent → initial, present → incremental; overwriting requires explicit AND re-confirmed intent*). That rule exists to protect edits the detection check cannot see; here there are none to protect.
|
|
23
|
+
|
|
24
|
+
**What must survive every run** is the provenance block — `Last updated`, `Source`, `Generated by` — so that a reader can always tell how old the projection is and what it was derived from.
|
|
25
|
+
|
|
26
|
+
**Artifact Language Rule** 🌐 [CRITICAL — applies to ALL generated content]:
|
|
27
|
+
- **Prose content** (scenario text, preconditions, expected outcomes, notes) follows the project's **Artifact Language** setting — from `specs/constitution.md` → **Artifact Language** field; default `en` when absent
|
|
28
|
+
- **Structural anchors are ALWAYS English**, regardless of the artifact language: section headings from the template below, User Story / FR IDs, scenario type labels (Happy Path / Error / Edge / Permission), and the meta labels (`Last updated` / `Source` / `Generated by`)
|
|
29
|
+
- **Entry field labels are structural anchors too** (`Given`, `When`, `Then`, `Verification Steps`, `Related Requirements`) — never translated, even when the surrounding prose is not English. They exist to be **searched**: an entry's fields must be greppable across artifacts and projects, and a translated label silently drops out of every consumer's scan.
|
|
30
|
+
- Rationale: fixed anchors keep artifacts machine-parseable across specpro commands and keep instructions ↔ artifacts aligned for review
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Scope Resolution 🆕 (FR-063 / T050 · v0.23)
|
|
34
|
+
|
|
35
|
+
1. **作用域判定**: 当前工作目录位于 `specs/fNNN-简称/` 内 ⇒ **feature 作用域**(读写范围 = 本 feature 目录,由 `check-prerequisites.sh` 的作用域感知解析);位于仓库根或 `specs/` 根 ⇒ **母作用域**(读写母规格链)。feature 作用域内 MUST NOT 写母产物——唯一例外:**发现登记**(台账路由,`[specify]`/`[plan]` 分区)。
|
|
36
|
+
2. **新会话首次执行**: 若 `specs/features.md` 存在且含 `active` 行、而用户未指明作用域 ⇒ **询问用户**在母作用域还是某个 feature 内工作,MUST NOT 自行挑选。
|
|
37
|
+
3. 本命令的产物路径随之解析:feature 作用域下落 `<feature 目录>/`,母作用域下落 `specs/`。
|
|
38
|
+
|
|
39
|
+
## Purpose
|
|
40
|
+
|
|
41
|
+
Create or update `specs/scenarios.md` — the **User Scenarios view**: the full scenario set (Independent Test + Acceptance Scenarios, verbatim from `spec.md`) in one readable pass, with the spec's technical apparatus (FR tables, Lifecycle markers, quantified-requirement sections) left out.
|
|
42
|
+
|
|
43
|
+
**Who reads it** ⚠️: a **human, checking requirements during development** — "what is this system supposed to do, along which paths?" It is not an input to any command's mechanics:
|
|
44
|
+
|
|
45
|
+
- Manual scenario execution lives in `specs/manual-test-tasks.md` (via `/specpro-manual-test`)
|
|
46
|
+
- End-user acceptance lives in `specs/acceptance.md` (generated only at the acceptance gate)
|
|
47
|
+
- Coverage obligations live in `specs/test-tasks.md` (via `/specpro-test-plan`)
|
|
48
|
+
|
|
49
|
+
**It carries no authored content** ⚠️: every line is derived from `spec.md`, and every run rebuilds it in full. It is **not a second home for requirements** — nothing here may be invented, and nothing added here survives. A requirement that exists only in this file does not exist; `spec.md` remains the single carrier.
|
|
50
|
+
|
|
51
|
+
**Why this is a command of its own**: `spec.md` keeps evolving, so the checking view must be refreshable **on demand** without re-running the whole planning stage. `/specpro-plan` generates it once — on its initial run only — so the planning artifact set is complete out of the box; from then on this command owns it, and `/specpro-plan` never touches it again.
|
|
52
|
+
|
|
53
|
+
## Execution Steps
|
|
54
|
+
|
|
55
|
+
### 1. Setup
|
|
56
|
+
|
|
57
|
+
Run `.specpro/scripts/bash/check-prerequisites.sh --json` from repo root and parse for `FEATURE_DIR` and `AVAILABLE_DOCS`. All paths must be absolute.
|
|
58
|
+
|
|
59
|
+
### 2. Load the scenario source
|
|
60
|
+
|
|
61
|
+
Read `spec.md` and extract, for each User Story:
|
|
62
|
+
- the **Independent Test** (verbatim)
|
|
63
|
+
- every **Acceptance Scenario** (Given-When-Then, verbatim)
|
|
64
|
+
- the scenario type of each: **Happy Path / Error / Edge / Permission**
|
|
65
|
+
- the FRs each scenario relates to
|
|
66
|
+
|
|
67
|
+
**`spec.md` is the ONLY source.** Do not invent scenarios that are not in it, and do not carry over scenarios the spec no longer contains.
|
|
68
|
+
|
|
69
|
+
### 3. Scope: always the whole file
|
|
70
|
+
|
|
71
|
+
**Every run processes every User Story in `spec.md`.** This document is a projection of the spec's User Scenarios and has no incremental mode — a run rebuilds it in full from the current spec.
|
|
72
|
+
|
|
73
|
+
Two consequences, accepted deliberately:
|
|
74
|
+
|
|
75
|
+
- A User Story **removed** from `spec.md` disappears from the output. There are no `[DELETED]` tombstones: tombstones exist to preserve an audit trail of *decisions*, and a derived view records no decisions of its own.
|
|
76
|
+
- Text anyone edited by hand in `scenarios.md` **is lost**. That is the intended trade: the file is a view and the spec is the source of truth. A durable, hand-maintained variant belongs somewhere other than this file.
|
|
77
|
+
|
|
78
|
+
### 4. Generate / update the file
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
# User Scenarios
|
|
82
|
+
|
|
83
|
+
> **Last updated**: [DATE]
|
|
84
|
+
> **Source**: spec.md → User Scenarios & Testing
|
|
85
|
+
> **Generated by**: specpro.scenarios
|
|
86
|
+
|
|
87
|
+
## Overview
|
|
88
|
+
|
|
89
|
+
[What this document is for, and the fact that it is a presentation layer — the execution
|
|
90
|
+
documents are manual-test-tasks.md and acceptance.md]
|
|
91
|
+
|
|
92
|
+
**Total Scenarios**: N
|
|
93
|
+
**User Stories**: M
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## US<N> - [Title] (P<N>)
|
|
98
|
+
|
|
99
|
+
[Independent Test, verbatim from spec.md]
|
|
100
|
+
|
|
101
|
+
#### Scenario N: [Name] ([Type])
|
|
102
|
+
|
|
103
|
+
**User Story**: USN - [Title]
|
|
104
|
+
|
|
105
|
+
**Given** [Preconditions]:
|
|
106
|
+
- [System state before the action]
|
|
107
|
+
|
|
108
|
+
**When** [Action]:
|
|
109
|
+
- [User action or event]
|
|
110
|
+
|
|
111
|
+
**Then** [Expected Outcome]:
|
|
112
|
+
- [Observable result]
|
|
113
|
+
|
|
114
|
+
**Verification Steps**:
|
|
115
|
+
1. [Concrete step]
|
|
116
|
+
|
|
117
|
+
**Related Requirements**:
|
|
118
|
+
- [FR-xxx: description]
|
|
119
|
+
|
|
120
|
+
**Notes**:
|
|
121
|
+
- [Constraints or follow-ups]
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Scenario type coverage** — per User Story, aim for the distribution `spec.md` itself targets: Happy Path 1–2 · Error 2–3 · Edge 1–2 · Permission 1–2. Warn (do not fail) when a type is missing, or when a story has fewer than 5 or more than 9 scenarios.
|
|
127
|
+
|
|
128
|
+
### 5. Validate
|
|
129
|
+
|
|
130
|
+
1. Count the scenarios written, in total and per User Story
|
|
131
|
+
2. Check the type distribution across the four types
|
|
132
|
+
3. Confirm every scenario carries a `User Story` line and at least one `Related Requirements` entry
|
|
133
|
+
4. Confirm Given-When-Then consistency
|
|
134
|
+
5. Confirm the provenance block is present and stamped with this run's date
|
|
135
|
+
|
|
136
|
+
### 6. Report
|
|
137
|
+
|
|
138
|
+
```markdown
|
|
139
|
+
## scenarios.md Summary
|
|
140
|
+
|
|
141
|
+
**Total Scenarios**: N
|
|
142
|
+
**User Stories**: M
|
|
143
|
+
|
|
144
|
+
**Scenario Type Breakdown**: Happy Path X · Error Y · Edge Z · Permission W
|
|
145
|
+
**Rebuilt in full**: all M User Stories (this command has no incremental mode)
|
|
146
|
+
**Dropped — no longer in spec.md**: [US list, or "—"]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Boundaries
|
|
150
|
+
|
|
151
|
+
- **This command writes exactly one file**: `specs/scenarios.md`. It never edits `spec.md`, `plan.md`, `tasks.md`, or any test artifact.
|
|
152
|
+
- **It does not judge scenario quality.** Missing scenarios, weak Given-When-Then, or requirement gaps are findings for `/specpro-analyze`, not for this command.
|
|
153
|
+
- **It does not execute anything.** Scenario execution belongs to `/specpro-manual-test` (the manual layer) and `/specpro-test-plan` (the automated layers).
|
|
154
|
+
- **Staleness is a symptom, not a duty.** A `scenarios.md` older than `spec.md` is expected when nobody has run this command — the consumer that reads it decides what to do about that; this command only makes refreshing cheap.
|