acstack 0.50.3 → 0.51.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.
Files changed (113) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +14 -7
  3. package/agents/codex/frontend-verifier.toml +89 -6
  4. package/agents/codex/task-checker.toml +83 -2
  5. package/agents/codex/task-executor.toml +83 -1
  6. package/agents/codex/test-writer.toml +77 -1
  7. package/agents/frontend-verifier.md +13 -6
  8. package/agents/task-checker.md +7 -2
  9. package/agents/task-executor.md +7 -1
  10. package/agents/test-writer.md +1 -1
  11. package/assets/terminal-workspace/config.example.yaml +1 -1
  12. package/assets/terminal-workspace/helpers/acstack-md +12 -4
  13. package/assets/terminal-workspace/helpers/acstack-open +10 -2
  14. package/assets/terminal-workspace/lib/apply-yazi.sh +25 -0
  15. package/cli/dist/index.js +10142 -9369
  16. package/cli/dist/index.js.map +4 -4
  17. package/cli/package.json +1 -1
  18. package/docs/config-reference.md +113 -14
  19. package/docs/dev-setups.md +4 -4
  20. package/docs/terminal-workspace-keys.md +1 -0
  21. package/docs/terminal-workspace.md +1 -1
  22. package/docs/workflows.md +22 -16
  23. package/examples/design-doc/acstack/README.md +273 -0
  24. package/examples/design-doc/acstack/acstack.yaml +4 -0
  25. package/examples/design-doc/acstack/cli.yaml +5 -0
  26. package/examples/design-doc/acstack/design.yaml +39 -0
  27. package/examples/design-doc/acstack/github.yaml +12 -0
  28. package/examples/design-doc/acstack/host.yaml +14 -0
  29. package/examples/design-doc/acstack/journey.md +85 -0
  30. package/examples/design-doc/acstack/publication.md +16 -0
  31. package/examples/design-doc/acstack/review-runtime.yaml +24 -0
  32. package/examples/design-doc/acstack/skills.yaml +22 -0
  33. package/examples/design-doc/acstack/store.yaml +11 -0
  34. package/examples/design-doc/acstack/user.yaml +15 -0
  35. package/examples/design-doc/acstack/viewer.yaml +13 -0
  36. package/hooks/ac-writing-style-reminder.sh +7 -18
  37. package/hooks/communication-standard.mjs +17 -0
  38. package/hooks/communication-standard.sh +6 -0
  39. package/hooks/context-pressure.sh +2 -2
  40. package/hooks/hooks.json +18 -0
  41. package/hooks/lib/communication-standard.mjs +16 -0
  42. package/hooks/project-data.sh +38 -0
  43. package/hooks/session-start-handoff.sh +21 -7
  44. package/hooks/session-start.sh +9 -2
  45. package/orchestrator/AGENTS.md +25 -14
  46. package/output-styles/ac-writing-style.md +75 -276
  47. package/package.json +2 -1
  48. package/pi/agents/frontend-verifier.md +89 -6
  49. package/pi/agents/task-checker.md +83 -2
  50. package/pi/agents/task-executor.md +83 -1
  51. package/pi/agents/test-writer.md +77 -1
  52. package/pi/extension.ts +70 -12
  53. package/profiles/fullstack-python.yaml +1 -1
  54. package/profiles/node-typescript.yaml +1 -1
  55. package/profiles/python.yaml +1 -1
  56. package/skills/archive/SKILL.md +53 -36
  57. package/skills/bootstrap/SKILL.md +6 -6
  58. package/skills/bridge/SKILL-VM.md +11 -2
  59. package/skills/bridge/SKILL-WINDOWS.md +3 -3
  60. package/skills/browser-verify/SKILL.md +14 -5
  61. package/skills/code-review/SKILL.md +8 -2
  62. package/skills/commit/SKILL.md +7 -6
  63. package/skills/compact-and-continue/SKILL.md +9 -8
  64. package/skills/design-doc/SKILL.md +235 -0
  65. package/skills/explore/SKILL.md +1 -1
  66. package/skills/grilling/SKILL.md +4 -4
  67. package/skills/handoff/SKILL.md +4 -4
  68. package/skills/host/SKILL.md +1 -1
  69. package/skills/host/detect-host.sh +2 -2
  70. package/skills/host/notes.md +2 -2
  71. package/skills/host/questions.md +1 -1
  72. package/skills/implement/SKILL.md +20 -13
  73. package/skills/implement/decision-log.md +9 -8
  74. package/skills/implement/design-pass.md +16 -2
  75. package/skills/map/SKILL.md +15 -71
  76. package/skills/map/alignment.md +18 -27
  77. package/skills/map/frontend.md +1 -1
  78. package/skills/map/materialising.md +74 -0
  79. package/skills/map/trackers/files.md +4 -6
  80. package/skills/pre-commit-review/SKILL.md +15 -9
  81. package/skills/pre-commit-review/auto-fix.md +1 -1
  82. package/skills/quick-fix/SKILL.md +1 -1
  83. package/skills/record-context/SKILL.md +6 -6
  84. package/skills/setup/SKILL.md +15 -50
  85. package/skills/setup/browser.md +2 -2
  86. package/skills/setup/first-run.md +19 -8
  87. package/skills/setup/report.md +3 -2
  88. package/skills/setup/row-fixes.md +56 -9
  89. package/skills/sync/SKILL.md +12 -11
  90. package/skills/terminal-workspace/SKILL.md +2 -1
  91. package/skills/test-conventions/SKILL.md +2 -2
  92. package/skills/visual-docs/SKILL.md +69 -235
  93. package/skills/writing/SKILL.md +29 -217
  94. package/skills/writing/examples.md +62 -129
  95. package/docs/adr/0001-ste-writing-standard.md +0 -16
  96. package/docs/adr/0002-version-gate-not-auto-bump.md +0 -35
  97. package/docs/adr/0003-handoff-ack-command.md +0 -19
  98. package/docs/adr/0004-dev-setup-per-host.md +0 -13
  99. package/docs/adr/0005-two-orchestrators-per-host.md +0 -25
  100. package/docs/adr/0006-document-opener-service.md +0 -89
  101. package/docs/adr/0007-lead-check-reads-the-transcript.md +0 -87
  102. package/docs/adr/0008-cli-audits-skill-interviews.md +0 -37
  103. package/docs/adr/0009-verify-the-write-not-the-writer.md +0 -51
  104. package/docs/adr/0010-promote-dev-to-main-by-fast-forward.md +0 -115
  105. package/docs/adr/0011-node-header-is-the-edge-encoding.md +0 -20
  106. package/docs/adr/0012-node-kind-is-a-closed-set-of-five.md +0 -31
  107. package/docs/adr/0013-the-diagram-renderer-is-pure.md +0 -23
  108. package/docs/adr/0014-reading-a-node-hides-its-generated-diagram.md +0 -29
  109. package/docs/adr/0015-a-node-id-links-to-its-issue-through-an-anchor.md +0 -37
  110. package/docs/adr/0016-the-map-root-carries-no-status-of-its-own.md +0 -21
  111. package/docs/adr/0017-call-impeccable-copy-only-its-questions.md +0 -13
  112. package/docs/adr/0018-alignment-packs-use-local-viewers.md +0 -11
  113. package/docs/adr/index.md +0 -18
