Skip to content

OCI format ADR#115

Open
dmartinol wants to merge 1 commit into
LobsterTrap:mainfrom
dmartinol:oci_format_adr
Open

OCI format ADR#115
dmartinol wants to merge 1 commit into
LobsterTrap:mainfrom
dmartinol:oci_format_adr

Conversation

@dmartinol
Copy link
Copy Markdown
Collaborator

@dmartinol dmartinol commented Apr 29, 2026

Summary

An ADR to integrate OCI format for lola modules.

Related Issues

NA

Test Plan

  • ADR follows the project template format

AI Disclosure

AI-assisted with Claude Code

Summary by CodeRabbit

Documentation

  • Documented OCI artifact format as an additional module distribution method
  • Outlined planned CLI commands (lola build, lola push, lola sign, lola verify, lola inspect) for module operations
  • Defined enhanced module management workflows with integrated verification and validation features
  • Specified OCI metadata structure and secure-by-default verification mechanisms

Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
@dmartinol dmartinol requested a review from mrbrandao April 29, 2026 18:03
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

📝 Walkthrough

Walkthrough

Two documentation files introduce an architecture decision record for OCI artifact format support in Lola modules, including design rationale, metadata specifications, secure verification strategies, and proposed CLI commands with implementation phases.

Changes

Cohort / File(s) Summary
OCI Architecture Decision Record
docs/adr/0007-oci-format.md
Proposes OCI artifact format as a module distribution method alongside Git/Zip/Tar/folder sources. Covers enterprise requirements (cryptographic verification, provenance, immutable digests, air-gapped workflows), OCI image structure with Lola-specific metadata namespace (io.lola.module.*), secure-by-default verification with digest pinning, and a multi-phase implementation roadmap.
OCI CLI Specifications & Workflows
docs/adr/0007-oci-format/oci-cli-exploration.md
Detailed exploration of OCI-focused CLI commands (lola build, lola push, lola sign, lola verify, lola inspect) with option sets, usage examples, and error flows. Defines OCI packaging structure, metadata mapping from skill.yaml/SKILL.md to annotations, enhanced commands (lola mod add, lola install, lola mod ls) with security defaults, deployment modes, and end-to-end workflow examples across four implementation phases.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A cottontail's ode to distributed dreams
OCI artifacts flow like mountain streams,
With signatures sealed and digests pristine,
Lola's modules dance—secure and keen! ✨
From build to push to verify's embrace,
We hop through the clouds at a brisk-bunny pace.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'OCI format ADR' is vague and generic, using an acronym without context. While it refers to the subject matter (OCI format), it doesn't clearly summarize the main change or intent for someone scanning history. Consider a more descriptive title such as 'Add ADR for OCI artifact format support' or 'Propose OCI format as Lola module distribution method' to clearly convey the change's purpose.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (3)
docs/adr/0007-oci-format.md (2)

445-445: Use “CLI compatibility” instead of “CLI interface compatibility.”

“Interface” is redundant in this phrase.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/adr/0007-oci-format.md` at line 445, Update the phrasing in the ADR text
by replacing the phrase "CLI interface compatibility (Click → Cobra)" with the
concise "CLI compatibility (Click → Cobra)"; locate the exact string "CLI
interface compatibility (Click → Cobra)" in docs/adr/0007-oci-format.md and
change it to "CLI compatibility (Click → Cobra)" so the word "interface" is
removed.

365-365: Add language identifiers to fenced code blocks.

Fences opened on Line 365, Line 392, and Line 410 are missing a language tag, which triggers MD040. Using text for tree/architecture diagrams keeps lint clean and readability high.

Proposed doc-only diff
-```
+```text
 OCI Image:
 ...
-```
+```

-```
+```text
 .lola/modules/module-name/
 ...
-```
+```

-```
+```text
 lola (Go binary)
 ...
-```
+```

Also applies to: 392-392, 410-410

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/adr/0007-oci-format.md` at line 365, Three fenced code blocks are
missing language identifiers causing MD040; update the three backtick fences
that surround the blocks starting with "OCI Image:",
".lola/modules/module-name/", and "lola (Go binary)" to use a language tag (use
"text") so each opening fence becomes ```text and the corresponding closing
fence remains ```, keeping the block contents unchanged; apply the same change
for the other occurrences mentioned (the blocks around those three headings).
docs/adr/0007-oci-format/oci-cli-exploration.md (1)

29-29: Add a language tag to the fenced block at Line 29.

