Skip to content

[TASK][MVP] Implement Provider Capability Assessment - #28

Merged
Noam-Alum merged 11 commits into
mvp/implementationfrom
mvp/capability-assessment
Oct 19, 2026
Merged

Noam-Alum merged 11 commits into
mvp/implementationfrom
mvp/capability-assessment

Conversation

@Noam-Alum

Copy link
Copy Markdown
Member

Required result

Outcome and ownership

Implement locked P2 Capability Assessment as a private Provider runtime service. Authors declare dynamic prerequisites with @requirement_check(...) and reference stable IDs from @operation(..., requires=(...)); they never implement the SFP procedure or construct protocol findings. Preserve P1 manifest schema, R2 readiness, and the P2 wire format.

Provider author API

  • Add public @requirement_check(identifier, description, version_constraint="") for bounded async, read-only checks.
  • Add requires=(...) to @operation. Keep the registry reusable by future R4 trigger declarations, but do not implement triggers here.
  • Expose typed author results: satisfied, unsatisfied, incompatible, and unknown. Do not expose P2 messages, findings, sessions, correlation identity, or envelopes.
  • Discover checks through the existing declaration model. Publish static metadata through existing manifest runtime_requirements; keep operation associations Provider-owned for MVP and do not revise manifest schema 1.
  • Fail startup for non-canonical/duplicate IDs, duplicate/unresolved references, invalid async signatures, or metadata outside Protocol bounds.

Private service

  • Implement _services/capability_assessment on the multiplexed Provider endpoint.
  • Delegate context-independent request/response validation to canonical Protocol validation. Provider owns only active session/generation, served manifest revision, declared operations, readiness, check execution, and adaptation.
  • Treat execution_context as bounded opaque metadata. P2 has no generic target, operation input, or permission semantics; invent none and perform no target mutation.
  • Collect requirements for requested operations, deduplicate by ID, and execute each distinct check at most once under RPC deadline/cancellation. Checks never dispatch operations or mutate targets. Reuse results across operations, preserve request-correlated ordering, and revalidate session/readiness before return.
  • Aggregate: all satisfied → SUPPORTED; unsatisfied → SUPPORTED_WITH_REQUIREMENTS; incompatible → UNSUPPORTED; unknown → INDETERMINATE unless incompatibility already proves UNSUPPORTED. Negative/unknown results are domain outcomes. Invalid returns or unhandled check exceptions produce sanitized INTERNAL, never silent UNKNOWN.
  • Preserve declaration vs readiness vs dynamic prerequisite vs point-in-time assessment vs later authorization/admission.

Documentation

  • Replace obsolete assess_capability guidance in .claude/PROVIDER_AUTHORING_VISION.md.
  • Document @requirement_check, operation requires, result meanings, startup validation, deduplication, read-only/error semantics, internal service ownership, and static manifest metadata.
  • Include a complete filesystem-writability or service-control example. Do not edit or regenerate the PDF.

Verification

  • Test declaration validation, dedup/result reuse, aggregation, ordering, deadlines/cancellation, invalid returns, sanitized exceptions, and no dispatch/mutation.
  • Test Protocol validation, limits, stale session/generation, manifest mismatch, undeclared operations, readiness loss, response validation, and error mapping.
  • Run a focused real Provider service scenario over a real Unix socket with exact Provider/Protocol artifacts. Preserve installed-Agent regressions, but A3 owns real Agent P2 consumption.
  • Pass formatting, lint, strict typing, docs, unit/integration, packaging, and applicable CI.

Non-goals

No wire redesign, manifest revision, public assess_capability hook, author-built findings, target model, authorization/admission, triggers, operation execution, SF-AOP, Agent P2 client, or PDF update. Preserve repository ownership and human delivery authority.

Implementation step

R3

Closes #23

@Noam-Alum Noam-Alum self-assigned this Oct 19, 2026
Comment thread src/stateforge_provider/_services/capability_assessment/declaration.py Outdated
Comment thread src/stateforge_provider/_services/capability_assessment/service.py Outdated
Comment thread src/stateforge_provider/_services/capability_assessment/service.py Outdated
Comment thread src/stateforge_provider/requirements.py Outdated
Comment thread src/stateforge_provider/_services/capability_assessment/service.py Outdated
Comment thread src/stateforge_provider/requirements.py
@Noam-Alum
Noam-Alum merged commit 26400e7 into mvp/implementation Oct 19, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant