@aifabrix/builder 2.58.0 → 2.60.0

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 (120) hide show
  1. package/lib/agent-kit/codex-app-server.js +44 -0
  2. package/lib/agent-kit/git-identity.js +180 -0
  3. package/lib/agent-kit/init.js +4 -17
  4. package/lib/agent-kit/session-report.js +15 -10
  5. package/lib/agent-kit/setup-auth.js +131 -0
  6. package/lib/agent-kit/setup-context.js +118 -0
  7. package/lib/agent-kit/setup-github.js +70 -0
  8. package/lib/agent-kit/setup-managed.js +79 -0
  9. package/lib/agent-kit/setup-process.js +42 -0
  10. package/lib/agent-kit/setup-session.js +53 -0
  11. package/lib/agent-kit/setup-state.js +52 -0
  12. package/lib/agent-kit/setup-workspace.js +113 -0
  13. package/lib/agent-kit/setup.js +87 -0
  14. package/lib/agent-kit/start.js +48 -3
  15. package/lib/agent-kit/tmux-sessions.js +20 -3
  16. package/lib/api/dev.api.js +1 -1
  17. package/lib/api/miso-health.api.js +26 -0
  18. package/lib/api/role-assistant-test-job.api.js +60 -0
  19. package/lib/api/types/dev.types.js +3 -3
  20. package/lib/api/work-search.api.js +13 -6
  21. package/lib/app/deploy.js +8 -103
  22. package/lib/app/show-display.js +1 -0
  23. package/lib/app/show-online.js +15 -0
  24. package/lib/build/standard-docker-build.js +4 -1
  25. package/lib/cli/index.js +4 -0
  26. package/lib/cli/setup-app.js +14 -1
  27. package/lib/cli/setup-dev-path-commands.js +4 -0
  28. package/lib/cli/setup-dev.js +7 -4
  29. package/lib/cli/setup-help.js +86 -0
  30. package/lib/cli/setup-onboarding.js +37 -0
  31. package/lib/cli/setup-utility-repair.js +7 -5
  32. package/lib/cli/setup-utility.js +24 -1
  33. package/lib/commands/agent-kit-help.js +21 -7
  34. package/lib/commands/agent-kit-sessions.js +126 -0
  35. package/lib/commands/agent-kit-setup.js +44 -0
  36. package/lib/commands/agent-kit.js +5 -79
  37. package/lib/commands/dev-init.js +21 -23
  38. package/lib/commands/dev-refresh.js +2 -2
  39. package/lib/commands/governance-verify-external.js +12 -5
  40. package/lib/commands/repair-datasource.js +9 -9
  41. package/lib/commands/repair.js +45 -8
  42. package/lib/commands/role-assistant.js +7 -0
  43. package/lib/commands/upload-qualification-client.js +56 -11
  44. package/lib/commands/upload-qualification-poll.js +51 -22
  45. package/lib/commands/wizard-dataplane.js +16 -52
  46. package/lib/core/env-platform-expand.js +93 -0
  47. package/lib/core/secrets-env-content.js +37 -3
  48. package/lib/datasource/datasource-validate-summary.js +8 -5
  49. package/lib/datasource/sync-defaults.js +53 -0
  50. package/lib/deployment/installation/azure-infra-stage.js +13 -1
  51. package/lib/deployment/installation/azure-preflight.js +13 -2
  52. package/lib/deployment/installation/azure-readiness.js +24 -2
  53. package/lib/deployment/installation/environment-auth.js +60 -20
  54. package/lib/deployment/installation/environment-stage.js +9 -5
  55. package/lib/deployment/installation/infra-catalog.js +10 -7
  56. package/lib/deployment/installation/infra-manifest.js +5 -0
  57. package/lib/deployment/installation/registry-auth-mode.js +33 -10
  58. package/lib/deployment/marketplace-environment.js +26 -1
  59. package/lib/generator/builders.js +17 -0
  60. package/lib/generator/helpers.js +23 -2
  61. package/lib/generator/index.js +33 -18
  62. package/lib/integration-definition/apply.js +2 -2
  63. package/lib/internal/fs-real-sync.js +4 -1
  64. package/lib/programmatic/bearer-auth.js +3 -62
  65. package/lib/programmatic/builder-api-startup.js +51 -0
  66. package/lib/programmatic/builder-miso-runtime.js +167 -0
  67. package/lib/programmatic/openapi-descriptions.js +3 -3
  68. package/lib/programmatic/openapi-schema-descriptions-core.js +3 -3
  69. package/lib/programmatic/openapi-spec.js +2 -1
  70. package/lib/programmatic/route-handler-map.js +3 -2
  71. package/lib/role-assistant/test-cases-search.js +3 -0
  72. package/lib/role-assistant/test-job-runner.js +125 -0
  73. package/lib/role-assistant/test-runner-search.js +44 -2
  74. package/lib/schema/application-schema.json +193 -2
  75. package/lib/schema/environment-deploy-request.schema.json +1 -1
  76. package/lib/schema/external-datasource.schema.json +20 -5
  77. package/lib/schema/infra-parameter.schema.json +140 -34
  78. package/lib/schema/infra.parameter.yaml +30 -29
  79. package/lib/schema/infrastructure-schema.json +133 -14
  80. package/lib/schema/installation-environment.schema.json +1 -1
  81. package/lib/schema/wizard-config.schema.json +1 -1
  82. package/lib/utils/compose-generate-docker-compose.js +12 -0
  83. package/lib/utils/config-paths.js +24 -29
  84. package/lib/utils/config-registry-preference.js +13 -6
  85. package/lib/utils/dev-init-ssh-merge.js +5 -4
  86. package/lib/utils/dev-user-groups.js +2 -1
  87. package/lib/utils/docker-build.js +29 -8
  88. package/lib/utils/docker-daemon-tls-ca.js +2 -2
  89. package/lib/utils/docker-manifest-public-port.js +36 -0
  90. package/lib/utils/error-formatters/validation-errors.js +25 -5
  91. package/lib/utils/help-builder.js +4 -3
  92. package/lib/utils/platform-resolution.js +226 -0
  93. package/lib/utils/resolve-docker-image-ref.js +8 -3
  94. package/lib/utils/token-manager.js +29 -36
  95. package/package.json +4 -3
  96. package/templates/README.md +2 -1
  97. package/templates/agent-kit/agent-kit.yaml +4 -1
  98. package/templates/agent-kit/instructions/AGENTKIT.md +40 -3
  99. package/templates/agent-kit/instructions/root.AGENTS.md +42 -1
  100. package/templates/agent-kit/skills/aifabrix-connected-system/SKILL.md +33 -1
  101. package/templates/agent-kit/skills/aifabrix-connected-system/scripts/delivery-verdict.js +176 -0
  102. package/templates/agent-kit/skills/aifabrix-plan/SKILL.md +3 -0
  103. package/templates/agent-kit/skills/aifabrix-plan/references/interaction.md +10 -3
  104. package/templates/agent-kit/skills/aifabrix-prove/SKILL.md +22 -0
  105. package/templates/agent-kit/skills/aifabrix-role-assistant/SKILL.md +21 -0
  106. package/templates/agent-kit/skills/shared/feedback.md +31 -0
  107. package/templates/agent-kit/skills/shared/hosts.md +35 -7
  108. package/templates/agent-kit/skills/shared/status.md +85 -0
  109. package/templates/agent-kit/workspace/BUILDER_IMPROVEMENT_FINDINGS.md +27 -0
  110. package/templates/agent-kit/workspace/README.md +14 -1
  111. package/templates/applications/builder-api/application.yaml +1 -1
  112. package/templates/applications/dataplane/application.yaml +30 -2
  113. package/templates/applications/dataplane/env.template +37 -4
  114. package/templates/applications/miso-controller/application.yaml +24 -1
  115. package/templates/applications/miso-controller/env.template +22 -35
  116. package/templates/external-system/external-datasource.yaml.hbs +7 -6
  117. package/templates/marketplace/main.json +281 -75
  118. package/templates/python/Dockerfile.hbs +2 -0
  119. package/templates/typescript/Dockerfile.hbs +2 -0
  120. package/templates/typescript/docker-compose.hbs +12 -0
