cfsa-antigravity 2.10.1 → 2.12.0

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.
Files changed (28) hide show
  1. package/package.json +1 -1
  2. package/template/.agent/kit-sync.md +3 -3
  3. package/template/.agent/rules/completion-checklist.md +5 -4
  4. package/template/.agent/rules/debug-by-test.md +49 -0
  5. package/template/.agent/rules/decision-classification.md +10 -0
  6. package/template/.agent/rules/extensibility.md +16 -11
  7. package/template/.agent/rules/memory-capture.md +71 -0
  8. package/template/.agent/rules/question-vs-command.md +10 -0
  9. package/template/.agent/rules/security-first.md +11 -0
  10. package/template/.agent/rules/single-question.md +59 -0
  11. package/template/.agent/rules/skill-mcp-first.md +45 -0
  12. package/template/.agent/rules/specificity-standards.md +10 -0
  13. package/template/.agent/rules/tdd-contract-first.md +10 -0
  14. package/template/.agent/rules/vertical-slices.md +10 -7
  15. package/template/.agent/skills/idea-extraction/SKILL.md +32 -0
  16. package/template/.agent/workflows/create-prd.md +9 -0
  17. package/template/.agent/workflows/decompose-architecture.md +9 -0
  18. package/template/.agent/workflows/ideate-discover.md +6 -3
  19. package/template/.agent/workflows/ideate.md +9 -0
  20. package/template/.agent/workflows/implement-slice.md +8 -0
  21. package/template/.agent/workflows/plan-phase.md +9 -0
  22. package/template/.agent/workflows/sync-kit.md +6 -1
  23. package/template/.agent/workflows/validate-phase.md +9 -0
  24. package/template/.agent/workflows/write-architecture-spec.md +9 -0
  25. package/template/.agent/workflows/write-be-spec.md +9 -0
  26. package/template/.agent/workflows/write-fe-spec.md +9 -0
  27. package/template/GEMINI.md +44 -44
  28. package/template/docs/kit-architecture.md +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfsa-antigravity",
3
- "version": "2.10.1",
3
+ "version": "2.12.0",
4
4
  "description": "CFSA Pipeline — Constraint-First Specification Architecture for AI agents. Production-grade from line one.",
