open-codev-workflow 0.1.0__py3-none-any.whl

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 (47) hide show
  1. codev_workflow/__init__.py +5 -0
  2. codev_workflow/__main__.py +4 -0
  3. codev_workflow/bundle/.agents/skills/build-change/SKILL.md +96 -0
  4. codev_workflow/bundle/.agents/skills/build-change/agents/openai.yaml +4 -0
  5. codev_workflow/bundle/.agents/skills/build-change/assets/implementation-plan.template.md +51 -0
  6. codev_workflow/bundle/.agents/skills/define-product/SKILL.md +79 -0
  7. codev_workflow/bundle/.agents/skills/define-product/agents/openai.yaml +4 -0
  8. codev_workflow/bundle/.agents/skills/define-product/assets/brief.template.md +50 -0
  9. codev_workflow/bundle/.agents/skills/design-solution/SKILL.md +75 -0
  10. codev_workflow/bundle/.agents/skills/design-solution/agents/openai.yaml +4 -0
  11. codev_workflow/bundle/.agents/skills/design-solution/assets/decision.template.md +26 -0
  12. codev_workflow/bundle/.agents/skills/design-solution/assets/design.template.md +76 -0
  13. codev_workflow/bundle/.agents/skills/launch-product/SKILL.md +66 -0
  14. codev_workflow/bundle/.agents/skills/launch-product/agents/openai.yaml +4 -0
  15. codev_workflow/bundle/.agents/skills/launch-product/assets/launch-plan.template.md +48 -0
  16. codev_workflow/bundle/.agents/skills/plan-delivery/SKILL.md +140 -0
  17. codev_workflow/bundle/.agents/skills/plan-delivery/agents/openai.yaml +4 -0
  18. codev_workflow/bundle/.agents/skills/plan-delivery/assets/delivery-plan.template.md +41 -0
  19. codev_workflow/bundle/.agents/skills/review-change/SKILL.md +48 -0
  20. codev_workflow/bundle/.agents/skills/review-change/agents/openai.yaml +4 -0
  21. codev_workflow/bundle/.agents/skills/specify-project/SKILL.md +205 -0
  22. codev_workflow/bundle/.agents/skills/specify-project/agents/openai.yaml +4 -0
  23. codev_workflow/bundle/.agents/skills/specify-project/assets/specification.template.md +151 -0
  24. codev_workflow/bundle/.agents/skills/specify-project/references/interview-coverage.md +303 -0
  25. codev_workflow/bundle/.agents/skills/specify-project/scripts/validate_specification.py +143 -0
  26. codev_workflow/bundle/.opencode/agents/builder.md +54 -0
  27. codev_workflow/bundle/.opencode/agents/orchestrator.md +72 -0
  28. codev_workflow/bundle/.opencode/agents/reviewer.md +35 -0
  29. codev_workflow/bundle/AGENTS.md +23 -0
  30. codev_workflow/bundle/docs/AI-WORKFLOW-PROMPTS.md +318 -0
  31. codev_workflow/bundle/docs/WORKFLOW-COOKBOOK.md +419 -0
  32. codev_workflow/bundle/docs/WORKFLOW-HUMAN.md +212 -0
  33. codev_workflow/bundle/docs/for-ai/WORKFLOW-AGENTS.md +171 -0
  34. codev_workflow/bundle/docs/handbooks/IDEA-TO-PRODUCTION-HANDBOOK.md +1190 -0
  35. codev_workflow/bundle/docs/handbooks/LANGUAGE-AGNOSTIC-PROJECT-HANDBOOK.md +745 -0
  36. codev_workflow/bundle/docs/handbooks/PYTHON-PROJECT-HANDBOOK.md +960 -0
  37. codev_workflow/bundle/evals/development-workflow/scenarios.json +132 -0
  38. codev_workflow/bundle/scripts/evaluate-development-workflow.py +352 -0
  39. codev_workflow/bundle/scripts/validate-development-workflow.py +213 -0
  40. codev_workflow/cli.py +140 -0
  41. codev_workflow/installer.py +891 -0
  42. open_codev_workflow-0.1.0.dist-info/METADATA +150 -0
  43. open_codev_workflow-0.1.0.dist-info/RECORD +47 -0
  44. open_codev_workflow-0.1.0.dist-info/WHEEL +5 -0
  45. open_codev_workflow-0.1.0.dist-info/entry_points.txt +2 -0
  46. open_codev_workflow-0.1.0.dist-info/licenses/LICENSE +28 -0
  47. open_codev_workflow-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,303 @@
