Skip to content

feat(capabilities): declare requires_system external-tool dependencies#413

Draft
aleskalfas wants to merge 4 commits into
mainfrom
feat/381-add-requires-system-schema-field
Draft

feat(capabilities): declare requires_system external-tool dependencies#413
aleskalfas wants to merge 4 commits into
mainfrom
feat/381-add-requires-system-schema-field

Conversation

@aleskalfas

Copy link
Copy Markdown
Owner

Closes #381.

Draft — work paused here. This PR delivers the declaration substrate for requires_system and is intentionally not yet ready to merge (see "Remaining before ready-for-review").

What's in this PR

  • COR-039 — new accepted core decision, "Capabilities declare dependencies on external system tools": declare external tools in package.yaml; warn at install, the capability hard-gates at use (fail-closed on an indeterminate probe), plus a preflight check; the kit never installs the tool. Reviewed by critic + methodology-reviewer + convention-compliance-reviewer.
  • requires_system manifest substrate — a SystemDependency dataclass + a requires_system field + a lenient per-OS parser in capabilities.py, mirroring the sibling requires_capabilities parser. 5 new parse tests (117/117 capabilities tests pass).
  • Version bump 1.131.1 → 1.132.0 (surface change per PRJ-002) + adapter requires_backbone ceiling broaden.

No migration — the field is a pure additive addition (pkit migrations check-diff reports no trigger).

Scope

Task #381 is the declaration substrate only. The enforcement — warn-at-install / hard-gate-at-use / doctor preflight — is the follow-on #382.

Remaining before ready-for-review

Resume-here

Full stopping-point handoff: .pkit/scratchpad/active/2026-07-01-requires-system-381-handoff.md.

🤖 Generated with Claude Code

aleskalfas and others added 4 commits June 30, 2026 23:32
Capabilities may declare dependencies on external system tools via a
`requires_system` manifest field (name + min version + per-OS install
hint + probe). The kit warns at install (preserving author-anywhere
neutrality, unlike COR-030's refuse-at-install for capability deps);
the capability's operation hard-gates at use time (the real guarantee),
fail-closed on an indeterminate probe; a preflight reports the declared
set. The kit never installs the tool. Stands on COR-030 and COR-017;
supersedes nothing.

Tracked by #381. Status: proposed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Approved by Aleš Kalfas (approve-and-accept). Flips COR-039
proposed → accepted, unblocking the requires_system schema field +
schema_version bump + migration work on #381 (gated behind acceptance).

Status: accepted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…039)

Add `requires_system` — an optional list in a capability's package.yaml,
beside requires_backbone and requires_capabilities — declaring external
system tools (binary / daemon / runtime outside the kit). Each entry
carries a name, a minimum version, a per-OS install hint, and a per-OS
probe, mirroring COR-030's requires_capabilities shape.

Scope is the declaration substrate only (Task #381 criteria 1 + 3): the
field is parsed into SystemDependency tuples on CapabilityPackage and
ignored by everything that doesn't consume it yet. Enforcement —
warn-at-install, gate-at-use, preflight — is a separate concern (#382).

The parser is additive and lenient like its sibling: an absent field
yields an empty tuple; a nameless entry is skipped; a malformed per-OS
map degrades to empty rather than failing the package read.

No migration: the field is a pure addition (no rename/removal,
schema_version bump, or breaking CLI signature) — `pkit migrations
check-diff --include-working-tree` reports no triggers. Surface change
(adopters can declare the field), so bump minor per PRJ-002.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resume-here note capturing the state we paused at: the 25-issue adoption/OBS
arc, #381's exact next steps (fix + tick criteria 1 & 3, then Review + PR),
the pkit non-interactive routing gotcha, and the dependency spine. Retires
when #381 lands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] Add requires_system schema field, author its DEC, and ship the migration (schema_version bump)

1 participant