@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.
Files changed (58) hide show
  1. package/.codex-plugin/plugin.json +20 -0
  2. package/LICENSE +21 -0
  3. package/README.md +181 -2
  4. package/dist/codex-dev-flow.mjs +3 -0
  5. package/dist/dev-flow.mjs +241 -0
  6. package/docs/adr/0001-hybrid-portable-workflow.md +23 -0
  7. package/docs/adr/0002-share-an-invalidable-context-capsule.md +55 -0
  8. package/docs/adr/0004-scale-assurance-lanes-by-applicable-risk.md +36 -0
  9. package/docs/adr/0006-make-intake-adaptive-user-authoritative-and-token-efficient.md +76 -0
  10. package/docs/adr/0007-collect-opt-in-local-benchmark-feedback.md +82 -0
  11. package/docs/adr/0008-automate-maintainer-releases-with-an-interactive-bun-workflow.md +121 -0
  12. package/docs/adr/0009-separate-intake-decisions-from-shape-discovery.md +200 -0
  13. package/docs/adr/0010-choose-quick-or-plan-after-discovery.md +161 -0
  14. package/docs/adr/0011-separate-fast-local-and-authoritative-ci-quality-gates.md +49 -0
  15. package/docs/adr/0012-use-bun-test-and-require-node-24.md +41 -0
  16. package/docs/adr/0013-layer-source-distribution-and-runtime-tests.md +42 -0
  17. package/docs/adr/0014-ratchet-source-coverage-with-bun.md +51 -0
  18. package/docs/adr/0015-split-fast-and-type-aware-linting.md +41 -0
  19. package/docs/adr/0016-use-husky-with-a-tested-bun-staged-file-adapter.md +45 -0
  20. package/docs/adr/0017-format-conservatively-with-oxfmt.md +45 -0
  21. package/docs/adr/0018-use-a-high-signal-oxlint-policy.md +53 -0
  22. package/docs/adr/0019-gate-deterministic-size-and-observe-timing.md +44 -0
  23. package/docs/adr/0020-support-linux-and-macos-with-targeted-ci.md +41 -0
  24. package/docs/adr/0021-randomize-tests-without-retries.md +35 -0
  25. package/docs/adr/0022-use-one-root-bun-workspace.md +41 -0
  26. package/docs/adr/0024-make-gate-a-minimal-plan-approval.md +74 -0
  27. package/docs/adr/0025-end-the-lifecycle-after-assure.md +55 -0
  28. package/docs/adr/0026-keep-intake-product-stable-and-interview-shape-by-dependency.md +151 -0
  29. package/docs/adr/0027-add-agentic-project-init-and-versioned-engineering-profiles.md +147 -0
  30. package/docs/adr/0028-make-public-documentation-user-first-and-current.md +65 -0
  31. package/docs/adr/0029-make-build-a-native-execution-boundary.md +51 -0
  32. package/docs/adr/0030-unify-product-domain-and-technical-design-interviews.md +240 -0
  33. package/docs/adr/0031-make-assure-the-success-boundary.md +205 -0
  34. package/docs/artifacts.md +47 -0
  35. package/docs/baselines/2026-07-18-p0-lifecycle.json +142 -0
  36. package/docs/design.md +101 -0
  37. package/docs/getting-started.md +204 -0
  38. package/docs/glossary/dev-flow.md +527 -0
  39. package/docs/lifecycle-contract.md +189 -0
  40. package/docs/lifecycle-contract.projection.json +931 -0
  41. package/docs/metrics-protocol.md +113 -0
  42. package/docs/project-profile-contract.md +157 -0
  43. package/docs/runbooks/maintainer-release.md +291 -0
  44. package/docs/target-intake-shape-contract.md +416 -0
  45. package/package.json +68 -4
  46. package/schemas/config.schema.json +104 -0
  47. package/schemas/policy.schema.json +17 -0
  48. package/schemas/project-init-state.schema.json +159 -0
  49. package/schemas/project-profile-local.schema.json +53 -0
  50. package/schemas/project-profile.schema.json +285 -0
  51. package/schemas/state.schema.json +826 -0
  52. package/skills/debug-root-cause/SKILL.md +16 -0
  53. package/skills/design-decisions/SKILL.md +24 -0
  54. package/skills/dev-flow/SKILL.md +306 -0
  55. package/skills/dev-flow/agents/openai.yaml +6 -0
  56. package/skills/discover-change/SKILL.md +31 -0
  57. package/skills/plan-change/SKILL.md +29 -0
  58. package/skills/review-change/SKILL.md +21 -0