@@ -23,7 +23,7 @@ You write tests from requirements and application programming interface (API) co
23
23
 
24
24
  ## Project configuration
25
25
 
26
- Read `acstack/project.yaml` for project-specific settings:
26
+ Read `.acstack/project.yaml` for project-specific settings:
27
27
 
28
28
  - `directories.tests` – where to create test files
29
29
  - `directories.source` – source code root (for mirroring structure)
@@ -3,7 +3,7 @@
3
3
  # setup.sh apply.
4
4
  #
5
5
  # This is machine-level, not per-project. It installs binaries and writes
6
- # keybindings for your user, so it does not belong in acstack/project.yaml.
6
+ # keybindings for your user, so it does not belong in .acstack/project.yaml.
7
7
  #
8
8
  # What each component is, every key, and the traps worth knowing:
9
9
  # docs/terminal-workspace.md in the ACStack plugin.
@@ -222,11 +222,19 @@ case "$(command -v acstack-open >/dev/null 2>&1 && acstack-open --why 2>/dev/nul
222
222
  # The last expression is the page title, so the browser answers with
223
223
  # what it is now holding. That answer is what success means here - a
224
224
  # command that exited 0 is not a page that arrived.
225
+ project_root="$PWD"
226
+ while [ "$project_root" != / ] && [ ! -d "$project_root/.acstack" ]; do
227
+ project_root=$(dirname "$project_root")
228
+ done
229
+ [ "$project_root" != / ] || project_root=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
230
+ browser_config="$project_root/.acstack/agent-browser.json"
231
+ browser_args=()
232
+ [ ! -f "$browser_config" ] || browser_args=(--config "$browser_config")
225
233
  name=$(basename "$FILE")
226
- timeout 20 agent-browser --cdp "$BRIDGE" tab new >/dev/null 2>&1
234
+ timeout 20 agent-browser "${browser_args[@]}" --cdp "$BRIDGE" tab new >/dev/null 2>&1
227
235
  landed=$(printf 'const b64="%s";const doc=new TextDecoder().decode(Uint8Array.from(atob(b64),c=>c.charCodeAt(0)));document.open();document.write(doc);document.close();document.title;\n' \
228
236
  "$payload" \
229
- | timeout 60 agent-browser --cdp "$BRIDGE" eval --stdin 2>/dev/null)
237
+ | timeout 60 agent-browser "${browser_args[@]}" --cdp "$BRIDGE" eval --stdin 2>/dev/null)
230
238
  # Writing into the tab is only half of it. A tab created over CDP is
