ワンクリックで
speckit-architecture-guard-init
Initialize or refine the project governance and architecture constitutions for Architecture Guard.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Initialize or refine the project governance and architecture constitutions for Architecture Guard.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Wrap core analysis with behavior-first vertical consistency checks.
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.
| name | speckit-architecture-guard-init |
| description | Initialize or refine the project governance and architecture constitutions for Architecture Guard. |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"architecture-guard:commands/init.md"} |
This command helps teams intentionally define:
This command generates or refines:
.specify/memory/constitution.md.specify/memory/architecture_constitution.md.specify/memory/security_constitution.mdRun this command once per project or whenever the constitution files need refinement. If the constitution files already exist, refine them instead of starting over.
After init, the usual next step is /speckit.architecture-guard.governed-plan or /speckit.architecture-guard.governed-tasks, depending on whether the team wants planning or task generation next.
When Flash-Mem is available, prefer it first for retrieving prior decisions, summaries, and existing constitution context. The repository files remain the source of truth for constitution content, and the legacy memory-hub name is reference-only and should not be treated as the runtime backend. If Flash-Mem is unavailable or the context is incomplete, read the repository files directly and treat them as the canonical source of truth. After refining the constitutions, sync durable summaries and major decisions back into Flash-Mem.
The goal is NOT to generate generic best practices.
The goal is to establish:
Framework-Agnostic Core (applied to all projects):
Framework-Aware Enhancement (optional, selected during init):
Coexistence:
DO NOT ask all questions at once.
Interview the user in logical phases.
Only continue when the current phase is sufficiently understood.
Adapt vocabulary and suggestions based on:
Examples:
Reference patterns are suggestions.
NEVER force architecture opinions into the Constitution.
A rule only becomes a standard when:
Prioritize:
before implementation details.
Avoid vague guidance.
BAD:
Follow best practices
GOOD:
Controllers must delegate business logic to Services or Actions.
NEVER automatically evolve architecture direction.
If architecture drift is detected:
This system separates:
The system must maintain:
.specify/memory/constitution.md.specify/memory/architecture_constitution.mdAvoid duplication between both files.
Users may need to pause the init workflow and resume later. Support this gracefully:
Pausing Mid-Interview:
.specify/memory/constitution-draft.md with timestamp and completion percentageResuming Saved Draft:
.specify/memory/constitution-draft.md on next init runDraft Contents:
# Constitution Draft (Paused)
timestamp: 2025-01-15T14:30:00Z
completion: "Phase 1/3 (Framework + Team)"
framework: [answer if provided]
team_size: [answer if provided]
technology_stack: [answer if provided]
# ... other captured answers
.specify/memory/constitution.mdPurpose:
High-level governance and engineering philosophy.
Should contain:
Should NOT contain:
architecture_constitution.mdPurpose:
Enforceable architecture standards and system boundaries.
Should contain:
security_constitution.mdPurpose:
Project-wide security rules, standards, and requirements.
Should contain:
Check for:
.specify/memory/constitution.md.specify/memory/architecture_constitution.md.specify/memory/security_constitution.mdWould you like to:
- refine governance rules
- refine architecture rules
- reduce duplication
- evolve architecture direction
- regenerate one of the files
Analyze architecture-related sections.
Detect rules that should move into:
.specify/memory/architecture_constitution.md
Would you like to split architecture rules into a dedicated architecture constitution?
Start phased initialization interview.
Determine:
Ask:
What is the primary technology stack?
Examples:
- Laravel 12 + Inertia React
- NestJS 10
- Next.js 15 App Router
- Nuxt 3
- Express + React
If the technology stack matches a built-in preset (e.g., Laravel, NestJS, Next.js, Nuxt.js, Django, Spring Boot, React, Vue, or Express), ask:
Would you like to use the [Framework] Architecture Preset?
This will:
1. Configure the engine to be [Framework]-aware.
2. Use framework-specific knowledge during constitution generation.
3. Provide specialized detection for [Framework] anti-patterns.
Ask:
What architecture style does this project follow?
- Monolith
- Modular Monolith
- Microservices
- Event-Driven
- Hybrid
Ask:
What type of application is this?
Examples:
- REST API
- Full-stack web app
- Internal dashboard
- Public SaaS
- Realtime platform
- Background processing system
Focus on:
Focus on:
Focus on:
Ask:
What application style are you using?
- REST API
- Inertia
- Livewire
- API + SPA
Ask:
Where should business logic live?
- Services
- Actions
- Domain layer
- Models
- Hybrid
Ask:
How should validation be handled?
Examples:
- Form Requests
- DTO validation
- inline validation
Ask:
How strict should module boundaries be?
Ask:
Should services communicate directly or through contracts/events?
Ask:
How should Server and Client Component boundaries be enforced?
Ask:
Should Server Actions delegate to domain/service layers?
Ask:
How should composables be organized and scoped?
Ask:
How should API access be abstracted?
Determine:
Ask:
Where should business logic live?
Ask:
Which layers may communicate directly?
Ask:
Should the domain layer remain isolated from transport layers such as HTTP, queues, or UI?
Ask:
How strict should module boundaries be enforced?
Determine:
Ask:
How should input validation be handled?
Ask:
What is the standard response structure?
Ask:
How should PHP → frontend contracts be protected?
Examples:
- DTOs
- API Resources
- TypeScript interfaces
- explicit field mapping
Ask:
Should validation be global or scoped per controller/module?
Ask:
How should Server Action inputs be validated?
Determine:
Ask:
How should data access be handled?
Examples:
- direct ORM usage
- repositories
- query services
- domain repositories
Ask:
When should async processing be required?
Ask:
Which operations must never block requests?
Determine:
Ask:
Which rules should be treated as blocking violations (P0)?
Ask:
Are there intentional architectural deviations that should be documented?
Ask:
How should architecture evolution be handled?
Examples:
- manual review only
- proposal-based evolution
- strict governance
Before generating rules, classify them.
.specify/memory/constitution.mdExamples:
.specify/memory/architecture_constitution.mdExamples:
DO NOT duplicate rules across both files.
If a rule exists in:
.specify/memory/architecture_constitution.md
Then:
.specify/memory/constitution.md
should reference architecture rules instead of repeating implementation details.
GOOD:
.specify/memory/constitution.md:
- Architecture enforcement rules are defined in `.specify/memory/architecture_constitution.md`
.specify/memory/architecture_constitution.md:
- Controllers must delegate business logic to Services or Actions
BAD:
Duplicating detailed architecture rules in both files.
DO NOT generate final documents until:
Generate or refine:
.specify/memory/constitution.md.specify/memory/architecture_constitution.md.specify/memory/security_constitution.mdIf the flash-mem MCP server is available, you MUST run the update_project_summary tool to reflect any major changes in architecture, boundaries, or governance rules in the project summary. If it is unavailable, rely on the repository files directly and continue without the sync step.
.specify/memory/constitution.md Structure1. Project Identity
2. Engineering Philosophy
3. Security Expectations
4. Testing Expectations
5. Documentation Standards
6. Review Process
7. High-Level Architecture Intent
8. Governance and Evolution Policy
.specify/memory/architecture_constitution.md Structure1. Architecture Style
2. Layer Boundaries
3. Business Logic Placement
4. Contracts & Validation
5. Data Access Rules
6. Async & Integration Rules
7. Module Boundaries
8. Framework-Specific Architecture Rules
9. Blocking Architecture Violations (P0)
10. Architecture Evolution Policy
11. Refactor & Drift Handling
.specify/memory/security_constitution.md Structure1. Trust Boundaries
2. Authentication & Authorization Standards
3. Data Isolation & Privacy Rules
4. Secrets Management Policy
5. Secure-by-Design Patterns
6. API & Integration Security
7. Audit, Logging & Monitoring Requirements
8. Security Incident Response Triggers
9. Compliance & Regulatory Mapping
Architecture rules may evolve over time.
When repeated architecture drift is detected:
.specify/memory/architecture_constitution.md by default.specify/memory/constitution.md for governance-level changesNEVER automatically modify either file.
These are guidance patterns.
DO NOT automatically enforce them.
This command exists to help teams intentionally design:
It must NOT:
The generated constitutions must reflect intentional engineering decisions.