一键导入
speckit-architecture-guard-governed-plan
Orchestrate a governed planning workflow that coordinates flash-mem, Security Review, and Architecture Guard validation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Orchestrate a governed planning workflow that coordinates flash-mem, Security Review, and Architecture Guard validation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | speckit-architecture-guard-governed-plan |
| description | Orchestrate a governed planning workflow that coordinates flash-mem, Security Review, and Architecture Guard validation. |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"architecture-guard:commands/governed-plan.md"} |
You are orchestrating the governed-plan workflow for architecture-guard.
This command coordinates multiple extensions to ensure the technical plan respects architectural, historical, and security constraints before implementation begins.
The orchestrator should be memory-first: refresh or read memory-synthesis.md before any broader file scan, then fall back to targeted reads only when the synthesis is insufficient.
If flash-mem is available, use the MCP-backed context preparation flow exposed by flash-mem; otherwise treat the legacy prepare-context alias as a compatibility path. Compatibility tool names such as speckit_memory_* are provided by flash-mem when the host still expects them.
Provide a single command that ensures:
flash-mem)./speckit.plan).Check for the existence of:
flash-memspec-kit-security-reviewDetection Logic:
.specify/extensions.yml and check the installed list. If an extension ID is present there, consider it available..specify/extensions/ only if the YAML is missing or the list is empty.IF flash-mem is available:
flash-mem)Because flash-mem uses SQLite as its source of truth, you MUST use its MCP tools to retrieve context. Do not read the .md memory files directly, as they are only backups.
flash-mem MCP-backed context preparation flow for specs/<feature>; otherwise treat the legacy prepare-context alias as a compatibility path.specs/<feature>/memory-synthesis.md to identify constraints.flash-mem emits a token banner, keep it visible so the savings remain observable during normal planning runs.speckit_memory_token_report MCP tool provided by flash-mem with feature: "<feature>" and display the token savings in the summary.If flash-mem is unavailable, use the standard synthesis command:
specs/<feature>/memory-synthesis.md.[OPTIONAL SUB-AGENT DELEGATION]
flash-mem has ≥ 20 decision documents: Consider sub-agent for synthesisflash-mem is unavailable.You must orchestrate the /speckit.plan workflow directly.
CRITICAL INSTRUCTION: You must NOT just advise the user or stop here. You must actually generate the plan:
Execute Plan: Run /speckit.plan to generate and save specs/<feature>/plan.md.
If /speckit.plan is not available as a registered command (i.e., the AI agent does not recognize it as a slash command), fall back to inline planning:
specs/<feature>/spec.md (or the path provided by the user)..specify/memory/constitution.md, .specify/memory/architecture_constitution.md, .specify/memory/security_constitution.md).specs/<feature>/memory-synthesis.md if available.specs/<feature>/plan.md directly, incorporating all context above./speckit.plan was unavailable and planning was performed inline.The planning process must incorporate the Project Constitution documents and memory synthesis. IMPORTANT: You MUST read these files explicitly using your file-reading tools (absolute or relative paths). Do not rely solely on workspace search or semantic indexers, as these files are often in .gitignore:
.specify/memory/constitution.md, .specify/memory/architecture_constitution.md, and .specify/memory/security_constitution.md.specs/<feature>/memory-synthesis.md (if available).Prefer the cached synthesis and selected index entries over reopening the full durable memory set.
IF spec-kit-security-review is available:
/speckit.security-review.plan to review the plan and save specs/<feature>/security-constraints.md.Run:
/speckit.architecture-guard.violation-detection
Inputs to consider:
plan.md..specify/memory/architecture_constitution.md.memory-synthesis.md (if available).security-constraints.md (if available).Detect any Security-Architecture Conflict or architectural drift.
If the planning process or architecture validation identified new architectural patterns, critical decisions, or repeatable lessons:
Produce a final Governed Planning Summary for the user.
Without flash-mem:
/speckit.plan directlyWithout Security Review:
Minimal Viable Workflow (only Architecture Guard + Spec Kit):
The workflow must remain functional with only architecture-guard and core Spec Kit.
The command MUST return:
# Governed Planning Summary
## Memory Context
- **Status**: [Synthesized / Skipped / Missing]
- **Key Constraints**: [Bullet points of architectural context used]
## Security Review
- **Status**: [Reviewed / Skipped]
- **Constraints Found**: [Key security-architecture boundaries]
- **Warnings**: [Any high-risk authorization or isolation issues]
## Architecture Review
- **Violations**: [Drift findings or Security-Architecture Conflicts]
- **Consistency Risks**: [How the plan aligns with the Constitution]
## Recommended Actions
- [e.g., Run /speckit.architecture-guard.refactor-generator]
- [e.g., Refine plan to address Security Conflict]
- [e.g., Continue to /speckit.tasks phase]
- **Durable Memory Preservation**: (Proactively triggered) Review the proposed memory entries below.
memory-synthesis.md, security-constraints.md).Execute the implementation plan by processing and executing all tasks defined in tasks.md
Apply approved architecture refactors by updating plan and task artifacts directly.
Perform a framework-agnostic architecture review validating implementation against spec.md, plan.md, tasks.md, and the governance and architecture constitutions.
Perform an architecture-aware verification gate validating implementation against spec.md, plan.md, tasks.md, and the Architecture Constitution.
Run a single architecture workflow that prefers memory-first context and can incorporate security review when available.
Run implementation with memory context, then review the produced implementation against security and architecture constraints.