software-defence-factory 0.12.0 → 0.13.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.
@@ -10,7 +10,7 @@ instructions, existing source and session decisions. Preserve useful work and
10
10
  licenses. Assessment-only requests stay read-only. A method-only adoption needs
11
11
  no runtime, Docker host or model account.
12
12
 
13
- The [setup plan](../../docs/setup.md) owns supported commands and checkpoints.
13
+ The [setup plan](../../../docs/setup.md) owns supported commands and checkpoints.
14
14
  Read the relevant sections rather than inventing a host-specific setup recipe.
15
15
  Choose this skill explicitly when adopting Factory. Project preparation tools
16
16
  need no knowledge of Factory and do not invoke this transition automatically.
@@ -24,7 +24,7 @@ Use the actual host's OS, service manager, hardware and private network; do not
24
24
  assume a machine model, a VPN provider, a cloud, Git forge, issue tracker, CI
25
25
  provider or particular harness. Inspect the configured remote and actual provider
26
26
  capabilities. GitHub is one adapter; an unsupported host keeps local execution
27
- without guessed API calls. Use [integration ownership](../../docs/integrations.md).
27
+ without guessed API calls. Use [integration ownership](../../../docs/integrations.md).
28
28
 
29
29
  Use the existing task/issue record for missing obligations and evidence. Avoid a
30
30
  second project registry or a template conversion of an existing application.
@@ -38,9 +38,9 @@ Continue authorized repairs; ask only for decisions or authority actually missin
38
38
  repository instructions. Adapt the staged method to the
39
39
  project; do not overwrite its files. Reconcile the chosen provider’s issue forms/labels (where supported), CI triggers,
40
40
  required checks, protection rules and the intended PR/release path using
41
- [repository readiness](../../kit/repository.md). Before trusted GitHub PR
41
+ [repository readiness](../../../kit/repository.md). Before trusted GitHub PR
42
42
  delivery, confirm active candidate-triggered workflows fit the bounded
