aiwg 2026.7.23 → 2026.7.24

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.
Files changed (30) hide show
  1. package/agentic/code/addons/agent-loop/templates/ralph-completion.md +18 -0
  2. package/agentic/code/addons/agent-loop/templates/ralph-task.md +18 -0
  3. package/agentic/code/addons/agentic-installer/README.md +18 -11
  4. package/agentic/code/addons/agentic-installer/skills/setup-generate/SKILL.md +24 -24
  5. package/agentic/code/addons/agentic-installer/skills/setup-validate/SKILL.md +3 -12
  6. package/dist/src/artifacts/browser-export.js +2 -0
  7. package/dist/src/artifacts/index-builder.js +44 -8
  8. package/dist/src/artifacts/query-engine.js +1 -1
  9. package/dist/src/artifacts/types.js +1 -0
  10. package/dist/src/cli/handlers/index.js +5 -1
  11. package/dist/src/cli/handlers/setup-manifest.js +800 -0
  12. package/dist/src/cli/handlers/use.js +127 -17
  13. package/dist/src/config/aiwg-config.js +6 -2
  14. package/dist/src/extensions/commands/definitions.js +99 -0
  15. package/dist/src/serve/sandbox-registry.js +34 -0
  16. package/docs/cockpit/bridge-api.md +26 -4
  17. package/docs/cockpit/daily-operator-gate.md +7 -0
  18. package/docs/cockpit/recovery.md +21 -12
  19. package/docs/cockpit/surfaces.md +21 -6
  20. package/docs/cockpit/trust-and-security.md +33 -1
  21. package/docs/configuration/setup-manifest.md +17 -11
  22. package/docs/providers/skills-paths.md +4 -1
  23. package/docs/releases/_manifest.json +1 -0
  24. package/docs/releases/v2026.7.24-announcement.md +77 -0
  25. package/package.json +1 -1
  26. package/prebuilt/fortemi-core/framework/aiwg-fortemi-index-v2.json +1 -1
  27. package/prebuilt/fortemi-core/framework/manifest.json +2 -2
  28. package/tools/agents/providers/codex.mjs +14 -5
  29. package/tools/manifest/check-discovery-coverage.mjs +131 -3
  30. package/tools/skills/deploy-skills-codex.mjs +5 -0
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: ralph-completion
3
+ description: Completion summary scaffold for an agent-loop iteration.
4
+ ---
5
+
6
+ # Ralph Completion Template
7
+
8
+ ## Outcome
9
+
10
+ {{outcome}}
11
+
12
+ ## Evidence
13
+
14
+ {{evidence}}
15
+
16
+ ## Follow Up
17
+
18
+ {{follow_up}}
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: ralph-task
3
+ description: Task prompt scaffold for an agent-loop iteration.
4
+ ---
5
+
6
+ # Ralph Task Template
7
+
8
+ ## Goal
9
+
10
+ {{goal}}
11
+
12
+ ## Context
13
+
14
+ {{context}}
15
+
16
+ ## Completion Criteria
17
+
18
+ {{completion_criteria}}
@@ -69,23 +69,30 @@ recovery_procedures:
69
69
  ```
70
70
 
71
71
  ```bash
72
- # Validate
72
+ # Generate starter runtime assets
73
+ aiwg setup-generate --output setup.manifest.yaml
74
+
75
+ # Validate for agentic runtime consumption
73
76
  aiwg setup-validate setup.manifest.yaml
74
77
 
75
- # Dry run
76
- aiwg setup-run --dry-run
78
+ # Dry run without executing steps
79
+ aiwg setup-run --manifest setup.manifest.yaml --dry-run
77
80
 