5
5
  "scripts": {
6
6
  "changeset": "changeset",
@@ -1,6 +1,6 @@
1
1
  # Kit Sync State
2
2
 
3
3
  upstream: https://github.com/RepairYourTech/cfsa-antigravity
4
- last_synced_commit: 7d0a1d62ec69d9d1a673d8481777c730ce56f675
5
- last_synced_at: 2026-03-19T16:12:01Z
6
- kit_version: 2.10.1
4
+ last_synced_commit: bf1e196564da7c037996f8e3422994f36dbc014e
5
+ last_synced_at: 2026-03-20T00:52:40Z
6
+ kit_version: 2.12.0
@@ -37,10 +37,11 @@ A unit of work is only DONE when:
37
37
  - Phase progress fractions updated (e.g., `3/10` → `4/10`)
38
38
  - Overall progress fractions updated
39
39
  4. **The Locks**: All task claims (`[!]` flags and `files:` blocks) are removed.
40
- 5. **The Memory**: Blockers and patterns are logged to `.agent/progress/memory/`.
41
- - Follow `.agent/skills/session-continuity/protocols/04-pattern-extraction.md` — reflect on what worked, what didn't, classify, and write to `memory/patterns.md`
42
- - Log any new blockers or resolutions to `memory/blockers.md`
43
- - If decisions were made using Protocol 6 (Decision Effect Analysis), verify they're recorded in `memory/decisions.md`
40
+ 5. **The Memory**: All three memory files in `.agent/progress/memory/` are checked:
41
+ - `patterns.md` — Any patterns observed (what worked, what failed) logged per Protocol 04. **User corrections are logged as anti-patterns.**
42
+ - `decisions.md` Any non-trivial decisions logged per Protocol 06
43
+ - `blockers.md` Any blockers hit logged with status and impact
44
+ - See rule: `memory-capture` for triggers and format
44
45
  6. **The Session Log**: A session close log exists in `.agent/progress/sessions/`.
45
46
  - Follow `.agent/skills/session-continuity/protocols/05-session-close.md` — write what was accomplished, deferred, and where the next session should start
46
47
 
@@ -0,0 +1,49 @@
1
+ ---
2
+ description: Failing test before any fix — reproduce the bug first, then fix it
3
+ trigger: always_on
4
+ ---
5
+
6
+ # Debug-by-Test
7
+
8
+ > Reproduce first. Fix second. Never touch production code until you have a failing test that proves the bug exists.
9
+
10
+ ## The Rule
11
+
12
+ **When a bug, error, or unexpected behavior is encountered:**
13
+
14
+ 1. **STOP.** Do not touch the source code.
15
+ 2. **Write a failing test** that reproduces the exact bug.
16
+ 3. **Run it.** Confirm it fails for the right reason.
17
+ 4. **Now fix the code.** Make the failing test pass.
18
+ 5. **Run all tests.** Confirm nothing else broke.
19
+
20
+ This is non-negotiable. No "I can see the problem, let me just fix it."
21
+
22
+ ## Why
23
+
24
+ | Without this rule | With this rule |
25
+ |---|---|
26
+ | You guess at the fix, change code, hope it works | You prove the bug exists before touching anything |
27
+ | "Fixed" bugs silently reappear | The test catches regressions forever |
28
+ | You fix the symptom, not the cause | The test forces you to understand the actual behavior |
29
+ | No proof the fix works | Green test IS the proof |
30
+
31
+ ## Applies To
32
+
33
+ | Scenario | What To Do |
34
+ |----------|-----------|
35
+ | User reports a bug | Write a test reproducing it → fix → green |
36
+ | Test failure during development | Isolate with a minimal test → fix → green |
37
+ | Unexpected runtime error | Write a test triggering the error → fix → green |
38
+ | "This isn't working right" | Write a test showing the wrong behavior → fix → green |
39
+ | Spec/workflow bug (non-code) | Document the expected vs actual behavior before changing the spec |
40
+
41
+ ## What Gets Flagged
42
+
43
+ | Pattern | Verdict |
44
+ |---------|---------|
45
+ | Changing source code before writing a failing test | ❌ Rejected. Write the test first. |
46
+ | "I can see the issue, let me fix it quickly" | ❌ Rejected. Quick fixes skip understanding. |
47
+ | Writing a test AFTER the fix to prove it works | ❌ Rejected. That's backwards — you don't know what you actually fixed. |
48
+ | Failing test → source fix → all tests green | ✅ Correct. |
49
+ | Non-code bug → document expected vs actual → then fix | ✅ Correct. |
@@ -101,3 +101,13 @@ questions than it answers. The ratio should feel like an interview, not a lectur
101
101
  - "How should we implement X?" → defer to `/create-prd` → note it and move on
102
102
  - "What technology for X?" → defer to `/create-prd` → note it and move on
103
103
  - Don't burden the user with implementation or architecture during ideation unless they bring it up
104
+
105
+ ## What Gets Flagged
106
+
107
+ | Pattern | Verdict |
108
+ |---------|---------|
109
+ | Choosing a database without presenting options | ❌ Rejected. Architecture decision — present 2-3 options. |
110
+ | Asking user what to name a variable | ❌ Rejected. Implementation decision — just decide. |
111
+ | Deciding product pricing without asking user | ❌ Rejected. Product decision — user decides. |
112
+ | Unsure if product or architecture? → treating as product | ✅ Correct. Escalate upward. |
113
+ | Making file-naming call, stating choice briefly | ✅ Correct. Implementation decision. |
@@ -13,10 +13,10 @@ trigger: always_on
13
13
 
14
14
  | File Type | Max Lines | Reasoning |
15
15
  |-----------|-----------|-----------|
16
- | Components (`.tsx`) | 200 | Extract sub-components if larger |
17
- | Utilities / lib (`.ts`) | 300 | Split into focused modules |
18
- | Schema files (`.schema.ts`) | 150 | One domain per schema file |
19
- | Test files (`.test.ts`) | 400 | Group by feature, split if needed |
16
+ | Components | 200 | Extract sub-components if larger |
17
+ | Utilities / lib | 300 | Split into focused modules |
18
+ | Schema files | 150 | One domain per schema file |
19
+ | Test files | 400 | Group by feature, split if needed |
20
20
  | Config files | 100 | Keep flat and readable |
21
21
 
22
22
  ## Directory Documentation
@@ -30,13 +30,7 @@ trigger: always_on
30
30
 
31
31
  ## Naming Conventions
32
32
 
33
- | Element | Convention | Example |
34
- |---------|-----------|---------|
35
- | Schema files | `[feature].schema.ts` | `model-config.schema.ts` |
36
- | Components | PascalCase directory + `index.tsx` | `ModelSelector/index.tsx` |
37
- | Utilities | `[feature].ts` in `lib/` | `lib/rate-limiter.ts` |
38
- | API routes | `[resource]/[action].ts` | `api/models/list.ts` |
39
- | Test files | `[source-file].test.ts(x)` | `ModelSelector.test.tsx` |
33
+ Follow the project's established conventions in `.agent/instructions/patterns.md`. When no convention exists yet, use the stack's community standard.
40
34
 
41
35
  ## Anti-Spaghetti Rules
42
36
 
@@ -45,3 +39,14 @@ trigger: always_on
45
39
  - No business logic in components — components render, lib/ computes
46
40
  - No copy-paste patterns — if you wrote it twice, extract it
47
41
  - Same pattern everywhere — if existing code does X one way, new code does X the same way
42
+
43
+ ## What Gets Flagged
44
+
45
+ | Pattern | Verdict |
46
+ |---------|---------|
47
+ | Component file over 200 lines | ❌ Rejected. Extract sub-components. |
48
+ | Directory with 3+ files and no README.md | ❌ Rejected. Add one. |
49
+ | Circular import detected | ❌ Rejected. Restructure dependencies. |
50
+ | Copy-pasted logic in two files | ❌ Rejected. Extract to shared module. |
51
+ | New code uses different pattern than existing code for same thing | ❌ Rejected. Match existing conventions. |
52
+ | Clean, focused modules with README documentation | ✅ Correct. |
@@ -0,0 +1,71 @@
1
+ ---
2
+ description: Patterns, decisions, and blockers written to memory every conversation — empty memory files mean the pipeline never learns
3
+ trigger: always_on
4
+ ---
5
+
6
+ # Memory Capture
7
+
8
+ > Every conversation that involves a decision, correction, surprise, or blocker MUST record it before the conversation ends. Empty memory files mean the pipeline never learns.
9
+
10
+ ## The Problem
11
+
12
+ The pipeline has three memory files (`memory/patterns.md`, `memory/decisions.md`, `memory/blockers.md`) — all empty. `workflow.md` Step 5 says "Learn (MANDATORY)" but no enforcement exists. This rule IS the enforcement.
13
+
14
+ ## When to Write
15
+
16
+ | Trigger | What Happened | Target File | Format |
17
+ |---------|---------------|-------------|--------|
18
+ | User corrects me | "No, that's wrong" / "Don't do that" / "I told you to..." | `memory/patterns.md` | Anti-pattern (PAT-NNN) |
19
+ | User says "remember this" | Explicit instruction to retain information | `memory/decisions.md` | Decision (DEC-NNN) |
20
+ | Non-trivial decision made | Choice with ripple effects (see Protocol 06 triage) | `memory/decisions.md` | Decision (DEC-NNN) |
21
+ | Something blocks progress | External dependency, missing spec, tooling failure | `memory/blockers.md` | Blocker (BLOCKER-NNN) |
22
+ | Pattern emerges | Something works well or fails repeatedly | `memory/patterns.md` | Pattern (PAT-NNN) |
23
+
24
+ ## How to Write
25
+
26
+ ### Patterns (`memory/patterns.md`)
27
+
28
+ ```markdown
29
+ ### PAT-NNN: [Short description] (YYYY-MM-DD)
30
+ - **Type**: best-practice | anti-pattern
31
+ - **Confidence**: 0.5 (first occurrence) — increment by 0.1 on reuse, max 0.95
32
+ - **Context**: When/where this applies
33
+ - **Pattern**: What to do (or avoid)
34
+ - **Source**: What triggered this entry
35
+ ```
36
+
37
+ ### Decisions (`memory/decisions.md`)
38
+
39
+ ```markdown
40
+ ### DEC-NNN: [Decision summary] (YYYY-MM-DD)
41
+ - **Problem**: What needed deciding
42
+ - **Options considered**: At least 2
43
+ - **Decision**: What was chosen and why
44
+ - **Downstream**: What this affects
45
+ - **Reversibility**: High | Medium | Low
46
+ ```
47
+
48
+ ### Blockers (`memory/blockers.md`)
49
+
50
+ ```markdown
51
+ ### BLOCKER-NNN: [Description] (YYYY-MM-DD)
52
+ - **Status**: active | resolved
53
+ - **Impact**: What this blocks
54
+ - **Resolution**: How it was resolved (if resolved)
55
+ ```
56
+
57
+ ## When NOT to Write
58
+
59
+ - Routine/trivial tasks with nothing new learned — skip
60
+ - Isolated implementation decisions (variable names, file paths) — skip
61
+ - Repeating an existing pattern already logged — update confidence instead
62
+
63
+ ## Pre-Completion Check
64
+
65
+ Before calling `notify_user` to report completion of ANY workflow or substantial task:
66
+
67
+ 1. **Scan this conversation** for triggers in the table above
68
+ 2. **If triggers found** → write entries to the appropriate memory files
69
+ 3. **If no triggers** → explicitly confirm: "No new patterns, decisions, or blockers to log"
70
+
71
+ This check is **not skippable**. It applies to every pipeline stage, every conversation, every session.
@@ -79,3 +79,13 @@ interesting", hedging language ("maybe", "possibly", "sort of")
79
79
 
80
80
  5. **Never mistake frustration for instruction.** "This API is a mess" is not an
81
81
  instruction to refactor the API. It might be — but ask first.
82
+
83
+ ## What Gets Flagged
84
+
85
+ | Pattern | Verdict |
86
+ |---------|---------|
87
+ | Editing code because user asked "is this right?" | ❌ Rejected. That's a question — discuss. |
88
+ | Refactoring because user said "this is messy" | ❌ Rejected. Frustration ≠ instruction — ask first. |
89
+ | Switching approach because user asked "what about X?" | ❌ Rejected. They're exploring — discuss trade-offs. |
90
+ | Question → discussion → user commands → action | ✅ Correct. |
91
+ | Ambiguous input → clarification request | ✅ Correct. |
@@ -41,3 +41,14 @@ Every response includes:
41
41
  - `X-Content-Type-Options: nosniff`
42
42
  - `X-Frame-Options: DENY`
43
43
  - `Strict-Transport-Security` — HSTS with long max-age
44
+
45
+ ## What Gets Flagged
46
+
47
+ | Pattern | Verdict |
48
+ |---------|---------|
49
+ | PII field in AI model request payload | ❌ Rejected. Strip before sending. |
50
+ | API key hardcoded in source file | ❌ Rejected. Use environment variable. |
51
+ | User input rendered as raw HTML | ❌ Rejected. Always escape. |
52
+ | Public endpoint without rate limiting | ❌ Rejected. Add rate limiter. |
53
+ | API endpoint without input validation | ❌ Rejected. Add {{CONTRACT_LIBRARY}} schema. |
54
+ | Encrypted PII, parameterized queries, server-side secrets | ✅ Correct. |
@@ -0,0 +1,59 @@
1
+ ---
2
+ description: One question at a time with options, pros and cons, and a recommendation — never batch questions
3
+ trigger: always_on
4
+ ---
5
+
6
+ # Single-Question Flow
7
+
8
+ > Never batch questions. One question at a time. Options, pros and cons, recommendation.
9
+
10
+ ## The Rule
11
+
12
+ **Every question — to the user OR to yourself — follows the same structure:**
13
+
14
+ 1. **One question only.** Never ask multiple questions in a single message. If you have 5 things to ask, ask the first one. Wait for the answer. Then ask the second.
15
+
16
+ 2. **Present options.** List 2–4 concrete options (not open-ended "what do you want?").
17
+
18
+ 3. **Pros and cons.** Each option gets specific trade-offs — not vague qualities.
19
+
20
+ 4. **Recommend one.** State which option you'd choose and why. The user can override.
21
+
22
+ ## Applies to EVERYTHING
23
+
24
+ This is not just for user-facing questions. It applies to:
25
+
26
+ | Scenario | What This Means |
27
+ |----------|----------------|
28
+ | Asking the user a product decision | One decision at a time, options + recommendation |
29
+ | Asking the user a preference | One preference at a time, options + recommendation |
30
+ | Internal reasoning ("how should I structure this?") | Enumerate options, weigh trade-offs, pick one |
31
+ | Ideation interviews | One domain/feature question at a time |
32
+ | PRD stack decisions | One technology choice at a time |
33
+ | Ambiguity resolution | One gap at a time |
34
+
35
+ ## Format
36
+
37
+ ```
38
+ **[Question in plain language]**
39
+
40
+ | Option | Pros | Cons |
41
+ |--------|------|------|
42
+ | A | ... | ... |
43
+ | B | ... | ... |
44
+ | C | ... | ... |
45
+
46
+ **Recommendation:** Option B — [specific reason why].
47
+ ```
48
+
49
+ For internal reasoning, use the same structure but don't present it to the user — just apply the discipline internally and state your decision with brief reasoning.
50
+
51
+ ## What Gets Flagged
52
+
53
+ | Pattern | Verdict |
54
+ |---------|---------|
55
+ | "Here are 5 questions for you:" | ❌ Rejected. Ask one. |
56
+ | "What do you think?" (open-ended, no options) | ❌ Rejected. Provide options. |
57
+ | "Should we use X?" (no alternatives shown) | ❌ Rejected. Show at least 2 options with trade-offs. |
58
+ | One question + 3 options + pros/cons + recommendation | ✅ Correct. |
59
+ | "I chose X because [reason]" (internal, stated briefly) | ✅ Correct. |
@@ -0,0 +1,45 @@
1
+ ---
2
+ description: Check skills and MCPs before reasoning on your own — leverage existing knowledge first
3
+ trigger: always_on
4
+ ---
5
+
6
+ # Skill and MCP First
7
+
8
+ > Before doing anything yourself, check if a skill or MCP already knows how to do it.
9
+
10
+ ## The Rule
11
+
12
+ **When you receive any task, BEFORE reasoning about how to do it:**
13
+
14
+ 1. **Scan skills.** Read through the skill names and descriptions already loaded in your context. If a skill matches the task or a sub-task, read its `SKILL.md` and follow it.
15
+
16
+ 2. **Scan MCPs.** Check if any connected MCP server provides tools relevant to the task. If so, use the MCP tool instead of inventing your own approach.
17
+
18
+ 3. **Only then think.** If no skill or MCP covers the task, proceed with your own reasoning.
19
+
20
+ ## Why
21
+
22
+ | Without this rule | With this rule |
23
+ |---|---|
24
+ | You reinvent patterns already documented in skills | You leverage tested, refined procedures |
25
+ | You ignore MCP tools and use workarounds | You use the right tool for the job |
26
+ | Every session starts from scratch | Skills accumulate institutional knowledge |
27
+ | Quality varies by conversation | Skills enforce consistent quality |
28
+
29
+ ## What Counts as a Match
30
+
31
+ - **Exact match**: Skill name/description directly describes the task → read and follow it
32
+ - **Partial match**: Skill covers a sub-task or related concern → read it for relevant sections
33
+ - **MCP match**: An MCP server has tools that handle part of the task → use them
34
+ - **No match**: No skill or MCP is relevant → proceed with your own reasoning and note it
35
+
36
+ ## What Gets Flagged
37
+
38
+ | Pattern | Verdict |
39
+ |---------|---------|
40
+ | Writing a test strategy without checking `Testing Strategist` skill | ❌ Rejected. |
41
+ | Debugging without checking `systematic-debugging` skill | ❌ Rejected. |
42
+ | Designing an API without checking `api-design-principles` skill | ❌ Rejected. |
43
+ | Reading skill → following its methodology → executing | ✅ Correct. |
44
+ | No relevant skill found → proceeding with own reasoning | ✅ Correct. |
45
+ | Using MCP tool instead of manual workaround | ✅ Correct. |
@@ -52,3 +52,13 @@ Specs must go **deep enough** that an implementer needs zero clarification.
52
52
  3. Every API call has loading, success, and error UI states
53
53
  4. Every responsive breakpoint has layout behavior specified
54
54
  5. Every interaction has keyboard, mouse, and touch behavior defined
55
+
56
+ ## What Gets Flagged
57
+
58
+ | Pattern | Verdict |
59
+ |---------|---------|
60
+ | "Fast response times" in a spec | ❌ Rejected. Specify P95 latency threshold. |
61
+ | "Handle errors gracefully" | ❌ Rejected. Specify error codes and response shapes. |
62
+ | Endpoint without typed request/response schema | ❌ Rejected. Add full schema. |
63
+ | Form spec without per-field validation rules | ❌ Rejected. Specify each field. |
64
+ | "P95 < 200ms", "returns 409 with `{error, code}`" | ✅ Correct. Testable and specific. |
@@ -55,3 +55,13 @@ Red → Green → Refactor
55
55
  - Test file lives next to source: `foo.ts` → `foo.test.ts`
56
56
  - No `any` in test files — type your mocks
57
57
  - Coverage minimum: 80% lines, 90% branches on critical paths
58
+
59
+ ## What Gets Flagged
60
+
61
+ | Pattern | Verdict |
62
+ |---------|---------|
63
+ | Implementation code written before schema | ❌ Rejected. Schema first. |
64
+ | Tests written after implementation | ❌ Rejected. Red → Green → Refactor. |
65
+ | `any` type in test file | ❌ Rejected. Type your mocks. |
66
+ | Endpoint without contract validation test | ❌ Rejected. Add contract test. |
67
+ | Schema → failing test → implementation → green | ✅ Correct. |
@@ -33,10 +33,13 @@ A feature slice is complete when:
33
33
  - [ ] Auth gates: every route that requires auth has the auth gate implemented (not stubbed)
34
34
  - [ ] The feature is reachable from the app's entry point via normal user navigation
35
35
 
36
- ## Anti-Patterns
37
-
38
- | Don't | Do |
39
- |-------|-----|
40
- | "I'll add the admin panel later" | Include admin CRUD in the slice |
41
- | "The API works, frontend next sprint" | Ship them together or not at all |
42
- | "Database is set up, just need endpoints" | That's not a slice, that's a layer |
36
+ ## What Gets Flagged
37
+
38
+ | Pattern | Verdict |
39
+ |---------|---------|
40
+ | "I'll add the admin panel later" | ❌ Rejected. Include admin CRUD in the slice. |
41
+ | "The API works, frontend next sprint" | ❌ Rejected. Ship them together or not at all. |
42
+ | "Database is set up, just need endpoints" | ❌ Rejected. That's a layer, not a slice. |
43
+ | Route without navigation link from existing UI | ❌ Rejected. Must be reachable. |
44
+ | Auth-required route without auth gate | ❌ Rejected. Implement the gate. |
45
+ | All 4 layers + tests + navigation + auth gates | ✅ Correct. |
@@ -555,6 +555,38 @@ When a cross-cut is identified, log it to the appropriate CX file:
555
555
  | During breadth sweep | Domain CX file | Medium |
556
556
  | During drilling | Sub-domain CX file or feature's cross-cut notes | High |
557
557
 
558
+ ### CX Decision Gate (Mandatory — NOT skippable)
559
+
560
+ > **This is the enforcement mechanism for the Cross-Cut Watch Protocol.**
561
+ > "Always-on" means there is a hard gate, not a suggestion.
562
+
563
+ **After ANY of these trigger events, STOP and run this gate before moving to the next item:**
564
+
565
+ | Trigger Event | Example |
566
+ |---------------|---------|
567
+ | Open question (OQ) resolved | User decides hiring fee model = shop pays |
568
+ | Deep Think hypothesis confirmed | Agent proposed AI parts ordering, user confirmed |
569
+ | User makes any product decision | User chooses freemium over paid-only |
570
+ | Feature deepened reveals dependency | Certification tracking needs data from Training domain |
571
+ | Edge case identified with cross-domain impact | Payment failure in domain A must notify domain B |
572
+
573
+ **Gate questions** (answer all three):
574
+
575
+ 1. **New dependency?** — Does this decision create a dependency on another domain?
576
+ 2. **Modified cross-cut?** — Does it change an existing CX entry?
577
+ 3. **Cross-domain state/permissions/triggers?** — Does it affect state, permissions, or trigger chains in another domain?
578
+
579
+ **If YES to any** → update the relevant CX file(s) **immediately**, before moving to the next item. Write the CX entry with:
580
+ - Source domain and feature
581
+ - Target domain(s) affected
582
+ - Nature of the cross-cut (data dependency, trigger chain, permission, state)
583
+ - Confidence level based on discovery context
584
+
585
+ **If NO to all** → proceed. No logging needed for clean passes.
586
+
587
+ > [!CAUTION]
588
+ > **The gate is the point.** The most common failure mode is resolving an OQ, writing the decision to the feature file, and moving on without checking CX. The hiring fee model affects Payments, Supplier Integration, Analytics, and Consumer Platform visibility — 6 cross-domain connections that would be silently lost without this gate.
589
+
558
590
  ### Cross-Cut Synthesis Questions
559
591
 
560
592
  For each confirmed cross-cut (CX entry with High confidence), answer all five synthesis questions per the `fractal-cx-template.md`:
@@ -111,3 +111,12 @@ Use `notify_user` to present both documents with self-check results.
111
111
  **STOP** — do NOT propose `/decompose-architecture` or any other pipeline workflow. The only valid next step is:
112
112
 
113
113
  - `/audit-ambiguity architecture` — unconditionally mandatory. The self-check above cannot replace an independent audit. After the audit passes, the next step is `/decompose-architecture`.
114
+
115
+ ## Completion Gate (MANDATORY)
116
+
117
+ Before reporting completion to the user:
118
+
119
+ 1. **Memory check** — Apply rule `memory-capture`. Write any patterns, decisions, or blockers from this workflow to `.agent/progress/memory/`. If nothing to write, confirm: "No new patterns/decisions/blockers."
120
+ 2. **Progress update** — Update `.agent/progress/` tracking files if they exist.
121
+ 3. **Session log** — Write session entry to `.agent/progress/sessions/`.
122
+
@@ -91,3 +91,12 @@ Present the proposed domain decomposition to the user for validation.
91
91
 
92
92
  ### Step A — Run `.agent/workflows/decompose-architecture-structure.md`
93
93
  ### Step B — Run `.agent/workflows/decompose-architecture-validate.md`
94
+
95
+ ## Completion Gate (MANDATORY)
96
+
97
+ Before reporting completion to the user:
98
+
99
+ 1. **Memory check** — Apply rule `memory-capture`. Write any patterns, decisions, or blockers from this workflow to `.agent/progress/memory/`. If nothing to write, confirm: "No new patterns/decisions/blockers."
100
+ 2. **Progress update** — Update `.agent/progress/` tracking files if they exist.
101
+ 3. **Session log** — Write session entry to `.agent/progress/sessions/`.
102
+
@@ -46,7 +46,10 @@ Read `.agent/skills/prd-templates/references/engagement-tier-protocol.md` — ap
46
46
 
47
47
  ## 3. Domain Exploration — Recursive Model
48
48
 
49
- Read `.agent/skills/idea-extraction/SKILL.md` — follow the **Recursive Domain Exhaustion Protocol**, **Deep Think Protocol**, **Node Classification Gate**, and **Reactive Depth Protocol**.
49
+ Read `.agent/skills/idea-extraction/SKILL.md` — follow the **Recursive Domain Exhaustion Protocol**, **Deep Think Protocol**, **Node Classification Gate**, **Reactive Depth Protocol**, and **CX Decision Gate**.
50
+
51
+ > [!IMPORTANT]
52
+ > **CX Decision Gate is mandatory at every level.** After resolving ANY open question, confirming ANY Deep Think hypothesis, or receiving ANY product decision from the user → STOP and run the CX Decision Gate from `idea-extraction/SKILL.md` before proceeding. This is the #1 enforcement gap — decisions silently drop cross-domain connections without this gate.
50
53
 
51
54
  Read `## Expansion Mode` and `## Structural Classification` from `docs/plans/ideation/ideation-index.md`.
52
55
 
@@ -117,9 +120,9 @@ For rejected features: note in `ideation-index.md` under a `## Considered & Reje
117
120
  For each Must Have feature, use the recursive model from `idea-extraction/SKILL.md`:
118
121
  1. **Level 1**: Sub-features. Run Classification Gate — sub-domain or feature?
119
122
  2. **Level 2**: Edge cases and failure modes. Fill feature file sections per `fractal-feature-template.md`.
120
- 3. **Level 3** (complex features): Cross-cuts with evidence → parent CX file.
123
+ 3. **Level 3** (complex features): Full cross-cut synthesis per `fractal-cx-template.md`.
121
124
 
122
- **Deep Think at each level.** Write results to feature files.
125
+ **At EVERY level**: Deep Think + **CX Decision Gate**. After each decision, OQ resolution, or confirmed hypothesis → run CX Decision Gate → write CX entries immediately → then proceed.
123
126
 
124
127
  ### 5c. Feature deepening — Should Haves (lighter touch)
125
128
 
@@ -126,3 +126,12 @@ Explores constraints, success metrics, and competitive positioning. Runs leaf-no
126
126
  - `/audit-ambiguity ideation` — mandatory coverage verification before `/create-prd` can begin.
127
127
 
128
128
  > If the user wants to pause, save progress and note where to resume. When resuming, the next step remains `/audit-ambiguity ideation`.
129
+
130
+ ## Completion Gate (MANDATORY)
131
+
132
+ Before reporting completion to the user:
133
+
134
+ 1. **Memory check** — Apply rule `memory-capture`. Write any patterns, decisions, or blockers from this workflow to `.agent/progress/memory/`. If nothing to write, confirm: "No new patterns/decisions/blockers."
135
+ 2. **Progress update** — Update `.agent/progress/` tracking files if they exist.
136
+ 3. **Session log** — Write session entry to `.agent/progress/sessions/`.
137
+
@@ -50,3 +50,11 @@ Executes the TDD cycle (RED: write failing tests → GREEN: implement → REFACT
50
50
  - [ ] Full validation passes (Validation Cmd from surface stack map)
51
51
  - [ ] All 4 progress tracking files updated (slice, phase, index, memory)
52
52
  - [ ] Each tracking file verified by re-reading after edit
53
+
54
+ ## Completion Gate (MANDATORY)
55
+
56
+ Before reporting completion to the user:
57
+
58
+ 1. **Memory check** — Apply rule `memory-capture`. Write any patterns, decisions, or blockers from this workflow to `.agent/progress/memory/`. If nothing to write, confirm: "No new patterns/decisions/blockers."
59
+ 2. **Progress update** — Update `.agent/progress/` tracking files if they exist.
60
+ 3. **Session log** — Write session entry to `.agent/progress/sessions/`.
@@ -43,3 +43,12 @@ Run `.agent/workflows/plan-phase-preflight.md`.
43
43
  Slice identification, dependency ordering, acceptance criteria, progress file generation, and bootstrap completeness gate.
44
44
 
45
45
  Run `.agent/workflows/plan-phase-write.md`.
46
+
47
+ ## Completion Gate (MANDATORY)
48
+
49
+ Before reporting completion to the user:
50
+
51
+ 1. **Memory check** — Apply rule `memory-capture`. Write any patterns, decisions, or blockers from this workflow to `.agent/progress/memory/`. If nothing to write, confirm: "No new patterns/decisions/blockers."
52
+ 2. **Progress update** — Update `.agent/progress/` tracking files if they exist.
53
+ 3. **Session log** — Write session entry to `.agent/progress/sessions/`.
54
+
@@ -214,7 +214,12 @@ Scan these files for any literal `{{` characters:
214
214
  6. `.agent/instructions/patterns.md`
215
215
  7. `.agent/instructions/tech-stack.md`
216
216
 
217
- **If unfilled patterns found** — list each with remediation:
217
+ **If unfilled patterns found** — check the current pipeline phase before recommending remediation:
218
+
219
+ 1. **Detect phase**: Check filesystem markers per `GEMINI.md` → Pipeline Phase Detection table.
220
+ 2. **If phase is Pre-PRD** (no `architecture-design.md` exists) → report:
221
+ > "Placeholders remain unfilled — this is **expected** at the current pipeline phase (`<detected_phase>`). They will be filled when `/create-prd` → `/bootstrap-agents-fill` runs after ideation completes."
222
+ 3. **If phase is Post-PRD** (`architecture-design.md` exists) → show remediation table:
218
223
 
219
224
  | File(s) | Remediation |
220
225
  |---------|-------------|
@@ -50,3 +50,12 @@ Runs production readiness checks: API documentation sync, accessibility audit, p
50
50
  - [ ] All production readiness checks pass (Shard 2)
51
51
  - [ ] Validation report written to `docs/audits/phase-N-validation.md`
52
52
  - [ ] Pass/fail verdict determined
53
+
54
+ ## Completion Gate (MANDATORY)
55
+
56
+ Before reporting completion to the user:
57
+
58
+ 1. **Memory check** — Apply rule `memory-capture`. Write any patterns, decisions, or blockers from this workflow to `.agent/progress/memory/`. If nothing to write, confirm: "No new patterns/decisions/blockers."
59
+ 2. **Progress update** — Update `.agent/progress/` tracking files if they exist.
60
+ 3. **Session log** — Write session entry to `.agent/progress/sessions/`.
61
+
@@ -68,3 +68,12 @@ Read .agent/skills/code-review-pro/SKILL.md and apply its adversarial review dis
68
68
 
69
69
  > [!CAUTION]
70
70
  > After completing all IA shards, the **only** valid next step is `/write-be-spec`. Do NOT propose `/plan-phase` or `/implement-slice` — those require completed BE and FE specs. This applies to ALL project types: web apps, CLI tools, bash scripts, APIs, desktop apps. No project skips the BE/FE spec layers.
71
+
72
+ ## Completion Gate (MANDATORY)
73
+
74
+ Before reporting completion to the user:
75
+
76
+ 1. **Memory check** — Apply rule `memory-capture`. Write any patterns, decisions, or blockers from this workflow to `.agent/progress/memory/`. If nothing to write, confirm: "No new patterns/decisions/blockers."
77
+ 2. **Progress update** — Update `.agent/progress/` tracking files if they exist.
78
+ 3. **Session log** — Write session entry to `.agent/progress/sessions/`.
79
+
@@ -74,3 +74,12 @@ Read .agent/skills/code-review-pro/SKILL.md and apply its adversarial review dis
74
74
  - [ ] Every deep dive key decision is reflected in the spec
75
75
  - [ ] Every cross-shard reference has been resolved
76
76
  - [ ] IA Source Map is complete — no BE spec section lacks a traceable IA source
77
+
78
+ ## Completion Gate (MANDATORY)
79
+
80
+ Before reporting completion to the user:
81
+
82
+ 1. **Memory check** — Apply rule `memory-capture`. Write any patterns, decisions, or blockers from this workflow to `.agent/progress/memory/`. If nothing to write, confirm: "No new patterns/decisions/blockers."
83
+ 2. **Progress update** — Update `.agent/progress/` tracking files if they exist.
84
+ 3. **Session log** — Write session entry to `.agent/progress/sessions/`.
85
+
@@ -71,3 +71,12 @@ Read .agent/skills/code-review-pro/SKILL.md and apply its adversarial review dis
71
71
  - [ ] Responsive behavior specified for all breakpoints
72
72
  - [ ] IA shard's accessibility section fully consumed (not re-derived from BE spec)
73
73
  - [ ] Source Map is complete — no FE spec section lacks a traceable source
74
+
75
+ ## Completion Gate (MANDATORY)
76
+
77
+ Before reporting completion to the user:
78
+
79
+ 1. **Memory check** — Apply rule `memory-capture`. Write any patterns, decisions, or blockers from this workflow to `.agent/progress/memory/`. If nothing to write, confirm: "No new patterns/decisions/blockers."
80
+ 2. **Progress update** — Update `.agent/progress/` tracking files if they exist.
81
+ 3. **Session log** — Write session entry to `.agent/progress/sessions/`.
82
+
@@ -1,35 +1,23 @@
1
1
  # CFSA Antigravity — Constraint-First Specification Architecture
2
2
 
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."
3
+ **CFSA pipeline** raw idea exhaustive specs test-driven production code. Stack/agent-agnostic. Phases control scope, never quality. No "fix it later."
4
4
 
5
5
  ### Entry Point
6
6
 
7
- Start the pipeline with:
8
-
9
7
  ```
10
8
  /ideate # From scratch — deep interview
11
9
  /ideate @path/to/your-idea.md # From existing document
12
10
  ```
13
11
 
14
- The `@file` pattern is natively supported by `/ideate` (with full multi-mode input classification) and as a simple document-read input by `/evolve-feature`, `/resolve-ambiguity`, and `/propagate-decision`. Other pipeline commands accept direct invocation; `@file` can be passed to them but no automatic input classification is applied — the workflow reads the file and treats it as inline context.
12
+ `@file` is natively supported by `/ideate` (with multi-mode input classification) and as simple document-read by `/evolve-feature`, `/resolve-ambiguity`, `/propagate-decision`.
15
13
 
16
14
  ### Progressive Decision Lock
17
15
 
18
- Decisions in this pipeline are **progressively locked**. Each pipeline stage builds on the locked decisions of previous stages:
19
-
20
- 1. `/ideate` locks the **vision** — problem, personas, features, constraints
21
- 2. `/create-prd` locks the **architecture** — tech stack, system design, security model
22
- 3. `/decompose-architecture` locks the **domain boundaries** — shard structure, dependencies
23
- 4. `/write-architecture-spec` locks the **interaction specs** — per-shard contracts, data models
24
- 5. `/write-be-spec` locks the **backend contracts** — API endpoints, schemas, middleware
25
- 6. `/write-fe-spec` locks the **frontend specs** — components, state, interactions
26
- 7. `/plan-phase` locks the **implementation order** — dependency-ordered TDD slices
27
- 7.5. `/verify-infrastructure` locks the **operational foundation** — CI/CD green, staging live, migrations clean, auth working
28
- 8. `/implement-slice` locks the **code** — tests → implementation → validation
16
+ Decisions are **progressively locked**: `/ideate` vision, `/create-prd` architecture, `/decompose-architecture` domain boundaries, `/write-architecture-spec` → interaction specs, `/write-be-spec` → backend contracts, `/write-fe-spec` → frontend specs, `/plan-phase` → implementation order, `/verify-infrastructure` → operational foundation, `/implement-slice` → code.
29
17
 
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.
18
+ Once locked, downstream stages may not contradict. To change a locked decision, re-run the originating stage and cascade.
31
19
 
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 -->
20
+ <!-- Maintained by bootstrap-agents-fill.md Step 4 + kit maintainer checklist -->
33
21
  ### Pipeline Workflow Table
34
22
 
35
23
  | # | Command | Input | Output | Stage |
@@ -40,16 +28,12 @@ Once a stage is locked, downstream stages may not contradict it. To change a loc
40
28
  | ↳ | `/ideate-validate` | Domains + features | `docs/plans/vision.md` (human summary compiled from ideation folder) | Discovery |
41
29
  | 2 | `/create-prd` | `ideation-index.md` | `architecture-design.md` + `ENGINEERING-STANDARDS.md` + `data-placement-strategy.md` | Design |
42
30
 
43
- > **Persistent intermediary**: `docs/plans/ideation/` folder — kept permanently as the pipeline's source of truth for the ideation phase.
44
-
45
31
  | ↳ | `/create-prd-stack` | `ideation/meta/constraints.md` | Tech stack decisions | Design |
46
32
  | ↳ | `/create-prd-design-system` | Tech stack + brand-guidelines | `docs/plans/design-system.md` | Design |
47
33
  | ↳ | `/create-prd-architecture` | Tech stack | System architecture + data strategy | Design |
48
34
  | ↳ | `/create-prd-security` | Architecture | Security model + integrations | Design |
49
35
  | ↳ | `/create-prd-compile` | All prior steps | `architecture-design.md` + `ENGINEERING-STANDARDS.md` | Design |
50
36
 
51
- > **Progressive working artifact**: `docs/plans/architecture-draft.md` — written incrementally by shards 1–3, read by shard 4 to compile the final `architecture-design.md`.
52
-
53
37
  | 3 | `/decompose-architecture` | `architecture-design.md` | IA shards + layer indexes | Design |
54
38
  | ↳ | `/decompose-architecture-structure` | Approved domains | Directory structure + shard skeletons + indexes | Design |
55
39
  | ↳ | `/decompose-architecture-validate` | Skeletons | Deep dives + type annotations + validation | Design |
@@ -88,17 +72,13 @@ Once a stage is locked, downstream stages may not contradict it. To change a loc
88
72
  | 11 | `/evolve-contract` | Changed `{{CONTRACT_LIBRARY}}` schema | Safe schema migration | Maintenance |
89
73
 
90
74
 
91
- > **Note**: Rows marked with ↳ are independently-invocable sub-workflows (shards)
92
- > of their parent command. The parent orchestrates them in sequence, but each shard
93
- > can also be run standalone with its own prerequisites. `/bootstrap-agents` is also
94
- > sharded into `/bootstrap-agents-fill` and `/bootstrap-agents-provision`.
95
- > `/resolve-ambiguity`, `/remediate-pipeline`, `/propagate-decision`, and `/evolve-feature` are utility commands callable from any stage — they are not sequential pipeline steps.
75
+ > **Note**: rows are independently-invocable shards. Utility commands (`/resolve-ambiguity`, `/remediate-pipeline`, `/propagate-decision`, `/evolve-feature`) are callable from any stage.
96
76
 
97
77
  > [!WARNING]
98
78
  > If `docs/plans/ideation/ideation-index.md` does not exist, the pipeline has not started — run `/ideate` before any other workflow.
99
79
 
100
80
  > [!WARNING]
101
- > If `{{PLACEHOLDER}}` values appear anywhere in this file, bootstrap has not run do not attempt implementation work.
81
+ > If `{{PLACEHOLDER}}` values appear in this file: check the current pipeline phase (see below). Pre-PRD placeholders are expected, they fill at `/create-prd`. Post-PRD → run `/bootstrap-agents-fill`.
102
82
 
103
83
  ---
104
84
 
@@ -122,11 +102,11 @@ Once a stage is locked, downstream stages may not contradict it. To change a loc
122
102
 
123
103
  | Guide | Description |
124
104
  |-------|-------------|
125
- | 🛠️ [Workflow](.agent/instructions/workflow.md) | Execution sequence & principles |
126
- | 💻 [Tech Stack](.agent/instructions/tech-stack.md) | Technology decisions & skill mappings |
127
- | 📐 [Patterns](.agent/instructions/patterns.md) | Code conventions & architecture patterns |
128
- | 📁 [Structure](.agent/instructions/structure.md) | Directory layout & protected files |
129
- | ⌨️ [Commands](.agent/instructions/commands.md) | Dev, test, lint, build commands |
105
+ | 🛠️ [Workflow](.agent/instructions/workflow.md) | Execution sequence |
106
+ | 💻 [Tech Stack](.agent/instructions/tech-stack.md) | Technology decisions |
107
+ | 📐 [Patterns](.agent/instructions/patterns.md) | Code conventions |
108
+ | 📁 [Structure](.agent/instructions/structure.md) | Directory layout |
109
+ | ⌨️ [Commands](.agent/instructions/commands.md) | Dev, test, lint, build |
130
110
 
131
111
  ### Agent Rules
132
112
 
@@ -143,6 +123,10 @@ Rules in `.agent/rules/` are **always active** — they apply to every task, eve
143
123
  | 🗣️ [question-vs-command](.agent/rules/question-vs-command.md) | Questions = discuss, Commands = act, Ambiguous = ask |
144
124
  | 🎯 [decision-classification](.agent/rules/decision-classification.md) | Product = user, Architecture = options, Implementation = agent |
145
125
  | ✅ [completion-checklist](.agent/rules/completion-checklist.md) | Code ≠ done. Code + tests + tracking = done |
126
+ | 🧠 [memory-capture](.agent/rules/memory-capture.md) | Patterns, decisions, blockers written every conversation |
127
+ | 🔢 [single-question](.agent/rules/single-question.md) | One question at a time, options + pros/cons + recommendation |
128
+ | 🐛 [debug-by-test](.agent/rules/debug-by-test.md) | Failing test before any fix — reproduce first, fix second |
129
+ | 🔍 [skill-mcp-first](.agent/rules/skill-mcp-first.md) | Check skills and MCPs before reasoning on your own |
146
130
 
147
131
  ### Installed Skills
148
132
 
@@ -156,27 +140,43 @@ Rules in `.agent/rules/` are **always active** — they apply to every task, eve
156
140
  4. **TDD: failing test before code** — Red → Green → Refactor, every slice, every surface
157
141
  5. **Security-first** — PII never leaks, inputs validated, secrets server-side only
158
142
  6. **Write decisions to disk immediately** — Every confirmed decision is written to its output file the moment the user confirms it. Never batch decisions in-memory across a long conversation. If the conversation truncates, all confirmed work must survive on disk.
143
+ 7. **Write to memory every conversation** — Before ending any workflow or conversation, write patterns to `memory/patterns.md`, decisions to `memory/decisions.md`, blockers to `memory/blockers.md`. See rule: `memory-capture`.
144
+
145
+ ### Pipeline Phase Detection
146
+
147
+ Before acting on any task, detect the current pipeline phase from filesystem markers:
148
+
149
+ | Phase | Marker | Valid Actions |
150
+ |-------|--------|---------------|
151
+ | Pre-ideation | No `docs/plans/ideation/ideation-index.md` | Only `/ideate` |
152
+ | Ideating | `ideation/` has content, no `vision.md` | Ideation workflows only |
153
+ | Ideation complete | `ideation-index.md` + `vision.md` exist | `/audit-ambiguity` → `/create-prd` |
154
+ | PRD in progress | `architecture-draft.md` exists | PRD workflows only |
155
+ | PRD complete | `architecture-design.md` + `ENGINEERING-STANDARDS.md` | `/decompose-architecture` |
156
+ | Decomposition done | IA shards in `docs/plans/ia/` | `/write-architecture-spec` |
157
+ | Spec writing | BE/FE specs exist | `/write-be-spec`, `/write-fe-spec` |
158
+ | Planning | Phase plan in `docs/plans/phases/` | `/plan-phase` |
159
+ | Implementation | `.agent/progress/` has content | `/implement-slice` |
160
+
161
+ **Use this table to gate every action.** If a user runs a command that doesn't match their current phase, explain what phase they're in and what to run instead.
159
162
 
160
163
  ### Decision Tree
161
164
 
162
165
  ```mermaid
163
166
  graph TD
164
- A[Task Received] --> B{Pipeline complete?}
165
- B -->|No - ideation-index.md missing| C[Run /ideate first]
166
- B -->|No - placeholders unfilled| D[Run /create-prd first]
167
- B -->|Yes| E[Read Rules]
168
- E --> F[Read Instructions]
169
- F --> G{Scan Skills}
167
+ A[Task Received] --> P{Detect Phase}
168
+ P --> B{Task matches phase?}
169
+ B -->|No| F[STOP: explain phase + valid actions]
170
+ B -->|Yes| E[Read Rules + Instructions]
171
+ E --> G{Scan Skills}
170
172
  G -->|Found| H[Load Skill]
171
- G -->|None| I{Scan MCP}
172
- I -->|Found| J[Use MCP Tools]
173
- I -->|None| K[Plan: Contract → Test → Implement]
174
- K --> L[Execute]
175
- L --> M[MANDATORY: Run Validation]
173
+ G -->|None| K[Execute Task]
174
+ K --> L[MANDATORY: Run Validation]
175
+ L --> M[MANDATORY: Write Memory]
176
176
  M --> N[Update Progress Tracking]
177
177
  N --> O[Complete]
178
178
  ```
179
179
 
180
180
  ### Mandatory Validation
181
181
 
182
- **CRITICAL:** Run the Validation Cmd from `.agent/instructions/commands.md` after **EVERY** code change. Do not finish a task until all pass.
182
+ Run the Validation Cmd from `.agent/instructions/commands.md` after **EVERY** code change. Do not finish a task until all pass.
@@ -23,7 +23,7 @@ The intelligence of the kit lives entirely within the `.agent/` directory.
23
23
  ### Core Components
24
24
 
25
25
  * **Instructions:** (`workflow.md`, `tech-stack.md`, `structure.md`, `patterns.md`, `commands.md`) 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.
26
- * **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
+ * **Rules:** Preemptively loaded constraints that apply to *every* task. Covers security, TDD, vertical slices, debugging discipline, memory capture, questioning style, and more. See `GEMINI.md` → Agent Rules table for the full list.
27
27
  * **Skill Library:** (`.agent/skill-library/`) Installable skill packages organized by category (e.g., `stack/databases/`, `stack/frontend-frameworks/`). Skills are provisioned from here into `.agent/skills/` by the bootstrap system when tech decisions are confirmed. Contains `MANIFEST.md` with the full taxonomy.
28
28
  * **Skills:** Modular capabilities (e.g., `technical-writer`, `brainstorming`). Agents load these explicitly when a task requires them, preventing context bloat.
29
29
  * **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.
@@ -367,6 +367,11 @@ Workflows are designed to end with explicit NEXT STEPS. An agent shouldn't guess
367
367
  - [ ] If the workflow uses new prd-template reference files, add them to `prd-templates/SKILL.md`
368
368
  - [ ] If the workflow introduces a new skill, add it to `.agent/skill-library/MANIFEST.md`
369
369
 
370
+ **When a new rule is added to `.agent/rules/`:**
371
+
372
+ - [ ] Add a row to the `GEMINI.md` Agent Rules table
373
+ - [ ] If the rule uses `{{PLACEHOLDER}}` values, follow the placeholder checklist below
374
+
370
375
  **When adding a `{{PLACEHOLDER}}` to any `.agent/rules/*.md`**
371
376
 
372
377
  - [ ] 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)