@williambeto/ai-workflow 1.18.6 → 1.18.7
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/.agents/skills/backend-implementer/SKILL.md +13 -0
- package/.agents/skills/deploy-engineer/SKILL.md +13 -0
- package/.agents/skills/docs-writer/SKILL.md +13 -0
- package/.agents/skills/frontend-implementer/SKILL.md +13 -0
- package/.agents/skills/tester/SKILL.md +13 -0
- package/README.md +0 -2
- package/docs/full-documentation.md +0 -2
- package/docs/npm-consumer-quickstart.md +1 -1
- package/opencode/agents/fixer.md +1 -0
- package/opencode/agents/orchestrator.md +8 -1
- package/opencode/agents/planner.md +1 -0
- package/opencode/agents/release-manager.md +1 -0
- package/opencode/commands/orchestrate.md +6 -4
- package/opencode.jsonc +1 -1
- package/package.json +3 -2
- package/runbooks/publish-package-checklist.md +22 -0
|
@@ -46,6 +46,19 @@ When acting as backend implementer, Codex must:
|
|
|
46
46
|
10. update or add tests when behavior changes;
|
|
47
47
|
11. document assumptions, limitations, and untested areas.
|
|
48
48
|
|
|
49
|
+
## Branch safety gate (mandatory before edits)
|
|
50
|
+
|
|
51
|
+
Before changing files, enforce branch safety:
|
|
52
|
+
|
|
53
|
+
1. run `git status -sb`;
|
|
54
|
+
2. if current branch is `main`, create/switch to a scoped branch before writing:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git switch -c feat/<short-task-slug>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Never implement directly on `main`.
|
|
61
|
+
|
|
49
62
|
## Backend implementation principles
|
|
50
63
|
|
|
51
64
|
### 1. Existing patterns first
|
|
@@ -47,6 +47,19 @@ When acting as deploy engineer, Codex must:
|
|
|
47
47
|
10. avoid unsafe deployment recommendations without evidence;
|
|
48
48
|
11. provide a clear release recommendation.
|
|
49
49
|
|
|
50
|
+
## Branch safety gate (mandatory before edits)
|
|
51
|
+
|
|
52
|
+
This role is often review-only. If deployment/release work requires file edits (workflow, runbook, or config changes):
|
|
53
|
+
|
|
54
|
+
1. run `git status -sb`;
|
|
55
|
+
2. if current branch is `main`, create/switch to a scoped branch before writing:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
git switch -c chore/<short-task-slug>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Do not apply release-related edits directly on `main`.
|
|
62
|
+
|
|
50
63
|
## Deployment principles
|
|
51
64
|
|
|
52
65
|
### 1. Build before deploy
|
|
@@ -48,6 +48,19 @@ When acting as docs writer, Codex must:
|
|
|
48
48
|
10. check code fences, headings, tables, and lists;
|
|
49
49
|
11. state assumptions and gaps clearly.
|
|
50
50
|
|
|
51
|
+
## Branch safety gate (mandatory for non-trivial docs edits)
|
|
52
|
+
|
|
53
|
+
For non-trivial documentation updates (new sections, policy changes, runbook/process updates):
|
|
54
|
+
|
|
55
|
+
1. run `git status -sb`;
|
|
56
|
+
2. if current branch is `main`, create/switch to a scoped branch before writing:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git switch -c docs/<short-task-slug>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Do not edit non-trivial documentation directly on `main`.
|
|
63
|
+
|
|
51
64
|
## Documentation principles
|
|
52
65
|
|
|
53
66
|
### 1. Audience first
|
|
@@ -46,6 +46,19 @@ When acting as frontend implementer, Codex must:
|
|
|
46
46
|
10. validate the change with relevant checks;
|
|
47
47
|
11. document assumptions, limitations, and untested areas.
|
|
48
48
|
|
|
49
|
+
## Branch safety gate (mandatory before edits)
|
|
50
|
+
|
|
51
|
+
Before changing files, enforce branch safety:
|
|
52
|
+
|
|
53
|
+
1. run `git status -sb`;
|
|
54
|
+
2. if current branch is `main`, create/switch to a scoped branch before writing:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git switch -c feat/<short-task-slug>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Never implement directly on `main`.
|
|
61
|
+
|
|
49
62
|
## Frontend implementation principles
|
|
50
63
|
|
|
51
64
|
### 1. Existing patterns first
|
|
@@ -45,6 +45,19 @@ When acting as tester, Codex must:
|
|
|
45
45
|
10. separate confirmed issues from hypotheses;
|
|
46
46
|
11. provide a clear approval or rejection recommendation.
|
|
47
47
|
|
|
48
|
+
## Branch safety gate (mandatory if fixes are applied)
|
|
49
|
+
|
|
50
|
+
Tester is primarily review/validation. If a validation task includes direct fixes:
|
|
51
|
+
|
|
52
|
+
1. run `git status -sb`;
|
|
53
|
+
2. if current branch is `main`, create/switch to a scoped branch before writing:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git switch -c fix/<short-task-slug>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Do not apply fixes directly on `main`.
|
|
60
|
+
|
|
48
61
|
## Validation mindset
|
|
49
62
|
|
|
50
63
|
Act as a skeptical reviewer.
|
package/README.md
CHANGED
|
@@ -7,8 +7,6 @@ Most AI coding workflows fail because they start with code.
|
|
|
7
7
|
|
|
8
8
|
**AI Workflow Kit** is a software delivery workflow for Codex and OpenCode: requirements first, small PRs, specialist agents, validation evidence, and no-regression rules.
|
|
9
9
|
|
|
10
|
-
> Historical note: this project originated as `codex-repo-starter` and now continues as AI Workflow Kit. The npm CLI package is `@williambeto/ai-workflow`.
|
|
11
|
-
|
|
12
10
|
## Why this exists
|
|
13
11
|
|
|
14
12
|
AI coding tools are powerful, but without workflow discipline they often create oversized changes, vague requirements, hidden assumptions, unreviewable diffs, skipped validation, architecture drift, and cleanup work disguised as speed.
|
|
@@ -6,8 +6,6 @@ This document is the detailed reference for **AI Workflow Kit**.
|
|
|
6
6
|
|
|
7
7
|
Use the root `README.md` as the landing page. Use this document when you need the full repository map, workflow explanation, role model, validation model, and adoption guidance.
|
|
8
8
|
|
|
9
|
-
Historical note: this project started as `codex-repo-starter` and now continues as `ai-workflow`.
|
|
10
|
-
|
|
11
9
|
## What AI Workflow Kit is
|
|
12
10
|
|
|
13
11
|
AI Workflow Kit is a documentation-first workflow system for AI-assisted software delivery.
|
|
@@ -68,7 +68,7 @@ The `init` command installs workflow assets into `.ai-workflow/` and creates sym
|
|
|
68
68
|
- Run `npx @williambeto/ai-workflow init --force` to regenerate managed files when the package is updated.
|
|
69
69
|
- Backup copies of replaced files are stored in `.ai-workflow-backups/`.
|
|
70
70
|
|
|
71
|
-
There is no `.workflow/` directory. Workflow assets are managed under `.ai-workflow/` with symlinks in project-root paths for tool compatibility.
|
|
71
|
+
There is no `.workflow/` directory in this onboarding path. Legacy `.workflow` submodule guidance is deprecated for npm consumers. Workflow assets are managed under `.ai-workflow/` with symlinks in project-root paths for tool compatibility.
|
|
72
72
|
|
|
73
73
|
## OpenCode quickstart
|
|
74
74
|
|
package/opencode/agents/fixer.md
CHANGED
|
@@ -29,6 +29,7 @@ Diagnose and fix bugs, regressions, failing tests, build failures, warnings, and
|
|
|
29
29
|
|
|
30
30
|
## Constraints
|
|
31
31
|
|
|
32
|
+
- Enforce branch gate before any write: run `git status -sb`; if branch is `main`, create/switch to `git switch -c fix/<short-task-slug>` before editing.
|
|
32
33
|
- Do not rewrite large areas without evidence.
|
|
33
34
|
- Do not mix unrelated refactors into the fix.
|
|
34
35
|
- Do not change behavior without stating it.
|
|
@@ -34,6 +34,7 @@ Route work automatically across agents and run end-to-end workflow orchestration
|
|
|
34
34
|
- Enforce design-pattern justification before allowing formal pattern abstractions.
|
|
35
35
|
- Evaluate gate criteria for the next transition.
|
|
36
36
|
- Route to next agent only when gate is `Pass`.
|
|
37
|
+
- Enforce delegation-by-step: for planner/implementer/reviewer/validator/release-manager steps, delegate to the step owner instead of executing specialist work inline.
|
|
37
38
|
- Return blocked transitions with smallest safe fix request.
|
|
38
39
|
- Ask user confirmation only at required checkpoints.
|
|
39
40
|
- Preserve branch gate and no-regression constraints.
|
|
@@ -90,11 +91,17 @@ Every specialist response must include:
|
|
|
90
91
|
## Anti-overdelegation rules
|
|
91
92
|
|
|
92
93
|
- Do not delegate trivial one-file documentation edits.
|
|
93
|
-
- Do not delegate when the active primary agent can safely complete the task using existing instructions.
|
|
94
|
+
- Do not delegate when the active primary agent can safely complete the task using existing instructions **only for non-specialist trivial work** (for example: one-file wording or formatting updates).
|
|
94
95
|
- Do not delegate to more than 2 agents unless the task is explicitly cross-functional.
|
|
95
96
|
- Prefer one owner + one reviewer instead of broad parallel delegation.
|
|
96
97
|
- Always delegate validation/review for high-risk implementation.
|
|
97
98
|
|
|
99
|
+
## Delegation enforcement
|
|
100
|
+
|
|
101
|
+
- For any active step owner in `planner -> implementer -> reviewer -> validator -> release-manager`, orchestration must delegate to that owner.
|
|
102
|
+
- If orchestration cannot delegate due to missing input packet, missing context, or unresolved gate criteria, return `Blocked` and request the smallest safe missing input.
|
|
103
|
+
- Do not bypass required owner delegation by completing specialist work in orchestrator responses.
|
|
104
|
+
|
|
98
105
|
## Escalation rules
|
|
99
106
|
|
|
100
107
|
- If implementation changes architecture, consult `tech-lead`.
|
|
@@ -39,6 +39,7 @@ Transform approved scope into a requirement, functional specification, technical
|
|
|
39
39
|
## Constraints
|
|
40
40
|
|
|
41
41
|
- Do not implement.
|
|
42
|
+
- If non-trivial documentation edits are requested, enforce branch gate first: run `git status -sb`; if branch is `main`, create/switch to `git switch -c <type>/<short-task-slug>` before writing.
|
|
42
43
|
- Do not plan multiple unrelated features together.
|
|
43
44
|
- Do not skip validation planning.
|
|
44
45
|
- Do not ignore `AGENTS.md`.
|
|
@@ -30,6 +30,7 @@ Close the Git and PR cycle safely.
|
|
|
30
30
|
## Constraints
|
|
31
31
|
|
|
32
32
|
- Do not merge with a dirty worktree.
|
|
33
|
+
- If requested to apply fixes before release, enforce branch gate first: run `git status -sb`; if branch is `main`, create/switch to `git switch -c chore/<short-task-slug>` before editing.
|
|
33
34
|
- Do not skip validation.
|
|
34
35
|
- Do not invent commit messages unrelated to the diff.
|
|
35
36
|
- Do not delete branches or merge unless explicitly requested.
|
|
@@ -20,10 +20,12 @@ This command does not implement code by itself; it routes work to the correct ne
|
|
|
20
20
|
4. If gate is `Blocked`, stop escalation and return smallest safe fix request to previous owner.
|
|
21
21
|
5. Enforce branch gate for any execution step (no implementation on `main`).
|
|
22
22
|
6. Preserve one primary agent per step.
|
|
23
|
-
7.
|
|
24
|
-
8.
|
|
25
|
-
9.
|
|
26
|
-
10.
|
|
23
|
+
7. Enforce delegation-by-step: do not execute planner/implementer/reviewer/validator/release-manager specialist work inline; route to the step owner.
|
|
24
|
+
8. If required owner delegation cannot be performed (missing packet/context/gate input), return `Blocked` with the smallest safe missing-input request.
|
|
25
|
+
9. Do not skip validation gate before release recommendations.
|
|
26
|
+
10. Apply anti-overdelegation: do not delegate trivial one-file doc edits; do not route to more than 2 agents unless cross-functional.
|
|
27
|
+
11. Use delegation contract fields in every handoff: task summary, relevant files, constraints, expected output, validation required, risk level, do-not-change list, evidence required.
|
|
28
|
+
12. Require specialist responses to include summary/findings, files changed or inspected, risks, validation commands, open questions, and recommendation.
|
|
27
29
|
|
|
28
30
|
## Expected Output
|
|
29
31
|
|
package/opencode.jsonc
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.18.
|
|
2
|
+
"version": "1.18.7",
|
|
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",
|
|
@@ -64,7 +64,8 @@
|
|
|
64
64
|
"validate:delegation": "node scripts/validate-delegation.mjs",
|
|
65
65
|
"validate:cli-smoke": "node scripts/validate-cli-smoke.mjs",
|
|
66
66
|
"test:e2e": "node tests/validate-e2e.mjs",
|
|
67
|
-
"validate": "node scripts/validate-all.mjs"
|
|
67
|
+
"validate": "node scripts/validate-all.mjs",
|
|
68
|
+
"release:ship": "node scripts/release-ship.mjs"
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
70
71
|
"@semantic-release/changelog": "^6.0.3",
|
|
@@ -23,9 +23,30 @@ Use this runbook to publish `@williambeto/ai-workflow` to npm with explicit safe
|
|
|
23
23
|
- [ ] `package.json` version is intentional.
|
|
24
24
|
- [ ] `CHANGELOG.md` reflects the release.
|
|
25
25
|
- [ ] `npm run validate` passes.
|
|
26
|
+
- [ ] `npm pack --dry-run` reviewed (file list, size, no surprises).
|
|
27
|
+
- [ ] No sensitive or non-essential files appear in tarball output.
|
|
28
|
+
- [ ] `package.json` `files` allowlist still matches intended distributable assets.
|
|
29
|
+
- [ ] `.npmignore` hardening file is present and reviewed for drift.
|
|
26
30
|
- [ ] Dry-run workflow succeeded (`dry_run=true`).
|
|
27
31
|
- [ ] Release decision/approval is explicit.
|
|
28
32
|
|
|
33
|
+
## Continuous hardening baseline (every release)
|
|
34
|
+
|
|
35
|
+
Run this baseline before any real publish:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm run validate
|
|
39
|
+
npm pack --dry-run
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Then verify explicitly:
|
|
43
|
+
|
|
44
|
+
1. Tarball contains only expected runtime/docs assets.
|
|
45
|
+
2. No local, test, evidence, or backup outputs leaked.
|
|
46
|
+
3. Publish path remains allowlist-first (`package.json` `files`) with `.npmignore` as defense-in-depth.
|
|
47
|
+
|
|
48
|
+
If any unexpected file appears, stop and return `Blocked` until the package boundary is corrected.
|
|
49
|
+
|
|
29
50
|
## Publish steps
|
|
30
51
|
|
|
31
52
|
1. Open GitHub Actions.
|
|
@@ -40,6 +61,7 @@ Use this runbook to publish `@williambeto/ai-workflow` to npm with explicit safe
|
|
|
40
61
|
- Workflow run URL.
|
|
41
62
|
- `npm run validate` result from workflow logs.
|
|
42
63
|
- `npm pack --dry-run` output.
|
|
64
|
+
- Tarball boundary decision note (why contents are safe for public publish).
|
|
43
65
|
- Published version and npm package URL.
|
|
44
66
|
- Any warnings and mitigation notes.
|
|
45
67
|
|