Skip to content

Commit e59cc46

Browse files
committed
Close agnosticism gaps: non-git VCS fallback + missing-PROJECT.md path
- red-team Phase 0: git is now the shown default, not the only path — instructs substituting another VCS (hg/jj/Perforce) or asking the caller for the changed set when git isn't present. Also pins a tracker path as context, not the review target. - implement Phase 1.4: mirror /spec's graceful missing-PROJECT.md handling — infer test/build commands, confirm with the user, note the miss, suggest creating one, instead of undefined behavior. - Trimmed adjacent prose to stay within the SKILL.md line budget.
1 parent c15b65f commit e59cc46

2 files changed

Lines changed: 21 additions & 13 deletions

File tree

agents/red-team.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,23 @@ on the side of surfacing during the find phase.
5656

5757
## Phase 0 — Gather the diff
5858

59-
Determine the review scope:
59+
Determine the review scope. If the task prompt named an explicit target —
60+
a PR number, branch, or file path — review that.
6061

61-
- Run `git diff @{upstream}...HEAD` (or `git diff main...HEAD` /
62+
Otherwise obtain the diff from the project's version control. Commands below
63+
are for git (the common case); if the repo uses another VCS (hg, jj,
64+
Perforce) or no VCS at all, substitute the equivalent, and if you can't
65+
determine the changed set, ask the caller for the changed-file list or a
66+
diff range rather than guessing.
67+
68+
- git: run `git diff @{upstream}...HEAD` (or `git diff main...HEAD` /
6269
`git diff HEAD~1` if there's no upstream) to get the committed diff.
6370
- If there are uncommitted changes, or the range diff is empty, also run
6471
`git diff HEAD` and include the working-tree changes — review often runs
6572
before the commit.
66-
- If a tracker path, PR number, branch, or file path was passed in the task
67-
prompt, review that target instead.
73+
74+
A tracker or plan path passed in the prompt is **context, not the review
75+
target** — read it (see below), but review the code diff, not the JSON.
6876

6977
Treat this diff as the review scope. Bugs in **unchanged lines of a touched
7078
function** are in scope — the change re-exposes or fails to fix them.

skills/implement/SKILL.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,26 +100,26 @@ back summaries, keeping your main context clean for implementation.
100100
- Research platform-specific handling and conventions
101101
- Check official documentation for frameworks in use
102102
- Check changelogs and migration guides for your dependency
103-
versions — APIs may behave differently across major/minor
104-
releases (e.g., a method that re-runs in v1.0 may only
105-
recompose in v1.1)
103+
versions — APIs may behave differently across releases
106104
- Identify relevant specs (RFCs, W3C, language specs)
107105
- Note platform-specific quirks and edge cases
108106

109107
### 1.4 Check Project Architecture Patterns
110108

111-
Verify alignment with the project's established architecture.
112-
Refer to `PROJECT.md` for project-specific patterns.
109+
Load `PROJECT.md` for build/test/lint commands, architecture rules,
110+
standards, and blindspots, and verify the change aligns with them. If it's
111+
absent or only template placeholders (`YOUR_*_HERE`), proceed without it:
112+
infer the test/build commands from the project (build files, CI config,
113+
`Makefile`), confirm them with the user before relying on them in Phase 3+,
114+
note the miss in the tracker, and suggest creating one.
113115

114116
Common patterns to verify:
115117

116118
- **Layered architecture** respected (UI -> Domain -> Data)
117119
- **Repository/service boundaries** not bypassed
118-
- **Test double strategy** matches project convention
119-
(fakes vs mocks vs stubs)
120+
- **Test double strategy** matches project convention (fakes/mocks/stubs)
120121
- **Dependency injection** bindings exist for new dependencies
121-
- **Type safety** enforced where the project expects it
122-
(sealed types, enums, branded types)
122+
- **Type safety** enforced where expected (sealed types, enums, branded)
123123

124124
### 1.5 Verify Signatures and Dependencies
125125

0 commit comments

Comments
 (0)