cfsa-antigravity 2.0.0 → 2.2.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 (116) hide show
  1. package/README.md +14 -0
  2. package/package.json +1 -1
  3. package/template/.agent/instructions/commands.md +8 -32
  4. package/template/.agent/instructions/example.md +21 -0
  5. package/template/.agent/instructions/patterns.md +3 -3
  6. package/template/.agent/instructions/tech-stack.md +71 -23
  7. package/template/.agent/instructions/workflow.md +12 -1
  8. package/template/.agent/rules/completion-checklist.md +6 -0
  9. package/template/.agent/rules/security-first.md +3 -3
  10. package/template/.agent/rules/vertical-slices.md +1 -1
  11. package/template/.agent/skill-library/MANIFEST.md +6 -0
  12. package/template/.agent/skill-library/stack/devops/git-advanced/SKILL.md +972 -0
  13. package/template/.agent/skill-library/stack/devops/git-workflow/SKILL.md +420 -0
  14. package/template/.agent/skills/api-versioning/SKILL.md +44 -298
  15. package/template/.agent/skills/api-versioning/references/typescript.md +157 -0
  16. package/template/.agent/skills/architecture-mapping/SKILL.md +13 -13
  17. package/template/.agent/skills/bootstrap-agents/SKILL.md +151 -152
  18. package/template/.agent/skills/clean-code/SKILL.md +64 -118
  19. package/template/.agent/skills/clean-code/references/typescript.md +126 -0
  20. package/template/.agent/skills/database-schema-design/SKILL.md +93 -317
  21. package/template/.agent/skills/database-schema-design/references/relational.md +228 -0
  22. package/template/.agent/skills/error-handling-patterns/SKILL.md +62 -557
  23. package/template/.agent/skills/error-handling-patterns/references/go.md +162 -0
  24. package/template/.agent/skills/error-handling-patterns/references/python.md +262 -0
  25. package/template/.agent/skills/error-handling-patterns/references/rust.md +112 -0
  26. package/template/.agent/skills/error-handling-patterns/references/typescript.md +178 -0
  27. package/template/.agent/skills/idea-extraction/SKILL.md +322 -224
  28. package/template/.agent/skills/logging-best-practices/SKILL.md +108 -767
  29. package/template/.agent/skills/logging-best-practices/references/go.md +49 -0
  30. package/template/.agent/skills/logging-best-practices/references/python.md +52 -0
  31. package/template/.agent/skills/logging-best-practices/references/typescript.md +215 -0
  32. package/template/.agent/skills/migration-management/SKILL.md +127 -311
  33. package/template/.agent/skills/migration-management/references/relational.md +214 -0
  34. package/template/.agent/skills/parallel-feature-development/SKILL.md +34 -43
  35. package/template/.agent/skills/pipeline-rubrics/references/be-rubric.md +1 -1
  36. package/template/.agent/skills/pipeline-rubrics/references/ia-rubric.md +2 -2
  37. package/template/.agent/skills/pipeline-rubrics/references/scoring.md +1 -1
  38. package/template/.agent/skills/pipeline-rubrics/references/vision-rubric.md +2 -1
  39. package/template/.agent/skills/prd-templates/SKILL.md +23 -6
  40. package/template/.agent/skills/prd-templates/references/be-spec-template.md +2 -2
  41. package/template/.agent/skills/prd-templates/references/decomposition-templates.md +2 -2
  42. package/template/.agent/skills/prd-templates/references/engineering-standards-template.md +2 -0
  43. package/template/.agent/skills/prd-templates/references/fe-spec-template.md +1 -1
  44. package/template/.agent/skills/prd-templates/references/fractal-cx-template.md +58 -0
  45. package/template/.agent/skills/prd-templates/references/fractal-feature-template.md +93 -0
  46. package/template/.agent/skills/prd-templates/references/fractal-node-index-template.md +55 -0
  47. package/template/.agent/skills/prd-templates/references/ideation-crosscut-template.md +26 -47
  48. package/template/.agent/skills/prd-templates/references/ideation-index-template.md +47 -31
  49. package/template/.agent/skills/prd-templates/references/operational-templates.md +1 -1
  50. package/template/.agent/skills/prd-templates/references/placeholder-workflow-mapping.md +50 -21
  51. package/template/.agent/skills/prd-templates/references/skill-loading-protocol.md +32 -0
  52. package/template/.agent/skills/prd-templates/references/slice-completion-gates.md +29 -0
  53. package/template/.agent/skills/prd-templates/references/spec-coverage-sweep.md +3 -3
  54. package/template/.agent/skills/prd-templates/references/tdd-testing-policy.md +39 -0
  55. package/template/.agent/skills/prd-templates/references/vision-template.md +8 -8
  56. package/template/.agent/skills/regex-patterns/SKILL.md +122 -540
  57. package/template/.agent/skills/regex-patterns/references/go.md +44 -0
  58. package/template/.agent/skills/regex-patterns/references/javascript.md +63 -0
  59. package/template/.agent/skills/regex-patterns/references/python.md +77 -0
  60. package/template/.agent/skills/regex-patterns/references/rust.md +43 -0
  61. package/template/.agent/skills/resolve-ambiguity/SKILL.md +1 -1
  62. package/template/.agent/skills/session-continuity/SKILL.md +11 -9
  63. package/template/.agent/skills/session-continuity/protocols/02-progress-generation.md +2 -2
  64. package/template/.agent/skills/session-continuity/protocols/04-pattern-extraction.md +1 -1
  65. package/template/.agent/skills/session-continuity/protocols/05-session-close.md +1 -1
  66. package/template/.agent/skills/session-continuity/protocols/09-parallel-claim.md +1 -1
  67. package/template/.agent/skills/session-continuity/protocols/10-placeholder-verification-gate.md +57 -78
  68. package/template/.agent/skills/session-continuity/protocols/11-parallel-synthesis.md +1 -1
  69. package/template/.agent/skills/spec-writing/SKILL.md +1 -1
  70. package/template/.agent/skills/tdd-workflow/SKILL.md +94 -317
  71. package/template/.agent/skills/tdd-workflow/references/typescript.md +231 -0
  72. package/template/.agent/skills/testing-strategist/SKILL.md +74 -687
  73. package/template/.agent/skills/testing-strategist/references/typescript.md +328 -0
  74. package/template/.agent/skills/workflow-automation/SKILL.md +62 -154
  75. package/template/.agent/skills/workflow-automation/references/inngest.md +88 -0
  76. package/template/.agent/skills/workflow-automation/references/temporal.md +64 -0
  77. package/template/.agent/workflows/bootstrap-agents-fill.md +85 -143
  78. package/template/.agent/workflows/bootstrap-agents-provision.md +90 -107
  79. package/template/.agent/workflows/create-prd-architecture.md +23 -16
  80. package/template/.agent/workflows/create-prd-compile.md +11 -12
  81. package/template/.agent/workflows/create-prd-design-system.md +1 -1
  82. package/template/.agent/workflows/create-prd-security.md +9 -11
  83. package/template/.agent/workflows/create-prd-stack.md +10 -4
  84. package/template/.agent/workflows/create-prd.md +9 -9
  85. package/template/.agent/workflows/decompose-architecture-structure.md +4 -6
  86. package/template/.agent/workflows/decompose-architecture-validate.md +18 -1
  87. package/template/.agent/workflows/decompose-architecture.md +18 -3
  88. package/template/.agent/workflows/evolve-contract.md +11 -11
  89. package/template/.agent/workflows/evolve-feature-classify.md +14 -6
  90. package/template/.agent/workflows/ideate-discover.md +72 -107
  91. package/template/.agent/workflows/ideate-extract.md +84 -63
  92. package/template/.agent/workflows/ideate-validate.md +26 -22
  93. package/template/.agent/workflows/ideate.md +9 -9
  94. package/template/.agent/workflows/implement-slice-setup.md +25 -23
  95. package/template/.agent/workflows/implement-slice-tdd.md +73 -89
  96. package/template/.agent/workflows/implement-slice.md +4 -4
  97. package/template/.agent/workflows/plan-phase-preflight.md +6 -2
  98. package/template/.agent/workflows/plan-phase-write.md +6 -8
  99. package/template/.agent/workflows/remediate-pipeline-assess.md +2 -1
  100. package/template/.agent/workflows/resolve-ambiguity.md +2 -2
  101. package/template/.agent/workflows/update-architecture-map.md +22 -5
  102. package/template/.agent/workflows/validate-phase-quality.md +155 -0
  103. package/template/.agent/workflows/validate-phase-readiness.md +167 -0
  104. package/template/.agent/workflows/validate-phase.md +19 -157
  105. package/template/.agent/workflows/verify-infrastructure.md +10 -10
  106. package/template/.agent/workflows/write-architecture-spec-design.md +23 -14
  107. package/template/.agent/workflows/write-be-spec-classify.md +25 -21
  108. package/template/.agent/workflows/write-be-spec.md +1 -1
  109. package/template/.agent/workflows/write-fe-spec-classify.md +6 -12
  110. package/template/.agent/workflows/write-fe-spec-write.md +1 -1
  111. package/template/AGENTS.md +6 -2
  112. package/template/GEMINI.md +5 -3
  113. package/template/docs/README.md +10 -10
  114. package/template/docs/kit-architecture.md +126 -33
  115. package/template/docs/plans/ideation/README.md +8 -3
  116. package/template/.agent/skills/prd-templates/references/ideation-domain-template.md +0 -55
