diff --git a/.github/workflows/trust.yml b/.github/workflows/trust.yml index b618bfa..556312c 100644 --- a/.github/workflows/trust.yml +++ b/.github/workflows/trust.yml @@ -59,16 +59,16 @@ jobs: # Preserve the former strict SpecSync gate and put its verified binary on # PATH before Trust invokes the repository lifecycle lane. - name: Strict SpecSync gate - uses: CorvidLabs/spec-sync@59bbfa766c6cce01ab815ab47db195b0629cc014 # v5.0.1 + uses: CorvidLabs/spec-sync@3c2ed4972c8c53ae02ab5dd5775beccd6da3eeb8 # v6.0.0 with: - version: "5.0.1" + version: "6.0.0" strict: "true" require-coverage: "100" # Unified lifecycle, contract, risk, and progressive provenance gate. - name: CorvidLabs Trust gate id: trust - uses: CorvidLabs/trust@9d32b5786d2e9e4d39fc581c0091c721ee3d4226 # v1.0.0 + uses: CorvidLabs/trust@fcc889f54d8b4892a81af463c5a0250e2be66fc5 # v1.2.0 # Durability: fail if the standing rules block was removed. - name: Trust block present diff --git a/specs/loader-swift/loader-swift.spec.md b/specs/loader-swift/loader-swift.spec.md index 0b6667d..1d618f7 100644 --- a/specs/loader-swift/loader-swift.spec.md +++ b/specs/loader-swift/loader-swift.spec.md @@ -1,7 +1,7 @@ --- module: loader-swift version: 1 -status: draft +status: active files: - loaders/swift/Sources/Agent3MD/Agent3MD.swift - loaders/swift/Sources/Agent3MDCLI/main.swift @@ -36,14 +36,34 @@ manifest, and the tests. | `fillCommand` | `fillCommand(_ template: String, _ values: [String: String]) -> String`: fill `{name}` placeholders (shell-quoted), leaving unprovided ones visible. | | `depLinks` | `depLinks(in body: String) -> [Int]`: extract `[[z=N]]` / `[[z=N\|label]]` integer targets. | | `tokenize` | `tokenize(_ s: String) -> [String]`: lowercased runs of Unicode letters / digits. | +| `init` | `Agent.init(source: String) throws`: parse the source through `ThreeMD.Parser`, pick the identity plane, and index every other plane as a skill by name and z. | +| `get` | `Agent.get(_ name: String) -> Skill?` / `Agent.get(z: Int) -> Skill?`: O(1) fetch of one skill by name or z. | +| `route` | `Agent.route(_ text: String) -> [(skill: Skill, score: Int, hits: [String])]`: rank skills by matched trigger phrases, ties broken by lower z. | +| `resolve` | `Agent.resolve(_ name: String) -> [Skill]`: a skill plus its transitive `[[z=N]]` dependencies, in load order. | +| `command` | `Agent.command(_ name: String, _ values: [String: String]) -> String?` / `Agent.command(z: Int, _ values: [String: String]) -> String?`: the skill's `tool` filled from values, or nil when it has no tool. | -### Structs & Enums +### Exported Types -| Type | Description | -|------|-------------| +| Export | Description | +|--------|-------------| | `Agent` | A `Sendable` value type: `name`, `model`, `tools`, `identity`, `skills`, with route / get / resolve / command over its skills. | | `Skill` | A `Sendable` skill: `z`, `name`, `triggers`, `inputs`, `inputSchema`, `tool`, `cost`, `deps`, `body`. | | `SkillInput` | A `Sendable` typed input: `name`, `type`, `required`. | +| `name` | `SkillInput.name` / `Skill.name` / `Agent.name`: the input's name, the skill's name (`skill-` when the plane has no label), and the agent's name. | +| `type` | `SkillInput.type`: the declared input type (`string`, `number`, `boolean`, `object`, or `array`). | +| `required` | `SkillInput.required`: whether the input must be supplied; a bare input name is required. | +| `z` | `Skill.z`: the skill plane's z index. | +| `triggers` | `Skill.triggers`: the trigger phrases `route` matches a request against. | +| `inputs` | `Skill.inputs`: the input names, derived from `inputSchema` so the two never disagree. | +| `inputSchema` | `Skill.inputSchema`: the typed inputs parsed from the plane's `inputs` attribute. | +| `tool` | `Skill.tool`: the command template, nil unless the plane sets a non-empty `tool`. | +| `cost` | `Skill.cost`: the plane's cost hint, nil when unset. | +| `deps` | `Skill.deps`: the `[[z=N]]` dependency targets found in the body, in body order. | +| `body` | `Skill.body`: the plane's full body text, fetched on demand. | +| `model` | `Agent.model`: the identity plane's model, `"unknown"` when unset. | +| `tools` | `Agent.tools`: the tool names from the identity plane's `tools` metadata. | +| `identity` | `Agent.identity`: the identity plane as a `Skill`, nil when the document has no plane. | +| `skills` | `Agent.skills`: every non-identity plane, in load order. | ### Traits diff --git a/specs/package/package.spec.md b/specs/package/package.spec.md index f332895..c39a350 100644 --- a/specs/package/package.spec.md +++ b/specs/package/package.spec.md @@ -1,7 +1,7 @@ --- module: package version: 1 -status: draft +status: active files: - src/index.ts - src/index-query.ts @@ -30,17 +30,25 @@ keeping per-turn context independent of how many skills the agent has. | Export | Description | |--------|-------------| | `routeQuery` | `routeQuery(agent: Agent, text: string): string[]`: the names of the skills matching `text`, ranked, with everything else about the match dropped. | -| `Agent`, `fillCommand`, `commandPlaceholders` | Re-exported from `./runtime` (the reference loader and its command-template helpers). | -| `validateAgent`, `formatReport` | Re-exported from `./validate` (the agent3md/1 validator). | +| `Agent` | Re-exported from `./runtime` (the reference loader). | +| `fillCommand` | Re-exported from `./runtime` (fill a `{name}` command template from values). | +| `commandPlaceholders` | Re-exported from `./runtime` (the placeholder names a command template references). | +| `validateAgent` | Re-exported from `./validate` (validate a source string against agent3md/1). | +| `formatReport` | Re-exported from `./validate` (render a validation report as text). | | `parse` | Re-exported from `./threemd` (the canonical 3md parser). | -### Structs & Enums +### Exported Types | Type | Description | |------|-------------| -| `Skill`, `SkillInput`, `AgentManifest` | Runtime types, re-exported. | -| `Report`, `Issue`, `IssueLevel` | Validator types, re-exported. | -| `Document`, `Plane` | 3md document types, re-exported. | +| `Skill` | Runtime type, re-exported: one skill plane. | +| `SkillInput` | Runtime type, re-exported: a typed skill input. | +| `AgentManifest` | Runtime type, re-exported: the agent identity plus its skill catalog. | +| `Report` | Validator type, re-exported: the result of `validateAgent`. | +| `Issue` | Validator type, re-exported: one validation finding. | +| `IssueLevel` | Validator type, re-exported: the severity of an `Issue`. | +| `Document` | 3md document type, re-exported. | +| `Plane` | 3md document type, re-exported. | ### Traits diff --git a/specs/runtime/runtime.spec.md b/specs/runtime/runtime.spec.md index d428bc3..13751e4 100644 --- a/specs/runtime/runtime.spec.md +++ b/specs/runtime/runtime.spec.md @@ -1,7 +1,7 @@ --- module: runtime version: 3 -status: draft +status: active files: - src/runtime.ts @@ -29,7 +29,7 @@ whole file into context. | `fillCommand` | `fillCommand(template, values)`: fill a `{name}` command template from values, shell-quoting them; unprovided placeholders stay visible. | | `commandPlaceholders` | `commandPlaceholders(template)`: the placeholder names a command template references, de-duplicated. | -### Structs & Enums +### Exported Types | Type | Description | |------|-------------| diff --git a/specs/threemd/threemd.spec.md b/specs/threemd/threemd.spec.md index b90761d..bdda1fa 100644 --- a/specs/threemd/threemd.spec.md +++ b/specs/threemd/threemd.spec.md @@ -1,7 +1,7 @@ --- module: threemd version: 1 -status: draft +status: active files: - src/threemd.ts @@ -32,7 +32,7 @@ loaders) consumes the `Document` this module produces rather than re-parsing 3md | `links` | `links(document: Document): CrossPlaneLink[]`: extract every `[[z=N]]` / `[[z=N\|text]]` cross-plane link from the document's plane bodies, in document order. | | `serialize` | `serialize(document: Document): string`: render a `Document` back into 3md source text. | -### Structs & Enums +### Exported Types | Type | Description | |------|-------------| diff --git a/specs/validation/validation.spec.md b/specs/validation/validation.spec.md index 50dc030..5690ef2 100644 --- a/specs/validation/validation.spec.md +++ b/specs/validation/validation.spec.md @@ -1,7 +1,7 @@ --- module: validation version: 1 -status: draft +status: active files: - src/validate.ts @@ -31,7 +31,7 @@ that prints a report and exits non-zero when any error is found. | `validateAgent` | `validateAgent(src: string): Report`: parse and check 3md source against agent3md/1, returning a report of errors and warnings. | | `formatReport` | `formatReport(file: string, r: Report): string`: render a `Report` as a human-readable, multi-line block with a `PASS` / `FAIL` summary. | -### Structs & Enums +### Exported Types | Type | Description | |------|-------------|