acstack 0.52.1 → 0.52.3

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.
Files changed (36) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +3 -1
  3. package/agents/codex/task-checker.toml +51 -190
  4. package/agents/codex/task-executor.toml +5 -4
  5. package/agents/codex/test-writer.toml +3 -0
  6. package/agents/task-checker.md +51 -190
  7. package/agents/task-executor.md +5 -4
  8. package/agents/test-writer.md +3 -0
  9. package/assets/terminal-workspace/config.example.yaml +3 -9
  10. package/assets/terminal-workspace/lib/commands.sh +0 -2
  11. package/assets/terminal-workspace/lib/pi-packages.sh +6 -19
  12. package/assets/terminal-workspace/lib/versions.sh +1 -2
  13. package/cli/dist/index.js +1 -1
  14. package/cli/dist/index.js.map +1 -1
  15. package/cli/package.json +1 -1
  16. package/docs/terminal-workspace.md +9 -10
  17. package/docs/workflows.md +6 -1
  18. package/orchestrator/AGENTS.md +38 -17
  19. package/package.json +1 -1
  20. package/pi/agents/task-checker.md +51 -190
  21. package/pi/agents/task-executor.md +5 -4
  22. package/pi/agents/test-writer.md +3 -0
  23. package/pi/extension.ts +4 -4
  24. package/skills/code-review/SKILL.md +3 -0
  25. package/skills/compact-and-continue/SKILL.md +4 -2
  26. package/skills/handoff/SKILL.md +5 -5
  27. package/skills/implement/SKILL.md +6 -4
  28. package/skills/pre-commit-review/SKILL.md +34 -35
  29. package/skills/pre-commit-review/auto-fix.md +12 -12
  30. package/skills/pre-commit-review/interactive.md +12 -5
  31. package/skills/quick-fix/SKILL.md +6 -8
  32. package/skills/terminal-workspace/SKILL.md +1 -1
  33. package/skills/terminal-workspace/components.md +1 -1
  34. package/skills/terminal-workspace/config-choices.md +1 -1
  35. package/skills/terminal-workspace/turn-off-and-update.md +3 -3
  36. package/skills/test-conventions/SKILL.md +2 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pre-commit-review
3
- description: "Deep code quality review of all changes since last commit. Checks for hardcodes, single-source-of-truth violations, scalability issues, edge cases, and project convention drift using dynamic project awareness (living specs, codebase search, surrounding code). Also flags adjacent code rot worth cleaning up. Auto-invocable in two contexts – (1) when working autonomously through a task list and about to commit (e.g., user said \"implement all tasks and commit\"), use --auto-fix mode; (2) when the user manually invokes /commit and this skill has not already run on the current changes, use INTERACTIVE mode (default). Manual invocation via /pre-commit-review also uses interactive mode by default."
3
+ description: "Deep code quality review of all changes since last commit. Checks for hardcodes, single-source-of-truth violations, scalability issues, edge cases, and project convention drift using dynamic project awareness (living specs, codebase search, surrounding code). Reports adjacent cleanup as advisory, requiring user approval before edits. Auto-invocable in two contexts – (1) when working autonomously through a task list and about to commit (e.g., user said \"implement all tasks and commit\"), use --auto-fix mode; (2) when the user manually invokes /commit and this skill has not already run on the current changes, use INTERACTIVE mode (default). Manual invocation via /pre-commit-review also uses interactive mode by default."
4
4
  argument-hint: "[--auto-fix] [scope description]"
5
5
  ---
6
6
 
@@ -42,7 +42,7 @@ LLM decided to commit during autonomous work -> auto-fix.
42
42
  1. SNAPSHOT – collect the diff and understand what changed
43
43
  2. DISCOVER – learn project conventions dynamically
44
44
  3. REVIEW – analyze changes against conventions and requirements
