Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rules that bite. (A maintainer-local `CLAUDE.md` overlay adds host-specific note
rendered length is what counts, not the raw line count. Re-check after any edit.
Normative as Standard §5.6, and gated in CI (`SKILL.md description cap` step,
every `SKILL.md` in the tree) and by `construct skill ship`, which refuses to
stage or push an over-cap skill (exit 5, `CONFLICT`). The `.githooks/pre-commit`
stage or ship an over-cap skill (exit 5, `CONFLICT`). The `.githooks/pre-commit`
hook is the fast local signal only — it is opt-in per clone
(`git config core.hooksPath .githooks`), so trim *before* packing rather than
relying on it.
Expand All @@ -35,9 +35,8 @@ rules that bite. (A maintainer-local `CLAUDE.md` overlay adds host-specific note
assistant-driven changes alike. There is **no auto-push exemption** for
skill-directory edits. An agent's work ends at opening the PR — **merging is
the maintainer's call**, and an agent never merges its own PR.
**`construct skill ship` predates this rule and hard-codes
`git push origin main`** — do not use it to publish until it is reworked; run
the workflow in [`CONTRIBUTING.md`](CONTRIBUTING.md) by hand instead.
`construct skill ship` implements this end-to-end — branch, signed commit,
push, `gh pr create` — and never pushes to the default branch.
- **Keep the README §2 catalogue row in sync** when adding, removing, or
re-scoping a skill.

Expand Down
17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,15 @@ diverge. Verify with `unzip -l <name>.zip` before committing.
Contributing agents stop at opening the PR — **merging is the maintainer's
call**, and an agent never merges its own PR.

> **`construct skill ship` does not yet follow this rule.**
> `construct-cli/src/commands/ship.rs` hard-codes `git push origin main`, so
> the command publishes straight to the default branch. Until it is reworked
> (branch + `gh pr create`, or stop after the signed commit), do not use it
> to publish — follow steps 1–5 by hand. `--dry-run --no-sync` still
> exercises its §5.6 description-cap gate and bundle-drift check safely.
> `construct skill ship` automates steps 1–5: it enforces bundle-drift and
> the §5.6 description cap, switches to a feature branch (generated from the
> shipped skills, or `--branch`), stages by explicit name, makes the signed
> UTC commit, pushes the branch, and opens the PR with `gh`. It never pushes
> to the default branch and never merges. `--dry-run` reports the full plan,
> branch included, without changing anything.
>
> Because nothing lands on the default branch, `ship` does not sync — run
> `construct skill sync` after the PR merges.

Never let `git status` show a skill-dir change without its matching bundle change.

Expand Down Expand Up @@ -207,7 +210,7 @@ consolidated zip intentionally differs from any on-disk tree).
snippet above is only for a quick manual count:
- **CI** — the `SKILL.md description cap` step runs the checker over every
`SKILL.md` in the tree on each PR and push to `main`. This is the gate.
- **`construct skill ship`** — refuses to stage, commit, or push a skill whose
- **`construct skill ship`** — refuses to stage, commit, or open a PR for a skill whose
description is over the cap, before any bundle is shipped (exit 5,
`CONFLICT`, with an `oversized_skills` list naming each offender).
- **The [pre-commit hook](#pre-commit-hook)** — the fast local signal. It is
Expand Down
15 changes: 11 additions & 4 deletions construct-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ pub(crate) enum SkillCommand {
)]
Sync(SyncArgs),

/// Ship local skill edits: commit (signed) + push, then sync.
/// Ship local skill edits: branch + commit (signed) + open a pull request.
#[command(
after_help = "Examples:\n construct skill ship --dry-run\n construct skill ship --skills spacecraft-rust-guidelines\n construct skill ship --message \"docs: clarify X\" --json"
after_help = "Never pushes to the default branch — every change goes through a\nfeature branch and a pull request, and merging is the maintainer's call.\nRun `construct skill sync` after the PR merges.\n\nExamples:\n construct skill ship --dry-run\n construct skill ship --skills spacecraft-rust-guidelines\n construct skill ship --branch ship/palette-fix --message \"docs: clarify X\" --json"
)]
Ship(ShipArgs),
}
Expand Down Expand Up @@ -373,8 +373,15 @@ pub(crate) struct ShipArgs {
#[arg(short = 'm', long = "message", value_name = "MSG")]
pub(crate) message: Option<String>,

/// Commit and push but skip the final `skill sync` step.
#[arg(long)]
/// Feature branch to commit onto (default: derived from the shipped
/// skills, or the current branch when it is not the default branch).
#[arg(short = 'b', long = "branch", value_name = "NAME")]
pub(crate) branch: Option<String>,

/// Deprecated no-op. `ship` opens a pull request instead of pushing to the
/// default branch, so nothing lands to sync; run `construct skill sync`
/// after the PR merges.
#[arg(long, hide = true)]
pub(crate) no_sync: bool,
}

Expand Down
Loading
Loading