@@ -10,7 +10,14 @@ description: >
10
10
  # aifabrix-connected-system
11
11
 
12
12
  Phases: `plan` | `validate` | `build` | `publish`.
13
- Resolve phase: explicit argument → plan/package state → safe next → ask once.
13
+
14
+ **No phase argument means report only.** Inspect, print the combined status matrix,
15
+ recommend one next phase, and stop. Do not upload, deploy, advance a plan task, create
16
+ proof assets, run cases, or mutate anything until the user names a phase or picks a route:
17
+ [status.md](../shared/status.md).
18
+
19
+ Resolve phase: explicit argument → ask. Package state informs the recommendation, never
20
+ the action.
14
21
 
15
22
  Stop at the phase gate. Do not run the next phase without `next-yes`
16
23
  ([interaction.md](../aifabrix-plan/references/interaction.md)).
@@ -22,6 +29,28 @@ Stop at the phase gate. Do not run the next phase without `next-yes`
22
29
  | build | READY | BUILT |
23
30
  | publish | package exists and local validate passes | PASS or PASS_WITH_SKIPS |
24
31
 
32
+ READY and BUILT are **package** gates: they describe files on disk, not a working or
33
+ published system. Report them qualified, beside the Delivery row
34
+ ([status.md](../shared/status.md)).
35
+
36
+ ## Publish and certification verdicts
37
+
38
+ Compute the verdict with
39
+ [scripts/delivery-verdict.js](scripts/delivery-verdict.js) from what you observed; do not
40
+ choose it by narrative.
41
+
42
+ | Observation | Verdict |
43
+ | --- | --- |
44
+ | Online state Draft | publish incomplete; prove BLOCKED; Delivery NEEDS_FIXES |
45
+ | Operations FAILED | NEEDS_FIXES |
46
+ | Known ABAC, persistence, capability, or live-evidence failure | NEEDS_FIXES while open |
47
+ | Bronze or TECHNICALLY_READY alone | not PASS |
48
+ | Online Published **and** acceptable Operations, Trust, Governance and live evidence | PASS |
49
+ | The above with only explicitly allowed skips | PASS_WITH_SKIPS |
50
+
51
+ `PASS_WITH_SKIPS` covers skips the user allowed by name. It may never cover a known
52
+ failure, an unrun gate, or a gate whose result you did not see.
53
+
25
54
  Read current CLI help before composing commands. You own orchestration, not CLI implementation.
26
55
  Host runtimes (local vs SSH): [hosts.md](../shared/hosts.md).
27
56
  CLI login from chat: [login.md](../shared/login.md).
@@ -38,6 +67,7 @@ System key: argument → active plan → sole `integration/` folder → ask once
38
67
 
39
68
  ## References
40
69
 
70
+ - [status.md](../shared/status.md) — read-only default, route options, status matrix
41
71
  - [delivery-gates.md](references/delivery-gates.md) — BID/wizard/repair, upload vs deploy, tests, identity, protection
42
72
  - [contract-checklist.md](references/contract-checklist.md) — exposed, FK, viewpoints, RBAC/ABAC
43
73
  - [production-safety.md](references/production-safety.md) — designated subject, credential-deferred E2E
@@ -52,6 +82,8 @@ System key: argument → active plan → sole `integration/` folder → ask once
52
82
  - Upload without deploy is not published and not PASS
53
83
  - No system-level sync of views
54
84
  - No publish continuation after an unresolved hard failure
85
+ - A known failure stays open until that same concern is rerun and passes
86
+ - No bare READY/BUILT/PASS headline when Delivery is NEEDS_FIXES or BLOCKED
55
87
 
56
88
  ## Trigger examples
57
89
 
