@williambeto/ai-workflow 2.4.9 → 2.6.3
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/bin/ai-workflow.d.ts +3 -0
- package/bin/ai-workflow.js +2669 -1
- package/bin/ai-workflow.js.map +1 -0
- package/chunk-2AOV2ATY.js +749 -0
- package/chunk-5WRI5ZAA.js +31 -0
- package/chunk-6EMG6FAO.js +734 -0
- package/chunk-UHLZX2EG.js +1827 -0
- package/core/index.d.ts +440 -0
- package/core/index.js +32 -0
- package/core/index.js.map +1 -0
- package/dist-assets/AGENTS.md +23 -6
- package/dist-assets/agents/atlas.md +8 -8
- package/dist-assets/agents/nexus.md +4 -4
- package/dist-assets/agents/orion.md +1 -1
- package/dist-assets/agents/phoenix.md +1 -1
- package/dist-assets/agents/sage.md +1 -1
- package/dist-assets/commands/implement.md +1 -1
- package/dist-assets/docs/QUICKSTART.md +8 -8
- package/dist-assets/docs/cli-reference.md +7 -7
- package/dist-assets/docs/compatibility/provider-usage.md +1 -9
- package/dist-assets/docs/compatibility/runtime-matrix.md +5 -6
- package/dist-assets/docs/consumer-onboarding.md +2 -2
- package/dist-assets/docs/design-patterns-policy.md +1 -1
- package/dist-assets/docs/npm-consumer-quickstart.md +70 -109
- package/dist-assets/docs/policies/01-BRANCH_GATE.md +1 -1
- package/dist-assets/docs/policies/06-FINAL_EVIDENCE_CONTRACT.md +2 -2
- package/dist-assets/docs/policies/08-PRODUCT_TRUTHFULNESS_AND_PROJECT_DOCS.md +1 -1
- package/dist-assets/docs/policies/10-BEHAVIORAL_CONTRACT_HARDENING.md +1 -1
- package/dist-assets/docs/policies/ORCHESTRATION_PROTOCOL.md +8 -9
- package/dist-assets/docs/policies/PROCEDURE_DELIVERY_ARTIFACTS.md +4 -10
- package/dist-assets/docs/policies/SKILLS_COMMON_GOVERNANCE.md +1 -1
- package/dist-assets/docs/profiles/README.md +2 -2
- package/dist-assets/docs/specs/runtime-operational-contract.md +12 -12
- package/dist-assets/docs/troubleshooting-guide.md +2 -2
- package/dist-assets/docs/visual-validation-guide.md +3 -3
- package/dist-assets/schemas/evidence.schema.json +109 -0
- package/dist-assets/templates/ANTIGRAVITY.md.template +7 -5
- package/dist-assets/templates/CLAUDE.md.template +7 -5
- package/dist-assets/templates/CODEX.md.template +7 -5
- package/evidence-validator-76ZQQYDU.js +6661 -0
- package/package.json +7 -64
- package/{src/core/workspace/read-only-workspace.js → read-only-workspace-PZBE7KAX.js} +14 -31
- package/{src/commands/validate.js → validate-Q2NLLQ5G.js} +30 -22
- package/AGENTS.md +0 -34
- package/CHANGELOG.md +0 -259
- package/LICENSE +0 -21
- package/PUBLISH_MANIFEST.json +0 -34
- package/README.md +0 -129
- package/dist-assets/templates/.geminiignore.template +0 -8
- package/dist-assets/templates/GEMINI.md.template +0 -20
- package/docs/compatibility/provider-usage.md +0 -46
- package/docs/compatibility/runtime-matrix.md +0 -31
- package/docs/getting-started/DESKTOP_PROMPT.md +0 -52
- package/docs/getting-started/authoring-custom-skills.md +0 -80
- package/docs/getting-started/quickstart.md +0 -117
- package/docs/getting-started/troubleshooting.md +0 -123
- package/docs/getting-started/upgrading-to-v2.md +0 -62
- package/src/adapters/index.js +0 -4
- package/src/adapters/platforms/antigravity.js +0 -382
- package/src/adapters/platforms/claude.js +0 -126
- package/src/adapters/platforms/codex.js +0 -113
- package/src/adapters/platforms/gemini.js +0 -245
- package/src/cli.js +0 -155
- package/src/commands/clean.js +0 -106
- package/src/commands/collect-evidence.js +0 -25
- package/src/commands/doctor.js +0 -202
- package/src/commands/execute.js +0 -382
- package/src/commands/init.js +0 -359
- package/src/commands/run.js +0 -112
- package/src/core/backup.js +0 -65
- package/src/core/completion-contract.js +0 -35
- package/src/core/delegation-controller.js +0 -193
- package/src/core/evidence/evidence-ledger.js +0 -98
- package/src/core/execution-planner.js +0 -62
- package/src/core/filesystem.js +0 -141
- package/src/core/finalization/finalizer.js +0 -165
- package/src/core/finalization/workspace-snapshot.js +0 -110
- package/src/core/gates/branch-gate.js +0 -134
- package/src/core/gates/merge-gate.js +0 -74
- package/src/core/handoff/handoff-engine.js +0 -104
- package/src/core/healing/cli-remediation-executor.js +0 -153
- package/src/core/healing/healer-engine.js +0 -212
- package/src/core/healing/runtime-remediation-executor.js +0 -136
- package/src/core/identity.js +0 -43
- package/src/core/install-plan.js +0 -34
- package/src/core/opencode-merge.js +0 -150
- package/src/core/package-assets.js +0 -141
- package/src/core/request-classifier.js +0 -73
- package/src/core/request-router.js +0 -289
- package/src/core/runtime/opencode-adapter.js +0 -202
- package/src/core/sdd/validator.js +0 -67
- package/src/core/statuses.js +0 -29
- package/src/core/symlink-layout.js +0 -93
- package/src/core/templates.js +0 -229
- package/src/core/validation/artifact-fidelity-gate.js +0 -445
- package/src/core/validation/canonical-finalization.js +0 -43
- package/src/core/validation/delivery-decision-engine.js +0 -344
- package/src/core/validation/evidence-collector.js +0 -245
- package/src/core/validation/quality-guard.js +0 -251
- package/src/core/validation/stack-detector.js +0 -65
- package/src/core/validation/validation-planner.js +0 -134
- package/src/core/validation/visual-verifier.js +0 -175
- package/src/core/workflow-profiles.js +0 -107
- package/src/core/workflow-state-machine.js +0 -46
|
@@ -18,7 +18,7 @@ Installs AI Workflow Kit assets into a consumer project.
|
|
|
18
18
|
|
|
19
19
|
**Synopsis:**
|
|
20
20
|
```bash
|
|
21
|
-
ai-workflow init [--yes] [--force] [--dry-run] [--no-install] [--no-overwrite] [--profile=<profile>] [--
|
|
21
|
+
ai-workflow init [--yes] [--force] [--dry-run] [--no-install] [--no-overwrite] [--profile=<profile>] [--claude] [--codex] [--antigravity]
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
**Description:**
|
|
@@ -32,14 +32,13 @@ Creates the `.ai-workflow/` directory with agents, skills, commands, policies, a
|
|
|
32
32
|
| `--no-install` | Skip installing npm dependencies |
|
|
33
33
|
| `--no-overwrite` | Do not overwrite any existing files |
|
|
34
34
|
| `--profile=<profile>` | Installation profile: `standard` (default) or `full` (includes examples) |
|
|
35
|
-
| `--gemini` | Install Gemini platform adapter configuration |
|
|
36
35
|
| `--claude` | Install Claude platform adapter configuration |
|
|
37
36
|
| `--codex` | Install Codex platform adapter configuration |
|
|
38
37
|
| `--antigravity` | Install Antigravity platform adapter configuration |
|
|
39
38
|
|
|
40
39
|
**Example:**
|
|
41
40
|
```bash
|
|
42
|
-
ai-workflow init --yes --profile=full --
|
|
41
|
+
ai-workflow init --yes --profile=full --antigravity --claude
|
|
43
42
|
```
|
|
44
43
|
|
|
45
44
|
---
|
|
@@ -54,7 +53,7 @@ ai-workflow execute "<request>" [--task=<slug>] [--request="<request>"]
|
|
|
54
53
|
```
|
|
55
54
|
|
|
56
55
|
**Description:**
|
|
57
|
-
Accepts a natural language request, classifies intent, selects the appropriate
|
|
56
|
+
Accepts a natural language request, classifies intent, selects the appropriate proportional policies, creates a safe branch, delegates to the right agent, runs observed validation, and returns a structured delivery summary.
|
|
58
57
|
|
|
59
58
|
| Flag | Description |
|
|
60
59
|
| --- | --- |
|
|
@@ -129,19 +128,20 @@ ai-workflow collect-evidence [--task=<slug>] [--mode=<mode>] [--dry-run] [--visu
|
|
|
129
128
|
```
|
|
130
129
|
|
|
131
130
|
**Description:**
|
|
132
|
-
Executes validation scripts, collects results, and produces a delivery summary.
|
|
131
|
+
Executes validation scripts, collects results, and produces a delivery summary. Under the required evidence policy, persists an `EVIDENCE.json` artifact. Returns one of three statuses: `COMPLETED`, `COMPLETED_WITH_NOTES`, or `BLOCKED`.
|
|
133
132
|
|
|
134
133
|
| Flag | Description |
|
|
135
134
|
| --- | --- |
|
|
136
135
|
| `--task=<slug>` | Optional task slug to associate with the evidence |
|
|
137
|
-
| `--
|
|
136
|
+
| `--evidence-policy=<policy>` | Controls whether EVIDENCE.json is persisted: `optional` or `required` |
|
|
137
|
+
| `--mode=<mode>` | (Deprecated) Legacy validation mode compatibility mapping: `quick`, `standard`, or `full` |
|
|
138
138
|
| `--dry-run` | Run checks without writing `EVIDENCE.json` |
|
|
139
139
|
| `--visual-dist=<path>` | Path to built frontend assets for visual validation |
|
|
140
140
|
| `--port=<port>` | Port for serving frontend assets |
|
|
141
141
|
|
|
142
142
|
**Example:**
|
|
143
143
|
```bash
|
|
144
|
-
ai-workflow collect-evidence --
|
|
144
|
+
ai-workflow collect-evidence --evidence-policy=required --task=auth-feature
|
|
145
145
|
ai-workflow collect-evidence --dry-run
|
|
146
146
|
```
|
|
147
147
|
|
|
@@ -25,21 +25,13 @@ npx @williambeto/ai-workflow init --yes --claude
|
|
|
25
25
|
|
|
26
26
|
Review `CLAUDE.md` and `.claude/rules/`. Existing user-authored instructions must not be overwritten without backup and explicit intent.
|
|
27
27
|
|
|
28
|
-
## Gemini CLI
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npx @williambeto/ai-workflow init --yes --gemini
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Review `GEMINI.md` and `.gemini/`. Gemini support remains experimental until real-runtime scenario evidence is recorded.
|
|
35
|
-
|
|
36
28
|
## Antigravity
|
|
37
29
|
|
|
38
30
|
```bash
|
|
39
31
|
npx @williambeto/ai-workflow init --yes --antigravity
|
|
40
32
|
```
|
|
41
33
|
|
|
42
|
-
Review `ANTIGRAVITY.md` and `.agents/`. Antigravity
|
|
34
|
+
Review `ANTIGRAVITY.md` and `.agents/`. Antigravity is supported and acts as the primary reference ecosystem for configuring and executing specialized agents and skills.
|
|
43
35
|
|
|
44
36
|
## Multiple adapters
|
|
45
37
|
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
| OpenCode | Primary | `opencode.jsonc`, OpenCode agents, commands, and skills | init, doctor, package smoke, generated-file checks | Model may bypass canonical commands in direct conversation |
|
|
13
13
|
| Codex | Supported with limitations | `.github/agents/`, `.agents/skills/`, `.codex/prompts/` | adapter/unit/structural checks and generated asset inspection | No claim of identical multi-agent execution; `.codex/` output is optional and only generated with `--codex` |
|
|
14
14
|
| Claude Code | Supported with limitations | `CLAUDE.md`, `.claude/rules/` | adapter/unit/structural checks and generated asset inspection | Rule loading and tool permissions depend on Claude Code configuration |
|
|
15
|
-
| Gemini CLI | Experimental | `GEMINI.md`, `.gemini/agents/`, `.gemini/skills/`, `.gemini/commands/` | adapter/unit/structural checks and generated asset inspection | Native discovery and command behavior require real Gemini CLI validation before `Supported` |
|
|
16
15
|
| Antigravity | Supported | `ANTIGRAVITY.md`, `.agents/agents/`, `.agents/skills/`, `.agents/commands/` | unit tests, validation suite, and WSL/Desktop consumer validation | Agents are only listed under `/agents` when actively running (instantiated via `invoke_subagent`) |
|
|
17
16
|
|
|
18
17
|
## Claim policy
|
|
@@ -24,8 +23,8 @@ Compatibility levels must be based on evidence available in the release. Adapter
|
|
|
24
23
|
A runtime may be promoted only after a clean consumer test records:
|
|
25
24
|
|
|
26
25
|
1. package installation;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
1. `init` with the runtime flag;
|
|
27
|
+
1. expected generated assets;
|
|
28
|
+
1. runtime startup or configuration validation;
|
|
29
|
+
1. at least one low-risk workflow scenario;
|
|
30
|
+
1. known limitations and failures.
|
|
@@ -6,12 +6,12 @@ Atlas will:
|
|
|
6
6
|
|
|
7
7
|
1. inspect project context;
|
|
8
8
|
2. verify branch safety before writes;
|
|
9
|
-
3. select
|
|
9
|
+
3. select proportional risk and evidence policies;
|
|
10
10
|
4. apply the closest domain profile;
|
|
11
11
|
5. delegate only when it improves quality;
|
|
12
12
|
6. run relevant validation;
|
|
13
13
|
7. return a concise delivery summary.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Workflows under the optional evidence policy do not require owner JSON, fixed workflow filenames, checklists, or EVIDENCE.json. Workflows under the required evidence policy (high-risk, release, audit, security, or migration tasks) must persist structured evidence.
|
|
16
16
|
|
|
17
17
|
A failed required command or unsafe protected-branch state always finishes `BLOCKED`.
|
|
@@ -112,7 +112,7 @@ Do not introduce these unless explicitly justified by current complexity and arc
|
|
|
112
112
|
For workflow kits, CLIs, validators, presets, templates, and npm-package-style code:
|
|
113
113
|
|
|
114
114
|
- prefer Command for CLI actions/validation tasks;
|
|
115
|
-
- prefer Strategy for interchangeable execution
|
|
115
|
+
- prefer Strategy for interchangeable execution algorithms;
|
|
116
116
|
- prefer Adapter for OpenCode/GitHub/filesystem/package-manager integrations;
|
|
117
117
|
- prefer Simple Factory for config-based creation;
|
|
118
118
|
- prefer Builder for generated documents/reports;
|
|
@@ -1,141 +1,102 @@
|
|
|
1
|
-
#
|
|
1
|
+
# NPM Consumer Quickstart & Onboarding
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An operational onboarding guide for integrating the AI Workflow Kit (AIWK) into your codebase.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 🔒 Enterprise Security & Reliability Gates
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
AIWK is designed under a **Zero Regression Guarantee**. It acts as an orchestrator and validator that sandboxes AI agent execution:
|
|
10
|
+
- **No Production Disruptions**: It operates strictly on ephemeral feature branches. Merges to `main` or `master` are blocked until gates pass.
|
|
11
|
+
- **Observed Quality Gates**: Every code modification must satisfy visual regression, formatting, unit tests, and accessibility checks before generating delivery evidence.
|
|
12
|
+
- **Clean Execution**: Backup mechanisms preserve any local changes if cleanups are triggered during failure remediation loops.
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
npm install @williambeto/ai-workflow
|
|
13
|
-
```
|
|
14
|
+
---
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
## 📦 1. Installation
|
|
17
|
+
|
|
18
|
+
Integrate AIWK into your development workspace:
|
|
16
19
|
|
|
17
20
|
```bash
|
|
21
|
+
# Add as a development dependency
|
|
22
|
+
npm install -D @williambeto/ai-workflow
|
|
23
|
+
|
|
24
|
+
# Or install globally for general CLI access
|
|
18
25
|
npm install -g @williambeto/ai-workflow
|
|
19
26
|
```
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Verify the package installed correctly:
|
|
28
|
+
Verify that the executable resolves correctly:
|
|
24
29
|
|
|
25
30
|
```bash
|
|
26
|
-
|
|
27
|
-
npx @williambeto/ai-workflow --help
|
|
31
|
+
npx ai-workflow doctor
|
|
28
32
|
```
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- a CLI binary (`ai-workflow`);
|
|
33
|
-
- core scripts for `init`, `doctor`, and workflow validation;
|
|
34
|
-
- template and skill references that the CLI installs into your project.
|
|
34
|
+
---
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## 🚀 2. Initializing Your Codebase
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Bootstrap the managed workflow assets inside your repository. This process generates instructions, commands, templates, and safety configurations for AI agents:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
npx
|
|
42
|
-
npx @williambeto/ai-workflow doctor
|
|
41
|
+
npx ai-workflow init --yes
|
|
43
42
|
```
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
> [!TIP]
|
|
45
|
+
> Use the `--profile=full` flag if you want to include reference template files and detailed implementation examples.
|
|
46
|
+
> Use `--dry-run` to preview the files that will be generated before writing to disk.
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- starter agent and skill files.
|
|
48
|
+
### What is generated?
|
|
49
|
+
1. **`.ai-workflow/`**: The core directory containing your project's customized agent configurations, prompts, and templates.
|
|
50
|
+
2. **`opencode.jsonc`**: Configuration mappings linking your AI runtime (OpenCode, Claude, Codex, etc.) to the AIWK agent team.
|
|
51
|
+
3. **`README.workflow.md`**: Symlinked to the root as the first file that any AI agent reads to align with your project rules.
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
---
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
npx @williambeto/ai-workflow init --dry-run
|
|
57
|
-
```
|
|
55
|
+
## 🤖 3. The OpenCode Workflow CLI
|
|
58
56
|
|
|
59
|
-
|
|
57
|
+
Once initialized, you can launch your agent team using the `opencode` runtime, which uses the commands defined by the AIWK:
|
|
60
58
|
|
|
61
|
-
|
|
59
|
+
| Command | Purpose | Lifecycle Phase |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| **`Atlas`** | Routing entrypoint & Classification | Intake |
|
|
62
|
+
| **`discover`** | Gather project files and context | Intake |
|
|
63
|
+
| **`spec-create`** | Create a functional specification | Specification |
|
|
64
|
+
| **`spec-review`** | Verify and review specification scope | Specification |
|
|
65
|
+
| **`plan`** | Formulate a technical implementation plan | Planning |
|
|
66
|
+
| **`implement`** | Execute code changes for a single PR | Implementation |
|
|
67
|
+
| **`validate`** | Run tests, visual gates, and collect evidence | Validation |
|
|
68
|
+
| **`deploy`** | Evaluate deployment and release readiness | Release |
|
|
62
69
|
|
|
63
|
-
|
|
64
|
-
- Workflow-managed assets should be edited in `.ai-workflow/` when customization is intentional.
|
|
65
|
-
- The package remains available for future updates (`npm update @williambeto/ai-workflow`).
|
|
66
|
-
- Run `npx @williambeto/ai-workflow init --force` to regenerate managed files when the package is updated.
|
|
67
|
-
- Backup copies of replaced files are stored in `.ai-workflow-backups/`.
|
|
70
|
+
---
|
|
68
71
|
|
|
69
|
-
|
|
72
|
+
## 📊 4. Onboarding Checklist
|
|
70
73
|
|
|
71
|
-
|
|
74
|
+
After running `init`, check off these items to verify integration success:
|
|
72
75
|
|
|
73
|
-
|
|
76
|
+
- [ ] `npx ai-workflow doctor` reports a fully green/PASS status.
|
|
77
|
+
- [ ] `README.workflow.md` is visible at your project root.
|
|
78
|
+
- [ ] `opencode.jsonc` has been successfully created/updated.
|
|
79
|
+
- [ ] Standard test scripts (`npm test`) run and pass locally.
|
|
80
|
+
- [ ] The `.ai-workflow/` folder is committed to your repository so all developers share the same AI safety gates.
|
|
74
81
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 🔍 5. Troubleshooting & FAQ
|
|
85
|
+
|
|
86
|
+
| Problem | Cause | Solution |
|
|
87
|
+
| --- | --- | --- |
|
|
88
|
+
| **Windows Symlink Errors** | Lacks permission to link files from `.ai-workflow/`. | Enable **Developer Mode** in Windows Settings or run your terminal as Administrator. |
|
|
89
|
+
| **`doctor` reports missing files** | Accidental file deletions in the configuration paths. | Re-run `npx ai-workflow init --force` to restore missing templates. |
|
|
90
|
+
| **Tests fail on `collect-evidence`** | A quality gate is failing or the `test` script is missing. | Verify your `package.json` has a valid `test` script. AIWK blocks delivery if tests exit with non-zero codes. |
|
|
91
|
+
| **`ERR_MODULE_NOT_FOUND`** | Deprecated Node.js runtime or execution paths. | Ensure you are running Node.js **>= 20.11** and executing the CLI from your project root. |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 📖 6. Recommended Next Steps
|
|
78
96
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
| `spec-create` | Specification creation |
|
|
86
|
-
| `spec-review` | Specification review |
|
|
87
|
-
| `plan` | Create a plan from a requirement |
|
|
88
|
-
| `implement` | Implement one selected PR |
|
|
89
|
-
| `validate` | Validate work with evidence |
|
|
90
|
-
| `deploy` | Prepare deployment readiness |
|
|
91
|
-
|
|
92
|
-
For agent routing and subagent delegation, see `opencode/agents/`.
|
|
93
|
-
|
|
94
|
-
## Validation checklist
|
|
95
|
-
|
|
96
|
-
After `init` and `doctor`, confirm:
|
|
97
|
-
|
|
98
|
-
- [ ] `npx @williambeto/ai-workflow doctor` reports no errors
|
|
99
|
-
- [ ] `npm run validate` passes (or project-specific validation commands)
|
|
100
|
-
- [ ] `README.workflow.md` exists at the project root
|
|
101
|
-
- [ ] `opencode.jsonc` contains managed sections
|
|
102
|
-
- [ ] OpenCode config is present (`opencode.jsonc`)
|
|
103
|
-
- [ ] No unintended file changes outside workflow-managed paths
|
|
104
|
-
- [ ] Review backup files in `.ai-workflow-backups/` if any exist
|
|
105
|
-
|
|
106
|
-
## Troubleshooting
|
|
107
|
-
|
|
108
|
-
| Problem | Likely cause and fix |
|
|
109
|
-
| --- | --- |
|
|
110
|
-
| `npx` command not found | Install Node.js 20+ and npm. |
|
|
111
|
-
| Init fails with permission error | Run in a project directory where you have write access. |
|
|
112
|
-
| `doctor` reports missing files | Run `npx @williambeto/ai-workflow init --force` to regenerate. |
|
|
113
|
-
| Init fails creating symlink | Windows: enable Developer Mode or run terminal as Administrator. Linux/macOS: verify write permissions and rerun `npx @williambeto/ai-workflow init --force`. |
|
|
114
|
-
| OpenCode does not recognize commands | Confirm `opencode.jsonc` was created and contains the expected managed sections. |
|
|
115
|
-
| Commands not available | Run `npx @williambeto/ai-workflow init --force` to regenerate command files. |
|
|
116
|
-
| Conflicts with existing files | Preview with `--dry-run`, then use `--no-overwrite` to skip conflicting files. |
|
|
117
|
-
| Backup files accumulate | Clean `rm -rf .ai-workflow-backups/` when backups are no longer needed. |
|
|
118
|
-
| Package version needs update | Run `npm update @williambeto/ai-workflow`. |
|
|
119
|
-
|
|
120
|
-
## Next recommended workflow
|
|
121
|
-
|
|
122
|
-
After install, `init`, `doctor`, and validation pass:
|
|
123
|
-
|
|
124
|
-
1. Pick one small feature or documentation change in your project.
|
|
125
|
-
2. Start with `README.workflow.md` and your local project rules.
|
|
126
|
-
3. Create a requirement before writing code.
|
|
127
|
-
4. Write a functional specification for shared understanding.
|
|
128
|
-
5. Create a technical plan before implementation.
|
|
129
|
-
6. Split the work into small reviewable PRs.
|
|
130
|
-
7. Implement only the first PR.
|
|
131
|
-
8. Review and validate before continuing.
|
|
132
|
-
|
|
133
|
-
For a guided walkthrough, see:
|
|
134
|
-
|
|
135
|
-
- [`QUICKSTART.md`](QUICKSTART.md) (consolidated walkthrough)
|
|
136
|
-
- [`runbooks/apply-starter-to-real-project.md`](../runbooks/apply-starter-to-real-project.md)
|
|
137
|
-
|
|
138
|
-
## Reference
|
|
139
|
-
|
|
140
|
-
- Package source: <https://github.com/williambeto/ai-workflow>
|
|
141
|
-
- OpenCode docs: <https://opencode.ai/docs>
|
|
97
|
+
1. **Configure Rules**: Open [AGENTS.md](../../AGENTS.md) and adapt the project-specific policies.
|
|
98
|
+
2. **Setup E2E Tools**: For visual and accessibility gates, ensure `playwright` is installed in `devDependencies` and run `npx playwright install chromium`.
|
|
99
|
+
3. **Execute a Test Task**: Run a test command to watch the agents work:
|
|
100
|
+
```bash
|
|
101
|
+
npx ai-workflow execute "Update the repository contributing guide"
|
|
102
|
+
```
|
|
@@ -13,7 +13,7 @@ Branch Gate is a safety mechanism, not a dead end.
|
|
|
13
13
|
|
|
14
14
|
`main` and `master` are protected for direct writes.
|
|
15
15
|
|
|
16
|
-
For write-capable
|
|
16
|
+
For write-capable tasks invoked on `main`/`master`:
|
|
17
17
|
|
|
18
18
|
1. create a safe scoped branch when the repository state allows it;
|
|
19
19
|
2. verify the branch changed;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Evidence exists to help the user trust the delivery. It must not become the delivery itself.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Optional evidence policy work
|
|
6
6
|
|
|
7
7
|
No fixed workflow filename, owner JSON, checklist, or `EVIDENCE.json` is required.
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ The final handoff must state:
|
|
|
16
16
|
|
|
17
17
|
A report written by an agent is not proof that a command ran. Command results must come from observed execution.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Required evidence policy work
|
|
20
20
|
|
|
21
21
|
Persisted evidence is appropriate when traceability has lasting value. The runtime may write a structured evidence file containing branch state, changed files, command exit codes, checks, limitations, and final status.
|
|
22
22
|
|
|
@@ -15,4 +15,4 @@ Truthfulness is primarily a semantic review responsibility. Keyword matching is
|
|
|
15
15
|
|
|
16
16
|
Update documentation when setup, usage, public behavior, architecture, or operational expectations changed. Do not create documentation solely to satisfy a gate.
|
|
17
17
|
|
|
18
|
-
For
|
|
18
|
+
For low-risk work, a concise final summary may be sufficient. High-risk, release, migration, and audit work may justify persisted documentation.
|
|
@@ -6,4 +6,4 @@ The runtime hardens three outcomes, not report formatting:
|
|
|
6
6
|
2. existing relevant validation is executed and observed;
|
|
7
7
|
3. failed or unavailable required validation cannot become success.
|
|
8
8
|
|
|
9
|
-
Prompt text, workflow filenames, owner labels, and checklists are not independent proof.
|
|
9
|
+
Prompt text, workflow filenames, owner labels, and checklists are not independent proof. Workflows under the optional evidence policy remain proportionate. Workflows under the required evidence policy must persist structured runtime evidence.
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
# Orchestration protocol
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The AI Workflow Kit operates under a single, mandatory orchestration protocol:
|
|
4
|
+
Request → Planning → Branch Gate → Delegation → Implementation → Validation → Evidence
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Proportional constraints adapt gate checks and depth according to the active policies (`riskLevel`, `evidencePolicy`, `remediationLimit`, `specPolicy`).
|
|
6
7
|
|
|
7
|
-
##
|
|
8
|
+
## Policies
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
- **Low Risk:** Streamlined targeted validation and checklist-based quality gates.
|
|
11
|
+
- **Medium Risk:** Comprehensive planning, PR breakdown, relevant test suite validation, and automated healing.
|
|
12
|
+
- **High Risk:** Thorough discovery/specification, technical planning, independent validation, and persisted machine-generated evidence.
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Discovery/specification → safe branch → specialist implementation → independent validation → bounded remediation → revalidation → persisted evidence → final decision.
|
|
14
|
-
|
|
15
|
-
Protected-branch safety, required validation, and false-success prevention apply to every write-capable mode.
|
|
14
|
+
Protected-branch safety, required validation, and false-success prevention apply to every write-capable task.
|
|
@@ -2,19 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Artefacts are proportional to risk and future value.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Optional Evidence Policy
|
|
6
6
|
|
|
7
|
-
No mandatory persisted artefact. Provide a concise final summary with validation evidence.
|
|
7
|
+
No mandatory persisted artefact. Update project documentation only when behavior, setup, usage, or architecture changed. Provide a concise final summary with validation evidence.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Required Evidence Policy
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
A delivery report is optional when it helps review or handoff.
|
|
14
|
-
|
|
15
|
-
## Full
|
|
16
|
-
|
|
17
|
-
Persist a concise evidence package appropriate to the task. It should record requirements or scope, implementation, validation, unresolved limitations, and final decision without duplicating the same information across several files.
|
|
11
|
+
Persist a concise evidence package (EVIDENCE.json) appropriate to the task. It should record requirements or scope, implementation, validation, unresolved limitations, and final decision without duplicating the same information across several files.
|
|
18
12
|
|
|
19
13
|
## Rule
|
|
20
14
|
|
|
@@ -11,7 +11,7 @@ All executing agents and specialist roles must respect these rules:
|
|
|
11
11
|
- **Ownership**: Use the owning primary agent; a skill supplies domain judgment and must not pretend that delegation occurred.
|
|
12
12
|
- **Reference Lookups**: Load the project conventions and the domain references named by this skill before making decisions.
|
|
13
13
|
- **Truthfulness**: Do not invent capabilities, integrations, metrics, users, evidence, validation, security properties, or completed work.
|
|
14
|
-
- **Proportionality**: Use the smallest safe
|
|
14
|
+
- **Proportionality**: Use the smallest safe proportional policies and keep artifacts proportional.
|
|
15
15
|
- **Delivery Support**: Implementation support must include relevant documentation, tests, validation, and current-task evidence.
|
|
16
16
|
- **No Compromise**: A blocking finding remains `FAIL_QUALITY_GATE` or `BLOCKED`; never soften it to obtain completion.
|
|
17
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Workflow Profiles
|
|
2
2
|
|
|
3
|
-
Workflow profiles guide domain quality without turning subjective preferences into universal runtime gates.
|
|
3
|
+
Workflow profiles guide domain quality without turning subjective preferences into universal runtime gates. Proportional policies control artifact depth; workflow profile controls domain guidance.
|
|
4
4
|
|
|
5
5
|
The core remains deterministic: branch safety, scope, ownership, tests/build/typecheck, artifacts, evidence, truthfulness contradictions, bounded remediation, and final status.
|
|
6
6
|
|
|
@@ -16,4 +16,4 @@ Available profiles:
|
|
|
16
16
|
- `security-review`
|
|
17
17
|
- `generic`
|
|
18
18
|
|
|
19
|
-
A profile is independent from
|
|
19
|
+
A profile is independent from active policies. Example: `riskLevel: medium + frontend-utility`.
|
|
@@ -12,25 +12,25 @@ Turn a natural software request into a safe, useful, validated delivery with pro
|
|
|
12
12
|
- bounded remediation with `BLOCKED` on no progress;
|
|
13
13
|
- no fabricated command, test, file, or agent claims.
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Proportional Policies
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
The AI Workflow Kit runtime operates on a single, mandatory path:
|
|
18
|
+
Request → Planning → Branch Gate → Delegation → Implementation → Validation → Evidence
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
Operational constraints adapt proportionally using explicit policies:
|
|
21
|
+
- `riskLevel`: `low | medium | high` (controls gate checks and validation depth)
|
|
22
|
+
- `evidencePolicy`: `optional | required` (determines whether a persisted EVIDENCE.json is mandatory)
|
|
23
|
+
- `remediationLimit`: `number` (enforces attempt limits for automatic remediation)
|
|
24
|
+
- `specPolicy`: `none | required` (determines whether a specification document is required)
|
|
20
25
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Understand → brief plan → safe branch → implement → relevant validation → bounded remediation when needed → concise handoff.
|
|
24
|
-
|
|
25
|
-
### Full
|
|
26
|
-
|
|
27
|
-
Discovery/specification → safe branch → specialist implementation → independent validation → bounded remediation → revalidation → persisted evidence → final decision.
|
|
26
|
+
> [!NOTE]
|
|
27
|
+
> Legacy modes (`quick`, `standard`, and `full`) are deprecated. They exist only as CLI-level parsing fallbacks and historical metadata tags, never as active runtime controllers.
|
|
28
28
|
|
|
29
29
|
## Evidence
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Workflows under the `optional` evidence policy report the branch, changed areas, observed commands/results, and limitations. No fixed workflow filenames or owner JSON are required to be saved.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Workflows under the `required` evidence policy (high-risk, release, audit, or explicitly requested tasks) must persist machine-generated evidence as an `EVIDENCE.json` file.
|
|
34
34
|
|
|
35
35
|
## Public completion states
|
|
36
36
|
|
|
@@ -8,9 +8,9 @@ Move to a scoped branch. If tracked dirty work makes recovery unsafe, preserve i
|
|
|
8
8
|
|
|
9
9
|
Inspect the command results. Fix failed tests/build/typecheck/lint, or add a meaningful validation path when none exists. Do not add no-op scripts or workflow documents as substitutes.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Optional evidence policy did not create EVIDENCE.json
|
|
12
12
|
|
|
13
|
-
Expected.
|
|
13
|
+
Expected. Workflows under the optional evidence policy use concise observed evidence. Persisted evidence is reserved for required evidence, release, audit, security, migration, or explicitly requested work.
|
|
14
14
|
|
|
15
15
|
## UI or product quality is weak
|
|
16
16
|
|
|
@@ -69,9 +69,9 @@ Subjective quality (color harmony, readable contrast, visual hierarchy) cannot b
|
|
|
69
69
|
You can configure a specialized `ux-auditor` agent or load a skill containing these rules:
|
|
70
70
|
|
|
71
71
|
1. **Hierarchy & Composition**: The first fold must look like a cohesive layout. Check that headings, buttons, and graphics do not overlap or look cluttered.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
1. **Color Contrast & Accessibility**: Ensure contrast between text and background is high. Avoid using unstyled bright primary colors (e.g., plain red/blue/green) without proper styling.
|
|
73
|
+
1. **Typography**: Typography must use a modern system (e.g., Google Fonts) instead of browser defaults. Line heights should be balanced.
|
|
74
|
+
1. **Responsiveness**: Verify that the mobile render does not cut off text or overflow horizontally.
|
|
75
75
|
|
|
76
76
|
If the Vision LLM finds aesthetic defects, it outputs a `FAIL_QUALITY_GATE` status along with coordinates or descriptions of the design bugs, which are then passed to the `HealerEngine` for remediation.
|
|
77
77
|
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://github.com/williambeto/ai-workflow/schemas/evidence.schema.json",
|
|
3
|
+
"title": "Evidence Artifact",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"timestamp",
|
|
8
|
+
"changedFiles",
|
|
9
|
+
"status",
|
|
10
|
+
"internalStatus",
|
|
11
|
+
"commands"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"timestamp": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"taskSlug": {
|
|
18
|
+
"type": ["string", "null"]
|
|
19
|
+
},
|
|
20
|
+
"executionMode": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"workflowProfile": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"branchRecovery": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"branch": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"changedFiles": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"status": {
|
|
39
|
+
"enum": ["COMPLETED", "COMPLETED_WITH_NOTES", "BLOCKED"]
|
|
40
|
+
},
|
|
41
|
+
"internalStatus": {
|
|
42
|
+
"enum": ["PASS", "PASS_WITH_NOTES", "BLOCKED"]
|
|
43
|
+
},
|
|
44
|
+
"commands": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": true,
|
|
49
|
+
"required": [
|
|
50
|
+
"name",
|
|
51
|
+
"command",
|
|
52
|
+
"kind",
|
|
53
|
+
"status"
|
|
54
|
+
],
|
|
55
|
+
"properties": {
|
|
56
|
+
"name": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"command": {
|
|
60
|
+
"type": ["string", "object", "array"]
|
|
61
|
+
},
|
|
62
|
+
"kind": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"status": {
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
68
|
+
"exitCode": {
|
|
69
|
+
"type": ["number", "null"]
|
|
70
|
+
},
|
|
71
|
+
"signal": {
|
|
72
|
+
"type": ["string", "null"]
|
|
73
|
+
},
|
|
74
|
+
"summary": {
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"output": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
"commitHash": {
|
|
81
|
+
"type": "string"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"checks": {
|
|
87
|
+
"type": ["object", "null"],
|
|
88
|
+
"additionalProperties": true
|
|
89
|
+
},
|
|
90
|
+
"limitations": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": {
|
|
93
|
+
"type": "string"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"deliveryDecision": {
|
|
97
|
+
"type": ["object", "null"],
|
|
98
|
+
"additionalProperties": true
|
|
99
|
+
},
|
|
100
|
+
"artifactFidelityCheck": {
|
|
101
|
+
"type": ["object", "null"],
|
|
102
|
+
"additionalProperties": true
|
|
103
|
+
},
|
|
104
|
+
"visualEvidence": {
|
|
105
|
+
"type": ["object", "null"],
|
|
106
|
+
"additionalProperties": true
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|