Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletions .github/workflows/community-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,8 @@ jobs:
test -f .specify/presets/workflow-preset/.composed/speckit.tasks.md

for arch_skill in \
speckit-arch-scenario-generate \
speckit-arch-logical-generate \
speckit-arch-process-generate \
speckit-arch-development-generate \
speckit-arch-physical-generate \
speckit-arch-full-generate \
speckit-arch-full-reverse \
speckit-arch-scenario-reverse \
speckit-arch-logical-reverse \
speckit-arch-process-reverse \
speckit-arch-development-reverse \
speckit-arch-physical-reverse; do
speckit-arch-generate \
speckit-arch-reverse; do
test -f ".claude/skills/$arch_skill/SKILL.md"
done
for preview_skill in \
Expand Down Expand Up @@ -171,11 +161,9 @@ jobs:
/tmp/specify-community-smoke-venv/bin/specify extension add "$GITHUB_WORKSPACE/extensions/$extension_id" --dev
case "$extension_id" in
arch)
test -f .claude/skills/speckit-arch-scenario-generate/SKILL.md
test -f .claude/skills/speckit-arch-full-generate/SKILL.md
test -f .claude/skills/speckit-arch-full-reverse/SKILL.md
test -f .claude/skills/speckit-arch-scenario-reverse/SKILL.md
grep -q "scenario view" .claude/skills/speckit-arch-scenario-generate/SKILL.md
test -f .claude/skills/speckit-arch-generate/SKILL.md
test -f .claude/skills/speckit-arch-reverse/SKILL.md
grep -q "architecture planning contract" .claude/skills/speckit-arch-generate/SKILL.md
;;
preview)
for preview_skill in \
Expand Down Expand Up @@ -212,4 +200,4 @@ jobs:

/tmp/specify-community-smoke-venv/bin/specify preset resolve plan-template | tee resolve-plan-template.txt
grep -q "workflow-preset" resolve-plan-template.txt
grep -q "Composition chain" resolve-plan-template.txt
grep -q "plan-template" resolve-plan-template.txt
65 changes: 10 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ specify init my-project --integration codex --ignore-agent-tools
| 类型 | ID | 来源目录 | 作用 |
| --- | --- | --- | --- |
| 自动扩展 | `agent-context` | `extensions/agent-context` | 维护 AGENTS、CLAUDE、Copilot 等 agent context 文件里的 Spec Kit 受管段。 |
| 默认扩展 | `arch` | `extensions/arch` | 生成或反向生成项目级 4+1 架构视图,形成架构 SSOT。 |
| 默认扩展 | `arch` | `extensions/arch` | 生成或反向生成面向 `/speckit.plan` 的架构规划契约。 |
| 默认扩展 | `discovery` | `extensions/discovery` | 在正式计划前做可行性、技术选型、旧代码评估、接口理解、PoC 和场景化技术决策。 |
| 默认扩展 | `intake` | `extensions/intake` | 把 PRD、设计稿、Figma、视觉规格资产包、preview 覆盖证据、测试用例等来源归一化为 SDD 可消费的证据包。 |
| 默认扩展 | `preview` | `extensions/preview` | 从规格和计划生成低、中、高保真 Markdown 或自包含 HTML 预览。 |
Expand All @@ -77,40 +77,26 @@ specify init my-project --integration codex --ignore-agent-tools

### `arch`

`arch` 给项目补一层架构记忆。它不是 feature 计划,也不是实现设计;它负责把项目级边界、运行时职责、部署假设、约束和架构缺口写成稳定 SSOT
`arch` 给项目补一层架构记忆。它不是 feature 计划,也不是实现设计;它负责把项目级边界、约束、已定决策、禁止方向、开放问题和 plan review checklist 写成唯一的规划契约

常用命令:

```text
/speckit.arch.scenario-generate
/speckit.arch.logical-generate
/speckit.arch.process-generate
/speckit.arch.development-generate
/speckit.arch.physical-generate
/speckit.arch.scenario-reverse
/speckit.arch.logical-reverse
/speckit.arch.process-reverse
/speckit.arch.development-reverse
/speckit.arch.physical-reverse
/speckit.arch.generate
/speckit.arch.reverse
```

主要产物:

```text
.specify/memory/architecture.md
.specify/memory/architecture-scenario-view.md
.specify/memory/architecture-logical-view.md
.specify/memory/architecture-process-view.md
.specify/memory/architecture-development-view.md
.specify/memory/architecture-physical-view.md
.specify/memory/architecture-repo-facts.md
```

使用建议:

