Skip to content

Skill manifest metadata (6.3.1)#344

Merged
leynos merged 10 commits into
mainfrom
6-3-1-skill-manifest-metadata
Jun 15, 2026
Merged

Skill manifest metadata (6.3.1)#344
leynos merged 10 commits into
mainfrom
6-3-1-skill-manifest-metadata

Conversation

@lodyai

@lodyai lodyai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Drafts the ExecPlan for roadmap item 6.3.1, modelling skill manifest
    metadata as additive types in ortho_config::agent_context
    (SkillManifest, SkillCommandRef) plus a defaulted
    AgentContext.skill_manifests field. The full plan is at
    docs/execplans/6-3-1-skill-manifest-metadata.md.
  • Folds in three Logisphere pre-mortem recommendations: a stable
    id: String on each SkillManifest, exact-match contracts between
    SkillCommandRef.{path,flags} and AgentCommand.path / AgentInput.long,
    and a forward-compatibility note on SkillManifest::path so future
    non-filesystem sources stay an open door.
  • Renames the §8.1 defaults row in docs/agent-native-cli-design.md from
    skill_manifest_paths to skill_manifests so the documented default
    matches the structured shape (no shipped consumer reads the old name;
    the rename is documentation-only).
  • Status: DRAFT — awaiting maintainer approval before any code lands.
    Validation, parsing, and cargo-orthohelp integration are deferred to
    roadmap items 6.3.2 and 6.2.1 respectively. The plan explains why 6.3.1
    can land before its nominal prerequisite 6.2.1.
  • Links the new plan from docs/contents.md.

The plan was informed by Firecrawl research into prior art (Anthropic
Claude Skills, MCP tool listings, OpenAI ai-plugin.json, Microsoft 365
Copilot v2.1, Fig autocomplete) and stress-tested via the Logisphere
design-review skill.

Test plan

  • Maintainer reviews docs/execplans/6-3-1-skill-manifest-metadata.md
    and either approves it or requests revisions.
  • Maintainer decides the one open question recorded in Milestone 0:
    whether the wire-field rename from skill_manifest_paths to
    skill_manifests warrants a new ADR-006 or whether referencing
    ADR-003 in docs/developers-guide.md is sufficient (plan default:
    no new ADR).
  • make markdownlint passes.
  • make nixie passes.

References

Summary by Sourcery

Document an execution plan for adding skill manifest metadata to the agent context and link it into the documentation index.

Documentation:

  • Add a detailed ExecPlan document for roadmap item 6.3.1 describing how to model skill manifest metadata in the agent context.
  • Link the new skill manifest metadata ExecPlan from the main documentation contents index.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d3e0f6ea-2d69-4421-957a-e80330d28fb1

📥 Commits

Reviewing files that changed from the base of the PR and between 5073b6d and ef21535.

⛔ Files ignored due to path filters (2)
  • cargo-orthohelp/tests/golden/agent_context__fixture.json.snap is excluded by !**/*.snap
  • ortho_config/src/agent_context/snapshots/ortho_config__agent_context__tests__agent_context_json_snapshot_covers_wire_contract.snap is excluded by !**/*.snap
📒 Files selected for processing (11)
  • CHANGELOG.md
  • docs/agent-native-cli-design.md
  • docs/contents.md
  • docs/developers-guide.md
  • docs/execplans/6-3-1-skill-manifest-metadata.md
  • docs/roadmap.md
  • docs/users-guide.md
  • ortho_config/Cargo.toml
  • ortho_config/src/agent_context/mod.rs
  • ortho_config/src/agent_context/tests.rs
  • ortho_config/src/lib.rs
👮 Files not reviewed due to content moderation or server errors (11)
  • ortho_config/Cargo.toml
  • ortho_config/src/agent_context/mod.rs
  • ortho_config/src/lib.rs
  • ortho_config/src/agent_context/tests.rs
  • docs/execplans/6-3-1-skill-manifest-metadata.md
  • docs/roadmap.md
  • docs/contents.md
  • CHANGELOG.md
  • docs/users-guide.md
  • docs/developers-guide.md
  • docs/agent-native-cli-design.md

Overview

This pull request implements roadmap item 6.3.1 ("Add skill manifest metadata to agent context") by introducing a new agent-context schema extension via an accompanying ExecPlan document (docs/execplans/6-3-1-skill-manifest-metadata.md). The work adds two new type definitions (SkillManifest and SkillCommandRef) to the ortho_config::agent_context module and extends AgentContext with a new skill_manifests field to support downstream skill manifest references.

Code changes

Schema additions in ortho_config/src/agent_context/:

  • New SkillManifest struct recording an opaque manifest id, a path (using Utf8PathBuf), a manifest_schema_version, and a collection of referenced commands
  • New SkillCommandRef struct capturing the command path and dependent long flags with defaulted flags
  • New AgentContext.skill_manifests: Vec<SkillManifest> field with #[serde(default)] annotation to maintain backward compatibility with existing payloads

Dependency and re-export updates:

  • camino dependency in Cargo.toml updated to enable the serde1 feature, required for serialisation support on Utf8PathBuf
  • New types re-exported from ortho_config/src/lib.rs

Test coverage:

  • Extended test suite in ortho_config/src/agent_context/tests.rs to verify skill-manifest behaviour, including defaults, serialisation, and field validation
  • Updated existing fixtures and wire-contract snapshot assertions to cover the new schema

Documentation updates

The ExecPlan document specifies the intended wire-contract shape and defers manifest parsing, validation, and CLI integration to later roadmap items (6.3.2 and 6.2.1). Related documentation updates across multiple guides (agent-native-cli-design.md, users-guide.md, developers-guide.md) now describe the new structured descriptors and their ownership boundaries. The docs/roadmap.md marks 6.3.1 as completed, and CHANGELOG.md records the feature addition.

Design notes

The implementation incorporates three recommendations from the pre-mortem review: a stable id field on each manifest, exact-match contracts between SkillCommandRef fields and their AgentCommand counterparts, and reserved path structure for future non-filesystem sources. The field uses #[serde(default)] to maintain compatibility with existing payloads, which default to an empty manifest list.

Deferral

Manifest validation, parsing, prose loading, and cargo-orthohelp integration remain deferred to subsequent roadmap items and are explicitly excluded from this schema-only change.

Walkthrough

Introduces two new exported schema types — SkillManifest and SkillCommandRef — and adds an AgentContext.skill_manifests: Vec<SkillManifest> field with #[serde(default)] to ortho_config. Enables the camino serde1 feature, re-exports the new types at crate level, adds test coverage, and closes out roadmap item 6.3.1 with an execplan, roadmap update, changelog, and documentation.

Changes

Skill Manifest Metadata (roadmap 6.3.1)

Layer / File(s) Summary
New schema types, AgentContext field, and crate wiring
ortho_config/Cargo.toml, ortho_config/src/agent_context/mod.rs, ortho_config/src/lib.rs
Enables camino serde1 feature; introduces SkillManifest (id, Utf8PathBuf path, manifest_schema_version, defaulted commands) and SkillCommandRef (path, defaulted flags) structs; adds skill_manifests field to AgentContext with #[serde(default)] and constructor initialisation; re-exports both types from the crate root.
Test coverage for skill manifest serialisation and defaults
ortho_config/src/agent_context/tests.rs
Imports Utf8PathBuf; extends legacy-context tests to assert skill_manifests is empty; adds rstest cases for AgentContext defaults, SkillManifest/SkillCommandRef round-trips, and missing-field deserialisation failures; updates sample_agent_context() with a populated SkillManifest; converts snapshot test to non-inline form.
Execplan document for roadmap 6.3.1
docs/execplans/6-3-1-skill-manifest-metadata.md
Adds the full execplan covering scope, hard constraints, risk register, design rationale, implementation milestones 0–4, operational steps, public-surface expectations, decision log, and retrospective.
Roadmap close-out and supporting documentation
CHANGELOG.md, docs/roadmap.md, docs/contents.md, docs/users-guide.md, docs/developers-guide.md, docs/agent-native-cli-design.md
Marks 6.3.1 complete in the roadmap; adds execplan link to contents; records Added/Changed changelog entries; adds skill_manifests user-guide section with JSON example; refines agent-native-cli-design dependency-tier table and skill manifest contract language; adds skill manifest ownership guidance to developers-guide.

Possibly Related PRs

  • leynos/ortho-config#325: Establishes the agent-native contract ownership and initial agent-context schema/policy surface in the same agent_context module that this PR extends.
  • leynos/ortho-config#342: Adds AgentCommand.summary to the same ortho_config::agent_context JSON contract surface that this PR extends with AgentContext.skill_manifests.

Suggested Labels

Roadmap

Suggested Reviewers

  • codescene-delta-analysis

Poem

A manifest of skills now lives in the tree,
With SkillManifest typed so carefully.
Utf8PathBuf maps each downstream prose lair,
Serde defaults keep old payloads fair.
Roadmap 6.3.1 ✅ — ship it with flair! 🚀

🚥 Pre-merge checks | ✅ 20
✅ Passed checks (20 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly references the main objective (skill manifest metadata) and includes the required roadmap item reference (6.3.1) as specified in the requirements.
Description check ✅ Passed The description comprehensively documents the PR's objectives, design decisions, prior-art research, test plan, and references—all directly aligned with the changeset's scope and intent.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Testing (Overall) ✅ Passed All new functionality is guarded by substantive, rigorous tests: five new test cases validate schema constraints, serialisation behaviour, deserialisation defaults, required fields and the complete...
User-Facing Documentation ✅ Passed Documentation for the new AgentContext.skill_manifests field, SkillManifest, and SkillCommandRef types is clearly present in docs/users-guide.md under "Documentation and agent contracts", w...
Developer Documentation ✅ Passed All developer documentation requirements met: new APIs documented in developers-guide.md with schema ownership, design reflected in agent-native-cli-design.md, comprehensive execplan (6-3-1) linked...
Module-Level Documentation ✅ Passed All modules carry explicit docstrings explaining purpose and utility. New public types (SkillManifest, SkillCommandRef) and fields (AgentContext.skill_manifests) are fully documented with cle...
Testing (Unit And Behavioural) ✅ Passed Unit tests meaningfully verify deserialisation defaults, serialisation, error paths (missing required fields), and wire-contract shape. E2E tests are appropriately deferred per ExecPlan rationale—n...
Testing (Property / Proof) ✅ Passed PR introduces additive schema types (SkillManifest, SkillCommandRef) without invariants, algorithmic properties, or state machines. ExecPlan correctly rejects proptest/kani/verus with documented ra...
Testing (Compile-Time / Ui) ✅ Passed Snapshot tests are appropriate for this PR's serialization contract. Two focused snapshots verify JSON wire behaviour: an inline test for SkillManifest's structure, and a file-based test for the fu...
Unit Architecture ✅ Passed Changes introduce pure data structures (SkillManifest, SkillCommandRef) with no side-effects, fallible operations, or hidden dependencies. All new code is explicitly side-effect-free; tests verify...
Domain Architecture ✅ Passed New types are pure data carriers expressing domain concepts (manifest metadata) without validation logic, business rules, or infrastructure leaks; validation explicitly deferred to roadmap 6.3.2.
Observability ✅ Passed This PR adds schema-only data structures (SkillManifest, SkillCommandRef) with no operational logic, parsing, validation, or external integrations. It introduces no runtime behaviour requiring logg...
Security And Privacy ✅ Passed No secrets, credentials, injection risks, unsafe code, or sensitive data exposure detected. All new types use safe serde defaults; test fixtures contain only fake example data; no authentication/au...
Performance And Resource Use ✅ Passed PR introduces data-structured schema types (SkillManifest, SkillCommandRef) with bounded heap allocation, no hot-path cloning, no unbounded loops, no polling/retry patterns, and explicit `#[ser...
Concurrency And State ✅ Passed PR introduces purely declarative schema types and a defaulted immutable field; no shared state, async, locks, mutations, or concurrency concerns present.
Architectural Complexity And Maintainability ✅ Passed Design introduces two minimal data-container types (SkillManifest, SkillCommandRef) that are justified, proportional to the problem, and follow the passive-schema pattern. No unnecessary abstractio...
Rust Compiler Lint Integrity ✅ Passed PR introduces zero problematic lint suppressions, unnecessary clones, or stale code. New types (SkillManifest, SkillCommandRef) use appropriate ownership models with correct public visibility a...

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 6-3-1-skill-manifest-metadata

Comment @coderabbitai help to get the list of available commands and usage tips.

@sourcery-ai

sourcery-ai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds a detailed ExecPlan document for roadmap item 6.3.1 describing how to model skill manifest metadata in ortho_config::agent_context (including new SkillManifest / SkillCommandRef types and AgentContext.skill_manifests field), links it from the docs contents index, and records constraints, risks, milestones, and design decisions without yet changing any Rust code.

File-Level Changes

Change Details Files
Add a comprehensive ExecPlan for modelling skill manifest metadata in agent context, including new additive types and a defaulted AgentContext.skill_manifests field, plus process/validation guidance.
  • Introduce docs/execplans/6-3-1-skill-manifest-metadata.md describing the design for SkillManifest and SkillCommandRef additive types in ortho_config::agent_context.
  • Specify that AgentContext gains a new #[serde(default)] skill_manifests: Vec field matching the documented defaulting behaviour.
  • Document constraints, tolerances, risks, milestones, validation commands, and ownership boundaries for implementing roadmap item 6.3.1, explicitly deferring validation/parsing and cargo-orthohelp integration to later roadmap items.
docs/execplans/6-3-1-skill-manifest-metadata.md
Update documentation index to surface the new ExecPlan.
  • Add a bullet under the ExecPlans section in contents.md linking to execplans/6-3-1-skill-manifest-metadata.md with a short description of the plan.
docs/contents.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos leynos changed the title Draft ExecPlan for skill manifest metadata (6.3.1) Skill manifest metadata (6.3.1) Jun 4, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

@lodyai lodyai Bot force-pushed the 6-3-1-skill-manifest-metadata branch from 30eb647 to 2fa13f7 Compare June 12, 2026 18:57
codescene-delta-analysis[bot]

This comment was marked as outdated.

@lodyai lodyai Bot marked this pull request as ready for review June 12, 2026 19:24
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @LodyAI[bot], you have reached your weekly rate limit of 2500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@leynos

leynos commented Jun 13, 2026

Copy link
Copy Markdown
Owner

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response.

Large Method

ortho_config/src/agent_context/tests.rs: agent_context_json_snapshot_covers_wire_contract

What lead to degradation?

agent_context_json_snapshot_covers_wire_contract has 80 lines, threshold = 70

Why does this problem occur?

Overly long functions make the code harder to read. The recommended maximum function length for the Rust language is 70 lines of code. Severity: Brain Method - Complex Method - Long Method.

How to fix it?

We recommend to be careful here -- just splitting long functions don't necessarily make the code easier to read. Instead, look for natural chunks inside the functions that expresses a specific task or concern. Often, such concerns are indicated by a Code Comment followed by an if-statement. Use the EXTRACT FUNCTION refactoring to encapsulate that concern.

@coderabbitai

This comment was marked as resolved.

codescene-delta-analysis[bot]

This comment was marked as outdated.

leynos added 10 commits June 15, 2026 09:38
Add `docs/execplans/6-3-1-skill-manifest-metadata.md` covering roadmap
item 6.3.1 as a passive-schema addition to `ortho_config::agent_context`.
The plan introduces two additive types, `SkillManifest` and
`SkillCommandRef`, plus a `skill_manifests: Vec<SkillManifest>` field on
`AgentContext` (with `#[serde(default)]`), and renames the §8.1 defaults
row in `docs/agent-native-cli-design.md` from `skill_manifest_paths` to
`skill_manifests` to match the structured-descriptor shape.

The plan is built on Firecrawl prior-art research (Anthropic Claude
Skills, MCP tool listings, OpenAI `ai-plugin.json`, Microsoft 365
Copilot v2.1, Fig autocomplete) and a Logisphere design review that
recommended adding `id: String` to `SkillManifest`, documenting
`SkillCommandRef.{path,flags}` as exact-match contracts against
`AgentCommand.path` and `AgentInput.long`, and reserving room in
`SkillManifest::path` for future non-filesystem sources. All three
recommendations are folded into the recommended design.

Status: DRAFT, awaiting maintainer approval before Milestone 1 may
begin. Validation, parsing, and any `cargo-orthohelp` flag work are
deferred to roadmap item 6.3.2. Link the plan from `docs/contents.md`.
Record the maintainer's 2026-06-12 confirmation that referencing ADR-003
is sufficient for the `skill_manifest_paths` to `skill_manifests`
wire-field rename, so no new ADR is required. Update Milestone 0, the
design overview, the Decision Log, and Progress to reflect the closed
question.
The decision nodes in the migration-guide flowchart carried raw newlines
inside their `{...}` labels, which the stricter `merman-cli` lexer used
by `make nixie` rejects with "Unterminated node label (missing `}`)".
Put each node label on a single physical line and use `<br/>` for the
intended visual breaks so the diagram renders identically and the gate
passes.

Also record the maintainer's approval of the 6.3.1 ExecPlan: status is
now `APPROVED`, and the approval and ADR-question resolution are noted in
the plan's Progress section.
Roadmap item 6.2.1 merged on main (pull request 342) while this plan was a
draft, landing the `cargo orthohelp --format agent-context` generator and
adding an additive `AgentCommand.summary` field. Update the plan to reflect
the new baseline after rebasing onto `origin/main`:

- reframe the "Dependency on roadmap item 6.2.1" section: the prerequisite
  is now satisfied, and the additive `#[serde(default)]` `skill_manifests`
  field is tolerated by the existing generator without modification;
- correct the `mod.rs` and `tests.rs` line counts (254 and 272) and note
  that the wire snapshot now carries the 6.2.1 `summary` field, so
  Milestones 2 and 3 extend the current snapshot rather than the pre-6.2.1
  one;
- downgrade the roadmap-dependency-confusion risk now that 6.2.1 has landed;
- record the rebase and reconciliation in Progress, Surprises, and the
  revision note.

The proposed `skill_manifests` field and the `SkillManifest` and
`SkillCommandRef` types are unaffected by 6.2.1. All gates pass after the
rebase: check-fmt, typecheck, lint, test, markdownlint, and nixie.
Add `SkillManifest` and `SkillCommandRef` to the agent-context schema
module and re-export them from `ortho_config` so downstream crates can
construct manifest descriptors without involving `cargo-orthohelp`.

Enable `camino`'s serde integration for the typed manifest path field and
record the Milestone 1 validation outcome in the ExecPlan.
Add the defaulted `skill_manifests` field to `AgentContext` and initialize
it from `AgentContext::new` so legacy payloads continue to deserialize with
an empty list.

Update the existing inline and generated agent-context snapshots to capture
the additive wire shape, and record the Milestone 2 validation outcome in
the ExecPlan.
Add focused `rstest` coverage for skill manifest defaulting, typed path
serialization, command-reference flag defaults, and required manifest fields.

Populate the canonical agent-context unit fixture with one manifest so the
inline snapshot captures the structured wire shape expected by downstream
consumers.
Align the design, users guide, developer guide, changelog, and roadmap
with the new agent-context skill manifest descriptors.

Record Milestone 4 validation and close roadmap item 6.3.1 in the
ExecPlan after deterministic gates and CodeRabbit review passed.
Mark PR 344 as ready in the ExecPlan after validation, CodeRabbit
review, and the GitHub draft-to-ready transition completed.
Move the large inline agent-context JSON snapshot into an insta file
snapshot so the test body stays small while preserving the full wire
contract assertion.
@lodyai lodyai Bot force-pushed the 6-3-1-skill-manifest-metadata branch from 351245a to ef21535 Compare June 15, 2026 07:42
@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot added the Roadmap label Jun 15, 2026
@leynos leynos merged commit 6bb29c1 into main Jun 15, 2026
6 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.

2 participants