43
- qualification in [recovery](../../docs/recovery.md#trusted-pr-delivery);
43
+ qualification in [recovery](../../../docs/recovery.md#trusted-pr-delivery);
44
44
  unsupported workflows keep delivery patch-only. Organization hooks and
45
45
  external CI remain operator-owned. File presence is not proof.
46
46
  - **Infrastructure:** choose a private state directory, loopback port, host and
package/README.md CHANGED
@@ -39,9 +39,12 @@ The runtime supplies policy and six focused skills to its isolated jobs. `init`
39
39
 
40
40
  ## How the factory works
41
41
 
42
- [![Factory setup, execution and delivery](https://raw.githubusercontent.com/arcitai/software-and-defence-factory/main/docs/architecture.svg)](https://github.com/arcitai/software-and-defence-factory/blob/main/docs/architecture.excalidraw)
42
+ <a href="docs/architecture.md"><img src="docs/diagrams/deployment.svg" width="720" alt="Factory setup: operator access to a private execution host with Docker, a chosen harness and inference; application deployment remains in its own CI/CD."></a>
43
43
 
44
- [Architecture and boundaries](docs/architecture.md) · [Editable Excalidraw source](https://github.com/arcitai/software-and-defence-factory/blob/main/docs/architecture.excalidraw)
44
+ [Architecture and boundaries](docs/architecture.md). Editable views:
45
+ [Setup / deployment](docs/diagrams/deployment.excalidraw) ·
46
+ [Runtime layers / ownership](docs/diagrams/architecture.excalidraw) ·
47
+ [Work lifecycle](docs/diagrams/lifecycle.excalidraw)
45
48
 
46
49
  Each result belongs to a specific candidate commit and policy. A failed check blocks delivery. Changing the candidate or check policy invalidates earlier evidence. Approval records a handoff; publishing, merging and deployment follow the application's separate authority.
47
50
 
@@ -58,8 +61,8 @@ Start setup with `factory foundation` and the [Factory Foundation plan](docs/set
58
61
  | `bin/` | CLI entry point |
59
62
  | `factory/` | Queue, HTTP API, isolation, evidence, updates and bundled dashboard assets |
60
63
  | `dashboard/` | Dashboard source and UI tests |
61
- | `kit/`, `.agents/skills/` | Portable method, adoption records and six job skills |
62
- | `operator-skills/` | Factory Foundation setup guidance; never mounted into jobs |
64
+ | `kit/`, `kit/skills/` | Portable method, adoption records and the canonical six job skills |
65
+ | `.agents/skills/` | Repository/operator guidance, including explicit Factory Foundation adoption; outside the job catalog |
63
66
  | `scripts/`, `tests/` | Packaging, qualification, release checks and behavioral tests |
64
67
  | `docs/` | Setup, architecture, recovery, proof and ownership |
65
68
 
package/docs/npm.md CHANGED
@@ -104,8 +104,8 @@ installation or retained attempt needs them.
104
104
 
105
105
  ## Protected evidence compatibility
106
106
 
107
- Factory 0.12.0 recognizes version-1 execution profiles emitted by native
108
- **0.8.0, 0.9.0, 0.9.1, 0.10.0, 0.11.0, 0.11.1, 0.11.2 and 0.12.0**. This is an exact allowlist in
107
+ Factory 0.13.0 recognizes version-1 execution profiles emitted by native
108
+ **0.8.0, 0.9.0, 0.9.1, 0.10.0, 0.11.0, 0.11.1, 0.11.2, 0.12.0 and 0.13.0**. This is an exact allowlist in
109
109
  `factory/execution-profile.mjs`, independent of the installed package version;
110
110
  it is not a semver range or an automatic promise for later releases. Unknown
111
111
  runtime strings, unknown profile formats and incomplete legacy acceptance
@@ -153,6 +153,20 @@ Version 0.12.0 adds the all-work Inbox read model and restores the retained
153
153
  overview. Protected execution writers and acceptance/publication guards are
154
154
  unchanged; the explicit compatible-writer entry preserves all checks above.
155
155
 
156
+ Version 0.13.0 relocates byte-identical runtime skill instructions to
157
+ `kit/skills/` and adds a read-only alias of that catalog for Codex discovery.
158
+ The audit covers `execution-profile.mjs`, `processes.mjs`, executor candidate,
159
+ check, review and acceptance writers, `execution-evidence.mjs` and both delivery
160
+ capability/validation paths. The v1 schema, candidate reconstruction, current
161
+ policy checks, isolation and model credential rules are unchanged. Foundation
162
+ is outside the job catalog. Supported old immutable evidence remains subject
163
+ to every existing guard; unknown later versions receive no automatic trust.
164
+
165
+ Old installed releases retain their own files and mount paths until an idle,
166
+ reviewed update. No installed catalog, execution profile or historical hash is
167
+ rewritten by this layout change. Qualify the exact updated package/image before
168
+ resuming work; retained releases/evidence stay available for recovery.
169
+
156
170
  New publication still requires the current remote target to equal the original
157
171
  accepted base; reviewed-candidate continuation preserves that baseline, while
158
172
  target refresh remains #72. See [the verification map](https://github.com/arcitai/software-and-defence-factory/blob/main/docs/proof.md) for delivered
package/docs/setup.md CHANGED
@@ -1,7 +1,13 @@
1
1
  # Factory Foundation: repository and execution setup
2
2
 
3
- The operator skill is available through `factory foundation`.
3
+ The operator skill is available through `factory foundation`, including from
4
+ an installed npm package without a source checkout. Its canonical source is
5
+ [.agents/skills/factory-foundation/SKILL.md](../.agents/skills/factory-foundation/SKILL.md).
6
+ Use it explicitly for adoption; it is independent of AIOS. Repository/operator
7
+ guidance stays outside the runtime catalog at `kit/skills/`.
4
8
  See [Factory concepts](concepts.md) for host, worker, harness and agent roles.
9
+ The [setup/deployment view](architecture.md#setup-and-deployment) shows operator
10
+ access, the private execution host and the separate application delivery boundary.
5
11
 
6
12
  Use this plan for a new installation or when moving an existing Factory to an
7
13
  execution host. Complete the applicable checkpoints in order and record the
@@ -36,7 +42,19 @@ this plan.
36
42
 
37
43
  For method-only adoption, run `factory kit --output NEW_DIRECTORY`
38
44
  and follow [the adoption guide](../kit/README.md). The remaining host/runtime
39
- steps apply only when using Factory's optional controller.
45
+ steps apply only when using Factory's optional controller. Export maps the six
46
+ job skills into staged `.agents/skills/`; it never changes the application's
47
+ AGENTS.md or installs global skills. Foundation stays in the installed package.
48
+
49
+ Runtime jobs receive only the reviewed catalog as read-only `/factory-skills`.
50
+ Codex agent phases also discover that same catalog at `/etc/codex/skills`; Pi
51
+ uses `--skill /factory-skills`. Verify discovery on the exact installed image
52
+ without credentials or inference (Codex native listing and Pi RPC
53
+ `get_commands`), then qualify inference separately when authorized. Custom
54
+ harness discovery remains operator-owned. A directory listing alone is not
55
+ native discovery proof. Bundled instructions install no model, browser, Docker
56
+ or provider access. Repository guidance remains readable project context and
57
+ cannot expand job permissions.
40
58
 
41
59
  ## 2. Establish host access and boot prerequisites
42
60
 
package/docs/workflows.md CHANGED
@@ -15,12 +15,16 @@ Defence currently runs **Investigate** against supplied scoped evidence and
15
15
  produces a private draft. It is not production monitoring, exploitation or
16
16
  verified recovery. See [Defence integration](defence-integration.md).
17
17
 
18
- The six bundled job skills cover triage, specification, implementation, review,
18
+ The six bundled job skills in `kit/skills/` cover triage, specification, implementation, review,
19
19
  security and evaluation. They are instructions, not six running processes.
20
20
  All are mounted read-only for agent steps; the role prompt supplies the work
21
21
  boundary. Triage/specification prepare scope before admission; evaluation is a
22
22
  separately scoped comparison. Factory Foundation is an operator setup skill,
23
- kept outside those execution mounts.
23
+ at `.agents/skills/factory-foundation/SKILL.md`, used explicitly for adoption
24
+ and kept outside those execution mounts. CLI/API/Skills show actual installed
25
+ paths, content and SHA-256. Codex additionally mounts the same runtime catalog at
26
+ `/etc/codex/skills`; Pi uses `--skill /factory-skills`. Discovery on a particular
27
+ image needs native qualification, and skills provide neither tools nor access.
24
28
 
25
29
  ## Start work
26
30
 
@@ -24,7 +24,7 @@ const skillRoles = {
24
24
  export function factoryDefinition(config) {
25
25
  const harness = harnessOf(config);
26
26
  const skills = Object.entries(skillRoles).map(([role, purpose]) => {
27
- const id = `factory-${role}`, path = `.agents/skills/${id}/SKILL.md`;
27
+ const id = `factory-${role}`, path = `kit/skills/${id}/SKILL.md`;
28
28
  const content = readFileSync(join(ROOT, path), 'utf8');
29
29
  return { id, purpose, path, content, sha256: digest(content) };
30
30
  });
@@ -58,7 +58,7 @@ export function factoryDefinition(config) {
58
58
  }
59
59
 
60
60
  export function foundationSkill() {
61
- const path = 'operator-skills/factory-foundation/SKILL.md';
61
+ const path = '.agents/skills/factory-foundation/SKILL.md';
62
62
  const content = readFileSync(join(ROOT, path), 'utf8');
63
63
  return { id: 'factory-foundation', purpose: 'Prepare a repository and host for bounded Factory work', path, content, sha256: digest(content) };
64
64
  }
@@ -10,12 +10,14 @@ import { expectedWebStories, webPolicyHash } from './web-verification.mjs';
10
10
  // 0.9.1, 0.10.0, 0.11.0 and 0.11.1 (unchanged protected evidence writers),
11
11
  // 0.11.2 (exact patch bytes and pre-acceptance reconstruction; same v1 schema).
12
12
  // 0.12.0 restores the Inbox read model/presentation; protected writers and guards are unchanged.
13
+ // 0.13.0 relocates identical job skills and adds a read-only Codex discovery alias.
14
+ // Candidate/check/review/acceptance schemas, isolation and credential/permission guards are unchanged.
13
15
  // Older writers still require exact patch/tree reconstruction before publication.
14
16
  // Deliberately independent of VERSION: a release bump is not
15
17
  // evidence compatibility. Re-audit this list for every trust-relevant writer,
16
18
  // isolation or validation change; remove versions whose guarantees no longer
17
19
  // satisfy current policy. See docs/npm.md. This predicate alone grants no trust.
18
- const SUPPORTED_EXECUTION_RUNTIMES_V1 = new Set(['0.8.0', '0.9.0', '0.9.1', '0.10.0', '0.11.0', '0.11.1', '0.11.2', '0.12.0']);
20
+ const SUPPORTED_EXECUTION_RUNTIMES_V1 = new Set(['0.8.0', '0.9.0', '0.9.1', '0.10.0', '0.11.0', '0.11.1', '0.11.2', '0.12.0', '0.13.0']);
19
21
 
20
22
  export function isSupportedExecutionProfile(profile) {
21
23
  return profile?.version === 1 && SUPPORTED_EXECUTION_RUNTIMES_V1.has(profile.runtimeVersion);
@@ -91,7 +91,10 @@ async function container(mode, input, command, options = {}) {
91
91
  '--mount',`type=bind,source=${join(workspace,'.git')},target=/workspace/.git,readonly`];
92
92
  args.push('--mount',`type=bind,source=${reportDir},target=/output`,
93
93
  '--mount',`type=bind,source=${join(ROOT,'kit')},target=/factory-policy,readonly`,
94
- '--mount',`type=bind,source=${join(ROOT,'.agents/skills')},target=/factory-skills,readonly`);
94
+ '--mount',`type=bind,source=${join(ROOT,'kit/skills')},target=/factory-skills,readonly`);
95
+ // The same reviewed catalog supplies Codex native discovery; no operator skills.
96
+ if (mode !== 'verify' && harnessOf(config) === 'codex')
97
+ args.push('--mount',`type=bind,source=${join(ROOT,'kit/skills')},target=/etc/codex/skills,readonly`);
95
98
  if (scratch) args.push('--mount',`type=bind,source=${scratch},target=/scratch`);
96
99
  if (mode === 'verify') args.push('--env',`FACTORY_BASE_REVISION=${git('rev-parse',`${metadata().base}^{commit}`)}`);
97
100
  const logPath = join(folder, attempt, `${mode}.log`);