opencastle 0.32.5 → 0.32.6
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 +13 -3
- package/bin/cli.mjs +2 -0
- package/package.json +1 -1
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/orchestrator/agents/api-designer.agent.md +25 -34
- package/src/orchestrator/agents/architect.agent.md +40 -84
- package/src/orchestrator/agents/content-engineer.agent.md +29 -31
- package/src/orchestrator/agents/copywriter.agent.md +35 -60
- package/src/orchestrator/agents/data-expert.agent.md +24 -30
- package/src/orchestrator/agents/database-engineer.agent.md +26 -31
- package/src/orchestrator/agents/developer.agent.md +32 -34
- package/src/orchestrator/agents/devops-expert.agent.md +31 -26
- package/src/orchestrator/agents/documentation-writer.agent.md +29 -29
- package/src/orchestrator/agents/performance-expert.agent.md +36 -33
- package/src/orchestrator/agents/release-manager.agent.md +25 -34
- package/src/orchestrator/agents/researcher.agent.md +41 -95
- package/src/orchestrator/agents/reviewer.agent.md +24 -34
- package/src/orchestrator/agents/security-expert.agent.md +35 -39
- package/src/orchestrator/agents/seo-specialist.agent.md +25 -32
- package/src/orchestrator/agents/session-guard.agent.md +20 -79
- package/src/orchestrator/agents/team-lead.agent.md +50 -254
- package/src/orchestrator/agents/testing-expert.agent.md +37 -49
- package/src/orchestrator/agents/ui-ux-expert.agent.md +33 -39
- package/src/orchestrator/customizations/KNOWN-ISSUES.md +0 -1
- package/src/orchestrator/customizations/agents/skill-matrix.json +12 -0
- package/src/orchestrator/instructions/general.instructions.md +24 -84
- package/src/orchestrator/plugins/astro/SKILL.md +23 -179
- package/src/orchestrator/plugins/convex/SKILL.md +38 -12
- package/src/orchestrator/plugins/netlify/SKILL.md +17 -13
- package/src/orchestrator/plugins/nextjs/SKILL.md +55 -261
- package/src/orchestrator/plugins/nx/SKILL.md +20 -72
- package/src/orchestrator/plugins/playwright/SKILL.md +5 -17
- package/src/orchestrator/plugins/slack/SKILL.md +28 -190
- package/src/orchestrator/plugins/teams/SKILL.md +10 -140
- package/src/orchestrator/plugins/vitest/SKILL.md +2 -2
- package/src/orchestrator/prompts/bug-fix.prompt.md +25 -63
- package/src/orchestrator/prompts/implement-feature.prompt.md +29 -66
- package/src/orchestrator/prompts/quick-refinement.prompt.md +31 -66
- package/src/orchestrator/skills/accessibility-standards/SKILL.md +50 -105
- package/src/orchestrator/skills/agent-hooks/SKILL.md +60 -110
- package/src/orchestrator/skills/agent-memory/SKILL.md +44 -93
- package/src/orchestrator/skills/api-patterns/SKILL.md +20 -68
- package/src/orchestrator/skills/code-commenting/SKILL.md +49 -101
- package/src/orchestrator/skills/context-map/SKILL.md +47 -88
- package/src/orchestrator/skills/data-engineering/SKILL.md +27 -74
- package/src/orchestrator/skills/decomposition/SKILL.md +50 -98
- package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +44 -107
- package/src/orchestrator/skills/documentation-standards/SKILL.md +28 -89
- package/src/orchestrator/skills/fast-review/SKILL.md +51 -276
- package/src/orchestrator/skills/frontend-design/SKILL.md +53 -163
- package/src/orchestrator/skills/git-workflow/SKILL.md +18 -54
- package/src/orchestrator/skills/memory-merger/SKILL.md +51 -88
- package/src/orchestrator/skills/observability-logging/SKILL.md +29 -75
- package/src/orchestrator/skills/orchestration-protocols/SKILL.md +58 -117
- package/src/orchestrator/skills/panel-majority-vote/SKILL.md +65 -140
- package/src/orchestrator/skills/performance-optimization/SKILL.md +21 -85
- package/src/orchestrator/skills/project-consistency/SKILL.md +62 -281
- package/src/orchestrator/skills/react-development/SKILL.md +38 -86
- package/src/orchestrator/skills/security-hardening/SKILL.md +40 -84
- package/src/orchestrator/skills/self-improvement/SKILL.md +26 -60
- package/src/orchestrator/skills/seo-patterns/SKILL.md +40 -105
- package/src/orchestrator/skills/session-checkpoints/SKILL.md +26 -68
- package/src/orchestrator/skills/team-lead-reference/SKILL.md +66 -206
- package/src/orchestrator/skills/testing-workflow/SKILL.md +42 -112
- package/src/orchestrator/skills/validation-gates/SKILL.md +39 -170
- package/src/orchestrator/snippets/base-output-contract.md +14 -0
- package/src/orchestrator/snippets/discovered-issues-policy.md +15 -0
- package/src/orchestrator/snippets/logging-mandatory.md +11 -0
- package/src/orchestrator/snippets/never-expose-secrets.md +22 -0
|
@@ -3,134 +3,64 @@ name: testing-workflow
|
|
|
3
3
|
description: "Comprehensive testing workflow including test planning, unit/integration/E2E testing patterns, coverage requirements, and common testing mistakes. Use when writing tests, planning test strategies, or validating feature completeness."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
<!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
|
|
7
|
-
|
|
8
6
|
# Testing Workflow
|
|
9
7
|
|
|
10
|
-
## Core
|
|
11
|
-
|
|
12
|
-
- Test implementations thoroughly before claiming completion.
|
|
13
|
-
- Every feature must be validated through comprehensive testing covering happy paths, edge cases, error conditions, and user interactions.
|
|
14
|
-
- **Mandatory**: Every feature implementation must be tested in the browser using the project's E2E testing tool (resolved via the **e2e-testing** capability slot) before marking as complete.
|
|
8
|
+
## Core Rules
|
|
15
9
|
|
|
16
|
-
|
|
10
|
+
- Validate every feature: happy paths, edge cases, error conditions, interactions.
|
|
11
|
+
- **Mandatory**: Test in browser via the **e2e-testing** capability slot before marking complete.
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
## E2E Context Limits
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
| Rule | Detail |
|
|
16
|
+
|------|--------|
|
|
17
|
+
| One suite per session | Never run all suites in one conversation |
|
|
18
|
+
| Max 3 screenshots | Per session |
|
|
19
|
+
| `evaluate_script()` over `take_snapshot()` | Returns less data |
|
|
20
|
+
| Reload between flows | Clears state |
|
|
21
|
+
| Log results | Append to `.opencastle/logs/e2e-results.md` |
|
|
26
22
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
See `.opencastle/project.instructions.md` for the full list of E2E test suite files.
|
|
23
|
+
Suite files: see `.opencastle/project.instructions.md`.
|
|
30
24
|
|
|
31
25
|
## Pre-Implementation Test Plan
|
|
32
26
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
- Dropdowns respond to selection.
|
|
42
|
-
- Filters update URL params and trigger data refetch.
|
|
43
|
-
- Forms accept and validate input.
|
|
44
|
-
|
|
45
|
-
### 3. State Transition Tests
|
|
46
|
-
- Changing filter values produces different results.
|
|
47
|
-
- Data updates on user interaction.
|
|
48
|
-
- UI reflects backend state changes.
|
|
49
|
-
- Loading states appear during async operations.
|
|
50
|
-
|
|
51
|
-
### 4. Edge Case Tests
|
|
52
|
-
- Empty results.
|
|
53
|
-
- Maximum/minimum boundaries.
|
|
54
|
-
- Invalid input handling.
|
|
55
|
-
- Network errors and timeouts.
|
|
56
|
-
|
|
57
|
-
### 5. Integration Tests
|
|
58
|
-
- Component interactions work correctly.
|
|
59
|
-
- Data flows from server to UI properly.
|
|
60
|
-
- URL parameters sync with component state.
|
|
61
|
-
- Server-side vs client-side filtering works.
|
|
62
|
-
|
|
63
|
-
### 6. Responsive Breakpoint Tests (MANDATORY for UI changes)
|
|
64
|
-
|
|
65
|
-
**Every UI feature must be tested at all responsive breakpoints** defined in your project's testing config. Most layout bugs only surface at smaller viewports.
|
|
66
|
-
|
|
67
|
-
> **Detailed breakpoint definitions, resize commands, and per-breakpoint checklists:** See the **browser-testing** skill. The **validation-gates** skill (Gate 3) defines the mandatory testing protocol.
|
|
68
|
-
|
|
69
|
-
**Anti-pattern:** Testing only at desktop (or only at the default browser width) and assuming responsive classes work. CSS utility classes can be incorrect — always verify visually at every breakpoint.
|
|
27
|
+
| Category | What to cover |
|
|
28
|
+
|----------|---------------|
|
|
29
|
+
| Initial state | Page loads with defaults; components in expected state |
|
|
30
|
+
| User interactions | Buttons, dropdowns, filters (URL params + refetch), form validation |
|
|
31
|
+
| State transitions | Filter changes produce different results; loading states; backend sync |
|
|
32
|
+
| Edge cases | Empty results, min/max boundaries, invalid input, network errors |
|
|
33
|
+
| Integration | Data flow server→UI, URL params↔state, server vs client filtering |
|
|
34
|
+
| Responsive (MANDATORY for UI) | All breakpoints per **browser-testing** skill / **validation-gates** Gate 3 |
|
|
70
35
|
|
|
71
36
|
## Coverage Requirements
|
|
72
37
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
38
|
+
| Layer | Minimum |
|
|
39
|
+
|-------|---------|
|
|
40
|
+
| Unit (functions, components, hooks) | 95% |
|
|
41
|
+
| Integration (boundaries, URL sync) | All boundaries |
|
|
42
|
+
| E2E (journeys, interactions, errors) | All critical paths |
|
|
77
43
|
|
|
78
|
-
|
|
79
|
-
- Component integration, data flow, state updates across boundaries.
|
|
80
|
-
- URL synchronization.
|
|
81
|
-
|
|
82
|
-
### E2E Tests (Browser Automation)
|
|
83
|
-
- Complete user journeys. All interactive elements.
|
|
84
|
-
- State transitions. Error handling. Performance.
|
|
85
|
-
|
|
86
|
-
## Testing Anti-Patterns
|
|
44
|
+
## Anti-Patterns
|
|
87
45
|
|
|
88
46
|
| Anti-Pattern | Correct Approach |
|
|
89
47
|
|---|---|
|
|
90
|
-
| Testing only initial page load | Test filter changes
|
|
91
|
-
| Assuming filters work because they render | Verify each
|
|
92
|
-
| Client-side only
|
|
93
|
-
| Single scenario
|
|
94
|
-
| Visual inspection only | Verify data values
|
|
95
|
-
|
|
96
|
-
##
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
## Post-Implementation Browser Testing
|
|
108
|
-
|
|
109
|
-
After completing any feature:
|
|
110
|
-
|
|
111
|
-
1. Start dev server (see `project.instructions.md` for app/port details).
|
|
112
|
-
2. Open browser to the dev URL.
|
|
113
|
-
3. Test all critical user flows with the project's E2E testing tool (see the **e2e-testing** skill).
|
|
114
|
-
4. Test edge cases (empty results, max/min values, errors).
|
|
115
|
-
5. Document results with screenshots.
|
|
116
|
-
|
|
117
|
-
### Verify Before Completion
|
|
118
|
-
|
|
119
|
-
- [ ] Opened app in browser
|
|
120
|
-
- [ ] Tested all interactive elements
|
|
121
|
-
- [ ] Verified data changes match expectations
|
|
122
|
-
- [ ] Checked edge cases
|
|
123
|
-
- [ ] Confirmed empty states display correctly
|
|
124
|
-
- [ ] **Tested at all project-defined responsive breakpoints**
|
|
125
|
-
- [ ] **No horizontal overflow or layout breakage at any breakpoint**
|
|
126
|
-
- [ ] Taken screenshots of key scenarios
|
|
127
|
-
- [ ] Verified URL parameters are correct
|
|
48
|
+
| Testing only initial page load | Test filter changes and different results |
|
|
49
|
+
| Assuming filters work because they render | Verify each option changes results |
|
|
50
|
+
| Client-side only | Verify server requests are triggered |
|
|
51
|
+
| Single scenario | Test urban, rural, edge, out-of-range |
|
|
52
|
+
| Visual inspection only | Verify data values programmatically |
|
|
53
|
+
|
|
54
|
+
## Post-Implementation Checklist
|
|
55
|
+
|
|
56
|
+
- [ ] Dev server running; app opened in browser
|
|
57
|
+
- [ ] All interactive elements tested
|
|
58
|
+
- [ ] Data changes verified (not just visual)
|
|
59
|
+
- [ ] Edge cases: empty states, max/min values, errors
|
|
60
|
+
- [ ] All project-defined responsive breakpoints checked (no overflow/breakage)
|
|
61
|
+
- [ ] URL parameters correct
|
|
62
|
+
- [ ] Screenshots taken of key scenarios
|
|
128
63
|
|
|
129
64
|
## Commands
|
|
130
65
|
|
|
131
|
-
Resolve exact
|
|
132
|
-
|
|
133
|
-
- Run project tests
|
|
134
|
-
- Run with coverage
|
|
135
|
-
- Update snapshots
|
|
136
|
-
- Run affected tests only
|
|
66
|
+
Resolve exact commands via the **codebase-tool** skill (run tests, run with coverage, update snapshots, run affected only).
|
|
@@ -3,14 +3,8 @@ name: validation-gates
|
|
|
3
3
|
description: "Shared validation gates for all orchestration workflows — secret scanning, deterministic checks, blast radius analysis, dependency auditing, browser testing, cache management, regression checks, and final smoke tests. Referenced by prompt templates to maintain single source of truth."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
<!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
|
|
7
|
-
|
|
8
6
|
# Validation Gates
|
|
9
7
|
|
|
10
|
-
Canonical reference for validation gates shared across all orchestration workflows. Prompt templates reference this skill to avoid duplication.
|
|
11
|
-
|
|
12
|
-
**Gate summary:**
|
|
13
|
-
|
|
14
8
|
| Gate | Name | Runs When |
|
|
15
9
|
|------|------|-----------|
|
|
16
10
|
| 1 | Secret Scanning | Every delegation |
|
|
@@ -24,209 +18,84 @@ Canonical reference for validation gates shared across all orchestration workflo
|
|
|
24
18
|
| 9 | Panel Review | High-stakes changes only |
|
|
25
19
|
| 10 | Final Smoke Test | Feature completion (after all tasks Done) |
|
|
26
20
|
|
|
27
|
-
---
|
|
28
|
-
|
|
29
21
|
## Gate 1: Secret Scanning
|
|
30
22
|
|
|
31
|
-
>
|
|
32
|
-
|
|
33
|
-
Scan every diff **before** any other gate. A secret leak caught after merge is exponentially more expensive than one caught at review time.
|
|
34
|
-
|
|
35
|
-
### What to scan
|
|
36
|
-
|
|
37
|
-
Run a regex scan of all changed files for patterns that match common secret formats:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
# Scan staged/changed files for common secret patterns
|
|
41
|
-
grep -rn -E '(AKIA[0-9A-Z]{16}|sk-[a-zA-Z0-9]{20,}|ghp_[a-zA-Z0-9]{36}|glpat-[a-zA-Z0-9\-]{20}|xox[bpors]-[a-zA-Z0-9\-]+|eyJ[a-zA-Z0-9]{10,}\.[a-zA-Z0-9]{10,}|-----BEGIN (RSA |EC |DSA )?PRIVATE KEY-----|mongodb(\+srv)?://[^\s]+|postgres(ql)?://[^\s]+|mysql://[^\s]+|redis://[^\s]+)' <changed-files>
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Also check for:
|
|
45
|
-
- Hardcoded `password`, `secret`, `api_key`, `apiKey`, `token` assignments (not just references)
|
|
46
|
-
- `.env` file contents copied into source files
|
|
47
|
-
- Base64-encoded secrets (common obfuscation attempt)
|
|
23
|
+
> Inherits: [never-expose-secrets](../../snippets/never-expose-secrets.md)
|
|
48
24
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- **BLOCK immediately** — do not proceed to Gate 2
|
|
52
|
-
- Flag the specific file and line number
|
|
53
|
-
- Re-delegate to the agent with explicit instruction to use environment variables instead
|
|
54
|
-
- If a secret was already committed, **rotate it immediately** — git history is permanent
|
|
55
|
-
|
|
56
|
-
### Exceptions
|
|
57
|
-
|
|
58
|
-
- Test fixtures with obviously fake values (e.g., `sk-test-1234567890`)
|
|
59
|
-
- Documentation examples with placeholder values (e.g., `YOUR_API_KEY_HERE`)
|
|
60
|
-
- Pattern matches inside comments that are clearly explanatory
|
|
25
|
+
Scan every diff **before** any other gate.
|
|
61
26
|
|
|
62
27
|
## Gate 2: Deterministic Checks
|
|
63
28
|
|
|
64
|
-
Run for every affected project (resolve exact commands via the **codebase-tool** skill):
|
|
65
|
-
|
|
66
|
-
- **Lint** (with auto-fix)
|
|
67
|
-
- **Test**
|
|
68
|
-
- **Build**
|
|
69
|
-
|
|
70
|
-
All must pass with zero errors. Run for **every** project that consumed modified files, not just the primary project.
|
|
29
|
+
Run for every affected project (resolve exact commands via the **codebase-tool** skill): lint (with auto-fix), test, build. All must pass with zero errors.
|
|
71
30
|
|
|
72
31
|
## Gate 3: Blast Radius Check
|
|
73
32
|
|
|
74
|
-
Assess the scope of changes to catch scope creep and ensure reviewers can evaluate the diff effectively.
|
|
75
|
-
|
|
76
|
-
### Thresholds
|
|
77
|
-
|
|
78
33
|
| Metric | Normal | Warning | Escalate |
|
|
79
34
|
|--------|--------|---------|----------|
|
|
80
35
|
| Lines changed | ≤200 | 201–500 | >500 |
|
|
81
36
|
| Files changed | ≤5 | 6–10 | >10 |
|
|
82
37
|
| Projects affected | ≤1 | 2 | >2 |
|
|
83
38
|
|
|
84
|
-
### Actions
|
|
85
|
-
|
|
86
39
|
- **Normal** — proceed to Gate 4
|
|
87
|
-
- **Warning** — log
|
|
88
|
-
- **Escalate** —
|
|
89
|
-
1. Verify all changed files are within the agent's assigned partition
|
|
90
|
-
2. Check whether the task should have been split into smaller subtasks
|
|
91
|
-
3. If scope creep: revert extra changes, re-delegate with tighter scope
|
|
92
|
-
4. If legitimately large: proceed, but **always run fast review** (no auto-PASS) and consider panel review
|
|
93
|
-
|
|
94
|
-
### Sensitive files
|
|
40
|
+
- **Warning** — log in delegation record; investigate partition drift if unexpected
|
|
41
|
+
- **Escalate** — STOP. Verify partition; split or revert; mandatory fast review (no auto-PASS)
|
|
95
42
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- Auth/middleware files (e.g., `middleware.ts`, `auth.ts`, `**/auth/**`)
|
|
99
|
-
- Database migrations, RLS policies
|
|
100
|
-
- Security headers, CSP configuration (`next.config.*`, `vercel.json`)
|
|
101
|
-
- Environment variable schemas (`.env.example`, `env.ts`)
|
|
102
|
-
- CI/CD configuration (`.github/workflows/**`)
|
|
103
|
-
- Package manager configs (`package.json`, lockfiles) — also triggers Gate 4
|
|
43
|
+
**Sensitive files** (always Warning regardless of line count): auth/middleware (`middleware.ts`, `auth.ts`, `**/auth/**`), DB migrations/RLS, security headers/CSP (`next.config.*`, `vercel.json`), env schemas (`.env.example`, `env.ts`), CI/CD (`.github/workflows/**`), package configs (`package.json`, lockfiles) — also triggers Gate 4.
|
|
104
44
|
|
|
105
45
|
## Gate 4: Dependency Audit
|
|
106
46
|
|
|
107
47
|
> Runs only when `package.json`, `yarn.lock`, `package-lock.json`, `pnpm-lock.yaml`, or similar lockfiles are modified.
|
|
108
48
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
### On failure
|
|
118
|
-
|
|
119
|
-
- **Vulnerability:** BLOCK. Re-delegate with instruction to use a patched version or alternative package
|
|
120
|
-
- **License concern:** Flag for human review. Do not block, but document in the PR description
|
|
121
|
-
- **Size/duplicate:** Flag as SHOULD-FIX in the fast review. Not blocking unless egregious (>200KB)
|
|
122
|
-
|
|
123
|
-
## Gate 5: Fast Review (MANDATORY)
|
|
49
|
+
| Check | Tool | Pass Criteria | On Failure |
|
|
50
|
+
|-------|------|---------------|------------|
|
|
51
|
+
| Vulnerability | `npm audit` | No new high/critical | BLOCK — use patched version or alternative |
|
|
52
|
+
| License | — | MIT, Apache-2.0, BSD-*, ISC | Flag for human review (non-blocking) |
|
|
53
|
+
| Bundle size | — | Frontend pkgs ≤50KB gzipped | SHOULD-FIX; blocking if >200KB |
|
|
54
|
+
| Duplicates | — | No overlap with existing deps | SHOULD-FIX |
|
|
55
|
+
| Maintenance | — | Updated <2yr, ≥100 weekly DLs | Flag |
|
|
124
56
|
|
|
125
|
-
|
|
57
|
+
## Gate 5: Fast Review
|
|
126
58
|
|
|
127
|
-
|
|
59
|
+
> **HARD GATE.** Every delegation must pass. Spawn a reviewer sub-agent; PASS → proceed; FAIL → re-delegate (up to 2 retries); 3× FAIL → Gate 9 panel. Load **fast-review** skill.
|
|
128
60
|
|
|
129
|
-
|
|
130
|
-
2. **On PASS** — proceed to remaining gates
|
|
131
|
-
3. **On FAIL** — re-delegate to the same agent with reviewer feedback (up to 2 retries)
|
|
132
|
-
4. **On 3x FAIL** — escalate to panel review (Gate 9)
|
|
61
|
+
**Auto-PASS** (skip reviewer): pure research with no code changes; only `.md` files modified; all deterministic gates passed AND ≤10 lines across ≤2 files AND no sensitive files touched.
|
|
133
62
|
|
|
134
|
-
|
|
63
|
+
> **Sensitive file override:** Sensitive files (Gate 3 list) never get auto-PASS, even for 1-line changes.
|
|
135
64
|
|
|
136
|
-
|
|
137
|
-
- Pure research/exploration with no code changes
|
|
138
|
-
- Only `.md` files were modified
|
|
139
|
-
- All deterministic gates passed AND the change is ≤10 lines across ≤2 files AND **no sensitive files were touched** (see Gate 3 sensitive file list)
|
|
65
|
+
## Gate 6: Cache Clearing
|
|
140
66
|
|
|
141
|
-
|
|
67
|
+
Clear framework and task runner caches before starting the dev server. See **codebase-tool** skill.
|
|
142
68
|
|
|
143
|
-
## Gate
|
|
69
|
+
## Gate 7: Browser Testing
|
|
144
70
|
|
|
145
|
-
**
|
|
71
|
+
> **HARD GATE:** UI changes are NOT done without screenshots in Chrome proving the feature works.
|
|
146
72
|
|
|
147
|
-
|
|
73
|
+
1. Start dev server (see **codebase-tool** skill)
|
|
74
|
+
2. Verify all acceptance-criteria items render and behave correctly
|
|
75
|
+
3. Test responsive breakpoints; verify empty, error, and loading states
|
|
76
|
+
4. Capture screenshots of key states (REQUIRED)
|
|
148
77
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
> **HARD GATE:** A task with UI changes is NOT done until you have screenshots in Chrome proving the feature works. "The code looks correct" is not proof. "Tests pass" is not proof. Only a screenshot of the working UI in Chrome is proof.
|
|
152
|
-
|
|
153
|
-
1. **Start the dev server** — use the project's serve command (see the **codebase-tool** skill) — wait for it to be ready
|
|
154
|
-
2. **Navigate to affected pages** — Verify the new feature renders correctly
|
|
155
|
-
3. **Verify SPECIFIC features** — Check every feature listed in the acceptance criteria. If the criteria say "icons, groups, and AND/OR toggle", you must see all three in the browser
|
|
156
|
-
4. **Test interactions** — Click buttons, fill forms, toggle filters, submit data
|
|
157
|
-
5. **Test responsive** — Resize to each breakpoint defined in your project's testing config
|
|
158
|
-
6. **Test edge cases** — Empty states, error states, loading states, long content
|
|
159
|
-
7. **Screenshot evidence (REQUIRED)** — Take screenshots of key states. These are mandatory proof
|
|
160
|
-
|
|
161
|
-
> **Anti-pattern:** Testing only at desktop width and assuming responsive classes work. They can be wrong — always verify at all defined breakpoints.
|
|
162
|
-
|
|
163
|
-
Load the **browser-testing** skill for Chrome MCP commands, breakpoint details, and reporting format.
|
|
78
|
+
Load the **browser-testing** skill for Chrome MCP commands, breakpoints, and reporting format.
|
|
164
79
|
|
|
165
80
|
## Gate 8: Regression Testing
|
|
166
81
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
2. **Browser-test adjacent pages** — If you changed a shared component, test pages that use it
|
|
171
|
-
3. **Verify navigation** — Ensure routing, links, and back-button behavior still work
|
|
172
|
-
4. **Check shared components** — If a component from a shared library was modified, test it in all apps that consume it
|
|
82
|
+
1. Run full test suite for all affected projects
|
|
83
|
+
2. Browser-test adjacent pages; verify navigation, routing, and back-button
|
|
84
|
+
3. Check shared components in all consuming apps if a shared library changed
|
|
173
85
|
|
|
174
|
-
## Gate 9: Panel Review
|
|
86
|
+
## Gate 9: Panel Review
|
|
175
87
|
|
|
176
|
-
Use the **panel-majority-vote** skill for:
|
|
88
|
+
Use the **panel-majority-vote** skill for: security-sensitive changes, DB migrations, architecture decisions/large refactors, complex business logic without comprehensive tests.
|
|
177
89
|
|
|
178
|
-
-
|
|
179
|
-
- Database migrations that alter production data or schema
|
|
180
|
-
- Architecture decisions or large refactors affecting multiple libraries
|
|
181
|
-
- Complex business logic without comprehensive test coverage
|
|
90
|
+
On BLOCK: extract MUST-FIX items, re-delegate, re-run panel. Max 3 attempts, then escalate to Architect.
|
|
182
91
|
|
|
183
|
-
|
|
92
|
+
## Gate 10: Final Smoke Test
|
|
184
93
|
|
|
185
|
-
|
|
94
|
+
> Runs once after ALL tasks are Done.
|
|
186
95
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
### Steps
|
|
192
|
-
|
|
193
|
-
1. **Full build** — Build all affected projects from clean state (not incremental)
|
|
194
|
-
2. **Full test suite** — Run tests across all projects that consumed any changed files
|
|
195
|
-
3. **End-to-end browser walkthrough** — Navigate the complete user flow from start to finish:
|
|
196
|
-
- Verify all states: loading, empty, populated, error, partial
|
|
197
|
-
- Test every state transition end-to-end (not just individual screens)
|
|
198
|
-
- Confirm data flows correctly between pages/components
|
|
199
|
-
- Test the happy path AND at least one error path
|
|
200
|
-
4. **Cross-task integration check** — Verify that outputs from different tasks (e.g., DB migration + component + page) compose correctly
|
|
201
|
-
5. **Smoke test at all breakpoints** — If the feature has UI, one final responsive sweep
|
|
202
|
-
|
|
203
|
-
### When to skip
|
|
204
|
-
|
|
205
|
-
- Non-UI features with comprehensive test coverage (e.g., pure backend/data pipeline work where tests verify integration)
|
|
206
|
-
- Single-task features (Gate 8 already covers regression)
|
|
207
|
-
|
|
208
|
-
### On failure
|
|
209
|
-
|
|
210
|
-
Re-delegate the specific failing integration point to the agent responsible for that layer. Do NOT re-run the entire feature implementation.
|
|
211
|
-
|
|
212
|
-
---
|
|
96
|
+
1. Full build + full test suite from clean state
|
|
97
|
+
2. End-to-end browser walkthrough (loading, empty, populated, error states, transitions)
|
|
98
|
+
3. Cross-task integration check
|
|
99
|
+
4. Final responsive sweep (if UI)
|
|
213
100
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
Use this checklist for any orchestration workflow:
|
|
217
|
-
|
|
218
|
-
- [ ] **No secrets in diff** (Gate 1)
|
|
219
|
-
- [ ] Lint, test, and build pass for all affected projects (Gate 2)
|
|
220
|
-
- [ ] Blast radius assessed — scope is expected (Gate 3)
|
|
221
|
-
- [ ] Dependency audit passed if packages changed (Gate 4)
|
|
222
|
-
- [ ] **Fast review passed** (mandatory — load **fast-review** skill) (Gate 5)
|
|
223
|
-
- [ ] Dev server started with **clean cache** (Gate 6)
|
|
224
|
-
- [ ] UI changes verified in Chrome with screenshots at all breakpoints (Gate 7)
|
|
225
|
-
- [ ] Every acceptance criteria item visually confirmed — not just "page loads"
|
|
226
|
-
- [ ] No regressions in adjacent functionality (Gate 8)
|
|
227
|
-
- [ ] Panel review passed for high-stakes changes (Gate 9)
|
|
228
|
-
- [ ] **Final smoke test passed** for multi-task features (Gate 10)
|
|
229
|
-
- [ ] Shared code changes tested across all consuming apps
|
|
230
|
-
- [ ] No duplicated code — shared logic extracted to libraries
|
|
231
|
-
- [ ] Lessons learned captured if any retries occurred
|
|
232
|
-
- [ ] Known issues updated if new limitations were discovered
|
|
101
|
+
**Skip for:** non-UI with comprehensive tests, or single-task features (Gate 8 covers those). On failure: re-delegate the specific failing integration only.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Base Output Contract
|
|
2
|
+
|
|
3
|
+
Every specialist agent Output Contract MUST end with these standard items (in addition to domain-specific items above them):
|
|
4
|
+
|
|
5
|
+
- **Observability Logged** — Confirm ALL applicable log records were appended to `events.ndjson` (Constitution rule #6):
|
|
6
|
+
- `--type session` — ALWAYS (every agent, every session)
|
|
7
|
+
- `--type delegation` — if delegations occurred (Team Lead only)
|
|
8
|
+
- `--type review` — if fast reviews occurred
|
|
9
|
+
- `--type panel` — if panel reviews occurred
|
|
10
|
+
- `--type dispute` — if disputes were created
|
|
11
|
+
- **Discovered Issues** — Pre-existing bugs or anomalies found during work, with tracking action taken per the [Discovered Issues Policy](discovered-issues-policy.md)
|
|
12
|
+
- **Lessons Applied** — Lessons from `.opencastle/LESSONS-LEARNED.md` that influenced this work, and any new lessons added
|
|
13
|
+
|
|
14
|
+
Agents reference this contract with: `See [Base Output Contract](../snippets/base-output-contract.md) for the standard closing items.`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Discovered Issues Policy
|
|
2
|
+
|
|
3
|
+
> **⛔ No issue gets ignored.** Untracked bugs discovered during work are a quality gate failure.
|
|
4
|
+
|
|
5
|
+
When you encounter a bug, error, or unexpected behavior unrelated to the current task:
|
|
6
|
+
|
|
7
|
+
1. **Check if already tracked:**
|
|
8
|
+
- Search `.opencastle/KNOWN-ISSUES.md` for a matching entry
|
|
9
|
+
- If task tracker tools are available, search for open bugs
|
|
10
|
+
2. **If found tracked** — skip it, continue with your current work
|
|
11
|
+
3. **If NOT tracked** — you must act:
|
|
12
|
+
- **Unfixable limitation** (third-party, platform, upstream) → add to `.opencastle/KNOWN-ISSUES.md` with: Issue ID, Status, Severity, Evidence, Root Cause, Solution Options
|
|
13
|
+
- **Fixable bug** → create a tracker ticket with label `bug`, priority, symptoms, reproduction steps, and affected files. If no tracker tools available, add a `**Discovered Issues**` section to your output.
|
|
14
|
+
|
|
15
|
+
Never assume a pre-existing issue is somebody else problem. If it is not tracked, track it.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Logging Is Mandatory
|
|
2
|
+
|
|
3
|
+
> **⛔ HARD GATE — Constitution rule #6.** Every agent MUST log every session to `.opencastle/logs/events.ndjson`. No exceptions. No threshold. No "too small to log."
|
|
4
|
+
|
|
5
|
+
- Log **before yielding** to the user — logging is the LAST action before responding.
|
|
6
|
+
- Log **per task**, not per conversation. Multiple tasks = multiple records.
|
|
7
|
+
- Never batch-log retrospectively across sessions.
|
|
8
|
+
- Use `opencastle log --type session ...` for session records.
|
|
9
|
+
- Verify the append succeeded: `tail -1 .opencastle/logs/events.ndjson`.
|
|
10
|
+
|
|
11
|
+
See the **observability-logging** skill for full CLI commands, record schemas, and the pre-response checklist.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Never Expose Secrets
|
|
2
|
+
|
|
3
|
+
> **HARD GATE — Constitution rule 1.** No tokens, keys, passwords, or connection strings in code, logs, commits, or terminal output. Use environment variables.
|
|
4
|
+
|
|
5
|
+
## What to scan
|
|
6
|
+
|
|
7
|
+
- AWS keys (AKIA...), API tokens (sk-..., ghp_...), private keys, database URIs
|
|
8
|
+
- Hardcoded password, secret, api_key, apiKey, token assignments (not just references)
|
|
9
|
+
- .env file contents copied into source files
|
|
10
|
+
- Base64-encoded secrets
|
|
11
|
+
|
|
12
|
+
## On detection
|
|
13
|
+
|
|
14
|
+
- **BLOCK immediately** — flag the specific file and line number.
|
|
15
|
+
- Re-delegate with explicit instruction to use environment variables.
|
|
16
|
+
- If already committed, **rotate immediately** — git history is permanent.
|
|
17
|
+
|
|
18
|
+
## Exceptions
|
|
19
|
+
|
|
20
|
+
- Test fixtures with obviously fake values (e.g., sk-test-1234567890)
|
|
21
|
+
- Documentation examples with placeholder values (e.g., YOUR_API_KEY_HERE)
|
|
22
|
+
- Pattern matches inside comments that are clearly explanatory
|