@@ -0,0 +1,176 @@
1
+ /**
2
+ * Delivery verdict for a customer Connected System and Role Assistant.
3
+ *
4
+ * The agent records what it observed; this decides the verdict. Keeping the decision here
5
+ * rather than in skill prose means a passing package cannot be narrated into a passing
6
+ * delivery: precedence is computed, not chosen.
7
+ *
8
+ * Gates are reported separately on purpose. A package can be BUILT while the delivery
9
+ * needs fixes and prove is blocked, and all three are true at once.
10
+ *
11
+ * @fileoverview Deterministic status matrix and overall verdict for customer delivery skills
12
+ */
13
+
14
+ 'use strict';
15
+
16
+ /** Worst-first. A later gate never improves an earlier one. */
17
+ const RANK = ['BLOCKED', 'NEEDS_FIXES', 'PASS_WITH_SKIPS', 'PASS'];
18
+ const UNKNOWN = 'UNKNOWN';
19
+
20
+ /**
21
+ * @param {string} a First verdict
22
+ * @param {string} b Second verdict
23
+ * @returns {string} The worse of the two
24
+ */
25
+ function worse(a, b) {
26
+ const left = RANK.indexOf(a);
27
+ const right = RANK.indexOf(b);
28
+ if (left < 0) return b;
29
+ if (right < 0) return a;
30
+ return left <= right ? a : b;
31
+ }
32
+
33
+ /**
34
+ * Trim and uppercase an observed field. Missing values become an empty string.
35
+ * @param {*} value Observed field
36
+ * @returns {string} Normalized token
37
+ */
38
+ function norm(value) {
39
+ return String(value === undefined || value === null ? '' : value).trim().toUpperCase();
40
+ }
41
+
42
+ /**
43
+ * Published is the only online state that permits publish completion or live prove.
44
+ * @param {object} signals Observed signals
45
+ * @returns {{ state: string, published: boolean, known: boolean }} Online state
46
+ */
47
+ function onlineState(signals) {
48
+ const state = norm(signals.onlineState) || UNKNOWN;
49
+ return {
50
+ state,
51
+ published: state === 'PUBLISHED',
52
+ known: state === 'PUBLISHED' || state === 'DRAFT'
53
+ };
54
+ }
55
+
56
+ /**
57
+ * Builder's pillar verdicts are VERIFIED, FAILED, NOT_VERIFIED and NOT_APPLICABLE
58
+ * (`lib/lifecycle/product-model.js`). NOT_VERIFIED is not a pass — it is the state a pillar
59
+ * sits in until it has actually been proved, and treating it as neutral is how an
60
+ * unverified system gets reported as delivered. A gate that was never run is UNKNOWN.
61
+ * @param {object} gate Observed gate result
62
+ * @returns {string} Normalized verdict
63
+ */
64
+ function gateVerdict(gate) {
65
+ if (!gate) return UNKNOWN;
66
+ const verdict = norm(gate.verdict);
67
+ if (!verdict || verdict === 'NOT_RUN' || verdict === 'SKIPPED') return UNKNOWN;
68
+ if (verdict === 'VERIFIED' || verdict === 'PASSED' || verdict === 'PASS') return 'PASS';
69
+ if (verdict === 'NOT_APPLICABLE') return 'PASS';
70
+ if (verdict === 'FAILED' || verdict === 'FAIL' || verdict === 'NOT_VERIFIED') return 'NEEDS_FIXES';
71
+ return 'NEEDS_FIXES';
72
+ }
73
+
74
+ /**
75
+ * Failures stay active until the same concern is rerun and passes, so a later structural
76
+ * success cannot clear an earlier runtime, governance, persistence, or E2E failure.
77
+ * @param {Array} knownFailures Recorded failures
78
+ * @returns {Array} Failures still open
79
+ */
80
+ function openFailures(knownFailures) {
81
+ const rows = Array.isArray(knownFailures) ? knownFailures : [];
82
+ return rows.filter(row => row && row.resolved !== true && norm(row.resolved) !== 'TRUE');
83
+ }
84
+
85
+ /**
86
+ * One status-matrix cell: verdict plus an optional percent.
87
+ * @param {object} gate Observed gate result
88
+ * @returns {string} Display text
89
+ */
90
+ function describeScore(gate) {
91
+ if (!gate) return UNKNOWN;
92
+ const verdict = norm(gate.verdict) || norm(gate.category) || UNKNOWN;
93
+ const percent = gate.percent === undefined || gate.percent === null ? '' : ` ${gate.percent}%`;
94
+ return `${verdict}${percent}`;
95
+ }
96
+
97
+ /**
98
+ * Overall delivery verdict. PASS needs a published system and acceptable Operations,
99
+ * Trust, Governance and live-evidence results; an unrun gate is not a pass. BLOCKED is
100
+ * reserved for a delivery that cannot be assessed or was explicitly stopped — a draft
101
+ * system is fixable work, so it reports NEEDS_FIXES.
102
+ * @param {object} signals Observed signals
103
+ * @returns {string} BLOCKED | NEEDS_FIXES | PASS_WITH_SKIPS | PASS
104
+ */
105
+ function overallVerdict(signals) {
106
+ const online = onlineState(signals);
107
+ if (!online.known || signals.blocked === true) return 'BLOCKED';
108
+ let verdict = online.published ? 'PASS' : 'NEEDS_FIXES';
109
+ for (const gate of [signals.operations, signals.trust, signals.governance, signals.liveEvidence]) {
110
+ const result = gateVerdict(gate);
111
+ verdict = worse(verdict, result === UNKNOWN ? 'NEEDS_FIXES' : result);
112
+ }
113
+ if (openFailures(signals.knownFailures).length > 0) verdict = worse(verdict, 'NEEDS_FIXES');
114
+ const skips = Array.isArray(signals.allowedSkips) ? signals.allowedSkips : [];
115
+ if (verdict === 'PASS' && skips.length > 0) return 'PASS_WITH_SKIPS';
116
+ return verdict;
117
+ }
118
+
119
+ /**
120
+ * Prove readiness is a business-case gate. Package validation, pipeline checks, a Bronze
121
+ * certification or TECHNICALLY_READY never establish it on their own.
122
+ * @param {object} signals Observed signals
123
+ * @returns {string} READY | BLOCKED
124
+ */
125
+ function proveReadiness(signals) {
126
+ const overall = overallVerdict(signals);
127
+ if (overall !== 'PASS' && overall !== 'PASS_WITH_SKIPS') return 'BLOCKED';
128
+ const ra = signals.roleAssistant || {};
129
+ // `role-assistant test --json` gives the verdict. Availability is an operator action with
130
+ // no CLI surface, so it must be confirmed explicitly; unconfirmed is not available.
131
+ if (gateVerdict(ra) !== 'PASS' || norm(ra.availability) !== 'AVAILABLE') return 'BLOCKED';
132
+ const cases = signals.cases || {};
133
+ if (cases.happy !== true || cases.safeStop !== true) return 'BLOCKED';
134
+ if (signals.authorityConfirmed !== true) return 'BLOCKED';
135
+ return 'READY';
136
+ }
137
+
138
+ /**
139
+ * Every row the skills must report, in a fixed order.
140
+ * @param {object} signals Observed signals
141
+ * @returns {Array<{ gate: string, value: string }>} Status matrix rows
142
+ */
143
+ function statusMatrix(signals) {
144
+ const ra = signals.roleAssistant || {};
145
+ const availability = `${norm(ra.availability) || UNKNOWN}/${norm(ra.verdict) || UNKNOWN}`;
146
+ return [
147
+ { gate: 'Package', value: norm(signals.packageGate) || UNKNOWN },
148
+ { gate: 'Online', value: onlineState(signals).state },
149
+ { gate: 'AI Readiness', value: describeScore(signals.aiReadiness) },
150
+ { gate: 'Operations', value: describeScore(signals.operations) },
151
+ { gate: 'Trust', value: describeScore(signals.trust) },
152
+ { gate: 'Governance', value: describeScore(signals.governance) },
153
+ { gate: 'Role Assistant', value: availability },
154
+ { gate: 'Prove readiness', value: proveReadiness(signals) },
155
+ { gate: 'Delivery', value: overallVerdict(signals) }
156
+ ];
157
+ }
158
+
159
+ /**
160
+ * A headline may not claim success the overall verdict does not support.
161
+ * @param {object} signals Observed signals
162
+ * @returns {boolean} True when a bare READY, BUILT or PASS headline is forbidden
163
+ */
164
+ function forbidsSuccessHeadline(signals) {
165
+ const overall = overallVerdict(signals);
166
+ return overall === 'BLOCKED' || overall === 'NEEDS_FIXES';
167
+ }
168
+
169
+ module.exports = {
170
+ worse,
171
+ statusMatrix,
172
+ overallVerdict,
173
+ proveReadiness,
174
+ openFailures,
175
+ forbidsSuccessHeadline
176
+ };
@@ -12,6 +12,9 @@ description: >
12
12
  Input: business specification and optional `systemKey`.