45
- 4. ADJACENT – check surrounding code for related rot
45
+ 4. ADJACENT – note related cleanup encountered during review (advisory)
46
46
  5. REPORT – synthesize findings
47
47
  6. FIX – auto-fix or interactive proposal waves
48
48
  ```
@@ -75,7 +75,9 @@ For nonbehavioral edits, review accuracy and run prose lint when Markdown change
75
75
  ## Step 2: DISCOVER – Learn project conventions (parallel)
76
76
 
77
77
  Follow the shared Implementation discipline in `orchestrator/AGENTS.md` for delegation and required independent review.
78
- Investigate these dimensions directly or through useful delegation.
78
+ Investigate relevant dimensions directly or through useful delegation.
79
+ Bound each review to changed behavior, connected risks, and the question assigned.
80
+ Reuse valid check evidence under the shared policy instead of repeating completion commands.
79
81
  Discover current conventions rather than hardcoding them.
80
82
 
81
83
  Read `../../output-styles/ac-writing-style.md` relative to this skill directory; apply its shared standard to code design as well as explanations.
@@ -95,9 +97,8 @@ Report: list of project conventions and patterns relevant to these changes.
95
97
 
96
98
  ```
97
99
  Search the codebase for established patterns related to the changes.
98
- For each changed function/component, search for similar implementations:
99
- Search for function signatures, class names, and patterns from the diff
100
- Find files with similar naming conventions
100
+ When conventions are unclear, search for representative implementations related to the change.
101
+ Reuse patterns already established in this review rather than repeating discovery for every function.
101
102
  Identify: how does the rest of the codebase handle similar things?
102
103
  Report: established patterns, common approaches, naming conventions observed.
103
104
  ```
@@ -106,8 +107,9 @@ Report: established patterns, common approaches, naming conventions observed.
106
107
 
107
108
  ```
108
109
  For each changed file, read:
109
- - The full file (to see surrounding code context)
110
- - Connected callers and dependencies (read beyond signatures where needed to understand responsibilities and interface costs)
110
+ - Changed bodies and surrounding context needed to understand them
111
+ - Connected callers and dependencies needed to assess responsibilities, interface costs, and plausible failures
112
+ - Expand to full files or wider paths when findings justify it
111
113
  - Config that governs this area (linter rules, compiler config, etc.)
112
114
  Report: local conventions, related code patterns, existing abstractions nearby.
113
115
  ```
@@ -116,7 +118,8 @@ Synthesize findings into a convention profile for the review.
116
118
 
117
119
  ## Step 3: REVIEW – Analyze changes (parallel)
118
120
 
119
- Review every dimension below, directly or through useful delegation.
121
+ Assess which dimensions below apply, then review them to the depth justified by plausible failures.
122
+ Keep deep scrutiny for affected auth, security, resource lifecycle, concurrency, and performance paths; do not apply unrelated categories mechanically.
120
123
  Give delegated reviewers the diff and the convention profile from Step 2.
121
124
  Assess coverage against requirements instead of assuming a task-checker already assessed it.
122
125
 
@@ -146,10 +149,12 @@ Examine the diff for:
146
149
  - Missing useful boundaries or pass-through layers that add no useful boundary
147
150
  - Complex conditionals that could be simplified
148
151
  - Code that would be hard for a new developer to understand
149
- - Performance concerns (N+1 queries, unnecessary re-renders, blocking I/O)
152
+ - Performance concerns (N+1 queries, unnecessary re-renders, blocking I/O, unbounded memory or work)
153
+ - Resource lifecycle failures (leaked handles, listeners, subscriptions, or tasks; missing cleanup or cancellation)
150
154
 
151
155
  Do not require nesting or wrappers; neither line count nor indirection measures design quality.
152
156
  Support design findings with effects on connected callers and dependencies.
157
+ Ask whether callers need fewer facts, each rule has one owner, and the interface hides complexity rather than relocating it.
153
158
 
154
159
  For each finding, report:
155
160
  FILE:LINE | SEVERITY (MUST/SHOULD/CONSIDER) | WHAT | WHY | SUGGESTED FIX
@@ -183,48 +188,42 @@ The lint exits 0 even when it reports findings. It groups findings by file with
183
188
 
184
189
  Review each warning in context before treating it as a defect. Preserve necessary technical terms, quotations, and wording that would lose accuracy if changed. Report confirmed clarity or convention problems as `SHOULD | PROSE`, with the `file:line` and their effect on the reader.
185
190
 
186
- ## Step 4: ADJACENT – Check surrounding code for rot
191
+ ## Step 4: ADJACENT – Report cleanup as advisory
187
192
 
188
- For each file with findings, examine the surrounding code and immediate imports for related issues.
189
- Delegate when useful, with non-overlapping scopes.
193
+ Note closely related cleanup encountered while reviewing connected code. Do not launch
194
+ an extra scan of whole files and imports solely to find more work.
190
195
 
191
- ```
192
- File [path] has these issues in the changed code: [summary].
193
- Read the FULL file and its direct imports.
194
- Find any OTHER instances of the same categories of problem in this file
195
- or closely related files – even if they weren't part of this commit's changes.
196
- These are "while we're here" cleanup opportunities.
196
+ Report as: `ADVISORY | ADJACENT | FILE:LINE | WHAT | WHY | SUGGESTED FIX`.
197
+ Keep these suggestions separate from delivery-blocking findings. Neither review mode
198
+ authorizes adjacent edits by default, including `--auto-fix`.
197
199
 
