@williambeto/ai-workflow 2.4.9 → 2.6.4
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 +1138 -168
- package/README.md +203 -77
- 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/PUBLISH_MANIFEST.json +0 -34
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@williambeto/ai-workflow",
|
|
3
|
-
"version": "2.4
|
|
3
|
+
"version": "2.6.4",
|
|
4
4
|
"description": "AI Workflow Kit — OpenCode-first software delivery workflow with agents, commands, skills, validation, and evidence",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "José Willams",
|
|
@@ -34,69 +34,12 @@
|
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"bin",
|
|
37
|
-
"
|
|
37
|
+
"core",
|
|
38
38
|
"dist-assets",
|
|
39
|
-
"
|
|
39
|
+
"*.js",
|
|
40
|
+
"package.json",
|
|
40
41
|
"README.md",
|
|
41
42
|
"LICENSE",
|
|
42
|
-
"CHANGELOG.md"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"docs/compatibility"
|
|
46
|
-
],
|
|
47
|
-
"scripts": {
|
|
48
|
-
"build": "node internal/validate/build-publish.mjs",
|
|
49
|
-
"validate": "node internal/validate/validate-all.mjs",
|
|
50
|
-
"validate:json": "node internal/validate/validate-json.mjs",
|
|
51
|
-
"validate:structure": "node internal/validate/validate-structure.mjs",
|
|
52
|
-
"validate:refs": "node internal/validate/validate-refs.mjs",
|
|
53
|
-
"validate:artifact-safety": "node internal/validate/validate-artifact-safety.mjs",
|
|
54
|
-
"validate:links": "node internal/validate/validate-links.mjs",
|
|
55
|
-
"validate:docs-consistency": "node internal/validate/validate-doc-consistency.mjs",
|
|
56
|
-
"validate:workflow": "node internal/validate/validate-workflow.mjs",
|
|
57
|
-
"validate:schemas": "node internal/validate/validate-schemas.mjs",
|
|
58
|
-
"validate:skills": "node internal/validate/validate-skills.mjs",
|
|
59
|
-
"validate:subagents": "node internal/validate/validate-subagents.mjs",
|
|
60
|
-
"validate:commands": "node internal/validate/validate-commands.mjs",
|
|
61
|
-
"validate:agents": "node internal/validate/validate-agents.mjs",
|
|
62
|
-
"validate:policy-refs": "node internal/validate/validate-policy-refs.mjs",
|
|
63
|
-
"validate:privacy-gate": "node internal/validate/validate-privacy-gate.mjs",
|
|
64
|
-
"validate:ui-evidence": "node internal/validate/validate-ui-evidence-gate.mjs",
|
|
65
|
-
"validate:delegation": "node internal/validate/validate-delegation.mjs",
|
|
66
|
-
"validate:routing": "node internal/validate/validate-routing-consistency.mjs",
|
|
67
|
-
"validate:cli-smoke": "node internal/validate/validate-cli-smoke.mjs",
|
|
68
|
-
"validate:cli-docs": "node internal/validate/validate-cli-docs.mjs",
|
|
69
|
-
"lint:md": "markdownlint \"**/*.md\"",
|
|
70
|
-
"validate:registry": "node internal/validate/validate-registry-integrity.mjs",
|
|
71
|
-
"clean:verify": "node -e \"const fs = require('fs'); fs.rmSync('dist', { recursive: true, force: true }); fs.readdirSync('.').filter(f => f.endsWith('.tgz')).forEach(f => fs.rmSync(f, { force: true }));\"",
|
|
72
|
-
"test": "npm run test:unit",
|
|
73
|
-
"test:unit": "vitest run tests/unit/",
|
|
74
|
-
"test:watch": "vitest",
|
|
75
|
-
"test:coverage": "vitest run --coverage",
|
|
76
|
-
"test:e2e": "node tests/validate-e2e.mjs && vitest run tests/e2e/consumer-workflow.test.js",
|
|
77
|
-
"test:e2e:runtime": "AI_WORKFLOW_RELEASE=1 vitest run tests/e2e/consumer-workflow.test.js -t \"Real OpenCode Smoke Test\"",
|
|
78
|
-
"release:verify": "npm run clean:verify && npm test && npm run test:e2e && npm run validate && npm run pack:verify && npm run test:e2e:runtime",
|
|
79
|
-
"pack:verify": "node tests/e2e/verify-packed-consumer.mjs",
|
|
80
|
-
"pack:safe": "node internal/validate/pack-safe.mjs",
|
|
81
|
-
"validate:behavioral-contracts": "node internal/validate/validate-behavioral-contracts.mjs",
|
|
82
|
-
"validate:token-economy": "node internal/validate/validate-token-economy.mjs",
|
|
83
|
-
"validate:upgrade": "node internal/validate/validate-upgrade-path.mjs",
|
|
84
|
-
"validate:visual": "node internal/validate/validate-visual.mjs",
|
|
85
|
-
"validate:release-readiness": "node internal/validate/validate-release-readiness.mjs"
|
|
86
|
-
},
|
|
87
|
-
"devDependencies": {
|
|
88
|
-
"@playwright/test": "^1.60.0",
|
|
89
|
-
"@semantic-release/changelog": "^6.0.3",
|
|
90
|
-
"@semantic-release/git": "^10.0.1",
|
|
91
|
-
"@semantic-release/github": "^12.0.8",
|
|
92
|
-
"@semantic-release/npm": "^13.1.5",
|
|
93
|
-
"@vitest/coverage-v8": "^4.1.7",
|
|
94
|
-
"ajv": "^8.20.0",
|
|
95
|
-
"ajv-formats": "^3.0.1",
|
|
96
|
-
"axe-core": "^4.10.0",
|
|
97
|
-
"markdownlint-cli": "^0.49.0",
|
|
98
|
-
"playwright": "^1.60.0",
|
|
99
|
-
"semantic-release": "^25.0.3",
|
|
100
|
-
"vitest": "^4.1.7"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
43
|
+
"CHANGELOG.md"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import os from "node:os";
|
|
4
|
-
import crypto from "node:crypto";
|
|
1
|
+
import "./chunk-5WRI5ZAA.js";
|
|
5
2
|
|
|
3
|
+
// src/core/workspace/read-only-workspace.ts
|
|
4
|
+
import fs from "fs/promises";
|
|
5
|
+
import path from "path";
|
|
6
|
+
import os from "os";
|
|
7
|
+
import crypto from "crypto";
|
|
6
8
|
async function copyDirectory(src, dest) {
|
|
7
9
|
const entries = await fs.readdir(src, { withFileTypes: true });
|
|
8
10
|
for (const entry of entries) {
|
|
@@ -11,7 +13,6 @@ async function copyDirectory(src, dest) {
|
|
|
11
13
|
}
|
|
12
14
|
const srcPath = path.join(src, entry.name);
|
|
13
15
|
const destPath = path.join(dest, entry.name);
|
|
14
|
-
|
|
15
16
|
if (entry.isDirectory()) {
|
|
16
17
|
await fs.mkdir(destPath, { recursive: true });
|
|
17
18
|
await copyDirectory(srcPath, destPath);
|
|
@@ -20,13 +21,11 @@ async function copyDirectory(src, dest) {
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
|
|
24
24
|
async function captureHashSnapshot(dir) {
|
|
25
25
|
const snapshot = {};
|
|
26
26
|
await scanDir(dir, dir, snapshot);
|
|
27
27
|
return snapshot;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
29
|
async function scanDir(baseDir, currentDir, snapshot) {
|
|
31
30
|
const entries = await fs.readdir(currentDir, { withFileTypes: true });
|
|
32
31
|
for (const entry of entries) {
|
|
@@ -35,7 +34,6 @@ async function scanDir(baseDir, currentDir, snapshot) {
|
|
|
35
34
|
}
|
|
36
35
|
const fullPath = path.join(currentDir, entry.name);
|
|
37
36
|
const relPath = path.relative(baseDir, fullPath);
|
|
38
|
-
|
|
39
37
|
if (entry.isDirectory()) {
|
|
40
38
|
await scanDir(baseDir, fullPath, snapshot);
|
|
41
39
|
} else if (entry.isFile()) {
|
|
@@ -44,24 +42,14 @@ async function scanDir(baseDir, currentDir, snapshot) {
|
|
|
44
42
|
const hash = crypto.createHash("sha256").update(content).digest("hex");
|
|
45
43
|
snapshot[relPath] = hash;
|
|
46
44
|
} catch {
|
|
47
|
-
// ignore
|
|
48
45
|
}
|
|
49
46
|
}
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Runs a function inside a temporary copy of the workspace.
|
|
55
|
-
* Mutating the workspace inside this temp directory will trigger a BLOCKED result.
|
|
56
|
-
*/
|
|
57
|
-
export async function runInReadOnlyWorkspace(originalCwd, runFn) {
|
|
49
|
+
async function runInReadOnlyWorkspace(originalCwd, runFn) {
|
|
58
50
|
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "opencode-ro-"));
|
|
59
|
-
|
|
60
51
|
try {
|
|
61
|
-
// 1. Copy repository files recursively (excluding git/node_modules/tmp)
|
|
62
52
|
await copyDirectory(originalCwd, tempDir);
|
|
63
|
-
|
|
64
|
-
// 2. Write the required opencode.jsonc permission config file
|
|
65
53
|
const opencodeConfig = {
|
|
66
54
|
permission: {
|
|
67
55
|
edit: "deny",
|
|
@@ -80,16 +68,9 @@ export async function runInReadOnlyWorkspace(originalCwd, runFn) {
|
|
|
80
68
|
path.join(tempDir, "opencode.jsonc"),
|
|
81
69
|
JSON.stringify(opencodeConfig, null, 2)
|
|
82
70
|
);
|
|
83
|
-
|
|
84
|
-
// 3. Capture initial file hash snapshot
|
|
85
71
|
const snapshotBefore = await captureHashSnapshot(tempDir);
|
|
86
|
-
|
|
87
|
-
// 4. Execute the callback function inside the temp directory
|
|
88
72
|
const runResult = await runFn(tempDir);
|
|
89
|
-
|
|
90
|
-
// 5. Capture post-run snapshot and verify no file mutations occurred
|
|
91
73
|
const snapshotAfter = await captureHashSnapshot(tempDir);
|
|
92
|
-
|
|
93
74
|
const mutated = [];
|
|
94
75
|
for (const [file, hash] of Object.entries(snapshotAfter)) {
|
|
95
76
|
if (snapshotBefore[file] !== hash) {
|
|
@@ -97,11 +78,10 @@ export async function runInReadOnlyWorkspace(originalCwd, runFn) {
|
|
|
97
78
|
}
|
|
98
79
|
}
|
|
99
80
|
for (const file of Object.keys(snapshotBefore)) {
|
|
100
|
-
if (snapshotAfter[file] ===
|
|
81
|
+
if (snapshotAfter[file] === void 0) {
|
|
101
82
|
mutated.push(file);
|
|
102
83
|
}
|
|
103
84
|
}
|
|
104
|
-
|
|
105
85
|
if (mutated.length > 0) {
|
|
106
86
|
return {
|
|
107
87
|
success: false,
|
|
@@ -110,10 +90,13 @@ export async function runInReadOnlyWorkspace(originalCwd, runFn) {
|
|
|
110
90
|
eventCount: runResult.eventCount || 0
|
|
111
91
|
};
|
|
112
92
|
}
|
|
113
|
-
|
|
114
93
|
return runResult;
|
|
115
94
|
} finally {
|
|
116
|
-
|
|
117
|
-
|
|
95
|
+
await fs.rm(tempDir, { recursive: true, force: true }).catch(() => {
|
|
96
|
+
});
|
|
118
97
|
}
|
|
119
98
|
}
|
|
99
|
+
export {
|
|
100
|
+
runInReadOnlyWorkspace
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=read-only-workspace-PZBE7KAX.js.map
|
|
@@ -1,32 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
EvidenceCollector,
|
|
3
|
+
QualityGuard,
|
|
4
|
+
ValidationPlanner,
|
|
5
|
+
VisualVerifier
|
|
6
|
+
} from "./chunk-6EMG6FAO.js";
|
|
7
|
+
import "./chunk-2AOV2ATY.js";
|
|
8
|
+
import "./chunk-5WRI5ZAA.js";
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
// src/cli/commands/validate.ts
|
|
11
|
+
import fs from "fs/promises";
|
|
12
|
+
import path from "path";
|
|
13
|
+
async function runValidate({
|
|
14
|
+
cwd = process.cwd(),
|
|
15
|
+
exitOnError = true,
|
|
16
|
+
taskSlug = null,
|
|
17
|
+
a11y = false,
|
|
18
|
+
visualDist = null,
|
|
19
|
+
port = 8080
|
|
20
|
+
}) {
|
|
9
21
|
console.log("--- Running Validation ---");
|
|
10
|
-
const qualityGuard = new QualityGuard({ cwd, taskSlug,
|
|
22
|
+
const qualityGuard = new QualityGuard({ cwd, taskSlug, evidencePolicy: "optional", riskLevel: "medium" });
|
|
11
23
|
const planner = new ValidationPlanner({ cwd, qualityGuard });
|
|
12
24
|
const tasks = await planner.plan("standard");
|
|
13
|
-
|
|
14
|
-
const collector = new EvidenceCollector({ cwd, timeout: 60000, taskSlug, mode: "standard" });
|
|
25
|
+
const collector = new EvidenceCollector({ cwd, timeout: 6e4, taskSlug, evidencePolicy: "optional" });
|
|
15
26
|
const results = [];
|
|
16
|
-
|
|
17
27
|
for (const task of tasks) {
|
|
18
28
|
console.log(`Running validation task: ${task.name}...`);
|
|
19
29
|
const res = collector.runTask(task);
|
|
20
30
|
results.push(res);
|
|
21
31
|
console.log(`- Status: ${res.status} (${res.summary})`);
|
|
22
32
|
}
|
|
23
|
-
|
|
24
33
|
let a11yResult = null;
|
|
25
34
|
if (a11y) {
|
|
26
35
|
if (!visualDist) {
|
|
27
36
|
throw new Error("Accessibility audit (--a11y) requires a target build directory specified via --visual-dist=<path>.");
|
|
28
37
|
}
|
|
29
|
-
console.log(
|
|
38
|
+
console.log(`
|
|
39
|
+
--- Running Accessibility Audit ---`);
|
|
30
40
|
console.log(`Serving ${visualDist} on port ${port}...`);
|
|
31
41
|
try {
|
|
32
42
|
const verifier = new VisualVerifier({ cwd, visualDist, port });
|
|
@@ -41,21 +51,17 @@ export async function runValidate({ cwd = process.cwd(), exitOnError = true, tas
|
|
|
41
51
|
throw err;
|
|
42
52
|
}
|
|
43
53
|
}
|
|
44
|
-
|
|
45
|
-
// Load future configuration if present
|
|
46
54
|
let config = {};
|
|
47
55
|
try {
|
|
48
56
|
const configContent = await fs.readFile(path.join(cwd, "ai-workflow.config.json"), "utf8");
|
|
49
57
|
config = JSON.parse(configContent);
|
|
50
|
-
} catch {
|
|
51
|
-
|
|
58
|
+
} catch {
|
|
59
|
+
}
|
|
52
60
|
const hasFailure = results.some((r) => ["FAIL", "BLOCKED", "FAIL_QUALITY_GATE"].includes(r.status));
|
|
53
|
-
|
|
54
61
|
let hasA11yFailure = false;
|
|
55
62
|
if (a11yResult) {
|
|
56
|
-
const criticalIsBlocker = true;
|
|
63
|
+
const criticalIsBlocker = true;
|
|
57
64
|
const seriousIsBlocker = config.a11y?.seriousAsBlocker === true;
|
|
58
|
-
|
|
59
65
|
if (criticalIsBlocker && a11yResult.critical.length > 0) {
|
|
60
66
|
hasA11yFailure = true;
|
|
61
67
|
console.error(`Accessibility FAILED: ${a11yResult.critical.length} critical accessibility violations detected.`);
|
|
@@ -69,13 +75,15 @@ export async function runValidate({ cwd = process.cwd(), exitOnError = true, tas
|
|
|
69
75
|
}
|
|
70
76
|
}
|
|
71
77
|
}
|
|
72
|
-
|
|
73
78
|
if (hasFailure || hasA11yFailure) {
|
|
74
79
|
console.log("\nValidation FAILED.");
|
|
75
80
|
if (exitOnError) process.exit(1);
|
|
76
81
|
return { passed: false, results, a11yResult };
|
|
77
82
|
}
|
|
78
|
-
|
|
79
83
|
console.log("\nValidation PASSED.");
|
|
80
84
|
return { passed: true, results, a11yResult };
|
|
81
85
|
}
|
|
86
|
+
export {
|
|
87
|
+
runValidate
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=validate-Q2NLLQ5G.js.map
|
package/AGENTS.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# AI Workflow Kit contributor contract
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Deliver useful software through proportionate workflow, minimum diff, observed validation, and concise evidence.
|
|
6
|
-
|
|
7
|
-
## Non-negotiable safety
|
|
8
|
-
|
|
9
|
-
- Never implement on `main` or `master`.
|
|
10
|
-
- Preserve unrelated dirty work.
|
|
11
|
-
- Run existing relevant validation commands.
|
|
12
|
-
- Never report success after failed or unavailable required validation.
|
|
13
|
-
- Bound remediation and stop when no progress is made.
|
|
14
|
-
- Always await explicit conversational authorization from the human user in the chat before executing any codebase modification, Git commit, tagging, or remote push. Automated system approval hooks (e.g., artifact reviews) do not bypass this human-in-the-loop requirement.
|
|
15
|
-
- Remote push is only permitted on non-protected feature/maintenance branches (e.g. feat/*, fix/*, chore/*, docs/*) with explicit conversational authorization, and is strictly prohibited on protected branches like main or master.
|
|
16
|
-
|
|
17
|
-
## Routing & Delegation
|
|
18
|
-
|
|
19
|
-
Atlas routes. Nexus owns discovery, requirements, and spec authoring. Orion owns planning, PR sequencing, and release strategy. Astra implements substantial scoped work. Sage independently validates when risk or full mode justifies separation. Phoenix performs bounded remediation. Delegation must improve the result; do not create agent theatre or claim handoffs that did not occur.
|
|
20
|
-
|
|
21
|
-
## Modes
|
|
22
|
-
|
|
23
|
-
- quick: small change, targeted validation, short summary;
|
|
24
|
-
- standard: scoped feature, relevant validation, optional delegation;
|
|
25
|
-
- full: formal planning, specialist implementation, independent validation, persisted evidence.
|
|
26
|
-
|
|
27
|
-
## Evidence
|
|
28
|
-
|
|
29
|
-
Quick and standard work require only branch, changed areas, commands/results, and limitations in the handoff. Full/release/audit/security work may persist machine-generated evidence.
|
|
30
|
-
|
|
31
|
-
## Core Concept
|
|
32
|
-
|
|
33
|
-
AI Workflow is an npm CLI that installs agents, commands, skills, policies and templates into your repository.
|
|
34
|
-
It guides coding agents from request to implementation, validation and evidence. AI Workflow Kit preserves workflow integrity so coding agents cannot skip from request to code to success without an explicit implementation path, proportional validation, and final evidence.
|
package/PUBLISH_MANIFEST.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ai-workflow-publish-manifest",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"layers": {
|
|
5
|
-
"core": [
|
|
6
|
-
"bin/**",
|
|
7
|
-
"src/**",
|
|
8
|
-
"package.json",
|
|
9
|
-
"opencode.jsonc"
|
|
10
|
-
],
|
|
11
|
-
"assets": [
|
|
12
|
-
"dist-assets/skills/**",
|
|
13
|
-
"dist-assets/agents/**",
|
|
14
|
-
"dist-assets/commands/**",
|
|
15
|
-
"dist-assets/prompts/**",
|
|
16
|
-
"dist-assets/templates/**",
|
|
17
|
-
"dist-assets/schemas/**",
|
|
18
|
-
"dist-assets/runbooks/**",
|
|
19
|
-
"dist-assets/harness/**",
|
|
20
|
-
"dist-assets/docs/**",
|
|
21
|
-
"dist-assets/examples/**",
|
|
22
|
-
"dist-assets/AGENTS.md"
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
"exclude": [
|
|
26
|
-
"internal/**",
|
|
27
|
-
"**/tests/**",
|
|
28
|
-
"**/evidence/**",
|
|
29
|
-
"**/*.original.md",
|
|
30
|
-
".git/**",
|
|
31
|
-
".ai-workflow/**",
|
|
32
|
-
"node_modules/**"
|
|
33
|
-
]
|
|
34
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Gemini Instructions — AI Workflow Kit
|
|
2
|
-
|
|
3
|
-
Use AGENTS.md and the relevant contracts.
|
|
4
|
-
|
|
5
|
-
```txt
|
|
6
|
-
readonly → Inspect → Report → Recommendation
|
|
7
|
-
quick → Branch recovery/check → Implement → Document if behavior or usage changed → Test/Validate → Evidence
|
|
8
|
-
standard → Mini spec → Mini review → Mini plan → Scoped PR plan → Implement → Document → Test/Validate → Evidence
|
|
9
|
-
full → Spec draft → Spec review → Technical plan → PR breakdown → Implementation → Documentation → Test/Validate → Evidence report
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Use professional taxonomy: Primary Agents, Skill-backed Specialist Roles, Skills, Commands.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## Documentation, UI, security, and delivery artifact gates
|
|
16
|
-
|
|
17
|
-
- Explicit requirements, clean code, generated specs, and inline comments do not replace documentation.
|
|
18
|
-
- For user-facing UI, rendered or visual evidence is required when the runtime can inspect it; raw/default browser UI is `FAIL_QUALITY_GATE`.
|
|
19
|
-
- High/Critical security findings must be classified in evidence.
|
|
20
|
-
- Implementation work must create delivery artifacts proportional to mode: quick uses compact evidence, standard uses compact workflow artifacts, and full uses the complete 01..07 set.
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Provider Usage
|
|
2
|
-
|
|
3
|
-
## OpenCode
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npx @williambeto/ai-workflow init --yes
|
|
7
|
-
npx @williambeto/ai-workflow doctor
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
Use `opencode.jsonc` and the generated OpenCode assets as the primary workflow interface.
|
|
11
|
-
|
|
12
|
-
## Codex
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npx @williambeto/ai-workflow init --yes --codex
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Review generated `.github/agents/`, `.agents/skills/`, and `.codex/prompts/`. Preserve the repository's existing `AGENTS.md`; do not assume Codex reproduces OpenCode delegation semantics.
|
|
19
|
-
|
|
20
|
-
## Claude Code
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npx @williambeto/ai-workflow init --yes --claude
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Review `CLAUDE.md` and `.claude/rules/`. Existing user-authored instructions must not be overwritten without backup and explicit intent.
|
|
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
|
-
## Antigravity
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npx @williambeto/ai-workflow init --yes --antigravity
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Review `ANTIGRAVITY.md` and `.agents/`. Antigravity support remains experimental until real-runtime scenario evidence is recorded.
|
|
43
|
-
|
|
44
|
-
## Multiple adapters
|
|
45
|
-
|
|
46
|
-
Flags may be combined, but each generated runtime increases maintenance surface. Generate only the integrations the consumer project actually uses.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Runtime Compatibility Matrix
|
|
2
|
-
|
|
3
|
-
## Compatibility levels
|
|
4
|
-
|
|
5
|
-
- **Primary:** native project target and most thoroughly exercised path.
|
|
6
|
-
- **Supported:** generated integration and package-level smoke coverage exist; runtime limitations are documented.
|
|
7
|
-
- **Supported with limitations:** assets are generated, but behavior is not equivalent to the primary runtime.
|
|
8
|
-
- **Experimental:** adapter exists, but real-runtime evidence is insufficient for a stronger claim.
|
|
9
|
-
|
|
10
|
-
| Runtime | Level | Generated integration | Current evidence | Known limitations |
|
|
11
|
-
| --- | --- | --- | --- | --- |
|
|
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
|
-
| 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
|
-
| 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
|
-
| 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
|
-
|
|
18
|
-
## Claim policy
|
|
19
|
-
|
|
20
|
-
Compatibility levels must be based on evidence available in the release. Adapter code or generated files alone are not proof of full behavioral parity.
|
|
21
|
-
|
|
22
|
-
## Promotion requirements
|
|
23
|
-
|
|
24
|
-
A runtime may be promoted only after a clean consumer test records:
|
|
25
|
-
|
|
26
|
-
1. package installation;
|
|
27
|
-
2. `init` with the runtime flag;
|
|
28
|
-
3. expected generated assets;
|
|
29
|
-
4. runtime startup or configuration validation;
|
|
30
|
-
5. at least one quick workflow scenario;
|
|
31
|
-
6. known limitations and failures.
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Antigravity Desktop System Prompt
|
|
2
|
-
|
|
3
|
-
Este documento fornece as instruções de sistema (System Prompt) prontas para serem utilizadas no **Antigravity Desktop** (no Windows). Ele configura o agente desktop para carregar, entender e respeitar os contratos de agentes, comandos, habilidades (skills) e validações do **AI Workflow Kit** localizados no WSL, direcionando execuções de comandos de forma consistente e prevenindo dogfooding recursivo.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Prompt de Integração
|
|
8
|
-
|
|
9
|
-
Copie e cole as instruções abaixo na configuração de **System Prompt** (ou como a primeira mensagem da sessão) do seu Antigravity Desktop no Windows:
|
|
10
|
-
|
|
11
|
-
```markdown
|
|
12
|
-
Você é o Antigravity atuando sob o protocolo do **AI Workflow Kit** configurado para este workspace. Seu objetivo é guiar o desenvolvimento de software respeitando as diretrizes, papéis e validações definidos no framework.
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
### 1. Localização do Framework
|
|
17
|
-
O repositório do **AI Workflow Kit** está localizado no caminho de rede WSL:
|
|
18
|
-
`\\wsl.localhost\Ubuntu\home\williambeto\Development\dev-kit`
|
|
19
|
-
|
|
20
|
-
Antes de iniciar qualquer tarefa conceitual ou de implementação, leia e entenda as regras e definições contidas em:
|
|
21
|
-
- O contrato de contribuição: [AGENTS.md](file:///wsl.localhost/Ubuntu/home/williambeto/Development/dev-kit/AGENTS.md)
|
|
22
|
-
- Os agentes e papéis disponíveis em: `\\wsl.localhost\Ubuntu\home\williambeto\Development\dev-kit\dist-assets\agents\`
|
|
23
|
-
- Os comandos e fluxo de trabalho em: `\\wsl.localhost\Ubuntu\home\williambeto\Development\dev-kit\dist-assets\commands\`
|
|
24
|
-
- As habilidades (skills) de governança em: `\\wsl.localhost\Ubuntu\home\williambeto\Development\dev-kit\dist-assets\skills\`
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
### 2. Diretrizes de Comportamento e Não-Dogfooding
|
|
29
|
-
- **Foco no Projeto Consumidor**: Você está desenvolvendo o código deste workspace específico (e não o próprio AI Workflow Kit). Use as regras de validação para garantir a qualidade do projeto atual.
|
|
30
|
-
- **Evite Dogfooding Recursivo**: Não tente executar scripts de validação de forma aninhada ou recursiva na pasta do próprio framework `dev-kit`, a menos que seja explicitamente solicitado pelo usuário. O foco das execuções e comandos é o diretório de trabalho atual do seu workspace.
|
|
31
|
-
- **Preservação de Estado**: Nunca altere branches protegidas (`main`/`master`) e preserve estados não rastreados que o usuário tenha deixado no repositório.
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
### 3. Execução de Comandos em Ambiente WSL
|
|
36
|
-
Como você está rodando no Windows Host e o projeto está no WSL, sempre que precisar rodar comandos do Git, Node, ou os próprios scripts do CLI do AI Workflow Kit, execute-os através do wrapper do WSL para garantir consistência de ambiente.
|
|
37
|
-
Exemplos de execução:
|
|
38
|
-
- Em vez de rodar direto no CMD, use: `wsl -d Ubuntu -- npm test` ou `wsl -d Ubuntu -- npm run validate`.
|
|
39
|
-
- Para invocar o CLI local do projeto: `wsl -d Ubuntu -- ./node_modules/.bin/ai-workflow doctor`.
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
### 4. Divisão de Papéis (Routing & Delegation)
|
|
44
|
-
Assuma o papel correto dependendo da fase da tarefa solicitada pelo usuário:
|
|
45
|
-
- **Nexus**: Para levantamento de requisitos, refinamento de ideias e escrita de especificações funcionais e técnicas (`SPEC.template.md`).
|
|
46
|
-
- **Orion**: Para planejamento técnico de tarefas, criação de planos de testes e sequenciamento de Pull Requests.
|
|
47
|
-
- **Astra**: Para a implementação de código funcional e modificação de arquivos de comportamento.
|
|
48
|
-
- **Sage**: Para validação independente, testes de regressão e garantia de qualidade (nunca declare sucesso sem validação comprovada).
|
|
49
|
-
- **Phoenix**: Para remediação rápida de falhas apontadas pelos validadores de qualidade.
|
|
50
|
-
|
|
51
|
-
Por favor, confirme que leu os arquivos do framework no caminho indicado e que está pronto para atuar sob este protocolo.
|
|
52
|
-
```
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Authoring Custom Skills
|
|
2
|
-
|
|
3
|
-
This guide explains how to author and integrate custom, project-specific capability skills to guide AI agents working inside your repository.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. What is a Skill?
|
|
8
|
-
|
|
9
|
-
A **Skill** is a specialized folder containing structured instructions, examples, configurations, and scripts that extend an AI agent's capability for a specific task or technology.
|
|
10
|
-
|
|
11
|
-
By default, the AI Workflow Kit automatically discovers skills placed inside the project configuration directory.
|
|
12
|
-
|
|
13
|
-
### Recommended Directory Structure
|
|
14
|
-
```text
|
|
15
|
-
my-custom-skill/
|
|
16
|
-
├── SKILL.md # Primary instructions (with YAML frontmatter)
|
|
17
|
-
├── examples/ # Reference implementations and coding patterns (optional)
|
|
18
|
-
├── scripts/ # Helper validation or build scripts (optional)
|
|
19
|
-
└── references/ # Detailed background specifications and policies (optional)
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## 2. The `SKILL.md` Specification
|
|
25
|
-
|
|
26
|
-
The only strictly required file is `SKILL.md`. It must contain a YAML frontmatter section at the very top, containing the skill's name and description.
|
|
27
|
-
|
|
28
|
-
```markdown
|
|
29
|
-
---
|
|
30
|
-
name: security-pci-dss
|
|
31
|
-
description: Strict guidelines for PCI-DSS compliance, credit card hashing, and secure payment processing.
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
# PCI-DSS Secure Coding Skill
|
|
35
|
-
|
|
36
|
-
## Context
|
|
37
|
-
Use this skill when implementing payment forms, logging mechanisms, or credit card handling modules.
|
|
38
|
-
|
|
39
|
-
## Non-negotiable Rules
|
|
40
|
-
1. **Never Log PAN:** The Primary Account Number (PAN) must never be written to application logs, crash reports, or stdout.
|
|
41
|
-
2. **Use Strong Encryption:** All cardholder data must be encrypted in transit (TLS 1.3) and at rest (AES-256-GCM).
|
|
42
|
-
3. **No Inline Card Formatting:** Use the custom secure tokenization library. Do not write custom Regex for credit card validation.
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Frontmatter Fields
|
|
46
|
-
* **`name`**: The unique identifier of the skill. Agents will request this name using the `load_skill` or `load_profile` context directives.
|
|
47
|
-
* **`description`**: A concise, search-friendly summary of the skill's purpose. The classifier uses this description to automatically match the skill to natural language developer requests.
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## 3. Registering Your Skills
|
|
52
|
-
|
|
53
|
-
The AI Workflow Kit supports two discovery mechanisms:
|
|
54
|
-
|
|
55
|
-
### Option A: Automatic Discovery (Default)
|
|
56
|
-
Place your skill folder inside the standard project customizations root directory:
|
|
57
|
-
* `.agents/skills/my-custom-skill/`
|
|
58
|
-
|
|
59
|
-
The CLI dynamically loads and indexes all skills in this folder on initialization and execution. No manual registration is required.
|
|
60
|
-
|
|
61
|
-
### Option B: Shared Customs JSON (`skills.json`)
|
|
62
|
-
If you store your custom skills in a shared or non-standard directory (e.g. to share them across multiple corporate microservices), create a `skills.json` file in your project customizations root:
|
|
63
|
-
|
|
64
|
-
```json
|
|
65
|
-
{
|
|
66
|
-
"entries": [
|
|
67
|
-
{ "path": "node_modules/@corporate/shared-skills/dist" },
|
|
68
|
-
{ "path": "infrastructure/shared-skills" }
|
|
69
|
-
],
|
|
70
|
-
"exclude": ["legacy-v1-tester-skill"]
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## 4. Best Practices for Skill Design
|
|
77
|
-
|
|
78
|
-
1. **Keep Instructions Under 500 Lines:** If your skill requires extensive documentation, store the bulk in the `references/` subdirectory and link to it. Keep the primary `SKILL.md` focused on actionable rules and constraints.
|
|
79
|
-
2. **Prioritize Capability over Roles:** Name your skills after capabilities (e.g., `performance-tuning`, `database-migrations`) rather than roles (e.g., `tech-lead`, `senior-dev`).
|
|
80
|
-
3. **Add Validation Scripts:** If a skill enforces a pattern, write a small shell validator script under `scripts/validate.sh` and list it as a requirement in the `validation` section of the functional specifications.
|