@@ -0,0 +1,88 @@
1
+ # Inngest Workflow Patterns
2
+
3
+ Ecosystem-specific patterns for the `workflow-automation` skill. Read `SKILL.md` first for universal methodology.
4
+
5
+ ---
6
+
7
+ ## Sequential Steps
8
+
9
+ ```typescript
10
+ const syncUser = inngest.createFunction(
11
+ { id: "sync-user-data" },
12
+ { event: "user/signup.completed" },
13
+ async ({ event, step }) => {
14
+ const user = await step.run("create-db-record", async () => {
15
+ return db.users.create({ email: event.data.email });
16
+ });
17
+
18
+ const stripeCustomer = await step.run("create-stripe-customer", async () => {
19
+ return stripe.customers.create({ email: user.email });
20
+ });
21
+
22
+ await step.run("send-welcome-email", async () => {
23
+ return email.send({ to: user.email, template: "welcome" });
24
+ });
25
+ }
26
+ );
27
+ ```
28
+
29
+ ## Fan-Out
30
+
31
+ ```typescript
32
+ // Each function subscribes to the same event — runs independently
33
+ const sendWelcome = inngest.createFunction(
34
+ { id: "send-welcome-email" },
35
+ { event: "user/signup.completed" },
36
+ async ({ event, step }) => {
37
+ await step.run("send", async () => {
38
+ await email.send({ to: event.data.email, template: "welcome" });
39
+ });
40
+ }
41
+ );
42
+
43
+ const startTrial = inngest.createFunction(
44
+ { id: "start-stripe-trial" },
45
+ { event: "user/signup.completed" },
46
+ async ({ event, step }) => {
47
+ await step.run("create-trial", async () => {
48
+ await stripe.subscriptions.create({
49
+ customer: event.data.stripeId,
50
+ trial_period_days: 14,
51
+ });
52
+ });
53
+ }
54
+ );
55
+ ```
56
+
57
+ ## Idempotency
58
+
59
+ ```typescript
60
+ const processPayment = inngest.createFunction(
61
+ {
62
+ id: "process-payment",
63
+ idempotency: "event.data.orderId", // Dedup within 24h
64
+ },
65
+ { event: "order/payment.requested" },
66
+ async ({ event, step }) => {
67
+ await step.run("charge", async () => {
68
+ return stripe.charges.create({
69
+ amount: event.data.amount,
70
+ idempotencyKey: event.data.orderId, // Stripe-level too
71
+ });
72
+ });
73
+ }
74
+ );
75
+ ```
76
+
77
+ ## Scheduled/Recurring
78
+
79
+ ```typescript
80
+ const dailyReport = inngest.createFunction(
81
+ { id: "daily-metrics-report" },
82
+ { cron: "0 9 * * *" }, // 9am daily
83
+ async ({ step }) => {
84
+ const metrics = await step.run("fetch-metrics", fetchDailyMetrics);
85
+ await step.run("send-report", async () => sendSlackReport(metrics));
86
+ }
87
+ );
88
+ ```
@@ -0,0 +1,64 @@
1
+ # Temporal Workflow Patterns
2
+
3
+ Ecosystem-specific patterns for the `workflow-automation` skill. Read `SKILL.md` first for universal methodology.
4
+
5
+ ---
6
+
7
+ ## Sequential Steps (Activities)
8
+
9
+ ```typescript
10
+ // activities.ts
11
+ export async function createDbRecord(email: string): Promise<User> {
12
+ return db.users.create({ email });
13
+ }
14
+
15
+ export async function createStripeCustomer(email: string): Promise<Customer> {
16
+ return stripe.customers.create({ email });
17
+ }
18
+
19
+ // workflows.ts
20
+ const { createDbRecord, createStripeCustomer } = proxyActivities<typeof activities>({
21
+ startToCloseTimeout: "30 seconds",
22
+ retry: { initialInterval: "1s", maximumAttempts: 3 },
23
+ });
24
+
25
+ export async function syncUserWorkflow(email: string): Promise<void> {
26
+ const user = await createDbRecord(email);
27
+ const customer = await createStripeCustomer(user.email);
28
+ }
29
+ ```
30
+
31
+ ## Human-in-the-Loop (Signals)
32
+
33
+ ```typescript
34
+ export const approvalSignal = defineSignal<[boolean]>("approval");
35
+
36
+ export async function purchaseWorkflow(amount: number): Promise<string> {
37
+ if (amount > 10000) {
38
+ let approved: boolean | undefined;
39
+
40
+ setHandler(approvalSignal, (isApproved) => {
41
+ approved = isApproved;
42
+ });
43
+
44
+ // Workflow sleeps until signal or 72h timeout
45
+ const gotApproval = await condition(() => approved !== undefined, "72 hours");
46
+
47
+ if (!gotApproval || !approved) {
48
+ return "Purchase denied or timed out";
49
+ }
50
+ }
51
+
52
+ return "Purchase completed";
53
+ }
54
+ ```
55
+
56
+ ## Critical Rule: Determinism
57
+
58
+ Temporal workflows replay from the beginning on recovery. **Workflow code must be deterministic:**
59
+ - ❌ No I/O (database, network, file system)
60
+ - ❌ No `Math.random()` or `Date.now()`
61
+ - ❌ No global mutable state
62
+ - ✅ All I/O goes in activities
63
+ - ✅ Use `workflow.now()` for timestamps
64
+ - ✅ Use `workflow.random()` for randomness
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Receive template values and fill instruction/rule/AGENTS.md templates for the bootstrap-agents workflow
2
+ description: Receive template values and fill surface stack map + instruction/rule/AGENTS.md templates for the bootstrap-agents workflow
3
3
  parent: bootstrap-agents
