opencode-codeops 1.4.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/CHANGELOG.md +179 -0
- package/LICENSE +21 -0
- package/README.md +171 -0
- package/_shared/auto-design.md +129 -0
- package/_shared/layout-convention.md +198 -0
- package/_shared/quality-profile.md +134 -0
- package/_shared/recommendation-hardening.md +166 -0
- package/_shared/scope-expansion-control.md +176 -0
- package/_shared/spec-first-ordering.md +79 -0
- package/_shared/zero-ambiguity-gate.md +311 -0
- package/agent-templates/codebase-scout.md +17 -0
- package/agent-templates/concurrency-auditor.md +5 -0
- package/agent-templates/design-challenger.md +26 -0
- package/agent-templates/financial-integrity-auditor.md +5 -0
- package/agent-templates/perf-auditor.md +23 -0
- package/agent-templates/phase-reviewer.md +54 -0
- package/agent-templates/plan-task-executor-opus.md +46 -0
- package/agent-templates/plan-task-executor.md +43 -0
- package/agent-templates/preflight-auditor.md +45 -0
- package/agent-templates/security-auditor.md +42 -0
- package/agent-templates/semantics-reviewer.md +5 -0
- package/agent-templates/spec-test-author.md +29 -0
- package/agents/concurrency-auditor.md +15 -0
- package/agents/correctness-reviewer.md +66 -0
- package/agents/demanding-executor.md +58 -0
- package/agents/design-challenger.md +38 -0
- package/agents/executor.md +55 -0
- package/agents/explorer.md +29 -0
- package/agents/financial-integrity-auditor.md +15 -0
- package/agents/performance-auditor.md +35 -0
- package/agents/preflight-auditor.md +57 -0
- package/agents/security-auditor.md +54 -0
- package/agents/semantics-reviewer.md +15 -0
- package/agents/spec-test-author.md +41 -0
- package/bin/codeops-worktree +244 -0
- package/bin/index.mjs +106 -0
- package/bin/install-agents.mjs +453 -0
- package/bin/install-skills.mjs +466 -0
- package/bin/lib/opencode-install.mjs +185 -0
- package/install.sh +55 -0
- package/package.json +73 -0
- package/plugin/index.ts +181 -0
- package/references/domains/compiler-and-language.md +28 -0
- package/references/domains/data-and-migration.md +22 -0
- package/references/domains/distributed-and-concurrent.md +26 -0
- package/references/domains/financial-system.md +28 -0
- package/references/domains/selection.md +19 -0
- package/references/domains/web-application.md +23 -0
- package/schemas/codeops-config.schema.json +56 -0
- package/scripts/check-version.mjs +163 -0
- package/scripts/codeops-migrate.sh +355 -0
- package/scripts/codeops-roadmap-compact.sh +232 -0
- package/scripts/codeops-roadmap-sync.sh +275 -0
- package/scripts/codeops_outcomes.py +155 -0
- package/scripts/codeops_plan.py +239 -0
- package/scripts/codeops_plan_migrate.py +318 -0
- package/scripts/codeops_worktree_snapshot.py +99 -0
- package/scripts/install_agents.py +288 -0
- package/scripts/release.mjs +533 -0
- package/skills/analyze-project/SKILL.md +28 -0
- package/skills/clean-comments/SKILL.md +22 -0
- package/skills/exec-plan/SKILL.md +267 -0
- package/skills/exec-plan/commit-modes.md +113 -0
- package/skills/exec-plan/execution-protocol.md +471 -0
- package/skills/git-commit/SKILL.md +35 -0
- package/skills/github-issues/SKILL.md +38 -0
- package/skills/grill-me/SKILL.md +342 -0
- package/skills/make-plan/SKILL.md +282 -0
- package/skills/make-plan/quality-checklist.md +96 -0
- package/skills/make-plan/templates.md +535 -0
- package/skills/make-plan/zero-ambiguity-gate.md +19 -0
- package/skills/make-requirements/SKILL.md +268 -0
- package/skills/make-requirements/discovery-phases.md +255 -0
- package/skills/make-requirements/review-and-add.md +73 -0
- package/skills/make-requirements/templates.md +296 -0
- package/skills/make-requirements/zero-ambiguity-gate.md +18 -0
- package/skills/outcome-review/SKILL.md +34 -0
- package/skills/preflight/SKILL.md +310 -0
- package/skills/preflight/dimensions.md +181 -0
- package/skills/preflight/report-format.md +300 -0
- package/skills/retro-requirements/SKILL.md +218 -0
- package/skills/retro-requirements/confidence-classification.md +45 -0
- package/skills/retro-requirements/phases.md +609 -0
- package/skills/retro-requirements/triage-gate.md +135 -0
- package/skills/roadmap/SKILL.md +381 -0
- package/skills/roadmap/stage-hooks.md +80 -0
- package/skills/roadmap/template.md +200 -0
- package/skills/setup-codeops/SKILL.md +94 -0
- package/skills/setup-codeops/migration.md +106 -0
- package/skills/setup-codeops/scaffold.md +99 -0
- package/skills/setup-routing/SKILL.md +102 -0
- package/skills/setup-routing/routing.md +44 -0
- package/skills/techdocs/SKILL.md +199 -0
- package/skills/techdocs/authoring-and-update.md +178 -0
- package/skills/techdocs/templates.md +655 -0
- package/skills/techdocs/vitepress-setup.md +143 -0
- package/skills/upgrade-plan/SKILL.md +75 -0
- package/skills/upgrade-plan/content-quality-gate.md +35 -0
- package/skills/upgrade-plan/upgrade-checklists.md +107 -0
- package/standards/coding-standards-full.md +124 -0
- package/standards/coding-standards.md +64 -0
- package/standards/output-style.md +17 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# Phase 3 Authoring: Templates & Rules
|
|
2
|
+
|
|
3
|
+
> Read this when authoring requirement documents (after the Zero-Ambiguity Gate
|
|
4
|
+
> has passed). Contains the output structure, the README template, the universal
|
|
5
|
+
> RD template, acceptance-criteria specificity rules, and the "Did You Considerโฆ"
|
|
6
|
+
> checklist used in Phase 4.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 3.1 Output Structure
|
|
11
|
+
|
|
12
|
+
Create all documents in the `requirements/` directory:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
requirements/
|
|
16
|
+
โโโ 00-ambiguity-register.md # Zero-Ambiguity Gate register (audit trail)
|
|
17
|
+
โโโ README.md # Index, glossary, dependency graph, implementation order
|
|
18
|
+
โโโ RD-01-[feature-name].md # First requirement document
|
|
19
|
+
โโโ RD-02-[feature-name].md # Second requirement document
|
|
20
|
+
โโโ ...
|
|
21
|
+
โโโ RD-XX-[feature-name].md # Last requirement document
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 3.2 README.md Template
|
|
25
|
+
|
|
26
|
+
```markdown
|
|
27
|
+
# [Project Name] โ Requirements Documents
|
|
28
|
+
|
|
29
|
+
> **Project**: [Project Name] โ [Brief Description]
|
|
30
|
+
> **Status**: [Draft | Review | Complete]
|
|
31
|
+
> **Created**: [Date]
|
|
32
|
+
> **Architecture**: [Tech stack summary]
|
|
33
|
+
> **CodeOps Artifact Schema**: 1
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Overview
|
|
38
|
+
|
|
39
|
+
[2โ3 paragraph description of the project]
|
|
40
|
+
|
|
41
|
+
## Minimum-Sufficient Baseline
|
|
42
|
+
|
|
43
|
+
**Original goal:** [The outcome the user asked for]
|
|
44
|
+
|
|
45
|
+
**Smallest viable design:** [The smallest product scope that achieves the goal]
|
|
46
|
+
|
|
47
|
+
**Excluded support machinery:** [Layers, dependencies, harnesses, or infrastructure not needed]
|
|
48
|
+
|
|
49
|
+
**Approved complexity:** [Complexity-escalation AR references, or `None`]
|
|
50
|
+
|
|
51
|
+
## Domain Glossary
|
|
52
|
+
|
|
53
|
+
| Term | Definition |
|
|
54
|
+
|------|-----------|
|
|
55
|
+
| [Term] | [Definition] |
|
|
56
|
+
|
|
57
|
+
## Document Index
|
|
58
|
+
|
|
59
|
+
| # | Document | Description | Depends On |
|
|
60
|
+
|---|----------|-------------|------------|
|
|
61
|
+
| **AR** | [Ambiguity Register](00-ambiguity-register.md) | Zero-Ambiguity Gate decisions (audit trail) | โ |
|
|
62
|
+
| **RD-01** | [Link to doc] | [Description] | โ |
|
|
63
|
+
| **RD-02** | [Link to doc] | [Description] | RD-01 |
|
|
64
|
+
|
|
65
|
+
## Dependency Graph
|
|
66
|
+
|
|
67
|
+
[Text-based dependency tree]
|
|
68
|
+
|
|
69
|
+
## Suggested Implementation Order
|
|
70
|
+
|
|
71
|
+
| Phase | Documents | Description |
|
|
72
|
+
|-------|-----------|-------------|
|
|
73
|
+
| **A: MVP** | RD-01 โ RD-XX | [Description] |
|
|
74
|
+
| **B: Enhanced** | RD-XX โ RD-XX | [Description] |
|
|
75
|
+
|
|
76
|
+
## Key Architecture Decisions
|
|
77
|
+
|
|
78
|
+
| Decision | Choice | Rationale |
|
|
79
|
+
|----------|--------|-----------|
|
|
80
|
+
| [Decision] | [Choice] | [Why] |
|
|
81
|
+
|
|
82
|
+
## How to Use These Documents
|
|
83
|
+
|
|
84
|
+
Each requirements document is designed to be used with the make-plan skill:
|
|
85
|
+
|
|
86
|
+
1. Pick a requirements document (e.g., RD-01)
|
|
87
|
+
2. Run the make-plan skill
|
|
88
|
+
3. The plan system uses the RD as input to create implementation plans
|
|
89
|
+
4. Run the exec-plan skill for the feature
|
|
90
|
+
5. Implement iteratively
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## 3.3 Universal RD Template
|
|
94
|
+
|
|
95
|
+
Every requirement document follows this structure:
|
|
96
|
+
|
|
97
|
+
````markdown
|
|
98
|
+
# RD-XX: [Feature Name]
|
|
99
|
+
|
|
100
|
+
> **Document**: RD-XX-[feature-name].md
|
|
101
|
+
> **Status**: Draft
|
|
102
|
+
> **Created**: [Date]
|
|
103
|
+
> **Project**: [Project Name]
|
|
104
|
+
> **Depends On**: [List of RD dependencies, or "โ" if none]
|
|
105
|
+
> **CodeOps Artifact Schema**: 1
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Feature Overview
|
|
110
|
+
|
|
111
|
+
[1โ2 paragraphs: what this feature does and why it's needed, written so someone
|
|
112
|
+
unfamiliar with the project can understand the purpose.]
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Functional Requirements
|
|
117
|
+
|
|
118
|
+
### Must Have
|
|
119
|
+
- [ ] [Requirement โ specific, testable, implementable]
|
|
120
|
+
|
|
121
|
+
### Should Have
|
|
122
|
+
- [ ] [Requirement]
|
|
123
|
+
|
|
124
|
+
### Won't Have (Out of Scope)
|
|
125
|
+
- [Explicitly excluded item] โ [reason or which RD covers it]
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Technical Requirements
|
|
130
|
+
|
|
131
|
+
### [Sub-section per major technical concern]
|
|
132
|
+
|
|
133
|
+
[Architecture details, data structures, interfaces, algorithms, protocols.
|
|
134
|
+
Include pseudocode or real code examples where clarity demands it. Include tables
|
|
135
|
+
for structured information (env vars, config keys, API endpoints).]
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Integration Points
|
|
140
|
+
|
|
141
|
+
### With RD-XX ([Name])
|
|
142
|
+
- [How this requirement connects to that one]
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Scope Decisions
|
|
147
|
+
|
|
148
|
+
| Decision | Options Considered | Chosen | Rationale | AR Ref |
|
|
149
|
+
|----------|-------------------|--------|-----------|--------|
|
|
150
|
+
| [Decision] | [Option A, B, C] | [Chosen] | [Why] | AR #X |
|
|
151
|
+
|
|
152
|
+
> **Traceability:** Every scope decision must reference the Ambiguity Register
|
|
153
|
+
> entry (AR #) that resolved it. See `00-ambiguity-register.md`.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Security Considerations
|
|
158
|
+
|
|
159
|
+
> **๐จ This section is MANDATORY for every RD.** See your project's security
|
|
160
|
+
> coding standards (AGENTS.md). Mark a line `N/A` with a short reason when the RD has no matching
|
|
161
|
+
> exposure. Do not add security infrastructure only to populate this section.
|
|
162
|
+
|
|
163
|
+
- **Data sensitivity**: [What sensitive data does this feature handle? PII, credentials, tokens, financial data?]
|
|
164
|
+
- **Input validation**: [What user inputs exist? How are they validated and sanitized?]
|
|
165
|
+
- **Authentication & authorization**: [Who can access this feature? What permissions are required?]
|
|
166
|
+
- **Injection risks**: [SQL queries, HTML rendering, shell commands, or file operations involving user input?]
|
|
167
|
+
- **Encryption needs**: [Does data need encryption at rest or in transit?]
|
|
168
|
+
- **Rate limiting**: [Endpoints susceptible to brute force or abuse?]
|
|
169
|
+
- **Infrastructure**: [Container hardening, secrets management, network exposure?]
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Acceptance Criteria
|
|
174
|
+
|
|
175
|
+
1. [ ] [Testable criterion]
|
|
176
|
+
2. [ ] [Testable criterion]
|
|
177
|
+
3. [ ] Security requirements verified (input validation, injection prevention, auth, encryption)
|
|
178
|
+
````
|
|
179
|
+
|
|
180
|
+
## 3.4 RD Authoring Guidelines
|
|
181
|
+
|
|
182
|
+
- **Data Model Sketches**: for domain RDs, include conceptual entity relationships (not full SQL, but "A Project has many Participants. A Lab has many Equipment items.").
|
|
183
|
+
- **Security & Privacy Annotations**: flag PII, encryption needs, consent tracking, GDPR relevance.
|
|
184
|
+
- **Complexity Estimates**: tag each requirement section with estimated complexity (S/M/L/XL) to aid planning.
|
|
185
|
+
- **Non-Functional Requirements**: keep local performance, security, scalability, accessibility,
|
|
186
|
+
availability, and recovery criteria in the RD that owns the behavior. Create a dedicated RD only
|
|
187
|
+
when several features share one measurable cross-cutting contract and the user has approved any
|
|
188
|
+
resulting complexity escalation.
|
|
189
|
+
|
|
190
|
+
## 3.4B ๐จ Acceptance Criteria Specificity โ NON-NEGOTIABLE
|
|
191
|
+
|
|
192
|
+
**Acceptance criteria MUST be specific enough that a developer who has never
|
|
193
|
+
spoken to the user can write a correct test from the criterion alone.** This
|
|
194
|
+
prevents the acceptance-criteria tautology โ where vague criteria let later tests
|
|
195
|
+
interpret them however the implementation happens to work, creating a
|
|
196
|
+
self-validating loop.
|
|
197
|
+
|
|
198
|
+
**Every acceptance criterion MUST meet ALL of these:**
|
|
199
|
+
|
|
200
|
+
1. **Measurable outcome** โ a concrete, observable result (not "works correctly").
|
|
201
|
+
2. **Specific values** โ exact numbers, formats, status codes, or field names where applicable.
|
|
202
|
+
3. **Standard references** โ when behavior must conform to a standard (RFC, protocol, spec), cite the specific standard and section (e.g., "per RFC 8414 ยง2", not "follows the OIDC spec").
|
|
203
|
+
4. **Boundary conditions** โ what happens at the edges (empty input, maximum length, zero items, expired tokens).
|
|
204
|
+
5. **Negative cases** โ what should NOT happen / what should be rejected.
|
|
205
|
+
|
|
206
|
+
**Examples:**
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
โ BAD: "The API returns a valid OIDC discovery document"
|
|
210
|
+
โ
GOOD: "GET /.well-known/openid-configuration returns a JSON document where the
|
|
211
|
+
'issuer' field exactly matches the URL used to access the endpoint (per RFC
|
|
212
|
+
8414 ยง2), and includes all REQUIRED fields: issuer, authorization_endpoint,
|
|
213
|
+
token_endpoint, jwks_uri, response_types_supported, subject_types_supported,
|
|
214
|
+
id_token_signing_alg_values_supported"
|
|
215
|
+
|
|
216
|
+
โ BAD: "Users can reset their password"
|
|
217
|
+
โ
GOOD: "POST /auth/reset-password with a valid email returns 202 Accepted, sends
|
|
218
|
+
an email with a one-time reset link that expires after 60 minutes, and the link
|
|
219
|
+
cannot be reused after the password is changed"
|
|
220
|
+
|
|
221
|
+
โ BAD: "The system handles invalid input gracefully"
|
|
222
|
+
โ
GOOD: "POST /api/users with a missing 'email' field returns 400 with
|
|
223
|
+
{ error: 'VALIDATION_ERROR', details: [{ field: 'email', message: '...' }] }.
|
|
224
|
+
POST /api/users with an email longer than 254 characters returns 400."
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**If the user gives vague acceptance criteria** during review, ask for specifics:
|
|
228
|
+
*"This criterion says 'handles errors properly' โ what specific error conditions
|
|
229
|
+
should be handled, and what should the response look like for each?"*
|
|
230
|
+
|
|
231
|
+
**Traceability to tests:** when the make-plan skill later derives test cases from
|
|
232
|
+
these criteria, each spec test expectation MUST map directly to a specific
|
|
233
|
+
acceptance criterion. If a criterion is too vague to produce a concrete test
|
|
234
|
+
assertion, the criterion is defective โ not the test.
|
|
235
|
+
|
|
236
|
+
## 3.5 Authoring Workflow
|
|
237
|
+
|
|
238
|
+
Write RDs one at a time, presenting each to the user for review:
|
|
239
|
+
|
|
240
|
+
1. Write RD-01 โ present โ collect feedback โ revise.
|
|
241
|
+
2. Write RD-02 โ present โ collect feedback โ revise.
|
|
242
|
+
3. Continue until all RDs are written.
|
|
243
|
+
4. If the session is getting long, save progress to `requirements/_draft/` and note which RDs remain (RDs are written to disk as completed โ never held only in memory).
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Phase 4 reference: "Did You Considerโฆ" Checklist
|
|
248
|
+
|
|
249
|
+
Before finalizing, run through commonly forgotten requirements:
|
|
250
|
+
|
|
251
|
+
```markdown
|
|
252
|
+
## Commonly Forgotten Requirements โ Final Check
|
|
253
|
+
|
|
254
|
+
| # | Concern | Addressed? | In Which RD? |
|
|
255
|
+
|---|---------|------------|--------------|
|
|
256
|
+
| 1 | Audit logging / activity trail | โ Yes / โ No / โ N/A | RD-XX |
|
|
257
|
+
| 2 | Data export (CSV, Excel, API) | โ Yes / โ No / โ N/A | RD-XX |
|
|
258
|
+
| 3 | API versioning | โ Yes / โ No / โ N/A | RD-XX |
|
|
259
|
+
| 4 | Rate limiting | โ Yes / โ No / โ N/A | RD-XX |
|
|
260
|
+
| 5 | Error messages & user-facing UX | โ Yes / โ No / โ N/A | RD-XX |
|
|
261
|
+
| 6 | Empty states (no data yet) | โ Yes / โ No / โ N/A | RD-XX |
|
|
262
|
+
| 7 | Loading states & optimistic UI | โ Yes / โ No / โ N/A | RD-XX |
|
|
263
|
+
| 8 | Accessibility (WCAG) | โ Yes / โ No / โ N/A | RD-XX |
|
|
264
|
+
| 9 | Mobile responsiveness | โ Yes / โ No / โ N/A | RD-XX |
|
|
265
|
+
| 10 | Backup & disaster recovery | โ Yes / โ No / โ N/A | RD-XX |
|
|
266
|
+
| 11 | Monitoring & alerting | โ Yes / โ No / โ N/A | RD-XX |
|
|
267
|
+
| 12 | Email notifications & templates | โ Yes / โ No / โ N/A | RD-XX |
|
|
268
|
+
| 13 | Search functionality | โ Yes / โ No / โ N/A | RD-XX |
|
|
269
|
+
| 14 | Pagination for all list views | โ Yes / โ No / โ N/A | RD-XX |
|
|
270
|
+
| 15 | File upload / document management | โ Yes / โ No / โ N/A | RD-XX |
|
|
271
|
+
| 16 | Soft delete vs hard delete | โ Yes / โ No / โ N/A | RD-XX |
|
|
272
|
+
| 17 | Timezone handling | โ Yes / โ No / โ N/A | RD-XX |
|
|
273
|
+
| 18 | Localization / i18n | โ Yes / โ No / โ N/A | RD-XX |
|
|
274
|
+
| 19 | Terms of service / privacy policy | โ Yes / โ No / โ N/A | RD-XX |
|
|
275
|
+
| 20 | GDPR / data retention / right to delete | โ Yes / โ No / โ N/A | RD-XX |
|
|
276
|
+
| 21 | Session management / timeout | โ Yes / โ No / โ N/A | RD-XX |
|
|
277
|
+
| 22 | Graceful degradation / offline behavior | โ Yes / โ No / โ N/A | RD-XX |
|
|
278
|
+
| 23 | Admin / super-admin capabilities | โ Yes / โ No / โ N/A | RD-XX |
|
|
279
|
+
| 24 | User onboarding / first-time experience | โ Yes / โ No / โ N/A | RD-XX |
|
|
280
|
+
| 25 | Configuration management (feature flags, settings) | โ Yes / โ No / โ N/A | RD-XX |
|
|
281
|
+
| 26 | **๐จ Input validation & sanitization (server-side)** | โ Yes / โ No / โ N/A | RD-XX |
|
|
282
|
+
| 27 | **๐จ Injection prevention (SQL, XSS, command, path traversal)** | โ Yes / โ No / โ N/A | RD-XX |
|
|
283
|
+
| 28 | **๐จ Authentication & authorization model** | โ Yes / โ No / โ N/A | RD-XX |
|
|
284
|
+
| 29 | **๐จ Rate limiting (auth endpoints, public APIs)** | โ Yes / โ No / โ N/A | RD-XX |
|
|
285
|
+
| 30 | **๐จ Secrets management (no hardcoded credentials)** | โ Yes / โ No / โ N/A | RD-XX |
|
|
286
|
+
| 31 | **๐จ Data encryption (at rest and in transit)** | โ Yes / โ No / โ N/A | RD-XX |
|
|
287
|
+
| 32 | **๐จ Infrastructure hardening (non-root containers, minimal images, CI secrets)** | โ Yes / โ No / โ N/A | RD-XX |
|
|
288
|
+
| 33 | **๐จ Security testing (injection tests, auth bypass, privilege escalation)** | โ Yes / โ No / โ N/A | RD-XX |
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
> **๐จ Items 26โ33 are NON-NEGOTIABLE** โ they must be addressed in every
|
|
292
|
+
> project. See your project's security coding standards (AGENTS.md) for the full
|
|
293
|
+
> standard. Acceptance criteria for these map to your project's testing standards
|
|
294
|
+
> (AGENTS.md). `N/A` is valid only with a concrete reason. Addressing an item does not authorize a
|
|
295
|
+
> new service, framework, or infrastructure surface; that still requires the Complexity Escalation
|
|
296
|
+
> Gate when triggered.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Phase 2B: Zero-Ambiguity Gate โ caller preamble (make-requirements)
|
|
2
|
+
|
|
3
|
+
> **CodeOps Artifact Schema**: 1
|
|
4
|
+
|
|
5
|
+
The gate itself is defined ONCE in **[../../_shared/zero-ambiguity-gate.md](../../_shared/zero-ambiguity-gate.md)**
|
|
6
|
+
โ read it now, before Phase 3. This preamble only binds it to make-requirements:
|
|
7
|
+
|
|
8
|
+
- **Phase**: 2B โ fires after discovery/challenge (Phases 1โ2), before ANY requirement document
|
|
9
|
+
is written. Also applies, scoped to new decisions, during add_requirement and upgrades.
|
|
10
|
+
- **Blocked artifacts while closed**: every `RD-XX-*.md` and `requirements/README.md`.
|
|
11
|
+
- **Register location**: `<requirements dir>/00-ambiguity-register.md` (resolve the directory per
|
|
12
|
+
`_shared/layout-convention.md`).
|
|
13
|
+
- **Requirements-specific scan notes**: pay extra attention to *Scope ambiguities* (MVP vs.
|
|
14
|
+
future, conflicting stakeholder needs), *Data & state* (cardinality, ownership), and
|
|
15
|
+
*Security & compliance* (regulatory gaps) โ requirements set the contract everything
|
|
16
|
+
downstream inherits.
|
|
17
|
+
- Items pre-resolved by a grill-me session import as resolved/deferred rows and are not
|
|
18
|
+
re-confirmed; only new rows need the user's confirmation (shared gate, rule 3).
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: outcome-review
|
|
3
|
+
description: Review local CodeOps outcome evidence to improve workflow quality without uploading project content. Use for CodeOps retrospective, workflow metrics, escaped findings, rework analysis, planning accuracy, or project process review. Separates plugin-level problems from project-specific configuration and recommends only evidence-backed changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CodeOps outcome review
|
|
7
|
+
|
|
8
|
+
Outcome evidence is opt-in, local, and content-free. Invocation counts are not quality evidence.
|
|
9
|
+
|
|
10
|
+
## Useful measures
|
|
11
|
+
|
|
12
|
+
- planned versus verified tasks;
|
|
13
|
+
- first-pass verification rate;
|
|
14
|
+
- implementation/review rework cycles;
|
|
15
|
+
- escaped critical or major findings;
|
|
16
|
+
- unplanned files or scope changes;
|
|
17
|
+
- assumptions later invalidated;
|
|
18
|
+
- runtime ambiguities by owning stage;
|
|
19
|
+
- interrupted-session recovery accuracy; and
|
|
20
|
+
- user decisions that could have been resolved from existing evidence.
|
|
21
|
+
|
|
22
|
+
## Protocol
|
|
23
|
+
|
|
24
|
+
1. Confirm metrics are enabled in `codeops/codeops.json`. If disabled or absent, report that no outcome history is available; do not infer one from transcripts.
|
|
25
|
+
2. Read only the local structured event store through `${CODEOPS_PLUGIN_ROOT}/scripts/codeops_outcomes.py`; do not parse project content into metrics.
|
|
26
|
+
3. Establish sample size and period before interpreting rates.
|
|
27
|
+
4. Classify recommendations:
|
|
28
|
+
- **plugin:** recurring protocol, validator, prompt, or domain-lens defect across projects;
|
|
29
|
+
- **project:** routing, verification, domain, or artifact policy specific to this repository;
|
|
30
|
+
- **insufficient evidence:** plausible but not supported.
|
|
31
|
+
5. Prioritize correctness and escaped defects over token or elapsed-time optimization.
|
|
32
|
+
6. Present the smallest change likely to improve the measured outcome and define how to evaluate it.
|
|
33
|
+
|
|
34
|
+
Never upload or quote project content from the outcome store.
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: preflight
|
|
3
|
+
description: >-
|
|
4
|
+
Runs a rigorous multi-dimensional quality audit of a plan, requirements, or any artifact,
|
|
5
|
+
grounded in the actual codebase. Use for "preflight", "quality audit", "review gate",
|
|
6
|
+
"audit this plan", "audit these requirements", or "review my plan/requirements before I build it".
|
|
7
|
+
An adversarial review gate that hunts for every ambiguity, contradiction, gap, and risk, verifies
|
|
8
|
+
every claim against the real code, scores findings on a 13-dimension scan, and presents each one
|
|
9
|
+
with options and a recommendation for the user to decide โ it never fixes silently. Takes an
|
|
10
|
+
artifact target (e.g. requirements, requirements RD-03, a feature name, a feature design document,
|
|
11
|
+
or a file/dir path) plus optional --continue to resume an interrupted session.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# preflight โ Multi-Dimensional, Codebase-Grounded Quality Audit
|
|
15
|
+
|
|
16
|
+
> **CodeOps Artifact Schema**: 1
|
|
17
|
+
|
|
18
|
+
## Auto-design option
|
|
19
|
+
|
|
20
|
+
If `$ARGUMENTS` contains exactly one exact standalone `--auto-design` token before the first `--` sentinel, remove it before resolving targets, paths, or modes; zero occurrences means normal mode, more than one is invalid, and tokens at or after the sentinel are target content; announce `Auto-design active โ eligible technical decisions are
|
|
21
|
+
delegated and recorded`; then read and apply
|
|
22
|
+
[../../_shared/auto-design.md](../../_shared/auto-design.md). Select the strongest eligible
|
|
23
|
+
remediation under that policy, but apply it only when the user already authorized fixes; never
|
|
24
|
+
auto-waive risk or dismiss a critical/major finding. Propagate only to explicitly invoked supported
|
|
25
|
+
children; an unsupported child fails closed. This mode does not grant action permission or scope
|
|
26
|
+
expansion. **Normal mode:** without the exact token, every material ruling still requires an
|
|
27
|
+
explicit user decision; historical delegated records must not infer delegated authority.
|
|
28
|
+
|
|
29
|
+
## Scope exploration option
|
|
30
|
+
|
|
31
|
+
If `$ARGUMENTS` contains exactly one exact standalone `--explore-scope` token before the first `--` sentinel, remove it before resolving targets, paths, or modes; zero occurrences means strict scope, more than one is invalid, and tokens at or after the sentinel are target content; announce `Scope exploration active โ optional additions will be proposed for your decision`; then read and apply
|
|
32
|
+
[../../_shared/scope-expansion-control.md](../../_shared/scope-expansion-control.md). Strict scope is the default:
|
|
33
|
+
do not report optional additions as findings or suggestions. Exploration records them
|
|
34
|
+
as separate `SE-*` proposals; finding resolution never chooses `Keep`.
|
|
35
|
+
|
|
36
|
+
Run a rigorous quality audit of the artifact named in `$ARGUMENTS`, **grounded in the actual
|
|
37
|
+
codebase**. Find every issue, ambiguity, contradiction, gap, and risk; verify every claim and
|
|
38
|
+
assumption against the real code; present each finding with options + a recommendation; iterate
|
|
39
|
+
until the artifact passes clean.
|
|
40
|
+
|
|
41
|
+
Begin with direct artifact checks: resolve the exact artifact named by the user, confirm required
|
|
42
|
+
documents and links exist, confirm material ambiguities are closed, and for a plan confirm its
|
|
43
|
+
specification-first ordering. Related artifacts may supply review context, but the declared target
|
|
44
|
+
is the modification set: a sibling issue is contextual unless the user explicitly expands that
|
|
45
|
+
set. Report structural failures alongside, but never as substitutes for, the semantic audit.
|
|
46
|
+
Deterministic checks own identifiers, links, statuses, and coverage shape; reviewers own truth,
|
|
47
|
+
completeness, consistency, feasibility, and risk. A pass still requires every critical/major
|
|
48
|
+
finding resolved and every remaining minor finding explicitly accepted.
|
|
49
|
+
|
|
50
|
+
Read [../../references/domains/selection.md](../../references/domains/selection.md), verify the artifact selected all applicable domain lenses, and add one audit cluster per selected lens. A generic security or feasibility pass does not substitute for compiler semantics, financial integrity, concurrency, or migration analysis.
|
|
51
|
+
|
|
52
|
+
> **Resolve artifact paths layout-aware.** A requirements set or plan named in `$ARGUMENTS` lives at
|
|
53
|
+
> a flat path (`requirements/`, `plans/<feature>/`) or, in a nested-layout repo, under
|
|
54
|
+
> `codeops/features/<f>/โฆ` โ resolve it via **[../../_shared/layout-convention.md](../../_shared/layout-convention.md)**.
|
|
55
|
+
> If the target feature is ambiguous in a nested repo, ask; never guess.
|
|
56
|
+
|
|
57
|
+
`preflight --continue` resumes an interrupted session (see [Session resume](#session-resume)).
|
|
58
|
+
|
|
59
|
+
## Artifact reference formats
|
|
60
|
+
|
|
61
|
+
| User types | What gets reviewed |
|
|
62
|
+
|---|---|
|
|
63
|
+
| `preflight requirements` | All requirement docs in `requirements/` |
|
|
64
|
+
| `preflight requirements RD-03` | A specific requirement doc |
|
|
65
|
+
| `preflight <feature-name>` | All plan docs in `plans/<feature-name>/` |
|
|
66
|
+
| `preflight <feature-name> 03-api-design` | A specific plan doc |
|
|
67
|
+
| `preflight <path>` | Any ad-hoc file or directory |
|
|
68
|
+
|
|
69
|
+
## Audit scope contract
|
|
70
|
+
|
|
71
|
+
Preflight distinguishes the **audit target** from the material read to understand it:
|
|
72
|
+
|
|
73
|
+
| Term | Meaning |
|
|
74
|
+
|---|---|
|
|
75
|
+
| **Audit target** | The exact file or directory selected by the user. Findings and the pass verdict apply only to this artifact. |
|
|
76
|
+
| **Context document** | A related artifact read to verify dependencies, ownership, terminology, or consistency. Reading it does not add it to the audit target. |
|
|
77
|
+
| **Modification set** | The files the user has explicitly authorized preflight to change after accepting findings. |
|
|
78
|
+
|
|
79
|
+
At the start of the report and every dispatch packet, record the audit target and list any context
|
|
80
|
+
documents separately. For a single-document audit:
|
|
81
|
+
|
|
82
|
+
- scan all 13 dimensions against the selected document;
|
|
83
|
+
- read directly related documents when needed to test its claims;
|
|
84
|
+
- locate findings in the selected document, citing context documents as evidence;
|
|
85
|
+
- do not report unrelated defects found only in context documents; offer a separate audit instead;
|
|
86
|
+
- do not treat a context document as passed or advance its roadmap row; and
|
|
87
|
+
- do not modify a context document unless the accepted resolution requires it **and** the user
|
|
88
|
+
confirms the exact expanded modification set.
|
|
89
|
+
|
|
90
|
+
If resolving a finding would turn a single-document audit into a set-wide redesign, pause before
|
|
91
|
+
applying fixes and offer either a target-local resolution or an explicit set-level audit. Never
|
|
92
|
+
expand the audit target merely because the user said "apply fixes and re-scan."
|
|
93
|
+
|
|
94
|
+
Freeze the authorized product-scope baseline as well as the audit target. Existing out-of-scope
|
|
95
|
+
content in the target is still a scope-creep defect. A newly imagined optional remediation is
|
|
96
|
+
silent in strict scope or a separate `SE-*` proposal in exploration mode; it never affects the
|
|
97
|
+
finding count or verdict until the user keeps it.
|
|
98
|
+
|
|
99
|
+
## Core directive
|
|
100
|
+
|
|
101
|
+
> **You are a senior technical reviewer performing a formal quality audit GROUNDED IN THE ACTUAL
|
|
102
|
+
> CODEBASE. Find every defect, gap, ambiguity, contradiction, and risk in this artifact โ and
|
|
103
|
+
> verify every claim, reference, and assumption against the real code. Be thorough, systematic,
|
|
104
|
+
> relentless. For every issue, analyze the options and present your recommended resolution. Never
|
|
105
|
+
> fix anything silently. In normal mode, every finding must be presented to the user for
|
|
106
|
+
> decision. With active auto-design, eligible technical resolutions are selected and recorded
|
|
107
|
+
> under the shared policy while reserved decisions are presented to the user.**
|
|
108
|
+
|
|
109
|
+
You are NOT a rubber stamp. You are actively trying to **break** the artifact โ and to **reality-
|
|
110
|
+
check** it against the codebase it targets. Assume it has issues until proven otherwise.
|
|
111
|
+
|
|
112
|
+
> **Without codebase grounding, preflight is nothing but a document-correction exercise.** The
|
|
113
|
+
> entire value depends on holding the artifact accountable to the real files, architecture,
|
|
114
|
+
> patterns, and dependencies.
|
|
115
|
+
|
|
116
|
+
The creation-time gates inside the make-plan skill (its Phase 1C gate) and the make-requirements
|
|
117
|
+
skill (its Phase 2B gate) catch issues during authoring. Preflight is the **post-creation safety
|
|
118
|
+
net** โ fresh eyes that catch what those gates missed and what evolved since.
|
|
119
|
+
|
|
120
|
+
## The 8-step protocol (overview)
|
|
121
|
+
|
|
122
|
+
1. **Load & identify artifact type** โ read the complete artifact; classify it as a requirements
|
|
123
|
+
set, implementation plan, or ad-hoc document. Load the project's AGENTS.md (or detected project
|
|
124
|
+
conventions) and any Ambiguity Register (`00-ambiguity-register.md`).
|
|
125
|
+
2. **๐จ Codebase Reconnaissance โ NON-NEGOTIABLE.** Build a real understanding of the code the
|
|
126
|
+
artifact targets, map every document reference to actual code, then present a **Codebase Context
|
|
127
|
+
Summary**. This is what separates a real preflight from a document-correction exercise. Full
|
|
128
|
+
what/why/how table, recon depth by artifact type, and the summary template are in
|
|
129
|
+
[dimensions.md](dimensions.md).
|
|
130
|
+
3. **13-dimension scan** โ review the artifact across all 13 dimensions (below), every check
|
|
131
|
+
informed by Step 2. Depth adapts by artifact type. Full detail in [dimensions.md](dimensions.md).
|
|
132
|
+
Classify newly suggested work under the shared scope-expansion protocol before it can become a
|
|
133
|
+
finding or remediation. Apply the shared Complexity Escalation Gate to disproportionate support
|
|
134
|
+
machinery; an unapproved escalation is at least a ๐ MAJOR finding and cannot pass.
|
|
135
|
+
4. **Compile the Preflight Report** โ every finding gets a numbered `PF-NNN` entry with severity.
|
|
136
|
+
Templates and report header in [report-format.md](report-format.md).
|
|
137
|
+
5. **Present findings & collect decisions** โ grouped by severity and paced by the authoritative
|
|
138
|
+
batch rules in [report-format.md](report-format.md). In normal mode, record the user's decision
|
|
139
|
+
on every finding. With active auto-design, record the strongest eligible technical resolution
|
|
140
|
+
with complete delegated provenance; reserved decisions still require the user. This selects a
|
|
141
|
+
resolution only and does not authorize applying a fix.
|
|
142
|
+
A finding ruling also does not authorize a linked `SE-*` proposal.
|
|
143
|
+
6. **Determine pass/fail** โ Clean / Passed / Passed With Notes / Blocked (see [Pass tiers](#pass-tiers)).
|
|
144
|
+
7. **Apply fixes (only if requested)** โ preflight is a review protocol, not a modification one.
|
|
145
|
+
Never apply fixes without explicit instruction.
|
|
146
|
+
8. **Roadmap sync** โ after a pass, advance the target's row via the roadmap skill if a roadmap exists.
|
|
147
|
+
|
|
148
|
+
## The 13 dimensions (names only โ detail in [dimensions.md](dimensions.md))
|
|
149
|
+
|
|
150
|
+
1. Ambiguities
|
|
151
|
+
2. Implicit Assumptions
|
|
152
|
+
3. Logical Contradictions
|
|
153
|
+
4. Completeness Gaps
|
|
154
|
+
5. Dependency Issues
|
|
155
|
+
6. Feasibility Concerns
|
|
156
|
+
7. Testability
|
|
157
|
+
8. Security Blind Spots
|
|
158
|
+
9. Edge Cases
|
|
159
|
+
10. Scope Creep Indicators
|
|
160
|
+
11. Ordering & Sequencing
|
|
161
|
+
12. Consistency
|
|
162
|
+
13. **Codebase Alignment** โ the master reality check (10 sub-checks; entirely codebase-grounded)
|
|
163
|
+
|
|
164
|
+
Scan all 13 every time. Depth adapts (๐ฅ Deep / Standard / Light) by artifact type โ see the
|
|
165
|
+
dimension-depth-by-artifact-type table in [dimensions.md](dimensions.md). Dimension 13 and its
|
|
166
|
+
10 sub-checks (Phantom References, Stale Assumptions, Architecture Mismatch, Impact Blindness,
|
|
167
|
+
Redundancy, Test Impact, Dependency Reality, Convention Violations, Scope vs. Reality, Migration &
|
|
168
|
+
Compatibility) are the heart of the audit โ read that section before scanning a plan.
|
|
169
|
+
|
|
170
|
+
## Severity scale
|
|
171
|
+
|
|
172
|
+
| Severity | Icon | Meaning | Must fix? |
|
|
173
|
+
|---|---|---|---|
|
|
174
|
+
| **CRITICAL** | ๐ด | Will cause implementation failure, data loss, security breach, or fundamental design flaw | YES โ blocks execution |
|
|
175
|
+
| **MAJOR** | ๐ | Will cause significant rework, incorrect behavior, user-facing bugs, or architectural problems | YES โ strongly recommended |
|
|
176
|
+
| **MINOR** | ๐ก | Friction, tech debt, minor inconsistencies, suboptimal patterns | Recommended, not blocking |
|
|
177
|
+
| **OBSERVATION** | ๐ต | Suggestion / style preference / optimization โ not a defect | Optional |
|
|
178
|
+
|
|
179
|
+
Calibrate honestly โ never inflate to get attention, never deflate to avoid conflict.
|
|
180
|
+
|
|
181
|
+
## Pass tiers
|
|
182
|
+
|
|
183
|
+
| Tier | Criteria | Header |
|
|
184
|
+
|---|---|---|
|
|
185
|
+
| **โ
PASSED โ Clean** | Zero findings across all 13 dimensions | `โ
PREFLIGHT PASSED โ clean scan, 0 findings` |
|
|
186
|
+
| **โ
PASSED** | All ๐ด/๐ resolved; zero ๐ก/๐ต remaining | `โ
PREFLIGHT PASSED โ all [X] findings resolved` |
|
|
187
|
+
| **โ
PASSED WITH NOTES** | All ๐ด/๐ resolved; some ๐ก/๐ต explicitly accepted | `โ
PREFLIGHT PASSED WITH NOTES โ [X] resolved, [Y] accepted` |
|
|
188
|
+
| **โ BLOCKED** | Any ๐ด/๐ still unresolved | `โ PREFLIGHT BLOCKED โ [X] critical/major unresolved` |
|
|
189
|
+
|
|
190
|
+
A clean first-scan pass is cause for celebration, not suspicion. **Never invent findings** to
|
|
191
|
+
justify the review โ if the artifact is solid, say so.
|
|
192
|
+
Optional additions omitted in strict scope, or deferred/discarded exploration proposals, do not
|
|
193
|
+
prevent a clean or passing verdict. A necessary correction or blocking uncertainty may still block
|
|
194
|
+
because the requested behavior itself is not yet proven correct, safe, and feasible.
|
|
195
|
+
|
|
196
|
+
## Report persistence
|
|
197
|
+
|
|
198
|
+
Save the report as a permanent file alongside the artifact:
|
|
199
|
+
|
|
200
|
+
| Artifact type | Report location |
|
|
201
|
+
|---|---|
|
|
202
|
+
| Full requirements set | `requirements/00-preflight-report.md` |
|
|
203
|
+
| Single requirement | `requirements/00-preflight-report-RD-NN.md` |
|
|
204
|
+
| Full implementation plan | `plans/<feature-name>/00-preflight-report.md` |
|
|
205
|
+
| Single plan document | `plans/<feature-name>/00-preflight-report-<document-stem>.md` |
|
|
206
|
+
| Ad-hoc | `<artifact-directory>/preflight-report.md` |
|
|
207
|
+
|
|
208
|
+
The report header must record the exact audit target and its git blob or content hash. Per-document
|
|
209
|
+
report names prevent a narrow pass from masquerading as a set-wide pass or overwriting another
|
|
210
|
+
document's evidence. The report is separate from the Ambiguity Register (decisions made during
|
|
211
|
+
creation) โ see [report-format.md](report-format.md) for the relationship and cross-referencing.
|
|
212
|
+
|
|
213
|
+
## Parallelizing the scan (clustered fan-out)
|
|
214
|
+
|
|
215
|
+
When the session supports subagents, the 13-dimension scan fans out as **~5 parallel
|
|
216
|
+
preflight-auditor dispatches** โ one per dimension cluster, an exact partition defined in
|
|
217
|
+
**[../../_shared/quality-profile.md](../../_shared/quality-profile.md)** (โ document soundness ยท
|
|
218
|
+
โก grounding ยท โข delivery ยท โฃ risk ยท โค fit). Each dispatch carries the header + packet from that
|
|
219
|
+
doc (the artifact, ONE cluster, and the codebase context its dimensions need). `--thorough`
|
|
220
|
+
expands the fan-out to one dispatch per dimension. Recon reads may still go to read-only explore
|
|
221
|
+
agents, and the codebase-scout may ground individual claim-checks (โค3 scout dispatches per run).
|
|
222
|
+
|
|
223
|
+
The lead context always merges the returned PA-NNN findings into the single `PF-NNN` sequence
|
|
224
|
+
(dedupe across clusters, renumber, keep severities honest), runs the verdict synthesis, and owns
|
|
225
|
+
every user interaction โ auditors never talk to the user. Sequential scanning remains correct
|
|
226
|
+
when subagents are unavailable.
|
|
227
|
+
|
|
228
|
+
When opt-in outcome metrics are enabled, record only enumerated review results and rework counts
|
|
229
|
+
through `codeops_outcomes.py`. Finding content and user decisions remain solely in project
|
|
230
|
+
artifacts and never enter the metrics store.
|
|
231
|
+
|
|
232
|
+
## Iterative re-scanning
|
|
233
|
+
|
|
234
|
+
Iteration 2 verifies prior fixes, checks their direct consequences, and re-scans all 13 dimensions
|
|
235
|
+
within the unchanged audit target. A third iteration is allowed only when iteration 2 leaves or
|
|
236
|
+
introduces a ๐ด/๐ finding; scope it to those fixes and their direct dependency surface. Do not
|
|
237
|
+
automatically begin iteration 4: require a fresh-session audit or an explicit user decision to
|
|
238
|
+
continue.
|
|
239
|
+
|
|
240
|
+
Preserve finding identity across iterations. A partial fix, refined wording, or regression with the
|
|
241
|
+
same root cause reopens the original `PF-NNN` and appends iteration evidence. Allocate a new number
|
|
242
|
+
only for a genuinely independent root cause.
|
|
243
|
+
|
|
244
|
+
Stop with **Passed With Notes** when every ๐ด/๐ finding is resolved and every remaining ๐ก finding
|
|
245
|
+
is explicitly accepted. ๐ต observations do not require another fix/rescan cycle. Full convergence,
|
|
246
|
+
rescan, and numbering rules live in [report-format.md](report-format.md).
|
|
247
|
+
|
|
248
|
+
## Session resume (save-as-you-go)
|
|
249
|
+
|
|
250
|
+
Continuity notes are written **as you go, not on interruption** โ a hard crash must lose at most
|
|
251
|
+
one dimension of work:
|
|
252
|
+
|
|
253
|
+
- **Checkpoint cadence:** update `_preflight-notes.md` (in the artifact directory, next to where
|
|
254
|
+
the report will be saved) after the recon step completes and after EACH dimension finishes โ
|
|
255
|
+
never only when a session "feels long".
|
|
256
|
+
- **Schema (minimal):** the artifact path + its git ref (or mtime) at scan start; completed
|
|
257
|
+
dimensions; findings so far (numbers + one-liners); pending dimensions; user decisions
|
|
258
|
+
collected; recon notes (key files examined, references mapped).
|
|
259
|
+
- **On `preflight --continue`:** read the notes, then run the **staleness check** โ if the
|
|
260
|
+
artifact changed since the recorded ref/mtime, say so and re-scan the affected dimensions
|
|
261
|
+
rather than trusting stale findings. Summarize where you left off and resume from the next
|
|
262
|
+
unscanned dimension. **Do NOT repeat reconnaissance** โ reuse the notes; re-read specific
|
|
263
|
+
files only when a finding needs deeper inspection.
|
|
264
|
+
- **On completion:** delete `_preflight-notes.md` โ a stale notes file must never be picked up
|
|
265
|
+
by a later scan of a different artifact (the schema's artifact reference is the second guard:
|
|
266
|
+
a mismatch is treated as stale and reported).
|
|
267
|
+
|
|
268
|
+
## Same-agent bias awareness โ ๐จ NON-NEGOTIABLE
|
|
269
|
+
|
|
270
|
+
When the same model created the artifact and reviews it, systematic blind spots are likely. You
|
|
271
|
+
MUST counteract this. If the artifact was created in the **current session**, note it at the top of
|
|
272
|
+
the report (`โ ๏ธ SAME-SESSION REVIEW โฆ consider a new session for review independence`). For any
|
|
273
|
+
behavior bound to an external standard, **cite the specific standard text** rather than reasoning
|
|
274
|
+
from memory; flag explicitly if you can't. Before concluding the scan, run the adversarial-question
|
|
275
|
+
checklist. Full safeguards in [report-format.md](report-format.md).
|
|
276
|
+
|
|
277
|
+
## Key agent behavior rules
|
|
278
|
+
|
|
279
|
+
> **Grounded Options & Recommendations (coding standards โ Working style) apply here.** Before presenting options/findings/recommendations: filter out non-viable ones (no strawmen; โฅ2 only when โฅ2 are genuinely viable, else present the single viable path and name what was rejected), second-guess each, verify any code-modifying option against the actual current code (cite `file:line`), and lead with a recommendation backed by grounded reasoning. Match ceremony to stakes. In normal mode, the user decides. With active auto-design and existing remediation authorization, select and record the strongest eligible technical fix; never auto-waive risk or dismiss a critical/major finding, and escalate reserved decisions. **Recommendation hardening:** apply `_shared/recommendation-hardening.md` โ for **high-stakes** findings (CRITICAL/MAJOR severity) spawn one independent challenger and reconcile *before* recording the recommendation; for all consequential findings run the in-context layers and close with the `Confidence:` / `Hardening:` disclosure.
|
|
280
|
+
|
|
281
|
+
- **Be adversarial, not hostile** โ findings should feel helpful, not critical.
|
|
282
|
+
- **Specificity over volume** โ one precise finding beats ten vague ones; never pad.
|
|
283
|
+
- **Don't invent problems** โ a clean pass is a valid, trustworthy outcome.
|
|
284
|
+
- **Options must be real** โ no strawman options to flatter a recommendation.
|
|
285
|
+
- **Respect previous decisions** โ don't re-litigate Ambiguity Register entries without new info.
|
|
286
|
+
A deferred complexity decision counts as accepted risk only when the named machinery is absent
|
|
287
|
+
from the audited executable artifact; otherwise keep a ๐ MAJOR finding open.
|
|
288
|
+
- **Cross-document awareness is contextual, not scope expansion** โ read related documents to test
|
|
289
|
+
the target, but keep findings, verdicts, modifications, and roadmap advancement within the audit
|
|
290
|
+
scope contract.
|
|
291
|
+
- **Codebase evidence is not optional** โ for dimensions 2, 4, 5, 6, 11, 13 (and any claim about
|
|
292
|
+
the code) cite the specific file and code; if you can't verify, say so explicitly.
|
|
293
|
+
- **Reconnaissance is proportional** โ read what the artifact touches and its direct dependents;
|
|
294
|
+
don't read the whole codebase for a small artifact.
|
|
295
|
+
|
|
296
|
+
## Related skills & integrations
|
|
297
|
+
|
|
298
|
+
- After the **make-requirements** skill โ `preflight requirements` (catches issues past its Phase 2B gate).
|
|
299
|
+
- After the **make-plan** skill โ `preflight <feature>` (catches issues past its Phase 1C gate).
|
|
300
|
+
- Before the **exec-plan** skill โ if no `00-preflight-report.md` exists, exec-plan MAY softly
|
|
301
|
+
suggest running preflight first (soft suggestion, not a hard gate).
|
|
302
|
+
- The **grill-me** skill interrogates the user's intent *before* creation; preflight audits the
|
|
303
|
+
*created* artifact against the code *after*. Complementary, opposite directions.
|
|
304
|
+
- The **roadmap** skill โ a passing preflight advances the target's row to `RD Preflighted` (๐) or
|
|
305
|
+
`Plan Preflighted` (๐ฌ); a BLOCKED outcome does not advance it.
|
|
306
|
+
- Reference your project's coding/testing standards (AGENTS.md) for what plans/requirements should target.
|
|
307
|
+
|
|
308
|
+
**Standalone:** when used without a follow-up, finish the scan + resolution, present the final
|
|
309
|
+
status, then ask the user what to do next (apply fixes, create a plan, start execution, or review
|
|
310
|
+
specific findings).
|