78
- # Execute
79
- aiwg setup-run
81
+ # Execute only after the automation has reviewed the plan and has authorization
82
+ aiwg setup-run --manifest setup.manifest.yaml --confirm
80
83
  ```
81
84
 
82
- ## Skills
85
+ ## Agentic Runtime Commands
86
+
87
+ These CLI entrypoints are for agents and automation. They are intentionally
88
+ machine-oriented surfaces that make setup assets discoverable, validateable, and
89
+ executable under explicit safety gates.
83
90
 
84
- | Skill | Description |
85
- |-------|-------------|
86
- | `setup-generate` | Generate a manifest from project context (README, package files) |
87
- | `setup-run` | Execute a manifest step by step with platform detection |
88
- | `setup-validate` | Validate a manifest against schema and run consistency checks |
91
+ | Command | Backing skill | Description |
92
+ |---------|---------------|-------------|
93
+ | `setup-generate` | `setup-generate` | Generate starter manifest and script assets |
94
+ | `setup-validate` | `setup-validate` | Validate a manifest against schema and consistency checks |
95
+ | `setup-run` | `setup-run` | Validate, plan, and execute manifest steps with confirmation gates |
89
96
 
90
97
  ## Script Template Library
91
98
 
@@ -23,15 +23,20 @@ Generate a `setup.manifest.yaml` file for a project using the `setup.aiwg.io/v1`
23
23
  ### project-dir (positional, optional)
24
24
  Path to the project root. Defaults to `.`.
25
25
 
26
- ### --from-readme (optional)
27
- Extract requirements from `README.md` or `INSTALL.md` in the project dir.
26
+ ### --output (optional)
27
+ Manifest path to create. Default: `./setup.manifest.yaml`.
28
28
 
29
- ### --from-existing (optional)
30
- Update an existing `setup.manifest.yaml` rather than creating from scratch.
29
+ ### --name (optional)
30
+ Manifest `metadata.name`. Default: package name or project directory name.
31
31
 
32
- ### --platforms (optional)
33
- Comma-separated list of target platforms: `linux,macos,windows,wsl2`.
34
- Default: `linux,macos`.
32
+ ### --type (optional)
33
+ Install type: `user`, `developer`, or `ci`. Default: `developer`.
34
+
35
+ ### --platform (optional)
36
+ Target platform: `linux`, `macos`, `windows`, or `docker`.
37
+
38
+ ### --force (optional)
39
+ Overwrite existing generated manifest/script files.
35
40
 
36
41
  ### --type (optional)
37
42
  Install type to generate: `user`, `developer`, or `ci`.
@@ -54,7 +59,9 @@ Ask clarifying questions before generating.
54
59
  - Check for `package.json`, `requirements.txt`, `Cargo.toml`, `go.mod`, `Makefile`, etc.
55
60
  - Check for `README.md`, `INSTALL.md`, `docs/install.md`
56
61
  - Check for existing `setup.manifest.yaml`
57
- 2. If `--from-readme`, parse installation instructions from readme
62
+ 2. Parse local project cues when they are available; the CLI entrypoint emits
63
+ a conservative starter manifest and leaves richer project-specific authoring
64
+ to the agent skill.
58
65
  3. If `--interactive`, ask:
59
66
  - What OSes must be supported?
60
67
  - What are the hard prerequisites (git, node, python version)?
@@ -80,8 +87,8 @@ Additional discovery steps for developer manifests:
80
87
 
81
88
  Build the manifest YAML following this priority order:
82
89
 
83
- 1. **metadata block** — include `install_type` matching `--type` flag (default: `user`)
84
- 2. **platform block** — from `--platforms` or detected by project type
90
+ 1. **metadata block** — include `install_type` matching `--type` flag (default: `developer`)
91
+ 2. **platform block** — from `--platform` or detected by project type
85
92
  3. **params block** — standard params: `INSTALL_DIR`, `BRANCH` (default: `main`); add `CONFIG_DIR` if a config step is needed
86
93
  4. **prerequisites block** — from project type (e.g., `node` for npm projects, `python3` for Python)
87
94
  5. **steps block** — construct from script templates:
@@ -213,21 +220,14 @@ Write the manifest to the appropriate path:
213
220
 
214
221
  Report:
215
222
  ```
216
- Generated: setup.dev.manifest.yaml
223
+ Generated: setup.manifest.yaml
217
224
  Install type: developer
