@williambeto/ai-workflow 1.18.8 → 1.18.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,7 +5,11 @@ All notable changes to AI Workflow Kit (`ai-workflow`) are documented in this fi
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [1.18.9] - 2026-05-21
9
+
10
+ ### Removed
11
+
12
+ - **Consumer `workflow:validate` and `workflow:doctor` scripts**: removed thin wrapper aliases from consumer `package.json`. These provided marginal value over direct commands (`npm run validate`, `npx ai-workflow doctor`). Removed `merge-package-json.js`, updated `init.js`, `doctor.js`, `templates.js`, and all documentation references.
9
13
 
10
14
  ## [1.18.8] - 2026-05-20
11
15
 
package/README.md CHANGED
@@ -166,7 +166,7 @@ See [`docs/setup-codex-opencode.md`](docs/setup-codex-opencode.md) for installat
166
166
  | `@williambeto/ai-workflow` CLI | Preview |
167
167
  | Stack variants and examples | Reference — adapt to the target project |
168
168
 
169
- Suitable for **private preview** with developers who accept validation-first workflow assets and can report rough edges. Not ready for broad public announcement until the final public-readiness audit confirms no high-severity blockers remain.
169
+ Suitable for developers and teams who want validation-first AI workflow assets and accept that the CLI, OpenCode integration, and stack variants are still evolving. Use GitHub issues for questions, bugs, and improvement proposals.
170
170
 
171
171
  ## Current limitations
172
172
 
@@ -176,6 +176,8 @@ Suitable for **private preview** with developers who accept validation-first wor
176
176
 
177
177
  See [`ROADMAP.md`](ROADMAP.md) for planned improvements.
178
178
 
179
+ Before changing repository visibility or making a major public-facing release, use [`runbooks/publication-readiness-checklist.md`](runbooks/publication-readiness-checklist.md).
180
+
179
181
  ## Start now
180
182
 
181
183
  1. Pick one small feature.
@@ -0,0 +1,34 @@
1
+ # Change Spec Readiness Checklist
2
+
3
+ Use this checklist before implementation starts.
4
+
5
+ ## Clarity and scope
6
+
7
+ - [ ] Objective is clear and measurable.
8
+ - [ ] Problem is explicit.
9
+ - [ ] Scope and out-of-scope are explicit.
10
+ - [ ] Assumptions are explicit and labeled.
11
+ - [ ] Open questions are resolved or marked as blockers.
12
+
13
+ ## Behavior and design
14
+
15
+ - [ ] Requirements are testable.
16
+ - [ ] Scenarios cover main flow and key edge cases.
17
+ - [ ] Technical design is lightweight and sufficient for implementation.
18
+ - [ ] Constraints and integration points are explicit.
19
+
20
+ ## Delivery readiness
21
+
22
+ - [ ] Task breakdown is small, ordered, and reviewable.
23
+ - [ ] Validation plan includes real commands/checks.
24
+ - [ ] Expected evidence is explicit.
25
+ - [ ] Risks include mitigation notes.
26
+
27
+ ## Decision
28
+
29
+ Mark one:
30
+
31
+ - [ ] Ready for implementation handoff
32
+ - [ ] Needs clarification
33
+ - [ ] Too broad (split into smaller changes)
34
+ - [ ] Blocked by missing context/decision
@@ -203,10 +203,18 @@ Spec-Driven commands:
203
203
 
204
204
  | Command | Purpose |
205
205
  | --- | --- |
206
+ | [`opencode/commands/specs/create-spec-from-request.md`](opencode/commands/specs/create-spec-from-request.md) | Turn a vague request into a lightweight change artifact before coding. |
206
207
  | [`opencode/commands/specs/create-spec-from-requirement.md`](opencode/commands/specs/create-spec-from-requirement.md) | Draft a testable spec from an approved requirement. |
207
208
  | [`opencode/commands/specs/review-spec.md`](opencode/commands/specs/review-spec.md) | Review spec readiness before technical planning. |
208
209
  | [`opencode/commands/specs/spec-to-technical-plan.md`](opencode/commands/specs/spec-to-technical-plan.md) | Convert an approved spec into technical planning output. |
209
210
  | [`opencode/commands/specs/spec-to-pr-breakdown.md`](opencode/commands/specs/spec-to-pr-breakdown.md) | Split an approved spec into small, reviewable PRs. |
211
+ | [`opencode/commands/specs/spec-to-tasks.md`](opencode/commands/specs/spec-to-tasks.md) | Convert approved spec into small implementation tasks with validation and evidence. |
212
+
213
+ Consumer-project artifact path convention for lightweight specs:
214
+
215
+ ```txt
216
+ docs/specs/[spec-type]/[yyyy-mm-dd]-[change-slug]/
217
+ ```
210
218
 
211
219
  ## OpenCode agent model
212
220
 
@@ -215,6 +223,7 @@ OpenCode agents are operational roles. Skills are reusable capabilities. Command
215
223
  | Agent | Role |
216
224
  | --- | --- |
217
225
  | [`discovery`](opencode/agents/discovery.md) | Explore project context before planning. |
226
+ | [`spec-engineer`](opencode/agents/spec-engineer.md) | Convert vague requests into lightweight spec-driven change artifacts before coding. |
218
227
  | [`planner`](opencode/agents/planner.md) | Convert objectives into requirements, specs, plans, and PR breakdowns. |
219
228
  | [`orchestrator`](opencode/agents/orchestrator.md) | Route multi-step work across gates and specialists. |
220
229
  | [`implementer`](opencode/agents/implementer.md) | Implement scoped changes. |
