@acrasie/dev-flow 0.0.0-stage → 1.0.1
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/.codex-plugin/plugin.json +20 -0
- package/LICENSE +21 -0
- package/README.md +181 -2
- package/dist/codex-dev-flow.mjs +3 -0
- package/dist/dev-flow.mjs +241 -0
- package/docs/adr/0001-hybrid-portable-workflow.md +23 -0
- package/docs/adr/0002-share-an-invalidable-context-capsule.md +55 -0
- package/docs/adr/0004-scale-assurance-lanes-by-applicable-risk.md +36 -0
- package/docs/adr/0006-make-intake-adaptive-user-authoritative-and-token-efficient.md +76 -0
- package/docs/adr/0007-collect-opt-in-local-benchmark-feedback.md +82 -0
- package/docs/adr/0008-automate-maintainer-releases-with-an-interactive-bun-workflow.md +121 -0
- package/docs/adr/0009-separate-intake-decisions-from-shape-discovery.md +200 -0
- package/docs/adr/0010-choose-quick-or-plan-after-discovery.md +161 -0
- package/docs/adr/0011-separate-fast-local-and-authoritative-ci-quality-gates.md +49 -0
- package/docs/adr/0012-use-bun-test-and-require-node-24.md +41 -0
- package/docs/adr/0013-layer-source-distribution-and-runtime-tests.md +42 -0
- package/docs/adr/0014-ratchet-source-coverage-with-bun.md +51 -0
- package/docs/adr/0015-split-fast-and-type-aware-linting.md +41 -0
- package/docs/adr/0016-use-husky-with-a-tested-bun-staged-file-adapter.md +45 -0
- package/docs/adr/0017-format-conservatively-with-oxfmt.md +45 -0
- package/docs/adr/0018-use-a-high-signal-oxlint-policy.md +53 -0
- package/docs/adr/0019-gate-deterministic-size-and-observe-timing.md +44 -0
- package/docs/adr/0020-support-linux-and-macos-with-targeted-ci.md +41 -0
- package/docs/adr/0021-randomize-tests-without-retries.md +35 -0
- package/docs/adr/0022-use-one-root-bun-workspace.md +41 -0
- package/docs/adr/0024-make-gate-a-minimal-plan-approval.md +74 -0
- package/docs/adr/0025-end-the-lifecycle-after-assure.md +55 -0
- package/docs/adr/0026-keep-intake-product-stable-and-interview-shape-by-dependency.md +151 -0
- package/docs/adr/0027-add-agentic-project-init-and-versioned-engineering-profiles.md +147 -0
- package/docs/adr/0028-make-public-documentation-user-first-and-current.md +65 -0
- package/docs/adr/0029-make-build-a-native-execution-boundary.md +51 -0
- package/docs/adr/0030-unify-product-domain-and-technical-design-interviews.md +240 -0
- package/docs/adr/0031-make-assure-the-success-boundary.md +205 -0
- package/docs/artifacts.md +47 -0
- package/docs/baselines/2026-07-18-p0-lifecycle.json +142 -0
- package/docs/design.md +101 -0
- package/docs/getting-started.md +204 -0
- package/docs/glossary/dev-flow.md +527 -0
- package/docs/lifecycle-contract.md +189 -0
- package/docs/lifecycle-contract.projection.json +931 -0
- package/docs/metrics-protocol.md +113 -0
- package/docs/project-profile-contract.md +157 -0
- package/docs/runbooks/maintainer-release.md +291 -0
- package/docs/target-intake-shape-contract.md +416 -0
- package/package.json +68 -4
- package/schemas/config.schema.json +104 -0
- package/schemas/policy.schema.json +17 -0
- package/schemas/project-init-state.schema.json +159 -0
- package/schemas/project-profile-local.schema.json +53 -0
- package/schemas/project-profile.schema.json +285 -0
- package/schemas/state.schema.json +826 -0
- package/skills/debug-root-cause/SKILL.md +16 -0
- package/skills/design-decisions/SKILL.md +24 -0
- package/skills/dev-flow/SKILL.md +306 -0
- package/skills/dev-flow/agents/openai.yaml +6 -0
- package/skills/discover-change/SKILL.md +31 -0
- package/skills/plan-change/SKILL.md +29 -0
- package/skills/review-change/SKILL.md +21 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug-root-cause
|
|
3
|
+
description: Use when a stable validation or review issue has failed two code corrections.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Operate only inside ASSURE resolution after same stable Issue survives two code
|
|
7
|
+
corrections. Consume issue/occurrence identities, correction history, current
|
|
8
|
+
fingerprints, approved contract, and fresh check evidence. Reproduce, gather evidence,
|
|
9
|
+
form one hypothesis, and test minimally without expanding approved scope.
|
|
10
|
+
|
|
11
|
+
Return root-cause link, tested hypothesis, affected evidence invalidation, and proposed
|
|
12
|
+
next action. Third correction requires recorded investigation. Exhausted correction
|
|
13
|
+
budget, material contract change, or policy contradiction blocks/returns to SHAPE/GATE;
|
|
14
|
+
never relabel correctable failure as success or terminal `failed`.
|
|
15
|
+
|
|
16
|
+
Authority: [ASSURE control loop](../../docs/lifecycle-contract.md#assure).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-decisions
|
|
3
|
+
description: Use internally when dev-flow resolves one material product, domain, terminology, or technical design frontier.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Operate only inside parent Dev Flow INTAKE or SHAPE. Consume typed design state, current
|
|
7
|
+
dependency frontier, repository evidence supplied by Discovery, user language, and
|
|
8
|
+
phase authority. Never inspect repository directly, persist state, or start an
|
|
9
|
+
autonomous brainstorming workflow.
|
|
10
|
+
|
|
11
|
+
Return normalized Product Baseline/domain/decision deltas, bounded frontier scores, and
|
|
12
|
+
at most one authority-valid question. Discoverable facts become Discovery Targets, not
|
|
13
|
+
user questions. Product, terminology, and domain-rule choices belong to INTAKE;
|
|
14
|
+
material technical choices belong to SHAPE. Offer 2–3 non-dominated options with one
|
|
15
|
+
evidence-backed recommendation when viable meanings exist; otherwise ask targeted open
|
|
16
|
+
elicitation without inventing business meaning. Material free-form normalization
|
|
17
|
+
requires confirmation.
|
|
18
|
+
|
|
19
|
+
Persist no transcript, raw prompt, hidden reasoning, secrets, large code/diff, or
|
|
20
|
+
external payload. A fresh persisted active question resumes without another call.
|
|
21
|
+
Invalid semantic output permits one targeted retry; second failure preserves prior state
|
|
22
|
+
and returns typed block.
|
|
23
|
+
|
|
24
|
+
Authority: [ADR 0030](../../docs/adr/0030-unify-product-domain-and-technical-design-interviews.md).
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dev-flow
|
|
3
|
+
description: Use when shaping, implementing, debugging, reviewing, or assuring a repository change through the Dev Flow lifecycle.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dev Flow
|
|
7
|
+
|
|
8
|
+
Follow [lifecycle contract](../../docs/lifecycle-contract.md): exactly INTAKE, SHAPE,
|
|
9
|
+
GATE, BUILD, ASSURE. ASSURE is final phase; never invent or persist another phase or
|
|
10
|
+
success status. Canonical registry, strict V6 state, durable state store, unified design protocol,
|
|
11
|
+
and local benchmark store are available primitives. Never claim a durable transition,
|
|
12
|
+
Approval binding, or Assurance Receipt without deterministic evidence.
|
|
13
|
+
|
|
14
|
+
Exact `$dev-flow init` follows Project INIT below. Parse every other invocation with
|
|
15
|
+
bundled deterministic script before acting.
|
|
16
|
+
|
|
17
|
+
## Skill isolation and configured integrations
|
|
18
|
+
|
|
19
|
+
When `$dev-flow` is explicitly invoked, use bundled Dev Flow skills by default.
|
|
20
|
+
Do not invoke skills from other plugins merely because descriptions match.
|
|
21
|
+
|
|
22
|
+
External skills are eligible only when repository configuration lists plugin identifier
|
|
23
|
+
in `integrations.plugins` or fully qualified skill identifier in `integrations.skills`.
|
|
24
|
+
Allowlisting is not activation; selected skill must still be relevant. System,
|
|
25
|
+
developer, repository, and effective policy instructions remain authoritative.
|
|
26
|
+
|
|
27
|
+
`npx @acrasie/dev-flow init` remains standalone CLI command and interactive
|
|
28
|
+
plugin-configuration wizard.
|
|
29
|
+
It is separate from agentic `$dev-flow init`; never substitute one for other.
|
|
30
|
+
|
|
31
|
+
## Project INIT
|
|
32
|
+
|
|
33
|
+
Exact `$dev-flow init` is agentic project-engineering profile transaction, outside task
|
|
34
|
+
lifecycle and task GATE. It creates no TaskState and no product scaffold. Use bundled
|
|
35
|
+
dependency-free CLI `project-profile` commands as deterministic backend; never install
|
|
36
|
+
or fetch another package.
|
|
37
|
+
|
|
38
|
+
1. Run `dev-flow project-profile session-view`, then `project-profile inspect`.
|
|
39
|
+
Resume exact persisted active question unless dependency evidence changed; otherwise
|
|
40
|
+
invalidate affected closure and return to Discovery. Before first session save, ensure
|
|
41
|
+
`/.codex/project-init/` is ignored; if repository does not already cover it, request
|
|
42
|
+
one scoped approval to add exact ignore rule. Read applicable repository guidance,
|
|
43
|
+
manifests, locks, architecture sources, tests, contracts, representative code, and
|
|
44
|
+
configured accessible service roots before asking. Existing profile is authoritative
|
|
45
|
+
default, not proof that fingerprints remain current.
|
|
46
|
+
2. Core Discovery covers stack, source structure, architecture boundaries, dependency
|
|
47
|
+
direction, naming, error handling, testing, and quality. Activate frontend, API,
|
|
48
|
+
data, security, concurrency, performance, compatibility, migration, observability,
|
|
49
|
+
deployment, rollback, and operations only when evidence or user input makes them
|
|
50
|
+
applicable. Greenfield repository is valid; create profile only, never application
|
|
51
|
+
code.
|
|
52
|
+
3. Ask only missing, contradictory, stale, or material decisions. Ask exactly one
|
|
53
|
+
question per interaction. Show 2–3 viable non-dominated options, recommended option
|
|
54
|
+
first, evidence/reason/confidence, direct consequences, and free-form path. Discover
|
|
55
|
+
facts instead of asking. No hard question cap, five-question checkpoint, progress
|
|
56
|
+
permission, or cost-estimation prompt. After each answer/Discovery boundary, pipe
|
|
57
|
+
compact normalized registry and exact active question to `project-profile session-save`.
|
|
58
|
+
Persist no transcript or hidden reasoning.
|
|
59
|
+
4. Use cheapest useful visual: ASCII for simple structure, Mermaid for non-trivial
|
|
60
|
+
architecture/state/sequence, isolated temporary HTML/CSS for material UI decisions,
|
|
61
|
+
Excalidraw/image only when requested or necessary. YAML remains canonical; Mermaid
|
|
62
|
+
is generated projection. Temporary prototypes never enter product source.
|
|
63
|
+
5. Keep shared `.codex/dev-flow.project.yaml` durable and portable. It may contain only
|
|
64
|
+
logical project/service identities, stack, topology/contracts, approved conventions,
|
|
65
|
+
provenance, source fingerprints, relative diagram refs, revision, digest, and
|
|
66
|
+
receipt. Keep volatile observations in temporary INIT registry. Never place absolute
|
|
67
|
+
paths in shared profile.
|
|
68
|
+
6. Keep `.codex/dev-flow.project.local.yaml` gitignored. It contains only absolute local
|
|
69
|
+
service-path mappings and non-contractual preferences. Before local publication,
|
|
70
|
+
propose exact `/.codex/dev-flow.project.local.yaml` ignore rule if absent and obtain
|
|
71
|
+
approval with profile diff. Local preferences cannot override shared decisions.
|
|
72
|
+
7. Multi-service Discovery is progressive. Root shared profile owns logical topology,
|
|
73
|
+
responsibilities, contracts, and external profile refs. Each repository owns own
|
|
74
|
+
profile. Absolute roots live only in local overlay. An inaccessible service statement
|
|
75
|
+
is `user_asserted`, never verified evidence. Modifying external repository profile
|
|
76
|
+
requires separate validation and publication transaction.
|
|
77
|
+
8. Reconcile drift selectively. Rediscover stale facts. Re-interview user-owned stale
|
|
78
|
+
conventions. Invalidate only dependent decision closure. Accumulate all answers in
|
|
79
|
+
temporary proposal; never update shared file after each answer. Rejected update
|
|
80
|
+
leaves shared profile byte-for-byte unchanged and writes no shared stale marker.
|
|
81
|
+
9. Authority is: system/repository policy -> INTAKE product decisions when task-scoped
|
|
82
|
+
-> explicit task exception -> shared engineering profile -> local non-contractual
|
|
83
|
+
preferences -> agent defaults. Lower authority never weakens higher authority.
|
|
84
|
+
10. Build candidate transaction containing `profile` and optional exact `projections`.
|
|
85
|
+
Pipe it to `dev-flow project-profile validate`. Render adaptive summary,
|
|
86
|
+
changed/stale decisions, topology, exceptions, sources, exact content digest, and
|
|
87
|
+
exact canonical YAML on `view`. Validation must be read-only. Save
|
|
88
|
+
`awaiting_approval` session bound to returned candidate content digest.
|
|
89
|
+
11. Ask one explicit final Profile Approval over exact validated digest and projections.
|
|
90
|
+
Approval is separate from task GATE. Only after approval, pipe unchanged candidate
|
|
91
|
+
to `dev-flow project-profile publish`; backend creates receipt and publishes
|
|
92
|
+
projections then shared profile atomically. Validate and publish local overlay with
|
|
93
|
+
`--local`. Any candidate change requires validation and approval again. After all
|
|
94
|
+
approved publications succeed, run `project-profile session-clear`.
|
|
95
|
+
|
|
96
|
+
`dev-flow project-profile view [--local]` renders published canonical YAML.
|
|
97
|
+
Backend validation, digest, revision, privacy, receipt, symlink, and atomic-write errors
|
|
98
|
+
are blocking; never bypass them with direct file write. Ordinary SHAPE consumes approved profile and domain-documentation conventions through
|
|
99
|
+
portable digest-bound references. Task-local exceptions never mutate shared authority.
|
|
100
|
+
|
|
101
|
+
## INTAKE and routing
|
|
102
|
+
|
|
103
|
+
INTAKE owns Product Baseline, terminology, business rules, domain scenarios, and
|
|
104
|
+
business-context boundaries. SHAPE owns repository evidence and material technical
|
|
105
|
+
decisions. Optimize tokens without weakening user authority, privacy, or truthful
|
|
106
|
+
completion.
|
|
107
|
+
|
|
108
|
+
1. Parse invocation; persist leading `--benchmark` only for new runs. Read cheap entry
|
|
109
|
+
sources, approved Project Profile/domain conventions, and user-cited documents. Do
|
|
110
|
+
not inspect implementation generally.
|
|
111
|
+
2. In same initial model processing, return Product Baseline progress, domain deltas,
|
|
112
|
+
frontier scores, and at most one `ActiveDesignQuestion`. Explicit request content may
|
|
113
|
+
resolve several dimensions and yield zero questions. No second sufficiency call.
|
|
114
|
+
3. Product Baseline requires objective, affected users/value, scope/boundaries,
|
|
115
|
+
observable success/validator, and risks/determining constraints. Every dimension is
|
|
116
|
+
resolved or has justified `not_applicable`, provenance, freshness, and dependency ID.
|
|
117
|
+
Missing/unknown is incomplete.
|
|
118
|
+
4. Model terminology as contextual glossary deltas. Model rules separately with actors,
|
|
119
|
+
conditions, invariant/outcome, exceptions, and nominal/boundary/exception/
|
|
120
|
+
contradiction scenarios. Code/tests prove current behavior, never desired meaning.
|
|
121
|
+
5. Rank only eligible unblocked frontier. Runtime validates 0–5 impact, irreversibility,
|
|
122
|
+
risk, uncertainty, and branches-unlocked scores, then uses stable deterministic
|
|
123
|
+
tie-break. Persist exactly one question before display. Resume reuses it unless a
|
|
124
|
+
dependency changed.
|
|
125
|
+
6. Choice questions offer 2–3 non-dominated options, recommendation, basis, confidence,
|
|
126
|
+
consequences, and free-form path. Open elicitation is required when options would
|
|
127
|
+
invent business meaning. Silence, “choose for me”, deferral, or advance never resolves
|
|
128
|
+
material decision. One answer may atomically resolve several explicit nodes.
|
|
129
|
+
7. Material normalization requires targeted confirmation; editorial normalization does
|
|
130
|
+
not. Contradiction never closes silently. User may answer, reduce scope, or cancel.
|
|
131
|
+
No transcript, raw prompt/model output, credentials, arbitrary question cap, or
|
|
132
|
+
periodic checkpoint is persisted.
|
|
133
|
+
8. Validate all typed identities, ownership edges, bounds, redaction, acyclic graph, and
|
|
134
|
+
selective dependency closure. Use deterministic syntax repair, then one targeted
|
|
135
|
+
semantic retry; second invalid output blocks with `semantic_output_invalid`.
|
|
136
|
+
9. INTAKE completes only when semantic no-material-uncertainty declaration agrees with
|
|
137
|
+
deterministic proof: five dimensions closed, no question/contradiction/stale node,
|
|
138
|
+
and every durable domain delta has explicit disposition. Late product changes reopen
|
|
139
|
+
only affected INTAKE branch; technical uncertainty stays SHAPE.
|
|
140
|
+
|
|
141
|
+
After complete INTAKE, resolve routing and workspace. Risk/policy-required worktree must
|
|
142
|
+
be ready before any repository write.
|
|
143
|
+
|
|
144
|
+
At beginning of every run/resume, create exactly one routing snapshot through `codex
|
|
145
|
+
app-server`: complete `initialize`/`initialized`, then read `account/read`,
|
|
146
|
+
`account/rateLimits/read`, and `model/list`. Persist no credentials or raw protocol
|
|
147
|
+
payloads.
|
|
148
|
+
|
|
149
|
+
If parser returns `routing_permission_required`, request explicit user approval to rerun
|
|
150
|
+
same invocation outside restrictive sandbox. Retry the same invocation at most once.
|
|
151
|
+
Never escalate silently. Failed first attempt is not snapshot; persist only successful
|
|
152
|
+
retry. If approval is denied or the retry fails, block with structured diagnostic.
|
|
153
|
+
|
|
154
|
+
Use only `gpt-5.6-luna`, `gpt-5.6-terra`, `gpt-5.6-sol`; efforts `low`, `medium`, `high`,
|
|
155
|
+
`xhigh`. Recognize quota pressure only from exact five-hour window
|
|
156
|
+
`windowDurationMins === 300`, warning at 50%, critical at 80%.
|
|
157
|
+
|
|
158
|
+
If live five-hour window absent, reuse only non-expired cached reset timestamp. Never
|
|
159
|
+
reuse cached usage percentage. Keep pressure `unknown`, route conservatively, report
|
|
160
|
+
`quota_fallback_last_known`. Other windows stay informational. Normalize string and
|
|
161
|
+
object `supportedReasoningEfforts` entries.
|
|
162
|
+
|
|
163
|
+
Resolve five reasoning-stage routes once from immutable snapshot using policy
|
|
164
|
+
`2026-08-13.taskstate-v6.v1`: `design`, `discover`, `plan`, `debug`, `review`.
|
|
165
|
+
Unknown plan uses Plus baseline. Warning quota lowers one subscription tier; critical or
|
|
166
|
+
unknown quota uses Plus. High risk/ambiguity raises reasoning one level, capped `xhigh`.
|
|
167
|
+
|
|
168
|
+
Require exact assigned model/effort in initial catalog.
|
|
169
|
+
Never substitute a fallback model or effort. Missing assignment blocks that skill.
|
|
170
|
+
Do not refresh account, quota, or model data between skills. Native Codex owns BUILD
|
|
171
|
+
execution; parent owns ASSURE deterministic commands and evidence persistence.
|
|
172
|
+
|
|
173
|
+
## SHAPE
|
|
174
|
+
|
|
175
|
+
Every task uses adaptive SHAPE:
|
|
176
|
+
|
|
177
|
+
```text
|
|
178
|
+
Discovery -> Quick|Plan choice -> Planning
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Discovery alone reads repository. It consumes Product Baseline/domain registries plus current
|
|
182
|
+
Discovery Targets and resolves related targets in one session. Evidence carries exact
|
|
183
|
+
provenance, source-granular fingerprints, and explicit dependency nodes. Widen only for
|
|
184
|
+
uncertainty capable of changing scope, risk, acceptance, plan, validation, or profile
|
|
185
|
+
recommendation.
|
|
186
|
+
|
|
187
|
+
Material architecture, dependency, data/migration, security/privacy, compatibility,
|
|
188
|
+
concurrency/performance, operations, or profile-exception choices create one evidence-first
|
|
189
|
+
Technical Decision and enter `awaiting_shape_decision`. Product infeasibility creates a
|
|
190
|
+
linked INTAKE-owned question without copying payload. Answer selectively invalidates
|
|
191
|
+
dependency closure and resumes exact prior Discovery or Planning role. Reversible
|
|
192
|
+
repository-conforming implementation detail remains agent-owned. SHAPE has no reset-all
|
|
193
|
+
operation.
|
|
194
|
+
|
|
195
|
+
`discovery_sufficient` combines model semantic judgment with deterministic checks:
|
|
196
|
+
targets resolved, no active technical decision/block/stale evidence, fingerprints fresh,
|
|
197
|
+
dependency graph valid. No routine second model call.
|
|
198
|
+
|
|
199
|
+
After sufficiency, present compact evidence-backed Quick/Plan checkpoint. Quick is
|
|
200
|
+
recommended for localized linear work; Plan for material dependencies, migration,
|
|
201
|
+
sequencing, or coordination. Explicit plan request/policy lock may preselect Plan;
|
|
202
|
+
otherwise answer is mandatory and crash-resumable.
|
|
203
|
+
|
|
204
|
+
Planning never reads repository. Missing evidence returns one material Discovery Target.
|
|
205
|
+
Quick and Plan share canonical contract: scope/non-goals as applicable, stable criteria,
|
|
206
|
+
ordered tasks, criterion-linked validation, risks/controls, explicit dependencies, and
|
|
207
|
+
digest. Quick keeps compact state only. Plan creates one parent-rendered Proposed
|
|
208
|
+
Markdown; Implementation Guide requires evidence-linked material reason.
|
|
209
|
+
|
|
210
|
+
`contract_complete` combines semantic implementability with deterministic freshness,
|
|
211
|
+
coverage, dependency, profile, and digest checks. Nominal cost is one Discovery session
|
|
212
|
+
plus one Planning session. Additional calls require new material/invalidated target.
|
|
213
|
+
Soft-budget checkpoint preserves all work and asks continue, reduce scope, or cancel.
|
|
214
|
+
|
|
215
|
+
Parent alone writes ShapeState and Plan projection. Manual projection drift returns to
|
|
216
|
+
Planning for explicit integrate/regenerate reconciliation and invalidates Approval on
|
|
217
|
+
material change.
|
|
218
|
+
|
|
219
|
+
## GATE
|
|
220
|
+
|
|
221
|
+
Quick and Plan both enter one minimal GATE with canonical contract. Before display, run
|
|
222
|
+
pure deterministic preflight only: current SHAPE receipt, exact digest, contract
|
|
223
|
+
completeness/coverage, risk controls, fresh evidence, no open design question, and current
|
|
224
|
+
approval reuse. No model call, network, Discovery, or subprocess.
|
|
225
|
+
|
|
226
|
+
Render exactly five concise lines: objective; task/criterion/validation counts; risks and
|
|
227
|
+
controls; short digest; actions. Accept only explicit user intent:
|
|
228
|
+
|
|
229
|
+
- approve current plan -> persist compact Plan Approval Receipt, enter `executing`;
|
|
230
|
+
- change with non-empty instruction -> enter `planning`, invalidating old receipt;
|
|
231
|
+
- reject -> enter `cancelled`;
|
|
232
|
+
- view -> show contract without mutation and return to same card.
|
|
233
|
+
|
|
234
|
+
Silence, ambiguity, or non-interactive execution never approves. Preflight failure
|
|
235
|
+
returns to targeted Discovery, Planning, or INTAKE decision route and reports exact
|
|
236
|
+
reason. Bind approval to actor, time, task/artifact identity, state revision/fingerprint,
|
|
237
|
+
and complete canonical contract digest. Exact digest change invalidates it; time alone
|
|
238
|
+
does not. Approval never authorizes commit, push, PR, registry, release, or other
|
|
239
|
+
external action.
|
|
240
|
+
|
|
241
|
+
## BUILD
|
|
242
|
+
|
|
243
|
+
Announce `[DEV FLOW · GATE → BUILD]`. Before first write or resume, require current Plan
|
|
244
|
+
Approval Receipt and exact contract digest. Then let native Codex implement the complete
|
|
245
|
+
approved plan without BUILD-specific skill, orchestration, checkpoint, progress tracker,
|
|
246
|
+
validation requirement, or persisted output. Local technical corrections remain native.
|
|
247
|
+
Material scope, product behavior, approved architecture, or risk change stops writes and
|
|
248
|
+
returns to SHAPE then GATE. When implementation is complete, transition automatically and
|
|
249
|
+
announce `[DEV FLOW · BUILD → ASSURE]`.
|
|
250
|
+
|
|
251
|
+
## ASSURE
|
|
252
|
+
|
|
253
|
+
Enter sole internal status `assuring`. Reuse current BUILD evidence first, then execute
|
|
254
|
+
only missing/invalidated deterministic operations in assurance-contract DAG order.
|
|
255
|
+
Known-red prerequisites block dependants and model work. Check identity, success
|
|
256
|
+
predicate, scope, freshness, concurrency, and budgets come from approved canonical
|
|
257
|
+
contract; ASSURE invents none.
|
|
258
|
+
|
|
259
|
+
Run `review-change` only when precompiled policy predicate activates it. Use one bounded,
|
|
260
|
+
independent, read-only consolidated review. Corrections remain native ASSURE operations
|
|
261
|
+
and invalidate only overlapping declared evidence. Same stable issue after two failed
|
|
262
|
+
corrections invokes `debug-root-cause`; no arbitrary global cycle cap.
|
|
263
|
+
|
|
264
|
+
Batch required non-automatable user observations once. Missing response/external
|
|
265
|
+
dependency blocks with exact `resumeTo: assuring`; model never substitutes human proof.
|
|
266
|
+
Runtime computes exact coverage without final model synthesis. Atomic completion freezes
|
|
267
|
+
completion index, creates minimal Assurance Receipt, appends `assure.completed`, and
|
|
268
|
+
renders `[DEV FLOW · ASSURE ✓]` with derived `success`.
|
|
269
|
+
|
|
270
|
+
Commit, push, pull request, registry, release, and other delivery work is outside Dev
|
|
271
|
+
Flow lifecycle/state. Native Codex may perform it afterward under its own explicit
|
|
272
|
+
authorization. GATE approval grants no authority for those actions.
|
|
273
|
+
|
|
274
|
+
### Opt-in local benchmark
|
|
275
|
+
|
|
276
|
+
Benchmark is out-of-band and never changes lifecycle outcome.
|
|
277
|
+
|
|
278
|
+
- Offer only when persisted `benchmarkEnabled=true` and truthful outcome is `success`
|
|
279
|
+
or `failed`. Never offer for blocked or cancelled.
|
|
280
|
+
- Ask exactly three deterministic, no-model questions: satisfaction 1–5; conformance
|
|
281
|
+
yes/partial/no; plugin value useful/neutral/counterproductive. Optional comment follows.
|
|
282
|
+
- No response or incomplete three required answers means no record and total exclusion.
|
|
283
|
+
- Compute deviation facts deterministically against canonical Shape contract for both
|
|
284
|
+
profiles. New file is deviation only when forbidden or unplanned by that authority.
|
|
285
|
+
- Write complete allowlisted/redacted record atomically to
|
|
286
|
+
`.codex/benchmarks/<task-id>.json`. Never upload it. Write failure is non-fatal.
|
|
287
|
+
- `npx @acrasie/dev-flow benchmark summary` aggregates complete local records without model
|
|
288
|
+
calls.
|
|
289
|
+
|
|
290
|
+
## Resume, evidence, and artifacts
|
|
291
|
+
|
|
292
|
+
Target local state lives under `.codex/tasks/`; versioned artifact belongs to active
|
|
293
|
+
worktree and follows repository retention policy. Reuse existing artifact
|
|
294
|
+
identity; never duplicate task artifact. Legacy paths such as
|
|
295
|
+
`docs/dev-flow/YYYY-MM-DD-<slug>.md`, `spec.md`, `plan.md`,
|
|
296
|
+
`risk-and-rollback.md`, and `verification.md` are repository choices only.
|
|
297
|
+
|
|
298
|
+
Resume must validate strict V6 state, reconcile config/policy/routing/artifact/Git/evidence,
|
|
299
|
+
selectively invalidate stale projections, then continue first unproved action. Never claim success without fresh evidence. Record commands, results, skipped checks,
|
|
300
|
+
material deviations, issue identities, and unresolved work. Detailed contract/evidence
|
|
301
|
+
has one owner; compact state stores references. Definitions:
|
|
302
|
+
[glossary](../../docs/glossary/dev-flow.md). Decisions:
|
|
303
|
+
[Context Capsule](../../docs/adr/0002-share-an-invalidable-context-capsule.md),
|
|
304
|
+
[assurance](../../docs/adr/0004-scale-assurance-lanes-by-applicable-risk.md),
|
|
305
|
+
[minimal GATE](../../docs/adr/0024-make-gate-a-minimal-plan-approval.md), and
|
|
306
|
+
[ASSURE success boundary](../../docs/adr/0031-make-assure-the-success-boundary.md).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: discover-change
|
|
3
|
+
description: Use when dev-flow needs read-only repository discovery before planning a non-trivial change.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Operate only as SHAPE Discovery and remain read-only. Consume compact Product Baseline,
|
|
7
|
+
task-local domain records, risk, routing/workspace identity, current Discovery
|
|
8
|
+
Targets, fresh reusable evidence, source fingerprints, and dependency graph. Never
|
|
9
|
+
consume interview transcript or preparation profile: profile is chosen only after
|
|
10
|
+
Discovery is sufficient.
|
|
11
|
+
|
|
12
|
+
Inspect only repository guidance, manifests, CI, tests, conventions, dependencies,
|
|
13
|
+
architecture, commands, and current behavior capable of changing scope, risk,
|
|
14
|
+
acceptance, plan, validation, or profile recommendation. Batch related targets in one
|
|
15
|
+
reasoning session. Every result is bounded structured evidence with exact provenance,
|
|
16
|
+
source fingerprints, and dependency node. New target requires explicit material
|
|
17
|
+
widening reason.
|
|
18
|
+
|
|
19
|
+
For material architecture, dependency, data/migration, security/privacy, compatibility,
|
|
20
|
+
concurrency/performance, or profile-exception choices, return one Technical Decision:
|
|
21
|
+
stable ID, fresh evidence, materiality, viable/excluded options, recommendation,
|
|
22
|
+
confidence, consequences, affected dependency roots, and prior SHAPE role. Product
|
|
23
|
+
infeasibility returns a linked INTAKE-owned design question; payload is never copied.
|
|
24
|
+
|
|
25
|
+
Return semantic sufficiency plus resolved/escalated/blocked targets, evidence,
|
|
26
|
+
fingerprints, graph additions, compact Quick/Plan recommendation facts, and usage
|
|
27
|
+
counters. Mark missing/stale context; never treat it as proof. Stop at sufficient
|
|
28
|
+
executable understanding, material block, escalation, or budget checkpoint. Do not
|
|
29
|
+
modify files; parent owns ShapeState and projection writes.
|
|
30
|
+
|
|
31
|
+
Authority: [SHAPE phase contract](../../docs/lifecycle-contract.md#shape).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-change
|
|
3
|
+
description: Use when dev-flow needs an approved, independently verifiable implementation plan.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Operate only as SHAPE Planning and remain read-only. Consume selected Quick/Plan profile,
|
|
7
|
+
risk/policy requirements, current artifact identity, trusted Discovery receipt, fresh
|
|
8
|
+
structured evidence, and dependency graph. Never inspect repository files or silently
|
|
9
|
+
invent evidence. Missing material evidence becomes one new Discovery Target.
|
|
10
|
+
|
|
11
|
+
Produce one canonical contract schema for both profiles: Intake/Discovery references,
|
|
12
|
+
scope, applicable non-goals, stable acceptance criteria, ordered tasks, dependencies,
|
|
13
|
+
criterion-linked validation, risks/controls, and digest inputs. Map every task to at
|
|
14
|
+
least one criterion; map every criterion to task coverage and validation.
|
|
15
|
+
|
|
16
|
+
Quick returns smallest executable internal contract and no Markdown. Plan returns
|
|
17
|
+
detailed contract for one parent-rendered Markdown projection. Include Implementation
|
|
18
|
+
Guide only with evidence-linked reason: architecture boundary, compatibility/migration,
|
|
19
|
+
non-obvious ordering, security/concurrency/performance invariant, mandatory repository
|
|
20
|
+
pattern, or complex rollback/deployment.
|
|
21
|
+
|
|
22
|
+
Return semantic implementability, canonicalizable content, graph additions, and usage
|
|
23
|
+
counters. Do not embed complete implementations, decorative prose, or brittle line
|
|
24
|
+
references unless indispensable. Parent alone writes state/projection. Material
|
|
25
|
+
uncertainty returns to Discovery; material contract change invalidates affected
|
|
26
|
+
Approval.
|
|
27
|
+
|
|
28
|
+
Authority: [SHAPE phase contract](../../docs/lifecycle-contract.md#shape) and
|
|
29
|
+
[GATE approval decision](../../docs/adr/0024-make-gate-a-minimal-plan-approval.md).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-change
|
|
3
|
+
description: Use when dev-flow reviews an approved change for actionable regressions, security, tests, and maintainability.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Operate only as one policy-triggered ASSURE operation and remain read-only. Consume a
|
|
7
|
+
fresh bounded Diff Capsule containing only triggered subjects, related hunks/symbols,
|
|
8
|
+
direct dependencies, and summarized green prerequisite evidence. Never consume full
|
|
9
|
+
conversation history or a known-red deterministic input.
|
|
10
|
+
|
|
11
|
+
Return bounded structured output only: verdict per subject and actionable findings with
|
|
12
|
+
stable `issue_id`, policy severity, symbolic location, evidence, required correction,
|
|
13
|
+
and confidence. Do not restate plan or diff. Policy—not reviewer preference—classifies
|
|
14
|
+
blocking acceptance, correctness, regression, security, and applicable-risk findings.
|
|
15
|
+
Style without approved requirement is non-blocking. Reviewer never writes; parent owns
|
|
16
|
+
correction and scoped invalidation. Use one consolidated call. Separate specialist pass
|
|
17
|
+
or one escalation requires explicit snapshotted policy and remains within call/token
|
|
18
|
+
ceilings. No arbitrary review-cycle cap.
|
|
19
|
+
|
|
20
|
+
Authority: [ASSURE phase contract](../../docs/lifecycle-contract.md#assure) and
|
|
21
|
+
[ASSURE success-boundary decision](../../docs/adr/0031-make-assure-the-success-boundary.md).
|