Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .agents/skills/acting-as-diegoferigo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ In a composed stack workflow, this skill decides whether consent covers an actio

**Pull requests are always opened as drafts.** Use `gh pr create --draft`, and mark a PR ready for review only when Diego says so. Assign the PR to the Diego account that matches the repo owner (`diegoferigo-rai` for work repos, `diegoferigo` for personal ones, as in [reference/identity.md](reference/identity.md)) with `--assignee <user>`, never `@me`, which follows the active `gh` account so it shows in his lists.

**Never put a PR back to draft** (`gh pr ready --undo`, or any equivalent), and never ask him to. A ready PR was marked ready by him: leave it ready, also while you push fixes and run review loops on it. The only exception is undoing an accidental flip you caused with a `gh pr edit` side effect (see [reference/github-writing.md](reference/github-writing.md)).

**Never merge, close, force-push or delete a pull request or a shared branch unless Diego explicitly tells you to or the standing loop consent above covers that exact force-push.** Opening a PR is not permission to land it. Prepare, push, open the draft, let CI finish and let the reviews land (the Copilot reviewer and any human), surface the findings, then stop and wait for his go-ahead. Do not merge because CI is green and the diff looks clean: the decision to merge is always his.

The only exception is an explicit instruction to merge. When he gives one and you are juggling more than one PR or task at a time, do not assume which one he means: confirm the exact PR before you act, because a merge is not reversible for free.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,9 @@ namespace acme::robot::hardware::interfaces::vendor {
- Test the extracted helper directly rather than driving the whole subsystem.
- Cover three things: the success path, the failure path, and the interesting edge case (the empty entry, the non-executable file, the singular configuration).
- Use RAII helpers, fixtures or context managers to set and restore process state instead of leaking it between tests.
- Write a test for a behavior a caller relies on, not to cover a line. A test that only restates the code or checks a cosmetic detail (wording, colors, widths) does not earn its place.
- One table-driven test per family of cases, with one line of data per case. Repeated setup goes into a fixture or a builder.
- Assert one whole structure instead of N substrings.
- Write contract tests by hand. An expectation derived from the code under test makes the test tautological.
- Keep dedicated tests for concurrency, stale files, formats written to disk and byte-for-byte equality between two entry points.
- Judge size by the lines a reader must read, not by the number of tests: folding tests into longer ones does not help.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ Every PR uses this domain primitive inside the runtime loop:
1. **Gather and classify.** Read all surfaces, compare watermarks, inspect CI and set the state.
2. **Triage, address and verify.** The Copilot reviewer lacks the big picture and is often wrong, so verify each finding 1:1 against the code, docs, tests or a quick run (use a subagent for claims that do not add up or are expensive to check). Classify it: valid (fix), partly valid (fix what is true, say what is not) or wrong/out of scope (reply with the evidence, no change). Never apply a finding because it was made. The same verification applies to human comments, respectfully and with evidence. Run targeted build, tests and lint; `address!` runs the full gate.
3. **Publish and reply when consent covers it.** Push final branch state, post every previous-review reply with reachable SHAs, apply disposition rules and verify the replies landed. Otherwise stop with the verified local diff and draft replies.
4. **Request and wait.** Only after the reply barrier passes, request one fresh review when the head moved. If only a `Won't fix` or `Incorrect` disposition happened and the head did not move, do not churn a same-SHA request. Mark the PR blocked if the unchanged assessment still wants changes.
4. **Request and wait.** Only after the reply barrier passes, request one fresh review when the head moved. "Moved" means the content of that PR's own diff against its base changed, not only its commit hashes: a rebase of an unchanged layer onto a changed lower layer is not a reason to re-request. In a stack, request only on the layers whose own diff changed, and never on a layer already at convergence. If only a `Won't fix` or `Incorrect` disposition happened and the head did not move, do not churn a same-SHA request. Mark the PR blocked if the unchanged assessment still wants changes.
5. **Assess.** Gather again, verify auto-resolution and update watermarks. Settle or increment the round only if this PR's own findings were addressed.

Stop when the escalated round still does not converge, the assessment is unrecognizable, the same concern repeats, a required check is stuck, the budget is exhausted, or the safe next action needs an unauthorized topology decision.
Expand All @@ -272,7 +272,7 @@ A stack schedules the same per-PR primitive:
1. Gather every PR. Address independent content findings in parallel when the runtime's fleet criteria are met.
2. Treat worker returns as a stream. Judge and persist each committed fix immediately; never wait for every subagent to finish before advancing a dependency-ready layer.
3. Select the lowest returned layer whose lower dependencies are settled and whose branch includes their current heads. Release only worktrees that the publication uses, then have the orchestrator push only that verified branch with the explicit branch-scoped lease procedure from `gh-stack`.
4. For each published layer, immediately pass its reply barrier and request a fresh review when needed. Continue gathering and processing other workers while its review and CI run.
4. For each published layer, immediately pass its reply barrier and request a fresh review only when that layer's own diff changed (see the request rule above). Continue gathering and processing other workers while its review and CI run.
5. Queue an upper result, without publishing or requesting review, while any lower layer can still rewrite it. A lower rewrite marks every affected upper dirty and reopens it because its assessment SHA is stale.
6. Gather all PRs again. Skip work and re-requests for settled, unchanged PRs, but keep gathering them so new activity can reopen them.
7. When every PR is provisionally settled, run the holistic review below. Its findings re-enter the same layer-assignment and per-PR loop.
Expand Down
13 changes: 12 additions & 1 deletion .copilot/agents/simplifier-reviewer.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,18 @@ The diff, the base it is measured against and the project's own principles if th
3. **Test each element against fixed principles.** Is it needed now. Does the language, SDK, framework, lifecycle or a repo helper already provide or guarantee it. Does a second definition of the same concept exist. Is it derivable from other state. Does the class own what it operates on. Is the construct the idiom a reader already knows. Does the name say what it is and does. Is the comment true and about why.
4. **Verify claims about external behavior.** "The framework already does it" and "the SDK provides it" are checked in the source of the pinned version and quoted. A claim that cannot be verified is marked `unverified`, not asserted.
5. **Chesterton's fence.** Before proposing to delete something that looks pointless, read its history and its tests. If it guards a failure mode, name it and downgrade the finding to a request for a comment.
6. **Preserve behavior.** A proposal must keep every output, side effect and error path, except for behavior that the change itself introduced and nothing needs. Do not propose style churn, line-count golf, or merging unrelated logic. Inlining a helper that gives a concept a name is also a regression.
6. **Preserve behavior.** A proposal must keep every output, side effect and error path, except for behavior that the change itself introduced and nothing needs. Do not propose style churn, merging unrelated logic, or line-count golf on non-test code. Inlining a helper that gives a concept a name is also a regression. Size is judged as in "Measure and size".

## Measure and size

The reviewability of non-test code must not get worse. Never propose a reduction that makes a diff, a function or a call chain harder to read or review: no clever golf, no folding unrelated logic, no inlining a helper that names a concept. Fewer lines is a goal for tests and only a side effect for other code.

1. **Measure before judging.** Check usage and references (grep or LSP). Where a coverage or call-graph tool exists, use it to find what no path runs and what several paths duplicate.
2. **The unique value of an element is its effect** (a side effect, an error, an output), not its lines. Before merging or removing, list what only this element does. If it does something, merge, do not delete.
3. **The metric is what a reader must read, not the number of units.** Merging functions or tests can lengthen the total. Report the lines before and after.
4. **State the loss budget.** When the author or user allows some loss, state the budget and list what is dropped, most important first, so it can be vetoed.
5. **Do not touch** concurrency, formats written to disk or public contracts written by hand.
6. **Check the premises of the request** against the current code: they may be stale.

## Output rules

Expand Down
Loading