Skip to content

Commit 4df67bd

Browse files
committed
chore: address PR-86 review feedback (BEADS doc + template + CI-script compile gate)
Applies the actionable items from the PR-86 review: - docs/BEADS.md: lead with a one-sentence "what Beads is" + upstream link; state the stance explicitly (optional/additive, recommended for agent-driven flows, GitHub remains authoritative); add a YAML example block under Recommended Bead fields; replace the duplicated Closure checklist with a Bead-specific narrowing that cites the PR template + CONTRIBUTING; call out that .beads/ is wiped by git clean -fdx. - .github/pull_request_template.md: collapse the "Local Beads" section into an HTML-commented opt-in block so it is invisible in the rendered preview until a Beads-using team uncomments it. - CONTRIBUTING.md: document the one-shot git renormalisation step for Windows clones after the .gitattributes change lands. - tests/test_scripts_compile.py: regression gate that py_compiles every .github/scripts/*.py. The "scripts unparseable" review finding was based on an older local Python — PEP 758 (3.14) makes the unparenthesised except clauses valid, so the scripts ARE fine on the project pin. The test guards against an actual syntax error landing in future.
1 parent 48c9905 commit 4df67bd

4 files changed

Lines changed: 91 additions & 16 deletions

File tree

.github/pull_request_template.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@
4040
<!-- Required for UI change. Delete this section for non-UI PRs. -->
4141

4242

43+
<!--
4344
## Local Beads
4445
45-
<!-- Optional. If this repo/project uses a local Beads queue, include the Bead id or "None". GitHub issue linkage below is still required. -->
46+
Optional opt-in. Only add this section if your team uses a local Beads queue
47+
(see docs/BEADS.md). Uncomment the heading and replace this comment with the
48+
Bead id. GitHub issue linkage below is still required either way.
49+
-->
4650

4751

4852
## Linked issue

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,21 @@ gh pr merge <N> --admin --squash --delete-branch
5656

5757
When a second collaborator joins, drop the `--admin` flag and adopt standard PR review. Update this section + `CODEOWNERS` in the same PR.
5858

59+
## Line endings (Windows clones)
60+
61+
This repo enforces LF line endings via `.gitattributes` (`* text=auto eol=lf`)
62+
and the pre-commit hygiene hook. If you cloned on Windows with
63+
`core.autocrlf=true`, the first checkout after pulling the `.gitattributes`
64+
change can leave the working tree out of sync with the index. Renormalise
65+
once:
66+
67+
```sh
68+
git add --renormalize .
69+
git commit -m "chore: renormalise line endings"
70+
```
71+
72+
After that, day-to-day work is unaffected.
73+
5974
## Local pre-push gate
6075

6176
```sh

docs/BEADS.md

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# Optional Beads execution queue
22

3-
Beads can be layered onto this harness as a local execution queue for teams that
4-
want dependency-aware task planning, agent handoffs, or ready/blocked views while
5-
still keeping GitHub Issues as the external source of truth.
6-
7-
This document is intentionally conservative: it adds Beads guidance without
8-
replacing the repository's existing GitHub issue and PR process.
3+
[Beads](https://github.com/steveyegge/beads) is an open-source
4+
dependency-aware issue tracker designed for AI coding agents — it gives an
5+
agent a local ready/blocked view of work, a dependency graph, and restart-safe
6+
task claims that GitHub Issues alone do not.
7+
8+
This document is **optional and additive**. The base harness does not assume
9+
Beads; if your team has no agent or multi-actor execution concern, GitHub
10+
Issues plus the PR template is sufficient and you can skip this doc entirely.
11+
Beads is recommended specifically when you are coordinating an LLM agent (or
12+
several) against this repo and want dependency planning the public issue
13+
tracker does not provide. The README and `docs/HARNESS.md` references describe
14+
Beads as optional infrastructure, not part of the standard contributor flow.
15+
16+
Wherever Beads is used, GitHub Issues remain the external source of truth and
17+
the authority for issue closure.
918

1019
## Review of existing GitHub issue guidance
1120

@@ -78,8 +87,26 @@ without reopening every browser tab:
7887
| `evidence` | Paths or URLs for test output, review notes, screenshots, or deploy checks. |
7988
| `closeout` | Merge SHA, PR URL, and verification notes once complete. |
8089

90+
A short YAML example:
91+
92+
```yaml
93+
external_ref: https://github.com/owner/repo/issues/123
94+
github_issue: 123
95+
acceptance: |
96+
/api/v1/echo rejects payloads >1KiB with HTTP 413.
97+
dependencies: [122] # other Bead ids or GitHub issues
98+
status: ready
99+
owner: agent-a
100+
evidence:
101+
- tests/test_api.py::test_echo_size_cap
102+
closeout: null
103+
```
104+
81105
Avoid storing secrets, tokens, credentials, private customer data, or raw
82106
production payloads in Beads. Treat Beads data as local operational metadata.
107+
Note that `.beads/` is gitignored, so anything Beads stores locally — including
108+
agent-action audit logs — is wiped by `git clean -fdx`; commit deliberate
109+
summaries to the repo if you need them to survive workspace resets.
83110

84111
## PR discipline when Beads are used
85112

@@ -107,15 +134,16 @@ are explicit.
107134

108135
## Closure checklist
109136

110-
Before marking a Bead done:
137+
The PR-merge and issue-closure gates already live in
138+
`.github/pull_request_template.md` and `CONTRIBUTING.md` — don't duplicate them
139+
here. The Bead-specific closure rule is narrower:
111140

112-
- The GitHub issue is still the correct external requirement.
113-
- The PR links the GitHub issue and, where useful, the Bead id.
114-
- Required CI checks passed or have documented non-applicability.
115-
- Required review happened according to repository policy.
116-
- Any requested browser, deploy, eval, or security evidence is attached or
117-
linked.
118-
- The GitHub issue receives a closeout note before or during closure.
141+
- Do not mark a Bead done until the GitHub issue's closure conditions (per the
142+
PR template and `CONTRIBUTING.md`) are met. Beads track the local execution
143+
state of work GitHub already authorised; they don't grant new closure
144+
authority.
145+
- If the Bead and the GitHub issue disagree on scope, acceptance, or status,
146+
stop and reconcile against GitHub before continuing.
119147

120148
Beads improve local throughput only if they reduce ambiguity. If a Bead and a
121-
GitHub issue disagree, stop and reconcile them before implementation continues.
149+
GitHub issue disagree, the GitHub issue wins.

tests/test_scripts_compile.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""Every script in `.github/scripts/` must parse on the project's pinned Python.
2+
3+
Catches a class of regression where a script lands with a syntax error that
4+
the corresponding CI gate happens to not exercise. Cheap and broad: one test,
5+
one `py_compile.compile` per script.
6+
"""
7+
8+
from __future__ import annotations
9+
10+
import py_compile
11+
from pathlib import Path
12+
13+
import pytest
14+
15+
REPO_ROOT = Path(__file__).resolve().parent.parent
16+
SCRIPTS_DIR = REPO_ROOT / ".github" / "scripts"
17+
18+
19+
def _ci_scripts() -> list[Path]:
20+
return sorted(p for p in SCRIPTS_DIR.glob("*.py") if p.is_file())
21+
22+
23+
@pytest.mark.parametrize("script", _ci_scripts(), ids=lambda p: p.name)
24+
def test_ci_script_compiles(script: Path) -> None:
25+
try:
26+
py_compile.compile(str(script), doraise=True)
27+
except py_compile.PyCompileError as exc: # pragma: no cover — failure path
28+
pytest.fail(f"{script.name} failed to compile: {exc.msg}")

0 commit comments

Comments
 (0)