Repository navigation
Conversation
Teach agents the JSON, exit-code, and human-approval rules that current main actually implements, and check that every command the skill names is in the CLI tree. Co-authored-by: Daniel Young <YoungDan@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a repository skill that teaches coding agents how to run this CLI against the contract on current
main: JSON in and out, the published exit codes, auth that does not print secrets, and a change loop that stops before approve, deploy, or--yesunless a human explicitly asks.The skill covers when to use it, install and
deslicer --version,schema/--help,-o jsonand the error envelope (hint,next_command,retryable), the exit-code table, device login vs CI OIDC vs tools token, the change loop (init, inventory validate, plan, show/status, validate, human approval, deploy, verify, revert), and hard rules with short examples. Placeholders only (example-prod,example_servers,https://observer.example.test).Linked from the README, the skills index, the quickstart, and
docs/exit-codes.md.Lines that contain the product name carry
pragma: allowlist secret, the same markerCHANGELOG.mduses. The commit hook treats that name as the configured Docker Hub username. The marker is not part of the CLI contract.Draft claims corrected against main
The attached drafts were input, not the contract. Checked against
src/,docs/exit-codes.md, anddeslicer schema's exit-code rows. Issues #263, #264, #265, #268, #269, #270, #271, #272, and the fix PR #273 are still open, so the skill states the behavior and does not cite the tickets.dap-102,ops.*.show,all_in_one_servers_ag1). This tree is 1.8.0. Tagged v1.8.0 has-o jsonand the error envelope.schemaexists on main and not on that tag. Ifschemaexits 2, fall back to--helpand keep-o json.cargo install deslicer-cli, orscripts/install.sh, as indocs/installation.md.schema.requires_yesis only the gated applies (change revert,change retry, and the other--yescommands).change plan,change approve, andchange deploymutate with no--yes. Do not probe approve expecting403 mfa_required; it may succeed.auth.pendingafterauth login --no-wait.whoamidoes not include the API origin for a device session.auth statusdoes (observer_api_url,session_deslicer_api_url,api_url_drift). A tools token is sent only when bothOBSERVER_API_URLandDESLICER_API_TOKENare set; otherwise the keyring session wins.details.verified: falseis not proof. A later 401 is.deslicer-cli/device-session), with a 0600 file fallback. It is not per origin, and changingHOMEdoes not clear it. No session-lifetime number is in this repo; readexpires_at.DESLICER_DEV_TOKENis rejected.schema_version.change statusprints JSON even for human output.change validateuses--format, not-o.--report-onlyon a missing report can exit 15.inventory validateprintsok: falseand exits 1.initwith no--provideron a GitHub remote selects App/OIDC (github) and can exit 1 withtemplate path … is not allowlisted. The tools-token path is--provider github-token. That scaffold can write a nullapps:key, whichinventory validaterejects (apps must be a list).--helpflag descriptions are still blank. Readschemaand do not invent a meaning.change validate(local parser). Other commands can turn a generic HTTP 400 into exit 8.change verifystarts a compile. It is not a read, and there is no universal "completed plans exit 7" rule in this tree.change revertis a dry-run until--yes, and the inverse plan is not auto-approved.next_command/next_commandsmay name approve, deploy, orretry --yes. Those are not permission. Error-envelopenext_commandis the recovery step.Evidence
cargo test --test skill_cli_commands— 3 passed (commands in the clap tree, exit table matchesPUBLISHED_EXIT_CODES, discovery copies match).cargo clippy --test skill_cli_commands -- -D warningspassed.cargo fmt --allapplied.Review
Please have a Product Expert review this first. After that, Roger or Sai should review. Do not merge from this branch;
mainis protected.Merge danger
Door: two-way. Removing the skill does not change CLI behavior.
Blast radius: documentation and one new test. README's global-flag row now documents
-o/--output/DESLICER_OUTPUTand marks--log-formatdeprecated, matchingsrc/cli.rs.