218
- Platform: linux, macos
219
- OS config: docker-group (linux), inotify-watches (linux), xcode-cli-tools (macos)
220
- Params: INSTALL_DIR, LOCAL_DOMAIN [required], SSH_EMAIL [required]
221
- Prerequisites: git, node (>=20), nvm, mkcert
222
- Steps: clone, install-deps, apply-docker-group, apply-inotify, configure-dev, verify-dev
223
- Recovery: full-reset
224
- Scripts: installer/scripts/dev/ (6 files)
225
-
226
- Note: 2 OS config steps require re-login to take effect. Installer will warn user.
227
- Note: 1 OS config step (xcode-cli-tools) triggers a GUI dialog on macOS.
228
-
229
- Validate with: aiwg setup-validate installer/setup.dev.manifest.yaml
230
- Run with: aiwg setup-run installer/setup.dev.manifest.yaml
225
+ Platform: linux
226
+ Steps: setup
227
+ Scripts: scripts/setup.sh
228
+
229
+ Validate with: aiwg setup-validate --manifest setup.manifest.yaml
230
+ Run with: aiwg setup-run --manifest setup.manifest.yaml --dry-run
231
231
  ```
232
232
 
233
233
  ## Output File Structure
@@ -29,7 +29,7 @@ Path to schema file. Default: auto-located from AIWG installation.
29
29
  Fail on warnings in addition to errors.
30
30
 
31
31
  ### --fix (optional)
32
- Auto-fix simple issues (missing `id`, missing `depends_on` on sequential steps).
32
+ Reserved for future safe autofixes. The current CLI validates and reports only.
33
33
 
34
34
  ## Validation Checks
35
35
 
@@ -122,17 +122,8 @@ Result: INVALID — fix errors before running
122
122
 
123
123
  ## Auto-fix (--fix)
124
124
 
125
- When `--fix` is passed, the skill will:
126
- 1. Add `id` fields to any steps missing them (sequential: `step-1`, `step-2`, ...)
127
- 2. Add obvious `depends_on` for sequential steps (each step depends on the previous)
128
- 3. Print a diff of changes made
129
-
130
- It will NOT:
131
- - Change step types
132
- - Add or remove scripts
133
- - Modify param definitions
134
- - Add or remove `interactive_required` flags
135
- - Add or remove `os_config` entries
125
+ `--fix` is reserved for future safe autofixes. The current agent-facing CLI
126
+ validates and reports only; it does not mutate manifests.
136
127
 
137
128
  ## References
138
129
 
@@ -326,6 +326,8 @@ export function recordTypeForEntry(entry, schemaVersion) {
326
326
  return "aiwg.command";
327
327
  case "rule":
328
328
  return "aiwg.rule";
329
+ case "schema":
330
+ return "aiwg.schema";
329
331
  case "behavior":
330
332
  return "aiwg.behavior";
331
333
  case "flow":
@@ -132,6 +132,36 @@ function extractSummary(data, body) {
132
132
  const lines = body.split('\n').filter(l => l.trim() && !l.startsWith('#'));
133
133
  return lines.slice(0, 5).join(' ').slice(0, 500).trim();
134
134
  }
135
+ function parseSchemaDoc(content, relativePath) {
136
+ if (!/\.(json|ya?ml)$/i.test(relativePath))
137
+ return null;
138
+ let parsed;
139
+ try {
140
+ parsed = /\.json$/i.test(relativePath) ? JSON.parse(content) : loadYaml(content);
141
+ }
142
+ catch {
143
+ return null;
144
+ }
145
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed))
146
+ return null;
147
+ const schema = parsed;
148
+ const title = typeof schema.title === 'string' && schema.title.trim()
149
+ ? schema.title.trim()
150
+ : undefined;
151
+ const id = typeof schema.$id === 'string' && schema.$id.trim()
152
+ ? schema.$id.trim()
153
+ : undefined;
154
+ const description = typeof schema.description === 'string' && schema.description.trim()
155
+ ? schema.description.trim().slice(0, 240)
156
+ : undefined;
157
+ const filename = path.basename(relativePath, path.extname(relativePath)).replace(/\.schema$/i, '');
158
+ return {
159
+ title: title ?? filename,
160
+ name: filename,
161
+ capability: description ?? (id ? `Schema definition for ${title ?? filename}` : undefined),
162
+ searchTerms: [id, title, filename, 'schema'].filter((term) => Boolean(term)),
163
+ };
164
+ }
135
165
  /**
136
166
  * Determine SDLC phase from file path
137
167
  */
@@ -150,8 +180,6 @@ function inferPhase(filePath) {
150
180
  * always lands as `type: 'skill'` regardless of frontmatter.
151
181
  */
152
182
  function inferType(data, filePath) {
153
- if (typeof data.type === 'string')
154
- return data.type;
155
183
  // Normalize separators so matchers are cross-platform.
156
184
  const normalized = filePath.replace(/\\/g, '/');
157
185
  const basename = path.basename(filePath, path.extname(filePath)).toLowerCase();
@@ -179,7 +207,8 @@ function inferType(data, filePath) {
179
207
  const skipBasenames = new Set(['readme', 'rules-index', 'index']);
180
208
  const isMarkdown = /\.md$/i.test(filePath);
181
209
  const isTemplateAsset = TEMPLATE_INDEX_EXTENSIONS.some(ext => normalized.endsWith(ext));
182
- if (!skipBasenames.has(basename) && (isMarkdown || isTemplateAsset)) {
210
+ const isSchemaAsset = /\.(json|ya?ml|md)$/i.test(filePath);
211
+ if (!skipBasenames.has(basename) && (isMarkdown || isTemplateAsset || isSchemaAsset)) {
183
212
  // Look at directory segments only (exclude the file itself).
184
213
  for (let i = segments.length - 2; i >= 0; i--) {
185
214
  const seg = segments[i];
@@ -215,6 +244,10 @@ function inferType(data, filePath) {
215
244
  if (isMarkdown)
216
245
  return 'rule';
217
246
  break;
247
+ case 'schemas':
248
+ if (isSchemaAsset)
249
+ return 'schema';
250
+ break;
218
251
  case 'templates':
219
252
  return 'template';
220
253
  case 'behaviors':
@@ -228,6 +261,8 @@ function inferType(data, filePath) {
228
261
  }
229
262
  }
230
263
  }
264
+ if (typeof data.type === 'string')
265
+ return data.type;
231
266
  // Legacy SDLC artifact heuristics (existing behavior preserved).
232
267
  if (basename.startsWith('uc-') || basename.includes('use-case'))
233
268
  return 'use-case';
@@ -864,11 +899,12 @@ export async function buildIndex(cwd, options = {}) {
864
899
  const inferredType = inferType(data, relativePath);
865
900
  const physicalType = inferType({ ...data, type: undefined }, relativePath);
866
901
  const runbook = flow ? null : parseRunbookDoc(data, body, relativePath);
867
- const title = flow?.name ?? extractTitle(data, body);
902
+ const schemaDoc = inferredType === 'schema' ? parseSchemaDoc(content, relativePath) : null;
903
+ const title = flow?.name ?? schemaDoc?.title ?? extractTitle(data, body);
868
904
  const phase = typeof data.phase === 'string' ? data.phase : inferPhase(relativePath);
869
905
  const type = flow?.type ?? (runbook ? 'runbook' : inferredType);
870
906
  const tags = flow ? flow.tags : (Array.isArray(data.tags) ? data.tags.map(String) : []);
871
- const summary = flow?.description ?? runbook?.capability ?? extractSummary(data, body);
907
+ const summary = flow?.description ?? schemaDoc?.capability ?? runbook?.capability ?? extractSummary(data, body);
872
908
  const dependencies = extractMentions(content);
873
909
  // Discovery metadata (#1214, #1540, #1792) — meaningful for operational
874
910
  // AIWG artifact kinds. Kept undefined on document types so the index file
@@ -877,10 +913,10 @@ export async function buildIndex(cwd, options = {}) {
877
913
  // Declarative processes have no trigger phrases — they rely on their
878
914
  // capability and structure-aware search terms.
879
915
  const triggers = isDiscoverable && !flow ? extractTriggers(body, data) : undefined;
880
- const capability = flow?.capability ?? runbook?.capability ?? (isDiscoverable ? extractCapability(data, body) : undefined);
916
+ const capability = flow?.capability ?? schemaDoc?.capability ?? runbook?.capability ?? (isDiscoverable ? extractCapability(data, body) : undefined);
881
917
  const kind = flow?.kind ?? runbook?.kind;
882
918
  const sourceType = runbook && physicalType !== 'runbook' ? physicalType : undefined;
883
- const searchTerms = flow?.searchTerms ?? runbook?.searchTerms;
919
+ const searchTerms = flow?.searchTerms ?? schemaDoc?.searchTerms ?? runbook?.searchTerms;
884
920
  const kernel = data.kernel === true || data.kernel === 'true' ? true : undefined;
885
921
  // Script entrypoint metadata is meaningful for skills only (#1227).
886
922
  const script = type === 'skill' ? extractSkillScript(data) : undefined;
@@ -889,7 +925,7 @@ export async function buildIndex(cwd, options = {}) {
889
925
  // Canonical short name (#1233) — used by the scorer to floor exact-name
890
926
  // queries to 1.0 so hyphenated kernel-skill names like `aiwg-doctor`
891
927
  // remain searchable even when the rendered title strips the hyphen.
892
- const name = flow ? flow.name : (isDiscoverable ? extractCanonicalName(data, relativePath) : undefined);
928
+ const name = flow ? flow.name : schemaDoc?.name ?? (isDiscoverable ? extractCanonicalName(data, relativePath) : undefined);
893
929
  entry = {
894
930
  path: relativePath,
895
931
  type,
@@ -174,7 +174,7 @@ const SCORE_STOPWORDS = new Set([
174
174
  'handle', 'handles', 'handling',
175
175
  // AIWG meta-type nouns — zero discriminating signal in a discover query
176
176
  'aiwg', 'skill', 'skills', 'agent', 'agents', 'command', 'commands',
177
- 'rule', 'rules', 'flow', 'flows', 'workflow', 'workflows',
177
+ 'rule', 'rules', 'schema', 'schemas', 'flow', 'flows', 'workflow', 'workflows',
178
178
  ]);
179
179
  /**
180
180
  * Tokenize a query phrase into lowercased keywords for multi-word
@@ -24,6 +24,7 @@ export const OPERATIONAL_DISCOVERY_TYPES = [
24
24
  'agent',
25
25
  'command',
26
26
  'rule',
27
+ 'schema',
27
28
  'flow',
28
29
  'runbook',
29
30
  'template',
@@ -38,6 +38,7 @@ import { packagesHandler } from './packages.js';
38
38
  import { marketplaceHandler } from './marketplace.js';
39
39
  import { initHandler } from './init.js';
40
40
  import { setupHandler } from './setup.js';
41
+ import { setupGenerateHandler, setupRunHandler, setupValidateHandler } from './setup-manifest.js';
41
42
  import { runHandler } from './run.js';
42
43
  import { stewardHandler, stewardHandlers } from './steward.js';
43
44
  import { serveHandler } from './serve.js';
@@ -61,7 +62,7 @@ export {
61
62
  // Maintenance
62
63
  helpHandler, versionHandler, doctorHandler, updateHandler, refreshHandler, regenerateHandler, workspaceContextHandler,
63
64
  // Framework management
64
- useHandler, listHandler, removeHandler, promoteHandler, installHandler, packagesHandler, marketplaceHandler, initHandler, setupHandler, issueHandler, issueAuditHandler, runHandler,
65
+ useHandler, listHandler, removeHandler, promoteHandler, installHandler, packagesHandler, marketplaceHandler, initHandler, setupHandler, setupGenerateHandler, setupRunHandler, setupValidateHandler, issueHandler, issueAuditHandler, runHandler,
65
66
  // Project
66
67
  newBundleHandler, quickrefHandler, newProjectHandler, sessionHandler, sessionsHandler,
67
68
  // Workspace
@@ -132,6 +133,9 @@ export const allHandlers = [
132
133
  newProjectHandler,
133
134
  initHandler,
134
135
  setupHandler,
136
+ setupGenerateHandler,
137
+ setupRunHandler,
138
+ setupValidateHandler,
135
139
  issueHandler,
136
140
  issueAuditHandler,
137
141
  runHandler,