13
13
  Output: one delivery plan from [plan-template.md](references/plan-template.md).
14
14
 
15
+ Named with no specification, report what exists and ask; do not start writing a plan from
16
+ an inferred spec ([status.md](../shared/status.md)).
17
+
15
18
  Score completeness with [challenge-checklist.md](references/challenge-checklist.md).
16
19
  Next-step interaction: [interaction.md](references/interaction.md).
17
20
  Host runtimes (local vs SSH): [hosts.md](../shared/hosts.md).
@@ -24,11 +24,18 @@ Archive is a distinct user decision (`archive-yes` / `archive-no`). Never archiv
24
24
  - NEEDS_DECISIONS: AskQuestion challenge rows. No `cust-next`.
25
25
  - BLOCKED / FAIL / NEEDS_FIXES / ABORTED: do not offer the next phase as if success.
26
26
 
27
+ A phase gate is per-gate, not overall. Offer the next phase only when the **Delivery** row
28
+ supports it; a passing package gate beside `Delivery: NEEDS_FIXES` is not success and the
29
+ offer must name what is still open.
30
+
27
31
  ## Phase detection (connected-system and prove)
28
32
 
29
33
  1. Explicit phase from the user
30
- 2. Active plan and package state
31
- 3. Safe next eligible phase
32
- 4. Ask once if ambiguous
34
+ 2. Ask, offering the routes in [status.md](../../shared/status.md)
35
+
36
+ There is no third step. Package and plan state decide what you *recommend*, never what you
37
+ run: a bare invocation reports status and stops ([status.md](../../shared/status.md)).
38
+ Inferring "the safe next eligible phase" is what makes a skill start working before the
39
+ user has said what they want.
33
40
 
34
41
  Never silently run the following phase after success.
@@ -12,8 +12,30 @@ description: >
12
12
  Phases: `validate` | `build` | `prove`.
13
13
  Loop: validate ↔ build ↔ prove ↔ learn.
14
14
 
15
+ **No phase argument means run prove-readiness validation only.** Report the combined status
16
+ matrix and the readiness verdict, recommend one next phase, and stop. Do not build proof
17
+ assets, run cases, publish, or promote: [status.md](../shared/status.md).
18
+
15
19
  `READY` means prove-ready, not permission to stop authoring. Build may run without READY.
16
20
 
21
+ ## Prove readiness
22
+
23
+ READY requires **all** of:
24
+
25
+ - Connected System PASS, or PASS_WITH_SKIPS whose skips the user allowed by name
26
+ - online state Published
27
+ - Operations not failed
28
+ - relevant governance scenarios passed
29
+ - Role Assistant available and verified
30
+ - happy and safe-stop cases present for the scenarios in scope
31
+ - authority, test subjects, and required business inputs confirmed
32
+
33
+ Anything short of all of them is BLOCKED, reported with the row that blocks it.
34
+ [delivery-verdict.js](../aifabrix-connected-system/scripts/delivery-verdict.js) computes it.
35
+
36
+ Package validation, pipeline checks, Bronze certification and TECHNICALLY_READY are **not**
37
+ business-case readiness. None of them, alone or together, makes prove READY.
38
+
17
39
  Every phase **must** update [learning-template.md](references/learning-template.md).
