cfsa-antigravity 1.0.0 → 1.0.1

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.
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # CFSA Antigravity
2
+
3
+ > Constraint-First Specification Architecture — production-grade from line one
4
+
5
+ A pipeline that turns a raw idea into exhaustively specified, test-driven, production-quality code through progressive gates. Stack-agnostic. Agent-agnostic. Cross-platform. Every line of code is production-grade from the moment it's written.
6
+
7
+ ## Quick Install
8
+
9
+ ```bash
10
+ npx cfsa-antigravity init
11
+ ```
12
+
13
+ Or install globally:
14
+
15
+ ```bash
16
+ npm install -g cfsa-antigravity
17
+ cfsa-antigravity init
18
+ ```
19
+
20
+ This installs the `.agent/` folder, `docs/` structure, and agent config files into your project.
21
+
22
+ ## CLI
23
+
24
+ | Command | Description |
25
+ |---------|-------------|
26
+ | `cfsa-antigravity init` | Install the pipeline into your project |
27
+ | `cfsa-antigravity status` | Check installation + unfilled placeholders |
28
+ | `cfsa-antigravity init --force` | Overwrite existing installation |
29
+ | `cfsa-antigravity init --dry-run` | Preview what would be installed |
30
+ | `cfsa-antigravity init --path ./dir` | Install into specific directory |
31
+
32
+ ## Get Started
33
+
34
+ ```
35
+ /ideate
36
+ ```
37
+
38
+ The pipeline tells you what to run next at every step. You never have to guess.
39
+
40
+ ## Documentation
41
+
42
+ | Document | Contents |
43
+ |----------|----------|
44
+ | [Pipeline Guide](docs/README.md) | Full walkthrough — every command, every stage |
45
+ | [Kit Architecture](docs/kit-architecture.md) | How the kit's internals work |
46
+
47
+ ## Five Principles
48
+
49
+ 1. **Constraints before decisions** — map what's decided before presenting options
50
+ 2. **Exhaustive iteration over shallow speed** — no ambiguity moves forward
51
+ 3. **Work shifted left** — design decisions made in spec, not in code
52
+ 4. **Progressive decision locking** — each stage locks decisions for downstream
53
+ 5. **TDD as the implementation contract** — Red → Green → Refactor, every slice
54
+
55
+ ## License
56
+
57
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfsa-antigravity",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CFSA Pipeline — Constraint-First Specification Architecture for AI agents. Production-grade from line one.",
5
5
  "bin": {
6
6
  "cfsa-antigravity": "./bin/cli.mjs"
@@ -9,7 +9,7 @@
9
9
 
10
10
  # Kit Sync State
11
11
 
12
- upstream: https://github.com/RepairYourTech/Anti-MVP-Vibe-Pipeline
12
+ upstream: https://github.com/RepairYourTech/cfsa-antigravity
13
13
  last_synced_commit: FIRST_SYNC_PENDING
14
14
  last_synced_at: FIRST_SYNC_PENDING
15
15
  kit_version: main
@@ -19,7 +19,7 @@ Canonical markdown templates for all pipeline output documents. Workflows refere
19
19
 
20
20
  ## Conventions
21
21
 
22
- **Dated File Convention**: Compiled artifacts (e.g., `architecture-design.md`, `vision.md`, `data-placement-strategy.md`, `ENGINEERING-STANDARDS.md`, audit reports) are always prefixed with `YYYY-MM-DD-`. Any workflow reading these files must use a glob pattern (e.g., `docs/plans/*-architecture-design.md`). See `KIT-ARCHITECTURE.md` Section 2 — Dated File Convention for the full rule and table.
22
+ **Dated File Convention**: Compiled artifacts (e.g., `architecture-design.md`, `vision.md`, `data-placement-strategy.md`, `ENGINEERING-STANDARDS.md`, audit reports) are always prefixed with `YYYY-MM-DD-`. Any workflow reading these files must use a glob pattern (e.g., `docs/plans/*-architecture-design.md`). See `docs/kit-architecture.md` Section 2 — Dated File Convention for the full rule and table.
23
23
 
24
24
  ## How to Use
25
25
 
@@ -4,11 +4,11 @@ description: Sync improvements from the upstream starter kit into this project's
4
4
 
5
5
  # Sync Kit
6
6
 
7
- Pull improvements from the upstream [Anti-MVP-Vibe-Pipeline](https://github.com/RepairYourTech/Anti-MVP-Vibe-Pipeline) kit into this project. The sync covers the **entire upstream repo** — `.agent/` directory, root-level files (`AGENTS.md`, `GEMINI.md`, `KIT-*.md`), and `docs/` scaffolding.
7
+ Pull improvements from the upstream [cfsa-antigravity](https://github.com/RepairYourTech/cfsa-antigravity) kit into this project. The sync covers the **entire upstream repo** — `.agent/` directory, root-level files (`AGENTS.md`, `GEMINI.md`), and `docs/` (including `kit-architecture.md` and pipeline guide).
8
8
 
9
9
  **The problem:** The kit was born from this project, but has since evolved past it. The kit uses `{{PLACEHOLDER}}` markers; this project has real values. A blind copy would destroy project-specific content. This workflow does a semantic merge — apply the kit's *intent* while preserving project values.
10
10
 
11
- **Input:** Upstream kit repo (default: `RepairYourTech/Anti-MVP-Vibe-Pipeline`, branch `main`)
11
+ **Input:** Upstream kit repo (default: `RepairYourTech/cfsa-antigravity`, branch `main`)
12
12
  **Output:** Updated project with kit improvements merged, sync state recorded
13
13
 
14
14
  ---
@@ -38,14 +38,14 @@ Compare the **entire upstream repo** against the project. Scan at minimum:
38
38
 
39
39
  | Upstream Path | What to Compare |
40
40
  |--------------|-----------------|
41
- | Root files | `AGENTS.md`, `GEMINI.md`, `KIT-ARCHITECTURE.md`, `KIT-README.md` |
41
+ | Root files | `AGENTS.md`, `GEMINI.md` |
42
42
  | `.agent/instructions/` | All 5 markdown files |
43
43
  | `.agent/rules/` | All 9 markdown files |
44
44
  | `.agent/workflows/` | All workflow files |
45
45
  | `.agent/skills/` | All skill directories (SKILL.md + sub-files) |
46
46
  | `.agent/skill-library/` | MANIFEST.md, README.md, subdirectories |
47
47
  | `.agent/progress/` | Directory structure |
48
- | `docs/` | README.md, audits/, plans/ scaffolding |
48
+ | `docs/` | README.md, kit-architecture.md, audits/, plans/ scaffolding |
49
49
 
50
50
  Compare using SHA hashes or byte-level diff. Classify each file per Step 2.
51
51
 
@@ -189,7 +189,7 @@ Write or update `.agent/kit-sync.md`:
189
189
  ```markdown
190
190
  # Kit Sync State
191
191
 
192
- upstream: https://github.com/RepairYourTech/Anti-MVP-Vibe-Pipeline
192
+ upstream: https://github.com/RepairYourTech/cfsa-antigravity
193
193
  last_synced_commit: <current HEAD commit hash>
194
194
  last_synced_at: <ISO 8601 timestamp>
195
195
  kit_version: main
@@ -1,4 +1,4 @@
1
- # Vibe to Production the anti-MVP spec pipeline
1
+ # CFSA AntigravityConstraint-First Specification Architecture
2
2
 
3
3
  This is a **Constraint-First Specification Architecture (CFSA)** pipeline. It turns a raw idea into exhaustively specified, test-driven, production-quality code through a series of progressive gates. Stack-agnostic. Agent-agnostic. Cross-platform. Every line of code, every spec, every test is production-grade from the moment it's written. Phases control scope, never quality. There is no "fix it later."
4
4
 
@@ -29,7 +29,7 @@ Decisions in this pipeline are **progressively locked**. Each pipeline stage bui
29
29
 
30
30
  Once a stage is locked, downstream stages may not contradict it. To change a locked decision, re-run the originating stage and cascade changes downstream.
31
31
 
32
- <!-- Pipeline table maintained by: (1) bootstrap-agents-fill.md Step 4 for project-config sections, (2) kit maintainer checklist for workflow rows — see KIT-ARCHITECTURE.md Kit Maintenance Checklist -->
32
+ <!-- Pipeline table maintained by: (1) bootstrap-agents-fill.md Step 4 for project-config sections, (2) kit maintainer checklist for workflow rows — see docs/kit-architecture.md Kit Maintenance Checklist -->
33
33
  ### Pipeline Workflow Table
34
34
 
35
35
  | # | Command | Input | Output | Stage |
@@ -1,4 +1,4 @@
1
- # Vibe to Production the anti-MVP spec pipeline
1
+ # CFSA AntigravityConstraint-First Specification Architecture
2
2
 
3
3
  This is a **Constraint-First Specification Architecture (CFSA)** pipeline. It turns a raw idea into exhaustively specified, test-driven, production-quality code through a series of progressive gates. Stack-agnostic. Agent-agnostic. Cross-platform. Every line of code, every spec, every test is production-grade from the moment it's written. Phases control scope, never quality. There is no "fix it later."
4
4
 
@@ -29,7 +29,7 @@ Decisions in this pipeline are **progressively locked**. Each pipeline stage bui
29
29
 
30
30
  Once a stage is locked, downstream stages may not contradict it. To change a locked decision, re-run the originating stage and cascade changes downstream.
31
31
 
32
- <!-- Pipeline table maintained by: (1) bootstrap-agents-fill.md Step 4 for project-config sections, (2) kit maintainer checklist for workflow rows — see KIT-ARCHITECTURE.md Kit Maintenance Checklist -->
32
+ <!-- Pipeline table maintained by: (1) bootstrap-agents-fill.md Step 4 for project-config sections, (2) kit maintainer checklist for workflow rows — see docs/kit-architecture.md Kit Maintenance Checklist -->
33
33
  ### Pipeline Workflow Table
34
34
 
35
35
  | # | Command | Input | Output | Stage |
@@ -1,5 +1,5 @@
1
- # Vibe to Production
2
- ### the anti-MVP spec pipeline
1
+ # CFSA Antigravity
2
+ ### Constraint-First Specification Architecture — production-grade from line one
3
3
 
4
4
  > Designed for Antigravity — adaptable to other agents
5
5
 
@@ -140,29 +140,31 @@ The pipeline is a linear sequence of commands. Each step tells you what to run n
140
140
 
141
141
  ### Prerequisites
142
142
 
143
+ - Node.js 18+ (for the installer)
143
144
  - Antigravity IDE (or any compatible agent that can read files, write files, and execute commands)
144
145
 
145
146
  ### Installation
146
147
 
147
- Copy the `.agent/` and `docs/` directories into your target project:
148
-
149
- **Windows:**
150
- ```cmd
151
- xcopy /E /I spec-pipeline-starter\.agent your-project\.agent
152
- xcopy /E /I spec-pipeline-starter\docs your-project\docs
148
+ **Recommended:**
149
+ ```bash
150
+ npx cfsa-antigravity init
153
151
  ```
154
152
 
155
- **macOS / Linux:**
153
+ **Manual (without npm):**
156
154
  ```bash
157
- cp -r spec-pipeline-starter/.agent /path/to/your-project/
158
- cp -r spec-pipeline-starter/docs /path/to/your-project/
155
+ git clone https://github.com/RepairYourTech/cfsa-antigravity.git
156
+ cp -r cfsa-antigravity/.agent /path/to/your-project/
157
+ cp -r cfsa-antigravity/docs /path/to/your-project/
158
+ cp cfsa-antigravity/GEMINI.md /path/to/your-project/
159
+ cp cfsa-antigravity/AGENTS.md /path/to/your-project/
159
160
  ```
160
161
 
161
162
  ### Agent Setup
162
163
 
163
164
  | Agent | What to Do |
164
165
  |-------|------------|
165
- | **Antigravity** | Copy `GEMINI.md` to your project rootit's the system prompt |
166
+ | **Antigravity** | Both `AGENTS.md` and `GEMINI.md` are presentbootstrap fills both during `/create-prd`. |
167
+ | **Gemini CLI** | `GEMINI.md` is your agent config. Bootstrap fills it during `/create-prd`. |
166
168
  | **Claude Code** | Copy rules/instructions into `.claude/` using Claude's format |
167
169
  | **Cursor** | Reference from `.cursorrules` or your Cursor config |
168
170
  | **Windsurf** | Reference from `.windsurfrules` or equivalent |
@@ -185,3 +187,23 @@ The pipeline tells you what to run next at every step. You never have to guess.
185
187
  **Skill library** lives in `.agent/skill-library/`. These are stack-specific and surface-specific skills that get provisioned by bootstrap as tech decisions are confirmed during `/create-prd`. They're never loaded directly — bootstrap copies the relevant ones into `.agent/skills/` and fills any placeholders with your project's confirmed values.
186
188
 
187
189
  Bootstrap fires once per confirmed decision — it fills only what was just decided and leaves everything else untouched.
190
+
191
+ ### Bootstrap & Template System
192
+
193
+ Instruction files in `.agent/instructions/` are **templates**, not static files — they ship with `{{PLACEHOLDER}}` markers that bootstrap fills as tech decisions are confirmed during `/create-prd`.
194
+
195
+ | File | Filled by | When |
196
+ |------|-----------|------|
197
+ | `AGENTS.md` + `GEMINI.md` | `bootstrap-agents-fill` | After each confirmed tech decision |
198
+ | `commands.md` | `bootstrap-agents-fill` | After dev tooling decisions |
199
+ | `workflow.md` | `bootstrap-agents-fill` | After dev tooling decisions |
200
+ | `tech-stack.md` | `bootstrap-agents-fill` + `bootstrap-agents-provision` | After each decision + after skill provisioning |
201
+ | `structure.md` | `bootstrap-agents-fill` | After Step 9.5 of `/create-prd-compile` |
202
+ | `patterns.md` | `bootstrap-agents-provision` | After a frontend-capable framework skill is provisioned (`FRONTEND_FRAMEWORK`, `MOBILE_FRAMEWORK`, etc.) |
203
+
204
+ **The placeholder verification gate**: Before any implementation begins, `/implement-slice` scans all seven instruction files for unfilled `{{` patterns. If any are found, it stops and tells you exactly which file, which placeholder, and which command to run. This gate prevents implementation from proceeding with broken agent context.
205
+
206
+ **Diagnosing unfilled placeholders**: For existing projects with unfilled placeholders, run:
207
+ - `/create-prd-compile` — fills `structure.md` (Step 9.5 generates and locks the directory structure)
208
+ - `/bootstrap-agents-provision` — fills `patterns.md` (composes framework patterns from the provisioned frontend-capable skill — `FRONTEND_FRAMEWORK`, `MOBILE_FRAMEWORK`, etc.)
209
+ - `/bootstrap-agents-fill` with confirmed stack values — fills `AGENTS.md` and `GEMINI.md`
@@ -0,0 +1,223 @@
1
+ # CFSA Antigravity - Architecture
2
+
3
+ **Purpose:** Provide a high-level map of the agentic machinery that powers CFSA Antigravity.
4
+
5
+ This document serves as a guide to understanding how the various components within the `.agent/` directory interlock to provide a robust, agent-agnostic development environment.
6
+
7
+ ---
8
+
9
+ ## 1. Code Organization
10
+
11
+ The intelligence of the kit lives entirely within the `.agent/` directory.
12
+
13
+ ```text
14
+ .agent/
15
+ ├── instructions/ # Core directives (the "brainstem")
16
+ ├── progress/ # State and memory (the "hippocampus")
17
+ ├── rules/ # Non-negotiable constraints (the "laws")
18
+ ├── skills/ # Reusable capabilities (the "tools")
19
+ └── workflows/ # Structured processes (the "playbooks")
20
+ ```
21
+
22
+ ### Core Components
23
+
24
+ * **Instructions:** (`workflow.md`, `tech-stack.md`, `structure.md`, `patterns.md`, etc.) Baseline knowledge the agent needs to operate in the specific environment. These files ship as templates with `{{PLACEHOLDER}}` markers — they are not static files. The bootstrap system fills them progressively as tech decisions are confirmed during `/create-prd`. An instruction file with unfilled placeholders is a broken agent context. `workflow.md` enforces the mandatory execution sequence: Understand Context -> Check Skills -> Execute -> Validate.
25
+ * **Rules:** Preemptively loaded constraints that apply to *every* task. Includes security best practices (`security-first.md`), TDD mandates (`tdd-contract-first.md`), and vertical-slice enforcement (`vertical-slices.md`).
26
+ * **Skills:** Modular capabilities (e.g., `technical-writer`, `brainstorming`). Agents load these explicitly when a task requires them, preventing context bloat.
27
+ * **Workflows:** Step-by-step markdown checklists invoked via `/slash-commands` (e.g., `/create-prd`, `/implement-slice`). They chain skills together to achieve complex, multi-stage goals.
28
+
29
+ ---
30
+
31
+ ## 2. Data Flow & State Management
32
+
33
+ Agents are inherently stateless across conversations. The kit uses the **Session Continuity** protocol to provide a persistent memory system.
34
+
35
+ ### The `.agent/progress/` Directory
36
+
37
+ This directory acts as the agent's long-term and working memory.
38
+
39
+ ```text
40
+ .agent/progress/
41
+ ├── index.md # Master checklist — phases + overall %
42
+ ├── spec-pipeline.md # Spec completion tracker (IA/BE/FE per shard)
43
+ ├── phases/
44
+ │ └── phase-NN.md # Per-phase slice checklist
45
+ ├── slices/
46
+ │ └── phase-NN-slice-NN.md # Per-slice log (only if ≥3 acceptance criteria)
47
+ ├── sessions/
48
+ │ └── YYYY-MM-DD.md # Session log for resumption
49
+ └── memory/
50
+ ├── patterns.md
51
+ ├── blockers.md
52
+ └── decisions.md
53
+ ```
54
+
55
+ > **Adaptive Granularity Rule**: A slice gets its own file in `slices/` only when it has ≥3 acceptance criteria. Slices with 1–2 criteria are tracked inline in the phase file. This prevents file explosion for simple specs while giving granular tracking for complex ones.
56
+
57
+ > **Runtime vs. pre-shipped files**: The `phases/`, `slices/`, and `sessions/` directories and their contents are created at runtime by `/plan-phase` (Protocol 2: Progress Generation) and `/implement-slice` (Protocol 3: Progress Update). They do not ship pre-created. The only files that ship as part of the kit in `memory/` are the three empty seed files (`patterns.md`, `blockers.md`, `decisions.md`).
58
+
59
+ ### Flow
60
+
61
+ 1. **Resume**: On session start, workflows invoke Session Resumption (Protocol 1) — read `index.md` for overall status, find the latest `sessions/YYYY-MM-DD.md` log, check `memory/blockers.md` for unresolved blockers.
62
+ 2. **Act**: The agent executes the workflow against the phase plan in `phases/phase-NN.md`.
63
+ 3. **Persist**: At implementation checkpoints (Protocol 3: Progress Update via `/implement-slice`), the agent marks criteria `[x]`, updates phase progress, and logs findings into `memory/patterns.md`, `decisions.md`, and `blockers.md`.
64
+ 4. **Close**: At session end, the agent writes `sessions/YYYY-MM-DD.md` (Protocol 5: Session Close) to enable clean resumption next session.
65
+
66
+ ### Cross-references
67
+
68
+ - **Dated File Convention** — See below in this section (Section 2) — governs which artifact paths use glob patterns vs. hardcoded names.
69
+ - **Placeholder Verification Gate Protocol** — See Section 3.5 — governs the Step 0 guard that prevents workflows from reading `{{PLACEHOLDER}}`-dependent skills before bootstrap has run.
70
+ - **Kit Maintenance Checklist** — See Section 5 — governs what must be updated when new workflows or skills are added.
71
+ - **Surface Model** — `.agent/skills/prd-templates/references/surface-model.md` — The authoritative reference for surface types (web/mobile/cli/etc.) and implementation layers, and how the two models relate.
72
+
73
+ ### Dated File Convention
74
+
75
+ A document is dated (prefixed with `YYYY-MM-DD-`) if and only if it is a **compiled artifact** — one that can be superseded by a newer version and both versions might need to coexist temporarily. Living documents that are updated in place are never dated.
76
+
77
+ | Document | Dated? | Rationale |
78
+ |---|---|---|
79
+ | `architecture-design.md` | ✅ Yes | Can be re-run with new stack; old version referenced during migration |
80
+ | `vision.md` | ✅ Yes | Evolution creates a new version; audit trail needed |
81
+ | `data-placement-strategy.md` | ✅ Yes | Same pattern |
82
+ | `ENGINEERING-STANDARDS.md` | ✅ Yes | Standards are versioned |
83
+ | Audit reports (`docs/audits/`) | ✅ Yes | Versioned snapshots by definition |
84
+ | Propagation scan reports | ✅ Yes | Same |
85
+ | IA shards (`docs/plans/ia/`) | ❌ No | Living documents; updated in place by `/evolve-feature` |
86
+ | BE specs (`docs/plans/be/`) | ❌ No | Living documents |
87
+ | FE specs (`docs/plans/fe/`) | ❌ No | Living documents |
88
+ | Phase plans (`docs/plans/phases/`) | ❌ No | Operational; history lives in progress tracking files |
89
+
90
+ Any workflow that reads a compiled artifact must use a glob pattern (e.g., `docs/plans/*-architecture-design.md`), never a hardcoded non-dated path. The agent does not know the date the file was created, so the glob is the only reliable way to locate it.
91
+
92
+ ---
93
+
94
+ ## 3. Module Relationships
95
+
96
+ The power of the kit comes from how these modules interact:
97
+
98
+ * **Workflows call Skills:** A workflow like `/create-prd` will explicitly instruct the agent to use the `technical-writer` and `brainstorming` skills.
99
+ * **Rules constrain Workflows:** While a workflow dictates the *steps*, the rules dictate *how* those steps are performed (e.g., `/implement-slice` must obey `tdd-contract-first.md`).
100
+ * **State informs Execution:** Workflows read from `.agent/progress/` to contextualize their execution based on past decisions and current active phases.
101
+
102
+ ---
103
+
104
+ ## 3.5. Bootstrap System
105
+
106
+ The bootstrap system transforms the kit from a generic template into a project-specific configuration. It runs as a utility workflow called by other pipeline workflows — never directly by the user.
107
+
108
+ ### Components
109
+
110
+ * **`bootstrap-agents-fill`**: Receives template key-value pairs and fills `{{PLACEHOLDER}}` markers across all instruction files and root agent config files (`AGENTS.md`, `GEMINI.md`). Idempotent — only fills what's provided, leaves other placeholders untouched.
111
+ * **`bootstrap-agents-provision`**: Reads the skill library manifest, copies matching skills from `.agent/skill-library/` into `.agent/skills/`, fills skill-specific placeholders, composes `FRAMEWORK_PATTERNS` from the installed frontend framework skill, and updates the installed skills list in all root config files.
112
+
113
+ ### Invocation Model
114
+
115
+ Bootstrap fires **progressively** — once per confirmed tech decision during `/create-prd-stack`, not in a batch at the end:
116
+
117
+ 1. **Database confirmed** → fills DB placeholders (`DATABASE`, `ORM`, etc.) + provisions database skill from `.agent/skill-library/` (e.g., `stack/databases/surrealdb-expert`, `stack/databases/postgresql-patterns`)
118
+ 2. **Frontend framework confirmed** → fills framework placeholders + provisions framework skill + composes `FRAMEWORK_PATTERNS` for `patterns.md`
119
+ 3. **Step 9.5 of `/create-prd-compile`** → fills `PROJECT_STRUCTURE` and `ARCHITECTURE_TABLE` in `structure.md`
120
+
121
+ ### Auto-filled vs. "If Provided" Keys
122
+
123
+ | Key | Auto-filled? | Generated by |
124
+ |-----|-------------|--------------|
125
+ | `VALIDATION_COMMAND`, `TEST_COMMAND`, etc. | Yes | Derived from confirmed dev tooling |
126
+ | `DATABASE`, `AUTH_PROVIDER`, etc. | Yes | Confirmed tech decisions |
127
+ | `INSTALLED_SKILLS` | Yes | After skill provisioning |
128
+ | `PROJECT_STRUCTURE`, `ARCHITECTURE_TABLE` | **No — requires Step 9.5** | `/create-prd-compile` Step 9.5 |
129
+ | `FRAMEWORK_PATTERNS` | **No — requires framework skill** | `bootstrap-agents-provision` after framework provisioning |
130
+
131
+ ### Placeholder Verification Gate Protocol
132
+
133
+ Workflows that read `{{PLACEHOLDER}}`-dependent skill paths declare their dependencies in frontmatter via the `requires_placeholders:` key — a machine-readable list of which placeholder values must be filled before the workflow can run.
134
+
135
+ ```yaml
136
+ requires_placeholders: [DATABASE_SKILLS, SECURITY_SKILLS]
137
+ ```
138
+
139
+ Two distinct gate types enforce placeholder readiness at different pipeline stages:
140
+
141
+ | Gate type | Where it runs | When | Purpose |
142
+ |---|---|---|---|
143
+ | **Spec-phase gate** | Step 0 of specification workflows (`create-prd-architecture`, `write-architecture-spec-design`, `write-fe-spec-classify`) | Before any skill reads | Guard spec authoring from unfilled stack placeholders |
144
+ | **Implementation-phase gate** | `/implement-slice-setup` Step -1 | Before any code is written | Guard code generation from broken agent context across all seven instruction files |
145
+
146
+ Both gates emit a **four-part hard stop message** per unfilled placeholder:
147
+
148
+ 1. **Which exact `{{PLACEHOLDER}}` is unfilled** — the literal placeholder name
149
+ 2. **Which pipeline stage fills it** — the `/create-prd-stack` decision that triggers bootstrap
150
+ 3. **The exact recovery command** — e.g., `/bootstrap-agents` with `DATABASE=<your-db-choice>`
151
+ 4. **The consequence of proceeding without it** — what downstream step would produce incorrect output
152
+
153
+ **Key constraint:** No auto-refire of bootstrap. The agent stops and tells the user exactly what to run.
154
+
155
+ For detailed per-workflow placeholder mappings and recovery commands, see `.agent/skills/session-continuity/protocols/10-placeholder-verification-gate.md`.
156
+
157
+ **Reference implementation:** `write-be-spec-classify.md` Step 2.5 is the canonical example of a correctly implemented placeholder guard.
158
+
159
+ ### Implementation-Phase Placeholder Gate
160
+
161
+ Before any implementation begins, `/implement-slice-setup` (Step -1) scans all seven instruction files for unfilled `{{` patterns. If any are found, implementation stops with a specific remediation path per file. This gate is the last line of defense against broken agent context reaching the implementation phase.
162
+
163
+ ---
164
+
165
+ ## 4. Key Patterns
166
+
167
+ ### Test-Driven Contract-First (CFPA)
168
+
169
+ The defining architectural pattern of the code produced by this kit.
170
+
171
+ 1. **Contract (Zod):** Define the schema first.
172
+ 2. **Tests (Failing):** Write tests that assert against the contract.
173
+ 3. **Implementation:** Write the code to make the tests pass.
174
+
175
+ *Never reverse this order.*
176
+
177
+ ### Explicit Handoffs
178
+
179
+ Workflows are designed to end with explicit NEXT STEPS. An agent shouldn't guess what happens after `/ideate`; the workflow tells it to propose `/create-prd`. This ensures continuous, unbroken pipeline progression.
180
+
181
+ ---
182
+
183
+ ## 5. Kit Maintenance Checklist
184
+
185
+ **When a new workflow or shard is added to `.agent/workflows/`:**
186
+
187
+ - [ ] Add a row to the `AGENTS.md` Pipeline Workflow Table
188
+ - [ ] Add a matching row to the `GEMINI.md` Pipeline Workflow Table (must stay in sync with `AGENTS.md`)
189
+ - [ ] If the workflow introduces a new system component or new convention, update the relevant section of `docs/kit-architecture.md`
190
+ - [ ] If the workflow uses new prd-template reference files, add them to `prd-templates/SKILL.md`
191
+ - [ ] If the workflow introduces a new skill, add it to `.agent/skill-library/MANIFEST.md`
192
+
193
+ **When adding a `{{PLACEHOLDER}}` to any `.agent/rules/*.md`**
194
+
195
+ - [ ] Add the placeholder name and the rule file it lives in to the "Currently applicable" note in `bootstrap-agents-fill.md` Step 3 (the rules scan step)
196
+ - [ ] Add the corresponding bootstrap key to the `bootstrap-agents-fill.md` Step 1 key table if it doesn't already exist
197
+
198
+ **When `bootstrap-agents-fill.md` fills a placeholder in `AGENTS.md` or `GEMINI.md`:**
199
+
200
+ - Bootstrap handles project-specific value substitution automatically
201
+ - Kit-level structural changes (new rows, new sections) require manual update per this checklist
202
+
203
+ **Note**: Both `AGENTS.md` and `GEMINI.md` are co-maintained: project-specific sections by `bootstrap-agents-fill.md` Step 4, and structural/workflow sections by this checklist.
204
+
205
+ ---
206
+
207
+ ## 6. Git Integration
208
+
209
+ ### Excluding `.agent/` from Git Without `.gitignore`
210
+
211
+ The `.agent/` directory should be indexed by the IDE (for agent context loading) but excluded from version control. Instead of adding it to `.gitignore` (which affects all contributors and may conflict with other entries), use the repository-local exclude file:
212
+
213
+ ```bash
214
+ echo '.agent/' >> .git/info/exclude
215
+ ```
216
+
217
+ **Why this matters:**
218
+ - `.git/info/exclude` is local to your clone — it won't appear in diffs or affect collaborators
219
+ - The IDE still sees and indexes `.agent/` for full agent functionality
220
+ - No `.gitignore` pollution or merge conflicts from differing agent setups
221
+ - Each developer can manage their own agent directory independently
222
+
223
+ > **Note:** If the project *ships* with `.agent/` as part of the kit (like this starter), you may want `.agent/` tracked in Git. In that case, use `.git/info/exclude` only for runtime-generated files like `.agent/progress/sessions/` and `.agent/progress/slices/`.