@@ -0,0 +1,416 @@
1
+ # Target INTAKE and SHAPE Contract
2
+
3
+ ## Contract status
4
+
5
+ This document specifies implemented V6 behavior from
6
+ [ADR 0030](adr/0030-unify-product-domain-and-technical-design-interviews.md). It is
7
+ normative together with [lifecycle contract](lifecycle-contract.md).
8
+
9
+ V6 replaces published TaskState V5. V5 and earlier state is
10
+ not migrated and must fail with a clear diagnostic.
11
+
12
+ ## Purpose and ownership
13
+
14
+ The target establishes one dependency-directed design interview across product, domain,
15
+ and technical uncertainty without erasing phase authority:
16
+
17
+ | Owner | Owns |
18
+ | --------------- | -------------------------------------------------------------------------------------------------------------------- |
19
+ | INTAKE | Product Baseline, task-relevant terminology, business rules, scenarios, and business-context boundaries. |
20
+ | SHAPE Discovery | Repository and service facts, evidence, source fingerprints, profile applicability, and candidate technical choices. |
21
+ | SHAPE Planning | Canonical Change Contract derived only from structured current evidence and resolved decisions. |
22
+ | GATE | One final approval of exact contract digest, including durable domain dispositions. |
23
+ | BUILD | Native implementation plus approved targeted documentation projections. |
24
+ | ASSURE | Criterion-linked assurance and conditional review, including documentation fidelity. |
25
+
26
+ Facts are discovered. Material choices are explicit. Reversible repository-conforming
27
+ implementation details remain agent-owned.
28
+
29
+ ## Target lifecycle
30
+
31
+ ```text
32
+ INTAKE: Product Baseline <-> product/domain design questions
33
+ |
34
+ v
35
+ SHAPE: Discovery <-> technical design questions -> Quick|Plan -> Planning
36
+ | |
37
+ +-- product/domain contradiction -> INTAKE ----------+
38
+ |
39
+ v
40
+ GATE -> BUILD -> ASSURE ✓
41
+ ```
42
+
43
+ Question ownership produces these resumable states:
44
+
45
+ ```text
46
+ intaking <-> product|terminology|domain_rule question
47
+ discovering|planning -> awaiting_shape_decision -> discovering|planning
48
+ discovering|planning -> awaiting_intake_decision -> discovering|planning
49
+ discovering -> awaiting_profile_choice -> planning
50
+ planning -> awaiting_approval
51
+ ```
52
+
53
+ Exactly one `ActiveDesignQuestion` exists across entire task.
54
+
55
+ ## Canonical task records
56
+
57
+ ### ProductBaseline
58
+
59
+ `ProductBaseline` is canonical INTAKE record. It contains five dimensions:
60
+
61
+ 1. objective;
62
+ 2. affected users and product value;
63
+ 3. scope and boundaries;
64
+ 4. observable success and validator;
65
+ 5. product risks and determining constraints.
66
+
67
+ Each dimension contains stable ID, status, value or justified `not_applicable`,
68
+ provenance, and dependency node. Missing or unknown dimensions remain open. Baseline
69
+ also references contradictions, task-relevant domain records, and technical unknowns
70
+ owned by SHAPE.
71
+
72
+ ### DesignState
73
+
74
+ Task-level `design` state owns transversal orchestration:
75
+
76
+ ```text
77
+ DesignState
78
+ ├── activeQuestion?
79
+ ├── dependencyGraph
80
+ ├── glossaryDeltas[]
81
+ ├── domainRules[]
82
+ ├── decisionCandidates[]
83
+ ├── invalidations[]
84
+ └── semanticRetryCount
85
+ ```
86
+
87
+ The graph owns only typed IDs and `dependsOn` edges. Payload authority stays in
88
+ `ProductBaseline`, design registries, SHAPE evidence/decisions, and Change Contract.
89
+
90
+ ### DomainGlossaryDelta
91
+
92
+ Required fields:
93
+
94
+ - stable ID, canonical term, concise business definition, and domain context;
95
+ - accepted aliases and rejected/deprecated terms with reasons;
96
+ - related term IDs;
97
+ - optional examples and non-examples when needed for disambiguation;
98
+ - provenance, dependencies, lifecycle status, and durable disposition;
99
+ - proposed projection destination when disposition is `project`.
100
+
101
+ Implementation details are invalid glossary content.
102
+
103
+ ### DomainRule and DomainScenario
104
+
105
+ `DomainRule` contains stable ID, context, linked terms, actors, application conditions,
106
+ outcome/invariant, exceptions/limits, evidence/provenance, dependencies, lifecycle
107
+ status, durable disposition, and child scenario IDs. A non-applicable field requires a
108
+ reason rather than silent omission.
109
+
110
+ `DomainScenario` contains stable ID, initial situation, event/action, expected or
111
+ forbidden result, angle (`nominal|boundary|exception|contradiction`), provenance, and
112
+ evidence references. It may become acceptance or validation evidence but is not
113
+ automatically an executable test.
114
+
115
+ ### DecisionCandidate
116
+
117
+ A candidate for durable decision documentation contains stable ID, title, scope/context,
118
+ problem, forces in tension, viable and excluded alternatives, evidence, recommendation,
119
+ confidence, explicit user selection, consequences, dependencies, lifecycle status,
120
+ destination, and ADR qualification:
121
+
122
+ - durable beyond current task;
123
+ - materially costly to reverse;
124
+ - real trade-off among viable alternatives;
125
+ - surprising without recorded rationale.
126
+
127
+ All four gates are required for ADR projection.
128
+
129
+ ### TechnicalDecision
130
+
131
+ SHAPE technical choice contains stable ID, question, materiality reason, prerequisite
132
+ and dependent IDs, fresh evidence, viable and excluded options, recommendation,
133
+ confidence, consequences, explicit selection, status, and prior SHAPE role. No separate
134
+ escalation record exists.
135
+
136
+ ### ActiveDesignQuestion
137
+
138
+ Common envelope contains:
139
+
140
+ - stable question and decision IDs;
141
+ - variant `product|terminology|domain_rule|technical`;
142
+ - owner `intake|shape` and exact prior role;
143
+ - prerequisite and affected dependency roots;
144
+ - prompt, parent context, direct consequences, and priority explanation;
145
+ - mode `choice|elicitation`;
146
+ - for `choice`, two or three non-dominated options, recommendation, reason, confidence;
147
+ - free-form capability and bounded clarification count.
148
+
149
+ Question is persisted before display. UI is an adapter: native interactive choice when
150
+ appropriate, text fallback with equivalent meaning, and targeted text for open
151
+ elicitation.
152
+
153
+ ## INTAKE contract
154
+
155
+ ### Discovery boundary
156
+
157
+ INTAKE may read only task-relevant guidance, effective policy/configuration, approved
158
+ Project Engineering Profile, domain documents, ADRs, relevant contracts, primary
159
+ manifests, and workspace identity. It does not scan implementation to avoid a question.
160
+ Current code behavior needed to validate a term or rule becomes one typed SHAPE unknown.
161
+
162
+ ### Material domain triggers
163
+
164
+ Domain modeling activates only when an answer can change observable behavior, actor,
165
+ permission, responsibility, invariant, exception, domain-context boundary, data meaning,
166
+ success, scope, risk, or compatibility. Editorial wording, obvious aliases, and
167
+ reversible details remain model-owned. Every semantic classification carries a bounded
168
+ `materialityReason`.
169
+
170
+ An ambiguous term required to understand a baseline dimension becomes an elicitation
171
+ prerequisite for that dimension. No inverse dependency is permitted. INTAKE is complete
172
+ for current task only; it never attempts to model whole project.
173
+
174
+ ### Domain stress testing
175
+
176
+ A material rule is tested adaptively through:
177
+
178
+ 1. positive expected behavior;
179
+ 2. a material boundary, exception, or counter-example;
180
+ 3. confrontation with current applicable documentation and available technical evidence.
181
+
182
+ The model chooses useful scenarios rather than imposing fixed prompts. A trivial
183
+ explicit rule may close from one decisive source. Any contradiction remains open.
184
+ Existing approved domain docs describe desired baseline; code/tests describe current
185
+ behavior. User can explicitly revise baseline, producing deltas and dependent technical
186
+ work.
187
+
188
+ ### Question and answer rules
189
+
190
+ Use a `choice` question when viable interpretations/options exist. Use targeted
191
+ `elicitation` only when offering options would invent business meaning. Material
192
+ normalization of free-form input requires exact targeted confirmation; faithful
193
+ editorial normalization does not.
194
+
195
+ One response may explicitly resolve multiple nodes. Model returns exact normalized
196
+ records; runtime validates whole transaction, authority, prerequisites, and
197
+ contradictions before applying it atomically. No partial success is persisted.
198
+
199
+ Silence, deferral, “choose for me”, or advance request cannot resolve material choice.
200
+ Available exits are answer, scope reduction that removes branch, or cancellation.
201
+
202
+ ### INTAKE completion
203
+
204
+ `intake_complete` requires:
205
+
206
+ - five baseline dimensions resolved or justifiably not applicable;
207
+ - every task-material terminology/rule/context node resolved;
208
+ - no active INTAKE question or contradiction;
209
+ - valid graph and fresh documentary evidence;
210
+ - typed ownership for all remaining technical unknowns;
211
+ - semantic declaration that product/domain uncertainty is sufficient for SHAPE.
212
+
213
+ No question cap or periodic progress gate exists. Runtime shows global synthesis only
214
+ on request, at a real context/quota boundary, for material reinterpretation, or at SHAPE
215
+ exit.
216
+
217
+ ## SHAPE contract
218
+
219
+ ### Discovery before choice
220
+
221
+ Discovery inspects repository guidance, profiles, manifests/locks, configuration,
222
+ contracts, tests, representative code, configured service roots, safe commands, and
223
+ official primary documentation when local version-sensitive facts are insufficient.
224
+ Every evidence record carries source, fingerprint/version, observation time, freshness
225
+ rule, and dependency node. Unverifiable user information remains `user_asserted`.
226
+
227
+ Discovery and technical interview interleave. Explore only enough of a branch to decide
228
+ viability and materiality. Product writes, installs, migrations, and external effects
229
+ remain forbidden before GATE; isolated reversible task-space experiments are allowed.
230
+
231
+ ### Technical materiality
232
+
233
+ Explicit user choice is required when alternatives materially affect architecture,
234
+ major framework/runtime/dependency, schema/migration, cross-service contract,
235
+ security/privacy, compatibility, concurrency, performance, cost, operations, rollback,
236
+ or approved profile convention. Another category requires persisted material impact
237
+ reason. Agent owns compatible reversible detail.
238
+
239
+ More than three options are reduced to two or three viable non-dominated choices.
240
+ Excluded alternatives remain recorded and available on request. Low-confidence
241
+ recommendation names irreducible trade-off.
242
+
243
+ Evidence showing selected technical option incompatible while another compatible
244
+ option exists invalidates technical branch. Evidence proving product infeasibility or
245
+ materially different product outcome creates one linked INTAKE question. Product payload
246
+ is not duplicated in `TechnicalDecision`.
247
+
248
+ ### Frontier selection
249
+
250
+ Frontier contains unresolved required nodes whose prerequisites are current and
251
+ resolved. Model scores each candidate using:
252
+
253
+ - whether it blocks objective or success;
254
+ - authority;
255
+ - number and importance of branches unlocked;
256
+ - impact and irreversibility;
257
+ - risk;
258
+ - remaining uncertainty.
259
+
260
+ Runtime validates eligibility and bounded scoring, then uses stable ID tie-breaking.
261
+ Selected question and reason persist. Only answer, material invalidation, or new evidence
262
+ recomputes frontier through model. Full graph is hidden by default and shown on request
263
+ or when materially useful.
264
+
265
+ ### Planning and profile choice
266
+
267
+ Quick/Plan choice occurs after main material technical decisions. Small local domain
268
+ deltas do not force Plan. Multiple contexts, ADR projection, migration, broad dependency
269
+ fan-out, or complex projection support Plan recommendation.
270
+
271
+ Planning reads structured state only. Missing facts return one Discovery Target; new
272
+ material choices return one Technical Decision. Each material Domain Rule maps to at
273
+ least one acceptance criterion or explicit durable disposition. Observable scenarios
274
+ become validation candidates classified as automated, manual, or documentary with
275
+ reason.
276
+
277
+ ### SHAPE completion
278
+
279
+ Completion requires model declaration of no material uncertainty plus deterministic
280
+ proof:
281
+
282
+ - graph valid and acyclic;
283
+ - no open/invalidated required branch or active question;
284
+ - no active contradiction, stale evidence, or stale profile dependency;
285
+ - criteria cover Product Baseline success and material Domain Rules;
286
+ - tasks and validations cover criteria;
287
+ - applicable risks, compatibility, migration, operations, and rollback resolved;
288
+ - every durable domain delta has disposition and proof/reason;
289
+ - contract digest includes domain records and projection work.
290
+
291
+ SHAPE renders one compact synthesis then existing GATE card in same interaction. It asks
292
+ no duplicate final approval.
293
+
294
+ ## Domain record lifecycle and projection
295
+
296
+ ```text
297
+ proposed -> resolved -> approved -> projected
298
+ \-> invalidated
299
+ ```
300
+
301
+ Before GATE, domain records exist only in task state. Durable disposition is one of:
302
+
303
+ - `project`: contract contains targeted documentation task and validation;
304
+ - `already_documented`: fresh source fingerprint proves durable coverage;
305
+ - `task_local`: reason proves no durable knowledge should survive task;
306
+ - `policy_forbidden`: higher authority forbids projection.
307
+
308
+ GATE approval changes digest-bound records from `resolved` to `approved`. BUILD patches
309
+ only owned semantic entries/sections and preserves unrelated human content. Ambiguous
310
+ merge returns to owning decision rather than overwriting or appending duplicates.
311
+
312
+ ASSURE verifies path policy, changed file, fingerprint, expected IDs/links, semantic
313
+ fidelity, and content-specific rules: glossary has no implementation details; rules
314
+ retain conditions, results, and limits; ADR retains alternatives and consequences.
315
+ Assurance Receipt binds projection evidence to contract digest. Repository docs
316
+ become durable authority only after successful projection.
317
+
318
+ Destination resolver order:
319
+
320
+ 1. explicit policy/configuration;
321
+ 2. approved Project Engineering Profile;
322
+ 3. detected repository convention;
323
+ 4. portable defaults.
324
+
325
+ Portable defaults:
326
+
327
+ ```text
328
+ docs/domain/glossary.md
329
+ docs/domain/rules.md
330
+ docs/adr/
331
+ ```
332
+
333
+ Multiple contexts add `docs/domain/context-map.md` and
334
+ `docs/domain/<context>/{glossary,rules}.md`. Existing `CONTEXT.md`, context-map, glossary,
335
+ or ADR conventions remain respected when detected. Missing setup triggers one
336
+ non-blocking `$dev-flow init` recommendation; policy or irreducibly conflicting
337
+ destinations may block.
338
+
339
+ ## Project INIT integration
340
+
341
+ Shared Project Engineering Profile gains optional `domain_documentation` facet:
342
+
343
+ - mono/multi-context mode and logical context identities;
344
+ - glossary, rule, context-map, and ADR paths/formats;
345
+ - identity/link conventions and projection language;
346
+ - provenance and source fingerprints.
347
+
348
+ Facet activates when evidence shows domain docs/contexts or user requests capability.
349
+ INIT discovers first and asks only contradictory or durable missing choices. Standalone
350
+ `npx @acrasie/dev-flow init` remains plugin configuration wizard and does not replace
351
+ agentic `$dev-flow init`.
352
+
353
+ ## Privacy, language, and visuals
354
+
355
+ Routing adds stage `design`. Resolve it once from same immutable account/quota/model
356
+ snapshot as other routes. Fused INTAKE/domain and SHAPE technical-choice evaluations use
357
+ this route; repository fact-finding retains `discover`. Risk, ambiguity, and graph depth
358
+ raise effort within allowed bounds. Route, effort, and usage counters may persist;
359
+ decision content may not enter routing telemetry.
360
+
361
+ Persist normalized records, compact source refs, exact active question, and
362
+ invalidations. Do not persist transcript, hidden reasoning, prompt, raw answer after
363
+ normalization, large code/diff excerpts, credentials, or external payloads. Apply string
364
+ bounds, secret/PII redaction, and allowlisted provenance.
365
+
366
+ Stable IDs/enums remain English. Questions preserve dominant user language. Repository
367
+ projections preserve detected language; a new repository gets language choice through
368
+ setup. One answer never silently changes project documentation language.
369
+
370
+ Use cheapest useful visual: ASCII, Mermaid, isolated HTML/CSS, then Excalidraw/generated
371
+ image. Temporary prototypes never enter product source before GATE.
372
+
373
+ ## Failure and resume
374
+
375
+ Invalid model output receives deterministic syntax repair only when meaning is intact,
376
+ otherwise one targeted semantic retry. Second failure creates typed block and preserves
377
+ prior state atomically.
378
+
379
+ Resume validates schema, active-question/status/owner combination, graph, source
380
+ fingerprints, profile, projection, config/policy, routing, and workspace. Fresh state
381
+ reuses exact question without reasoning. Changed dependency selectively invalidates
382
+ closure and returns to its owner.
383
+
384
+ ## Implementation and acceptance
385
+
386
+ Public activation must update together:
387
+
388
+ - TaskState V6 types, schema, validator, state machine, guards, events, and projections;
389
+ - Product Baseline and design/technical/domain registries;
390
+ - graph kinds, frontier ranking, invalidation, persistence, and resume;
391
+ - `design-decisions`, `dev-flow`, `discover-change`, and `plan-change` skills;
392
+ - Project Engineering Profile schema/runtime for `domain_documentation`;
393
+ - lifecycle contract, glossary, public docs, metrics allowlist, and package artifacts;
394
+ - deterministic tests, fixtures, model evals, integration tests, and runtime smoke tests.
395
+
396
+ Acceptance requires:
397
+
398
+ - explicit input satisfies baseline dimensions without redundant questions;
399
+ - facts available from environment are discovered rather than asked;
400
+ - ambiguous task-critical language becomes prerequisite instead of assumed meaning;
401
+ - material domain and technical decisions have exactly one explicit resolution path;
402
+ - one active question and exact resume are enforced across task;
403
+ - frontier follows dependencies and selective invalidation;
404
+ - domain rules are stress-tested adaptively and trace to criteria/dispositions;
405
+ - no durable resolved delta disappears before GATE;
406
+ - docs are written only after approval and verified semantically;
407
+ - setup is recommended but non-blocking when safe defaults exist;
408
+ - no compatibility machinery remains for obsolete local state;
409
+ - current runtime remains unchanged until entire target increment lands.
410
+
411
+ ## Decision records
412
+
413
+ - [ADR 0030](adr/0030-unify-product-domain-and-technical-design-interviews.md)
414
+ - [ADR 0029](adr/0029-make-build-a-native-execution-boundary.md)
415
+ - [ADR 0027](adr/0027-add-agentic-project-init-and-versioned-engineering-profiles.md)
416
+ - [ADR 0026 — superseded](adr/0026-keep-intake-product-stable-and-interview-shape-by-dependency.md)
package/package.json CHANGED
@@ -1,6 +1,70 @@
1
1
  {
2
2
  "name": "@acrasie/dev-flow",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.1",
4
+ "description": "Portable Codex development workflow plugin.",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/Acrazie/codex-dev-flow#readme",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Acrazie/codex-dev-flow.git",
10
+ "directory": "plugins/codex-dev-flow"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/Acrazie/codex-dev-flow/issues"
14
+ },
15
+ "keywords": [
16
+ "codex",
17
+ "workflow",
18
+ "cli",
19
+ "plugin",
20
+ "development"
21
+ ],
22
+ "type": "module",
23
+ "packageManager": "bun@1.4.2",
24
+ "bin": {
25
+ "dev-flow": "dist/dev-flow.mjs",
26
+ "codex-dev-flow": "dist/codex-dev-flow.mjs"
27
+ },
28
+ "files": [
29
+ ".codex-plugin/",
30
+ "dist/",
31
+ "docs/",
32
+ "schemas/",
33
+ "skills/",
34
+ "LICENSE",
35
+ "README.md"
36
+ ],
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "engines": {
41
+ "node": ">=24.0.0"
42
+ },
43
+ "scripts": {
44
+ "build": "node scripts/build.mjs",
45
+ "baseline:p0": "bun run build && node scripts/generate-p0-baseline.mjs",
46
+ "check:size": "bun scripts/check-size-budget.ts",
47
+ "pack:runtime": "bun scripts/package-artifact.ts ../../.artifacts/dev-flow.tgz",
48
+ "release": "bun scripts/release.ts",
49
+ "release:test": "bun test test/integration/release.test.ts",
50
+ "typecheck": "tsc --noEmit",
51
+ "test": "bun test test/unit test/integration",
52
+ "test:unit": "bun test test/unit",
53
+ "test:integration": "bun test test/integration",
54
+ "test:runtime": "node --test test/runtime/runtime-smoke.test.mjs",
55
+ "test:coverage": "bun test --coverage test/unit test/integration",
56
+ "test:randomization": "bun scripts/verify-test-randomization.ts",
57
+ "check": "bun run typecheck && bun run build && bun run test:randomization && bun run test:coverage && bun run check:size",
58
+ "prepack": "bun run build",
59
+ "prepublishOnly": "bun run check"
60
+ },
61
+ "devDependencies": {
62
+ "@clack/prompts": "1.0.0",
63
+ "@types/bun": "1.3.14",
64
+ "@types/node": "24.13.3",
65
+ "ajv": "8.20.0",
66
+ "esbuild": "0.28.1",
67
+ "typescript": "7.0.2",
68
+ "yaml": "2.9.0"
69
+ }
70
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Dev Flow configuration",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["schemaVersion"],
7
+ "properties": {
8
+ "schemaVersion": {
9
+ "type": "integer",
10
+ "const": 1
11
+ },
12
+ "worktree": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "properties": {
16
+ "mode": {
17
+ "type": "string",
18
+ "enum": ["auto", "required"]
19
+ }
20
+ }
21
+ },
22
+ "merge": {
23
+ "type": "string",
24
+ "const": "never"
25
+ },
26
+ "integrations": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "plugins": {
31
+ "type": "array",
32
+ "uniqueItems": true,
33
+ "items": { "$ref": "#/$defs/integrationId" }
34
+ },
35
+ "skills": {
36
+ "type": "array",
37
+ "uniqueItems": true,
38
+ "items": { "$ref": "#/$defs/integrationId" }
39
+ }
40
+ }
41
+ },
42
+ "subscription": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "properties": {
46
+ "plan": {
47
+ "type": "string",
48
+ "enum": ["auto", "plus", "pro_5x", "pro_20x"]
49
+ },
50
+ "planOverride": {
51
+ "type": "string",
52
+ "enum": ["plus", "pro_5x", "pro_20x"]
53
+ },
54
+ "multiplierOverride": {
55
+ "type": "number",
56
+ "exclusiveMinimum": 0
57
+ },
58
+ "quota": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "properties": {
62
+ "warningPercent": { "type": "number", "minimum": 0, "maximum": 100 },
63
+ "criticalPercent": { "type": "number", "minimum": 0, "maximum": 100 },
64
+ "unknownPolicy": { "type": "string", "const": "conservative" }
65
+ }
66
+ },
67
+ "modelAllowlist": {
68
+ "type": "array",
69
+ "uniqueItems": true,
70
+ "items": {
71
+ "type": "string",
72
+ "enum": ["gpt-5.6-luna", "gpt-5.6-terra", "gpt-5.6-sol"]
73
+ }
74
+ },
75
+ "modelCosts": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "properties": {
79
+ "gpt-5.6-luna": { "$ref": "#/$defs/modelCost" },
80
+ "gpt-5.6-terra": { "$ref": "#/$defs/modelCost" },
81
+ "gpt-5.6-sol": { "$ref": "#/$defs/modelCost" }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ },
87
+ "$defs": {
88
+ "integrationId": {
89
+ "type": "string",
90
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]*(?::[A-Za-z0-9][A-Za-z0-9._/-]*)?$"
91
+ },
92
+ "modelCost": {
93
+ "type": "object",
94
+ "additionalProperties": false,
95
+ "properties": {
96
+ "multiplier": { "type": "number", "exclusiveMinimum": 0 },
97
+ "rateVersion": { "type": "string", "minLength": 1 },
98
+ "inputCreditsPerMillion": { "type": "number", "minimum": 0 },
99
+ "cachedInputCreditsPerMillion": { "type": "number", "minimum": 0 },
100
+ "outputCreditsPerMillion": { "type": "number", "minimum": 0 }
101
+ }
102
+ }
103
+ }
104
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Dev Flow policy",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["schemaVersion", "requirements", "prohibitions", "bounds", "locks"],
7
+ "properties": {
8
+ "schemaVersion": {
9
+ "type": "integer",
10
+ "const": 1
11
+ },
12
+ "requirements": { "type": "object", "additionalProperties": true },
13
+ "prohibitions": { "type": "object", "additionalProperties": true },
14
+ "bounds": { "type": "object", "additionalProperties": true },
15
+ "locks": { "type": "array", "items": { "type": "string" } }
16
+ }
17
+ }