@@ -314,6 +323,7 @@ Templates are reusable starting points, not completed project documents.
314
323
  | [`templates/README.template.md`](templates/README.template.md) | Base project README. |
315
324
  | [`templates/REQUIREMENT.template.md`](templates/REQUIREMENT.template.md) | Product requirement. |
316
325
  | [`templates/SPEC.template.md`](templates/SPEC.template.md) | Functional specification. |
326
+ | [`templates/change-proposal.template.md`](templates/change-proposal.template.md) | Lightweight change proposal/spec artifact. |
317
327
  | [`templates/TECH-PLAN.template.md`](templates/TECH-PLAN.template.md) | Technical plan. |
318
328
  | [`templates/PR-PLAN.template.md`](templates/PR-PLAN.template.md) | PR plan. |
319
329
 
@@ -329,7 +339,9 @@ Runbooks are operational guides for applying the workflow.
329
339
  | [`runbooks/validate-starter-in-real-project.md`](runbooks/validate-starter-in-real-project.md) | Prove adoption in a real project. |
330
340
  | [`runbooks/how-to-use-skills.md`](runbooks/how-to-use-skills.md) | Choose specialist skills. |
331
341
  | [`runbooks/commands-cheatsheet.md`](runbooks/commands-cheatsheet.md) | Choose Codex/OpenCode commands. |
342
+ | [`runbooks/spec-driven-development.md`](runbooks/spec-driven-development.md) | Run lightweight spec-first flow and artifact conventions before implementation. |
332
343
  | [`runbooks/agent-delegation-workflow.md`](runbooks/agent-delegation-workflow.md) | Use orchestrator and handoff routing. |
344
+ | [`runbooks/use-linear-for-operational-planning.md`](runbooks/use-linear-for-operational-planning.md) | Use Linear as the operational backlog when the roadmap is too large for daily planning. |
333
345
  | [`runbooks/validation-checklist.md`](runbooks/validation-checklist.md) | Validate docs, code, PRs, builds, security, accessibility, and deploy readiness. |
334
346
  | [`runbooks/team-governance-pr-readiness.md`](runbooks/team-governance-pr-readiness.md) | Define PR readiness and approval policy. |
335
347
  | [`runbooks/deploy-checklist.md`](runbooks/deploy-checklist.md) | Prepare deploy, smoke tests, and rollback. |
@@ -49,8 +49,7 @@ The `init` command creates:
49
49
  - managed `opencode.jsonc` sections (for `operational` and `full` profiles);
50
50
  - `.codex/prompts/README.md` — Codex prompt entrypoint reference;
51
51
  - `opencode/README.md` — OpenCode command reference;
52
- - starter agent and skill files (for the `full` profile);
53
- - `npm run workflow:validate` and `npm run workflow:doctor` scripts (when `package.json` exists).
52
+ - starter agent and skill files (for the `full` profile).
54
53
 
55
54
  Use `--dry-run` to preview changes before writing:
56
55
 
@@ -124,7 +123,7 @@ Codex users should treat [`AGENTS.md`](AGENTS.md) as the main operational contra
124
123
  After `init` and `doctor`, confirm:
125
124
 
126
125
  - [ ] `npx @williambeto/ai-workflow doctor` reports no errors
127
- - [ ] `npm run workflow:validate` passes
126
+ - [ ] `npm run validate` passes (or project-specific validation commands)
128
127
  - [ ] `README.workflow.md` exists at the project root
129
128
  - [ ] `opencode.jsonc` contains managed sections (for `operational`/`full` profiles)
130
129
  - [ ] Codex prompt placeholders exist (`.codex/prompts/`)
@@ -17,7 +17,13 @@ Do not treat generic skills as OpenCode agents. A skill explains how to perform
17
17
  Client/request discovery:
18
18
 
19
19
  ```txt
20
- discovery → planner
20
+ discovery → spec-engineer → planner
21
+ ```
22
+
23
+ Lightweight spec-first delivery:
24
+
25
+ ```txt
26
+ request → spec-engineer → implementer
21
27
  ```
22
28
 
23
29
  Feature delivery:
@@ -94,6 +100,7 @@ Do not use Napkin as a temporary task log, and never store secrets.
94
100
  | Agent | Purpose | Use when | Should not do |
95
101
  | ----- | ------- | -------- | ------------- |
96
102
  | `discovery` | Turn vague requests into a discovery brief. | Scope, risks, dependencies, and unknowns are unclear. | Estimate price, implement, edit files, perform execution/delegation routing directly (must return `Blocked` and route to `orchestrator`). |
103
+ | `spec-engineer` | Turn vague/risky requests into lightweight change artifacts for implementation handoff. | Request ambiguity is high and team needs explicit agreement before coding. | Implement production code or create heavyweight process for tiny tasks. |
97
104
  | `planner` | Turn approved scope into requirements, specs, technical plans, and PR breakdowns. | Scope is approved and implementation needs a handoff. | Implement. |
98
105
  | `implementer` | Implement one selected PR. | A PR plan or handoff exists. | Expand scope or do opportunistic refactors. |
99
106
  | `fixer` | Diagnose and fix bugs, regressions, failures, and warnings. | There is broken behavior or failed validation. | Rewrite large areas without evidence. |
@@ -0,0 +1,85 @@
1
+ # Spec-Engineer Agent
2
+
3
+ ## Role
4
+
5
+ Turn vague, risky, or high-impact requests into lightweight change artifacts that are ready for implementation handoff.
6
+
7
+ ## Use when
8
+
9
+ - A request is unclear, broad, or ambiguous.
10
+ - The change can affect behavior, architecture, integration, or validation strategy.
11
+ - The team needs explicit agreement on what to build before coding.
12
+
13
+ ## Do not use when
14
+
15
+ - The task is a tiny docs-only or wording fix.
16
+ - The scope is already fully specified and reviewed.
17
+
18
+ ## Required context
19
+
20
+ - User request or discovery brief.
21
+ - Repository rules from `AGENTS.md`.
22
+ - Existing spec assets in `templates/`, `checklists/`, and `opencode/commands/specs/`.
23
+
24
+ ## Input discipline
25
+
26
+ - Use `minimal-context` behavior: read only files needed for the active request.
27
+ - Use `grep`/`glob` before reading large files.
28
+ - Keep outputs compact and implementation-handoff ready.
29
+
30
+ ## Responsibilities
31
+
32
+ - Receive vague requests and classify whether a spec is needed.
33
+ - Define spec depth level (`tiny` | `standard` | `deep`) based on risk/impact.
34
+ - Generate specification/change artifact before implementation.
35
+ - Set spec status explicitly.
36
+ - Expose assumptions and blocking questions.
37
+ - Define scope and out-of-scope explicitly.
38
+ - Produce requirements, scenarios, and acceptance criteria.
39
+ - Identify edge cases, constraints, and risks.
40
+ - Propose lightweight technical design.
41
+ - Break work into small implementation tasks.
42
+ - Define validation criteria and expected evidence.
43
+ - Request review when uncertainty or risk is non-trivial.
44
+ - Hand off to `implementer` (or `planner` when PR planning is still needed).
45
+
46
+ ## Constraints
47
+
48
+ - Do not implement production code.
49
+ - Do not refactor unrelated files.
50
+ - Do not approve unresolved assumptions as facts.
51
+ - Do not skip validation criteria or expected evidence.
52
+ - Do not create heavyweight process for trivial work.
53
+
54
+ ## Required workflow
55
+
56
+ ```txt
57
+ 1) Receive vague request
58
+ 2) Classify if spec is needed
59
+ 3) Define spec depth level
60
+ 4) Generate specification artifact
61
+ 5) Define spec status
62
+ 6) Expose assumptions and blocking questions
63
+ 7) Define scope and out-of-scope
64
+ 8) Define requirements and scenarios
65
+ 9) Define acceptance criteria
66
+ 10) Define technical constraints and risks
67
+ 11) Create small implementation tasks
68
+ 12) Define validation and expected evidence
69
+ 13) Request review when needed
70
+ 14) Generate implementation handoff
71
+ ```
72
+
73
+ ## Expected output
74
+
75
+ - Change artifact using `templates/change-proposal.template.md`
76
+ - Default artifact location in consumer project: `docs/specs/<spec-type>/<yyyy-mm-dd>-<change-slug>/`
77
+ - Spec depth level: `tiny` | `standard` | `deep`
78
+ - Spec status: `Draft` | `In review` | `Ready for implementation handoff` | `Needs clarification` | `Too broad` | `Blocked`
79
+ - Assumptions and blocking questions (if any)
80
+ - Recommended next owner: `implementer` or `planner`
81
+
82
+ ## Stop conditions
83
+
84
+ - Stop when the change artifact is explicit, testable, and handoff-ready.
85
+ - Stop and mark `Blocked` if missing decisions make implementation unsafe.
@@ -25,10 +25,12 @@ Adapt file names, command registration, or invocation style to your OpenCode set
25
25
 
26
26
  | File | Use when |
27
27
  | ---- | -------- |
28
+ | `create-spec-from-request.md` | Turn a vague request into a lightweight change artifact before coding. |
28
29
  | `create-spec-from-requirement.md` | Draft a testable spec from an approved requirement. |
29
30
  | `review-spec.md` | Review spec readiness before technical planning. |
30
31
  | `spec-to-technical-plan.md` | Convert approved spec into technical planning output. |
31
32
  | `spec-to-pr-breakdown.md` | Split approved spec into small PRs. |
33
+ | `spec-to-tasks.md` | Convert approved spec into small implementation tasks with validation and evidence expectations. |
32
34
 
33
35
  ## Usage Notes
34
36
 
@@ -0,0 +1,27 @@
1
+ # OpenCode Command - Create Spec From Request
2
+
3
+ ## Purpose
4
+
5
+ Turn a vague request into a lightweight, implementation-ready change artifact.
6
+
7
+ ## Constraints
8
+
9
+ 1. Do not implement.
10
+ 2. Ask only necessary blocking questions (max 2 by default).
11
+ 3. Keep scope and out-of-scope explicit.
12
+ 4. Preserve existing behavior unless change is explicitly requested.
13
+
14
+ ## Context To Read
15
+
16
+ - `templates/change-proposal.template.md`
17
+ - `checklists/change-spec-readiness-checklist.md`
18
+ - `AGENTS.md`
19
+
20
+ ## Expected Output
21
+
22
+ - Draft change artifact using `templates/change-proposal.template.md`
23
+ - Suggested output path in consumer project: `docs/specs/<spec-type>/<yyyy-mm-dd>-<change-slug>/00-proposal.md`
24
+ - Assumptions
25
+ - Open questions
26
+ - Readiness: `Ready for implementation handoff` | `Needs clarification` | `Too broad` | `Blocked`
27
+ - Recommended next owner: `implementer` | `planner`
@@ -2,12 +2,14 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- Assess whether a spec is ready for technical planning.
5
+ Assess and improve whether a spec/change artifact is ready for implementation handoff.
6
6
 
7
7
  ## Context To Read
8
8
 
9
9
  - `templates/SPEC.template.md`
