Skip to content

Add .fips-template.yaml to opt into fips-agents patch flow#21

Merged
rdwj merged 1 commit into
mainfrom
feat/fips-template-manifest
May 7, 2026
Merged

Add .fips-template.yaml to opt into fips-agents patch flow#21
rdwj merged 1 commit into
mainfrom
feat/fips-template-manifest

Conversation

@rdwj
Copy link
Copy Markdown
Contributor

@rdwj rdwj commented May 7, 2026

Net-new file at the repo root — does not touch anything PR #20 is changing, so safe to land independently.

What

Adds `.fips-template.yaml` (`schema_version: 1`) declaring how `fips-agents patch` should treat this template. Three categories:

  • `chart` — `chart/templates//*`, `chart/Chart.yaml`, `chart/README.md`, `chart/policies//*`. Ask before patch.
  • `docs` — `CLAUDE.md`, `CONTRIBUTING.md`, `SECURITY.md`, `docs/**/*`. No prompt.
  • `build` — `Makefile`, `Containerfile`, `.gitignore`, `.gitleaks.toml`. Ask before patch.

Plus a 10-entry `never_patch` list:

  • `sandbox/**` — the runtime (executor, guardrails, seccomp, audit, pipeline, profiles).
  • `tests/**/*.py` — user tests.
  • `chart/values.yaml`, `chart/values-ctf.yaml`, `chart/values-standalone.yaml` — user deploy values for default / CTF / standalone profiles.
  • `pyproject.toml`, `README.md`, `LICENSE` — user-owned project metadata.
  • `.env*` — environment files.
  • `.github/**` — per-project repo settings.

Why

Without this file, scaffolded sandbox projects today get a clean ✗ error from `fips-agents patch check` (post fips-agents/fips-agents-cli#50, shipped in v0.12.1) telling them sandbox isn't patchable until the template ships a manifest. After this PR merges and a sandbox project is re-scaffolded (or an existing one runs `patch check` against the new template), the patch flow works for chart / docs / build drift.

Conservative defaults — sandbox runtime is NEVER_PATCH

`sandbox/**/*.py` is in `never_patch` on the agent-template precedent: users may have customized the executor, guardrails, or seccomp wiring, and we don't silently overwrite their changes. If we later decide users SHOULD track upstream runtime changes via patch, that's a follow-up adding a `runtime` category with `ask_before_patch: true`.

Compatibility

Test plan

  • Manifest parses cleanly through `fips_agents_cli.tools.patching._load_template_manifest` and `_categories_from_manifest` (validated locally).
  • `_resolve_categories` returns the manifest's categories for project_type='sandbox' instead of raising `PatchUnsupportedForProjectType`.
  • No secrets detected by gitleaks.
  • After merge: re-scaffold a sandbox project with `fips-agents create sandbox` and confirm `patch check` reports drift in chart/docs/build categories without surfacing `sandbox/` or `tests/`.

Without this manifest, fips-agents-cli refuses to run `fips-agents
patch` against sandbox projects — the CLI's hardcoded fallback has
no built-in category set for the 'sandbox' project type, so it now
emits a friendly ✗ error pointing here (see
fips-agents/fips-agents-cli#50). The presence of this file is what
makes the patch flow work for projects scaffolded from this template.

Schema: schema_version: 1, three categories (chart, docs, build) and
a 10-entry never_patch list separating template-managed scaffolding
from the user's runtime, tests, deploy values, and repo settings.

Conservative defaults — sandbox/** (the runtime) and tests/** are in
never_patch on the agent-template precedent: users may have
customized these and we don't silently overwrite them. If we later
decide users should track upstream runtime changes via patch, that's
a follow-up that adds a 'runtime' category covering sandbox/**/*.py
with ask_before_patch: true.

Companion to fips-agents/fips-agents-cli#48 (the loader, shipped in
v0.12.0). Older CLI installs ignore the file — non-breaking.

Assisted-by: Claude Code (Opus 4.7)
@rdwj rdwj merged commit f69ab81 into main May 7, 2026
1 check passed
@rdwj rdwj deleted the feat/fips-template-manifest branch May 7, 2026 03:09
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