contextos-agents 2.1.1 → 2.3.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 (109) hide show
  1. package/.agents/AGENTS.md +53 -396
  2. package/.agents/adapters/aider/export.js +11 -16
  3. package/.agents/adapters/claude/export.js +13 -13
  4. package/.agents/adapters/copilot/export.js +29 -8
  5. package/.agents/adapters/cursor/export.js +9 -18
  6. package/.agents/adapters/gemini/export.js +11 -46
  7. package/.agents/adapters/pure-compiler.js +65 -42
  8. package/.agents/adapters/shared.js +35 -1
  9. package/.agents/adapters/zed/export.js +2 -2
  10. package/.agents/compiled/registry.v2.json +30 -18
  11. package/.agents/compiled/registry.v2.sha256 +1 -1
  12. package/.agents/compiler/manifest-compiler.js +5 -29
  13. package/.agents/core/skills/context-os/references/project-graph.md +3 -3
  14. package/.agents/core/skills/engineering-workflow/SKILL.md +11 -316
  15. package/.agents/core/skills/engineering-workflow/references/workflow.md +336 -0
  16. package/.agents/core/skills/engineering-workflow/skill.yaml +2 -4
  17. package/.agents/core/skills/gstack-roles/SKILL.md +11 -128
  18. package/.agents/core/skills/gstack-roles/references/roles.md +149 -0
  19. package/.agents/core/skills/gstack-roles/skill.yaml +2 -4
  20. package/.agents/core/skills/ponytail-mindset/SKILL.md +13 -165
  21. package/.agents/core/skills/ponytail-mindset/references/minimalism.md +186 -0
  22. package/.agents/core/skills/ponytail-mindset/skill.yaml +2 -5
  23. package/.agents/core/skills/security/skill.yaml +1 -0
  24. package/.agents/ctx.js +22 -17
  25. package/.agents/customization-dx.js +13 -9
  26. package/.agents/doctor.js +2 -2
  27. package/.agents/generated/claude/skills/context-manager/EXAMPLES.md +19 -0
  28. package/.agents/generated/claude/skills/context-manager/SKILL.md +0 -29
  29. package/.agents/generated/claude/skills/context-manager/TROUBLESHOOTING.md +7 -0
  30. package/.agents/generated/claude/skills/context-manager/VALIDATION.json +12 -0
  31. package/.agents/generated/claude/skills/context-manager/references/context-rules.md +59 -0
  32. package/.agents/generated/claude/skills/context-os/EXAMPLES.md +21 -0
  33. package/.agents/generated/claude/skills/context-os/SKILL.md +0 -31
  34. package/.agents/generated/claude/skills/context-os/TROUBLESHOOTING.md +7 -0
  35. package/.agents/generated/claude/skills/context-os/VALIDATION.json +12 -0
  36. package/.agents/generated/claude/skills/context-os/packs.yaml +59 -0
  37. package/.agents/generated/claude/skills/context-os/references/context-rules.md +68 -0
  38. package/.agents/generated/claude/skills/context-os/references/pipeline.md +119 -0
  39. package/.agents/generated/claude/skills/context-os/references/project-graph.md +103 -0
  40. package/.agents/generated/claude/skills/context-os/rules.yaml +135 -0
  41. package/.agents/generated/claude/skills/engineering-workflow/EXAMPLES.md +57 -0
  42. package/.agents/generated/claude/skills/engineering-workflow/SKILL.md +10 -391
  43. package/.agents/generated/claude/skills/engineering-workflow/TROUBLESHOOTING.md +19 -0
  44. package/.agents/generated/claude/skills/engineering-workflow/VALIDATION.json +12 -0
  45. package/.agents/generated/claude/skills/engineering-workflow/references/workflow.md +336 -0
  46. package/.agents/generated/claude/skills/gemini-precision/EXAMPLES.md +72 -0
  47. package/.agents/generated/claude/skills/gemini-precision/SKILL.md +0 -100
  48. package/.agents/generated/claude/skills/gemini-precision/TROUBLESHOOTING.md +25 -0
  49. package/.agents/generated/claude/skills/gemini-precision/VALIDATION.json +12 -0
  50. package/.agents/generated/claude/skills/gstack-roles/EXAMPLES.md +23 -0
  51. package/.agents/generated/claude/skills/gstack-roles/SKILL.md +10 -164
  52. package/.agents/generated/claude/skills/gstack-roles/TROUBLESHOOTING.md +13 -0
  53. package/.agents/generated/claude/skills/gstack-roles/VALIDATION.json +12 -0
  54. package/.agents/generated/claude/skills/gstack-roles/references/roles.md +149 -0
  55. package/.agents/generated/claude/skills/ponytail-mindset/EXAMPLES.md +45 -0
  56. package/.agents/generated/claude/skills/ponytail-mindset/SKILL.md +12 -228
  57. package/.agents/generated/claude/skills/ponytail-mindset/TROUBLESHOOTING.md +19 -0
  58. package/.agents/generated/claude/skills/ponytail-mindset/VALIDATION.json +12 -0
  59. package/.agents/generated/claude/skills/ponytail-mindset/references/minimalism.md +186 -0
  60. package/.agents/generated/claude/skills/security/EXAMPLES.md +64 -0
  61. package/.agents/generated/claude/skills/security/SKILL.md +0 -86
  62. package/.agents/generated/claude/skills/security/TROUBLESHOOTING.md +19 -0
  63. package/.agents/generated/claude/skills/security/VALIDATION.json +12 -0
  64. package/.agents/generated/gemini/skills/context-manager/EXAMPLES.md +19 -0
  65. package/.agents/generated/gemini/skills/context-manager/SKILL.md +1 -33
  66. package/.agents/generated/gemini/skills/context-manager/TROUBLESHOOTING.md +7 -0
  67. package/.agents/generated/gemini/skills/context-manager/VALIDATION.json +12 -0
  68. package/.agents/generated/gemini/skills/context-manager/references/context-rules.md +59 -0
  69. package/.agents/generated/gemini/skills/context-os/EXAMPLES.md +21 -0
  70. package/.agents/generated/gemini/skills/context-os/SKILL.md +0 -35
  71. package/.agents/generated/gemini/skills/context-os/TROUBLESHOOTING.md +7 -0
  72. package/.agents/generated/gemini/skills/context-os/VALIDATION.json +12 -0
  73. package/.agents/generated/gemini/skills/context-os/packs.yaml +59 -0
  74. package/.agents/generated/gemini/skills/context-os/references/context-rules.md +68 -0
  75. package/.agents/generated/gemini/skills/context-os/references/pipeline.md +119 -0
  76. package/.agents/generated/gemini/skills/context-os/references/project-graph.md +103 -0
  77. package/.agents/generated/gemini/skills/context-os/rules.yaml +135 -0
  78. package/.agents/generated/gemini/skills/engineering-workflow/EXAMPLES.md +57 -0
  79. package/.agents/generated/gemini/skills/engineering-workflow/SKILL.md +11 -396
  80. package/.agents/generated/gemini/skills/engineering-workflow/TROUBLESHOOTING.md +19 -0
  81. package/.agents/generated/gemini/skills/engineering-workflow/VALIDATION.json +12 -0
  82. package/.agents/generated/gemini/skills/engineering-workflow/references/workflow.md +336 -0
  83. package/.agents/generated/gemini/skills/gemini-precision/EXAMPLES.md +72 -0
  84. package/.agents/generated/gemini/skills/gemini-precision/SKILL.md +0 -104
  85. package/.agents/generated/gemini/skills/gemini-precision/TROUBLESHOOTING.md +25 -0
  86. package/.agents/generated/gemini/skills/gemini-precision/VALIDATION.json +12 -0
  87. package/.agents/generated/gemini/skills/gstack-roles/EXAMPLES.md +23 -0
  88. package/.agents/generated/gemini/skills/gstack-roles/SKILL.md +11 -169
  89. package/.agents/generated/gemini/skills/gstack-roles/TROUBLESHOOTING.md +13 -0
  90. package/.agents/generated/gemini/skills/gstack-roles/VALIDATION.json +12 -0
  91. package/.agents/generated/gemini/skills/gstack-roles/references/roles.md +149 -0
  92. package/.agents/generated/gemini/skills/ponytail-mindset/EXAMPLES.md +45 -0
  93. package/.agents/generated/gemini/skills/ponytail-mindset/SKILL.md +13 -233
  94. package/.agents/generated/gemini/skills/ponytail-mindset/TROUBLESHOOTING.md +19 -0
  95. package/.agents/generated/gemini/skills/ponytail-mindset/VALIDATION.json +12 -0
  96. package/.agents/generated/gemini/skills/ponytail-mindset/references/minimalism.md +186 -0
  97. package/.agents/generated/gemini/skills/security/EXAMPLES.md +64 -0
  98. package/.agents/generated/gemini/skills/security/SKILL.md +2 -92
  99. package/.agents/generated/gemini/skills/security/TROUBLESHOOTING.md +19 -0
  100. package/.agents/generated/gemini/skills/security/VALIDATION.json +12 -0
  101. package/.agents/plugins.js +272 -28
  102. package/.agents/resolver/canonical-resolver.js +43 -7
  103. package/.agents/resolver/resolve-args.js +31 -0
  104. package/.agents/stats.js +8 -11
  105. package/.agents/workspace/workspace-graph.js +16 -6
  106. package/README.md +61 -6
  107. package/bin/index.js +157 -51
  108. package/bin/lib/ui.js +140 -0
  109. package/package.json +5 -2