1
+ # Project Specification Interview Coverage
2
+
3
+ Use this reference as a coverage map, not a questionnaire. Ask only the
4
+ highest-impact unresolved question and skip topics that are demonstrably
5
+ inapplicable. Every recommendation must be grounded in accepted context.
6
+
7
+ ## Contents
8
+
9
+ 1. Product frame
10
+ 2. Domain and lifecycle
11
+ 3. System boundaries and ownership
12
+ 4. Interfaces and contracts
13
+ 5. Data
14
+ 6. Security, privacy, and abuse
15
+ 7. Failure and resilience
16
+ 8. Concurrency, scale, performance, and cost
17
+ 9. Clients and human interfaces
18
+ 10. AI, agents, and tool use
19
+ 11. Configuration and deployment
20
+ 12. Observability and operations
21
+ 13. Testing and evaluation
22
+ 14. Compatibility, migration, and release
23
+ 15. Completeness and consistency
24
+
25
+ ## 1. Product frame
26
+
27
+ Establish:
28
+
29
+ - the primary user and the situation in which the problem occurs;
30
+ - evidence that the problem exists, its frequency, and current workaround;
31
+ - affected users, administrators, operators, and non-users;
32
+ - the desired change in behavior or system state;
33
+ - leading measures, durable outcomes, guardrails, baseline plan, and owner;
34
+ - primary success, denial, degraded, and recovery scenarios;
35
+ - the smallest complete V1 outcome;
36
+ - explicit non-goals and later possibilities;
37
+ - fixed legal, policy, accessibility, platform, cost, and timing constraints;
38
+ - assumptions whose failure would invalidate the project.
39
+
40
+ Recommend a discovery experiment instead of architecture when the central user,
41
+ problem, or outcome remains speculative. Never invent numerical targets.
42
+
43
+ ## 2. Domain and lifecycle
44
+
45
+ Identify only concepts with architectural consequences:
46
+
47
+ - core entities, value types, identities, and invariants;
48
+ - ownership and authoritative source for each concept;
49
+ - valid states and transitions;
50
+ - commands, events, and side effects that cause transitions;
51
+ - uniqueness, ordering, temporal, and consistency rules;
52
+ - creation, activation, suspension, expiry, deletion, and restoration;
53
+ - audit or historical reconstruction requirements;
54
+ - human override and exceptional-state behavior.
55
+
56
+ Prefer domain language used by actual users. Do not convert every noun into a
57
+ class or database table.
58
+
59
+ ## 3. System boundaries and ownership
60
+
61
+ Determine:
62
+
63
+ - external actors and systems;
64
+ - major components and one responsibility for each;
65
+ - existing capability to reuse rather than recreate;
66
+ - component and interface owners;
67
+ - dependency direction and prohibited dependencies;
68
+ - synchronous and asynchronous control flow;
69
+ - source of truth and cache/materialized-view boundaries;
70
+ - trust, deployment, failure, and scaling boundaries;
71
+ - isolation between users, tenants, workloads, or plugins;
72
+ - decisions local implementers may make independently.
73
+
74
+ Every component must contribute to an accepted scenario. Remove orphan
75
+ components and abstractions without a demonstrated responsibility.
76
+
77
+ ## 4. Interfaces and contracts
78
+
79
+ For each human or machine interface establish:
80
+
81
+ - owner, consumers, purpose, and stability promise;
82
+ - protocol and authoritative schema location;
83
+ - operation, request/event/resource shape, and response/result;
84
+ - validation and normalization;
85
+ - authentication and authorization context;
86
+ - error taxonomy and retryability;
87
+ - timeout, cancellation, pagination, streaming, and size limits;
88
+ - idempotency, ordering, deduplication, and concurrency behavior;
89
+ - compatibility, versioning, deprecation, and removal;
90
+ - rate limits and quota semantics;
91
+ - contract fixtures or tests.
92
+
93
+ Specify semantics rather than private implementation. Use REST, gRPC, events,
94
+ MCP, GraphQL, CLI commands, or another protocol only when context supports it.
95
+
96
+ ## 5. Data
97
+
98
+ Cover applicable lifecycle stages:
99
+
100
+ - collection or creation and lawful purpose;
101
+ - validation and canonical representation;
102
+ - classification and sensitive fields;
103
+ - storage technology constraints and authoritative copy;
104
+ - indexes, relationships, consistency, and transaction boundaries;
105
+ - encryption, key ownership, and access control;
106
+ - audit, lineage, provenance, and change history;
107
+ - backup, restore, export, portability, and legal hold;
108
+ - retention, expiry, deletion, and deletion propagation;
109
+ - residency and cross-region/cross-tenant constraints;
110
+ - schema evolution, migration, and old-reader/new-writer compatibility;
111
+ - test-data strategy and prohibition on uncontrolled production data.
112
+
113
+ Do not select a datastore until access patterns, consistency, lifecycle, and
114
+ operational ownership justify it.
115
+
116
+ ## 6. Security, privacy, and abuse
117
+
118
+ Identify:
119
+
120
+ - assets, actors, trust boundaries, and attacker capabilities;
121
+ - identity source and session or workload identity lifecycle;
122
+ - authorization decisions and least-privilege roles;
123
+ - untrusted input and destination-specific output handling;
124
+ - secret storage, delivery, rotation, revocation, and audit;
125
+ - personal or regulated data purpose, minimization, consent, and retention;
126
+ - tenant isolation and confused-deputy risks;
127
+ - administrative and emergency access;
128
+ - abuse, enumeration, scraping, denial-of-service, and fraud controls;
129
+ - dependency and build supply-chain protections;
130
+ - security event evidence and private reporting/incident ownership.
131
+
132
+ Escalate material choices to the appropriate specialist. Do not interpret
133
+ absence of a stated regulation as permission to collect data.
134
+
135
+ ## 7. Failure and resilience
136
+
137
+ For each important dependency or operation establish:
138
+
139
+ - expected local and downstream failures;
140
+ - visible user behavior under failure;
141
+ - timeout and cancellation propagation;
142
+ - retry eligibility, limit, backoff, and jitter;
143
+ - idempotency and duplicate handling;
144
+ - circuit breaking, load shedding, or queue backpressure;
145
+ - fault containment and blast radius;
146
+ - degraded but supported modes;
147
+ - detection and diagnostic evidence;
148
+ - automatic versus human recovery;
149
+ - recovery point and recovery time expectations;
150
+ - rollback or forward-repair path.
151
+
152
+ Retries are not a default. They can amplify overload or duplicate non-idempotent
153
+ work.
154
+
155
+ ## 8. Concurrency, scale, performance, and cost
156
+
157
+ Seek evidence for:
158
+
159
+ - expected and peak users, requests, events, or data volume;
160
+ - latency and throughput expectations tied to a user outcome;
161
+ - concurrency model, contention points, and ordering requirements;
162
+ - queue, connection, thread/process, memory, storage, and payload bounds;
163
+ - admission control, quotas, and noisy-neighbor protection;
164
+ - horizontal or vertical scaling boundaries;
165
+ - load, stress, endurance, and capacity evaluation;
166
+ - infrastructure, third-party, model, storage, egress, and support cost;
167
+ - cost limits, measurement, and owner.
168
+
169
+ When no baseline exists, specify how to establish it. Do not invent internet
170
+ scale for a small internal tool.
171
+
172
+ ## 9. Clients and human interfaces
173
+
174
+ For applicable web, mobile, desktop, CLI, API, or assistive clients cover:
175
+
176
+ - supported clients, platforms, versions, and ownership;
177
+ - primary journeys and recovery behavior;
178
+ - client/server responsibility and offline behavior;
179
+ - accessibility, keyboard, screen-reader, contrast, and reduced-motion needs;
180
+ - localization, time zones, currencies, units, and text expansion;
181
+ - authentication, session expiry, and permission-denied experience;
182
+ - optimistic updates, conflict handling, and stale data;
183
+ - client compatibility and update policy;
184
+ - telemetry and privacy-respecting user feedback.
185
+
186
+ Do not make a UI framework an architectural requirement without a client and
187
+ maintenance reason.
188
+
189
+ ## 10. AI, agents, and tool use
190
+
191
+ Use this section only when the product contains an AI capability. Establish:
192
+
193
+ - model purpose and behavior that remains deterministic outside the model;
194
+ - model/provider/version selection and change policy;
195
+ - prompt, retrieval corpus, context, and memory ownership;
196
+ - data use, retention, residency, and training restrictions;
197
+ - model-output validation and safe fallback;
198
+ - prompt injection and untrusted-content boundaries;
199
+ - allowed tools and per-tool permission scope;
200
+ - human authorization for consequential actions;
201
+ - isolation between agents, users, and tenants;
202
+ - maximum steps, time, tokens, cost, retries, and cancellation;
203
+ - offline evaluation set, provenance, owner, and contamination control;
204
+ - quality, safety, latency, availability, and cost thresholds;
205
+ - monitoring for drift, regressions, abuse, and unexpected tool use;
206
+ - rollback across prompt, model, tools, retrieval data, and application versions.
207
+
208
+ Never specify "the model decides" where a stable contract, authorization rule,
209
+ or safety invariant is required.
210
+
211
+ ## 11. Configuration and deployment
212
+
213
+ Determine:
214
+
215
+ - runtime and supported platform versions;
216
+ - processes, containers, functions, jobs, or device topology;
217
+ - environment boundaries and promotion flow;
218
+ - configuration schema, source precedence, validation, and versioning;
219
+ - secret and workload-identity delivery;
220
+ - stateful and stateless boundaries;
221
+ - network ingress, egress, service discovery, and trust boundaries;
222
+ - regional, availability-zone, residency, or edge requirements;
223
+ - deployment ownership and least-privilege automation;
224
+ - immutable artifact identity and provenance;
225
+ - infrastructure creation, update, drift, and deletion;
226
+ - local development and representative preproduction topology.
227
+
228
+ Separate required properties from a vendor choice unless organizational policy
229
+ already fixes the provider.
230
+
231
+ ## 12. Observability and operations
232
+
233
+ Define:
234
+
235
+ - product, correctness, security, reliability, and cost signals;
236
+ - structured logs and correlation without sensitive payloads;
237
+ - metrics, traces, dashboards, and actionable alerts;
238
+ - service-level indicators, objectives, and error-budget response when relevant;
239
+ - health, readiness, dependency, queue, and saturation signals;
240
+ - on-call or support ownership and escalation route;
241
+ - runbooks for common and dangerous failure modes;
242
+ - backup/restore, disaster recovery, and operational drills;
243
+ - incident evidence, communication, and post-incident learning;
244
+ - dependency maintenance, deprecation, and end-of-life ownership.
245
+
246
+ Every signal needs a decision or operational action. Avoid telemetry collected
247
+ without an owner or purpose.
248
+
249
+ ## 13. Testing and evaluation
250
+
251
+ Trace accepted scenarios and risks to:
252
+
253
+ - unit evidence for deterministic rules;
254
+ - contract evidence for shared interfaces;
255
+ - integration evidence for real adapters and infrastructure;
256
+ - end-to-end evidence for critical user journeys;
257
+ - negative authorization, abuse, and validation cases;
258
+ - migration, compatibility, and rollback tests;
259
+ - performance, capacity, resilience, and restore evaluation;
260
+ - accessibility and internationalization evidence;
261
+ - evaluator ownership and independence;
262
+ - test-data boundaries and flake control;
263
+ - release-candidate and production verification.
264
+
265
+ For critical or AI-generated behavior, protect evaluation integrity with
266
+ independent, immutable, hidden, property-based, fuzz, mutation, or differential
267
+ tests as appropriate. Passing visible tests is not complete evidence.
268
+
269
+ ## 14. Compatibility, migration, and release
270
+
271
+ Establish:
272
+
273
+ - supported old and new clients, readers, writers, and artifacts;
274
+ - additive or breaking contract changes;
275
+ - expand/migrate/contract ordering;
276
+ - backfill, dual-read/write, validation, and reconciliation;
277
+ - feature-flag ownership and safe default;
278
+ - internal, staging, shadow, canary, and broader cohorts;
279
+ - product and reliability success thresholds;
280
+ - guardrails, observation duration, stop conditions, and decision owner;
281
+ - rollback to a supported data and code state;
282
+ - cleanup of flags, compatibility paths, temporary infrastructure, and data;
283
+ - user, operator, support, and developer communication.
284
+
285
+ Do not include sprint sequencing or work assignment. This section specifies safe
286
+ states and release constraints for later delivery planning.
287
+
288
+ ## 15. Completeness and consistency
289
+
290
+ Before recommending technical-design acceptance, verify:
291
+
292
+ - each V1 scenario has an owning component and contract path;
293
+ - each external dependency has failure and operational behavior;
294
+ - each sensitive data flow crosses identified trust boundaries safely;
295
+ - each state transition has authority, validation, and recovery;
296
+ - each shared interface has one owner and compatibility policy;
297
+ - each material claim has evidence or is labeled an assumption;
298
+ - each accepted quality target has test or production evidence;
299
+ - each migration step preserves a supported intermediate state;
300
+ - rollback does not depend on an irreversible schema or data change;
301
+ - every open item is classified as blocking or non-blocking;
302
+ - every non-blocking item has an owner and decision point;
303
+ - the specification contains no implementation roadmap or task checklist.
@@ -0,0 +1,143 @@
1
+ #!/usr/bin/env python3
2
+ """Validate the structure and acceptance state of a project specification."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import argparse
7
+ import re
8
+ import sys
9
+ from pathlib import Path
10
+
11
+
12
+ REQUIRED_METADATA = (
13
+ "Status",
14
+ "Product frame",
15
+ "Technical design",
16
+ "Product owner",
17
+ "Technical owner",
18
+ "Required reviewers",
19
+ "Last reviewed",
20
+ )
21
+
22
+ REQUIRED_SECTIONS = (
23
+ "Executive summary",
24
+ "Problem, users, and evidence",
25
+ "Product vision and desired outcomes",
26
+ "Success measures and guardrails",
27
+ "Essential scenarios",
28
+ "V1 scope",
29
+ "Non-goals",
30
+ "Constraints",
31
+ "Assumptions and unresolved questions",
32
+ "Architectural context",
33
+ "System architecture",
34
+ "Components and ownership",
35
+ "Domain model and state transitions",
36
+ "Data lifecycle and retention",
37
+ "APIs, protocols, and contracts",
38
+ "Supported clients and interfaces",
39
+ "Component orchestration rules",
40
+ "Security, privacy, and abuse controls",
41
+ "Failure modes and resilience",
42
+ "Concurrency, capacity, performance, and cost",
43
+ "Configuration and deployment topology",
44
+ "Observability and operations",
45
+ "Test and evaluation strategy",
46
+ "Compatibility and migration",
47
+ "Rollout, rollback, and cleanup",
48
+ "Alternatives and trade-offs",
49
+ "Risks and open decisions",
50
+ "Source references",
51
+ "Acceptance",
52
+ )
53
+
54
+ ALLOWED_STATES = {"Draft", "Accepted", "Superseded"}
55
+ PLACEHOLDER = re.compile(
56
+ r"\b(?:TODO|TBD)\b|<!--|"
57
+ r"\[(?:Project Name|name or team|technical and specialist reviewers|"
58
+ r"YYYY-MM-DD|measure|baseline|target|window|source|owner|item|"
59
+ r"assumption/open|yes/no|evidence|point|component|responsibility|inputs|"
60
+ r"outputs|dependencies|contract|consumers|shape|guarantees|behavior|policy|"
61
+ r"failure|effect|signal|recovery|option|benefits|costs|"
62
+ r"chosen/rejected and why|risk|impact|action)\](?!\()",
63
+ re.IGNORECASE,
64
+ )
65
+
66
+
67
+ def metadata(text: str, field: str) -> str | None:
68
+ match = re.search(
69
+ rf"^\*\*{re.escape(field)}:\*\*\s*(.*?)\s*$",
70
+ text,
71
+ re.MULTILINE,
72
+ )
73
+ return match.group(1) if match else None
74
+
75
+
76
+ def validate(path: Path) -> list[str]:
77
+ errors: list[str] = []
78
+ if not path.is_file():
79
+ return [f"{path}: file does not exist"]
80
+
81
+ text = path.read_text(encoding="utf-8")
82
+ lines = text.splitlines()
83
+ if not lines or not re.fullmatch(r"#\s+.+\s+Specification", lines[0]):
84
+ errors.append("first line must be '# <Project Name> Specification'")
85
+
86
+ values: dict[str, str] = {}
87
+ for field in REQUIRED_METADATA:
88
+ value = metadata(text, field)
89
+ if value is None:
90
+ errors.append(f"missing metadata field: {field}")
91
+ else:
92
+ values[field] = value
93
+
94
+ for field in ("Status", "Product frame", "Technical design"):
95
+ value = values.get(field)
96
+ if value is not None and value not in ALLOWED_STATES:
97
+ errors.append(f"{field} must be Draft, Accepted, or Superseded")
98
+
99
+ headings = {
100
+ match.group(1).strip()
101
+ for match in re.finditer(r"^##\s+(.+?)\s*$", text, re.MULTILINE)
102
+ }
103
+ for section in REQUIRED_SECTIONS:
104
+ if section not in headings:
105
+ errors.append(f"missing section: {section}")
106
+
107
+ if values.get("Status") == "Accepted":
108
+ if values.get("Product frame") != "Accepted":
109
+ errors.append("accepted document requires an accepted product frame")
110
+ if values.get("Technical design") != "Accepted":
111
+ errors.append("accepted document requires an accepted technical design")
112
+ if PLACEHOLDER.search(text):
113
+ errors.append("accepted document contains a placeholder or HTML comment")
114
+ unchecked = re.findall(r"^- \[ \]", text, re.MULTILINE)
115
+ if unchecked:
116
+ errors.append("accepted document contains unchecked acceptance criteria")
117
+ for field in ("Product owner", "Technical owner", "Required reviewers"):
118
+ value = values.get(field, "")
119
+ if not value or value.casefold() in {"none", "n/a", "unknown"}:
120
+ errors.append(f"accepted document requires {field}")
121
+
122
+ return errors
123
+
124
+
125
+ def main() -> int:
126
+ parser = argparse.ArgumentParser(description=__doc__)
127
+ parser.add_argument("specification", type=Path)
128
+ args = parser.parse_args()
129
+
130
+ errors = validate(args.specification)
131
+ if errors:
132
+ print(f"Specification validation failed: {args.specification}")
133
+ for error in errors:
134
+ print(f"- {error}")
135
+ return 1
136
+
137
+ state = metadata(args.specification.read_text(encoding="utf-8"), "Status")
138
+ print(f"Specification validation passed ({state}): {args.specification}")
139
+ return 0
140
+
141
+
142
+ if __name__ == "__main__":
143
+ sys.exit(main())
@@ -0,0 +1,54 @@
1
+ ---
2
+ description: Bounded implementation subagent that executes one accepted work-item plan
3
+ mode: subagent
4
+ permission:
5
+ edit: allow
6
+ task: deny
7
+ bash:
8
+ "*": ask
9
+ "git status*": allow
10
+ "git diff*": allow
11
+ "git log*": allow
12
+ "git show*": allow
13
+ "git rev-parse*": allow
14
+ "git commit*": deny
15
+ "git push*": deny
16
+ external_directory: deny
17
+ ---
18
+
19
+ Implement exactly one bounded work item delegated by the orchestrator. Follow
20
+ `AGENTS.md`, `docs/for-ai/WORKFLOW-AGENTS.md`, and `build-change`. Treat the
21
+ accepted implementation plan and its cited brief/specification/design/API as
22
+ authority; do not redesign them to make coding easier.
23
+
24
+ Before editing:
25
+
26
+ 1. inspect the actual files, symbols, tests, build commands, conventions, Git
27
+ state, and nearby comparable implementation;
28
+ 2. verify the base snapshot and check for unrelated or concurrent changes;
29
+ 3. compare repository facts with the accepted plan; and
30
+ 4. return `BLOCKED` with exact evidence when a material mismatch, missing
31
+ decision, scope expansion, collision, or unavailable validation prevents safe
32
+ execution. Do not invent the missing answer.
33
+
34
+ When ready, implement the smallest coherent review purpose. Stay within allowed
35
+ scope, reuse repository patterns, put tests with behavior, and avoid unrelated
36
+ cleanup. Never weaken tests, silently change contracts, add unaccepted
37
+ dependencies, or modify accepted planning artifacts. Keep the repository
38
+ buildable and stop after two failed attempts with the same root cause.
39
+
40
+ Run the specified formatter, static checks, affected tests, and proportionate
41
+ broader validation. Inspect the complete diff. Return only observable handoff
42
+ information:
43
+
44
+ - **Delivered:** outcome and behavior;
45
+ - **Changed:** files and components;
46
+ - **Base/head snapshot:** exact values;
47
+ - **Validation actually run:** commands and outcomes;
48
+ - **Acceptance evidence:** criterion mapped to evidence;
49
+ - **Scope deviations:** none or explicitly accepted deviations;
50
+ - **Known limitations:** risks and follow-up; and
51
+ - **Review state:** `AWAITING INDEPENDENT REVIEW`.
52
+
53
+ Do not invoke another agent, approve the change, commit, push, merge, publish,
54
+ deploy, migrate data, or expand rollout.
@@ -0,0 +1,72 @@
1
+ ---
2
+ description: Human-controlled workflow orchestrator for planning, delegated building, and independent review
3
+ mode: primary
4
+ permission:
5
+ edit: ask
6
+ task:
7
+ "*": deny
8
+ builder: allow
9
+ reviewer: allow
10
+ bash:
11
+ "*": ask
12
+ "git status*": allow
13
+ "git diff*": allow
14
+ "git log*": allow
15
+ "git show*": allow
16
+ "git rev-parse*": allow
17
+ "git commit*": deny
18
+ "git push*": deny
19
+ external_directory: deny
20
+ ---
21
+
22
+ Act as the human's primary engineering partner. Follow `AGENTS.md`,
23
+ `docs/for-ai/WORKFLOW-AGENTS.md`, and the applicable repository skills. Present
24
+ the work as `Understand`, `Build`, `Review`, or `Ship` and select the lightest
25
+ safe path without requiring the human to know skill names.
26
+
27
+ For Understand and Ship work, use the applicable lifecycle skill directly.
28
+ Create or revise planning artifacts only when the selected skill requires them
29
+ and the human has authorized the write. Never implement product code while
30
+ acting as orchestrator.
31
+
32
+ ## Three-agent Build protocol
33
+
34
+ For one ready work item:
35
+
36
+ 1. Read the work item, upstream brief/specification/design/API authority,
37
+ repository instructions, current code and tests, ownership, and Git state.
38
+ 2. Confirm the item is ready. Return unresolved product questions to
39
+ `define-product`, architectural or contract questions to `design-solution`,
40
+ and dependency or assignment problems to `plan-delivery`.
41
+ 3. Use `build-change` to frame and ground the change. Present the focus card.
42
+ For delegated, multi-session, cross-component, normal-risk, or higher-risk
43
+ work, render the complete
44
+ `.agents/skills/build-change/assets/implementation-plan.template.md` in the
45
+ conversation. Do not ask the human to write it.
46
+ 4. Obtain one precise human decision for any material product, API, data,
47
+ dependency, architecture, security, destructive, scope, or risk choice. Ask
48
+ for approval before starting delegated implementation. Do not delegate an
49
+ unresolved or unaccepted plan.
50
+ 5. Invoke `builder` with the accepted work item and implementation plan, exact
51
+ authority links, base commit, allowed scope, integration constraints,
52
+ validation, and stop conditions. Pass task-local artifacts, not private
53
+ reasoning or a broad conversation transcript.
54
+ 6. When the builder returns, verify that its evidence receipt identifies an
55
+ exact head snapshot, actual validation, deviations, limitations, and changed
56
+ files. If evidence is missing, return the task for evidence rather than
57
+ guessing.
58
+ 7. Invoke `reviewer` in a fresh task with the exact base-to-head snapshot, work
59
+ item, accepted plan, upstream authority, and builder evidence receipt.
60
+ 8. If the reviewer returns actionable findings, send the findings and original
61
+ accepted plan back to `builder`. Do not let the reviewer edit. Repeat review
62
+ after correction. After two correction attempts with the same root cause,
63
+ or whenever the accepted plan must change materially, stop for the human
64
+ with evidence and a recommendation.
65
+ 9. Return the final evidence receipt, reviewer decision, residual risks, and
66
+ exact snapshot. Never claim approval and stop before commit, merge, publish,
67
+ deploy, migration, or rollout expansion unless the human explicitly grants
68
+ the corresponding authority.
69
+
70
+ Keep progress visible at plan acceptance, builder completion, reviewer result,
71
+ and any stop condition. Do not spawn unrelated agents or parallel builders in
72
+ the same worktree.
@@ -0,0 +1,35 @@
1
+ ---
2
+ description: Independent reviewer for one exact code change
3
+ mode: subagent
4
+ permission:
5
+ edit: deny
6
+ task: deny
7
+ bash:
8
+ "*": ask
9
+ "git status*": allow
10
+ "git diff*": allow
11
+ "git log*": allow
12
+ "git show*": allow
13
+ "git rev-parse*": allow
14
+ "git commit*": deny
15
+ "git push*": deny
16
+ external_directory: deny
17
+ ---
18
+
19
+ Use the `review-change` skill. Review the exact supplied base-to-head diff,
20
+ acceptance criteria, relevant design/API, repository context, and validation
21
+ evidence without relying on the implementing agent's private reasoning.
22
+
23
+ Confirm the exact base and head snapshots before reviewing. If the diff,
24
+ authority, acceptance criteria, or builder evidence is missing or ambiguous,
25
+ return `BLOCKED BY MISSING EVIDENCE` rather than reconstructing it from chat.
26
+
27
+ Prioritize correctness, security/privacy, data loss, concurrency, compatibility,
28
+ error behavior, test quality, architecture, scope, maintainability, and rollout.
29
+ Lead with actionable findings ordered P0 through P3. Give a tight location,
30
+ evidence, impact, and testable correction for each finding.
31
+
32
+ Do not edit code or planning artifacts. Do not invent requirements, block on
33
+ personal style, communicate with the builder directly, or authorize merge. End
34
+ with `READY FOR HUMAN APPROVAL`, `CHANGES REQUIRED`, or
35
+ `BLOCKED BY MISSING EVIDENCE` and name residual risks.
@@ -0,0 +1,23 @@
1
+ # Human-AI Development Policy
2
+
3
+ Read `docs/for-ai/WORKFLOW-AGENTS.md` before planning or implementing product
4
+ work. Use the applicable repository skill:
5
+
6
+ - `specify-project` for a recommendation-led greenfield or whole-product
7
+ interview that produces one accepted `SPECIFICATION.md`;
8
+ - `define-product` for ideas, outcomes, scope, and workflow sizing;
9
+ - `design-solution` for material architecture, API, data, or risk decisions;
10
+ - `plan-delivery` for multi-developer milestones and work coordination;
11
+ - `build-change` for interactive implementation of one bounded change;
12
+ - `review-change` for an independent, read-only code review; and
13
+ - `launch-product` for readiness, rollout, rollback, and learning.
14
+
15
+ Use the lightest safe path. Inspect the repository before prescribing code
16
+ mechanics, keep changes small, run proportionate validation, and stop for
17
+ material decisions instead of inventing them. Humans retain authority for
18
+ acceptance, merge, deployment, migration, publication, and rollout expansion.
19
+
20
+ Do not require developers to choose a skill. Route their request internally and
21
+ describe the current human-facing step as `Understand`, `Build`, `Review`, or
22
+ `Ship`; insert design or delivery planning only when risk or coordination needs
23
+ it.