18
40
  Evidence rules: [evidence-lifecycle.md](references/evidence-lifecycle.md).
19
41
  Demo shape: [demo-template.md](references/demo-template.md).
@@ -12,6 +12,8 @@ See [package-boundary.md](references/package-boundary.md) and nested `role-assis
12
12
  Host runtimes (local vs SSH): [hosts.md](../shared/hosts.md).
13
13
  CLI login from chat: [login.md](../shared/login.md).
14
14
 
15
+ Named with no task, report status and stop: [status.md](../shared/status.md).
16
+
15
17
  ## Preconditions
16
18
 
17
19
  ```bash
@@ -22,6 +24,25 @@ aifabrix role list --page-size 1000
22
24
  Catalog Business Role and an active user binding are prerequisites.
23
25
  Connected Systems this assistant needs must be dataplane **published** (deploy, not upload-only).
24
26
 
27
+ ## Readiness gate
28
+
29
+ Report the assistant as available and verified only when every row holds. Any missing row
30
+ means NOT_VERIFIED, named by row — never a blanket claim.
31
+
32
+ | Row | Established by |
33
+ | --- | --- |
34
+ | Active catalog role | `aifabrix role list --page-size 1000` |
35
+ | Required Connected Systems published **and** certified | `show --online` plus their Delivery verdict |
36
+ | Subscribed capabilities available | capability check against those systems |
37
+ | OpenAPI published | `role-assistant test --json` → `openApiPublished` |
38
+ | Lifecycle verified | `role-assistant test --json` → `verdict` is `VERIFIED` |
39
+ | Worker available | operator "Make available"; **no CLI surface** — confirm explicitly or report UNKNOWN |
40
+ | Happy and safe-stop cases discoverable | cases present for the scenarios in scope |
41
+
42
+ A published Connected System that is not certified does not satisfy row two. `verdict`
43
+ `NOT_VERIFIED` is not a pass, and a `certification.level` such as `BRONZE` never
44
+ substitutes for it.
45
+
25
46
  ## Workflow
26
47
 
27
48
  1. `aifabrix download <catalogRoleOrRaKey>` before editing an existing assistant.
@@ -0,0 +1,31 @@
1
+ # Feedback — where an observation goes
2
+
3
+ `aifabrix agent-kit update` rewrites `.agents/skills/**`, `AGENTKIT.md`, and the
4
+ managed sections of `AGENTS.md` and `CLAUDE.md` from the installed kit. Editing
5
+ them blocks the next update as a conflict, and `--force` discards the edit with
6
+ no diff to review. Improve the kit by filing a finding, not by editing a skill.
7
+
8
+ | Observation | Where it goes |
9
+ | --- | --- |
10
+ | Generic CLI, skill, or platform gap | `BUILDER_IMPROVEMENT_FINDINGS.md` |
11
+ | Manual EDS edit | `integration/<systemKey>/INTEGRATION_CHANGELOG.md` |
12
+ | Vendor limits, tenant ids, PII stance | `integration/<systemKey>/README.md` |
13
+ | Delivery learning for a role | `role-assistant/ra-<roleKey>/learning/learning.md` |
14
+
15
+ ## Writing a finding
16
+
17
+ Newest first, under a `## YYYY-MM-DD — one line naming the gap` heading:
18
+
19
+ - **Command** — the exact command, customer values replaced by placeholders.
20
+ - **Observed** — what happened, with the error text and the verdict.
21
+ - **Expected** — what should have happened, and why that is reasonable.
22
+ - **Scope** — whether it reproduces outside this workspace, and what is still
23
+ unproven. Say so plainly when the root cause is not established.
24
+
25
+ A finding is read outside this workspace, so leave out correlation ids, audit
26
+ refs, internal URLs, tenant or record identifiers, hostnames, and customer
27
+ names. Customer specifics belong in the package README or the role's
28
+ `learning.md` instead.
29
+
30
+ Never weaken a gate, assertion, or test to make a finding go away. A failing
31
+ gate with a filed finding is a better outcome than a green run that hides one.
@@ -6,6 +6,11 @@ Install and sign-in steps are in `AGENTKIT.md`. This file is how to **run** each
6
6
 
7
7
  Do not start Claude or Codex in your home directory. `cd` into this git workspace first.
8
8
 
9
+ For first-time terminal onboarding, run `aifabrix agent-kit setup <controllerUrl>`.
10
+ It creates a local workspace under AI Fabrix work and starts Codex; use `--code claude`
11
+ to select Claude. GitHub is optional through `--repo owner/name`. Setup preserves
12
+ permission settings; the standalone start defaults below remain separate.
13
+
9
14
  ## Auto-approve
10
15
 
11
16
  `aifabrix agent-kit install` can write gitignored host configs so Claude Code and Codex do not prompt for every tool:
@@ -13,7 +18,17 @@ Do not start Claude or Codex in your home directory. `cd` into this git workspac
13
18
  - Claude Code: `.claude/settings.local.json` (`permissions.defaultMode` = `bypassPermissions`, `allow` = `Bash(aifabrix *)` and `Read(~/**)`)
14
19
  - Codex: `.codex/config.toml` (`approval_policy = "never"`, `sandbox_mode = "workspace-write"`)
15
20
 