@@ -655,34 +655,10 @@ class ManifestCompiler {
655
655
  compile() {
656
656
  this.diagnostics = [];
657
657
  const manifestsById = {};
658
- const skillDirs = [];
659
-
660
- // 1. Discover skill directories
661
- if (fs.existsSync(this.coreSkillsDir)) {
662
- const entries = fs.readdirSync(this.coreSkillsDir, { withFileTypes: true });
663
- for (const entry of entries) {
664
- if (entry.isDirectory()) {
665
- skillDirs.push(path.join(this.coreSkillsDir, entry.name));
666
- }
667
- }
668
- }
669
-
670
- // Also check plugins
671
- const pluginsDir = path.join(this.agentsDir, 'plugins');
672
- if (fs.existsSync(pluginsDir)) {
673
- const pluginEntries = fs.readdirSync(pluginsDir, { withFileTypes: true });
674
- for (const pe of pluginEntries) {
675
- if (pe.isDirectory()) {
676
- const pSkills = path.join(pluginsDir, pe.name, 'skills');
677
- if (fs.existsSync(pSkills)) {
678
- const subs = fs.readdirSync(pSkills, { withFileTypes: true });
679
- for (const sub of subs) {
680
- if (sub.isDirectory()) skillDirs.push(path.join(pSkills, sub.name));
681
- }
682
- }
683
- }
684
- }
685
- }
658
+ const skillDirs = require('../plugins.js').collectAllSkillDirs(path.dirname(this.agentsDir), {
659
+ coreSkillsDir: this.coreSkillsDir,
660
+ agentsDir: this.agentsDir,
661
+ });
686
662
 
687
663
  // Sort skill directories for determinism
688
664
  skillDirs.sort();
@@ -697,7 +673,7 @@ class ManifestCompiler {
697
673
  // Synthesize minimal manifest from directory name & SKILL.md
698
674
  const id = path.basename(dir);
699
675
  const norm = this.normalizeManifest(dir, `id: ${id}\nname: ${id}\n`);
700
- norm.source = path.relative(this.rootDir, dir).replace(/\\/g, '/');
676
+ norm.source = path.relative(this.rootDir, path.join(dir, norm.entrypoint)).replace(/\\/g, '/');
701
677
  manifestsById[id] = norm;
702
678
  continue;
703
679
  }
@@ -28,7 +28,7 @@ The Project Graph lives in `docs/PROJECT_GRAPH.md` and follows this format:
28
28
  project:
29
29
  name: "DentalCRM"
30
30
  type: crm
31
-
31
+
32
32
  modules:
33
33
  patients:
34
34
  description: "Patient management"
@@ -40,7 +40,7 @@ modules:
40
40
  - src/modules/patients/**
41
41
  skills: [react, typescript, postgres]
42
42
  depends_on: [auth]
43
-
43
+
44
44
  appointments:
45
45
  description: "Appointment scheduling"
46
46
  features:
@@ -51,7 +51,7 @@ modules:
51
51
  - src/modules/appointments/**
52
52
  skills: [react, typescript, postgres]
53
53
  depends_on: [patients, auth]
54
-
54
+
55
55
  auth:
56
56
  description: "Authentication and authorization"
57
57
  features:
@@ -1,343 +1,38 @@
1
1
  ---
2
2
  name: engineering-workflow
3
- description: >
4
- Senior engineering workflow skill. Enforces spec → plan → build → test → review → ship.
5
- AI never writes code before a spec and plan are approved. Acts like a senior, not a junior.
6
- Integrated with gstack-roles for automatic role activation per phase.
3
+ description: Scope implementation work, verify behavior, and report evidence using a proportional lifecycle.
7
4
  ---
8
5
 
9
6
  # engineering-workflow
10
7
 
11
8
  ## Overview
12
9
 
13
- Systematic 6-phase engineering pipeline (DEFINE → PLAN → BUILD → VERIFY → REVIEW → SHIP) enforcing role declarations, atomic task execution, quality gates, regression prevention, and structured requirements elicitation.
10
+ Define the outcome, plan substantial changes, implement, verify, review, and report. Existing user authorization carries forward.
14
11
 
15
12
  ## When to Use
16
13
 
17
- Activate on all project tasks to orchestrate structured development, spec definition, architectural planning, and verification gates.
14
+ Implementation, debugging, reviews, and release preparation. Routine maintenance and diagnostics can proceed directly with relevant checks.
18
15
 
19
16
  ## Rules & Patterns
20
17
 
21
- Inspired by [addyosmani/agent-skills](https://github.com/addyosmani/agent-skills) by Addy Osmani (Google Chrome) and [obra/superpowers](https://github.com/obra/superpowers).
18
+ Establish acceptance criteria for substantial or ambiguous features. Ask only for missing decisions that affect scope or safety. An explicit implementation request authorizes ordinary reversible work. Preserve unrelated changes. Verify behavior before reporting completion. Publishing and external messages need authorization for that action.
22
19
 
23
- ### Core Principle
24
-
25
- > **A junior writes code immediately. A senior writes a spec first.**
26
- > You are a senior. You never write code until the spec and plan are approved.
27
-
28
- ---
29
-
30
- ### The 6-Phase Development Pipeline
31
-
32
- ```
33
- DEFINE PLAN BUILD VERIFY REVIEW SHIP
34
- ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐
35
- │ Idea │ ───▶ │ Spec │ ───▶ │ Code │ ───▶ │ Test │ ───▶ │ QA │ ───▶ │ Go │
36
- │Refine│ │ PRD │ │ Impl │ │Debug │ │ Gate │ │ Live │
37
- └──────┘ └──────┘ └──────┘ └──────┘ └──────┘ └──────┘
38
- /spec /plan /build /test /review /ship
39
-
40
- [ROLE: Product Manager] [ROLE: Architect] [ROLE: Senior Dev] [ROLE: QA Lead] [ROLE: Staff Eng] [ROLE: Release Eng]
41
- ```
42
-
43
- **IRON RULE**: In interactive development, no phase can be skipped and no code is written before `/plan` is approved.
44
- **Direct Build & Fast-Track Exception**: When the prompt/caller explicitly requests a standalone implementation, declares `[PHASE: Build]`, or requests routine operational/maintenance tasks (git operations, version bumps, typo fixes, small config tweaks, diagnostic checks), proceed directly to execution without conversational approval pauses.
45
-
46
- ---
47
-
48
- ### Phase 1: DEFINE - /spec
49
-
50
- **Auto-activates → `[ROLE: Product Manager]`**
51
-
52
- Turn vague intent into a precise, executable specification.
53
-
54
- #### Step 1.1: The Interview Protocol (`interview-me`)
55
-
56
- Before writing the spec, if there is ambiguity, high blast radius, or multiple architectural paths, stop and ask the user **one question at a time** (or up to 2 tightly coupled questions):
57
-
58
- 1. **Clarify Business Intent**: What user problem are we solving? What is explicitly out of scope?
59
- 2. **Clarify Constraints**: Runtime versions, database engines, performance bounds.
60
- 3. **Clarify Edge Cases**: What happens on offline state, empty lists, unauthorized requests?
61
-
62
- #### Step 1.2: Spec Template
63
-
64
- ```markdown
65
- ## Feature Spec: [Feature Name]
66
-
67
- ### Why (Problem)
68
- [What pain does this solve? Who has it? How often?]
69
-
70
- ### Scope (What's In / Out)
71
-
72
- **In-Scope**:
73
- - [Specific item 1]
74
- - [Specific item 2]
75
-
76
- **Out-of-Scope**:
77
- - [Thing we're NOT doing and why]
78
-
79
- ### Technical Approach
80
- [Read the relevant code. Understand what changes where.]
81
- Files affected:
82
- - `src/X.js` - [what changes]
83
- - `src/Y.js` - [what changes]
84
-
85
- ### Acceptance Criteria
86
- - [ ] Given [context], when [action], then [result]
87
- - [ ] Given [context], when [action], then [result]
88
-
89
- ### Open Questions
90
- - [Unresolved decision 1]
91
- - [Unresolved decision 2]
92
- ```
93
-
94
- ---
95
-
96
- ### Phase 2: PLAN - /plan
97
-
98
- **Auto-activates → `[ROLE: Architect]`**
99
-
100
- Break the spec into atomic, independently testable tasks.
101
-
102
- #### Thin Vertical Slices (`incremental-implementation`)
103
-
104
- Organize tasks as **Thin Vertical Slices** rather than horizontal layers:
105
-
106
- - **Bad (Horizontal)**: Task 1: All DB migrations. Task 2: All API routes. Task 3: All UI components. (Nothing works until step 3).
107
- - **Good (Vertical Slices)**: Slice 1: Minimal DB table + minimal API + minimal UI button end-to-end. Verify and commit. Slice 2: Add validation + edge cases. Slice 3: Polish UI & telemetry.
108
-
109
- #### Plan Rules
110
-
111
- - Each task must be **completable in < 2 hours** of focused work.
112
- - Each task must be **independently testable**.
113
- - Tasks must be **ordered by dependency** (blocking tasks first).
114
- - Each task gets a **test requirement** - no task without a test.
115
-
116
- #### Plan Template
117
-
118
- ```markdown
119
- ## Implementation Plan: [Feature Name]
120
-
121
- ### Tasks
122
-
123
- **Task 1: [Slice 1 Name]** (est. 30min)
124
- - What: [Specific implementation detail]
125
- - Files: [file1.js, file2.js]
126
- - Test: [How will you verify this works?]
127
- - Blocked by: [nothing / Task N]
128
-
129
- **Task 2: [Slice 2 Name]** (est. 45min)
130
- - What: [Specific implementation detail]
131
- - Files: [file3.js]
132
- - Test: [Test description]
133
- - Blocked by: Task 1
134
-
135
- ### Risk Assessment
136
- - [Risk 1]: [Mitigation]
137
- - [Risk 2]: [Mitigation]
138
-
139
- ### STOP - Awaiting Approval
140
- Do not proceed to BUILD until this plan is approved.
141
- ```
142
-
143
- ---
144
-
145
- ### Phase 3: BUILD - /build
146
-
147
- **Auto-activates → `[ROLE: Senior Developer]`**
148
-
149
- Implement one task at a time. Commit after each task.
150
-
151
- #### Build Rules
152
-
153
- 1. **One task per commit** - atomic, descriptive commit messages.
154
- 2. **Write the test FIRST** (TDD - red-green-refactor).
155
- 3. **No dead code** - if it's not tested, it's not shipped.
156
- 4. **No TODOs in committed code** - resolve or create a tracked issue.
157
- 5. **Read before writing** - understand the surrounding code before changing it.
158
- 6. **Limit the blast radius** - modify ONLY the files explicitly listed in the current task's plan. Do NOT rewrite adjacent components, hooks, or utilities unless strictly required AND approved.
159
-
160
- #### Commit Message Format
161
-
162
- ```text
163
- type(scope): short description (max 72 chars)
164
-
165
- - Detail 1
166
- - Detail 2
167
-
168
- Refs: #issue-number
169
- ```
170
-
171
- Types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`
172
-
173
- ---
174
-
175
- ### Phase 4: VERIFY - /test
176
-
177
- **Auto-activates → `[ROLE: QA Lead]`**
178
-
179
- Tests are proof, not an afterthought.
180
-
181
- #### Test Strategy by Code Type
182
-
183
- **Logic & Services (TDD)**:
184
-
185
- ```text
186
- 1. RED: Write a failing test for the next small behavior
187
- 2. GREEN: Write the minimum code to make it pass
188
- 3. REFACTOR: Clean up without breaking tests
189
- 4. REPEAT
190
- ```
191
-
192
- **UI Components & User Flows (BDD)**:
193
-
194
- For complex React components, prioritize testing _user behavior_ over internal state:
195
-
196
- - Use **React Testing Library** (`userEvent`, `screen.getByRole`) - test what the user sees.
197
- - Use **Playwright** for critical user flows (login, checkout, form submit).
198
- - Do NOT test implementation details (internal state, private methods, component structure).
199
- - Focus on: "When user clicks X, does Y appear?" not "Does `useState` hold the right value?"
200
-
201
- ```tsx
202
- // [GOOD] BDD: Test behavior
203
- test("shows error when email is invalid", async () => {
204
- render(<LoginForm />);
205
- await userEvent.type(screen.getByLabelText("Email"), "not-an-email");
206
- await userEvent.click(screen.getByRole("button", { name: /sign in/i }));
207
- expect(screen.getByText(/invalid email/i)).toBeInTheDocument();
208
- });
209
- ```
210
-
211
- #### Test Quality Gates
212
-
213
- Before moving to Review, verify:
214
-
215
- - [ ] All new code has tests
216
- - [ ] Tests are meaningful (not just coverage theater)
217
- - [ ] Edge cases are covered (null, empty, overflow, unauthorized)
218
- - [ ] Tests fail when the implementation is broken (anti-regression)
219
- - [ ] Test names are readable: `it("returns 404 when user not found")`
220
-
221
- ---
222
-
223
- ### Phase 5: REVIEW - /review
224
-
225
- **Auto-activates → `[ROLE: Staff Engineer]` + `[ROLE: Senior Designer]` for UI tasks**
226
-
227
- Review before merging. Always.
228
-
229
- #### Subagent / Peer Code Review Protocol
230
-
231
- Inspired by [obra/superpowers](https://github.com/obra/superpowers):
232
-
233
- 1. **Self-Review First**: The implementer runs git diff and verifies against the original acceptance criteria.
234
- 2. **Review Checklist**:
235
- - **Correctness**: Does it do what the spec says? Are all criteria met?
236
- - **Architecture**: Single Responsibility, DRY without premature abstraction, no business logic in API routes.
237
- - **Security**: No secrets hardcoded, inputs validated via Zod/schemas, auth checked before data access.
238
- - **Performance**: No N+1 queries, expensive operations cached, sets paginated.
239
- - **Design**: If UI, passes `impeccable-design` quick audit (typography, colors, spacing, animations).
240
-
241
- ---
242
-
243
- ### Phase 5.5: SIMPLIFY - /simplify
244
-
245
- **Auto-activates → `[ROLE: Staff Engineer]` (Ponytail Mindset)**
246
-
247
- Before merging, ruthlessly simplify:
248
-
249
- 1. Did we introduce abstractions that are only used once? (Inline them).
250
- 2. Can 3 lines of standard JavaScript replace a 50-line custom utility?
251
- 3. Is any configuration or generic handler premature? (YAGNI).
252
- 4. Is the code obvious to a mid-level engineer without reading a documentation manual?
253
-
254
- ---
255
-
256
- ### Phase 6: SHIP - /ship
257
-
258
- **Auto-activates → `[ROLE: Release Engineer]`**
259
-
260
- Only ship when all gates are green.
261
-
262
- #### Pre-Ship Checklist
263
-
264
- - [ ] All tests pass in CI
265
- - [ ] No lint errors
266
- - [ ] Feature works in staging environment
267
- - [ ] Docs updated (README, API docs, changelogs)
268
- - [ ] Breaking changes documented
269
- - [ ] Rollback plan exists
270
- - [ ] Preview / staging deployment verified (if applicable, e.g. Vercel Preview and Core Web Vitals for frontend deployments)
271
-
272
- #### Operational Self-Improvement
273
-
274
- Before completing a workflow, review the session for durable learnings. Write them to `.agents/learnings.md`. If no durable learning occurred, state "No durable learnings this session" in your final output.
275
-
276
- ---
20
+ Read [references/workflow.md](references/workflow.md) for detailed procedures and examples only when needed.
277
21
 
278
22
  ## Code Examples
279
23
 
280
- ### Vertical Slice Example
281
-
282
- ```javascript
283
- // Slice 1: Minimal functional endpoint
284
- // POST /api/v1/projects -> creates project with basic validation
285
- import { z } from 'zod';
286
- import { projectService } from '@/services/project';
287
-
288
- const CreateProjectSchema = z.object({
289
- name: z.string().min(1).max(100),
290
- description: z.string().optional()
291
- });
292
-
293
- export async function POST(req) {
294
- const session = await auth();
295
- if (!session?.userId) return Response.json({ error: 'Unauthorized' }, { status: 401 });
296
-
297
- const body = await req.json();
298
- const parsed = CreateProjectSchema.parse(body);
299
- const project = await projectService.create({ ...parsed, userId: session.userId });
300
-
301
- return Response.json(project, { status: 201 });
302
- }
303
- ```
304
-
305
- ---
24
+ A README typo needs an edit and relevant formatting check. An authentication feature needs access boundaries, failure cases, implementation, and behavioral verification.
306
25
 
307
26
  ## Validation Checklist
308
27
 
309
- - [ ] Specification exists with clear In-Scope and Out-of-Scope boundaries.
310
- - [ ] Implementation plan broken down into vertical tasks < 2 hours each.
311
- - [ ] Tests written before implementation (TDD/BDD).
312
- - [ ] Code reviewed against correctness, security, performance, and design gates.
313
- - [ ] Staged security and quality check passes (`contextos scan --staged --enforce`).
314
- - [ ] Simplification ladder executed before shipping.
315
-
316
- ---
28
+ - [ ] The requested outcome is handled.
29
+ - [ ] Relevant verification and safety boundaries are preserved.
30
+ - [ ] Limitations are stated.
317
31
 
318
32
  ## Common Mistakes
319
33
 
320
- - **Writing code before approval**: Skipping `/spec` or `/plan` in interactive sessions.
321
- - **Horizontal task splitting**: Building all DB models first without verifying end-to-end integration.
322
- - **Premature refactoring**: Changing unrelated adjacent code during a feature task.
323
- - **Ignoring non-happy paths**: Testing only 200 OK responses while ignoring 400, 401, 404, 500 scenarios.
324
-
325
- ---
34
+ Repeated approval after authorization; unnecessary ceremonies for routine edits; treating role labels or string checks as behavioral proof.
326
35
 
327
36
  ## Integration Notes
328
37
 
329
- - Integrates with `gstack-roles` for automated role switching across all 6 phases.
330
- - Triggers `ponytail-mindset` during the BUILD and SIMPLIFY phases.
331
- - Hands off to `impeccable-design` for UI quality review.
332
- - Coordinates with `security` during Phase 5 for pre-merge compliance.
333
-
334
- ---
335
-
336
- ## Completion Status Protocol
337
-
338
- When completing a task or workflow, you must explicitly report your final status as the last part of your output:
339
-
340
- - **DONE** - completed with evidence.
341
- - **DONE_WITH_CONCERNS** - completed, but list concerns.
342
- - **BLOCKED** - cannot proceed; state blocker and what was tried.
343
- - **NEEDS_CONTEXT** - missing info; state exactly what is needed.
38
+ Load relevant domain skills and supporting resources on demand. Compatibility identifiers remain available.