@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
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
const PROFILE_DEFINITIONS = Object.freeze({
|
|
2
|
-
"frontend-product": Object.freeze({
|
|
3
|
-
owner: "Astra",
|
|
4
|
-
skills: ["frontend-development", "ui-ux-design", "frontend-design-system"],
|
|
5
|
-
objective: "Deliver a user-facing product or marketing surface with truthful copy and deliberate visual composition.",
|
|
6
|
-
requiredChecks: ["tests", "typecheck", "build", "responsive-render", "primary-interaction", "truthfulness"],
|
|
7
|
-
forbiddenAssumptions: ["fixed SaaS section sequence", "mandatory pricing", "mandatory testimonials", "subjective premium score"]
|
|
8
|
-
}),
|
|
9
|
-
"frontend-utility": Object.freeze({
|
|
10
|
-
owner: "Astra",
|
|
11
|
-
skills: ["frontend-development", "ui-ux-design", "frontend-design-system"],
|
|
12
|
-
objective: "Deliver a focused user tool with a complete primary flow and clear operational states.",
|
|
13
|
-
requiredChecks: ["tests", "typecheck", "build", "responsive-render", "primary-interaction"],
|
|
14
|
-
forbiddenAssumptions: ["marketing sections", "pricing", "testimonials", "commercial narrative"]
|
|
15
|
-
}),
|
|
16
|
-
"backend-api": Object.freeze({
|
|
17
|
-
owner: "Astra",
|
|
18
|
-
skills: ["backend-development"],
|
|
19
|
-
objective: "Deliver a bounded backend/API change with validated contracts, errors, authorization, and tests.",
|
|
20
|
-
requiredChecks: ["tests", "build-or-typecheck", "input-validation", "failure-paths"],
|
|
21
|
-
forbiddenAssumptions: ["frontend deliverables", "visual evidence"]
|
|
22
|
-
}),
|
|
23
|
-
refactor: Object.freeze({
|
|
24
|
-
owner: "Astra",
|
|
25
|
-
skills: ["refactoring"],
|
|
26
|
-
objective: "Improve structure without changing observable behavior outside the approved scope.",
|
|
27
|
-
requiredChecks: ["behavior-preservation", "tests", "focused-diff"],
|
|
28
|
-
forbiddenAssumptions: ["new product behavior", "unrelated cleanup"]
|
|
29
|
-
}),
|
|
30
|
-
documentation: Object.freeze({
|
|
31
|
-
owner: "Astra",
|
|
32
|
-
skills: ["documentation"],
|
|
33
|
-
objective: "Create or update accurate documentation grounded in the current repository behavior.",
|
|
34
|
-
requiredChecks: ["references", "paths", "commands", "consistency"],
|
|
35
|
-
forbiddenAssumptions: ["implementation claims without evidence"]
|
|
36
|
-
}),
|
|
37
|
-
"security-review": Object.freeze({
|
|
38
|
-
owner: "Sage",
|
|
39
|
-
skills: ["qa-workflow", "technical-leadership"],
|
|
40
|
-
objective: "Inspect security-relevant behavior and report evidence-ranked findings without implementing unrelated changes.",
|
|
41
|
-
requiredChecks: ["evidence", "severity", "runtime-vs-dev", "remediation-owner"],
|
|
42
|
-
forbiddenAssumptions: ["automatic force fixes", "unverified exploitability"]
|
|
43
|
-
}),
|
|
44
|
-
generic: Object.freeze({
|
|
45
|
-
owner: "Atlas",
|
|
46
|
-
skills: [],
|
|
47
|
-
objective: "Route work without inventing domain requirements.",
|
|
48
|
-
requiredChecks: ["scope", "owner", "mode"],
|
|
49
|
-
forbiddenAssumptions: ["domain-specific structure"]
|
|
50
|
-
})
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* NOTE: requiredChecks are advisory, not programmatically enforced.
|
|
55
|
-
*
|
|
56
|
-
* Each profile's `requiredChecks` array is informational — it guides agent behaviour,
|
|
57
|
-
* informs the handoff document, and communicates domain expectations to the AI.
|
|
58
|
-
* QualityGuard and EvidenceCollector do NOT iterate requiredChecks to block delivery.
|
|
59
|
-
*
|
|
60
|
-
* The rationale: profile-specific checks (e.g. "responsive-render", "primary-interaction")
|
|
61
|
-
* are context-dependent and require human or agent judgement. Automated enforcement
|
|
62
|
-
* would require domain-specific validators that don't currently exist.
|
|
63
|
-
*
|
|
64
|
-
* If you add automated enforcement for a profile check, update this comment.
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
|
-
const PROFILE_PATTERNS = Object.freeze([
|
|
68
|
-
["security-review", /\b(?:security review|security audit|vulnerability audit|threat model)\b/i],
|
|
69
|
-
["refactor", /\b(?:refactor|restructure|cleanup without behavior change|preserve behavior)\b/i],
|
|
70
|
-
["documentation", /\b(?:documentation only|write docs|update readme|document the|documentation task)\b/i],
|
|
71
|
-
["backend-api", /\b(?:api endpoint|backend api|rest api|graphql|controller|service endpoint|authenticated api)\b/i],
|
|
72
|
-
["frontend-product", /\b(?:landing page|marketing page|product page|pricing page|homepage|redesign|brand page)\b/i],
|
|
73
|
-
["frontend-utility", /\b(?:validator|search page|lookup|dashboard|form|calculator|tool|admin page|repository search)\b/i]
|
|
74
|
-
]);
|
|
75
|
-
|
|
76
|
-
export function getWorkflowProfile(name = "generic") {
|
|
77
|
-
return PROFILE_DEFINITIONS[name] || PROFILE_DEFINITIONS.generic;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export function listWorkflowProfiles() {
|
|
81
|
-
return Object.keys(PROFILE_DEFINITIONS);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function resolveWorkflowProfile({ request = "", explicitProfile = null } = {}) {
|
|
85
|
-
if (explicitProfile && PROFILE_DEFINITIONS[explicitProfile]) return explicitProfile;
|
|
86
|
-
const text = String(request).trim();
|
|
87
|
-
for (const [profile, pattern] of PROFILE_PATTERNS) {
|
|
88
|
-
if (pattern.test(text)) return profile;
|
|
89
|
-
}
|
|
90
|
-
return "generic";
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export function buildCompactProfileHandoff({ profile, objective, requirements = [], constraints = [] }) {
|
|
94
|
-
const selected = getWorkflowProfile(profile);
|
|
95
|
-
const unique = (values) => [...new Set(values.filter(Boolean))];
|
|
96
|
-
return {
|
|
97
|
-
profile,
|
|
98
|
-
owner: selected.owner,
|
|
99
|
-
skills: [...selected.skills],
|
|
100
|
-
objective: objective || selected.objective,
|
|
101
|
-
requirements: unique(requirements),
|
|
102
|
-
constraints: unique(constraints),
|
|
103
|
-
requiredChecks: [...selected.requiredChecks]
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export { PROFILE_DEFINITIONS };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WorkflowStateMachine - Enforces state transitions for the AI Workflow loop.
|
|
3
|
-
*/
|
|
4
|
-
export class WorkflowStateMachine {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.state = "RECEIVED";
|
|
7
|
-
this.history = [{ state: this.state, timestamp: new Date().toISOString() }];
|
|
8
|
-
|
|
9
|
-
this.validTransitions = {
|
|
10
|
-
RECEIVED: ["CLASSIFIED", "BLOCKED"],
|
|
11
|
-
CLASSIFIED: ["PLANNED", "BLOCKED"],
|
|
12
|
-
PLANNED: ["BRANCH_READY", "BLOCKED"],
|
|
13
|
-
BRANCH_READY: ["DELEGATED", "BLOCKED"],
|
|
14
|
-
DELEGATED: ["IMPLEMENTING", "BLOCKED"],
|
|
15
|
-
IMPLEMENTING: ["IMPLEMENTED", "BLOCKED"],
|
|
16
|
-
IMPLEMENTED: ["VALIDATING", "BLOCKED"],
|
|
17
|
-
VALIDATING: ["COMPLETED", "COMPLETED_WITH_NOTES", "REMEDIATING", "BLOCKED"],
|
|
18
|
-
REMEDIATING: ["REVALIDATING", "BLOCKED"],
|
|
19
|
-
REVALIDATING: ["COMPLETED", "COMPLETED_WITH_NOTES", "REMEDIATING", "BLOCKED"],
|
|
20
|
-
COMPLETED: [],
|
|
21
|
-
COMPLETED_WITH_NOTES: [],
|
|
22
|
-
BLOCKED: []
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Transitions the machine to a new state.
|
|
28
|
-
* @param {string} newState - The state to transition to.
|
|
29
|
-
*/
|
|
30
|
-
transitionTo(newState) {
|
|
31
|
-
const allowed = this.validTransitions[this.state];
|
|
32
|
-
if (!allowed || !allowed.includes(newState)) {
|
|
33
|
-
throw new Error(`Invalid state transition: ${this.state} -> ${newState}`);
|
|
34
|
-
}
|
|
35
|
-
this.state = newState;
|
|
36
|
-
this.history.push({ state: this.state, timestamp: new Date().toISOString() });
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
getCurrentState() {
|
|
40
|
-
return this.state;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
getHistory() {
|
|
44
|
-
return [...this.history];
|
|
45
|
-
}
|
|
46
|
-
}
|