16
- Those files stay in **this workspace**. Claude may **read** files under the developer home (`Read(~/**)`) and run the delivery CLI (`Bash(aifabrix *)`). They do not add sibling folders as extra workspaces, do not grant Write outside this repo, and do not allow every shell command. `agent-kit start claude|codex` writes only the selected host's file by default; `--skip-approve-all` opts out. Install/update retain their explicit approval prompts and flags. `--force` overwrites existing local files. Builder never writes `~/.claude` or `~/.codex`.
21
+ Those files stay in **this workspace**; Builder never writes `~/.claude` or `~/.codex`, and neither file adds a sibling folder as an extra workspace.
22
+
23
+ Understand what you are accepting for Claude Code. `bypassPermissions` stops the
24
+ prompt for **every** tool call in this workspace, not only the two `allow`
25
+ entries, which grant nothing extra while that mode is set. That includes
26
+ `aifabrix` subcommands which change remote state, such as `deploy`, `upload`,
27
+ `identity sync` and `protection upload`. Codex is narrower: `approval_policy`
28
+ removes the prompt, while `sandbox_mode = "workspace-write"` still confines
29
+ writes to this workspace.
30
+
31
+ Use `--skip-approve-all` when you want the prompts, on a shared or production-connected installation. `agent-kit start claude|codex` writes only the selected host's file by default. Install/update retain their explicit approval prompts and flags. `--force` overwrites existing local files.
17
32
 
18
33
  ## Cursor
19
34
 
@@ -23,13 +38,17 @@ Those files stay in **this workspace**. Claude may **read** files under the deve
23
38
 
24
39
  ## Claude Code
25
40
 
