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
18 changes: 18 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Agent instructions

Read [`CONTRIBUTING.md`](CONTRIBUTING.md) before changing anything. The parts
most often missed:

- **Behaviour or spec change? Draft the OpenSpec change first**, before writing
the code — see [OpenSpec changes](CONTRIBUTING.md#openspec-changes). A small
fix that leaves every spec as-is does not need one.
- **Never hand-edit `openspec/specs/`.** It is generated when a change is
archived; fix the delta and re-archive.
- **Run the [local checks](CONTRIBUTING.md#local-checks-before-opening-a-pr)**
before opening a PR.
- **Keep the container's security posture intact** — the privilege-drop,
capability set, and credential opt-in model are load-bearing (see [Threat
model](README.md#threat-model)).

Architecture, threat model, and the version-pin refresh workflow are in
[`README.md`](README.md).
3 changes: 3 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Agent instructions

See [`AGENTS.md`](AGENTS.md).
33 changes: 30 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,41 @@ Contributions to `claude-docker` are welcome from anyone.
2. Make your change. Keep the container's security posture intact — the
privilege-drop, capability set, and credential opt-in model are load-bearing
(see [Threat model](README.md#threat-model)).
3. Non-trivial behaviour changes are tracked with OpenSpec change proposals
under [`openspec/changes/`](openspec/); follow the existing ones as a
template.
3. If the change touches behaviour or a spec, follow [OpenSpec
changes](#openspec-changes) below.
4. Open a PR against `main`; a maintainer will review before it is merged.

By submitting a contribution, you agree that it is licensed under the
[Apache License 2.0](LICENSE), the same license as the project.

## OpenSpec changes

Anything that changes behaviour or touches an existing spec needs an OpenSpec
change — new features, behaviour changes, and fixes that alter a documented
requirement. A small fix that leaves every spec as-is does not.

Draft the change *before* writing the code, then:

1. **Draft** — `/opsx:propose` writes `proposal.md`, `design.md`, `tasks.md` and
the spec deltas under `openspec/changes/<change>/`.
2. **Apply** — `/opsx:apply` implements the tasks and ticks them off.
3. **Validate** — `openspec validate <change> --strict` must pass.
4. **Archive** — `/opsx:archive` moves the change into
[`openspec/changes/archive/`](openspec/changes/archive/) and syncs its deltas
into [`openspec/specs/`](openspec/specs/).
5. **Open the PR** with the code, the archived change, and the synced specs in
it.

The `/opsx:*` commands come from OpenSpec's own agent integration — run
`openspec init` once to install them for your coding agent. Without an agent,
the `openspec` CLI shipped in the image covers the same ground.
`openspec/specs/` is generated by step 4 — never hand-edit it; fix the delta
and re-archive.

For a change that reshapes the project, have the artifacts reviewed after step 1
and before step 2: rewriting a proposal is cheap, redoing an implementation is
not.

## Local checks before opening a PR

CI runs these on every PR; running them locally first is faster:
Expand Down
Loading