@brainervirus/workit-claude-code 7.3.0 → 7.4.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/plugin.json +1 -1
- package/dist/workit-hook.js +29 -30
- package/dist/workit.js +512 -190
- package/package.json +3 -3
- package/skills/retro/SKILL.md +72 -0
- package/skills/retro/agents/openai.yaml +3 -0
- package/skills/retro/references/sources.md +35 -0
- package/skills/retro/references/steering.md +39 -0
- package/skills/review/SKILL.md +3 -2
- package/skills/shape/references/knowledge.md +3 -0
- package/skills/ship/SKILL.md +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-claude-code",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Claude Code plugin — session and per-turn task context, branch policy on git shell commands, workit method skills, and verifier/reviewer/implementer agents",
|
|
6
6
|
"keywords": [
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"build": "bun scripts/build.ts"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@brainervirus/workit-cli": "^7.
|
|
43
|
-
"@brainervirus/workit-core": "^7.
|
|
42
|
+
"@brainervirus/workit-cli": "^7.4.0",
|
|
43
|
+
"@brainervirus/workit-core": "^7.4.0"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=24"
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: retro
|
|
3
|
+
description: Find repeated friction in recent sessions; propose cited fixes ranked by enforcer strength, never applied. Use for retro.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Retro: turn repeated friction into enforcers
|
|
8
|
+
|
|
9
|
+
User-invoked: offer it, never start it yourself. Run it after a session, PR,
|
|
10
|
+
stack or fan-in, including ones that went well; a smooth session still shows
|
|
11
|
+
where agents searched too long, worked around a tool or re-ran a check. Retro
|
|
12
|
+
proposes and stops. Nothing changes until the user approves.
|
|
13
|
+
|
|
14
|
+
1. **Scope.** Default: this repository's work since the last retro (its
|
|
15
|
+
`retro:` row in `workit ledger list --type decision`), else the last ~10
|
|
16
|
+
sessions. State the window in one line.
|
|
17
|
+
2. **Read through workit, cheapest first.** Every finding cites these:
|
|
18
|
+
- `workit ledger list --last 200`: rulings (ambiguities the agent had to
|
|
19
|
+
settle), failed or self verdicts, handoffs, check runs, CI reruns.
|
|
20
|
+
- `workit pr status --pr <n>` for each recent PR: threads, failing checks.
|
|
21
|
+
- `git log --oneline -50`, plus reverts and fixups after review.
|
|
22
|
+
- `workit knowledge lint`: today's AGENTS.md and need-based files.
|
|
23
|
+
- Session transcripts **only if the user opts in**, and only this
|
|
24
|
+
workspace's (`references/sources.md`). Never read other projects.
|
|
25
|
+
|
|
26
|
+
Cite by location (ledger row, PR, commit, session file and line). Never
|
|
27
|
+
copy secrets, tokens or personal data from any source into the report.
|
|
28
|
+
3. **Group into classes.** Navigation cost (many searches before the right
|
|
29
|
+
file, a stale doc followed), repeated mistakes, workarounds (a hand-run
|
|
30
|
+
command where a verb exists, a skipped step), unstable checks (the same
|
|
31
|
+
`workit check <name>` red then green with no change). A class needs **2 or
|
|
32
|
+
more cited occurrences**; a one-off is not a learning.
|
|
33
|
+
4. **Name the strongest enforcer that works**, strongest first: architecture
|
|
34
|
+
or types (the mistake cannot be written) > lint rule > configured check
|
|
35
|
+
(`workit.checks.json`, `workit check <name>`) or CI job > test >
|
|
36
|
+
`CODING_STANDARDS.md` (judgment the reviewer reads) > AGENTS.md pointer
|
|
37
|
+
(navigation only). A mechanical rule gets a check, not prose: a check can
|
|
38
|
+
fail, a sentence cannot. From types to test, the proof is that the new
|
|
39
|
+
enforcer fails on the cited past mistake. A rule whose mistake can no
|
|
40
|
+
longer happen is deleted.
|
|
41
|
+
5. **Upstream.** When a workit skill, verb or hook caused the friction,
|
|
42
|
+
propose an issue or PR on BrainerVirus/workit. Never fork a local copy.
|
|
43
|
+
The issue shows the workit behavior in a minimal synthetic reproduction:
|
|
44
|
+
no private repo name, path, code, ledger text, PR or thread quote, or
|
|
45
|
+
transcript. Show the exact draft body; file it only after the user approves.
|
|
46
|
+
6. **Bloat guards.** AGENTS.md stays within 8 KB: each addition names what it
|
|
47
|
+
removes. Create `CODING_STANDARDS.md` or `GLOSSARY.md` only in the same
|
|
48
|
+
edit as its first real entry, never as a scaffold. Edit steering text by
|
|
49
|
+
`references/steering.md`; `workit knowledge lint` passes after the slice.
|
|
50
|
+
7. **Report one ranked list, then stop:** Accepted (proposed), Backlog,
|
|
51
|
+
Dropped, each with its citations, enforcer and reason. Each approved item
|
|
52
|
+
becomes a normal slice (workit-implement, then workit-ship), a tracker
|
|
53
|
+
issue, or `.out-of-scope/<concept>.md` when rejected and likely to return.
|
|
54
|
+
Record the user's answer so the next retro starts there:
|
|
55
|
+
`workit ledger decision "retro: <accepted ids>" --why "<window>"`.
|
|
56
|
+
|
|
57
|
+
## Example
|
|
58
|
+
|
|
59
|
+
Bad: "Agents seem lost in the build. Added 'read the build docs carefully' to
|
|
60
|
+
AGENTS.md." One vague occurrence, no citation, a no-op line, auto-applied.
|
|
61
|
+
|
|
62
|
+
Good: "Navigation, 3 occurrences (rulings 12, 19; PR #88 thread): agents sought
|
|
63
|
+
check names in package.json, missing `workit.checks.json`. Enforcer: AGENTS.md
|
|
64
|
+
pointer, +74 bytes, minus the stale Commands paragraph (-210). Unstable check,
|
|
65
|
+
2 occurrences (ledger rows 31, 44: `e2e` red then green on one SHA): a debug
|
|
66
|
+
slice to fix the check. Approve?"
|
|
67
|
+
|
|
68
|
+
## Check
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
workit knowledge lint # exit 0 before and after each approved slice
|
|
72
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Session transcripts (opt-in, this workspace only)
|
|
2
|
+
|
|
3
|
+
Transcripts are the most expensive source and can hold private material. Read
|
|
4
|
+
them only after the user says yes to a question such as "Also read the last 10
|
|
5
|
+
session transcripts for this workspace? (local files, read-only)". The default
|
|
6
|
+
is no: the ledger, `pr status` and git are enough for most retros.
|
|
7
|
+
|
|
8
|
+
## Where they live
|
|
9
|
+
|
|
10
|
+
Typical locations; confirm each exists. Resolve the path from this workspace's
|
|
11
|
+
absolute path, never with a wildcard across projects. If a host's layout
|
|
12
|
+
differs from the one below, say so and skip it rather than search wider.
|
|
13
|
+
|
|
14
|
+
| Host | Location |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Claude Code | `~/.claude/projects/<folder>/*.jsonl`, one folder per path from `git worktree list`: the absolute path with every `/` and `.` replaced by `-`. Compute each folder name; never glob for it |
|
|
17
|
+
| Codex | `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl`. To filter, parse only line 1 (`session_meta`) and read only its `cwd` field; skip files whose `cwd` is not this workspace without reading or reporting anything else from them |
|
|
18
|
+
| Cursor | `~/.cursor/projects/<workspace slug>/agent-transcripts/` |
|
|
19
|
+
| Pi | `~/.pi/agent/sessions/--<workspace path, / replaced by ->--/*.jsonl` |
|
|
20
|
+
| OpenCode | this project's sessions from `opencode session list`, read with `opencode export <id>` |
|
|
21
|
+
|
|
22
|
+
Linked worktrees of the same repository count as this workspace; other
|
|
23
|
+
repositories never do.
|
|
24
|
+
|
|
25
|
+
## How to read them
|
|
26
|
+
|
|
27
|
+
- Newest first, at most the agreed number of sessions.
|
|
28
|
+
- On a host with subagents, one read-only analyst per lens, each returning
|
|
29
|
+
only cited occurrences (session file plus line or message index):
|
|
30
|
+
- navigation: searches and reads before the right file was found, stale docs
|
|
31
|
+
followed;
|
|
32
|
+
- tool economy: hand-run commands where a `workit` verb exists, repeated
|
|
33
|
+
reads of the same file, long outputs nobody used;
|
|
34
|
+
- repeated work: the same fix or check redone, a step undone later;
|
|
35
|
+
- request conflicts: instructions the agent had to reconcile or ask about.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Editing steering text (AGENTS.md, CODING_STANDARDS.md, skills)
|
|
2
|
+
|
|
3
|
+
Steering text is paid for on every session that reads it. Each line must
|
|
4
|
+
change what an agent does; everything else is cost.
|
|
5
|
+
|
|
6
|
+
## Write
|
|
7
|
+
|
|
8
|
+
- **Point, do not copy.** Link the file or name the command; never paste its
|
|
9
|
+
content. A pointer says when to follow it: "Read before editing a hook:
|
|
10
|
+
`docs/agents/hosts.md`".
|
|
11
|
+
- **Say what done looks like.** "Run `bun run check`; it must exit 0" beats
|
|
12
|
+
"make sure everything works".
|
|
13
|
+
- **Concrete over adjectives.** A command, a path, a number. Prefer the action
|
|
14
|
+
to take over a list of things to avoid.
|
|
15
|
+
- **One rule, one home.** A rule with an enforcer (type, lint, check, test)
|
|
16
|
+
appears in steering text at most as a pointer to that enforcer. The same
|
|
17
|
+
sentence in AGENTS.md and CODING_STANDARDS.md is a defect
|
|
18
|
+
(`duplicate-rule`).
|
|
19
|
+
- **Judgment goes to CODING_STANDARDS.md**, which the reviewer reads; only
|
|
20
|
+
navigation goes to AGENTS.md.
|
|
21
|
+
|
|
22
|
+
## Cut
|
|
23
|
+
|
|
24
|
+
- **No-ops.** Delete lines that would not change any behavior if removed:
|
|
25
|
+
"be thorough", "write clean code", "keep it concise", "follow best
|
|
26
|
+
practices".
|
|
27
|
+
- **Session residue.** No notes about one session, no implementation detail
|
|
28
|
+
the code already shows, no `path:line` references (they go stale).
|
|
29
|
+
- **Dead rules.** A rule whose mistake can no longer happen (a type or check
|
|
30
|
+
now prevents it) is deleted, not kept "for context".
|
|
31
|
+
|
|
32
|
+
## Budget
|
|
33
|
+
|
|
34
|
+
- AGENTS.md stays within 8 KB (`workit knowledge lint`, rule
|
|
35
|
+
`agents-budget`). A proposal that adds text names what it removes, or shows
|
|
36
|
+
the byte count still holds.
|
|
37
|
+
- A need-based file (`CODING_STANDARDS.md`, `GLOSSARY.md`) is created in the
|
|
38
|
+
same edit as its first real entry. Headers-only or "TBD" files fail the lint
|
|
39
|
+
(`scaffold-file`).
|
package/skills/review/SKILL.md
CHANGED
|
@@ -18,8 +18,9 @@ independent; `type-check-only` never proves a behavior change.
|
|
|
18
18
|
3. Judge two axes separately, never merged or re-ranked:
|
|
19
19
|
- **Spec:** does the diff do what the acceptance says? Missing, creep or
|
|
20
20
|
wrong; quote the line.
|
|
21
|
-
- **Standards:** repo rules first
|
|
22
|
-
|
|
21
|
+
- **Standards:** repo rules first (`CODING_STANDARDS.md` when present),
|
|
22
|
+
then a smell baseline (unclear name, long function, duplicated logic,
|
|
23
|
+
leaky abstraction). Judgment only; lint owns nits.
|
|
23
24
|
4. **Tests:** `workit test-audit --diff`. Would each new test fail if the
|
|
24
25
|
behavior broke? Triage with workit-test-audit.
|
|
25
26
|
5. **Blast radius:** for each touched contract, caller, config or migration,
|
|
@@ -10,11 +10,14 @@ user asks for one, say which trigger fired, and let the user decline.
|
|
|
10
10
|
| Plan | more than one slice with dependencies, or work that will be resumed by someone else | `docs/<topic>/plan.md`, next to the spec |
|
|
11
11
|
| ADR | the choice is hard to reverse **and** surprising **and** a real trade-off (all three) | `docs/adr/NNNN-<slug>.md` |
|
|
12
12
|
| Glossary entry | a project term was ambiguous and you resolved it | `GLOSSARY.md` (create lazily) |
|
|
13
|
+
| Coding standard | a judgment-call rule a reviewer must check, recurring twice (workit-retro); a mechanical rule gets a check instead | `CODING_STANDARDS.md` (create lazily) |
|
|
13
14
|
| Out of scope | a request was rejected and is likely to come back | `.out-of-scope/<concept>.md` |
|
|
14
15
|
|
|
15
16
|
Never: a spec for a one-file mechanical fix, a plan that restates the spec,
|
|
16
17
|
file paths or line numbers in a spec (they go stale), a glossary entry for a
|
|
17
18
|
general programming term.
|
|
19
|
+
Create a lazy file only in the same edit as its first real entry, never as a
|
|
20
|
+
headers-only or TBD scaffold (`workit knowledge lint` flags one).
|
|
18
21
|
|
|
19
22
|
## Spec (scaled to the work)
|
|
20
23
|
|
package/skills/ship/SKILL.md
CHANGED
|
@@ -53,7 +53,8 @@ the base keeps moving, or after 3 failed fix attempts on the same check.
|
|
|
53
53
|
6. **Verified.** After the last push a non-author records a verdict
|
|
54
54
|
(workit-review); `pr status` showing self-reviewed is not verified. Land only when granted: `workit stack land` (the
|
|
55
55
|
contiguous verified run from the root) or `workit pr merge`.
|
|
56
|
-
7. **Observe it landed:** `workit verify-delivery pr` or `merge`.
|
|
56
|
+
7. **Observe it landed:** `workit verify-delivery pr` or `merge`. At any endpoint
|
|
57
|
+
(stack land, fan-in too), after a failed verdict or a check red 3+ times: offer `/wk-retro`.
|
|
57
58
|
|
|
58
59
|
## Example
|
|
59
60
|
|