231
239
  # created in the background, so it has to be brought forward or the page
232
240
  # is real, correct, and never seen - which is exactly how this first went
@@ -236,10 +244,10 @@ case "$(command -v acstack-open >/dev/null 2>&1 && acstack-open --why 2>/dev/nul
236
244
  # The arrow marks the active tab, which is the one just written into.
237
245
  # Taking the first line instead would raise whatever sits at index 0 -
238
246
  # somebody else's tab, and the page still unseen.
239
- idx=$(timeout 20 agent-browser --cdp "$BRIDGE" tab list 2>/dev/null \
247
+ idx=$(timeout 20 agent-browser "${browser_args[@]}" --cdp "$BRIDGE" tab list 2>/dev/null \
240
248
  | grep -m1 -- "$(printf '\342\206\222')" \
241
249
  | sed -n 's/.*\[\([0-9][0-9]*\)\].*/\1/p')
242
- [ -n "$idx" ] && timeout 20 agent-browser --cdp "$BRIDGE" tab "$idx" >/dev/null 2>&1
250
+ [ -n "$idx" ] && timeout 20 agent-browser "${browser_args[@]}" --cdp "$BRIDGE" tab "$idx" >/dev/null 2>&1
243
251
  case "$landed" in
244
252
  *"$name"*)
245
253
  printf '%s is on screen in the browser on your machine\n' "$name" >&2
@@ -191,8 +191,16 @@ case "$ROUTE" in
191
191
  # That also means the new tab becomes the active one for any agent
192
192
  # driving that browser. ACSTACK_OPEN_BRIDGE=off trades the one-key open
193
193
  # for never touching it.
194
- if timeout 20 agent-browser --cdp "$BRIDGE" tab new >/dev/null 2>&1 \
195
- && timeout 30 agent-browser --cdp "$BRIDGE" open "$URL" >/dev/null 2>&1; then
194
+ project_root="$PWD"
195
+ while [ "$project_root" != / ] && [ ! -d "$project_root/.acstack" ]; do
196
+ project_root=$(dirname "$project_root")
197
+ done
198
+ [ "$project_root" != / ] || project_root=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
199
+ browser_config="$project_root/.acstack/agent-browser.json"
200
+ browser_args=()
201
+ [ ! -f "$browser_config" ] || browser_args=(--config "$browser_config")
202
+ if timeout 20 agent-browser "${browser_args[@]}" --cdp "$BRIDGE" tab new >/dev/null 2>&1 \
203
+ && timeout 30 agent-browser "${browser_args[@]}" --cdp "$BRIDGE" open "$URL" >/dev/null 2>&1; then
196
204
  log "bridge $BRIDGE: $URL"
197
205
  exit 0
198
206
  fi
@@ -288,11 +288,36 @@ def drop_claimed(t):
288
288
  return "\n".join(out)
289
289
 
290
290
 
291
+ def inspect_available(t):
292
+ # Preserve custom bindings, including sequences beginning with i.
293
+ if "i" in CLAIMED or tomllib is None:
294
+ return False
295
+ try:
296
+ data = tomllib.loads(t)
297
+ except ValueError:
298
+ return False
299
+ for section in ("mgr", "manager"):
300
+ for name in ("prepend_keymap", "keymap", "append_keymap"):
301
+ for binding in data.get(section, {}).get(name, []):
302
+ on = binding.get("on", [])
303
+ if on == "i" or isinstance(on, list) and on[:1] == ["i"]:
304
+ return False
305
+ return True
306
+
307
+
291
308
  parts = []
292
309
  if not claimed(text):
293
310
  # A binding conceded below is one this script never writes, so the user's
294
311
  # own must survive. Only strip when the bindings are actually going in.
312
+ inspect = inspect_available(text)
295
313
  text = drop_claimed(text)
314
+ if inspect:
315
+ parts.append(
316
+ "[[mgr.prepend_keymap]]\n"
317
+ 'on = "i"\n'
318
+ """run = 'shell --block -- case %h in *.[mM][dD]|*.[mM][aA][rR][kK][dD][oO][wW][nN]) frogmouth -- %h ;; esac'\n"""
319
+ 'desc = "Inspect Markdown in Frogmouth"'
320
+ )
296
321
  # %h is the hovered file. $0 and $@ are not: yazi runs the template through
297
322
  # a shell, where $0 names the shell itself and $@ is empty - both measured,
298
323
  # and both would open the browser on nothing at all.