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.
- package/README.md +14 -0
- package/package.json +1 -1
- package/template/.agent/instructions/commands.md +8 -32
- package/template/.agent/instructions/example.md +21 -0
- package/template/.agent/instructions/patterns.md +3 -3
- package/template/.agent/instructions/tech-stack.md +71 -23
- package/template/.agent/instructions/workflow.md +12 -1
- package/template/.agent/rules/completion-checklist.md +6 -0
- package/template/.agent/rules/security-first.md +3 -3
- package/template/.agent/rules/vertical-slices.md +1 -1
- package/template/.agent/skill-library/MANIFEST.md +6 -0
- package/template/.agent/skill-library/stack/devops/git-advanced/SKILL.md +972 -0
- package/template/.agent/skill-library/stack/devops/git-workflow/SKILL.md +420 -0
- package/template/.agent/skills/api-versioning/SKILL.md +44 -298
- package/template/.agent/skills/api-versioning/references/typescript.md +157 -0
- package/template/.agent/skills/architecture-mapping/SKILL.md +13 -13
- package/template/.agent/skills/bootstrap-agents/SKILL.md +151 -152
- package/template/.agent/skills/clean-code/SKILL.md +64 -118
- package/template/.agent/skills/clean-code/references/typescript.md +126 -0
- package/template/.agent/skills/database-schema-design/SKILL.md +93 -317
- package/template/.agent/skills/database-schema-design/references/relational.md +228 -0
- package/template/.agent/skills/error-handling-patterns/SKILL.md +62 -557
- package/template/.agent/skills/error-handling-patterns/references/go.md +162 -0
- package/template/.agent/skills/error-handling-patterns/references/python.md +262 -0
- package/template/.agent/skills/error-handling-patterns/references/rust.md +112 -0
- package/template/.agent/skills/error-handling-patterns/references/typescript.md +178 -0
- package/template/.agent/skills/idea-extraction/SKILL.md +322 -224
- package/template/.agent/skills/logging-best-practices/SKILL.md +108 -767
- package/template/.agent/skills/logging-best-practices/references/go.md +49 -0
- package/template/.agent/skills/logging-best-practices/references/python.md +52 -0
- package/template/.agent/skills/logging-best-practices/references/typescript.md +215 -0
- package/template/.agent/skills/migration-management/SKILL.md +127 -311
- package/template/.agent/skills/migration-management/references/relational.md +214 -0
- package/template/.agent/skills/parallel-feature-development/SKILL.md +34 -43
- package/template/.agent/skills/pipeline-rubrics/references/be-rubric.md +1 -1
- package/template/.agent/skills/pipeline-rubrics/references/ia-rubric.md +2 -2
- package/template/.agent/skills/pipeline-rubrics/references/scoring.md +1 -1
- package/template/.agent/skills/pipeline-rubrics/references/vision-rubric.md +2 -1
- package/template/.agent/skills/prd-templates/SKILL.md +23 -6
- package/template/.agent/skills/prd-templates/references/be-spec-template.md +2 -2
- package/template/.agent/skills/prd-templates/references/decomposition-templates.md +2 -2
- package/template/.agent/skills/prd-templates/references/engineering-standards-template.md +2 -0
- package/template/.agent/skills/prd-templates/references/fe-spec-template.md +1 -1
- package/template/.agent/skills/prd-templates/references/fractal-cx-template.md +58 -0
- package/template/.agent/skills/prd-templates/references/fractal-feature-template.md +93 -0
- package/template/.agent/skills/prd-templates/references/fractal-node-index-template.md +55 -0
- package/template/.agent/skills/prd-templates/references/ideation-crosscut-template.md +26 -47
- package/template/.agent/skills/prd-templates/references/ideation-index-template.md +47 -31
- package/template/.agent/skills/prd-templates/references/operational-templates.md +1 -1
- package/template/.agent/skills/prd-templates/references/placeholder-workflow-mapping.md +50 -21
- package/template/.agent/skills/prd-templates/references/skill-loading-protocol.md +32 -0
- package/template/.agent/skills/prd-templates/references/slice-completion-gates.md +29 -0
- package/template/.agent/skills/prd-templates/references/spec-coverage-sweep.md +3 -3
- package/template/.agent/skills/prd-templates/references/tdd-testing-policy.md +39 -0
- package/template/.agent/skills/prd-templates/references/vision-template.md +8 -8
- package/template/.agent/skills/regex-patterns/SKILL.md +122 -540
- package/template/.agent/skills/regex-patterns/references/go.md +44 -0
- package/template/.agent/skills/regex-patterns/references/javascript.md +63 -0
- package/template/.agent/skills/regex-patterns/references/python.md +77 -0
- package/template/.agent/skills/regex-patterns/references/rust.md +43 -0
- package/template/.agent/skills/resolve-ambiguity/SKILL.md +1 -1
- package/template/.agent/skills/session-continuity/SKILL.md +11 -9
- package/template/.agent/skills/session-continuity/protocols/02-progress-generation.md +2 -2
- package/template/.agent/skills/session-continuity/protocols/04-pattern-extraction.md +1 -1
- package/template/.agent/skills/session-continuity/protocols/05-session-close.md +1 -1
- package/template/.agent/skills/session-continuity/protocols/09-parallel-claim.md +1 -1
- package/template/.agent/skills/session-continuity/protocols/10-placeholder-verification-gate.md +57 -78
- package/template/.agent/skills/session-continuity/protocols/11-parallel-synthesis.md +1 -1
- package/template/.agent/skills/spec-writing/SKILL.md +1 -1
- package/template/.agent/skills/tdd-workflow/SKILL.md +94 -317
- package/template/.agent/skills/tdd-workflow/references/typescript.md +231 -0
- package/template/.agent/skills/testing-strategist/SKILL.md +74 -687
- package/template/.agent/skills/testing-strategist/references/typescript.md +328 -0
- package/template/.agent/skills/workflow-automation/SKILL.md +62 -154
- package/template/.agent/skills/workflow-automation/references/inngest.md +88 -0
- package/template/.agent/skills/workflow-automation/references/temporal.md +64 -0
- package/template/.agent/workflows/bootstrap-agents-fill.md +85 -143
- package/template/.agent/workflows/bootstrap-agents-provision.md +90 -107
- package/template/.agent/workflows/create-prd-architecture.md +23 -16
- package/template/.agent/workflows/create-prd-compile.md +11 -12
- package/template/.agent/workflows/create-prd-design-system.md +1 -1
- package/template/.agent/workflows/create-prd-security.md +9 -11
- package/template/.agent/workflows/create-prd-stack.md +10 -4
- package/template/.agent/workflows/create-prd.md +9 -9
- package/template/.agent/workflows/decompose-architecture-structure.md +4 -6
- package/template/.agent/workflows/decompose-architecture-validate.md +18 -1
- package/template/.agent/workflows/decompose-architecture.md +18 -3
- package/template/.agent/workflows/evolve-contract.md +11 -11
- package/template/.agent/workflows/evolve-feature-classify.md +14 -6
- package/template/.agent/workflows/ideate-discover.md +72 -107
- package/template/.agent/workflows/ideate-extract.md +84 -63
- package/template/.agent/workflows/ideate-validate.md +26 -22
- package/template/.agent/workflows/ideate.md +9 -9
- package/template/.agent/workflows/implement-slice-setup.md +25 -23
- package/template/.agent/workflows/implement-slice-tdd.md +73 -89
- package/template/.agent/workflows/implement-slice.md +4 -4
- package/template/.agent/workflows/plan-phase-preflight.md +6 -2
- package/template/.agent/workflows/plan-phase-write.md +6 -8
- package/template/.agent/workflows/remediate-pipeline-assess.md +2 -1
- package/template/.agent/workflows/resolve-ambiguity.md +2 -2
- package/template/.agent/workflows/update-architecture-map.md +22 -5
- package/template/.agent/workflows/validate-phase-quality.md +155 -0
- package/template/.agent/workflows/validate-phase-readiness.md +167 -0
- package/template/.agent/workflows/validate-phase.md +19 -157
- package/template/.agent/workflows/verify-infrastructure.md +10 -10
- package/template/.agent/workflows/write-architecture-spec-design.md +23 -14
- package/template/.agent/workflows/write-be-spec-classify.md +25 -21
- package/template/.agent/workflows/write-be-spec.md +1 -1
- package/template/.agent/workflows/write-fe-spec-classify.md +6 -12
- package/template/.agent/workflows/write-fe-spec-write.md +1 -1
- package/template/AGENTS.md +6 -2
- package/template/GEMINI.md +5 -3
- package/template/docs/README.md +10 -10
- package/template/docs/kit-architecture.md +126 -33
- package/template/docs/plans/ideation/README.md +8 -3
- package/template/.agent/skills/prd-templates/references/ideation-domain-template.md +0 -55
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Go Regex Patterns
|
|
2
|
+
|
|
3
|
+
Language-specific API for the `regex-patterns` skill. Read `SKILL.md` first for universal syntax.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Core API
|
|
8
|
+
|
|
9
|
+
```go
|
|
10
|
+
package main
|
|
11
|
+
|
|
12
|
+
import (
|
|
13
|
+
"fmt"
|
|
14
|
+
"regexp"
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
func main() {
|
|
18
|
+
// Compile (returns error)
|
|
19
|
+
re, err := regexp.Compile(`^hello\s+(\w+)$`)
|
|
20
|
+
if err != nil {
|
|
21
|
+
panic(err)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// MustCompile panics on invalid pattern (for constants)
|
|
25
|
+
re = regexp.MustCompile(`\d+`)
|
|
26
|
+
|
|
27
|
+
// Methods
|
|
28
|
+
matched := re.MatchString("hello world") // bool
|
|
29
|
+
result := re.FindString("abc 123 def") // "123"
|
|
30
|
+
allResults := re.FindAllString("a1 b2 c3", -1) // ["1", "2", "3"]
|
|
31
|
+
submatch := re.FindStringSubmatch("hello world") // ["hello world", "world"]
|
|
32
|
+
replaced := re.ReplaceAllString("foo 123", "NUM") // "foo NUM"
|
|
33
|
+
|
|
34
|
+
fmt.Println(matched, result, allResults, submatch, replaced)
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Important: RE2 Engine
|
|
39
|
+
|
|
40
|
+
Go uses the **RE2 engine** which guarantees linear-time execution (no ReDoS). Trade-off:
|
|
41
|
+
- ✅ No backtracking — immune to ReDoS
|
|
42
|
+
- ❌ No backreferences (`\1`)
|
|
43
|
+
- ❌ No lookahead/lookbehind
|
|
44
|
+
- ✅ Supports `\p{L}` Unicode properties
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# JavaScript Regex Patterns
|
|
2
|
+
|
|
3
|
+
Language-specific API for the `regex-patterns` skill. Read `SKILL.md` first for universal syntax.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Syntax
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
// Literal
|
|
11
|
+
const re = /^hello\s+(\w+)$/i;
|
|
12
|
+
|
|
13
|
+
// Constructor (dynamic patterns)
|
|
14
|
+
const pattern = 'hello';
|
|
15
|
+
const re2 = new RegExp(`^${escapeRegExp(pattern)}$`, 'i');
|
|
16
|
+
|
|
17
|
+
// Escape special characters
|
|
18
|
+
function escapeRegExp(str) {
|
|
19
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Methods
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
str.match(re) // Match array or null
|
|
27
|
+
[...str.matchAll(/\d+/g)] // Iterator of all matches
|
|
28
|
+
str.replace(/foo/g, 'bar') // Replace
|
|
29
|
+
str.split(/[,;\s]+/) // Split
|
|
30
|
+
re.test(str) // Boolean
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Named Groups
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
const { groups } = /(?<year>\d{4})-(?<month>\d{2})/.exec('2025-06');
|
|
37
|
+
// groups.year === '2025'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Unicode
|
|
41
|
+
|
|
42
|
+
```javascript
|
|
43
|
+
// Requires /u or /v flag
|
|
44
|
+
/\p{L}+/u // Any letter (any script)
|
|
45
|
+
/\p{Nd}+/u // Decimal digit (any script)
|
|
46
|
+
/[\p{L}\p{M}]+/u // Unicode-aware word matching
|
|
47
|
+
/\p{Script=Greek}+/u // Script-specific
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Number Formatting with Lookaround
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
'1234567'.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
54
|
+
// "1,234,567"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## ReDoS Prevention
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
// No built-in timeout — use re2 package for linear-time engine
|
|
61
|
+
const RE2 = require('re2');
|
|
62
|
+
const re = new RE2(/pattern/);
|
|
63
|
+
```
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Python Regex Patterns
|
|
2
|
+
|
|
3
|
+
Language-specific API for the `regex-patterns` skill. Read `SKILL.md` first for universal syntax.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Core API
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
import re
|
|
11
|
+
|
|
12
|
+
# Compile for reuse
|
|
13
|
+
pattern = re.compile(r'^hello\s+(\w+)$', re.IGNORECASE)
|
|
14
|
+
|
|
15
|
+
# Methods
|
|
16
|
+
match = pattern.match(string) # Match at start
|
|
17
|
+
match = pattern.search(string) # Search anywhere
|
|
18
|
+
matches = pattern.findall(string) # All matches (list)
|
|
19
|
+
matches = pattern.finditer(string) # Iterator of Match objects
|
|
20
|
+
result = pattern.sub(r'bar', string) # Replace
|
|
21
|
+
parts = pattern.split(string) # Split
|
|
22
|
+
|
|
23
|
+
# Match object
|
|
24
|
+
if match:
|
|
25
|
+
match.group(0) # Full match
|
|
26
|
+
match.group(1) # First capture group
|
|
27
|
+
match.group('name') # Named group
|
|
28
|
+
match.start() # Start position
|
|
29
|
+
match.end() # End position
|
|
30
|
+
|
|
31
|
+
# Raw strings: ALWAYS use r'...' for regex
|
|
32
|
+
# r'\n' is literal backslash-n, not a newline
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Named Groups
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
pattern = r'(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})'
|
|
39
|
+
match = re.match(pattern, '2025-06-15')
|
|
40
|
+
match.group('year') # '2025'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Verbose Mode
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
pattern = re.compile(r"""
|
|
47
|
+
^ # Start of string
|
|
48
|
+
(?P<protocol>https?) # Protocol
|
|
49
|
+
:// # Separator
|
|
50
|
+
(?P<domain> # Domain group
|
|
51
|
+
[a-zA-Z0-9.-]+ # Domain name
|
|
52
|
+
\.[a-zA-Z]{2,} # TLD
|
|
53
|
+
)
|
|
54
|
+
(?P<path>/\S*)? # Optional path
|
|
55
|
+
$ # End of string
|
|
56
|
+
""", re.VERBOSE)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## ReDoS Prevention
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
# Use the 'regex' package with timeout
|
|
63
|
+
import regex
|
|
64
|
+
try:
|
|
65
|
+
regex.match(r'(a+)+$', input_string, timeout=1.0)
|
|
66
|
+
except regex.error:
|
|
67
|
+
pass # Timed out
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Unicode
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
# Python re does NOT support \p{} syntax
|
|
74
|
+
# Use the 'regex' package for Unicode property support:
|
|
75
|
+
import regex
|
|
76
|
+
regex.findall(r'\p{L}+', text) # All letters (any script)
|
|
77
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Rust Regex Patterns
|
|
2
|
+
|
|
3
|
+
Language-specific API for the `regex-patterns` skill. Read `SKILL.md` first for universal syntax.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Core API
|
|
8
|
+
|
|
9
|
+
```rust
|
|
10
|
+
use regex::Regex;
|
|
11
|
+
|
|
12
|
+
fn main() {
|
|
13
|
+
// Compile
|
|
14
|
+
let re = Regex::new(r"^hello\s+(\w+)$").unwrap();
|
|
15
|
+
|
|
16
|
+
// Methods
|
|
17
|
+
let is_match = re.is_match("hello world"); // bool
|
|
18
|
+
let caps = re.captures("hello world").unwrap();
|
|
19
|
+
let name = &caps[1]; // "world"
|
|
20
|
+
|
|
21
|
+
// Named captures
|
|
22
|
+
let re = Regex::new(r"(?P<year>\d{4})-(?P<month>\d{2})").unwrap();
|
|
23
|
+
let caps = re.captures("2025-06").unwrap();
|
|
24
|
+
let year = &caps["year"]; // "2025"
|
|
25
|
+
|
|
26
|
+
// Find all matches
|
|
27
|
+
let re = Regex::new(r"\d+").unwrap();
|
|
28
|
+
let matches: Vec<&str> = re.find_iter("a1 b2 c3").map(|m| m.as_str()).collect();
|
|
29
|
+
// ["1", "2", "3"]
|
|
30
|
+
|
|
31
|
+
// Replace
|
|
32
|
+
let result = re.replace_all("foo 123 bar 456", "NUM");
|
|
33
|
+
// "foo NUM bar NUM"
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Important: Engine Limitations
|
|
38
|
+
|
|
39
|
+
The `regex` crate uses finite automata (like RE2):
|
|
40
|
+
- ✅ Guaranteed linear-time — immune to ReDoS
|
|
41
|
+
- ❌ No backreferences by default
|
|
42
|
+
- ❌ No lookahead/lookbehind by default
|
|
43
|
+
- Use the **`fancy-regex`** crate for those features (trades ReDoS safety for feature completeness)
|
|
@@ -50,7 +50,7 @@ If these files contain `{{PLACEHOLDER}}` values, the information hasn't been dec
|
|
|
50
50
|
**Check second — the pipeline's own output**
|
|
51
51
|
|
|
52
52
|
The answer may already exist in a document written by an earlier pipeline stage:
|
|
53
|
-
- `docs/plans/ideation/ideation-index.md` + domain files — Problem, personas, features, constraints, domain map
|
|
53
|
+
- `docs/plans/ideation/ideation-index.md` + fractal domain tree (folder `*-index.md`, `*-cx.md`, and feature files) — Problem, personas, features, constraints, domain map
|
|
54
54
|
- `docs/plans/*-architecture-design.md` — Tech stack, system design, security model
|
|
55
55
|
- `docs/plans/ENGINEERING-STANDARDS.md` — Quality thresholds, performance budgets
|
|
56
56
|
- `docs/plans/ia/*.md` — IA shards (features, data models, access control, edge cases)
|
|
@@ -155,7 +155,7 @@ for complex ones.
|
|
|
155
155
|
## Slices
|
|
156
156
|
|
|
157
157
|
- [ ] **Slice 1**: {{DESCRIPTION}} ({{S|M|L}})
|
|
158
|
-
- [ ] Contract:
|
|
158
|
+
- [ ] Contract: {{CONTRACT_LIBRARY}} schema for {{entity}}
|
|
159
159
|
- [ ] `BE` API endpoints for {{entity}}
|
|
160
160
|
- [ ] Subtask 1
|
|
161
161
|
- [ ] Subtask 2
|
|
@@ -296,7 +296,7 @@ for complex ones.
|
|
|
296
296
|
|
|
297
297
|
3. **Write to `memory/patterns.md`** (only for best-practice or anti-pattern):
|
|
298
298
|
```markdown
|
|
299
|
-
### PAT-007:
|
|
299
|
+
### PAT-007: Schema coercion for URL params (2026-02-15)
|
|
300
300
|
- **Type**: best-practice
|
|
301
301
|
- **Confidence**: 0.7 (applied 1 time)
|
|
302
302
|
- **Context**: Astro API routes receive all params as strings
|
|
@@ -354,7 +354,7 @@ for complex ones.
|
|
|
354
354
|
- [ ] Phase 2, Slice 4 — Rate limiting (blocked on Redis config)
|
|
355
355
|
|
|
356
356
|
## Patterns Learned
|
|
357
|
-
- PAT-007:
|
|
357
|
+
- PAT-007: Schema coercion for URL params
|
|
358
358
|
|
|
359
359
|
## Next Session
|
|
360
360
|
- Resolve BLK-003 (Redis config)
|
|
@@ -643,7 +643,7 @@ The dependency chain follows strict TDD: Red → Green → Verify.
|
|
|
643
643
|
|
|
644
644
|
| Phase | Tag | What Happens | Depends On |
|
|
645
645
|
|-------|-----|-------------|------------|
|
|
646
|
-
| 1. Contract | (untagged) | Orchestrator writes
|
|
646
|
+
| 1. Contract | (untagged) | Orchestrator writes {{CONTRACT_LIBRARY}} schemas | Nothing |
|
|
647
647
|
| 2. QA-RED | `QA` | Write comprehensive failing tests from acceptance criteria | Contract `[x]` |
|
|
648
648
|
| 3. BE + FE | `BE`, `FE` | Implement in parallel to make tests pass | QA-RED `[x]` |
|
|
649
649
|
| 4. QA-GREEN | `QA` | Second pass — verify all tests pass, check for cheating, add integration/E2E | BE `[x]` + FE `[x]` |
|
|
@@ -695,23 +695,25 @@ Workflows reference this skill's protocols, not its internals:
|
|
|
695
695
|
| Workflow | Step | Protocol |
|
|
696
696
|
|----------|------|----------|
|
|
697
697
|
| `instructions/workflow.md` | Step 1 (context) | Session Resumption |
|
|
698
|
+
| `instructions/workflow.md` | Step 5 (learn) | Pattern Extraction + Session Close |
|
|
699
|
+
| `rules/completion-checklist.md` | Definition of Done #5 | Pattern Extraction |
|
|
700
|
+
| `rules/completion-checklist.md` | Definition of Done #6 | Session Close |
|
|
701
|
+
| `/create-prd-stack` | Per-axis tech decisions | Decision Effect Analysis |
|
|
702
|
+
| `/create-prd-architecture` | After system architecture approval | Decision Effect Analysis |
|
|
698
703
|
| `/decompose-architecture` | After creating indexes | Spec Pipeline Generation |
|
|
704
|
+
| `/write-architecture-spec` | During data model + access control design | Decision Effect Analysis |
|
|
699
705
|
| `/write-architecture-spec` | After updating IA index | Spec Pipeline Update |
|
|
700
706
|
| `/write-architecture-spec` | Before request review | Ambiguity Gates (micro + macro) |
|
|
701
|
-
| `/write-architecture-spec` | During design choices | Decision Effect Analysis |
|
|
702
707
|
| `/write-be-spec` | After updating BE index | Spec Pipeline Update |
|
|
703
708
|
| `/write-be-spec` | Before request review | Ambiguity Gates (micro + macro) |
|
|
704
709
|
| `/write-fe-spec` | After updating FE index | Spec Pipeline Update |
|
|
705
710
|
| `/write-fe-spec` | Before request review | Ambiguity Gates (micro + macro) |
|
|
706
711
|
| `/plan-phase` | Step 7 | Progress Generation |
|
|
707
|
-
| `/create-prd` | During design choices | Decision Effect Analysis |
|
|
708
712
|
| `/implement-slice` | Step 0 | Session Resumption |
|
|
709
713
|
| `/implement-slice` | Step 1.5 | Parallel Claim |
|
|
710
714
|
| `/implement-slice` | Step 4 (during impl) | Decision Effect Analysis |
|
|
715
|
+
| `/implement-slice` | Step 6 | Parallel Synthesis |
|
|
711
716
|
| `/implement-slice` | Step 7 | Progress Update (incl. claim release) |
|
|
712
|
-
| `/fix-bug` | End | Pattern Extraction |
|
|
713
|
-
| `/refactor` | End | Pattern Extraction |
|
|
714
|
-
| Any workflow | End | Pattern Extraction + Session Close |
|
|
715
717
|
|
|
716
718
|
## DO / DON'T
|
|
717
719
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
## Slices
|
|
38
38
|
|
|
39
39
|
- [ ] **Slice 1**: {{DESCRIPTION}} ({{S|M|L}})
|
|
40
|
-
- [ ] Contract:
|
|
40
|
+
- [ ] Contract: {{CONTRACT_LIBRARY}} schema for {{entity}}
|
|
41
41
|
- [ ] `BE` API endpoints for {{entity}}
|
|
42
42
|
- [ ] Subtask 1
|
|
43
43
|
- [ ] Subtask 2
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
**Complexity**: {{S|M|L}}
|
|
64
64
|
|
|
65
65
|
## Tasks
|
|
66
|
-
- [ ] Contract:
|
|
66
|
+
- [ ] Contract: {{CONTRACT_LIBRARY}} schema for [entity]
|
|
67
67
|
- [ ] `FE` [entity] page and components
|
|
68
68
|
- [ ] `BE` API endpoints for [entity]
|
|
69
69
|
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
3. **Write to `memory/patterns.md`** (only for best-practice or anti-pattern):
|
|
29
29
|
```markdown
|
|
30
|
-
### PAT-007:
|
|
30
|
+
### PAT-007: Schema coercion for URL params (2026-02-15)
|
|
31
31
|
- **Type**: best-practice
|
|
32
32
|
- **Confidence**: 0.7 (applied 1 time)
|
|
33
33
|
- **Context**: Astro API routes receive all params as strings
|
|
@@ -78,7 +78,7 @@ The dependency chain follows strict TDD: Red → Green → Verify.
|
|
|
78
78
|
|
|
79
79
|
| Phase | Tag | What Happens | Depends On |
|
|
80
80
|
|-------|-----|-------------|------------|
|
|
81
|
-
| 1. Contract | (untagged) | Orchestrator writes
|
|
81
|
+
| 1. Contract | (untagged) | Orchestrator writes {{CONTRACT_LIBRARY}} schemas | Nothing |
|
|
82
82
|
| 2. QA-RED | `QA` | Write comprehensive failing tests from acceptance criteria | Contract `[x]` |
|
|
83
83
|
| 3. BE + FE | `BE`, `FE` | Implement in parallel to make tests pass | QA-RED `[x]` |
|
|
84
84
|
| 4. QA-GREEN | `QA` | Second pass — verify all tests pass, check for cheating, add integration/E2E | BE `[x]` + FE `[x]` |
|
package/template/.agent/skills/session-continuity/protocols/10-placeholder-verification-gate.md
CHANGED
|
@@ -1,104 +1,83 @@
|
|
|
1
|
-
|
|
1
|
+
# Protocol 10: Surface Stack Map Verification Gate
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Purpose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Specification and implementation workflows must verify the surface stack map is populated **before** any skill reads. This prevents spec authoring from running with empty map cells, which would produce patterns incompatible with the chosen tech stack.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
> **Note**: As of v3, workflows no longer use `{{PLACEHOLDER}}` values for skill paths. Instead, they read skill names from the surface stack map in `.agent/instructions/tech-stack.md`. This gate verifies map completeness.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## How to Apply
|
|
10
10
|
|
|
11
|
-
Add a **Step 0 —
|
|
11
|
+
Add a **Step 0 — Map guard** to any specification or implementation workflow that reads skills from the surface stack map. The guard runs before all other steps, including re-run checks and prerequisite validations.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Guard Logic
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### 1. Read the surface stack map
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Read `.agent/instructions/tech-stack.md` and parse both tables:
|
|
18
|
+
- **Per-Surface Skills** — One row per surface
|
|
19
|
+
- **Cross-Cutting Skills** — Project-wide categories
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
### 2. Determine required cells
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
>
|
|
23
|
-
> **Unfilled placeholder:** `{{PLACEHOLDER_NAME}}`
|
|
24
|
-
>
|
|
25
|
-
> **Recovery:** If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed [tech decision] value, then run `/bootstrap-agents` with `KEY=<confirmed-value>`. If no architecture design document exists, run `/create-prd-stack` first to confirm tech stack decisions.
|
|
26
|
-
>
|
|
27
|
-
> **Why this matters:** [specific step] cannot produce correct output without this skill — [concrete consequence of proceeding without it].
|
|
23
|
+
Based on the workflow type, identify which columns/categories must have filled values:
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
| Workflow Type | Required Per-Surface Columns | Required Cross-Cutting Categories |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| **IA spec** (`write-architecture-spec-*`) | Databases | Security, Surfaces |
|
|
28
|
+
| **BE spec** (`write-be-spec-*`) | Languages, Databases, BE Frameworks, ORMs, Unit Tests | Auth |
|
|
29
|
+
| **FE spec** (`write-fe-spec-*`) | Languages, FE Frameworks, FE Design, State Mgmt | Accessibility |
|
|
30
|
+
| **Implementation** (`implement-slice-*`) | Languages, Unit Tests, E2E Tests + surface-specific | All |
|
|
31
|
+
| **Validation** (`validate-phase`) | All | All |
|
|
32
|
+
| **Architecture** (`create-prd-architecture`) | Databases, ORMs | Hosting |
|
|
33
|
+
| **Security** (`create-prd-security`) | — | Security, Auth |
|
|
34
|
+
| **Compile** (`create-prd-compile`) | Unit Tests, E2E Tests | CI/CD |
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
### 3. Check for empty cells
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
For each required cell, verify it contains at least one skill name (not `—`, not empty, not a `{{` literal).
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
### 4. Hard stop on empty cells
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
|---|---|---|---|
|
|
39
|
-
| `{{HOSTING_SKILL}}` | `/create-prd-stack` when hosting provider is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed hosting provider, then run `/bootstrap-agents HOSTING=<confirmed-provider>`. Otherwise run `/create-prd-stack` first. | Data strategy and schema design steps (Steps 4 and 5) cannot run without the hosting skill — deployment topology decisions will lack provider-specific conventions. |
|
|
40
|
-
| `{{ORM_SKILL}}` | `/create-prd-stack` when ORM is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed ORM, then run `/bootstrap-agents ORM=<confirmed-orm>`. Otherwise run `/create-prd-stack` first. | Migration strategy (Step 5.4) cannot run without the ORM skill — schema conventions and migration patterns will be generic instead of stack-specific. |
|
|
41
|
-
| `{{DATABASE_SKILLS}}` | `/create-prd-stack` when database technology is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed database, then run `/bootstrap-agents DATABASE=<confirmed-db>`. Otherwise run `/create-prd-stack` first. | Data strategy (Step 5) cannot run without the database skill — schema design patterns will be incompatible with the chosen database. |
|
|
42
|
+
When ANY required cell is empty, emit this message for **each** empty cell:
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
> **Empty map cell:** `{column}` for surface `{surface}`
|
|
45
|
+
> **Filled by:** `/create-prd-stack` when the {component} is confirmed
|
|
46
|
+
> **Recovery:** Run `/create-prd-stack` first to make tech stack decisions, then `/bootstrap-agents` to populate the map.
|
|
47
|
+
> **Impact:** Without this skill, {downstream impact description}.
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
Then emit:
|
|
46
50
|
|
|
47
|
-
|
|
48
|
-
|---|---|---|---|
|
|
49
|
-
| `{{DATABASE_SKILLS}}` | `/create-prd-stack` when database technology is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed database, then run `/bootstrap-agents DATABASE=<confirmed-db>`. Otherwise run `/create-prd-stack` first. | Data model design (Step 4) would produce schema patterns incompatible with the chosen database. |
|
|
50
|
-
| `{{SECURITY_SKILLS}}` | `/create-prd-stack` when security tooling is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed security framework, then run `/bootstrap-agents SECURITY=<confirmed-framework>`. Otherwise run `/create-prd-stack` first. | Edge case and attack surface analysis (Step 7) would run without the project's security skill, missing stack-specific threat vectors. |
|
|
51
|
+
> ⛔ **HARD STOP** — {N} map cell(s) are empty. This workflow cannot proceed without populated stack data. See recovery steps above.
|
|
51
52
|
|
|
52
|
-
###
|
|
53
|
+
### 5. Timing fallback (create-prd context)
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
During `/create-prd`, the map is being built incrementally. If a cell is empty but the value was just confirmed in the current conversation (from `/create-prd-stack`), the workflow may proceed using the conversation-confirmed value. Bootstrap will fill the map after `/create-prd` completes.
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|---|---|---|---|
|
|
58
|
-
| `{{LANGUAGE_SKILL}}` | `/create-prd-stack` when the primary language is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed language, then run `/bootstrap-agents LANGUAGE=<confirmed-language>`. Otherwise run `/create-prd-stack` first. | FE spec components would be written without the correct language skill, producing patterns incompatible with the chosen language. |
|
|
59
|
-
| `{{FRONTEND_FRAMEWORK_SKILL}}` | `/create-prd-stack` when the frontend framework is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed frontend framework, then run `/bootstrap-agents FRONTEND_FRAMEWORK=<confirmed-framework>`. Otherwise run `/create-prd-stack` first. | FE spec components would be written without the correct framework skill, producing patterns incompatible with the chosen framework. |
|
|
60
|
-
| `{{FRONTEND_DESIGN_SKILL}}` | `/create-prd-stack` when the frontend design system is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed design system, then run `/bootstrap-agents FRONTEND_DESIGN=<confirmed-design>`. Otherwise run `/create-prd-stack` first. | FE spec components would be written without the correct design skill, producing visual patterns incompatible with the chosen design system. |
|
|
61
|
-
| `{{ACCESSIBILITY_SKILL}}` | `/create-prd-stack` when accessibility tooling is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed accessibility tooling, then run `/bootstrap-agents ACCESSIBILITY=<confirmed-tooling>`. Otherwise run `/create-prd-stack` first. | FE spec components would lack stack-specific accessibility patterns and WCAG implementation guidance. |
|
|
62
|
-
| `{{STATE_MANAGEMENT_SKILL}}` | `/create-prd-stack` when state management is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed state management library, then run `/bootstrap-agents STATE_MANAGEMENT=<confirmed-library>`. Otherwise run `/create-prd-stack` first. | FE spec components would be written without the correct state management conventions, producing patterns incompatible with the chosen state library. |
|
|
57
|
+
This fallback **only** applies to workflows invoked within the `/create-prd` orchestrator. Standalone invocations must have the map populated.
|
|
63
58
|
|
|
64
|
-
|
|
59
|
+
## Recovery Table
|
|
65
60
|
|
|
66
|
-
|
|
61
|
+
| Empty Cell (Per-Surface) | Recovery Command |
|
|
62
|
+
|---|---|
|
|
63
|
+
| Languages | `/create-prd-stack` → confirm language |
|
|
64
|
+
| Databases | `/create-prd-stack` → confirm database(s) |
|
|
65
|
+
| BE Frameworks | `/create-prd-stack` → confirm backend framework |
|
|
66
|
+
| FE Frameworks | `/create-prd-stack` → confirm frontend framework |
|
|
67
|
+
| ORMs | `/create-prd-stack` → confirm ORM |
|
|
68
|
+
| Unit Tests | `/create-prd-stack` → confirm unit testing framework |
|
|
69
|
+
| E2E Tests | `/create-prd-stack` → confirm E2E testing framework |
|
|
70
|
+
| FE Design | `/create-prd-stack` → confirm frontend design approach |
|
|
71
|
+
| State Mgmt | `/create-prd-stack` → confirm state management library |
|
|
67
72
|
|
|
68
|
-
|
|
73
|
+
| Empty Cell (Cross-Cutting) | Recovery Command |
|
|
74
|
+
|---|---|
|
|
75
|
+
| Auth | `/create-prd-stack` → confirm auth provider |
|
|
76
|
+
| Security | `/create-prd-stack` → confirm security framework |
|
|
77
|
+
| CI/CD | `/create-prd-stack` → confirm CI/CD platform |
|
|
78
|
+
| Hosting | `/create-prd-stack` → confirm hosting provider |
|
|
79
|
+
| Accessibility | `/create-prd-stack` → confirm accessibility tooling |
|
|
69
80
|
|
|
70
|
-
|
|
81
|
+
## Commands verification
|
|
71
82
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
### `create-prd-security`
|
|
75
|
-
|
|
76
|
-
**Frontmatter:** `requires_placeholders: [SECURITY_SKILLS, AUTH_SKILL]`
|
|
77
|
-
|
|
78
|
-
| Placeholder | Filled by | Recovery | Why this matters |
|
|
79
|
-
|---|---|---|---|
|
|
80
|
-
| `{{SECURITY_SKILLS}}` | `/create-prd-stack` when security tooling is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed security framework, then run `/bootstrap-agents SECURITY=<confirmed-framework>`. Otherwise run `/create-prd-stack` first. | Security model (Step 6) cannot produce stack-specific threat analysis without the security skill — the model will miss framework-specific attack vectors. |
|
|
81
|
-
| `{{AUTH_SKILL}}` | `/create-prd-stack` when auth provider is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed auth provider, then run `/bootstrap-agents AUTH=<confirmed-provider>`. Otherwise run `/create-prd-stack` first. | Authentication design (Step 6.1) cannot produce correct auth flows without the auth skill — identity provider conventions and token handling will be generic. |
|
|
82
|
-
|
|
83
|
-
### `create-prd-compile`
|
|
84
|
-
|
|
85
|
-
**Frontmatter:** `requires_placeholders: [UNIT_TESTING_SKILL, E2E_TESTING_SKILL, CI_CD_SKILL]`
|
|
86
|
-
|
|
87
|
-
| Placeholder | Filled by | Recovery | Why this matters |
|
|
88
|
-
|---|---|---|---|
|
|
89
|
-
| `{{UNIT_TESTING_SKILL}}` | `/create-prd-stack` when the unit testing framework is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed unit testing framework, then run `/bootstrap-agents UNIT_TESTING=<confirmed-framework>`. Otherwise run `/create-prd-stack` first. | Development methodology (Step 8) cannot document correct test conventions without the unit testing skill — TDD patterns will be generic instead of framework-specific. |
|
|
90
|
-
| `{{E2E_TESTING_SKILL}}` | `/create-prd-stack` when the E2E testing framework is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed E2E testing framework, then run `/bootstrap-agents E2E_TESTING=<confirmed-framework>`. Otherwise run `/create-prd-stack` first. | Development methodology (Step 8) cannot document correct E2E test conventions without the E2E testing skill — integration test patterns will be generic. |
|
|
91
|
-
| `{{CI_CD_SKILL}}` | `/create-prd-stack` when CI/CD platform is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed CI/CD platform, then run `/bootstrap-agents CI_CD=<confirmed-platform>`. Otherwise run `/create-prd-stack` first. | Phasing strategy (Step 9) cannot produce correct pipeline configuration without the CI/CD skill — deployment and quality gate patterns will lack platform-specific conventions. |
|
|
92
|
-
|
|
93
|
-
### `write-be-spec-classify`
|
|
94
|
-
|
|
95
|
-
**Frontmatter:** `requires_placeholders: [LANGUAGE_SKILL, DATABASE_SKILLS, AUTH_SKILL, BACKEND_FRAMEWORK_SKILL, ORM_SKILL, UNIT_TESTING_SKILL]`
|
|
96
|
-
|
|
97
|
-
| Placeholder | Filled by | Recovery | Why this matters |
|
|
98
|
-
|---|---|---|---|
|
|
99
|
-
| `{{LANGUAGE_SKILL}}` | `/create-prd-stack` when the primary language is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed language, then run `/bootstrap-agents LANGUAGE=<confirmed-language>`. Otherwise run `/create-prd-stack` first. | BE spec code conventions would be written without the correct language skill, producing patterns incompatible with the chosen language. |
|
|
100
|
-
| `{{DATABASE_SKILLS}}` | `/create-prd-stack` when database technology is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed database, then run `/bootstrap-agents DATABASE=<confirmed-db>`. Otherwise run `/create-prd-stack` first. | Schema design and query patterns would be incompatible with the chosen database. |
|
|
101
|
-
| `{{AUTH_SKILL}}` | `/create-prd-stack` when auth provider is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed auth provider, then run `/bootstrap-agents AUTH=<confirmed-provider>`. Otherwise run `/create-prd-stack` first. | Authentication middleware and token handling would use generic patterns instead of provider-specific conventions. |
|
|
102
|
-
| `{{BACKEND_FRAMEWORK_SKILL}}` | `/create-prd-stack` when the backend framework is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed backend framework, then run `/bootstrap-agents BACKEND_FRAMEWORK=<confirmed-framework>`. Otherwise run `/create-prd-stack` first. | Route definitions, middleware patterns, and request handling would be framework-agnostic instead of following confirmed framework conventions. |
|
|
103
|
-
| `{{ORM_SKILL}}` | `/create-prd-stack` when ORM is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed ORM, then run `/bootstrap-agents ORM=<confirmed-orm>`. Otherwise run `/create-prd-stack` first. | Migration patterns and schema conventions would be generic instead of ORM-specific. |
|
|
104
|
-
| `{{UNIT_TESTING_SKILL}}` | `/create-prd-stack` when the unit testing framework is confirmed | If `docs/plans/*-architecture-design.md` exists, read it and extract the confirmed unit testing framework, then run `/bootstrap-agents UNIT_TESTING=<confirmed-framework>`. Otherwise run `/create-prd-stack` first. | Test writing conventions would use generic patterns instead of framework-specific assertions and utilities. |
|
|
83
|
+
Additionally verify that `.agent/instructions/commands.md` has non-template values. If the commands section still contains `{{COMMAND_SECTIONS}}`, run `/bootstrap-agents` to fill it.
|
|
@@ -17,5 +17,5 @@ This gives you a checklist to resume from if the session is interrupted during s
|
|
|
17
17
|
- Update shared contracts if needed
|
|
18
18
|
- Install any new dependencies
|
|
19
19
|
- Wire cross-surface integrations
|
|
20
|
-
3. **Run full validation** — run `
|
|
20
|
+
3. **Run full validation** — run the Validation Cmd from `.agent/instructions/commands.md` after synthesis
|
|
21
21
|
4. **Create synthesis report** per the `parallel-agents` skill (Synthesize step)
|
|
@@ -21,7 +21,7 @@ Write one section at a time in document order. Before writing section N+1, re-re
|
|
|
21
21
|
|
|
22
22
|
- For BE specs, the upstream source is the IA shard
|
|
23
23
|
- For FE specs, the upstream source is the BE spec
|
|
24
|
-
- For IA shards, the upstream sources are `ideation-index.md` (+ domain files) and `architecture-design.md`
|
|
24
|
+
- For IA shards, the upstream sources are `ideation-index.md` (+ the relevant domain folder's `*-index.md`, `*-cx.md`, and feature files) and `architecture-design.md`
|
|
25
25
|
|
|
26
26
|
**Hard rules:**
|
|
27
27
|
|