- 新项目先跑 `*-generate`,把目标架构讲清楚
- 旧仓库先跑 `*-reverse`,从真实文件、入口、配置、测试和部署线索反推架构事实
- 五个视图都足够具体后,再让 `architecture.md` 成为后续规划的架构摘要
- 新项目跑 `/speckit.arch.generate`,把目标架构约束整理成下游 plan 可消费的契约
- 旧仓库跑 `/speckit.arch.reverse`,从真实文件、入口、配置、测试和部署线索反推可证据支撑的规划规则
- 每条规则都应带 `Source / Basis`;开放问题用 `BLOCKS_PLAN` 或 `CAN_PROCEED_WITH_GUARDRAIL` 标明对规划的影响

### `discovery`

Expand Down Expand Up @@ -369,28 +355,6 @@ specify extension add git
specify preset add lean
```

### `arch-governance`

`arch-governance` 位于:

```text
extensions/arch/presets/arch-governance/
```

它包装 `/speckit.plan`,让规划阶段显式读取 `arch` 扩展产出的架构 SSOT。适合已经用 `arch` 维护架构记忆,并希望每次 feature plan 都检查架构边界的项目。

从本地目录安装:

```bash
specify preset add --dev .specify/extensions/arch/presets/arch-governance
```

如果是在这个仓库源码中测试,可使用源码路径:

```bash
specify preset add --dev extensions/arch/presets/arch-governance
```

## 开发和测试用本地包

这些目录主要服务扩展/预设作者或测试,不建议作为普通项目主流程:
Expand Down Expand Up @@ -445,11 +409,7 @@ specify bundle build --path ./my-bundle

```text
/speckit.constitution
/speckit.arch.scenario-generate
/speckit.arch.logical-generate
/speckit.arch.process-generate
/speckit.arch.development-generate
/speckit.arch.physical-generate
/speckit.arch.generate
/speckit.specify
/speckit.clarify
/speckit.discovery.feasibility
Expand All @@ -465,11 +425,7 @@ specify bundle build --path ./my-bundle
```text
/speckit.constitution
/speckit.discovery.codebase
/speckit.arch.scenario-reverse
/speckit.arch.logical-reverse
/speckit.arch.process-reverse
/speckit.arch.development-reverse
/speckit.arch.physical-reverse
/speckit.arch.reverse
/speckit.repository-governance.generate
/speckit.specify
/speckit.plan
Expand Down Expand Up @@ -543,8 +499,7 @@ specify extension add bug

| 目录或文件 | 来源 | 含义 |
| --- | --- | --- |
| `.specify/memory/architecture*.md` | `arch` | 4+1 架构视图和综合架构 SSOT。 |
| `.specify/memory/architecture-repo-facts.md` | `arch` reverse 命令 | 从既有仓库提取的架构事实。 |
| `.specify/memory/architecture.md` | `arch` | 面向 `/speckit.plan` 的架构规划契约。 |
| `.specify/memory/repository-governance.md` | `repository-governance` | 内部仓库治理 SSOT。 |
| `specs/<feature>/intake/` | `intake` | PRD、视觉设计、测试用例的结构化证据包。 |
| `specs/<feature>/preview/` | `preview` | Markdown wireflow 和自包含 HTML 预览。 |
Expand Down
2 changes: 1 addition & 1 deletion docs/community/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The following community-contributed extensions are available in [`catalog.commun
| API Evolve | Managed API contract evolution — breaking-change detection, semver enforcement, deprecation orchestration, and lifecycle gates across REST, GraphQL, and gRPC | `process` | Read+Write | [spec-kit-api-evolve](https://github.com/Quratulain-bilal/spec-kit-api-evolve) |
| Architect Impact Previewer | Predicts architectural impact, complexity, and risks of proposed changes before implementation. | `visibility` | Read-only | [spec-kit-architect-preview](https://github.com/UmmeHabiba1312/spec-kit-architect-preview) |
| Architecture Guard | Framework-agnostic architecture review extension for validating implementation against governance and architecture constitutions, detecting architectural drift, and generating non-blocking refactor tasks | `process` | Read+Write | [spec-kit-architecture-guard](https://github.com/DyanGalih/spec-kit-architecture-guard) |
| Architecture Workflow | Generate or reverse project-level 4+1 architecture views with per-view and full-workflow commands | `docs` | Read+Write | [spec-kit-arch](https://github.com/bigsmartben/spec-kit-arch) |
| Architecture Planning Contract | Generate or reverse a planning-focused architecture contract that guides downstream Spec Kit plans | `docs` | Read+Write | [spec-kit-arch](https://github.com/bigsmartben/spec-kit-arch) |
| Archive Extension | Archive merged features into main project memory. | `docs` | Read+Write | [spec-kit-archive](https://github.com/stn1slv/spec-kit-archive) |
| Azure DevOps Integration | Sync user stories and tasks to Azure DevOps work items using OAuth authentication | `integration` | Read+Write | [spec-kit-azure-devops](https://github.com/pragya247/spec-kit-azure-devops) |
| Blueprint | Stay code-literate in AI-driven development: review a complete code blueprint for every task from spec artifacts before /speckit.implement runs | `docs` | Read+Write | [spec-kit-blueprint](https://github.com/chordpli/spec-kit-blueprint) |
Expand Down
32 changes: 7 additions & 25 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 快速开始

这份指南面向本仓库分发版的 Spec Kit。它保留核心 Spec-Driven Development 流程,同时默认带上架构 SSOT、仓库治理、BDD/UIF 行为契约、HTML 预览、实现期 handoff 和最终 code review receipt。
这份指南面向本仓库分发版的 Spec Kit。它保留核心 Spec-Driven Development 流程,同时默认带上架构规划契约、仓库治理、BDD/UIF 行为契约、HTML 预览、实现期 handoff 和最终 code review receipt。

> [!NOTE]
> 自动化脚本同时提供 Bash (`.sh`) 和 PowerShell (`.ps1`) 版本。`specify` CLI 会按系统自动选择,也可以通过 `--script sh|ps` 显式指定。
Expand All @@ -14,11 +14,7 @@

```text
/speckit.constitution
/speckit.arch.scenario-generate
/speckit.arch.logical-generate
/speckit.arch.process-generate
/speckit.arch.development-generate
/speckit.arch.physical-generate
/speckit.arch.generate
/speckit.repository-governance.generate
/speckit.specify
/speckit.clarify
Expand All @@ -33,7 +29,7 @@

`/speckit.clarify` 用来在规划前降低需求歧义;`/speckit.checklist` 在计划形成后生成质量检查清单;`/speckit.analyze` 在实现前检查 spec、plan 和 tasks 的一致性;`/speckit.converge` 在实现后对照 feature artifacts 检查剩余缺口。如果 converge 追加了新任务,继续运行 `/speckit.implement` 并再次 converge,直到功能收敛。

接手旧仓库时,把五个 `/speckit.arch.*-generate` 换成对应的 `/speckit.arch.*-reverse`,先从仓库事实反向生成架构 SSOT
接手旧仓库时, `/speckit.arch.generate` 换成 `/speckit.arch.reverse`,先从仓库证据反向生成架构规划契约

小实验可以安装 `lean` 预设后走轻量路径:

Expand Down Expand Up @@ -127,41 +123,27 @@ specify integration list

它用于约束 SSOT 读取顺序、目录责任、agent 平台适配和仓库事实证据。

## 4. 生成 ARCH SSOT
## 4. 生成架构规划契约

新项目或架构正在重塑时:

```text
/speckit.arch.scenario-generate
/speckit.arch.logical-generate
/speckit.arch.process-generate
/speckit.arch.development-generate
/speckit.arch.physical-generate
/speckit.arch.generate
```

接手已有仓库时:

```text
/speckit.arch.scenario-reverse
/speckit.arch.logical-reverse
/speckit.arch.process-reverse
/speckit.arch.development-reverse
/speckit.arch.physical-reverse
/speckit.arch.reverse
```

主要产物:

```text
.specify/memory/architecture.md
.specify/memory/architecture-scenario-view.md
.specify/memory/architecture-logical-view.md
.specify/memory/architecture-process-view.md
.specify/memory/architecture-development-view.md
.specify/memory/architecture-physical-view.md
.specify/memory/architecture-repo-facts.md # reverse 额外使用
```

后续 `/speckit.plan` 会基于这些架构边界、约束、反模式和未解缺口进行规划
后续 `/speckit.plan` 会基于这份唯一架构文件中的边界、约束、反模式、开放问题和 review checklist 进行规划

## 5. 创建并澄清规格

Expand Down
35 changes: 16 additions & 19 deletions extensions/arch/CATALOG-SUBMISSION.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
# Spec Kit Extension Submission

Extension ID: arch
Name: Architecture Workflow
Version: 1.2.2
Description: Generate or reverse project-level 4+1 architecture views with per-view and full-workflow commands
Name: Architecture Planning Contract
Version: 2.0.0
Description: Generate or reverse a planning-focused architecture contract that guides downstream Spec Kit plans
Author: bigsmartben
Repository URL: https://github.com/bigsmartben/spec-kit-arch
Download URL: https://github.com/bigsmartben/spec-kit-arch/archive/refs/tags/v1.2.2.zip
Download URL: https://github.com/bigsmartben/spec-kit-arch/archive/refs/tags/v2.0.0.zip
Documentation URL: https://github.com/bigsmartben/spec-kit-arch#readme
License: MIT
Required Spec Kit version: >=0.8.10.dev0
Commands count: 12
Commands count: 2
Hooks count: 0
Tags: architecture, 4plus1, workflow, design
Tags: architecture, planning-contract, workflow, design

Key features:
- Provides `.arch` namespaced commands for each 4+1 view: scenario, logical, process, development, and physical.
- Provides `/speckit.arch.full-generate` for one-command forward generation of all 4+1 views and synthesis.
- Provides `/speckit.arch.full-reverse` for one-command reverse generation of repo facts, all 4+1 views, and synthesis.
- Provides separate forward-generation and reverse-generation commands for every view.
- Records reverse workflow evidence in `.specify/memory/architecture-repo-facts.md`.
- Uses optional repository-first evidence in the reverse workflow, with dependency matrix interpretation owned by the development view rather than consumed evenly by every 4+1 view.
- Requires the Development View commands to produce a `Dependency Matrix` section in the development-view artifact.
- Allows teams to update one architecture view at a time while preserving the cross-view synthesis boundary.
- Defines synthesis readiness, repo-facts merge behavior, and source traceability expectations for repeatable command runs.
- Ships a schema-backed artifact contract plus bash and PowerShell readiness validators that emit `ready_gate` and stable blocker codes.
- Restricts writes to documented `.specify/memory/architecture*.md` files, including repo facts for reverse generation.
- Provides `/speckit.arch.generate` for forward generation of `.specify/memory/architecture.md` as a planning contract.
- Provides `/speckit.arch.reverse` for reverse generation from observable repository evidence.
- Keeps `.specify/memory/architecture.md` as the only generated architecture artifact.
- Uses 4+1 only as an internal reasoning lens so default output stays focused on downstream planning constraints.
- Defines plan-facing sections for planning scope rules, capability boundaries, required constraints, existing decisions, extension points, prohibited plan directions, open questions, and a plan review checklist.
- Ships a schema-backed artifact contract plus bash and PowerShell readiness validators that emit `planning_gate`, compatibility `ready_gate`, and stable blocker codes.
- Requires rule-bearing rows to include `Source / Basis`, validates open-question planning status, and blocks implementation-level conclusions from the architecture artifact.
- Restricts writes to `.specify/memory/architecture.md`.

Testing performed:
- Local development install with `specify extension add --dev /home/administrator/github/spec-kit-arch`.
- Bash setup helper verified with `.specify/extensions/arch/scripts/bash/setup-arch.sh --json`.
- Release ZIP install to verify after publishing `v1.2.2`: `specify extension add arch --from https://github.com/bigsmartben/spec-kit-arch/archive/refs/tags/v1.2.2.zip`.
- Bash readiness validator verified with `.specify/extensions/arch/scripts/bash/validate-arch-artifacts.sh --json`.
- Repository contract test: `bash tests/repository-first-contract.sh`.
16 changes: 16 additions & 0 deletions extensions/arch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

## Unreleased

- Strengthen the planning contract quality gate with required `Source / Basis` support on rule-bearing sections.
- Add open-question planning status validation with `BLOCKS_PLAN` and `CAN_PROCEED_WITH_GUARDRAIL`.
- Block implementation-level conclusions such as source file edits, API schemas, database schemas, task lists, runbooks, and deployment manifests from passing planning readiness.
- Tighten the JSON working-model schema with per-section record contracts.

## v2.0.0 - 2026-07-06

- Change the default extension experience from generated 4+1 artifacts to a planning-focused architecture contract.
- Register only `/speckit.arch.generate` and `/speckit.arch.reverse` as default commands.
- Use 4+1 as an internal reasoning lens for goals, boundaries, runtime collaboration, development constraints, and physical constraints.
- Replace the architecture synthesis template with an `Architecture Planning Contract` template for downstream `/plan` guidance.
- Change setup helpers so default bootstrap creates only `.specify/memory/architecture.md`.
- Remove unregistered legacy 4+1 command templates and secondary architecture artifact templates.
- Change readiness validators to emit `planning_gate` with compatibility `ready_gate`.
- Update schema and repository contract tests for the planning contract workflow.

## v1.2.2 - 2026-06-25

- Use CLI-compatible command names such as `/speckit.arch.scenario-generate` and `/speckit.arch.scenario-reverse`.
Expand Down
Loading
Loading