Policy: "Avoid putting files in the repo root unless necessary. Root should
contain only project-level config files (README.md, Makefile, Dockerfile, LICENSE, .gitignore, .editorconfig, REPO_POLICIES.md,
and language-specific config). Everything else goes in a subdirectory," with
a canonical subdirectory list: bin/, cmd/, configs/, deploy/, docs/, internal/, pkg/, share/, static/, web/.
Divergences:
FORMAT.md (the 6.4KB format specification) sits at the repo root. It is
documentation and belongs in docs/. There is currently no docs/
directory at all.
contrib/usage.sh uses contrib/, which is not a canonical subdirectory
name.
Separately, both bash scripts violate the bash style guide, which requires #!/usr/bin/env bash, set -euo pipefail, and all code inside functions
with main called at the bottom:
bin/gitrev.sh:1-2 — #!/bin/bash, no set -euo pipefail, no main.
contrib/usage.sh:1-2 — #!/bin/bash, has set -euo pipefail, no main.
(script/* are intentionally POSIX sh per scripts-to-rule-them-all and are
correct as-is. Do not touch them.)
Definition of done
FORMAT.md is at docs/FORMAT.md, moved with git mv so history is
preserved.
Every reference to it is updated: AGENTS.md:28, and README.md at lines
12-13, 22, and 143. Search the whole repo for FORMAT.md rather than
trusting that list.
contrib/usage.sh is moved to bin/usage.sh (or docs/ if it is really
example documentation rather than an executable tool — decide and say
which in the commit message), and contrib/ no longer exists.
Both bash scripts use #!/usr/bin/env bash, set -euo pipefail, and wrap
their logic in a main function invoked at the bottom of the file.
Both scripts still work after the rewrite — bin/gitrev.sh in particular
is invoked from Makefile:7 and its output feeds the version ldflags.
make check passes and docker build . succeeds. TODO.md updated in
the same commit.
Implementation requirements
Makefile:7 runs bash $(PWD)/bin/gitrev.sh 2>/dev/null || echo unknown.
Adding set -euo pipefail changes failure behavior — verify the fallback
to unknown still works when the script is run outside a git checkout,
and that a non-git build (e.g. a source tarball) does not now fail hard.
Check .dockerignore and the Dockerfile for references to contrib/ or FORMAT.md before moving either.
Note that .gitignore currently contains /bin/, which ignores the
directory you are moving a script into. Confirm the moved file is actually
tracked after the move — git status --ignored — and adjust the ignore
rule if needed. This interacts with #72; whichever lands second must
re-verify.
Do not rewrite the contents of FORMAT.md in this change. Moving and
editing in one commit makes the move unreviewable. Content work on the
spec is tracked separately.
Commit title must end with (closes #74).
## Context
Policy: "Avoid putting files in the repo root unless necessary. Root should
contain only project-level config files (`README.md`, `Makefile`,
`Dockerfile`, `LICENSE`, `.gitignore`, `.editorconfig`, `REPO_POLICIES.md`,
and language-specific config). Everything else goes in a subdirectory," with
a canonical subdirectory list: `bin/`, `cmd/`, `configs/`, `deploy/`,
`docs/`, `internal/`, `pkg/`, `share/`, `static/`, `web/`.
Divergences:
- `FORMAT.md` (the 6.4KB format specification) sits at the repo root. It is
documentation and belongs in `docs/`. There is currently no `docs/`
directory at all.
- `contrib/usage.sh` uses `contrib/`, which is not a canonical subdirectory
name.
Separately, both bash scripts violate the bash style guide, which requires
`#!/usr/bin/env bash`, `set -euo pipefail`, and all code inside functions
with `main` called at the bottom:
- `bin/gitrev.sh:1-2` — `#!/bin/bash`, no `set -euo pipefail`, no `main`.
- `contrib/usage.sh:1-2` — `#!/bin/bash`, has `set -euo pipefail`, no `main`.
(`script/*` are intentionally POSIX `sh` per scripts-to-rule-them-all and are
correct as-is. Do not touch them.)
## Definition of done
- `FORMAT.md` is at `docs/FORMAT.md`, moved with `git mv` so history is
preserved.
- Every reference to it is updated: `AGENTS.md:28`, and `README.md` at lines
12-13, 22, and 143. Search the whole repo for `FORMAT.md` rather than
trusting that list.
- `contrib/usage.sh` is moved to `bin/usage.sh` (or `docs/` if it is really
example documentation rather than an executable tool — decide and say
which in the commit message), and `contrib/` no longer exists.
- Both bash scripts use `#!/usr/bin/env bash`, `set -euo pipefail`, and wrap
their logic in a `main` function invoked at the bottom of the file.
- Both scripts still work after the rewrite — `bin/gitrev.sh` in particular
is invoked from `Makefile:7` and its output feeds the version ldflags.
- `make check` passes and `docker build .` succeeds. `TODO.md` updated in
the same commit.
## Implementation requirements
- `Makefile:7` runs `bash $(PWD)/bin/gitrev.sh 2>/dev/null || echo unknown`.
Adding `set -euo pipefail` changes failure behavior — verify the fallback
to `unknown` still works when the script is run outside a git checkout,
and that a non-git build (e.g. a source tarball) does not now fail hard.
- Check `.dockerignore` and the `Dockerfile` for references to `contrib/` or
`FORMAT.md` before moving either.
- Note that `.gitignore` currently contains `/bin/`, which ignores the
directory you are moving a script into. Confirm the moved file is actually
tracked after the move — `git status --ignored` — and adjust the ignore
rule if needed. This interacts with #72; whichever lands second must
re-verify.
- Do not rewrite the contents of `FORMAT.md` in this change. Moving and
editing in one commit makes the move unreviewable. Content work on the
spec is tracked separately.
- Commit title must end with ` (closes #74)`.
clawbot
added this to the 1.0.0 milestone 2026-08-09 03:42:02 +02:00
One related item deliberately left out of this issue's scope, because it is
an owner decision rather than a fix.
AGENTS.md also sits in the repo root and is also not on the policy's
allow-list of permitted root files. Unlike FORMAT.md and contrib/, there
is no obviously correct place to move it: a root AGENTS.md is the emerging
convention for agent-facing repository instructions, and tooling generally
expects it there. The repo's own TODO.md already flags this as unresolved
("Reconcile root-level AGENTS.md with directory-hygiene policy (keep or
relocate)").
Resolving it properly means amending the authoritative REPO_POLICIES.md in
the prompts repo to carve out AGENTS.md as an allowed root file — which
is a cross-repo change to a user-owned document, not something to do here.
Recommendation: leave AGENTS.md where it is, and amend the policy document
to permit it. The alternative — relocating it to satisfy a rule that predates
the convention — would break the tooling expectation for no practical gain.
Do not action this as part of #74. Flagging it so it is not lost; it needs a
decision from sneak and a change in the prompts repo.
One related item deliberately left out of this issue's scope, because it is
an owner decision rather than a fix.
`AGENTS.md` also sits in the repo root and is also not on the policy's
allow-list of permitted root files. Unlike `FORMAT.md` and `contrib/`, there
is no obviously correct place to move it: a root `AGENTS.md` is the emerging
convention for agent-facing repository instructions, and tooling generally
expects it there. The repo's own `TODO.md` already flags this as unresolved
("Reconcile root-level AGENTS.md with directory-hygiene policy (keep or
relocate)").
Resolving it properly means amending the authoritative `REPO_POLICIES.md` in
the `prompts` repo to carve out `AGENTS.md` as an allowed root file — which
is a cross-repo change to a user-owned document, not something to do here.
Recommendation: leave `AGENTS.md` where it is, and amend the policy document
to permit it. The alternative — relocating it to satisfy a rule that predates
the convention — would break the tooling expectation for no practical gain.
Do not action this as part of #74. Flagging it so it is not lost; it needs a
decision from `sneak` and a change in the `prompts` repo.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context
Policy: "Avoid putting files in the repo root unless necessary. Root should
contain only project-level config files (
README.md,Makefile,Dockerfile,LICENSE,.gitignore,.editorconfig,REPO_POLICIES.md,and language-specific config). Everything else goes in a subdirectory," with
a canonical subdirectory list:
bin/,cmd/,configs/,deploy/,docs/,internal/,pkg/,share/,static/,web/.Divergences:
FORMAT.md(the 6.4KB format specification) sits at the repo root. It isdocumentation and belongs in
docs/. There is currently nodocs/directory at all.
contrib/usage.shusescontrib/, which is not a canonical subdirectoryname.
Separately, both bash scripts violate the bash style guide, which requires
#!/usr/bin/env bash,set -euo pipefail, and all code inside functionswith
maincalled at the bottom:bin/gitrev.sh:1-2—#!/bin/bash, noset -euo pipefail, nomain.contrib/usage.sh:1-2—#!/bin/bash, hasset -euo pipefail, nomain.(
script/*are intentionally POSIXshper scripts-to-rule-them-all and arecorrect as-is. Do not touch them.)
Definition of done
FORMAT.mdis atdocs/FORMAT.md, moved withgit mvso history ispreserved.
AGENTS.md:28, andREADME.mdat lines12-13, 22, and 143. Search the whole repo for
FORMAT.mdrather thantrusting that list.
contrib/usage.shis moved tobin/usage.sh(ordocs/if it is reallyexample documentation rather than an executable tool — decide and say
which in the commit message), and
contrib/no longer exists.#!/usr/bin/env bash,set -euo pipefail, and wraptheir logic in a
mainfunction invoked at the bottom of the file.bin/gitrev.shin particularis invoked from
Makefile:7and its output feeds the version ldflags.make checkpasses anddocker build .succeeds.TODO.mdupdated inthe same commit.
Implementation requirements
Makefile:7runsbash $(PWD)/bin/gitrev.sh 2>/dev/null || echo unknown.Adding
set -euo pipefailchanges failure behavior — verify the fallbackto
unknownstill works when the script is run outside a git checkout,and that a non-git build (e.g. a source tarball) does not now fail hard.
.dockerignoreand theDockerfilefor references tocontrib/orFORMAT.mdbefore moving either..gitignorecurrently contains/bin/, which ignores thedirectory you are moving a script into. Confirm the moved file is actually
tracked after the move —
git status --ignored— and adjust the ignorerule if needed. This interacts with #72; whichever lands second must
re-verify.
FORMAT.mdin this change. Moving andediting in one commit makes the move unreviewable. Content work on the
spec is tracked separately.
(closes #74).One related item deliberately left out of this issue's scope, because it is
an owner decision rather than a fix.
AGENTS.mdalso sits in the repo root and is also not on the policy'sallow-list of permitted root files. Unlike
FORMAT.mdandcontrib/, thereis no obviously correct place to move it: a root
AGENTS.mdis the emergingconvention for agent-facing repository instructions, and tooling generally
expects it there. The repo's own
TODO.mdalready flags this as unresolved("Reconcile root-level AGENTS.md with directory-hygiene policy (keep or
relocate)").
Resolving it properly means amending the authoritative
REPO_POLICIES.mdinthe
promptsrepo to carve outAGENTS.mdas an allowed root file — whichis a cross-repo change to a user-owned document, not something to do here.
Recommendation: leave
AGENTS.mdwhere it is, and amend the policy documentto permit it. The alternative — relocating it to satisfy a rule that predates
the convention — would break the tooling expectation for no practical gain.
Do not action this as part of #74. Flagging it so it is not lost; it needs a
decision from
sneakand a change in thepromptsrepo.