Repository navigation
Conversation
…kill The binary now carries `skills/omnigraph` byte for byte. `omnigraph skill export <dir> [--force] [--json]` writes it where an agent loads skills, and `omnigraph skill show [<path>]` prints one file, so a consumer gets the skill written for the CLI it runs. A new `omnigraph-skill` crate has its package root at `skills/`, keeping the skill tree its one copy while still packaging; its build script embeds every file. An export records each written file's digest in `.omnigraph-skill.json`, so a later `--force` export removes only unchanged files the skill no longer has and never touches anything else. In-source tests hold the skill's command index and condensed reference to the clap tree; integration tests check byte identity and the `--force` rules; check-docs.py now also holds the skill's declared HTTP contract to the CLI's.
…5ff0 # Conflicts: # crates/omnigraph-cli/src/planes.rs # docs/user/cli/reference.md
…e command index
…5ff0 # Conflicts: # crates/omnigraph-cli/src/cli.rs # crates/omnigraph-cli/src/main.rs # crates/omnigraph-cli/src/planes.rs # docs/user/cli/reference.md
Review of 343dc4b: request changesWhy. An agent that uses the The design is good. One problem blocks the "version-matched" claim: the copy the binary exports gives the wrong storage formats for that binary. Blocking
Merge prerequisite (not a code finding). GitHub reports a conflict with Not blocking
Tradeoffs and liability
Future direction
ValidationClean isolated worktree at 343dc4b. Current
Limitations. I did not run the full workspace test graph, workspace Clippy, |
…claude/cool-newton-c25ff0 # Conflicts: # Cargo.lock # crates/omnigraph-cli/src/main.rs
…claude/cool-newton-c25ff0 # Conflicts: # crates/omnigraph-cli/Cargo.toml
The exported skill now states the storage formats this binary reports, and an in-source test holds that line to the value `omnigraph version` prints, through one shared formatter. Elsewhere the skill refers to that line instead of repeating the numbers. A `--force` export no longer removes a recorded file that differs from a current file only in ASCII case, which on a case-insensitive file system is the file it just wrote. Skill paths and record paths must be ASCII. The skill crate's package includes exactly what its build embeds. The command index lists `cluster list` and `cluster pull`.
…claude/cool-newton-c25ff0
…5ff0 # Conflicts: # .github/workflows/publish-crates.yml
|
Closing as landed: #995 was squash-merged ( |
Summary
A consumer of the
omnigraphCLI (OmniGraph Studio's agent panel, CI scripts, a coding agent) can now ask the binary it chose for the agent skill written for it, instead of installing whateverskills/omnigraphholds on the default branch.omnigraph skill export <DIR> [--force] [--json]writes theomnigraphskill (SKILL.mdandreferences/) intoDIR, creating it.--jsonreports thefileswritten,skill_version(metadata.version),cli_versionandhttp_contract(the existingomnigraph_api_types::HTTP_API_CONTRACT;omnigraph versionis untouched, see CLI:omnigraph version --jsonreporting the HTTP contract and storage versions #977).omnigraph skill show [PATH]printsSKILL.md, or any other skill file, to stdout.localcommands: no graph, server, configuration or network.Embedding:
skills/omnigraphstays the one copyinclude_str!("../../../skills/...")from the CLI would not survivecargo package, since a package carries only files below its root. So a new workspace crate,omnigraph-skill, has its package root atskills/, which puts the tree inside the package. Itsbuild.rswalksskills/omnigraphand generates aninclude_bytes!table, so adding or removing a reference file needs no code change. The crate has no dependencies.cargo package -p omnigraph-skilllists all 14 skill files and its verify build compiles from the extracted package.npx skills addis unaffected: it copiesskills/omnigraph/, and the crate'sCargo.toml,build.rsandsrc/sit beside that directory, not inside it.--forceand stale filesAn export writes
.omnigraph-skill.jsonbeside the skill: each written path with the SHA-256 of the bytes written. Without--force, any existing target path refuses the export before it writes anything. With--force, the skill's files are replaced (a symbolic link at a skill path is replaced, not followed). A file the previous record lists and this skill no longer has is removed only if it is still a regular file with the recorded digest; otherwise it is reported underkept(modifiedornot_a_file). A file the record never listed is never touched, and directories are never removed. A record this binary cannot read refuses the forced export up front: unknown format, another skill, a path that could leave the directory, or a malformed digest.Drift tests
skill::tests::skill_command_index_lists_every_public_commandwalks the clap tree (Cli::command()). It requires the new## Command Indextable inreferences/commands.mdto list exactly the public top-level commands and subcommands. A command added or removed without updating the skill fails with "Missing from the index" or "Listed but not commands".skill::tests::skill_condensed_reference_names_every_top_level_commandrequires SKILL.md's condensed CLI reference to name every top-level command, and every entry there that opens with a command to open with a real one.cli_schema_config::skill_export_writes_the_built_in_skill_byte_for_byteruns the binary and compares the exported tree withskills/omnigraphbyte for byte. It also checks the JSON fields, the record's digests andskill show.cli_schema_config::skill_export_refuses_existing_files_and_force_removes_only_unchanged_recorded_filescovers the refusal and the--forcerules above: an unchanged recorded file is removed; an edited one, a symbolic link (Unix) and an unrecorded file are kept; a record with an escaping path refuses.scripts/check-docs.pyalready holdsmetadata.versionto the CLI's package version. It now also holds the HTTP contract named in the skill'scompatibilitytoHTTP_API_CONTRACT.Other changes
docs/user/cli/index.mdgets a short "Give an agent the matching skill" section;docs/user/cli/reference.mdgets a command-table row. The README install line now leads withomnigraph skill exportand keepsnpx skills addfor older CLIs. SKILL.md andreferences/commands.mdmention the command.docs/user/cli/reference.mdsits at the checker's 350-line ceiling, so one sentence in it was joined onto one line to make room for the row.Cargo.tomlmembers, AGENTS.md's workspace map,docs/dev/architecture.md, thedocs/dev/testing.mdownership table,.github/CODEOWNERS, and the (paused) crates.io publish order, withomnigraph-skillbeforeomnigraph-cli.changelog.d/skill-export.added.md.Test plan
RUST_MIN_STACK=16777216 cargo test -p omnigraph-cli --lockedwith the server binary built: 146 in-source (includingskill::andplanes::) and 298 integration tests passrepair, gainsteleportorprofile edit, or SKILL.md's condensed reference drops a command or describes a nonexistent onediff,branch diffandbranch merge-basefrom feat(changes): graph diff, branch review and merge dry run #966; the drift tests failed withMissing from the index: ["branch diff", "branch merge-base", "diff"]until the skill listed themcargo clippy --workspace --all-targets --locked -- -D warnings -W clippy::dbg_macrobefore merging main, the same for-p omnigraph-cli -p omnigraph-skillafter;cargo fmt --all --checkcargo package -p omnigraph-skill(verify build from the extracted package)python3 scripts/check-docs.py(the contract check fails on a skill naming 0.12 or no contract),bash scripts/check-agents-md.sh,python3 scripts/check-dependency-sources.py,python3 scripts/check-change-classes.py,cargo deny --locked check,typos