198
- Report as: ADJACENT | FILE:LINE | WHAT | WHY | SUGGESTED FIX
199
- ```
200
+ If cleanup is worth doing, ask the user whether to add it to scope. Approved work may
201
+ run in parallel on non-overlapping files or isolated worktrees; do not make it a
202
+ dependency of the main change. Never run conflicting writers in the same checkout.
200
203
 
201
- Only flag adjacent issues that are **closely related** to the current changes (same file,
202
- same module, or same pattern). Stay narrowly scoped.
204
+ A defect that prevents requested behavior or exposes a consequential risk is not
205
+ merely cleanup. Classify it by impact and fix it within scope or report the blocker.
203
206
 
204
207
  ## Step 5: REPORT – Synthesize findings
205
208
 
206
- Merge all findings. Deduplicate. Sort by:
209
+ Deduplicate in-scope findings and sort by:
207
210
 
208
211
  1. MUST FIX (correctness, security, will-break-in-prod)
209
212
  2. SHOULD FIX (convention violations, readability, maintainability)
210
- 3. CONSIDER (style preferences, minor improvements, adjacent rot)
213
+ 3. CONSIDER (style preferences, minor improvements)
211
214
 
212
- For each finding, make sure it has:
215
+ Keep adjacent suggestions in a separate advisory list using Step 4's format.
216
+ For each in-scope finding, make sure it has:
213
217
 
214
218
  - `file:line` reference
215
- - Category tag (HARDCODE, SSOT, SCALABILITY, READABILITY, EDGE-CASE, PROSE, ADJACENT)
219
+ - Category tag (HARDCODE, SSOT, SCALABILITY, READABILITY, EDGE-CASE, PROSE)
216
220
  - Severity (MUST / SHOULD / CONSIDER)
217
221
  - Clear 1-sentence description of the problem
218
222
  - Why it matters (1 sentence)
219
223
  - Suggested fix (concrete, actionable – code snippet or approach)
220
224
 
221
- If a finding needs deeper analysis, investigate directly or delegate with this brief:
222
-
223
- ```
224
- This code has [problem]. The file is [path]. Here's the surrounding context: [context].
225
- Think through 2-3 possible fixes, evaluate trade-offs, and recommend the best approach.
226
- Consider: does a fix here require changes in other files? What's the minimal change?
227
- ```
225
+ For deeper analysis, investigate directly or delegate the problem, file, and context.
226
+ Compare useful alternatives and recommend the smallest complete fix, including affected callers.
228
227
 
229
228
  ## Step 6: FIX – Auto-fix or interactive waves
230
229
 
@@ -237,7 +236,7 @@ Consider: does a fix here require changes in other files? What's the minimal cha
237
236
  | -------- | ------------------------------------------------------ | ------------------------------------------------------------------ |
238
237
  | MUST | Will cause bugs, security issues, or prod failures | Hardcoded secrets, unhandled null on critical path, race condition |
239
238
  | SHOULD | Violates conventions, hurts maintainability, tech debt | SSOT violations, unclear naming, missing error handling on I/O |
240
- | CONSIDER | Improvement opportunity, not urgent | Adjacent rot, minor style, could-be-cleaner patterns |
239
+ | CONSIDER | In-scope improvement opportunity, not urgent | Minor style, could-be-cleaner patterns |
241
240
 
242
241
  ## Review responsibilities and tool checks
243
242
 
@@ -2,18 +2,18 @@
2
2
 
3
3
  Step 6 of `SKILL.md` in auto-fix mode.
4
4
 
5
- For each finding (MUST first, then SHOULD, then CONSIDER):
5
+ Fix in-scope findings (MUST first, then SHOULD, then CONSIDER). Adjacent cleanup
6
+ stays advisory unless the user approves it; auto-fix is not approval to expand scope.
6
7
 
7
- 1. Apply the shared Implementation discipline in `orchestrator/AGENTS.md` to the finding, directly or through a task-executor
8
- 2. Verify the fix doesn't break anything (run lint, typecheck, and test commands from project.yaml)
9
- 3. If fix breaks something, revert and try alternate approach
10
- 4. Move to next finding
8
+ 1. Apply the shared Implementation discipline in `orchestrator/AGENTS.md`, directly or through a task-executor
9
+ 2. Run focused checks for the fix and affected behavior
10
+ 3. If the fix breaks something, revert only your own conflicting changes and try another approach
11
+ 4. Move to the next finding
11
12
 
12
- After all fixes, run full verification using commands from `.acstack/project.yaml`:
13
+ One verification owner gathers required completion evidence for the final revision,
14
+ reusing valid results under Build verification in `orchestrator/AGENTS.md`.
15
+ Do not repeat all completion commands for every finding.
16
+ Approved adjacent work may run in parallel with non-overlapping ownership or isolated
17
+ worktrees, without blocking the main change.
13
18
 
14
- ```bash
15
- # Run the project's configured test, lint, and typecheck commands
16
- # Read these from project.yaml – do not hardcode
17
- ```
18
-
19
- Report a summary of the fixes.
19
+ Report fixes, evidence, blockers, and advisory suggestions separately.
@@ -2,7 +2,13 @@
2
2
 
3
3
  Step 6 of `SKILL.md` in interactive mode, the default.
4
4
 
5
- Present findings in **waves of up to 4** using the question tool (AskUserQuestion on Claude Code). On a host without one, use a numbered list in chat. Group related findings together.
5
+ Present in-scope findings in **waves of up to 4** using the question tool (AskUserQuestion on Claude Code). On a host without one, use a numbered list in chat. Group related findings together.
6
+
7
+ Keep adjacent suggestions in a separate advisory list, not the required fix waves.
8
+ If one is worth pursuing, ask for explicit approval to add it to scope. "Fix all"
9
+ for the main review does not include that advisory list. Approved cleanup may run
10
+ in parallel with non-overlapping ownership or isolated worktrees, without delaying
11
+ the main change.
6
12
 
7
13
  Format each wave like:
8
14
 
@@ -17,9 +23,9 @@ I found these issues in your changes. For each, choose: FIX / SKIP / DISCUSS
17
23
  Duplicated error handling pattern – same try/catch in 3 functions.
18
24
  Suggested fix: Extract shared wrapper function.
19
25
 
20
- 3. [CONSIDER | ADJACENT] `path/to/component.tsx:88`
21
- Existing code (not your change) has a magic string – should use constant.
22
- Suggested fix: Add constant, use in both places.
26
+ 3. [SHOULD | READABILITY] `path/to/component.tsx:88`
27
+ The new helper exposes parsing state its caller should not need.
28
+ Suggested fix: Return the parsed result and keep parsing state internal.
23
29
 
24
30
  4. [SHOULD | EDGE-CASE] `path/to/manager.py:120`
25
31
  No null check on response before accessing `.status`.
@@ -32,4 +38,5 @@ After user responds:
32
38
 
33
39
  - Fix selected items under the shared Implementation discipline in `orchestrator/AGENTS.md`, directly or through useful delegation
34
40
  - Present next wave if more findings remain
35
- - Continue until all findings addressed or user says "done" / "skip the rest"
41
+ - Continue until all in-scope findings are addressed or the user says "done" / "skip the rest"
42
+ - Use focused checks while fixing; one verification owner gathers final completion evidence under the shared policy, reusing valid results
@@ -94,15 +94,13 @@ Apply the shared policy to the minimal fix.
94
94
 
95
95
  ## Step 6: Verify
96
96
 
97
- Run build verification using commands from `.acstack/project.yaml`:
97
+ Use focused regression checks while fixing. One verification owner gathers the
98
+ required final checks from `.acstack/project.yaml` under Build verification in
99
+ `orchestrator/AGENTS.md`, reusing valid evidence rather than rerunning commands
100
+ for every fix or handoff.
98
101
 
99
- ```bash
100
- # Run the project's configured test, lint, and typecheck commands
101
- # Read these from project.yaml – do not hardcode
102
- ```
103
-
104
- Use the configured frontend gates under the shared policy.
105
- Do not proceed with failed required checks or unverified configured browser behavior.
102
+ Preserve configured frontend gates. Do not claim completion with failed or blocked
103
+ required checks or unverified configured browser behavior.
106
104
 
107
105
 
108
106
  ## Step 7: Report
@@ -67,7 +67,7 @@ above them. Eleven of those sections install thirteen tools between them:
67
67
  - Five tools the user drives day to day: herdr, gh-dash, diffnav, lazygit and harlequin. tuicr joins them once a review starts
68
68
  - Five tools that support them: delta, tuicr, yazi, mermaid-ascii and glow
69
69
  - Two helpers of ACStack's own: acstack-md, and the acstack-clip and acstack-open pair
70
- - The pi coding agent, with ACStack and pi-subagents installed into it
70
+ - The pi coding agent, with ACStack and ac-teams installed into it
71
71
 
72
72
  The twelfth, `neovim`, installs nothing. It writes one file into a neovim config
73
73
  the user already has. `neovim` and `pi` both start off, because each writes into a config the user built.
@@ -13,7 +13,7 @@ Read this file when the user asks what a component does, which key turns it on,
13
13
  | tuicr | Reviews a pull request inside the terminal. | `tuicr.enabled` |
14
14
  | lazygit | Stages, commits, amends and pushes, on one key. | `lazygit.enabled` |
15
15
  | harlequin | A SQL editor in the terminal, on one key. Installed by uv, and launched by acstack-db. | `harlequin.enabled` |
16
- | pi | A coding agent in the terminal, with ACStack, pi-subagents and the user's own pi settings installed into it. Installed by npm, and starts off. | `pi.enabled` |
16
+ | pi | A coding agent in the terminal, with ACStack, ac-teams and the user's own pi settings installed into it. Installed by npm, and starts off. | `pi.enabled` |
17
17
  | neovim | A dot in the LazyVim statusline for a buffer with unsaved changes, and copy over SSH through OSC 52. Installs nothing, writes one file, and starts off. | `neovim.enabled` |
18
18
  | yazi | A file manager, with markdown drawn live by acstack-md. One key sends the hovered file to the machine the user sits at. | `yazi.enabled` |
19
19
  | markdown | Markdown with its mermaid diagrams drawn as text, or served to a browser. Installs acstack-md, mermaid-ascii and glow. | `markdown.enabled` |
@@ -54,7 +54,7 @@ Then ask about these settings, in this order:
54
54
  - Tell such a user to delete their own file to hand the dot to this component
55
55
  - **`pi.enabled`**: off by default. Turn it on for a user who runs pi, the coding agent, or wants ACStack inside it
56
56
  - `apply` installs pi with npm when it is missing, then installs ACStack into it, pinned to this plugin's version
57
- - `apply` always installs `pi-subagents` too, because ACStack on pi cannot launch a subagent without it
57
+ - `apply` always installs `ac-teams` too, for agent delegation, shared tasks, and messaging
58
58
  - `apply` adds one line to pi's context file in `~/.pi/agent` (`AGENTS.md` by default) that lets pi delegate when an ACStack skill says to
59
59
  - `pi.compact_tools` and `pi.agentic_retro` add pi-compact-tools and agentic-retro's pi extension, both on by default
60
60
  - agentic-retro's extension needs the agentic-retro plugin first, and `apply` says so when it is missing
@@ -25,7 +25,7 @@ and leaves the rest of the user's neovim config alone. Neither `disable` nor
25
25
  `pi` undoes only what `apply` added, because pi's config is the user's:
26
26
 
27
27
  - It removes the pi packages `apply` installed, and keeps any the user installed first
28
- - It releases the four settings and `toolActivation`, unless the user has changed one since
28
+ - It releases the settings and keybinding it wrote, unless the user has changed one since
29
29
  - A value `apply` replaced goes back to what the user had, and a key `apply` added goes
30
30
  - It puts back an ACStack pin `apply` moved forward, unless the user has moved it since
31
31
  - It removes the delegation block from pi's context file, and the user's text stays byte for byte
@@ -84,8 +84,8 @@ bash "$SETUP" upgrade yazi delta # only these
84
84
 
85
85
  pi adds four rows of its own:
86
86
 
87
- - `pi`, `pi-subagents` and `pi-compact-tools` compare against npm, and `upgrade` runs `pi update` for each
88
- - A package the user pinned, such as `npm:pi-subagents@1.0.0`, reports `unknown`, because `pi update` never moves it
87
+ - `pi`, `ac-teams` and `pi-compact-tools` compare against npm, and `upgrade` runs `pi update` for each
88
+ - A package the user pinned, such as `npm:ac-teams@1.0.0`, reports `unknown`, because `pi update` never moves it
89
89
  - `pi-acstack` compares ACStack's pin in pi against this plugin's version, with no network at all
90
90
  - `upgrade pi-acstack` moves the pin forward, and so does `apply`
91
91
  - Neither moves a pin newer than this plugin, because the user chose it
@@ -24,8 +24,8 @@ Mirror the source directory structure. Example: `src/auth/sessions.py` → `test
24
24
  - Cross-cutting integration tests → `<tests-dir>/integration/`
25
25
  - Shared fixtures → `<tests-dir>/conftest.py` (Python) or shared setup files
26
26
  - Use markers for slow/integration tests (configured in `test_markers.exclude`)
27
- - Run with the `commands.test` command from project.yaml
28
- - Baseline: `.acstack/.test-baseline` – count must never drop
27
+ - Use the project's test runner for focused checks; the verification owner gathers full completion evidence under `orchestrator/AGENTS.md`
28
+ - When test collection is configured, compare `.acstack/.test-baseline` if present; investigate removed coverage and honor project baseline requirements
29
29
 
30
30
  ## Layer 2: Frontend Unit Tests
31
31