10
+ - `templates/change-proposal.template.md`
10
11
  - `checklists/spec-readiness-checklist.md`
12
+ - `checklists/change-spec-readiness-checklist.md`
11
13
  - `AGENTS.md`
12
14
 
13
15
  ## Constraints
@@ -18,7 +20,7 @@ Assess whether a spec is ready for technical planning.
18
20
 
19
21
  ## Expected Output
20
22
 
21
- - Decision: `Ready` | `Needs clarification` | `Too broad` | `Blocked`
23
+ - Decision: `Ready for implementation handoff` | `Needs clarification` | `Too broad` | `Blocked`
22
24
  - Findings by severity (`High`/`Medium`/`Low`)
23
25
  - Smallest safe fixes
24
26
  - Evidence references
@@ -0,0 +1,26 @@
1
+ # OpenCode Command - Spec To Tasks
2
+
3
+ ## Purpose
4
+
5
+ Convert an approved spec/change artifact into small, reviewable implementation tasks with validation and evidence expectations.
6
+
7
+ ## Constraints
8
+
9
+ 1. Do not implement.
10
+ 2. Keep tasks ordered and dependency-aware.
11
+ 3. Keep each task objective small and testable.
12
+ 4. Include validation criteria and expected evidence.
13
+
14
+ ## Context To Read
15
+
16
+ - `templates/change-proposal.template.md`
17
+ - `checklists/change-spec-readiness-checklist.md`
18
+ - `AGENTS.md`
19
+
20
+ ## Expected Output
21
+
22
+ - Ordered task list
23
+ - Per task: objective, scope, out-of-scope, risk note
24
+ - Validation criteria per task
25
+ - Expected evidence per task
26
+ - Recommended first task for implementation
package/opencode.jsonc CHANGED
@@ -11,6 +11,11 @@
11
11
  "description": "Plan requirements, specs, technical plans, and PR breakdowns",
12
12
  "prompt": "{file:./opencode/agents/planner.md}"
13
13
  },
14
+ "spec-engineer": {
15
+ "mode": "primary",
16
+ "description": "Turn vague requests into lightweight spec-driven change artifacts",
17
+ "prompt": "{file:./opencode/agents/spec-engineer.md}"
18
+ },
14
19
  "implementer": {
15
20
  "mode": "primary",
16
21
  "description": "Implement features, fixes, and code changes",
@@ -142,6 +147,13 @@
142
147
  "prompt": "{file:.agents/skills/playwright-cli/SKILL.md}"
143
148
  }
144
149
  },
150
+ "mcp": {
151
+ "linear": {
152
+ "type": "local",
153
+ "command": ["npx", "-y", "mcp-remote", "https://mcp.linear.app/mcp"],
154
+ "enabled": true
155
+ }
156
+ },
145
157
  "command": {
146
158
  "start": {
147
159
  "description": "Select default startup route (orchestrator with fallback)",
@@ -197,6 +209,21 @@
197
209
  "description": "Prepare deployment readiness and rollback plan",
198
210
  "agent": "deploy-engineer",
199
211
  "template": "{file:./opencode/commands/deploy.md}"
212
+ },
213
+ "spec-create": {
214
+ "description": "Create a lightweight spec/change artifact from a vague request",
215
+ "agent": "spec-engineer",
216
+ "template": "{file:./opencode/commands/specs/create-spec-from-request.md}"
217
+ },
218
+ "spec-review": {
219
+ "description": "Review or improve spec readiness for implementation handoff",
220
+ "agent": "spec-engineer",
221
+ "template": "{file:./opencode/commands/specs/review-spec.md}"
222
+ },
223
+ "spec-tasks": {
224
+ "description": "Convert approved spec into small implementation tasks",
225
+ "agent": "spec-engineer",
226
+ "template": "{file:./opencode/commands/specs/spec-to-tasks.md}"
200
227
  }
201
228
  }
202
229
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.18.8",
2
+ "version": "1.18.10",
3
3
  "name": "@williambeto/ai-workflow",
4
4
  "description": "AI Workflow Kit repository for designing and validating AI-assisted software delivery workflows with Codex and OpenCode",
5
5
  "license": "MIT",
@@ -2,7 +2,7 @@
2
2
 
3
3
  `@williambeto/ai-workflow` is the npm CLI for installing AI Workflow Kit assets into a project.
4
4
 
5
- It prepares a repository for Codex and OpenCode workflows with local prompts, workflow scripts, managed `opencode.jsonc` sections, and doctor checks.
5
+ It prepares a repository for Codex and OpenCode workflows with local prompts, generated workflow assets, managed `opencode.jsonc` sections, and doctor checks.
6
6
 
7
7
  ## Commands
8
8
 
@@ -37,8 +37,8 @@ npx @williambeto/ai-workflow init --dry-run
37
37
  - `init` creates or merges managed sections in `opencode.jsonc` for operational/full profiles.
38
38
  - `full` profile also installs local Codex prompt starter files (`start`, `orchestrate-next`, `plan`, `execute`, `review`, `validate`) under `.codex/prompts/`, plus OpenCode agents and skills under `opencode/agents/` and `.agents/skills/`.
39
39
  - conflict backups are stored under `.ai-workflow-backups/` with per-file retention.
40
- - `workflow:validate` uses `npm run validate --if-present` for safer cross-project onboarding.
41
- - `doctor` validates profile readiness (`.ai-workflow.json`, workflow scripts, and `opencode.jsonc` managed blocks for operational/full profiles).
40
+
41
+ - `doctor` validates profile readiness (`.ai-workflow.json` and `opencode.jsonc` managed blocks for operational/full profiles).
42
42
 