26
- **Local or SSH — tmux.** Closing the terminal must not kill Claude. Agent Kit starts Claude **inside tmux**, with Remote Control and workspace auto-approval enabled by default. Remote Control is the **same** session on this PC, [claude.ai/code](https://claude.ai/code), and the Claude mobile app (**Code**). Do not use `claude --cloud` for this — that starts a different machine that clones GitHub. Claude `--tmux` is only for `--worktree` sessions, not this wrapper.
41
+ On a managed host, `af onboarding --coding claude` starts or reuses a detached
42
+ Claude tmux session and prints how to attach. Its Remote Control session is
43
+ available from the same Claude account when supported.
44
+
45
+ **Optional terminal session — tmux.** When you choose a terminal workflow, Agent Kit starts Claude **inside tmux**, with Remote Control and workspace auto-approval enabled by default. Remote Control is the **same** session on this PC, [claude.ai/code](https://claude.ai/code), and the Claude mobile app (**Code**). Do not use `claude --cloud` for this — that starts a different machine that clones GitHub. Claude `--tmux` is only for `--worktree` sessions, not this wrapper.
27
46
 
28
47
  ```bash
29
48
  aifabrix agent-kit start claude
30
49
  ```
31
50
 
32
- tmux session name is this folder (for example `aifabrix-docs`). Remote Control name is `hostname-user-folder` (for example `builder01-dev03-aifabrix-docs`). `--name` overrides the folder; `--no-remote-control` and `--skip-approve-all` opt out. Several workspaces can run at once. Detach without killing Claude: `Ctrl-b` then `d`. Reattach: `tmux attach -t aifabrix-docs`. A duplicate `start` fails instead of attaching. Then `/aifabrix-plan` (or another `/aifabrix-*` skill). First run in a project asks you to trust the folder; accept only this workspace.
51
+ tmux session name is this folder (for example `acme-workspace`). Remote Control name is `hostname-user-folder` (for example `devhost-alice-acme-workspace`). `--name` overrides the folder; `--no-remote-control` and `--skip-approve-all` opt out. Several workspaces can run at once. Detach without killing Claude: `Ctrl-b` then `d`. Reattach: `tmux attach -t acme-workspace`. A duplicate `start` fails instead of attaching. Then `/aifabrix-plan` (or another `/aifabrix-*` skill). First run in a project asks you to trust the folder; accept only this workspace.
33
52
 
34
53
  **Phone and PC.** Sign in with the same Claude Pro/Max/Team account (`claude auth login` — not an API key). After Remote Control starts, open **Code** in the Claude mobile app and/or [claude.ai/code](https://claude.ai/code) on the PC. In an already-running session, `/remote-control` or `/mobile`.
35
54
 
@@ -37,13 +56,21 @@ Closing the terminal (or SSH) does not stop a tmux session. Stopping tmux or the
37
56
 
38
57
  ## Codex
39
58
 
40
- **Local or SSH — tmux and Remote Control.** tmux keeps Codex running if you close the terminal or disconnect SSH. Agent Kit also starts Codex's native remote-control daemon and workspace auto-approval by default.
59
+ **Remote SSH project.** Open the workspace printed by `af onboarding` in the
60
+ Codex app. The app's server connection runs separately from tmux, so no tmux
61
+ session is needed for that chat.
62
+
63
+ **Optional terminal session — tmux and Remote Control.** tmux keeps a separate
64
+ terminal Codex session running if you disconnect SSH. `agent-kit start codex`
65
+ also requests Codex's native Remote Control by default; the npm-installed CLI
66
+ may require `--no-remote-control` because the daemon needs Codex's standalone
67
+ installer.
41
68
 
42
69
  ```bash
43
70
  aifabrix agent-kit start codex
44
71
  ```
45
72
 
46
- Default `--name` is the last folder. `--no-remote-control` keeps the launch local; `--skip-approve-all` leaves Codex permissions unchanged. If that session already exists, `start` fails with list/kill guidance. Detach: `Ctrl-b` then `d`. Reattach with `tmux attach -t aifabrix-docs`. Then `$aifabrix-plan` (and the other `$aifabrix-*` skills). Codex reads `AGENTS.md`. Killing tmux does not stop the shared daemon; use `codex remote-control stop` when required.
73
+ Default `--name` is the last folder. `--no-remote-control` skips that daemon; `--skip-approve-all` leaves Codex permissions unchanged. If that session already exists, `start` fails with list/kill guidance. Detach: `Ctrl-b` then `d`. Reattach with `tmux attach -t acme-workspace`. Then `$aifabrix-plan` (and the other `$aifabrix-*` skills). Codex reads `AGENTS.md`. A separate Codex app server used by a desktop SSH chat appears in `agent-kit list` and the interactive `agent-kit kill` menu; stopping it requires confirmation and may disconnect the chat. `codex remote-control stop` only controls a standalone-managed daemon.
47
74
 
48
75
  **Foreground only (no tmux).**
49
76
 
@@ -58,8 +85,9 @@ codex
58
85
  | --- | --- |
59
86
  | New named session | `tmux new -s <name> -c /path/to/this-workspace` |
60
87
  | Detach (leave it running) | `Ctrl-b`, then `d` |
61
- | List sessions | `aifabrix agent-kit list` |
88
+ | List sessions; choose tmux to attach or Close | `aifabrix agent-kit list` |
62
89
  | Attach | `tmux attach -t <name>` |
63
- | Kill session | `aifabrix agent-kit kill <name>` |
90
+ | Stop tmux by name | `aifabrix agent-kit kill <name>` |
91
+ | Choose a tmux session or Codex app server to stop | `aifabrix agent-kit kill` |
64
92
 
65
93
  Use a different `--name` per workspace so several Claude or Codex sessions can run on the same host. Claude and Codex in the **same** folder also need two names.
@@ -0,0 +1,85 @@
1
+ # Status first — what a bare invocation does
2
+
3
+ A skill named with no phase is a **question, not an instruction**. Report status, say what
4
+ you would do next, and wait. This is the default for every lifecycle skill.
5
+
6
+ ## Read-only means read-only
7
+
8
+ With no phase argument, you may read local packages, run `aifabrix auth status`, and run
9
+ read-only inspection such as `show --online` and `list`. You may **not**:
10
+
11
+ - upload, deploy, publish, or promote anything
12
+ - advance a plan task or mark one done
13
+ - create proof assets, Evidence, Knowledge, or tests
14
+ - run assistant cases or any command that mutates external state
15
+
16
+ Never infer a phase from "the safe next eligible one". Ambiguity is a reason to ask, not a
17
+ licence to start. Read-only inspection is still allowed when the user names a phase that
18
+ cannot run yet — report why instead of doing adjacent work.
19
+
20
+ ## Open by saying what you are about to do
21
+
22
+ Before the first command of any phase, state in one line what the phase will change and
23
+ what it will leave alone. A user who has not used this kit before cannot consent to work
24
+ they cannot see coming.
25
+
26
+ ## Offer the route, do not choose it
27
+
28
+ Ask once, with these options. Proceed only on an explicit choice.
29
+
30
+ | Option id | Means |
31
+ | --- | --- |
32
+ | `route-normal` | Run the normal path for this skill through to its gate, stopping at each phase gate |
33
+ | `route-check` | Inspect and test only — validation, checks and status, no publish or promotion |
34
+ | `route-other` | Something else; ask what |
35
+ | `next-stop` | Stop here |
36
+
37
+ `route-normal` still stops at every phase gate and still needs `next-yes` to continue
38
+ ([interaction.md](../aifabrix-plan/references/interaction.md)). It is a route, not a
39
+ licence to run the whole lifecycle unattended.
40
+
41
+ ## Always report the combined matrix
42
+
43
+ Report every row, in this order, for any status, phase result, or completion claim. Use
44
+ `UNKNOWN` for anything not measured — never omit a row and never fill one by inference.
45
+ [delivery-verdict.js](../aifabrix-connected-system/scripts/delivery-verdict.js) computes
46
+ the verdict rows from what you observed.
47
+
48
+ | Row | Where the value comes from |
49
+ | --- | --- |
50
+ | Package | `aifabrix validate <key>` — `Validation passed!` / `Validation failed!` (`--format json` gives `valid`) |
51
+ | Online | `aifabrix show <key> --online` — `Draft` / `Published` / `Archived`; `--json` returns the raw lowercase status |
52
+ | AI Readiness | **no CLI surface** — record what the portal shows, or report `UNKNOWN` |
53
+ | Operations | `aifabrix verify-operations <key> --json` — `verdict`, `operationalReadinessPercent` |
54
+ | Trust | `aifabrix verify-trust <key> --json` — `verdict`, `aiTrustPercent` |
55
+ | Governance | `aifabrix verify-governance <key> --json` — `verdict`, `policyCoveragePercent` |
56
+ | Role Assistant | `aifabrix role-assistant test <roleKey> --json` — `verdict`, `certification`. **Availability is an operator action with no CLI surface**: confirm it explicitly or report `UNKNOWN` |
57
+ | Prove readiness | computed — READY or BLOCKED |
58
+ | Delivery | computed — overall verdict |
59
+
60
+ Pillar verdicts are `VERIFIED`, `FAILED`, `NOT_VERIFIED`, `NOT_APPLICABLE` — never `PASSED`.
61
+ `NOT_VERIFIED` is **not** a pass: it is where a pillar sits until it has been proved.
62
+ Certification is a separate axis (`BRONZE`…`PLATINUM`, `TECHNICALLY_READY`…), never a
63
+ substitute for a verdict.
64
+
65
+ `READY`, `BUILT`, `PASS`, `PASS_WITH_SKIPS`, `NEEDS_FIXES` and `BLOCKED` are this kit's
66
+ delivery vocabulary, not CLI output. Never quote them as if a command printed them.
67
+
68
+ ## Never headline a success the verdict does not support
69
+
70
+ When Delivery is `NEEDS_FIXES` or `BLOCKED`, do not open with a bare `READY`, `BUILT`,
71
+ `PASS`, or "all checks passed". Qualify every claim with its scope:
72
+
73
+ ```text
74
+ Package: BUILT · Online: Draft · Operations: FAILED 60% · Delivery: NEEDS_FIXES · Prove: BLOCKED
75
+ ```
76
+
77
+ A green package gate is a statement about files on disk. It says nothing about whether the
78
+ system is published, whether it behaves correctly, or whether the business case is proven.
79
+
80
+ ## A known failure stays open
81
+
82
+ A runtime, governance, persistence, or E2E failure remains active until **that same
83
+ concern** is rerun and passes. Later structural or integration success does not clear it,
84
+ and neither does a rerun of a different layer. Carry open failures into every subsequent
85
+ status report until they are genuinely resolved.
@@ -0,0 +1,27 @@
1
+ # Builder improvement findings
2
+
3
+ Generic gaps in the Builder CLI, the Agent Kit skills, or the platform. Created
4
+ once by `aifabrix agent-kit install` and owned by this workspace from then on;
5
+ update never rewrites it.
6
+
7
+ File a finding here instead of editing `.agents/skills/**`, which
8
+ `aifabrix agent-kit update` rewrites. Never weaken a gate, assertion, or test to
9
+ make a finding go away.
10
+
11
+ Keep customer specifics out: no correlation ids, audit refs, internal URLs,
12
+ tenant or record identifiers, hostnames, or customer names. A reader outside
13
+ this workspace should still be able to act on it. Anything customer-specific
14
+ belongs in `integration/<systemKey>/README.md` or the role's `learning.md`.
15
+
16
+ Newest first.
17
+
18
+ ## YYYY-MM-DD — One line naming the gap
19
+
20
+ Command: the exact command, with customer values replaced by placeholders.
21
+
22
+ Observed: what happened, including the error text and the verdict.
23
+
24
+ Expected: what should have happened, and why that is the reasonable behavior.
25
+
26
+ Scope: whether this reproduces outside this workspace, and what is still
27
+ unproven. Say so plainly when the root cause is not established.
@@ -8,8 +8,21 @@ Vendor limits, credentials, designated test subjects, and PII live only in each
8
8
 
9
9
  ## How to start
10
10
 
11
+ You can say **“Hi”** in a new agent chat. Describe the business process or
12
+ role you want to improve and the result you need; a plain-language example is
13
+ enough to start. The agent will map that context to Connected Systems, a Role
14
+ Assistant, and a way to prove the result. It checks sign-in and existing
15
+ systems before planning the work.
16
+
17
+ | Claude Code / Cursor | Codex | What the skill guides |
18
+ | --- | --- | --- |
19
+ | `/aifabrix-plan` | `$aifabrix-plan` | Turn business context or a spec into a plan and identify missing facts |
20
+ | `/aifabrix-connected-system` | `$aifabrix-connected-system` | Validate, build, test, and publish Connected Systems |
21
+ | `/aifabrix-role-assistant` | `$aifabrix-role-assistant` | Create or update a catalog Role Assistant using published systems |
22
+ | `/aifabrix-prove` | `$aifabrix-prove` | Prove a real business case and record the result |
23
+
11
24
  1. Open **this folder** in Cursor, Claude Code, or Codex. Host install and sign-in: **[AGENTKIT.md](./AGENTKIT.md)**.
12
- 2. The agent checks `aifabrix auth status`. If you are not signed in, it asks for the Miso Controller URL and gives you a browser link. You do not need a terminal. Details: **[AGENTKIT.md](./AGENTKIT.md)**.
25
+ 2. Before planning or using online Builder commands, the agent checks `aifabrix auth status`. If you are not signed in, it asks for the Miso Controller URL and gives you a browser link. You do not need a terminal. Details: **[AGENTKIT.md](./AGENTKIT.md)**.
13
26
  3. In chat, either **invoke a skill** or **paste a prompt** from the tables below. Work in order. Wait for the gate (`PLAN_READY`, `READY`, `BUILT`, then `PASS` or `PASS_WITH_SKIPS`) before the next step.
14
27
 
15
28
  ### How to use prompts
@@ -5,7 +5,7 @@ app:
5
5
  description: 'Business Transformation services — HTTP orchestration for connected-system workspace lifecycle via Dataplane Enterprise MCP and governance APIs.'
6
6
  type: webapp
7
7
  language: typescript
8
- version: 1.0.0
8
+ version: 2.60.0
9
9
 
10
10
  # Image Configuration
11
11
  image:
@@ -5,7 +5,7 @@ app:
5
5
  description: "AI Fabrix Dataplane is a secure, in-tenant integration and automation layer that supplies governed, normalized, and explainable enterprise data to AI agents. Using CIP as a declarative standard, it enforces RBAC and ABAC, executes integrations, and exposes trusted data via MCP and OpenAPI."
6
6
  type: webapp
7
7
  language: python # Explicitly specify Python language
8
- version: 2.0.70
8
+ version: 2.0.74
9
9
  # Image Configuration
10
10
  # Set tag to match your build (example: aifabrix build dataplane -t 1.0.0).
11
11
  # Registry is required so the controller can pull the image (avoids docker-not-found on the controller host).
@@ -98,7 +98,35 @@ build:
98
98
  # (never product OPENAI_* / AZURE_OPENAI_*). ≥2 providers →
99
99
  # ENTERPRISE_LLM_DEFAULT_SELECTOR (portal/env deploy default); Environment
100
100
  # Settings ai.llmProvider overrides without redeploy.
101
- # - ENVIRONMENT → set by deployment target
101
+ # - ENVIRONMENT → resolved per environment below
102
+
103
+ # =============================================================================
104
+ # Environment Resolution
105
+ # =============================================================================
106
+ # One installation runs dev, tst and pro Dataplanes side by side
107
+ # (environmentScopedResources: true), so these values vary by environment, not by
108
+ # resource group. There is no `platforms:` section: nothing here depends on which
109
+ # stack the installation is. env.template consumes the names as {NAME}.
110
+ environments:
111
+ - environment: dev
112
+ configuration:
113
+ - name: ENVIRONMENT
114
+ value: 'dev'
115
+ - name: PIPELINE_ENV_KEY
116
+ value: 'dev'
117
+ - environment: tst
118
+ configuration:
119
+ - name: ENVIRONMENT
120
+ value: 'tst'
121
+ - name: PIPELINE_ENV_KEY
122
+ value: 'tst'
123
+ - environment: pro
124
+ configuration:
125
+ - name: ENVIRONMENT
126
+ value: 'pro'
127
+ # Empty keeps the existing behaviour: derive the key from MISO_CLIENTID.
128
+ - name: PIPELINE_ENV_KEY
129
+ value: ''
102
130
 
103
131
  configuration:
104
132
  # -------------------------------------------------------------------------