|
1 | | -# PyAutoPulse — Agent Guidance |
| 1 | +# PyAutoHeart — Agent Guidance |
2 | 2 |
|
3 | 3 | This file is for AI coding agents (Claude Code, Codex, Cursor, etc.) |
4 | 4 | discovering this repository. |
5 | 5 |
|
6 | 6 | ## What this repo is |
7 | 7 |
|
8 | | -PyAutoPulse is the **health authority** of the PyAuto ecosystem. It owns all |
9 | | -health and release-readiness checking: continuous monitoring (CI status, dirty |
10 | | -checkouts, branch ahead/behind, open PRs, worktree state, script-timing |
| 8 | +PyAutoHeart is the **health and vital-signs authority** of the PyAuto organism. |
| 9 | +It owns health and release-readiness checking: continuous monitoring (CI status, |
| 10 | +dirty checkouts, branch ahead/behind, open PRs, worktree state, script-timing |
11 | 11 | regressions, version skew) plus deep on-demand/cloud checks (install |
12 | | -verification, URL hygiene), all green/yellow/red colour coded. `pyauto-pulse |
13 | | -readiness` is the **authoritative** "is it safe to release?" gate. |
| 12 | +verification, URL hygiene), workspace validation, and generated-artifact/noise |
| 13 | +classification, all green/yellow/red colour coded. `pyauto-heart readiness` is |
| 14 | +the **authoritative** "is it safe to release?" gate. |
14 | 15 |
|
15 | | -It is **separate** from PyAutoBuild on purpose: PyAutoBuild is a pure executor |
16 | | -(it produces PyPI releases and runs no readiness checks); Pulse owns the |
17 | | -checking. Pulse shells out to `autobuild` primitives but never imports |
18 | | -PyAutoBuild Python, never writes into other repos, and never triggers Build. |
| 16 | +It is **separate** from PyAutoHands / PyAutoBuild on purpose: Hands is a pure |
| 17 | +executor (it produces PyPI releases and runs no readiness checks); Heart owns |
| 18 | +the checking. Heart shells out to `autobuild` primitives but never imports |
| 19 | +PyAutoBuild Python, never writes into other repos, and never triggers Hands. |
19 | 20 |
|
20 | | -See [`AGENTS.md`](AGENTS.md) for the canonical Build/Pulse/Agent boundary and the |
21 | | -`Agent → Pulse → Build` call chain, and `README.md` for user-facing docs. |
| 21 | +See [`AGENTS.md`](AGENTS.md) for the canonical Brain/Heart/Hands boundary and |
| 22 | +the `Brain → Heart → Hands` call chain, and `README.md` for user-facing docs. |
22 | 23 |
|
23 | 24 | ## Hard rules |
24 | 25 |
|
25 | 26 | 1. **Color coding everywhere**: green = passing, yellow = warning, |
26 | 27 | red = failing. Use the `c_ok / c_warn / c_fail / c_info / c_meta` |
27 | | - helpers in `pulse/_color.sh` (bash) and `pulse/pulse_color.py` |
| 28 | + helpers in `heart/_color.sh` (bash) and `heart/heart_color.py` |
28 | 29 | (Python). Honour `NO_COLOR` and `--no-color`. |
29 | | -2. **Never write outside `~/.pyauto-pulse/`** in any check module. |
| 30 | +2. **Never write outside `~/.pyauto-heart/`** in any check module. |
30 | 31 | The daemon must be a pure observer; mutations belong in |
31 | | - `pyauto-pulse fix <topic>` which only EMITS context for a fresh |
| 32 | + `pyauto-heart fix <topic>` which only EMITS context for a fresh |
32 | 33 | Claude session. |
33 | 34 | 3. **Polling must be cheap**. A full `tick` should complete in <30s |
34 | 35 | total. If a check would take longer, run it less often (move to a |
35 | 36 | v2 daily cron, not the watch loop). |
36 | | -4. **No JAX in tests** — library convention. Pulse tests run with |
| 37 | +4. **No JAX in tests** — library convention. Heart tests run with |
37 | 38 | stdlib + PyYAML only. |
38 | | -5. **State writes are atomic**. Use `pulse.state.atomic_write_json` or |
39 | | - the bash equivalent (`pulse_write_json` in `_common.sh`). Concurrent |
| 39 | +5. **State writes are atomic**. Use `heart.state.atomic_write_json` or |
| 40 | + the bash equivalent (`heart_write_json` in `_common.sh`). Concurrent |
40 | 41 | ticks must not corrupt `state.json`. |
41 | 42 |
|
42 | 43 | ## Repo structure |
43 | 44 |
|
44 | 45 | ``` |
45 | | -bin/pyauto-pulse # bash dispatcher |
46 | | -pulse/ # all logic, shell-first |
| 46 | +bin/pyauto-heart # bash dispatcher |
| 47 | +heart/ # all logic, shell-first |
47 | 48 | _color.sh, _common.sh |
48 | 49 | daemon.sh, tick.sh # the loop + one cycle |
49 | 50 | state.py, status.py, fix.py # Python side |
50 | | - pulse_color.py |
| 51 | + heart_color.py |
51 | 52 | checks/ # one file per check class |
52 | 53 | config/repos.yaml # polled repo registry + thresholds |
53 | 54 | tests/ # pytest |
54 | 55 | ``` |
55 | 56 |
|
56 | 57 | ## Adding a new check |
57 | 58 |
|
58 | | -1. Create `pulse/checks/<name>.{sh,py}` following the existing patterns. |
| 59 | +1. Create `heart/checks/<name>.{sh,py}` following the existing patterns. |
59 | 60 | 2. Each check writes per-repo JSON sidecars to |
60 | | - `$PULSE_PER_REPO_DIR/<repo>.<check_kind>.json` OR a global file at |
61 | | - `$PULSE_STATE_DIR/<check_name>.json`. |
| 61 | + `$HEART_PER_REPO_DIR/<repo>.<check_kind>.json` OR a global file at |
| 62 | + `$HEART_STATE_DIR/<check_name>.json`. |
62 | 63 | 3. Print a single colour-coded summary line to stdout (logged to the |
63 | | - daemon log by `pulse_log`). |
64 | | -4. Add a section to `pulse/status.py:render` that surfaces the result. |
| 64 | + daemon log by `heart_log`). |
| 65 | +4. Add a section to `heart/status.py:render` that surfaces the result. |
65 | 66 | 5. Add tests in `tests/test_<name>.py` covering classification edges. |
66 | | -6. Wire into `pulse/tick.sh` in the appropriate position. |
| 67 | +6. Wire into `heart/tick.sh` in the appropriate position. |
67 | 68 |
|
68 | 69 | ## Running locally |
69 | 70 |
|
70 | 71 | ```bash |
71 | 72 | pip install -e .[dev] |
72 | 73 | pytest tests/ -v |
73 | | -PULSE_FORCE_COLOR=1 pyauto-pulse tick # one cycle, with colour |
74 | | -pyauto-pulse status |
| 74 | +HEART_FORCE_COLOR=1 pyauto-heart tick # one cycle, with colour |
| 75 | +pyauto-heart status |
75 | 76 | ``` |
76 | 77 |
|
77 | 78 | ## Codex / sandboxed runs |
|
0 commit comments