@sylad/cadence 0.2.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +2 -2
- package/README.md +185 -11
- package/agents/code-reviewer.md +89 -0
- package/bin/cadence.js +3 -2
- package/dist/audit.js +95 -5
- package/dist/check.js +2 -1
- package/dist/cli.js +100 -46
- package/dist/config.js +106 -0
- package/dist/dates.js +8 -0
- package/dist/deliver.js +87 -29
- package/dist/git.js +34 -1
- package/dist/link.js +3 -3
- package/dist/news.js +82 -9
- package/dist/plan.js +203 -19
- package/dist/session.js +36 -6
- package/package.json +3 -2
- package/skills/deliver/SKILL.md +23 -1
- package/skills/lead/SKILL.md +80 -0
- package/skills/session-close/SKILL.md +17 -0
- package/skills/session-start/SKILL.md +25 -1
package/skills/deliver/SKILL.md
CHANGED
|
@@ -18,6 +18,28 @@ deliver:
|
|
|
18
18
|
contains: "${SHORT}" # the new version is the one being served
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
A project that already has its own delivery script declares it instead — cadence then keeps the
|
|
22
|
+
preconditions, the lock, the log and the delivered lots, and the script keeps the CI wait, the deploy
|
|
23
|
+
and its business checks:
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
deliver:
|
|
27
|
+
script: ./scripts/ship.sh "$CADENCE_SHORT"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Its arguments go after `--`: `cadence deliver -- api frontend` (`--sha <rev>` to deliver a pushed
|
|
31
|
+
commit other than HEAD). Ask the human (or the project's own
|
|
32
|
+
delivery skill) which arguments this delivery needs; never guess them.
|
|
33
|
+
|
|
34
|
+
## Where to run
|
|
35
|
+
|
|
36
|
+
Every `cadence` / `raf` command works on the git repository of the current directory. When the
|
|
37
|
+
session runs from a parent folder that holds several projects (not itself a repository), run each
|
|
38
|
+
command inside the project concerned: `cd <project> && cadence …`. The projects are the sub-folders
|
|
39
|
+
that contain `docs/plan/raf.yaml`, or a `cadence.yaml` with a `plan:` key.
|
|
40
|
+
|
|
41
|
+
Deliver one project at a time: the one the human names, or ask.
|
|
42
|
+
|
|
21
43
|
## Steps
|
|
22
44
|
|
|
23
45
|
1. Before anything: tests and build green locally, everything committed **and pushed** — the CI can
|
|
@@ -28,7 +50,7 @@ deliver:
|
|
|
28
50
|
3. `cadence deliver`. Exit codes: 0 delivered and verified, 1 a step failed, 2 refused before acting.
|
|
29
51
|
4. On failure: read which step failed and why. Fix the cause, commit, push, deliver again. Never rerun
|
|
30
52
|
blindly, never skip a check to make it pass.
|
|
31
|
-
5. On success: `raf done <id>` for the lots it lists **whose effect you have seen**; if one of them is
|
|
53
|
+
5. On success: `raf done <id>` (or the project's own tool when its plan is read-only) for the lots it lists **whose effect you have seen**; if one of them is
|
|
32
54
|
`visible`, `cadence news build` and deliver the news too.
|
|
33
55
|
|
|
34
56
|
## Rules
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lead
|
|
3
|
+
description: Lead several cadence projects from a parent folder without loading them into the main context — fan out one subagent per project to gather the facts, agree the priorities with the human, delegate each chosen lot to a subagent with a standard brief, have the work reviewed, re-verify it yourself, then deliver one project at a time. Triggers — "/lead", "pilot all projects", "on pilote tout", "délègue aux sous-agents", start of a multi-project day.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Lead — decide at the top, work in subagents
|
|
7
|
+
|
|
8
|
+
The lead session stays small: it reads summaries, decides with the human, delegates, checks and
|
|
9
|
+
delivers. Project files are read and changed by subagents, each with its own context. The projects
|
|
10
|
+
are the sub-folders of the current directory that contain `docs/plan/raf.yaml`, or a `cadence.yaml`
|
|
11
|
+
with a `plan:` key. A project whose `cadence.yaml` maps the fields of a plan kept by its own tool is
|
|
12
|
+
**read-only** for `raf`: it takes part in the tour, and its plan is changed with the project's own
|
|
13
|
+
commands (its CLAUDE.md names them), never with `raf start|done|note|ux|review`.
|
|
14
|
+
|
|
15
|
+
## Limits that always apply
|
|
16
|
+
|
|
17
|
+
- **At most two subagents running at once.** Queue the rest.
|
|
18
|
+
- **Never two subagents in the same repository at the same time**, and the lead does not commit in a
|
|
19
|
+
repository where a subagent is working.
|
|
20
|
+
- **Deliveries and `raf ux` / `raf review` verdicts are done by the lead, one project at a time** —
|
|
21
|
+
never by a subagent, never two deliveries in parallel.
|
|
22
|
+
- A subagent cannot ask the human anything. When it hits an ambiguity it stops and reports; the lead
|
|
23
|
+
brings the question to the human.
|
|
24
|
+
|
|
25
|
+
## 1. Tour of the projects
|
|
26
|
+
|
|
27
|
+
For each project, a subagent (read-only) runs `cd <project> && cadence session start` and returns at
|
|
28
|
+
most five lines: lots in progress (silent ones flagged), drift, notes from the last close, the next
|
|
29
|
+
ready lot. Two at a time, in the background.
|
|
30
|
+
|
|
31
|
+
Then report to the human in a compact table — one row per project — and propose **three** items
|
|
32
|
+
across projects, each with project, lot id and one sentence of justification: finish what is in
|
|
33
|
+
progress, then drift that blocks a delivery, then ready quick wins. **Stop and wait for the priority.**
|
|
34
|
+
|
|
35
|
+
## 2. Delegation
|
|
36
|
+
|
|
37
|
+
For each chosen lot, the lead runs `cd <project> && raf start <lot>`, then gives a subagent this brief
|
|
38
|
+
(fill in the brackets, keep the rest verbatim):
|
|
39
|
+
|
|
40
|
+
> Work in `<absolute path of the project>` on lot `<id>` — "<title>" — of its plan
|
|
41
|
+
> (`docs/plan/raf.yaml`, or the file named by `plan:` in `cadence.yaml`; read the lot, its notes and sub-tasks, and the project's CLAUDE.md first).
|
|
42
|
+
> Goal: <what done looks like, from the human's words>.
|
|
43
|
+
> Rules: test first; commit each sub-part as soon as its tests pass, with explicit paths (never
|
|
44
|
+
> `git add -A` or `commit -a`), and a message that cites the lot (`feat(<id>): …`); run the project's
|
|
45
|
+
> full test suite and build before reporting; do not push, deliver, run `raf done`, `raf ux` or
|
|
46
|
+
> `raf review`.
|
|
47
|
+
> If something is ambiguous or needs a decision, stop and report the question instead of guessing.
|
|
48
|
+
> Report: commits (sha + subject), tests and build results with their numbers, what you could not
|
|
49
|
+
> verify, open questions.
|
|
50
|
+
|
|
51
|
+
A lot that adds or changes a screen is `visible`: after the implementation, have the
|
|
52
|
+
`ux-reviewer` agent review it (give it the URL or the way to run the app) and bring its verdict and
|
|
53
|
+
proposed sub-tasks back to the human.
|
|
54
|
+
|
|
55
|
+
## 3. Check
|
|
56
|
+
|
|
57
|
+
1. The `code-reviewer` agent, as a fresh subagent (most capable model), reviews the lot. Give it
|
|
58
|
+
the absolute path of the project and the lot id, **not** the author's report: it reads the diff
|
|
59
|
+
itself from the commits that cite the lot, runs the checks, and returns real defects only,
|
|
60
|
+
ranked, with what it could not verify and a one-line verdict.
|
|
61
|
+
2. **The lead re-verifies itself**: `git log` shows the commits, the test suite and build pass when
|
|
62
|
+
run by the lead, `raf check` is clean. A subagent is green on what it *could* test; say plainly
|
|
63
|
+
what nobody could verify.
|
|
64
|
+
3. Fix or re-delegate what the review found; then record the verdict, `raf review <lot> "…"` with
|
|
65
|
+
the code reviewer's last line brought up to date (and `raf ux <lot> "…"` for a visible lot, with
|
|
66
|
+
the UX reviewer's), then `raf done <lot>`. Where the gate is on (`raf review enable`, the
|
|
67
|
+
human's decision for each repository), `raf done` refuses a lot that has commits and no
|
|
68
|
+
verdict, or a verdict older than its latest commit: a fix made after the review means a new
|
|
69
|
+
review of the lot, not an edited verdict. A read-only plan has no gate in `raf` (a `uxSince` or `reviewSince` written in it is
|
|
70
|
+
ignored): the verdict goes into the project's own tool.
|
|
71
|
+
|
|
72
|
+
## 4. Delivery
|
|
73
|
+
|
|
74
|
+
One project at a time, by the lead: push, then the `deliver` skill (`cadence deliver --dry-run`, then
|
|
75
|
+
`cadence deliver`). Follow the human's standing instructions about confirmation before production.
|
|
76
|
+
|
|
77
|
+
## 5. Close
|
|
78
|
+
|
|
79
|
+
At the end, the `session-close` routine in each project touched, and `cadence session next` lines in
|
|
80
|
+
each. Give the human one line per project: delivered, in progress, blocked (and why).
|
|
@@ -5,6 +5,16 @@ description: Close a work session on a repository that uses cadence — plan hyg
|
|
|
5
5
|
|
|
6
6
|
# Session close — close without memorising everything
|
|
7
7
|
|
|
8
|
+
## Where to run
|
|
9
|
+
|
|
10
|
+
Every `cadence` / `raf` command works on the git repository of the current directory. When the
|
|
11
|
+
session runs from a parent folder that holds several projects (not itself a repository), run each
|
|
12
|
+
command inside the project concerned: `cd <project> && cadence …`. The projects are the sub-folders
|
|
13
|
+
that contain `docs/plan/raf.yaml`, or a `cadence.yaml` with a `plan:` key.
|
|
14
|
+
|
|
15
|
+
With no project named, run `cadence session close` in each project touched during the session
|
|
16
|
+
(`git log --since` or `git status` tell which) and close each one.
|
|
17
|
+
|
|
8
18
|
## Steps
|
|
9
19
|
|
|
10
20
|
1. Run `cadence session close` (over several days: `--since "2 days ago"`). Exit code 1 means
|
|
@@ -16,6 +26,10 @@ description: Close a work session on a repository that uses cadence — plan hyg
|
|
|
16
26
|
is genuinely outside the plan (docs, chores);
|
|
17
27
|
- a finished lot marked `visible` without a news entry → `cadence news new <id>`, written for the
|
|
18
28
|
user, with a screenshot;
|
|
29
|
+
- a lot that `raf done` refuses, or that the check reports as finished, for lack of a review —
|
|
30
|
+
code review of a lot with commits, or one older than the lot's latest commit
|
|
31
|
+
(`raf review enable`), UX review of a visible lot (`raf ux enable`) → have the `code-reviewer` / `ux-reviewer` agent review it, then record its
|
|
32
|
+
verdict with `raf review <id> "…"` / `raf ux <id> "…"`; never write a verdict nobody gave;
|
|
19
33
|
- rerun until the check part is clean.
|
|
20
34
|
3. **Memory, filtered** (only if you keep a persistent memory): write down what the repository does
|
|
21
35
|
NOT already say — a trap and its cause, a decision or correction from the human, a collaboration
|
|
@@ -23,6 +37,9 @@ description: Close a work session on a repository that uses cadence — plan hyg
|
|
|
23
37
|
4. **Skills and agents, on threshold, PROPOSED**: a skill when the same chain of commands was done by
|
|
24
38
|
hand at least twice today; an agent update when an agent got something wrong or its domain moved.
|
|
25
39
|
List them with the benefit; the human decides. Never create them here.
|
|
40
|
+
When the report has a "Faits propres au projet" section (`session.close` in `cadence.yaml`), treat
|
|
41
|
+
what it flags as part of this hygiene; with a read-only plan, use the project's own tool wherever
|
|
42
|
+
these steps say `raf`.
|
|
26
43
|
5. **Clean state**: everything committed and pushed, no delivery running. If the command still exits 1,
|
|
27
44
|
say what remains and do NOT say the session is closed.
|
|
28
45
|
6. **Three lines for next time**: `cadence session next "…" "…" "…"` — the next `session-start` shows them.
|
|
@@ -5,10 +5,21 @@ description: Start a work session on a repository that uses cadence — gather t
|
|
|
5
5
|
|
|
6
6
|
# Session start — resume without reciting
|
|
7
7
|
|
|
8
|
-
The repository already carries the state: the plan (`docs/plan/raf.yaml`), the history, the notes left at
|
|
8
|
+
The repository already carries the state: the plan (`docs/plan/raf.yaml`, or the file named by `plan:` in `cadence.yaml`), the history, the notes left at
|
|
9
9
|
the last close. The only thing missing is the human's priority for today. This skill gathers the facts,
|
|
10
10
|
proposes, and stops.
|
|
11
11
|
|
|
12
|
+
## Where to run
|
|
13
|
+
|
|
14
|
+
Every `cadence` / `raf` command works on the git repository of the current directory. When the
|
|
15
|
+
session runs from a parent folder that holds several projects (not itself a repository), run each
|
|
16
|
+
command inside the project concerned: `cd <project> && cadence …`. The projects are the sub-folders
|
|
17
|
+
that contain `docs/plan/raf.yaml`, or a `cadence.yaml` with a `plan:` key.
|
|
18
|
+
|
|
19
|
+
With no project named, run `cadence session start` in **each** project that has a plan and report
|
|
20
|
+
one or two lines per project (in progress, drift, notes left at the last close), then propose the
|
|
21
|
+
three most useful items across projects and wait. With a project named, work in that one only.
|
|
22
|
+
|
|
12
23
|
## Steps
|
|
13
24
|
|
|
14
25
|
1. Run `cadence session start` (after a weekend: `--since "3 days ago"`). If `cadence` is not on the
|
|
@@ -20,6 +31,9 @@ proposes, and stops.
|
|
|
20
31
|
- **Drift**: each `✗` line from the check, with the one command that fixes it.
|
|
21
32
|
- **Delivery in progress** or a stale lock: no new delivery until it is resolved.
|
|
22
33
|
- **Notes from the last close**, if any.
|
|
34
|
+
- **Project facts** ("Faits propres au projet"), when the project plugs its own morning script in
|
|
35
|
+
(`session.start` in `cadence.yaml`): summarise what bears on today's choice — deadlines, the
|
|
36
|
+
project's own planning, documentation drift — and leave the rest.
|
|
23
37
|
3. **The plan drives the work.** Propose exactly three items, each with its id and one sentence of
|
|
24
38
|
justification, in the order the command gives them: finish what is in progress, then ready quick
|
|
25
39
|
wins, then the next ready lots. An idea that is not in the plan is only proposed together with the
|
|
@@ -27,11 +41,21 @@ proposes, and stops.
|
|
|
27
41
|
4. **Stop and wait** for the priority. Start nothing and commit nothing before the answer — the only
|
|
28
42
|
exception is a `raf note <id> "…"` on a silent lot whose cause is already known.
|
|
29
43
|
|
|
44
|
+
A plan kept by the project's own tool (`cadence.yaml` maps its fields) is **read-only** for `raf`:
|
|
45
|
+
report from it as usual, but give the project's own command for every fix or start — `raf start`,
|
|
46
|
+
`raf done` and `raf note` refuse.
|
|
47
|
+
|
|
30
48
|
## After the answer
|
|
31
49
|
|
|
32
50
|
`raf start <id>` on the chosen lot, then the project's usual development workflow. Every commit cites
|
|
33
51
|
the lot id (`feat(L3): …`) so that the history links itself to the plan.
|
|
34
52
|
|
|
53
|
+
## A project with its own tooling
|
|
54
|
+
|
|
55
|
+
When the plan is read-only (held by the project's own tool, `plan:` with a field mapping in
|
|
56
|
+
`cadence.yaml`), every plan change — start, note, done — goes through that tool, not `raf`; the
|
|
57
|
+
project's instructions say which command. Its expert agents and its own skills stay in use.
|
|
58
|
+
|
|
35
59
|
## Do not
|
|
36
60
|
|
|
37
61
|
- Decide for the human: close a lot, drop one, create an agent or a skill.
|