@williambeto/ai-workflow 2.7.1 → 2.8.1

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.
@@ -0,0 +1,76 @@
1
+ // src/linting/skill-frontmatter-linter.ts
2
+ import * as fs from "fs";
3
+ import * as path from "path";
4
+ import * as os from "os";
5
+ function parseFrontmatter(content) {
6
+ const match = content.match(/^---\n([\s\S]*?)\n---\n/);
7
+ if (!match) return {};
8
+ const lines = match[1].split("\n");
9
+ const data = {};
10
+ for (const line of lines) {
11
+ const colonIdx = line.indexOf(":");
12
+ if (colonIdx !== -1) {
13
+ const key = line.substring(0, colonIdx).trim();
14
+ const value = line.substring(colonIdx + 1).trim();
15
+ data[key] = value.replace(/^["'](.*)["']$/, "$1");
16
+ }
17
+ }
18
+ return data;
19
+ }
20
+ function lintSkillFile(filePath) {
21
+ const errors = [];
22
+ if (!fs.existsSync(filePath)) return errors;
23
+ const content = fs.readFileSync(filePath, "utf8");
24
+ const frontmatter = parseFrontmatter(content);
25
+ if (!frontmatter.name) {
26
+ errors.push({ filePath, message: "Missing or empty 'name' field in frontmatter" });
27
+ }
28
+ if (!frontmatter.description) {
29
+ errors.push({ filePath, message: "Missing or empty 'description' field in frontmatter" });
30
+ }
31
+ return errors;
32
+ }
33
+ function findSkillDirs(baseDir) {
34
+ if (!fs.existsSync(baseDir)) return [];
35
+ const entries = fs.readdirSync(baseDir, { withFileTypes: true });
36
+ return entries.filter((e) => e.isDirectory()).map((e) => path.join(baseDir, e.name));
37
+ }
38
+ function getDiscoverableSkillPaths(cwd) {
39
+ const pathsToSearch = [
40
+ path.join(cwd, ".agents/skills"),
41
+ path.join(cwd, ".ai-workflow/opencode/skills"),
42
+ // Installed by kit
43
+ path.join(cwd, "dist-assets/skills"),
44
+ // DevKit source
45
+ path.join(os.homedir(), ".gemini/config/skills"),
46
+ path.join(os.homedir(), ".gemini/antigravity-cli/builtin/skills")
47
+ ];
48
+ const skillFiles = [];
49
+ for (const basePath of pathsToSearch) {
50
+ const dirs = findSkillDirs(basePath);
51
+ for (const dir of dirs) {
52
+ const skillFile = path.join(dir, "SKILL.md");
53
+ if (fs.existsSync(skillFile)) {
54
+ skillFiles.push(skillFile);
55
+ }
56
+ }
57
+ }
58
+ return skillFiles;
59
+ }
60
+ function runLinter(cwd) {
61
+ const files = getDiscoverableSkillPaths(cwd);
62
+ const allErrors = [];
63
+ for (const file of files) {
64
+ const fileErrors = lintSkillFile(file);
65
+ allErrors.push(...fileErrors);
66
+ }
67
+ return { errors: allErrors, filesScanned: files.length };
68
+ }
69
+
70
+ export {
71
+ parseFrontmatter,
72
+ lintSkillFile,
73
+ getDiscoverableSkillPaths,
74
+ runLinter
75
+ };
76
+ //# sourceMappingURL=chunk-YOBY5C72.js.map
package/core/index.d.ts CHANGED
@@ -1,11 +1,16 @@
1
+ type DeliveryMode = "workspace" | "answer-only";
2
+
3
+ type MutationOwner = "Astra" | "Phoenix" | "ControlPlane" | null;
1
4
  interface RequestUnderstanding {
2
5
  rawRequest: string;
3
6
  taskGoal: string;
4
7
  requestedActor?: string;
5
8
  invalidActor?: string;
6
9
  requestedCapability?: string;
10
+ capabilityRoles: string[];
7
11
  operationType: string;
8
12
  mutationIntent: "readonly" | "write" | "publish";
13
+ deliveryMode: DeliveryMode;
9
14
  riskLevel: "low" | "medium" | "high";
10
15
  requiredEvidence: string[];
11
16
  safetyConstraints: string[];
@@ -16,8 +21,11 @@ interface RequestUnderstanding {
16
21
  interface RoutingDecision {
17
22
  requestedActor?: string;
18
23
  selectedActor?: string;
24
+ mutationOwner: MutationOwner;
25
+ capabilityRoles: string[];
19
26
  operationType: string;
20
27
  mutationIntent: "readonly" | "write" | "publish";
28
+ deliveryMode: DeliveryMode;
21
29
  permissionDecision: "allowed" | "rerouted" | "blocked";
22
30
  reason: string;
23
31
  workflowPath: string[];
@@ -133,6 +141,8 @@ declare class EvidenceLedger {
133
141
  cwd: string;
134
142
  workflowId: string;
135
143
  events: LedgerEvent[];
144
+ private loadedPath;
145
+ private loadedContentHash;
136
146
  constructor({ cwd, workflowId }?: {
137
147
  cwd?: string;
138
148
  workflowId?: string;
@@ -154,6 +164,7 @@ declare class EvidenceLedger {
154
164
  * Saves the ledger events to a JSON file.
155
165
  */
156
166
  save(filePath: string): Promise<void>;
167
+ load(filePath: string): Promise<boolean>;
157
168
  verifyRoleConfinement(): Promise<RoleConfinementResult>;
158
169
  }
159
170
 
@@ -161,6 +172,7 @@ interface InspectResult {
161
172
  available: boolean;
162
173
  supports: {
163
174
  run: boolean;
175
+ server: boolean;
164
176
  formatJson: boolean;
165
177
  agent: boolean;
166
178
  model: boolean;
@@ -171,17 +183,29 @@ interface ExecuteOptions {
171
183
  model?: string | null;
172
184
  readOnly?: boolean;
173
185
  fastTrack?: boolean;
186
+ requireActorConfirmation?: boolean;
187
+ orchestratedChild?: boolean;
188
+ }
189
+ interface ObservedCommand {
190
+ command: string;
191
+ tool: string;
192
+ status: "PASS" | "FAIL" | "UNKNOWN";
193
+ exitCode: number | null;
194
+ source: "sdk" | "json-event" | "text-output";
174
195
  }
175
196
  interface ExecuteResult {
176
197
  success: boolean;
177
198
  status?: string;
178
199
  commandsRun: string[];
200
+ commandEvents?: ObservedCommand[];
179
201
  eventCount: number;
180
202
  error?: string;
181
203
  runtimeAgentRequested?: string | null;
182
204
  runtimeAgentApplied?: string | null;
183
205
  runtimeAgentSupported?: boolean;
184
206
  runtimeAgentSelectionMode?: string;
207
+ runtimeActorConfirmation?: "confirmed" | "unavailable";
208
+ output?: string;
185
209
  }
186
210
  /**
187
211
  * OpenCodeAdapter - Real runtime integration with the OpenCode CLI.
@@ -198,7 +222,7 @@ declare class OpenCodeAdapter {
198
222
  /**
199
223
  * Runs opencode with a prompt and options.
200
224
  */
201
- execute(message: string, { agent, model, readOnly, fastTrack }?: ExecuteOptions): Promise<ExecuteResult>;
225
+ execute(message: string, { agent, model, readOnly, fastTrack, requireActorConfirmation, orchestratedChild }?: ExecuteOptions): Promise<ExecuteResult>;
202
226
  }
203
227
 
204
228
  interface DelegationControllerOptions {
@@ -206,6 +230,22 @@ interface DelegationControllerOptions {
206
230
  ledger?: EvidenceLedger;
207
231
  adapter?: OpenCodeAdapter;
208
232
  }
233
+ interface PhaseArtifactResult {
234
+ artifactPath?: string;
235
+ artifactHash?: string;
236
+ [key: string]: unknown;
237
+ }
238
+ interface DelegationPhaseOptions {
239
+ phase: "specification" | "planning" | "implementation";
240
+ actor: "Nexus" | "Orion" | "Astra";
241
+ prompt: string;
242
+ readOnly: boolean;
243
+ requireExplicitActor?: boolean;
244
+ onOutput?: (output: string) => Promise<PhaseArtifactResult | void>;
245
+ }
246
+ interface DelegationPhaseResult extends ExecuteResult {
247
+ artifact?: PhaseArtifactResult;
248
+ }
209
249
  /**
210
250
  * DelegationController - Manages and logs coordination between Atlas, Astra, Sage, and Phoenix.
211
251
  */
@@ -219,6 +259,11 @@ declare class DelegationController {
219
259
  * Logs routing decision by Atlas.
220
260
  */
221
261
  route(naturalRequest: string, classification: RequestClassifierResult): Promise<void>;
262
+ /**
263
+ * Executes one high-risk phase and fails closed unless the runtime confirms
264
+ * the requested actor through machine-readable output.
265
+ */
266
+ executePhase({ phase, actor, prompt, readOnly, requireExplicitActor, onOutput }: DelegationPhaseOptions): Promise<DelegationPhaseResult>;
222
267
  /**
223
268
  * Logs and executes the implementation process by Astra.
224
269
  */
@@ -323,6 +368,8 @@ declare class WorkspaceSnapshot {
323
368
  });
324
369
  isIgnored(relativePath: string): boolean;
325
370
  capture(): Promise<WorkspaceSnapshotData>;
371
+ listGitVisibleFiles(): string[] | null;
372
+ scanFiles(relativePaths: string[], filesMap: Record<string, SnapshotFile>): Promise<void>;
326
373
  scanDir(dir: string, filesMap: Record<string, SnapshotFile>): Promise<void>;
327
374
  calculateHash(snapshot: WorkspaceSnapshotData): string;
328
375
  }
@@ -426,11 +473,14 @@ interface SpecValidationResult {
426
473
  reason?: string;
427
474
  tier?: string;
428
475
  }
476
+ type RequiredSpecStatus = "DRAFT" | "APPROVED";
429
477
  /**
430
478
  * SpecValidator - Enforces "No Spec, No Code" rule.
431
479
  * Validates existence, structure, and approval status of specifications.
432
480
  */
433
481
  declare class SpecValidator {
482
+ validateContent(content: string, requiredStatus?: RequiredSpecStatus): SpecValidationResult;
483
+ validateDraftContent(content: string): SpecValidationResult;
434
484
  /**
435
485
  * Validates a specification file.
436
486
  */
package/core/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import {
2
- BranchGate,
3
2
  DelegationController,
4
3
  EvidenceLedger,
5
4
  ExecutionPlanner,
@@ -10,10 +9,13 @@ import {
10
9
  RequestClassifier,
11
10
  SpecValidator,
12
11
  WorkflowStateMachine
13
- } from "../chunk-W4RTQWVQ.js";
12
+ } from "../chunk-4FI5ODAM.js";
14
13
  import {
15
14
  MergeGate
16
- } from "../chunk-XW747GIG.js";
15
+ } from "../chunk-H7GIKXFO.js";
16
+ import {
17
+ BranchGate
18
+ } from "../chunk-AINIR25D.js";
17
19
  import "../chunk-5WRI5ZAA.js";
18
20
  export {
19
21
  BranchGate,
@@ -23,7 +23,7 @@ Atlas must:
23
23
  * Enforce protected-branch safety before writes.
24
24
  * Route to specialists only when useful.
25
25
  * Require observed validation and prevent false success.
26
- * Return a concise delivery handoff.
26
+ * Continue from routing through delivery, validation, and a concise handoff.
27
27
 
28
28
  ## Trusted context
29
29
  * Repository files
@@ -40,7 +40,11 @@ Atlas must:
40
40
  ## Constraints
41
41
  * **High-Risk Sequence Enforcement**: For high-risk tasks (specPolicy: required), Atlas must strictly enforce that the workflow runs sequentially through `discover`, `spec-create`, `spec-review`, and `plan` phases before any implementation or coding starts. Jumping directly to implementation is forbidden.
42
42
  * **Authoritative Routing Integrity**: Atlas must routing-delegate requests strictly according to agent capabilities (e.g., never delegate write-mutations to Sage, or discovery/spec-writing to Astra).
43
- * **Implementation Delegation Constraint**: Atlas must never perform dynamic code writing or logic modification of source files directly. Any code changes (excluding pure documentation, README updates, or spelling typos) must be delegated to Astra.
43
+ * **Implementation Delegation Constraint**: Atlas must never modify user-requested workspace files directly. Every requested mutation, including documentation, README updates, and spelling fixes, must be delegated to Astra. Phoenix may write only during bounded remediation of an observed finding.
44
+ * **Workspace Delivery Constraint**: A natural request to create, fix, change, or implement repository behavior has `deliveryMode: workspace` unless the user explicitly requests an answer-only example or preview. Printed code is never workspace delivery.
45
+ * **Mutation Ownership Constraint**: Astra owns user-requested implementation mutations. Phoenix owns only bounded remediation of observed findings. Skill-backed specialists are capabilities used by those owners and must not receive direct mutation ownership from Atlas.
46
+ * **Non-Terminal Routing Constraint**: `decision: ROUTED` confirms only actor selection. Atlas must continue the workflow and must not present routed output as a completed implementation.
47
+ * **Context Compatibility Constraint**: Before implementation, compare an explicitly requested stack or platform with the active repository. Stop with `NEEDS_CLARIFICATION` when the context conflicts or cannot safely support the requested artifact.
44
48
  * **Quality Gate Authoritativeness**: Any non-zero exit code or `BLOCKED` status from a safety gate, validation check, or finalizer command must immediately halt the pipeline.
45
49
  * Never write on `main`, `master`, or another protected branch.
46
50
  * If the protected branch is clean or has only preservable untracked files, create a scoped branch before editing.
@@ -73,13 +77,16 @@ Atlas must:
73
77
 
74
78
  ## Operating procedure
75
79
  1. classify requests and select the lowest safe proportional policies.
76
- 2. Delegate to specialist actors:
80
+ 2. For workspace delivery, run `git branch --show-current` and `git status --short`, then satisfy the branch gate before any edit.
81
+ 3. Delegate to workflow owners:
77
82
  * Delegation is proportional, not ceremonial.
78
- * Use Astra for substantial implementation work.
83
+ * Use Astra for every user-requested implementation mutation, including small changes.
84
+ * Astra may use skill-backed specialists as bounded capabilities.
85
+ * Atlas must not invoke a skill-backed specialist directly for workspace implementation.
79
86
  * Use Sage for independent validation when high risk justifies it.
80
87
  * Use Phoenix only for concrete findings that need remediation.
81
88
  * Do not claim that an agent acted unless that handoff actually occurred.
82
- 3. For low or medium risk tasks:
89
+ 4. For low or medium risk tasks:
83
90
  * Inspect status.
84
91
  * Recover branch if needed.
85
92
  * Coordinate and delegate any code-source modifications to Astra (Atlas must never execute code implementation directly).
@@ -92,7 +99,13 @@ Atlas must:
92
99
  * exit code `0` with `COMPLETED` or `COMPLETED_WITH_NOTES`: Atlas may report that exact public state;
93
100
  * non-zero exit code or `BLOCKED`: remediate within the configured bound or report `BLOCKED`;
94
101
  * Atlas must never infer, upgrade, or replace the finalizer result from screenshots, manual checks, build output, or its own judgement.
95
- 4. For high-risk tasks requiring evidence (evidencePolicy: required), use the full workflow/orchestrator so persisted evidence and independent validation remain available.
102
+ 5. Resolve the delivery outcome after observed validation:
103
+ * `CHANGED` requires an actual scoped diff and passing proportional validation.
104
+ * `ALREADY_SATISFIED` requires explicit verification and must not manufacture a diff.
105
+ * `READ_ONLY_RESULT` and `PREVIEW_ONLY` must not claim workspace implementation.
106
+ * `NEEDS_CLARIFICATION` and `NOT_DELIVERED` are blocking outcomes.
107
+ * Record `testAction: reuse | extend | add | none` with a concrete reason; do not add prompt-specific tests solely to make a request pass.
108
+ 6. For high-risk tasks requiring evidence (evidencePolicy: required), use the full workflow/orchestrator so persisted evidence and independent validation remain available.
96
109
 
97
110
  ## Expected output schema
98
111
  Must include:
@@ -107,6 +120,12 @@ workflowPath
107
120
  reason
108
121
  requiredEvidence
109
122
  decision: ROUTED | BLOCKED | NEEDS_CLARIFICATION
123
+ deliveryMode: workspace | answer-only
124
+ mutationOwner: Astra | Phoenix | ControlPlane | null
125
+ capabilityRoles
126
+ deliveryOutcome: CHANGED | ALREADY_SATISFIED | READ_ONLY_RESULT | PREVIEW_ONLY | NEEDS_CLARIFICATION | NOT_DELIVERED
127
+ testAction: reuse | extend | add | none
128
+ testReason
110
129
  ```
111
130
 
112
131
  ## Evidence required
@@ -27,6 +27,9 @@ Route user requests safely, proportionately, and securely according to the permi
27
27
  - Always route to the correct specialized agent or fail closed.
28
28
  - Do not execute code modifications directly.
29
29
  - Do not claim routing execution without ledger evidence.
30
+ - Treat `ROUTED` as non-terminal; continue through implementation and validation.
31
+ - Route workspace implementation to Astra, never directly to a skill-backed specialist.
32
+ - Printed code is not a substitute for a requested repository change.
30
33
 
31
34
  ## Allowed tools
32
35
  - classify request
@@ -43,7 +46,8 @@ Route user requests safely, proportionately, and securely according to the permi
43
46
  2. Classify intent (write/readonly/publish) and risk level.
44
47
  3. Resolve target agent according to the permission matrix.
45
48
  4. Log the routing event to the ledger.
46
- 5. Delegate execution to the resolved agent.
49
+ 5. Delegate workspace implementation to Astra; pass specialist capabilities as context only.
50
+ 6. Continue through proportional validation and resolve the delivery outcome.
47
51
 
48
52
  ## Safety gates
49
53
  - Enforce branch gate constraints.
@@ -58,7 +62,8 @@ Output must include:
58
62
  - Classification metrics
59
63
  - Target agent resolved
60
64
  - Safety constraints
61
- - Decision: ALLOWED | BLOCKED
65
+ - Decision: ROUTED | BLOCKED | NEEDS_CLARIFICATION
66
+ - Delivery outcome and test action
62
67
 
63
68
  ## Evidence required
64
69
  - routing ledger event log
@@ -1,6 +1,10 @@
1
1
  # AI Workflow Kit quickstart
2
2
 
3
- To initialize your project, run `npx ai-workflow init --profile=standard` (default) or `npx ai-workflow init --profile=full` (adds examples). Then, give Atlas a natural software request. Atlas chooses the lowest safe proportional policies and the closest workflow profile.
3
+ To initialize your project, run `npx ai-workflow init --profile=standard` (default) or `npx ai-workflow init --profile=full` (adds examples). For enforced workspace delivery, run `npx aw execute "your natural software request"` or use the OpenCode `/run` command. Atlas chooses the lowest safe proportional policies and the closest workflow profile.
4
+
5
+ Selecting Atlas directly uses the same ownership contract: Atlas routes product
6
+ mutations to Astra and may use specialists only as capabilities. The CLI path is
7
+ the authoritative control plane for programmatic gates and persisted evidence.
4
8
 
5
9
  ## Proportional Policies
6
10
 
@@ -20,6 +24,11 @@ Write-capable work never runs on `main` or `master`. Existing relevant tests/bui
20
24
  - `COMPLETED_WITH_NOTES`
21
25
  - `BLOCKED`
22
26
 
27
+ The structured delivery outcome distinguishes `CHANGED`,
28
+ `ALREADY_SATISFIED`, `READ_ONLY_RESULT`, `PREVIEW_ONLY`,
29
+ `NEEDS_CLARIFICATION`, and `NOT_DELIVERED`. A routing decision alone is never a
30
+ completed implementation.
31
+
23
32
  Workflow documents are optional unless they provide lasting value or the specification policy requires them.
24
33
 
25
34
  ## Visual & Accessibility Evidence Requirements
@@ -75,19 +75,21 @@ Runs formal orchestration for an approved specification with branch safety, obse
75
75
 
76
76
  **Synopsis:**
77
77
  ```bash
78
- ai-workflow run --spec-path=<path>
78
+ ai-workflow run --spec-path=<path> [--approval-path=<path>]
79
79
  ```
80
80
 
81
81
  **Description:**
82
- Reads an approved specification file and orchestrates the full implementation workflow. Enforces branch gate safety, runs validation commands, applies bounded remediation (up to configured attempt limits), and generates a handoff summary.
82
+ Reads an approved specification file and orchestrates the full implementation workflow. Enforces branch gate safety, runs validation commands, applies bounded remediation (up to configured attempt limits), and generates a handoff summary. DEEP specifications also require a hash-bound approval receipt created after human review.
83
83
 
84
84
  | Flag | Description |
85
85
  | --- | --- |
86
86
  | `--spec-path=<path>` | Path to the approved specification file (required) |
87
+ | `--approval-path=<path>` | Path to the approval receipt required for DEEP specifications |
87
88
 
88
89
  **Example:**
89
90
  ```bash
90
91
  ai-workflow run --spec-path=.ai-workflow/specs/feature-auth.md
92
+ ai-workflow run --spec-path=docs/workflows/auth/spec.md --approval-path=.ai-workflow/approvals/auth.json
91
93
  ```
92
94
 
93
95
  ---
@@ -196,6 +198,49 @@ ai-workflow clean --purge-agents # Remove everything including .agents/
196
198
 
197
199
  ---
198
200
 
201
+ ## `ai-workflow skill create`
202
+
203
+ Creates a workspace-local skill scaffold.
204
+
205
+ **Synopsis:**
206
+ ```bash
207
+ ai-workflow skill create <name> [--description=<description>] [--dry-run] [--force]
208
+ ```
209
+
210
+ **Description:**
211
+ Creates `.agents/skills/<name>/SKILL.md` with the required `name` and `description` YAML frontmatter. Skill names must use lowercase kebab-case. The command validates the destination before applying the branch gate and rejects paths or symbolic links detected outside the workspace.
212
+
213
+ | Flag | Description |
214
+ | --- | --- |
215
+ | `--description=<description>` | Search-friendly description written to the YAML frontmatter |
216
+ | `--dry-run` | Show the target and planned action without creating a branch or writing files |
217
+ | `--force` | Back up and overwrite an existing `SKILL.md`; preserves auxiliary files |
218
+
219
+ **Example:**
220
+ ```bash
221
+ ai-workflow skill create database-migrations \
222
+ --description="Guidelines for safe database migrations"
223
+ ```
224
+
225
+ The generated folder can also contain optional `scripts/`, `examples/`, and `references/` directories. Workspace-local skills are discovered automatically and take precedence over installed or global skills.
226
+
227
+ The containment checks protect against unsafe paths present when the command runs. As with other local filesystem tools, they do not defend against another process concurrently replacing validated directories while the write is in progress.
228
+
229
+ ---
230
+
231
+ ## `ai-workflow lint skills`
232
+
233
+ Checks the required YAML frontmatter of every discoverable `SKILL.md`.
234
+
235
+ **Synopsis:**
236
+ ```bash
237
+ ai-workflow lint skills
238
+ ```
239
+
240
+ The command scans workspace-local, installed, development, and supported global skill locations. It exits with a non-zero status when a skill is missing a non-empty `name` or `description` field.
241
+
242
+ ---
243
+
199
244
  ## Public Statuses
200
245
 
201
246
  All workflow commands that produce delivery summaries use these statuses:
@@ -9,13 +9,21 @@ npx @williambeto/ai-workflow doctor
9
9
 
10
10
  Use `opencode.jsonc` and the generated OpenCode assets as the primary workflow interface.
11
11
 
12
+ For CLI-enforced branch, delivery, validation, and evidence gates, use:
13
+
14
+ ```bash
15
+ npx @williambeto/ai-workflow execute "<natural-language request>"
16
+ ```
17
+
18
+ Direct Atlas sessions depend on the selected provider model following the installed agent contract. GPT-5.6 Sol is the validated direct-session model for this release. GPT-5.3 Codex Spark in medium mode is experimental because observed sessions delegated correctly but did not consistently produce a runnable, validated workspace delivery. The finalizer still blocks false success, but it cannot make an incompatible model complete the implementation.
19
+
12
20
  ## Codex
13
21
 
14
22
  ```bash
15
23
  npx @williambeto/ai-workflow init --yes --codex
16
24
  ```
17
25
 
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.
26
+ Review generated `AGENTS.md`, `CODEX.md`, `.codex/skills/`, `.codex/prompts/`, and `.codex/docs/policies/`. The root `AGENTS.md` provides the primary project-level instruction contract. The `ai-workflow doctor` command will automatically validate these assets.
19
27
 
20
28
  ## Claude Code
21
29
 
@@ -33,6 +41,13 @@ npx @williambeto/ai-workflow init --yes --antigravity
33
41
 
34
42
  Review `ANTIGRAVITY.md` and `.agents/`. Antigravity is supported and acts as the primary reference ecosystem for configuring and executing specialized agents and skills.
35
43
 
44
+ ### Activating the Personas in the Antigravity IDE
45
+
46
+ To ensure the assistant assumes a specific persona (like **Atlas** for workflow routing) instead of acting as a generic assistant:
47
+
48
+ * **IDE Agent Selector**: Click the Agent selector dropdown in the Antigravity IDE sidebar and select `Atlas` (configured via `.agents/agents/atlas/agent.json`).
49
+ * **Slash Command Prefix**: Alternatively, start your chat prompt with the `/atlas` prefix to automatically load the orchestrator context.
50
+
36
51
  ## Multiple adapters
37
52
 
38
53
  Flags may be combined, but each generated runtime increases maintenance surface. Generate only the integrations the consumer project actually uses.
@@ -9,8 +9,8 @@
9
9
 
10
10
  | Runtime | Level | Generated integration | Current evidence | Known limitations |
11
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` |
12
+ | OpenCode | Primary | `opencode.jsonc`, OpenCode agents, commands, and skills | init, doctor, package smoke, generated-file checks, real GPT-5.6 Sol delivery | Direct-agent behavior depends on a validated model; use `ai-workflow execute` for CLI-enforced gates |
13
+ | Codex | Supported | `AGENTS.md`, `CODEX.md`, `.codex/skills/`, `.codex/prompts/` | full `ai-workflow doctor` runtime validation, e2e smoke checks | `.codex/` output requires `--codex` flag |
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
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`) |
16
16
 
@@ -18,6 +18,17 @@
18
18
 
19
19
  Compatibility levels must be based on evidence available in the release. Adapter code or generated files alone are not proof of full behavioral parity.
20
20
 
21
+ ## OpenCode model qualification
22
+
23
+ OpenCode runtime compatibility does not imply that every provider model follows agent instructions with the same reliability.
24
+
25
+ | Model and mode | Direct Atlas status | Observed behavior |
26
+ | --- | --- | --- |
27
+ | GPT-5.6 Sol | Supported | Completed branch gate, one Astra delegation, workspace implementation, proportional validation, browser inspection, and finalization |
28
+ | GPT-5.3 Codex Spark, medium | Experimental | Delegated to Astra, but produced an incomplete scaffold, failed required validation, and repeated source code in the handoff; the finalizer correctly blocked false success |
29
+
30
+ The canonical enforcement path is `ai-workflow execute`. Direct Atlas sessions are supported only for model configurations that pass the release smoke suite. Experimental models may inspect or generate partial work, but their direct-session behavior is not a supported delivery guarantee.
31
+
21
32
  ## Promotion requirements
22
33
 
23
34
  A runtime may be promoted only after a clean consumer test records:
@@ -18,7 +18,12 @@ A report written by an agent is not proof that a command ran. Command results mu
18
18
 
19
19
  ## Required evidence policy work
20
20
 
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.
21
+ Persisted evidence is appropriate when traceability has lasting value. The runtime may write a structured evidence file containing branch state, all currently changed files, the files changed by the current delivery, mutation owner, capability roles, delivery mode, delivery outcome, test action and reason, command exit codes, checks, limitations, and final status.
22
+
23
+ `changedFiles` preserves the complete dirty-workspace view used by safety checks.
24
+ `deliveryChangedFiles` is the delta observed from the current execution baseline
25
+ and is the only file set used to attribute the delivery outcome and test action.
26
+ Pre-existing dirty work must never be claimed as the current delivery.
22
27
 
23
28
  The model must not manually author successful command results.
24
29
 
@@ -29,3 +34,8 @@ The model must not manually author successful command results.
29
34
  - `BLOCKED`
30
35
 
31
36
  A failed required command, protected-branch violation, missing meaningful validation, or unresolved material finding cannot be promoted to success.
37
+
38
+ `COMPLETED` does not imply a diff by itself. `CHANGED` requires an observed
39
+ workspace change and proportional validation. `ALREADY_SATISFIED` requires
40
+ explicit verification without an artificial change. Read-only and preview
41
+ outcomes must not claim implementation.
@@ -4,6 +4,22 @@ This document defines the shared execution contracts, quality gates, and finaliz
4
4
 
5
5
  ---
6
6
 
7
+ ## Ownership boundary
8
+
9
+ Skills and skill-backed specialist roles are capabilities, not autonomous
10
+ mutation owners. Atlas routes workspace implementation to Astra. Phoenix owns
11
+ only bounded remediation of observed findings. A specialist may provide analysis,
12
+ candidate content, or validation guidance to the active owner, but it must not:
13
+
14
+ - accept direct workspace-delivery ownership from Atlas;
15
+ - edit repository files unless Astra or Phoenix explicitly delegated that
16
+ bounded capability inside an authorized branch;
17
+ - replace a requested repository change with printed code;
18
+ - claim terminal workflow completion.
19
+
20
+ If the delegation does not identify the active mutation owner and delivery mode,
21
+ return the missing context instead of assuming ownership.
22
+
7
23
  ## Behavioral contract core
8
24
 
9
25
  All executing agents and specialist roles must respect these rules:
@@ -39,6 +39,10 @@ For normal Markdown documents, use the schemas as a checklist. A document does n
39
39
  | `pr-breakdown.schema.json` | Pull request breakdown shape |
40
40
  | `handoff.schema.json` | Agent handoff shape |
41
41
  | `validation-report.schema.json` | Validation report shape |
42
+ | `evidence.schema.json` | Observed delivery, validation, outcome, and test-action evidence |
43
+
44
+ In evidence artifacts, `changedFiles` is the full dirty-workspace view and
45
+ `deliveryChangedFiles` is the delta attributable to the current execution.
42
46
 
43
47
  ## Validation
44
48
 
@@ -0,0 +1,35 @@
1
+ {
2
+ "$id": "https://github.com/williambeto/ai-workflow/schemas/approval-receipt.schema.json",
3
+ "title": "Human Approval Receipt",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "workflowId",
8
+ "approvedSpecHash",
9
+ "approvedBy",
10
+ "approvedAt",
11
+ "authorizationSource"
12
+ ],
13
+ "properties": {
14
+ "workflowId": {
15
+ "type": "string",
16
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$"
17
+ },
18
+ "approvedSpecHash": {
19
+ "type": "string",
20
+ "pattern": "^[a-f0-9]{64}$"
21
+ },
22
+ "approvedBy": {
23
+ "type": "string",
24
+ "minLength": 1
25
+ },
26
+ "approvedAt": {
27
+ "type": "string",
28
+ "format": "date-time"
29
+ },
30
+ "authorizationSource": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ }
34
+ }
35
+ }