43
43
  ## Profiles
44
44
 
@@ -77,6 +77,6 @@ This CLI is in preview. It is validated for:
77
77
  - `init --yes`;
78
78
  - `doctor`;
79
79
  - managed `opencode.jsonc` merge with JSONC comments;
80
- - `workflow:validate` in projects with a `validate` script.
80
+ - `npm run validate` in projects with a `validate` script.
81
81
 
82
82
  Before using it in a shared project, inspect generated files and commit only intentional changes.
@@ -148,16 +148,10 @@ export async function runDoctor({ cwd }) {
148
148
  try {
149
149
  const packageJson = await readJson(packageJsonPath);
150
150
  const scripts = packageJson.scripts ?? {};
151
- if (scripts["workflow:validate"] && scripts["workflow:doctor"]) {
152
- console.log("PASS package.json workflow scripts present");
153
- } else {
154
- hasWarning = true;
155
- console.log("WARN package.json missing workflow scripts");
156
- }
157
151
 
158
152
  if (!scripts.validate) {
159
153
  hasWarning = true;
160
- console.log("WARN package.json has no validate script; workflow:validate may be a no-op");
154
+ console.log("WARN package.json has no validate script");
161
155
  }
162
156
  } catch {
163
157
  hasFailure = true;
@@ -3,7 +3,6 @@ import path from "node:path";
3
3
  import { createInstallPlan } from "../core/install-plan.js";
4
4
  import { buildAiWorkflowConfig, getTemplateFiles, isValidProfile } from "../core/templates.js";
5
5
  import { exists, writeFileSafe } from "../core/filesystem.js";
6
- import { mergeWorkflowScripts } from "../core/merge-package-json.js";
7
6
  import { createManagedBackup, createManagedPathBackup } from "../core/backup.js";
8
7
  import { mergeOpencodeConfig } from "../core/opencode-merge.js";
9
8
  import { buildSymlinkEntries, isSymlinkTo } from "../core/symlink-layout.js";
@@ -135,7 +134,6 @@ export async function runInit({ cwd, yes, force, dryRun, noInstall, noOverwrite,
135
134
  linkCreated.push(linkPath);
136
135
  }
137
136
 
138
- const mergeResult = await mergeWorkflowScripts(cwd, { dryRun: false });
139
137
  const opencodeResult =
140
138
  selectedProfile === "minimal"
141
139
  ? { reason: "skipped (minimal profile)" }
@@ -143,7 +141,7 @@ export async function runInit({ cwd, yes, force, dryRun, noInstall, noOverwrite,
143
141
 
144
142
  console.log("Installation complete.");
145
143
  console.log(`- profile: ${selectedProfile}`);
146
- console.log(`- package.json scripts: ${mergeResult.reason}`);
144
+
147
145
  console.log(`- opencode.jsonc: ${opencodeResult.reason}`);
148
146
  console.log(`- symlink layout: ${linkCreated.length > 0 ? `created ${linkCreated.length}` : "already-up-to-date"}`);
149
147
  if (backups.length > 0) {
@@ -167,5 +165,4 @@ export async function runInit({ cwd, yes, force, dryRun, noInstall, noOverwrite,
167
165
  console.log(`- dependency install: ${noInstall ? "skipped (--no-install)" : "not managed in this step"}`);
168
166
  console.log("Next steps:");
169
167
  console.log(" npx @williambeto/ai-workflow doctor");
170
- console.log(" npm run workflow:validate");
171
168
  }
@@ -259,10 +259,6 @@ export function buildAiWorkflowConfig({ profile, managedFiles, managedLinks = []
259
259
  managedBlocks: getManagedBlocks(profile),
260
260
  fileHashes: {},
261
261
  backupsDir: ".ai-workflow-backups",
262
- scripts: {
263
- "workflow:validate": "npm run validate --if-present",
264
- "workflow:doctor": "ai-workflow doctor"
265
- },
266
262
  compatibility: {
267
263
  codex: true,
268
264
  opencode: true
@@ -0,0 +1,29 @@
1
+ # Publication Readiness Checklist
2
+
3
+ ## Purpose
4
+
5
+ Use this checklist before making the GitHub repository public or before a major public-facing release.
6
+
7
+ ## Checklist
8
+
9
+ - [ ] `README.md` describes the project as public-ready enough for its current maturity.
10
+ - [ ] `README.md` does not contain private-preview or not-ready-for-public language.
11
+ - [ ] `SECURITY.md` exists and explains how to report vulnerabilities.
12
+ - [ ] `package.json` metadata points to the public repository, license, and npm package.
13
+ - [ ] Public docs do not contain local absolute paths.
14
+ - [ ] Public docs do not contain private client, customer, or target-project names.
15
+ - [ ] Historical repository names are removed, redacted, or clearly marked as historical.
16
+ - [ ] GitHub-only folders (`evidence/`, `examples/`, `variants/`, `scripts/`, `tests/`) are appropriate for public readers.
17
+ - [ ] CI and publish workflows reference secrets through GitHub Actions secrets only.
18
+ - [ ] `npm run validate` passes.
19
+
20
+ ## Suggested verification commands
21
+
22
+ ```bash
23
+ npm run validate
24
+ grep -R --exclude=publication-readiness-checklist.md "/home/" README.md docs runbooks evidence packages examples variants || true
25
+ grep -R --exclude=publication-readiness-checklist.md "private preview\|private-preview\|not ready for broad public" README.md docs runbooks packages evidence || true
26
+ grep -R --exclude=publication-readiness-checklist.md "arco-ptp" README.md docs runbooks packages evidence || true
27
+ ```
28
+
29
+ Review any matches before publication. Some historical references may be acceptable only when they are explicitly anonymized or explained.
@@ -46,13 +46,7 @@ Expected result: `Final status: PASS` or `PASS_WITH_NOTES` with actionable warni
46
46
 
47
47
  ### 3. Run project validation
48
48
 
49
- If the target project has a `validate` script, run:
50
-
51
- ```bash
52
- npm run workflow:validate
53
- ```
54
-
55
- If not, use the target project's real checks, for example:
49
+ Run the target project's validation commands, for example:
56
50
 
57
51
  ```bash
58
52
  npm run build
@@ -98,10 +92,10 @@ gh pr create --title "My first PR" --body "## Summary"
98
92
  ### 7. Run validation before opening a PR
99
93
 
100
94
  ```bash
101
- npm run workflow:validate
95
+ npm run validate
102
96
  ```
103
97
 
104
- If `workflow:validate` reports no project `validate` script, include the actual build/lint/test commands you ran in the PR body.
98
+ If the project has no `validate` script, run the actual build/lint/test commands directly and include them in the PR body.
105
99
 
106
100
  ## Workflow steps reference
107
101
 
@@ -212,7 +206,7 @@ npm run validate
212
206
  | `npx @williambeto/ai-workflow init --dry-run` | Previews target-project install changes |
213
207
  | `npx @williambeto/ai-workflow init --yes` | Installs default workflow assets |
214
208
  | `npx @williambeto/ai-workflow doctor` | Checks local workflow installation |
215
- | `npm run workflow:validate` | Runs target-project validation when available |
209
+ | `npm run validate` | Runs target-project validation when available |
216
210
  | `npm run validate` | Runs all repository validations when developing this kit |
217
211
  | `npm run test:e2e` | Tests validation scripts |
218
212
  | `npm run lint:md` | Checks Markdown formatting |
@@ -8,10 +8,9 @@ Standard flow:
8
8
 
9
9
  ```txt
10
10
  Request
11
- Spec draft
11
+ Change proposal / lightweight spec
12
12
  → Spec review
13
- Technical plan
14
- → PR breakdown
13
+ Task breakdown
15
14
  → Implementation
16
15
  → Validation
17
16
  → Evidence report
@@ -32,6 +31,11 @@ For tiny docs-only edits, use proportional workflow.
32
31
 
33
32
  ## Assets to use
34
33
 
34
+ - Lightweight change template: `templates/change-proposal.template.md`
35
+ - Lightweight readiness checklist: `checklists/change-spec-readiness-checklist.md`
36
+ - Request-to-spec command: `opencode/commands/specs/create-spec-from-request.md`
37
+ - Spec-to-tasks command: `opencode/commands/specs/spec-to-tasks.md`
38
+ - Spec-first owner: `opencode/agents/spec-engineer.md`
35
39
  - Spec template: `templates/SPEC.template.md`
36
40
  - Readiness checklist: `checklists/spec-readiness-checklist.md`
37
41
  - Draft prompt: `.codex/prompts/specs/create-spec-from-requirement.md`
@@ -39,15 +43,52 @@ For tiny docs-only edits, use proportional workflow.
39
43
  - Plan prompt: `.codex/prompts/specs/spec-to-technical-plan.md`
40
44
  - PR prompt: `.codex/prompts/specs/spec-to-pr-breakdown.md`
41
45
 
46
+ ## Artifact location convention (consumer project)
47
+
48
+ Store generated spec artifacts in the consumer repository using this default path:
49
+
50
+ ```txt
51
+ docs/specs/[spec-type]/[yyyy-mm-dd]-[change-slug]/
52
+ ```
53
+
54
+ Allowed `<spec-type>` values:
55
+
56
+ - `feature`
57
+ - `bugfix`
58
+ - `refactor`
59
+ - `ui-change`
60
+ - `architecture`
61
+ - `workflow`
62
+ - `integration`
63
+ - `test-strategy`
64
+
65
+ Recommended files inside each folder:
66
+
67
+ ```txt
68
+ 00-proposal.md
69
+ 01-spec.md
70
+ 02-design.md
71
+ 03-tasks.md
72
+ 04-validation.md
73
+ 05-handoff.md
74
+ ```
75
+
76
+ For `tiny` specs, allow a minimal set:
77
+
78
+ ```txt
79
+ 00-proposal.md
80
+ 03-tasks.md
81
+ 04-validation.md
82
+ ```
83
+
42
84
  ## Connection to PR execution
43
85
 
44
86
  After spec review passes:
45
87
 
46
- 1. produce technical plan;
47
- 2. split into small PRs;
48
- 3. implement PR 1 only;
49
- 4. run validation before claiming success;
50
- 5. return evidence for commands, changed files, and acceptance-criteria coverage.
88
+ 1. split into small implementation tasks (or PRs when needed);
89
+ 2. implement one scoped task/PR only;
90
+ 3. run validation before claiming success;
91
+ 4. return evidence for commands, changed files, and acceptance-criteria coverage.
51
92
 
52
93
  ## Required evidence after validation
53
94
 
@@ -0,0 +1,185 @@
1
+ # Use Linear for Operational Planning
2
+
3
+ ## Purpose
4
+
5
+ Use this runbook when `ROADMAP.md` is too large for day-to-day planning and the team needs a smaller, current, and auditable operational backlog.
6
+
7
+ Linear should become the operational source of truth for next work. `ROADMAP.md` remains the strategic and historical source of truth.
8
+
9
+ ## When to use
10
+
11
+ Use Linear when:
12
+
13
+ - the next PR is hard to identify from `ROADMAP.md`;
14
+ - roadmap items are complete but still appear in older audit reports;
15
+ - product, planning, implementation, and validation work need one shared queue;
16
+ - each task needs owner, priority, status, acceptance criteria, and delivery evidence.
17
+
18
+ Skip Linear for one-off local edits where a short checklist is enough.
19
+
20
+ ## Source-of-truth split
21
+
22
+ | Source | Role |
23
+ | --- | --- |
24
+ | Linear | Current operational backlog, priorities, owners, status, blockers, and next PRs. |
25
+ | GitHub PRs | Delivery evidence, review discussion, changed files, validation results, and merge history. |
26
+ | `ROADMAP.md` | Strategic phases, durable product direction, historical context, and large milestone sequencing. |
27
+ | `CHANGELOG.md` | Published or release-relevant changes. |
28
+ | `docs/reports/` | Audit inputs, scorecards, and evidence-backed recommendations. |
29
+
30
+ Do not use `ROADMAP.md` alone to decide the next implementation step when Linear exists.
31
+
32
+ ## Linear MCP setup
33
+
34
+ Linear's remote MCP endpoint is:
35
+
36
+ ```txt
37
+ https://mcp.linear.app/mcp
38
+ ```
39
+
40
+ ### Codex
41
+
42
+ Preferred setup through the Codex CLI:
43
+
44
+ ```bash
45
+ codex mcp add linear --url https://mcp.linear.app/mcp
46
+ ```
47
+
48
+ If this is the first MCP server configured for Codex, enable the remote MCP client in `~/.codex/config.toml`:
49
+
50
+ ```toml
51
+ [features]
52
+ experimental_use_rmcp_client = true
53
+ ```
54
+
55
+ Equivalent manual configuration:
56
+
57
+ ```toml
58
+ [features]
59
+ experimental_use_rmcp_client = true
60
+
61
+ [mcp_servers.linear]
62
+ url = "https://mcp.linear.app/mcp"
63
+ ```
64
+
65
+ Then authenticate:
66
+
67
+ ```bash
68
+ codex mcp login linear
69
+ ```
70
+
71
+ ### OpenCode
72
+
73
+ This repository includes Linear's remote MCP server in `opencode.jsonc`:
74
+
75
+ ```json
76
+ {
77
+ "mcp": {
78
+ "linear": {
79
+ "type": "remote",
80
+ "url": "https://mcp.linear.app/mcp",
81
+ "enabled": true
82
+ }
83
+ }
84
+ }
85
+ ```
86
+
87
+ After updating `opencode.jsonc`, quit and restart OpenCode so the MCP server is loaded from the project config.
88
+
89
+ Authenticate through OpenCode's MCP/OAuth flow when prompted. Keep authentication state local to the developer machine.
90
+
91
+ Do not commit personal MCP tokens, OAuth state, API keys, or local `~/.codex/config.toml` files to this repository.
92
+
93
+ ## Recommended Linear project structure
94
+
95
+ Create one Linear project:
96
+
97
+ ```txt
98
+ Public readiness score improvement
99
+ ```
100
+
101
+ Use these milestones:
102
+
103
+ 1. **Validation trust**
104
+ 2. **Onboarding clarity**
105
+ 3. **Platform simplification**
106
+
107
+ Initial issue queue:
108
+
109
+ | Milestone | Issue | Initial status | Evidence source |
110
+ | --- | --- | --- | --- |
111
+ | Validation trust | Fix E2E validation drift | Done | `npm run test:e2e` passes 14/14; `ROADMAP.md`; `CHANGELOG.md`. |
112
+ | Validation trust | Define stable validation output contract | Todo | `docs/reports/public-readiness-backlog.md`. |
113
+ | Validation trust | Create Go/No-Go public checklist | Todo | `docs/reports/public-readiness-backlog.md`. |
114
+ | Onboarding clarity | Add one adoption decision table | Todo | `docs/reports/project-evaluation.md`. |
115
+ | Onboarding clarity | Reduce entry-doc circular/deep reference chains | Todo | `npm run validate` warnings and audit report. |
116
+ | Platform simplification | Phase 17 PR 1 — Move Codex prompts to legacy | Todo | `ROADMAP.md` Phase 17. |
117
+ | Platform simplification | Phase 17 PR 2 — Simplify `AGENTS.md` to OpenCode-only | Todo | `ROADMAP.md` Phase 17. |
118
+ | Platform simplification | Phase 17 PR 3 — Update README and core docs for single-path | Todo | `ROADMAP.md` Phase 17. |
119
+
120
+ ## Issue template
121
+
122
+ Use this format for Linear issues:
123
+
124
+ ```md
125
+ ## Objective
126
+
127
+ What outcome should this issue achieve?
128
+
129
+ ## Scope
130
+
131
+ Included:
132
+ - ...
133
+
134
+ Not included:
135
+ - ...
136
+
137
+ ## Acceptance criteria
138
+
139
+ - ...
140
+
141
+ ## Evidence required
142
+
143
+ - Command:
144
+ - Expected result:
145
+ - Manual review:
146
+
147
+ ## Source context
148
+
149
+ - ROADMAP.md:
150
+ - Report/backlog:
151
+ - Related PR:
152
+
153
+ ## Risk
154
+
155
+ Low | Medium | High
156
+ ```
157
+
158
+ ## Operating rules
159
+
160
+ - Keep one Linear issue equivalent to one small PR whenever possible.
161
+ - Mark an issue `Done` only when validation evidence is attached or linked.
162
+ - Link the GitHub PR to the Linear issue before review.
163
+ - If an audit finding is already fixed, close it with evidence instead of recreating work.
164
+ - Update `ROADMAP.md` only for durable strategic changes, phase status changes, or historical milestones.
165
+ - Update `CHANGELOG.md` only for published or release-relevant changes.
166
+
167
+ ## Planning cadence
168
+
169
+ Before selecting the next PR:
170
+
171
+ 1. Check Linear for highest-priority `Todo` or `Blocked` issues.
172
+ 2. Confirm the issue still matches current repository evidence.
173
+ 3. If evidence contradicts the issue, update or close the issue before implementation.
174
+ 4. Select one issue.
175
+ 5. Create a scoped branch.
176
+ 6. Implement only that issue.
177
+ 7. Attach validation evidence before marking it `Done`.
178
+
179
+ ## Acceptance criteria for Linear adoption
180
+
181
+ - A Linear project exists for public-readiness score improvement.
182
+ - The known completed E2E drift item is marked `Done` with evidence.
183
+ - Planned score-improvement items are represented as small issues.
184
+ - Each active issue has acceptance criteria and required evidence.
185
+ - `ROADMAP.md` is no longer used as the only day-to-day planning source.
@@ -0,0 +1,97 @@
1
+ # Change Proposal (Lightweight Spec)
2
+
3
+ Suggested save path (consumer project):
4
+
5
+ `docs/specs/<spec-type>/<yyyy-mm-dd>-<change-slug>/00-proposal.md`
6
+
7
+ ## Spec level
8
+
9
+ `tiny` | `standard` | `deep`
10
+
11
+ ## Spec status
12
+
13
+ `Draft` | `In review` | `Ready for implementation handoff` | `Needs clarification` | `Too broad` | `Blocked`
14
+
15
+ ## Title
16
+
17
+ [Short change title]
18
+
19
+ ## Objective
20
+
21
+ [Outcome this change must achieve]
22
+
23
+ ## Background
24
+
25
+ [Context needed to understand this request]
26
+
27
+ ## Problem
28
+
29
+ [Current pain, failure mode, or gap]
30
+
31
+ ## Proposed change
32
+
33
+ [What will change and why this is the smallest safe approach]
34
+
35
+ ## Scope
36
+
37
+ ### Included
38
+
39
+ - [In-scope item]
40
+
41
+ ### Out of scope
42
+
43
+ - [Explicitly excluded item]
44
+
45
+ ## Requirements
46
+
47
+ - [Clear, testable requirement]
48
+
49
+ ## Scenarios
50
+
51
+ ### Scenario 1 — [Name]
52
+
53
+ - Given [state]
54
+ - When [action]
55
+ - Then [expected result]
56
+
57
+ ### Scenario 2 — [Name or `Not applicable`]
58
+
59
+ - Given [state]
60
+ - When [action]
61
+ - Then [expected result]
62
+
63
+ ## Technical design
64
+
65
+ - [High-level design choice]
66
+ - [Constraints, integration points, and trade-offs]
67
+
68
+ ## Task breakdown
69
+
70
+ 1. [Small implementation task]
71
+ 2. [Small implementation task]
72
+ 3. [Small validation or hardening task]
73
+
74
+ ## Validation plan
75
+
76
+ - [Command or check]
77
+ - [Acceptance criteria coverage method]
78
+
79
+ ## Risks
80
+
81
+ - [Risk + mitigation]
82
+
83
+ ## Open questions
84
+
85
+ - [Question that blocks or may affect scope]
86
+
87
+ ## Expected evidence
88
+
89
+ - Commands executed and results
90
+ - Files changed
91
+ - Acceptance criteria/scenario coverage
92
+ - Untested areas and residual risks
93
+
94
+ ## Handoff
95
+
96
+ - Recommended next owner: `implementer` | `planner`
97
+ - Readiness: `Ready for implementation handoff` | `Needs clarification` | `Too broad` | `Blocked`
@@ -1,44 +0,0 @@
1
- import path from "node:path";
2
- import { exists, readJson, writeFileSafe } from "./filesystem.js";
3
-
4
- export async function mergeWorkflowScripts(cwd, { dryRun = false } = {}) {
5
- const packageJsonPath = path.join(cwd, "package.json");
6
-
7
- if (!(await exists(packageJsonPath))) {
8
- return { changed: false, reason: "package.json not found" };
9
- }
10
-
11
- const packageJson = await readJson(packageJsonPath);
12
- const scripts = packageJson.scripts ?? {};
13
- const shouldSetDefaultValidate =
14
- scripts["workflow:validate"] === undefined ||
15
- scripts["workflow:validate"] === "npm run validate";
16
-
17
- const mergedScripts = {
18
- ...scripts,
19
- "workflow:validate": shouldSetDefaultValidate
20
- ? "npm run validate --if-present"
21
- : scripts["workflow:validate"],
22
- "workflow:doctor": scripts["workflow:doctor"] ?? "ai-workflow doctor"
23
- };
24
-
25
- const changed =
26
- scripts["workflow:validate"] !== mergedScripts["workflow:validate"] ||
27
- scripts["workflow:doctor"] !== mergedScripts["workflow:doctor"];
28
-
29
- if (!changed) {
30
- return { changed: false, reason: "workflow scripts already present" };
31
- }
32
-
33
- if (dryRun) {
34
- return { changed: true, reason: "dry-run" };
35
- }
36
-
37
- const next = {
38
- ...packageJson,
39
- scripts: mergedScripts
40
- };
41
-
42
- await writeFileSafe(packageJsonPath, `${JSON.stringify(next, null, 2)}\n`);
43
- return { changed: true, reason: "scripts merged" };
44
- }