This currently triggers MD040; text is appropriate for the tree diagram.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/adr/0007-oci-format/oci-cli-exploration.md` at line 29, The fenced code
block that contains the tree diagram is missing a language tag (triggering
MD040); update the opening backtick fence for that block (the fenced block
beginning at the tree diagram around line 29) to include the language tag "text"
(e.g., ```text) so the markdown linter recognizes the code block type.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/adr/0007-oci-format/oci-cli-exploration.md`:
- Around line 1441-1443: The documented provenance flag is inconsistent: replace
the mention of `--skip-provenance` with the already defined
`--skip-verification` (or explicitly document both if provenance has a separate
flag) so the "Provenance verification" bullet uses the same flag names as the
earlier OCI command options; update the line that reads `Provenance
verification: **Enabled** for OCI modules (use --skip-provenance flag to
disable)` to reference `--skip-verification` (or add clarifying text listing
both `--skip-verification` and `--skip-provenance`) to keep
`--skip-verification` and `--skip-provenance` consistent across the doc.
- Around line 909-913: The docs show conflicting command flows for installing
OCI modules (sometimes using the two-step "lola mod add <source>" then "lola
install <module> -a <assistant>" flow, and other times invoking "lola install
oci://..." directly, and option names like "--verify-signature" don't match
earlier specs); pick one canonical contract (either the two-step registry flow
using "lola mod add" + "lola install <module> -a <assistant>" or the
direct-install flow "lola install oci://<...> -a <assistant>"), then update all
examples and error messages to that contract consistently (including normalizing
option names such as "--verify-signature" to the agreed flag name), and audit
the referenced sections (the current examples and errors around the OCI CLI
exploration doc, plus the other occurrences noted) to ensure every example,
error text, and option usage matches the chosen command format and flag names
(search for "lola mod add", "lola install", "oci://", and "--verify-signature"
to find instances to change).
- Around line 27-28: The doc currently declares Lola modules are packaged as
"single-layer OCI images" but the example outputs later show multiple content
layers; update the examples that describe image build/push output (the examples
currently showing multiple content layers) to reflect a single-layer model by
consolidating layers into one content layer in the output text, adjusting
sizes/digests/summary lines accordingly, and ensuring any CLI outputs or example
manifests referenced in the "single-layer OCI images" section are consistent
with that single-layer representation; search for the phrase "single-layer OCI
images" and the example blocks that show "content layers" and change those
outputs to a single-layer format.
- Around line 73-80: The Table of Contents contains anchor fragments that don't
match existing headings (e.g., entries like "#new-commands",
"#modified-commands", "#configuration", "#possible-implementation-phasing");
update each TOC link to the exact heading text used in the document (or
normalize the headings to match the TOC) so intra-doc navigation works—ensure
the TOC entries such as "New Commands", "Modified Commands", "Configuration",
and "Possible Implementation Phasing" map exactly to their corresponding
headings or change the headings to the slugified forms used in the TOC so
anchors like Module Metadata and SkillCard and Workflow Pattern: Add Then
Install resolve correctly.

---

Nitpick comments:
In `@docs/adr/0007-oci-format.md`:
- Line 445: Update the phrasing in the ADR text by replacing the phrase "CLI
interface compatibility (Click → Cobra)" with the concise "CLI compatibility
(Click → Cobra)"; locate the exact string "CLI interface compatibility (Click →
Cobra)" in docs/adr/0007-oci-format.md and change it to "CLI compatibility
(Click → Cobra)" so the word "interface" is removed.
- Line 365: Three fenced code blocks are missing language identifiers causing
MD040; update the three backtick fences that surround the blocks starting with
"OCI Image:", ".lola/modules/module-name/", and "lola (Go binary)" to use a
language tag (use "text") so each opening fence becomes ```text and the
corresponding closing fence remains ```, keeping the block contents unchanged;
apply the same change for the other occurrences mentioned (the blocks around
those three headings).

In `@docs/adr/0007-oci-format/oci-cli-exploration.md`:
- Line 29: The fenced code block that contains the tree diagram is missing a
language tag (triggering MD040); update the opening backtick fence for that
block (the fenced block beginning at the tree diagram around line 29) to include
the language tag "text" (e.g., ```text) so the markdown linter recognizes the
code block type.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c44a68ff-1a38-4923-8a24-bf49119de34e

📥 Commits

Reviewing files that changed from the base of the PR and between a343c6e and 38715d1.

📒 Files selected for processing (2)
  • docs/adr/0007-oci-format.md
  • docs/adr/0007-oci-format/oci-cli-exploration.md

Comment on lines +27 to +28
Following skillimage's minimalist approach, Lola modules are packaged as **single-layer OCI images**:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Align build/push output examples with the declared single-layer OCI model.

Line 27–28 defines single-layer images, but output examples on Line 123–124 and Line 499–503 describe multiple content layers. Keep one model throughout to avoid implementation drift.

Also applies to: 123-124, 499-503

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/adr/0007-oci-format/oci-cli-exploration.md` around lines 27 - 28, The
doc currently declares Lola modules are packaged as "single-layer OCI images"
but the example outputs later show multiple content layers; update the examples
that describe image build/push output (the examples currently showing multiple
content layers) to reflect a single-layer model by consolidating layers into one
content layer in the output text, adjusting sizes/digests/summary lines
accordingly, and ensuring any CLI outputs or example manifests referenced in the
"single-layer OCI images" section are consistent with that single-layer
representation; search for the phrase "single-layer OCI images" and the example
blocks that show "content layers" and change those outputs to a single-layer
format.

Comment on lines +73 to +80
1. [New Commands](#new-commands)
- [Module Metadata and SkillCard](#module-metadata-and-skillcard)
2. [Modified Commands](#modified-commands)
- [Workflow Pattern: Add Then Install](#workflow-pattern-add-then-install)
3. [CLI Examples by Use Case](#cli-examples-by-use-case)
4. [Error Handling](#error-handling)
5. [Configuration](#configuration)
6. [Possible Implementation Phasing](#possible-implementation-phasing)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix invalid Table of Contents anchor fragments.

Several links point to headings that don’t exist verbatim (e.g., #new-commands, #modified-commands, #configuration, #possible-implementation-phasing). This breaks intra-doc navigation.

Proposed doc-only diff
-1. [New Commands](`#new-commands`)
+1. [New Commands](`#possible-new-commands`)
    - [Module Metadata and SkillCard](`#module-metadata-and-skillcard`)
-2. [Modified Commands](`#modified-commands`)
+2. [Modified Commands](`#possible-command-modifications`)
    - [Workflow Pattern: Add Then Install](`#workflow-pattern-add-then-install`)
 3. [CLI Examples by Use Case](`#cli-examples-by-use-case`)
 4. [Error Handling](`#error-handling`)
-5. [Configuration](`#configuration`)
-6. [Possible Implementation Phasing](`#possible-implementation-phasing`)
+5. [Configuration](`#configuration-optional`)
+6. [Possible Implementation Phasing](`#implementation-phasing`)
 7. [Future Enhancements](`#future-enhancements-not-for-initial-version`)
 8. [Backward Compatibility](`#backward-compatibility`)
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 73-73: Link fragments should be valid

(MD051, link-fragments)


[warning] 75-75: Link fragments should be valid

(MD051, link-fragments)


[warning] 79-79: Link fragments should be valid

(MD051, link-fragments)


[warning] 80-80: Link fragments should be valid

(MD051, link-fragments)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/adr/0007-oci-format/oci-cli-exploration.md` around lines 73 - 80, The
Table of Contents contains anchor fragments that don't match existing headings
(e.g., entries like "#new-commands", "#modified-commands", "#configuration",
"#possible-implementation-phasing"); update each TOC link to the exact heading
text used in the document (or normalize the headings to match the TOC) so
intra-doc navigation works—ensure the TOC entries such as "New Commands",
"Modified Commands", "Configuration", and "Possible Implementation Phasing" map
exactly to their corresponding headings or change the headings to the slugified
forms used in the TOC so anchors like Module Metadata and SkillCard and Workflow
Pattern: Add Then Install resolve correctly.

Comment on lines +909 to +913
**Important Architectural Note:** To maintain consistency with Lola's current behavior, the workflow for OCI modules follows the existing two-step pattern:

1. **`lola mod add <source>`** - Registers the module to `~/.lola/modules/` (local module registry)
2. **`lola install <module> -a <assistant>`** - Installs from registry to the specified assistant

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Resolve command-flow contradictions for lola install.

Line 911–913 defines mod add then install <module>, but later examples invoke lola install oci://... directly. This also introduces option mismatches (e.g., --verify-signature) relative to earlier command specs. Pick one contract and normalize all examples/errors to it.

Also applies to: 1115-1116, 1357-1357, 1374-1374, 1397-1407

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/adr/0007-oci-format/oci-cli-exploration.md` around lines 909 - 913, The
docs show conflicting command flows for installing OCI modules (sometimes using
the two-step "lola mod add <source>" then "lola install <module> -a <assistant>"
flow, and other times invoking "lola install oci://..." directly, and option
names like "--verify-signature" don't match earlier specs); pick one canonical
contract (either the two-step registry flow using "lola mod add" + "lola install
<module> -a <assistant>" or the direct-install flow "lola install oci://<...> -a
<assistant>"), then update all examples and error messages to that contract
consistently (including normalizing option names such as "--verify-signature" to
the agreed flag name), and audit the referenced sections (the current examples
and errors around the OCI CLI exploration doc, plus the other occurrences noted)
to ensure every example, error text, and option usage matches the chosen command
format and flag names (search for "lola mod add", "lola install", "oci://", and
"--verify-signature" to find instances to change).

Comment on lines +1441 to +1443
- Signature verification: **Enabled** for OCI modules (use `--skip-verification` flag to disable)
- Provenance verification: **Enabled** for OCI modules (use `--skip-provenance` flag to disable)
- Registry authentication: Delegated to `podman login`, `docker login`, or `skopeo login`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Documented provenance flag doesn’t match earlier command options.

Line 1442 mentions --skip-provenance, but earlier OCI command options define --skip-verification instead. This should be reconciled to prevent user confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/adr/0007-oci-format/oci-cli-exploration.md` around lines 1441 - 1443,
The documented provenance flag is inconsistent: replace the mention of
`--skip-provenance` with the already defined `--skip-verification` (or
explicitly document both if provenance has a separate flag) so the "Provenance
verification" bullet uses the same flag names as the earlier OCI command
options; update the line that reads `Provenance verification: **Enabled** for
OCI modules (use --skip-provenance flag to disable)` to reference
`--skip-verification` (or add clarifying text listing both `--skip-verification`
and `--skip-provenance`) to keep `--skip-verification` and `--skip-provenance`
consistent across the doc.

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.

1 participant