4
4
  shard: fill
5
5
  standalone: true
@@ -17,153 +17,104 @@ pipeline:
17
17
 
18
18
  # Bootstrap Agents — Fill Templates
19
19
 
20
- Receive template values from the calling workflow and fill `{{PLACEHOLDER}}` values across all instruction, rule, skill, and root-level templates.
20
+ Receive template values from the calling workflow and fill the surface stack map in `tech-stack.md`, plus global/structural/infrastructure values across instruction, rule, and root-level templates.
21
21
 
22
22
  **Prerequisite**: If invoked standalone, the caller must provide at least one template key-value pair. If no values are provided, there is nothing to fill — report and exit.
23
23
 
24
24
  > [!IMPORTANT]
25
- > This workflow fills template-level placeholders (project name, description, tech stack summary, architecture doc path). It does **NOT** fill workflow command placeholders (`{{VALIDATION_COMMAND}}`, `{{TEST_COMMAND}}`, `{{LINT_COMMAND}}`, etc.) or skill path placeholders (`{{DATABASE_SKILLS}}`, `{{AUTH_SKILL}}`, etc.). Those are filled exclusively by `.agent/workflows/bootstrap-agents-provision.md` during the `/create-prd` stage. Running this workflow standalone will leave those placeholders unfilled with no indication they require the provision step.
25
+ > This workflow fills the surface stack map and global template values. It does **NOT** provision skills from the library that is handled exclusively by `.agent/workflows/bootstrap-agents-provision.md`. Running this workflow standalone will populate map cells but not install the corresponding skill directories.
26
26
 
27
27
  ---
28
28
 
29
- ## 1. Receive template values
30
-
31
- The calling workflow provides these values (all optional fill only what's provided, leave others as `{{PLACEHOLDER}}`):
32
-
33
- ### Command & Tool Values
34
-
35
- | Key | Example |
36
- |-----|---------|
37
- | `PACKAGE_MANAGER` | pnpm |
38
- | `DEV_COMMAND` | pnpm dev |
39
- | `TEST_COMMAND` | pnpm test |
40
- | `TEST_WATCH_COMMAND` | pnpm test:watch |
41
- | `TEST_COVERAGE_COMMAND` | pnpm test:coverage |
42
- | `LINT_COMMAND` | pnpm lint |
43
- | `LINT_FIX_COMMAND` | pnpm lint:fix |
44
- | `FORMAT_COMMAND` | pnpm format |
45
- | `TYPE_CHECK_COMMAND` | pnpm type-check |
46
- | `BUILD_COMMAND` | pnpm build |
47
- | `PREVIEW_COMMAND` | pnpm preview |
48
- | `VALIDATION_COMMAND` | pnpm test && pnpm lint && pnpm type-check && pnpm build |
49
-
50
- ### Project Identity
51
-
52
- | Key | Example |
53
- |-----|---------|
54
- | `PROJECT_NAME` | My Project |
55
- | `DESCRIPTION` | One-line description |
56
- | `TECH_STACK_SUMMARY` | Astro + React + SurrealDB + Firebase Auth |
57
-
58
- ### Architecture & Structure
59
-
60
- | Key | Example |
61
- |-----|---------|
62
- | `FRAMEWORK_PATTERNS` | Framework-specific patterns block |
63
- | `PROJECT_STRUCTURE` | Directory layout block |
64
- | `ARCHITECTURE_TABLE` | Concern/Location/Runtime table rows |
65
- | `ARCHITECTURE_DOC` | docs/plans/2026-02-10-architecture-design.md |
66
- | `CONTRACTS_DIR` | src/contracts/ |
67
- | `BUILD_OUTPUT_DIR` | dist/ |
68
-
69
- ### Stack Values (trigger skill provisioning)
70
-
71
- | Key | Example |
72
- |-----|---------|
73
- | `DATABASE` | SurrealDB (self-hosted) |
74
- | `DATABASE_PRIMARY` | PostgreSQL |
75
- | `DATABASE_VECTOR` | Qdrant |
76
- | `DATABASE_GRAPH` | Neo4j |
77
- | `DATABASE_CACHE` | Redis |
78
- | `DATABASE_TIMESERIES` | TimescaleDB |
79
- | `FRONTEND_FRAMEWORK` | Astro + React Islands |
80
- | `BACKEND_FRAMEWORK` | Hono |
81
- | `API_LAYER` | tRPC |
82
- | `BACKEND_RUNTIME` | Cloudflare Workers |
83
- | `ORM` | Drizzle |
84
- | `CSS_FRAMEWORK` | Tailwind CSS v4 |
85
- | `UI_LIBRARY` | shadcn/ui |
86
- | `AUTH_PROVIDER` | Firebase Auth |
87
- | `PAYMENTS` | Stripe |
88
- | `AI_SDK` | Vercel AI SDK |
89
- | `STATE_MANAGEMENT` | TanStack Query |
90
- | `E2E_TESTING` | Playwright |
91
- | `UNIT_TESTING` | Vitest |
92
- | `HOSTING` | Cloudflare Pages + Workers |
93
- | `CDN_ASSETS` | Cloudflare R2 |
94
- | `MONITORING` | Sentry |
95
- | `OBSERVABILITY` | OpenTelemetry |
96
- | `ANALYTICS` | Google Analytics |
97
- | `EMAIL` | Resend |
98
- | `QUEUE` | Inngest |
99
- | `REALTIME` | Socket.io |
100
- | `SEARCH` | Meilisearch |
101
- | `CMS` | Payload CMS |
102
- | `STORAGE` | AWS S3 |
103
- | `CI_CD` | GitHub Actions |
104
- | `MOBILE_FRAMEWORK` | Expo |
105
- | `LANGUAGE` | TypeScript |
106
- | `3D_FRAMEWORK` | Three.js / R3F |
107
- | `DESKTOP_FRAMEWORK` | Tauri |
108
- | `GAME_ENGINE` | Godot |
109
- | `SECURITY` | OWASP |
110
- | `TEST_RUNNER` | Vitest |
111
- | `LINTER` | ESLint |
112
- | `TYPE_CHECKER` | TypeScript (tsc) |
113
- | `CONTRACT_LIBRARY` | Zod |
114
-
115
- > **Note**: `DATABASE` is an alias for `DATABASE_PRIMARY` — it triggers the same MANIFEST match. When multiple `DATABASE_*` sub-keys are present, the `DATABASE` row in `tech-stack.md` should expand to show sub-rows (`DATABASE_PRIMARY`, `DATABASE_VECTOR`, etc.) rather than a single combined string. Bootstrap fills each sub-row individually as the user confirms each store.
116
-
117
- ### Infrastructure Values
118
-
119
- | Key | Example |
120
- |-----|---------|
121
- | `SSH_HOST` | my-vps |
122
- | `DB_PORT` | 19000 |
123
- | `CREDENTIAL_TOOL` | agent-auth ssh-add |
124
- | `SECRET_MANAGEMENT` | wrangler secret |
125
- | `DEPLOY_COMMAND` | wrangler deploy |
126
-
127
- ### Surface Types
128
-
129
- | Key | Example |
130
- |-----|---------|
131
- | `SURFACES` | web, api |
132
-
133
- **Pipeline Context**
134
-
135
- | Key | Example | Purpose |
136
- |-----|---------|---------|
137
- | `PIPELINE_STAGE` | `create-prd`, `write-be-spec`, `write-fe-spec`, `implement-slice` | Context of this invocation — used to validate correct keys are being passed |
138
- | `SKILL_BUNDLE` | `database-schema-design,migration-management,error-handling-patterns` | When provided, bootstrap loads all listed skills in one invocation |
139
-
140
- If any values are missing, leave those `{{PLACEHOLDER}}`s in place — they'll be filled on a future invocation.
29
+ ## 1. Receive values
30
+
31
+ Accept values in the categories defined in `.agent/skills/bootstrap-agents/SKILL.md` (Section 1):
32
+ - **Surface-keyed values** → Per-Surface Skills table
33
+ - **Cross-cutting values** Cross-Cutting Skills table
34
+ - **Global values** → Global Settings table + root configs
35
+ - **Structural values** instruction templates
36
+ - **Infrastructure values** → instruction templates
37
+ - **Pipeline context** → `PIPELINE_STAGE` for validation
38
+
39
+ If any values are missing, leave those cells/placeholders in place — they'll be filled on a future invocation.
141
40
 
142
41
  ---
143
42
 
144
- ## 2. Fill instruction templates
43
+ ## 2. Fill the surface stack map
44
+
45
+ Open `.agent/instructions/tech-stack.md`.
46
+
47
+ ### 2a. Per-Surface Skills table
48
+
49
+ For each `SURFACE=<name>` received:
50
+
51
+ 1. **Row exists** → update only the cells for provided column keys. Do NOT overwrite cells that already have values unless the caller explicitly re-provides a value.
52
+ 2. **Row doesn't exist** → add a new row. Fill provided columns, use `—` for all unprovided columns.
53
+ 3. **Appending to existing cells** → if a column already has a value and the caller provides additional values, append with comma separation. Example: existing `supabase` + new `surrealdb` → `supabase, surrealdb`. Skip duplicates.
54
+
55
+ ### 2b. Cross-Cutting Skills table
56
+
57
+ For each cross-cutting key received:
58
+ 1. **Category exists with value** → append to comma-separated list (skip duplicates)
59
+ 2. **Category exists, empty** → set the value
60
+ 3. **Accumulated values** (e.g., `DATABASE_*` sub-keys like `DATABASE_PRIMARY`, `DATABASE_VECTOR`) → each sub-key appends to the Databases column of the relevant surface AND to the cross-cutting Databases row if applicable
61
+
62
+ ### 2c. Global Settings table
63
+
64
+ Fill `PROJECT_NAME`, `DESCRIPTION`, `TECH_STACK_SUMMARY`, `SURFACES`, `ARCHITECTURE_DOC` as provided.
65
+
66
+ ---
67
+
68
+ ## 3. Fill instruction templates
145
69
 
146
70
  ### `.agent/instructions/commands.md`
147
- Replace: `{{PACKAGE_MANAGER}}`, `{{DEV_COMMAND}}`, `{{TEST_COMMAND}}`, `{{TEST_WATCH_COMMAND}}`, `{{TEST_COVERAGE_COMMAND}}`, `{{LINT_COMMAND}}`, `{{LINT_FIX_COMMAND}}`, `{{FORMAT_COMMAND}}`, `{{TYPE_CHECK_COMMAND}}`, `{{BUILD_COMMAND}}`, `{{PREVIEW_COMMAND}}`, `{{VALIDATION_COMMAND}}`
71
+
72
+ Write per-surface command sections. For each surface in the map:
73
+
74
+ ```markdown
75
+ ## <Surface> Commands
76
+
77
+ | Command | Value |
78
+ |---------|-------|
79
+ | Package Manager | <from map> |
80
+ | Dev | <from map> |
81
+ | Test | <from map> |
82
+ | Lint | <from map> |
83
+ | Build | <from map> |
84
+ | Validation | <from map> |
85
+ ```
86
+
87
+ If single-surface, omit the surface header — just write a flat commands table.
148
88
 
149
89
  ### `.agent/instructions/workflow.md`
150
- Replace: `{{VALIDATION_COMMAND}}`
90
+ Fill `{{VALIDATION_COMMAND}}` with the primary surface's validation command (first non-`shared` row in the map, or `shared` if only one row exists).
151
91
 
152
92
  ### `.agent/instructions/patterns.md`
153
- Replace: `{{FRAMEWORK_PATTERNS}}` if provided
93
+ Replace `{{FRAMEWORK_PATTERNS}}` if provided.
154
94
 
155
95
  ### `.agent/instructions/structure.md`
156
- Replace: `{{PROJECT_STRUCTURE}}`, `{{ARCHITECTURE_TABLE}}` if provided
96
+ Replace `{{PROJECT_STRUCTURE}}`, `{{ARCHITECTURE_TABLE}}` if provided.
157
97
 
158
- ### `.agent/instructions/tech-stack.md`
159
- Replace: `{{TECH_STACK_SUMMARY}}`, `{{FRONTEND_FRAMEWORK}}`, `{{BACKEND_RUNTIME}}`, `{{DATABASE}}`, `{{AUTH_PROVIDER}}`, `{{HOSTING}}`, `{{CDN_ASSETS}}`, `{{CICD}}`, `{{MONITORING}}`, `{{PACKAGE_MANAGER}}`, `{{TEST_RUNNER}}`, `{{LINTER}}`, `{{TYPE_CHECKER}}`, `{{INSTALLED_SKILLS}}`, `{{ARCHITECTURE_DOC}}`
160
- Replace: `{{ARCHITECTURE_DOC}}` with the dated architecture design filename (e.g., `docs/plans/YYYY-MM-DD-architecture-design.md`)
98
+ ---
99
+
100
+ ## 4. Fill root agent config files (AGENTS.md and GEMINI.md)
101
+
102
+ Replace in **both** `AGENTS.md` and `GEMINI.md`:
103
+ - `{{PROJECT_NAME}}`
104
+ - `{{DESCRIPTION}}`
105
+ - `{{TECH_STACK_SUMMARY}}`
106
+ - `{{VALIDATION_COMMAND}}` — primary surface's validation command
107
+ - `{{ARCHITECTURE_DOC}}`
108
+ - `{{CONTRACT_LIBRARY}}`
109
+ - `{{INSTALLED_SKILLS}}` (if provided at this invocation; otherwise leave for `bootstrap-agents-provision` Step 8)
110
+
111
+ > **Note**: Both files serve as root agent config. Both must be kept in sync.
161
112
 
162
113
  ---
163
114
 
164
- ## 3. Fill default operational skill templates
115
+ ## 5. Fill operational skill and rule templates
165
116
 
166
- Scan all `.agent/skills/*/SKILL.md` files for `{{PLACEHOLDER}}` values and fill any that match the provided template values:
117
+ Scan all `.agent/skills/*/SKILL.md` files for `{{PLACEHOLDER}}` values and fill any that match:
167
118
 
168
119
  - `{{VALIDATION_COMMAND}}` — in `fix-bug`, `main-workflow`, `deploy`, `refactor`
169
120
  - `{{PACKAGE_MANAGER}}` — in `refactor`, `security-audit`
@@ -175,27 +126,18 @@ Scan all `.agent/skills/*/SKILL.md` files for `{{PLACEHOLDER}}` values and fill
175
126
  - `{{DB_PORT}}` — in `setup-session`
176
127
  - `{{CREDENTIAL_TOOL}}` — in `setup-session`
177
128
 
178
- Also scan all `.agent/rules/*.md` files for `{{PLACEHOLDER}}` values and fill any that match the provided template values. Currently applicable: `{{CONTRACT_LIBRARY}}` in `tdd-contract-first.md`.
129
+ Also scan `.agent/rules/*.md`: `{{CONTRACT_LIBRARY}}` in `tdd-contract-first.md`.
179
130
 
180
131
  ---
181
132
 
182
- ## 4. Fill root agent config files (AGENTS.md and GEMINI.md)
183
-
184
- Replace in **both** `AGENTS.md` and `GEMINI.md`:
185
- - `{{PROJECT_NAME}}`
186
- - `{{DESCRIPTION}}`
187
- - `{{TECH_STACK_SUMMARY}}`
188
- - `{{VALIDATION_COMMAND}}`
189
- - `{{ARCHITECTURE_DOC}}`
190
- - `{{INSTALLED_SKILLS}}` (if provided at this invocation; otherwise leave for `bootstrap-agents-provision` Step 8 to fill after skill provisioning)
191
-
192
- > **Note**: Both files serve as root agent config for their respective agents (`AGENTS.md` for Claude Code / Antigravity, `GEMINI.md` for Gemini CLI). Both must be kept in sync — any placeholder filled in one must be filled in the other.
193
-
194
- ### Report and proceed
195
-
196
- Report which `{{PLACEHOLDER}}`s were filled and their values, which remain unfilled, and any errors encountered.
133
+ ## 6. Report and proceed
197
134
 
198
- If invoked standalone, the next step is `/bootstrap-agents-provision` to provision skills from the library based on the stack values just filled.
135
+ Report:
136
+ - Which map cells were filled (and their values)
137
+ - Which map cells remain empty
138
+ - Which instruction template placeholders were filled
139
+ - Any errors encountered
199
140
 
200
- If invoked by another workflow (e.g., `/create-prd`), return this report to the calling workflow the caller will invoke `/bootstrap-agents-provision` automatically.
141
+ If invoked standalone, the next step is `/bootstrap-agents-provision` to provision skills using the 4-tier resolution chain.
201
142
 
143
+ If invoked by another workflow (e.g., `/create-prd`), return this report to the calling workflow.