@aperant/framework 0.6.4 → 0.6.6
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/CHANGELOG.md +38 -0
- package/README.md +54 -234
- package/agents/apt-improver.md +99 -0
- package/agents/apt-planner.md +115 -10
- package/dist/__test-helpers/run-cmd.d.mts +4 -2
- package/dist/__test-helpers/run-cmd.d.mts.map +1 -1
- package/dist/__test-helpers/run-cmd.mjs +56 -15
- package/dist/__test-helpers/run-cmd.mjs.map +1 -1
- package/dist/cli/ci-watch/lock.d.mts +53 -0
- package/dist/cli/ci-watch/lock.d.mts.map +1 -0
- package/dist/cli/ci-watch/lock.mjs +172 -0
- package/dist/cli/ci-watch/lock.mjs.map +1 -0
- package/dist/cli/ci-watch/state.d.mts +36 -0
- package/dist/cli/ci-watch/state.d.mts.map +1 -0
- package/dist/cli/ci-watch/state.mjs +103 -0
- package/dist/cli/ci-watch/state.mjs.map +1 -0
- package/dist/cli/ci-watch/stop-matrix.d.mts +58 -0
- package/dist/cli/ci-watch/stop-matrix.d.mts.map +1 -0
- package/dist/cli/ci-watch/stop-matrix.mjs +164 -0
- package/dist/cli/ci-watch/stop-matrix.mjs.map +1 -0
- package/dist/cli/cli-wrappers/ci-watch.d.mts +2 -0
- package/dist/cli/cli-wrappers/ci-watch.d.mts.map +1 -0
- package/dist/cli/cli-wrappers/ci-watch.mjs +9 -0
- package/dist/cli/cli-wrappers/ci-watch.mjs.map +1 -0
- package/dist/cli/commands/adr.d.mts +5 -0
- package/dist/cli/commands/adr.d.mts.map +1 -0
- package/dist/cli/commands/adr.mjs +228 -0
- package/dist/cli/commands/adr.mjs.map +1 -0
- package/dist/cli/commands/ci-watch.d.mts +7 -0
- package/dist/cli/commands/ci-watch.d.mts.map +1 -0
- package/dist/cli/commands/ci-watch.mjs +465 -0
- package/dist/cli/commands/ci-watch.mjs.map +1 -0
- package/dist/cli/commands/commit.d.mts.map +1 -1
- package/dist/cli/commands/commit.mjs +25 -8
- package/dist/cli/commands/commit.mjs.map +1 -1
- package/dist/cli/commands/context.d.mts +7 -0
- package/dist/cli/commands/context.d.mts.map +1 -0
- package/dist/cli/commands/context.mjs +224 -0
- package/dist/cli/commands/context.mjs.map +1 -0
- package/dist/cli/commands/event.d.mts.map +1 -1
- package/dist/cli/commands/event.mjs +125 -24
- package/dist/cli/commands/event.mjs.map +1 -1
- package/dist/cli/commands/host-detect.d.mts +1 -1
- package/dist/cli/commands/host-detect.d.mts.map +1 -1
- package/dist/cli/commands/host-detect.mjs +30 -3
- package/dist/cli/commands/host-detect.mjs.map +1 -1
- package/dist/cli/commands/modes.d.mts +13 -0
- package/dist/cli/commands/modes.d.mts.map +1 -0
- package/dist/cli/commands/modes.mjs +221 -0
- package/dist/cli/commands/modes.mjs.map +1 -0
- package/dist/cli/commands/route.mjs +1 -1
- package/dist/cli/commands/route.mjs.map +1 -1
- package/dist/cli/commands/task.d.mts.map +1 -1
- package/dist/cli/commands/task.mjs +393 -145
- package/dist/cli/commands/task.mjs.map +1 -1
- package/dist/cli/commands/tokens.d.mts.map +1 -1
- package/dist/cli/commands/tokens.mjs +150 -6
- package/dist/cli/commands/tokens.mjs.map +1 -1
- package/dist/cli/commands/triage.d.mts +8 -0
- package/dist/cli/commands/triage.d.mts.map +1 -0
- package/dist/cli/commands/triage.mjs +263 -0
- package/dist/cli/commands/triage.mjs.map +1 -0
- package/dist/cli/config/post-merge-sweep.d.mts +18 -0
- package/dist/cli/config/post-merge-sweep.d.mts.map +1 -1
- package/dist/cli/config/post-merge-sweep.mjs +48 -3
- package/dist/cli/config/post-merge-sweep.mjs.map +1 -1
- package/dist/cli/consistency/registry.d.mts +11 -0
- package/dist/cli/consistency/registry.d.mts.map +1 -1
- package/dist/cli/consistency/registry.mjs +13 -0
- package/dist/cli/consistency/registry.mjs.map +1 -1
- package/dist/cli/coordination/agent-identity.d.mts +9 -0
- package/dist/cli/coordination/agent-identity.d.mts.map +1 -1
- package/dist/cli/coordination/agent-identity.mjs +11 -0
- package/dist/cli/coordination/agent-identity.mjs.map +1 -1
- package/dist/cli/coordination/auto-emit-artifact-ready.d.mts +16 -0
- package/dist/cli/coordination/auto-emit-artifact-ready.d.mts.map +1 -0
- package/dist/cli/coordination/auto-emit-artifact-ready.mjs +88 -0
- package/dist/cli/coordination/auto-emit-artifact-ready.mjs.map +1 -0
- package/dist/cli/coordination/event-log.d.mts +27 -0
- package/dist/cli/coordination/event-log.d.mts.map +1 -1
- package/dist/cli/coordination/event-log.mjs +72 -2
- package/dist/cli/coordination/event-log.mjs.map +1 -1
- package/dist/cli/coordination/event-schema.d.mts +16 -0
- package/dist/cli/coordination/event-schema.d.mts.map +1 -0
- package/dist/cli/coordination/event-schema.mjs +161 -0
- package/dist/cli/coordination/event-schema.mjs.map +1 -0
- package/dist/cli/coordination/store.d.mts +6 -0
- package/dist/cli/coordination/store.d.mts.map +1 -1
- package/dist/cli/coordination/store.mjs +14 -0
- package/dist/cli/coordination/store.mjs.map +1 -1
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +14 -1
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/gate/registry.d.mts +11 -0
- package/dist/cli/gate/registry.d.mts.map +1 -1
- package/dist/cli/gate/registry.mjs +13 -0
- package/dist/cli/gate/registry.mjs.map +1 -1
- package/dist/cli/help.d.mts.map +1 -1
- package/dist/cli/help.mjs +3 -2
- package/dist/cli/help.mjs.map +1 -1
- package/dist/cli/host/detect.d.mts +1 -0
- package/dist/cli/host/detect.d.mts.map +1 -1
- package/dist/cli/host/detect.mjs +5 -0
- package/dist/cli/host/detect.mjs.map +1 -1
- package/dist/cli/roadmap/conductor-view.d.mts +13 -0
- package/dist/cli/roadmap/conductor-view.d.mts.map +1 -0
- package/dist/cli/roadmap/conductor-view.mjs +31 -0
- package/dist/cli/roadmap/conductor-view.mjs.map +1 -0
- package/dist/cli/route/envelope.d.mts +68 -4
- package/dist/cli/route/envelope.d.mts.map +1 -1
- package/dist/cli/route/envelope.mjs +140 -103
- package/dist/cli/route/envelope.mjs.map +1 -1
- package/dist/cli/route/skill-discover.d.mts +9 -0
- package/dist/cli/route/skill-discover.d.mts.map +1 -1
- package/dist/cli/route/skill-discover.mjs +13 -1
- package/dist/cli/route/skill-discover.mjs.map +1 -1
- package/dist/cli/skill-author/contract.d.mts +1 -0
- package/dist/cli/skill-author/contract.d.mts.map +1 -1
- package/dist/cli/skill-author/contract.mjs +7 -0
- package/dist/cli/skill-author/contract.mjs.map +1 -1
- package/dist/cli/task/ids.d.mts +7 -4
- package/dist/cli/task/ids.d.mts.map +1 -1
- package/dist/cli/task/ids.mjs +11 -10
- package/dist/cli/task/ids.mjs.map +1 -1
- package/dist/cli/task/worktree-cleanup.d.mts +9 -1
- package/dist/cli/task/worktree-cleanup.d.mts.map +1 -1
- package/dist/cli/task/worktree-cleanup.mjs +190 -9
- package/dist/cli/task/worktree-cleanup.mjs.map +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/agents/apt-planner.md +1 -1
- package/dist/plugin/skills/apt/SKILL.md +111 -5
- package/dist/plugin/skills/apt-author-skill/SKILL.md +11 -0
- package/dist/plugin/skills/apt-bootstrap/SKILL.md +1 -0
- package/dist/plugin/skills/apt-classify/SKILL.md +1 -0
- package/dist/plugin/skills/apt-close-task/SKILL.md +1 -0
- package/dist/plugin/skills/apt-create-docs/SKILL.md +1 -0
- package/dist/plugin/skills/apt-debug/SKILL.md +2 -0
- package/dist/plugin/skills/apt-design/SKILL.md +2 -0
- package/dist/plugin/skills/apt-discuss/SKILL.md +2 -0
- package/dist/plugin/skills/apt-docs/SKILL.md +2 -0
- package/dist/plugin/skills/apt-execute/SKILL.md +1 -0
- package/dist/plugin/skills/apt-mockup/SKILL.md +2 -0
- package/dist/plugin/skills/apt-pause/SKILL.md +1 -0
- package/dist/plugin/skills/apt-personas/SKILL.md +1 -0
- package/dist/plugin/skills/apt-plan/SKILL.md +2 -0
- package/dist/plugin/skills/apt-pr-review/SKILL.md +1 -0
- package/dist/plugin/skills/apt-quick/SKILL.md +2 -0
- package/dist/plugin/skills/apt-resume/SKILL.md +1 -0
- package/dist/plugin/skills/apt-review/SKILL.md +1 -0
- package/dist/plugin/skills/apt-roadmap/SKILL.md +1 -0
- package/dist/plugin/skills/apt-roundtable/SKILL.md +2 -0
- package/dist/plugin/skills/apt-run/SKILL.md +1 -0
- package/dist/plugin/skills/apt-scan/SKILL.md +1 -0
- package/dist/plugin/skills/apt-setup/SKILL.md +1 -0
- package/dist/plugin/skills/apt-ship/SKILL.md +6 -5
- package/dist/plugin/skills/apt-stress-test/SKILL.md +1 -0
- package/dist/plugin/skills/apt-terminal/SKILL.md +1 -0
- package/dist/plugin/skills/apt-update/SKILL.md +5 -0
- package/dist/plugin/skills/apt-verify/SKILL.md +1 -0
- package/dist/plugin/skills/apt-verify-proof/SKILL.md +1 -0
- package/dist/types/config.d.ts +85 -0
- package/dist/types/config.d.ts.map +1 -1
- package/package.json +9 -1
- package/prompts/coder.md +2 -0
- package/prompts/conductor-status-check.md +23 -0
- package/prompts/conductor-sub-agent.md +57 -0
- package/prompts/conductor-system.md +172 -0
- package/prompts/planner.md +12 -0
- package/prompts/spec_writer.md +9 -0
- package/skills/apt/SKILL.md +1 -0
- package/skills/apt-close-task/SKILL.md +32 -1
- package/skills/apt-debug/SKILL.md +39 -6
- package/skills/apt-debug/appendices/diagnose-discipline.md +119 -0
- package/skills/apt-diagram/SKILL.md +342 -0
- package/skills/apt-diagram/appendices/design-discipline.md +97 -0
- package/skills/apt-discuss/SKILL.md +25 -0
- package/skills/apt-discuss/appendices/grill-discipline.md +104 -0
- package/skills/apt-discuss/appendices/zoom-out-helper.md +79 -0
- package/skills/apt-execute/SKILL.md +48 -5
- package/skills/apt-execute/appendices/tdd-mode.md +107 -0
- package/skills/apt-improve/DEEPENING.md +84 -0
- package/skills/apt-improve/INTERFACE-DESIGN.md +97 -0
- package/skills/apt-improve/LANGUAGE.md +104 -0
- package/skills/apt-improve/SKILL.md +141 -0
- package/skills/apt-plan/SKILL.md +159 -4
- package/skills/apt-plan/adapters/conductor.md +98 -0
- package/skills/apt-planner.md +42 -1
- package/skills/apt-pr-review/SKILL.md +46 -16
- package/skills/apt-prototype/LOGIC.md +109 -0
- package/skills/apt-prototype/SKILL.md +143 -0
- package/skills/apt-prototype/UI.md +90 -0
- package/skills/apt-quick/SKILL.md +30 -0
- package/skills/apt-review/SKILL.md +2 -0
- package/skills/apt-run/SKILL.md +32 -4
- package/skills/apt-setup/SKILL.md +130 -2
- package/skills/apt-ship/SKILL.md +63 -1
- package/skills/apt-spar/SKILL.md +290 -0
- package/skills/apt-triage/AGENT-BRIEF.md +84 -0
- package/skills/apt-triage/OUT-OF-SCOPE.md +75 -0
- package/skills/apt-triage/SKILL.md +169 -0
- package/skills/apt-verify/SKILL.md +3 -0
- package/skills/apt-verify-proof/SKILL.md +3 -0
- package/skills/apt-watch-ci/SKILL.md +163 -0
- package/skills/apt-zoom-out/SKILL.md +130 -0
- package/src/cli/ci-watch/lock.mjs +178 -0
- package/src/cli/ci-watch/state.mjs +103 -0
- package/src/cli/ci-watch/stop-matrix.mjs +181 -0
- package/src/cli/cli-wrappers/ci-watch.mjs +9 -0
- package/src/cli/commands/adr.mjs +243 -0
- package/src/cli/commands/ci-watch.mjs +503 -0
- package/src/cli/commands/commit.mjs +27 -8
- package/src/cli/commands/context.mjs +244 -0
- package/src/cli/commands/event.mjs +131 -24
- package/src/cli/commands/host-detect.mjs +33 -7
- package/src/cli/commands/modes.mjs +216 -0
- package/src/cli/commands/route.mjs +1 -1
- package/src/cli/commands/task.mjs +430 -170
- package/src/cli/commands/tokens.mjs +157 -6
- package/src/cli/commands/triage.mjs +286 -0
- package/src/cli/config/post-merge-sweep.mjs +49 -3
- package/src/cli/consistency/registry.mjs +14 -0
- package/src/cli/coordination/agent-identity.mjs +12 -0
- package/src/cli/coordination/auto-emit-artifact-ready.mjs +96 -0
- package/src/cli/coordination/event-log.mjs +73 -2
- package/src/cli/coordination/event-schema.d.ts +13 -0
- package/src/cli/coordination/event-schema.mjs +174 -0
- package/src/cli/coordination/store.mjs +14 -0
- package/src/cli/dispatch.mjs +15 -1
- package/src/cli/gate/registry.mjs +14 -0
- package/src/cli/help.mjs +3 -2
- package/src/cli/host/detect.mjs +5 -0
- package/src/cli/roadmap/conductor-view.d.ts +10 -0
- package/src/cli/roadmap/conductor-view.mjs +31 -0
- package/src/cli/route/envelope.mjs +140 -106
- package/src/cli/route/skill-discover.mjs +14 -1
- package/src/cli/skill-author/contract.mjs +7 -0
- package/src/cli/task/ids.mjs +15 -13
- package/src/cli/task/worktree-cleanup.mjs +191 -9
- package/templates/adr-format.md +56 -0
- package/templates/config.json +4 -0
- package/templates/context-format.md +34 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: apt:prototype
|
|
3
|
+
description: "Question-driven throwaway prototyping with 5-rule discipline — LOGIC branch (terminal-app for state-machine validation) and UI branch (delegates to apt:mockup)"
|
|
4
|
+
apt-skill-version: {{APT_VERSION}}
|
|
5
|
+
stage: design
|
|
6
|
+
intent: design
|
|
7
|
+
when_to_use: "The user has a question that wants a runnable prototype rather than a plan — 'does this state machine work?' (LOGIC branch) or 'does this UI shape feel right?' (UI branch). Throwaway code by design; do NOT confuse this with apt:plan or apt:execute."
|
|
8
|
+
user_invocable: true
|
|
9
|
+
internal: false
|
|
10
|
+
spawns_agent: false
|
|
11
|
+
agent_name: null
|
|
12
|
+
task_context: create-new
|
|
13
|
+
default_track: STANDARD
|
|
14
|
+
default_execution_mode: step
|
|
15
|
+
execution_modes:
|
|
16
|
+
- auto
|
|
17
|
+
- step
|
|
18
|
+
allowed-tools: "Bash, Read, Write, Edit, Grep, Glob"
|
|
19
|
+
argument-hint: "apt:prototype [question]"
|
|
20
|
+
gates: []
|
|
21
|
+
config_keys:
|
|
22
|
+
- coding.prototype_discipline
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Prototype — Question-Driven Throwaway Code
|
|
26
|
+
|
|
27
|
+
This skill ships throwaway code that answers ONE question. It is NOT a
|
|
28
|
+
planning artifact, NOT a feature, and NOT something to merge. The output
|
|
29
|
+
is a single-command-runnable prototype that lets the user feel whether
|
|
30
|
+
the question's answer is "yes" or "no", then gets thrown away.
|
|
31
|
+
|
|
32
|
+
**Pocock adoption attribution.** Discipline ported from Matt Pocock's
|
|
33
|
+
MIT-licensed `prototype` skill. Routes between two branches by
|
|
34
|
+
question-type; the UI branch delegates to Aperant's existing
|
|
35
|
+
`/apt:mockup` skill for HTML+Tailwind variants. The LOGIC branch and
|
|
36
|
+
the 5-rule discipline are new for Aperant.
|
|
37
|
+
|
|
38
|
+
## When to Use
|
|
39
|
+
|
|
40
|
+
- The user asks a question (not a "build me X" request) — "does this
|
|
41
|
+
state machine work?", "does this UI shape feel right?", "would users
|
|
42
|
+
find this discoverable?"
|
|
43
|
+
- A throwaway prototype is the cheapest answer (cheaper than designing,
|
|
44
|
+
planning, building, then discovering the answer was "no")
|
|
45
|
+
- The answer can be felt by running the prototype, not just reasoning
|
|
46
|
+
about it
|
|
47
|
+
|
|
48
|
+
## When NOT to Use
|
|
49
|
+
|
|
50
|
+
- The user has a feature request — use `/apt:plan` + `/apt:execute`
|
|
51
|
+
- The user wants a polished mockup to share — use `/apt:mockup` directly
|
|
52
|
+
(the UI branch of this skill delegates there anyway)
|
|
53
|
+
- The user wants production code with tests — that's TDD-mode
|
|
54
|
+
`/apt:execute --tdd`, not a prototype
|
|
55
|
+
|
|
56
|
+
## Branch routing
|
|
57
|
+
|
|
58
|
+
Inspect the user's question:
|
|
59
|
+
|
|
60
|
+
- **LOGIC branch** — triggers: "does this state machine work?", "does
|
|
61
|
+
this control flow handle edge case X?", "can this protocol handle
|
|
62
|
+
out-of-order messages?". Answer: a single-file terminal app the user
|
|
63
|
+
can run with one command to feel the state transitions.
|
|
64
|
+
- **UI branch** — triggers: "does this UI shape feel right?", "is this
|
|
65
|
+
flow discoverable?", "does this layout work on mobile?". Answer:
|
|
66
|
+
delegate to `/apt:mockup --variants 3` for HTML+Tailwind parallel
|
|
67
|
+
variants.
|
|
68
|
+
|
|
69
|
+
If the question is genuinely ambiguous, ask ONE clarifying question
|
|
70
|
+
("are you asking about behavior or appearance?") — do NOT enter a long
|
|
71
|
+
interview.
|
|
72
|
+
|
|
73
|
+
## The 5 Universal Rules (Pocock discipline, applies to both branches)
|
|
74
|
+
|
|
75
|
+
These five rules apply to EVERY prototype this skill produces. They are
|
|
76
|
+
load-bearing — violating them collapses the prototype into ceremony
|
|
77
|
+
disguised as a question.
|
|
78
|
+
|
|
79
|
+
1. **Throwaway-marked.** Every prototype file MUST carry a top-of-file
|
|
80
|
+
comment: `// THROWAWAY PROTOTYPE — do not merge, do not extend, do
|
|
81
|
+
not test.` This is not optional. Files without this marker drift into
|
|
82
|
+
production code and the question never gets answered cleanly.
|
|
83
|
+
|
|
84
|
+
2. **Single-command-run.** The prototype runs with ONE command. No
|
|
85
|
+
build step. No dependency install. `node prototype.mjs` or `pnpm dlx
|
|
86
|
+
tsx prototype.ts` or `bash prototype.sh` — pick one and stop. If you
|
|
87
|
+
reach for webpack, you're prototyping a build, not the question.
|
|
88
|
+
|
|
89
|
+
3. **No-persistence-default.** The prototype does NOT touch any
|
|
90
|
+
persistent store (libSQL, Convex, localStorage, .aperant/state.json).
|
|
91
|
+
Everything is in-memory. If persistence is part of the question,
|
|
92
|
+
explicitly opt in via a tmpfile — never the project's actual stores.
|
|
93
|
+
|
|
94
|
+
4. **Skip-polish.** No error handling for impossible scenarios. No
|
|
95
|
+
accessibility audit. No mobile responsive breakpoints unless the
|
|
96
|
+
question is about mobile. No animation refinement. Polish is what
|
|
97
|
+
you do AFTER the prototype answered "yes"; doing it now obscures
|
|
98
|
+
whether the answer was actually "yes".
|
|
99
|
+
|
|
100
|
+
5. **Surface-state-transparently.** The prototype prints / renders its
|
|
101
|
+
internal state at every step the user might want to inspect. A
|
|
102
|
+
terminal app prints every state transition. A UI prototype shows
|
|
103
|
+
the data shape next to the rendered output. The user must be able
|
|
104
|
+
to SEE what's happening — they can't feel an answer to "does this
|
|
105
|
+
work" if the state is hidden.
|
|
106
|
+
|
|
107
|
+
## LOGIC branch — terminal app for state-machine validation
|
|
108
|
+
|
|
109
|
+
When the question is about behavior / control flow / state machines /
|
|
110
|
+
protocols:
|
|
111
|
+
|
|
112
|
+
1. Read `LOGIC.md` for the discipline (ported from Pocock's
|
|
113
|
+
`prototype/LOGIC.md` with MIT attribution).
|
|
114
|
+
2. Write ONE file (e.g., `prototype.mjs`, `prototype.ts`, or
|
|
115
|
+
`prototype.py`) that:
|
|
116
|
+
- Models the state machine in code
|
|
117
|
+
- Provides a command-line driver that fires transitions one at a
|
|
118
|
+
time, printing each state
|
|
119
|
+
- Includes a 5-10 turn scripted run at the bottom that exercises the
|
|
120
|
+
interesting paths
|
|
121
|
+
3. Write a one-line invocation: `node prototype.mjs` (or whatever).
|
|
122
|
+
4. Verify: run it. The user reads the output, gets their answer, and
|
|
123
|
+
the file is deleted.
|
|
124
|
+
|
|
125
|
+
## UI branch — delegates to apt:mockup
|
|
126
|
+
|
|
127
|
+
When the question is about layout / aesthetics / flow / discoverability:
|
|
128
|
+
|
|
129
|
+
1. Read `UI.md` for the discipline (ported from Pocock's
|
|
130
|
+
`prototype/UI.md` with MIT attribution).
|
|
131
|
+
2. Invoke `/apt:mockup --variants 3` as a sub-step. apt:mockup already
|
|
132
|
+
enforces the UI-specific universal rules (zero-dep Tailwind CDN, no
|
|
133
|
+
JS, throwaway HTML iterations preserved).
|
|
134
|
+
3. The 5 universal rules above still apply — verify each HTML file
|
|
135
|
+
carries the `<!-- THROWAWAY PROTOTYPE -->` marker.
|
|
136
|
+
|
|
137
|
+
## Output contract
|
|
138
|
+
|
|
139
|
+
- Single prototype file (LOGIC) OR 3 HTML variants via apt:mockup (UI).
|
|
140
|
+
- No commits. No tests. No docs. The skill emits a final note: "Delete
|
|
141
|
+
this when the question is answered."
|
|
142
|
+
- If the user wants to convert the prototype into real code, that's a
|
|
143
|
+
separate `/apt:plan` invocation.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Adapted from Matt Pocock's MIT-licensed skill suite:
|
|
3
|
+
https://github.com/mattpocock/skills/blob/main/skills/engineering/prototype/UI.md
|
|
4
|
+
Licensed under MIT. Modifications: routed through Aperant's existing
|
|
5
|
+
apt:mockup skill rather than a freestanding HTML+Tailwind generator;
|
|
6
|
+
aligned with the 5 universal rules in apt-prototype/SKILL.md.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# UI branch — Delegates to apt:mockup
|
|
10
|
+
|
|
11
|
+
When the user's question is about **appearance / layout / flow /
|
|
12
|
+
discoverability**, the prototype is one or more HTML files generated
|
|
13
|
+
by Aperant's existing `/apt:mockup` skill. apt:mockup already enforces
|
|
14
|
+
the UI-specific universal rules (zero-dep Tailwind CDN, no JS, throwaway
|
|
15
|
+
HTML iterations preserved).
|
|
16
|
+
|
|
17
|
+
## When this branch fires
|
|
18
|
+
|
|
19
|
+
Question types that route here:
|
|
20
|
+
|
|
21
|
+
- "Does this UI shape feel right?"
|
|
22
|
+
- "Is this flow discoverable?"
|
|
23
|
+
- "Does this layout work on mobile?"
|
|
24
|
+
- "Should the primary action be a button or a card?"
|
|
25
|
+
- "How does X scale to N items?"
|
|
26
|
+
|
|
27
|
+
Question types that DO NOT route here (use LOGIC branch):
|
|
28
|
+
|
|
29
|
+
- "Does this state machine work?"
|
|
30
|
+
- "Does this control flow handle edge case X?"
|
|
31
|
+
- "Can this protocol handle out-of-order messages?"
|
|
32
|
+
|
|
33
|
+
## How the delegation works
|
|
34
|
+
|
|
35
|
+
apt:prototype's UI branch is a thin wrapper that:
|
|
36
|
+
|
|
37
|
+
1. Parses the user's question to extract the UI element / flow being
|
|
38
|
+
asked about (e.g., "search results card with N items").
|
|
39
|
+
2. Invokes the existing skill: `/apt:mockup --variants 3 [extracted topic]`.
|
|
40
|
+
3. apt:mockup produces 3 parallel HTML+Tailwind variants under
|
|
41
|
+
`.aperant/mockups/{topic-slug}/` so the user can compare them
|
|
42
|
+
side-by-side.
|
|
43
|
+
|
|
44
|
+
apt:prototype does NOT re-implement HTML+Tailwind generation — the
|
|
45
|
+
discipline lives in apt:mockup's body. UI.md exists so the apt:prototype
|
|
46
|
+
skill body can branch on question-type without conflating "logic
|
|
47
|
+
prototype" and "UI mockup" code paths.
|
|
48
|
+
|
|
49
|
+
## The 5 universal rules still apply
|
|
50
|
+
|
|
51
|
+
apt:mockup already enforces:
|
|
52
|
+
|
|
53
|
+
- Throwaway-marked (each HTML file carries a comment marker)
|
|
54
|
+
- Single-command-run (`open mockup.html` — zero dependencies)
|
|
55
|
+
- No-persistence-default (static HTML, no localStorage usage by default)
|
|
56
|
+
- Skip-polish (CSS reset, no animation refinement, no responsive
|
|
57
|
+
breakpoints unless the question is about responsive)
|
|
58
|
+
|
|
59
|
+
The fifth rule — **surface-state-transparently** — is the one
|
|
60
|
+
apt:mockup doesn't fully cover by default. For UI prototypes where the
|
|
61
|
+
question is about data shape (e.g., "what does this look like with 0
|
|
62
|
+
items vs 100 items?"), instruct apt:mockup to render each variant with
|
|
63
|
+
a different data-fixture state, and put the fixture JSON in a
|
|
64
|
+
side-panel of each mockup so the user can see what's driving the
|
|
65
|
+
render.
|
|
66
|
+
|
|
67
|
+
## What apt:prototype's UI branch adds over running apt:mockup directly
|
|
68
|
+
|
|
69
|
+
Two things:
|
|
70
|
+
|
|
71
|
+
1. **Question framing.** apt:mockup is invocable as "build me a mockup
|
|
72
|
+
of X". apt:prototype's UI branch is invocable as "I have a question
|
|
73
|
+
about UI X — show me three answers." The framing shifts the
|
|
74
|
+
discipline from "deliver the mockup the user asked for" to "answer
|
|
75
|
+
the user's question with the cheapest possible visual artifact."
|
|
76
|
+
|
|
77
|
+
2. **5-rule cross-discipline reminder.** When the UI branch fires, the
|
|
78
|
+
skill body explicitly re-states all 5 universal rules (not just the
|
|
79
|
+
UI-specific ones). The user gets the apt:prototype mental model on
|
|
80
|
+
top of apt:mockup's mechanical output — which prevents the variant
|
|
81
|
+
from drifting into "polish this until it's production-ready."
|
|
82
|
+
|
|
83
|
+
## When the apt:mockup delegation is NOT enough
|
|
84
|
+
|
|
85
|
+
If the question requires interaction the user can drive (click through,
|
|
86
|
+
hover states, conditional rendering on input), the right call is
|
|
87
|
+
`/apt:prototype` LOGIC branch on top of `/apt:mockup` — a tiny
|
|
88
|
+
JS-driven terminal-ish runner that swaps between the 3 mockups based
|
|
89
|
+
on simulated state. This is rare; most UI questions are answered by
|
|
90
|
+
the side-by-side parallel variants apt:mockup already produces.
|
|
@@ -21,6 +21,8 @@ gates: []
|
|
|
21
21
|
---
|
|
22
22
|
<objective>
|
|
23
23
|
Execute a small task quickly without full pipeline overhead. For small fixes, doc updates, config changes, and ad-hoc tasks. Skip planning — go straight to implementation with atomic commits and lightweight state tracking.
|
|
24
|
+
|
|
25
|
+
**QUICK is sequential single-agent by contract.** Per roundtable 2026-05-14 (R1), QUICK = one agent doing intent → implementation in one context window. There are no phase sub-agents. This is a contract, not an optimization — the QUICK track exists precisely because phase isolation buys nothing on tasks small enough that the planner's mental model and the implementer's mental model would be identical.
|
|
24
26
|
</objective>
|
|
25
27
|
|
|
26
28
|
<your_environment>
|
|
@@ -99,6 +101,34 @@ If the task does NOT cross any obligation axes, proceed normally.
|
|
|
99
101
|
2. Use Glob/Grep to find the files that need changes
|
|
100
102
|
3. Read those files to understand current state
|
|
101
103
|
|
|
104
|
+
## 3.5. Risk Check (mandatory)
|
|
105
|
+
|
|
106
|
+
Before implementing, check the risk class of files this task will modify. QUICK shares the same Critical/Destructive hard stop as `/apt:execute` step 3b — the speed of QUICK does NOT waive the risk gate. Misclassified QUICK tasks touching `**/auth/**`, `**/schema*`, `**/convex/schema.*`, or other Critical paths must NOT commit without explicit human approval.
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
node .aperant/deps/node_modules/@aperant/framework/bin/apt-tools.mjs risk-check . --paths {target files}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
If the task description contains destructive keywords ("delete", "remove", "drop", "force-push"), pass `--operation delete` so glob matching covers the destructive intent.
|
|
113
|
+
|
|
114
|
+
Parse the JSON result and apply the gate:
|
|
115
|
+
|
|
116
|
+
**If `risk_class` is `"Critical"` or `"Destructive"`:**
|
|
117
|
+
Stop execution. Show the user:
|
|
118
|
+
```
|
|
119
|
+
RISK GATE: This QUICK task touches {risk_class} files.
|
|
120
|
+
Files: {matched_paths list}
|
|
121
|
+
Pattern: {matched_pattern}
|
|
122
|
+
|
|
123
|
+
Approve this change? (yes/no)
|
|
124
|
+
```
|
|
125
|
+
Wait for explicit approval. If denied, abort the task and record `verification.risk_gate = "denied"` in `task.json`. The gate is hardcoded at ALL autonomy levels — QUICK does not get to skip it.
|
|
126
|
+
|
|
127
|
+
**If `risk_class` is `"Elevated"` AND autonomy < 3:**
|
|
128
|
+
Show the affected files briefly before proceeding (5-second delay; user can interrupt). At YOLO autonomy, proceed without stopping.
|
|
129
|
+
|
|
130
|
+
**Why this exists:** roundtable 2026-05-14 R1 surfaced that `apt-quick` previously had no risk-check gate, meaning a misclassified QUICK task touching schema/auth could commit Critical-path changes with zero code-level safeguard. See `.aperant/roundtables/phase-mode-per-track-20260514/REPORT.md` (R1, Risk Assessment §1).
|
|
131
|
+
|
|
102
132
|
## 4. Implement
|
|
103
133
|
|
|
104
134
|
Make the changes directly:
|
|
@@ -18,6 +18,8 @@ allowed-tools: "Read, Bash, Grep, Glob"
|
|
|
18
18
|
argument-hint: "apt:review [--skip-docs | --fix-all]"
|
|
19
19
|
gates:
|
|
20
20
|
- verify-approved
|
|
21
|
+
config_keys:
|
|
22
|
+
- pipeline.skip_review
|
|
21
23
|
---
|
|
22
24
|
<objective>
|
|
23
25
|
Review the code produced by a task's execution, analyzing logic, security, quality, architecture, and performance. Fix all findings. Update task documentation. Report what's next.
|
package/skills/apt-run/SKILL.md
CHANGED
|
@@ -17,10 +17,13 @@ execution_modes:
|
|
|
17
17
|
- plan-mode
|
|
18
18
|
- plan-only
|
|
19
19
|
allowed-tools: "Bash, Read, Write, Edit, Grep, Glob, Task"
|
|
20
|
-
argument-hint: "apt:run [task description] [--skip-review]"
|
|
20
|
+
argument-hint: "apt:run [task description] [--skip-review] [--phase-mode auto|agent-team|sub-agents|sequential]"
|
|
21
21
|
gates:
|
|
22
22
|
- constitution-read
|
|
23
23
|
- constitution-coverage
|
|
24
|
+
config_keys:
|
|
25
|
+
- parallelization.enabled
|
|
26
|
+
- parallelization.max_agents
|
|
24
27
|
---
|
|
25
28
|
<objective>
|
|
26
29
|
Run the full Aperant pipeline: plan a task, execute all subtasks, verify the implementation, and optionally review the code. This is the one-command experience — from task description to verified, reviewed code.
|
|
@@ -63,12 +66,14 @@ node packages/framework/bin/apt-tools.mjs state .
|
|
|
63
66
|
|
|
64
67
|
## 1b. Resolve Orchestration Mode
|
|
65
68
|
|
|
66
|
-
Run reconcile to determine the effective orchestration strategy for this pipeline run:
|
|
69
|
+
Run reconcile to determine the effective orchestration strategy for this pipeline run. Pass the task's track via `--track <quick|standard|deep>` so per-track defaults from `.aperant/config.json:orchestration.per_track` apply (roundtable 2026-05-14 R7):
|
|
67
70
|
|
|
68
71
|
```bash
|
|
69
|
-
node packages/framework/bin/apt-tools.mjs reconcile .
|
|
72
|
+
node packages/framework/bin/apt-tools.mjs reconcile . --track {track}
|
|
70
73
|
```
|
|
71
74
|
|
|
75
|
+
**Per-invocation override:** if the user passed `--phase-mode {auto|agent-team|sub-agents|sequential}` on the invocation, use that value as `PHASE_MODE` directly (it wins over both `per_track` and the global `phase_delegation`). Still call reconcile so `review_mode` and `debate_mode` are resolved against host capabilities.
|
|
76
|
+
|
|
72
77
|
Parse the result and display:
|
|
73
78
|
|
|
74
79
|
```
|
|
@@ -81,7 +86,7 @@ If `downgrades` is present in the result, display each downgrade warning:
|
|
|
81
86
|
[APT] Warning: {downgrade.field} requested '{downgrade.requested}' but host does not support it — using '{downgrade.resolved}'. {downgrade.reason}
|
|
82
87
|
```
|
|
83
88
|
|
|
84
|
-
Store `resolved.phase_delegation` as `PHASE_MODE` for use in the pipeline steps below.
|
|
89
|
+
Store `resolved.phase_delegation` (or the explicit `--phase-mode` override) as `PHASE_MODE` for use in the pipeline steps below.
|
|
85
90
|
|
|
86
91
|
## 2. Create Feature Branch (or task worktree)
|
|
87
92
|
|
|
@@ -161,6 +166,19 @@ Execute the apt:execute workflow inline:
|
|
|
161
166
|
|
|
162
167
|
## 5. Stage 3 — Verify (apt:verify)
|
|
163
168
|
|
|
169
|
+
**De-anchored re-read (PHASE_MODE=sequential only — roundtable 2026-05-14 R2):**
|
|
170
|
+
|
|
171
|
+
When `PHASE_MODE` is `"sequential"` and the same agent that ran Stage 2 is about to run Stage 3 in the same context window, treat the boundary as an attention reset before proceeding. The agent MUST:
|
|
172
|
+
|
|
173
|
+
1. **Re-read `spec.md` from disk** — do not rely on its in-context summary from earlier in the conversation
|
|
174
|
+
2. **Re-read the diff from disk** via `git diff {base_branch}...HEAD` — verify what was actually written, not what was intended
|
|
175
|
+
3. **Adopt adversarial QA posture** — for the duration of Stage 3 you are not the implementer; you are reading this code for the first time, asking "what does this break?" rather than "did I do this right?"
|
|
176
|
+
4. **Ignore your prior reasoning chain** — the executor's "why I did it this way" rationalization is in-window but MUST NOT anchor the verifier's reading. If a finding conflicts with prior reasoning, prefer the finding
|
|
177
|
+
|
|
178
|
+
This block exists because the roundtable's STANDARD-track de-anchoring relies on prompt-level discipline rather than fresh-context isolation. The exit condition: if verify completeness+correctness scores drop >0.5 points across 10+ STANDARD tasks measured under R6 telemetry, flip `orchestration.per_track.standard` to `"sub-agents"` (R3 — the named fallback preserved from Systems Analyst + Risk Analyst dissent). See `.aperant/roundtables/phase-mode-per-track-20260514/REPORT.md` §Dissenting Views.
|
|
179
|
+
|
|
180
|
+
Sub-agents and agent-team modes skip this block — they get fresh-context isolation by spawning, which makes the de-anchored re-read redundant.
|
|
181
|
+
|
|
164
182
|
Execute the apt:verify workflow inline:
|
|
165
183
|
|
|
166
184
|
1. Check all subtasks completed
|
|
@@ -188,6 +206,16 @@ Stop pipeline (do not proceed to review).
|
|
|
188
206
|
|
|
189
207
|
**Skip if** `--skip-review` flag is set.
|
|
190
208
|
|
|
209
|
+
**De-anchored re-read (PHASE_MODE=sequential only — roundtable 2026-05-14 R2):**
|
|
210
|
+
|
|
211
|
+
Same attention-reset discipline as Stage 3 applies before review starts. In sequential mode the reviewer is the same agent that planned, executed, and verified — the rationalization chain is in-window. Before the 6-pass loop:
|
|
212
|
+
|
|
213
|
+
1. **Re-read `spec.md` and `qa_signoff.json` from disk** — do not summarize from in-context recall
|
|
214
|
+
2. **Re-read changed files** at their post-execution state via `git show HEAD:{path}` or direct Read
|
|
215
|
+
3. **Adopt fresh-reviewer posture** — you are reading this code as if a colleague wrote it, not as if you wrote it. The 6 review passes (logic / security / quality / architecture / performance / docs-coherence) are independent lenses; treat each lens as a fresh adversarial reading
|
|
216
|
+
|
|
217
|
+
Pattern reference: `packages/core/src/workflows/sparring/engine.ts` implements this exact discipline for sparring reviewers (fresh `streamText` per lens, lens prompt in system slot). This SKILL.md block is the same idea applied to verify/review in a single-context pipeline.
|
|
218
|
+
|
|
191
219
|
Execute the apt:review workflow inline (see `apt-review/SKILL.md`):
|
|
192
220
|
|
|
193
221
|
1. Load context — spec, QA results, constitution
|
|
@@ -17,6 +17,8 @@ execution_modes:
|
|
|
17
17
|
allowed-tools: "Bash, Read, Write, Edit, Grep, Glob"
|
|
18
18
|
argument-hint: "apt:setup [--batch <n> | --reset]"
|
|
19
19
|
gates: []
|
|
20
|
+
config_keys:
|
|
21
|
+
- "*"
|
|
20
22
|
---
|
|
21
23
|
<objective>
|
|
22
24
|
Interactive configuration of the Aperant Framework. Presents human-friendly questions
|
|
@@ -146,6 +148,7 @@ Display the current settings summary:
|
|
|
146
148
|
| Date Format | {current value} |
|
|
147
149
|
| Time Format | {current value} |
|
|
148
150
|
| Task Index | {current value} |
|
|
151
|
+
| Diagram Mode | {current value} |
|
|
149
152
|
| Phase Delegation | {config value} → {resolved} |
|
|
150
153
|
| Review Mode | {config value} → {resolved} |
|
|
151
154
|
| Debate Mode | {config value} → {resolved} |
|
|
@@ -168,7 +171,7 @@ AskUserQuestion([
|
|
|
168
171
|
multiSelect: false,
|
|
169
172
|
options: [
|
|
170
173
|
{ label: "Verification", description: "Verify mode, cross-verification, video review, strictness" },
|
|
171
|
-
{ label: "Pipeline", description: "Auto branch, code review, TDD Iron Law, date/time format, task index" },
|
|
174
|
+
{ label: "Pipeline", description: "Auto branch, code review, TDD Iron Law, date/time format, task index, diagram mode (file vs mcp)" },
|
|
172
175
|
{ label: "Orchestration", description: "Phase delegation, review mode, debate mode, agent teams" },
|
|
173
176
|
{ label: "Team Collaboration", description: "Enable/disable team mode — shared task board, roadmap, members" },
|
|
174
177
|
{ label: "Visibility", description: "Artifact-sharing policy — what leaves your machine (roadmap, team.json, decisions, digests, tasks)" },
|
|
@@ -181,10 +184,11 @@ AskUserQuestion([
|
|
|
181
184
|
|
|
182
185
|
**Routing:**
|
|
183
186
|
- "Verification" → jump to **Step 2** (Batch 1 + Batch 2 only), then skip to **Step 4** (mapping) and **Step 5** (write)
|
|
184
|
-
- "Pipeline" → jump to **Step 3b** (Batch 3 only), then skip to **Step 4** and **Step 5**
|
|
187
|
+
- "Pipeline" → jump to **Step 3b** (Batch 3 only, including Diagram Mode), then skip to **Step 4** and **Step 5**
|
|
185
188
|
- "Orchestration" → jump to **Step 3c** (Batch 4 only), then skip to **Step 4** and **Step 5**
|
|
186
189
|
- "Team Collaboration" → jump to **Step 3d** (Batch 5 only), then skip to **Step 4** and **Step 5**
|
|
187
190
|
- "Visibility" → jump to **Step 3e** (Batch 6 only), then skip to **Step 4** and **Step 5**
|
|
191
|
+
- "Task Tracking" → jump to **Step 3g** (Batch 8 only), then skip to **Step 4** and **Step 5**
|
|
188
192
|
- "Everything" → proceed to **Step 2** and run all batches (same as fresh setup)
|
|
189
193
|
- "Done" → display "Settings unchanged." and exit
|
|
190
194
|
|
|
@@ -396,6 +400,15 @@ AskUserQuestion([
|
|
|
396
400
|
{ label: "Yes (Recommended)", description: "Generates .aperant/tasks/INDEX.md with date, status, and title for every task — updated automatically" },
|
|
397
401
|
{ label: "No", description: "Skip index generation" }
|
|
398
402
|
]
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
question: "How should /apt:diagram render diagrams by default? (You can override per-call with --mode=file or --mode=mcp.)",
|
|
406
|
+
header: "Diagram Mode",
|
|
407
|
+
multiSelect: false,
|
|
408
|
+
options: [
|
|
409
|
+
{ label: "File (default)", description: "Writes a local docs/diagrams/<slug>.excalidraw file — works offline, no external services" },
|
|
410
|
+
{ label: "MCP (live canvas)", description: "Renders into a live Excalidraw MCP canvas — requires the Excalidraw MCP server to be connected. Asks for one-time consent on first use." }
|
|
411
|
+
]
|
|
399
412
|
}
|
|
400
413
|
])
|
|
401
414
|
```
|
|
@@ -859,6 +872,112 @@ Add a row to the Step 8 table:
|
|
|
859
872
|
|
|
860
873
|
---
|
|
861
874
|
|
|
875
|
+
## 3g. Present Settings (Batch 8: Task Tracking + Coding) (Pocock adoption AC13)
|
|
876
|
+
|
|
877
|
+
This batch captures the **task_tracking** backend and the **coding**
|
|
878
|
+
defaults block introduced by the Pocock adoption (ST-10 apt:triage +
|
|
879
|
+
ST-3 apt:execute --tdd).
|
|
880
|
+
|
|
881
|
+
Per ID-01 (Framework full-featured locally; backends are pluggable), the
|
|
882
|
+
default is `local-only` — zero GitHub auth required on first run. Users
|
|
883
|
+
can switch to `github-issues` (v1 stub) or `app-inbox` (v1 stub) later;
|
|
884
|
+
the framework abstraction is open for v2 adapter implementations.
|
|
885
|
+
|
|
886
|
+
### 3g.1 Present the task-tracking picker
|
|
887
|
+
|
|
888
|
+
```
|
|
889
|
+
AskUserQuestion([
|
|
890
|
+
{
|
|
891
|
+
question: "Where should triage state mirror to?",
|
|
892
|
+
header: "Task Tracking",
|
|
893
|
+
options: [
|
|
894
|
+
{ label: "Local files only (recommended for solo / 2-founder)",
|
|
895
|
+
description: "Writes to .aperant/tasks/{id}/triage.json. Zero net dep." },
|
|
896
|
+
{ label: "GitHub Issues (v2 — stub returns not-implemented in v1)",
|
|
897
|
+
description: "v1 ships the adapter shape only; full implementation in v2." },
|
|
898
|
+
{ label: "App inbox (post-app-launch — stub in v1)",
|
|
899
|
+
description: "Convex-backed; same state machine, app-rendered." }
|
|
900
|
+
]
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
question: "Publish vertical-slice subtasks to the tracker?",
|
|
904
|
+
header: "Tracker Publishing",
|
|
905
|
+
options: [
|
|
906
|
+
{ label: "No (recommended for solo / local)",
|
|
907
|
+
description: "Slices stay in implementation_plan.json only." },
|
|
908
|
+
{ label: "Yes (only meaningful with github-issues or app-inbox backend)",
|
|
909
|
+
description: "Each vertical slice becomes an issue via the to-issues template." }
|
|
910
|
+
]
|
|
911
|
+
}
|
|
912
|
+
])
|
|
913
|
+
```
|
|
914
|
+
|
|
915
|
+
For hosts without structured prompts, present each as a numbered list
|
|
916
|
+
and read the reply as a single number per question.
|
|
917
|
+
|
|
918
|
+
### 3g.2 Present the coding-defaults picker
|
|
919
|
+
|
|
920
|
+
```
|
|
921
|
+
AskUserQuestion([
|
|
922
|
+
{
|
|
923
|
+
question: "Activate TDD discipline by default for /apt:execute?",
|
|
924
|
+
header: "TDD Default",
|
|
925
|
+
options: [
|
|
926
|
+
{ label: "No (off — opt in per run via --tdd)",
|
|
927
|
+
description: "Single-commit flow; --tdd activates red-green-refactor + G9 audit." },
|
|
928
|
+
{ label: "Yes (on — opt out per run via --no-tdd)",
|
|
929
|
+
description: "Vertical-tracer-bullet discipline on every STANDARD/DEEP run." }
|
|
930
|
+
]
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
question: "Enforce the 5-rule prototype discipline on /apt:prototype?",
|
|
934
|
+
header: "Prototype Discipline",
|
|
935
|
+
options: [
|
|
936
|
+
{ label: "Yes (recommended — throwaway-marked, single-command-run, etc.)",
|
|
937
|
+
description: "All 5 universal rules apply to every prototype." },
|
|
938
|
+
{ label: "No (relaxed — rules are guidance only)",
|
|
939
|
+
description: "Prototypes may grow into production code; not recommended." }
|
|
940
|
+
]
|
|
941
|
+
}
|
|
942
|
+
])
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
### 3g.3 Map answers to `.aperant/config.json`
|
|
946
|
+
|
|
947
|
+
```jsonc
|
|
948
|
+
{
|
|
949
|
+
"task_tracking": {
|
|
950
|
+
"backend": "local-only", // default; or "github-issues" | "app-inbox"
|
|
951
|
+
"publish_to_tracker": false, // default
|
|
952
|
+
"tracker_url": null, // user-supplied when publish_to_tracker = true
|
|
953
|
+
"tracker_label_vocabulary": "default" // or custom name
|
|
954
|
+
},
|
|
955
|
+
"coding": {
|
|
956
|
+
"tdd_default": false, // default — see ST-3 apt:execute --tdd
|
|
957
|
+
"prototype_discipline": true // default — see ST-8 apt:prototype
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
```
|
|
961
|
+
|
|
962
|
+
Migration rule: any existing config WITHOUT a `task_tracking` or
|
|
963
|
+
`coding` block gets defaults silently — NEVER error on a missing block.
|
|
964
|
+
This is the migration path for projects that adopted Aperant pre-Pocock.
|
|
965
|
+
|
|
966
|
+
### 3g.4 Review-Mode routing entry
|
|
967
|
+
|
|
968
|
+
Extend the "1b. Review Mode" routing table (§1b) to include "Task
|
|
969
|
+
Tracking" as a selectable edit target — jumping back into this Batch 8
|
|
970
|
+
picker.
|
|
971
|
+
|
|
972
|
+
### 3g.5 Confirmation row
|
|
973
|
+
|
|
974
|
+
Add a row to the Step 8 table:
|
|
975
|
+
```
|
|
976
|
+
| Task Tracking | {backend} (publish: {true|false}, TDD default: {true|false}) |
|
|
977
|
+
```
|
|
978
|
+
|
|
979
|
+
---
|
|
980
|
+
|
|
862
981
|
## 4. Map Answers to Config
|
|
863
982
|
|
|
864
983
|
Map the user's selections to config values:
|
|
@@ -898,6 +1017,8 @@ Map the user's selections to config values:
|
|
|
898
1017
|
- "Ask me" → `pr_review.suggest_after_ship: "ask"`
|
|
899
1018
|
- "Never" → `pr_review.suggest_after_ship: "never"`
|
|
900
1019
|
|
|
1020
|
+
Note: task ids are slug-first since v0.6.6 — the date-format setting controls the trailing date component only.
|
|
1021
|
+
|
|
901
1022
|
**Date Format:**
|
|
902
1023
|
- "DD-MM-YY" → `preferences.date_format: "DD-MM-YY"`
|
|
903
1024
|
- "MM-DD-YY" → `preferences.date_format: "MM-DD-YY"`
|
|
@@ -909,6 +1030,12 @@ Map the user's selections to config values:
|
|
|
909
1030
|
|
|
910
1031
|
**Task Index:** "Yes" → `preferences.task_index: true`, "No" → `preferences.task_index: false`
|
|
911
1032
|
|
|
1033
|
+
**Diagram Mode:**
|
|
1034
|
+
- "File (default)" → `diagram.mode: "file"`
|
|
1035
|
+
- "MCP (live canvas)" → `diagram.mode: "mcp"`
|
|
1036
|
+
|
|
1037
|
+
If `.aperant/config.json` has no `diagram` block yet, also seed `diagram.mcpConsent: null` so the structure matches the template default. Existing `mcpConsent` records are preserved across mode flips (changing the mode does not invalidate prior consent for the same host).
|
|
1038
|
+
|
|
912
1039
|
**Orchestration (Auto mode):** "Auto (Recommended)" → all three fields set to `"auto"`:
|
|
913
1040
|
- `orchestration.phase_delegation: "auto"`
|
|
914
1041
|
- `orchestration.review_mode: "auto"`
|
|
@@ -1016,6 +1143,7 @@ Display:
|
|
|
1016
1143
|
| Date Format | {DD-MM-YY / MM-DD-YY / YY-MM-DD} |
|
|
1017
1144
|
| Time Format | {24h / 12h} |
|
|
1018
1145
|
| Task Index | {Yes/No} |
|
|
1146
|
+
| Diagram Mode | {file/mcp} |
|
|
1019
1147
|
| Design Taste | {Skip / Brutalist / Editorial / Enterprise-Clean / Playful} |
|
|
1020
1148
|
| Phase Delegation | {Auto / Agent Team / Sub-Agents / Sequential} |
|
|
1021
1149
|
| Review Mode | {Auto / Agent Team / Sub-Agents / Sequential} |
|
package/skills/apt-ship/SKILL.md
CHANGED
|
@@ -20,6 +20,9 @@ gates:
|
|
|
20
20
|
- review-clean
|
|
21
21
|
- all-subtasks-complete
|
|
22
22
|
- gitignore-in-sync
|
|
23
|
+
config_keys:
|
|
24
|
+
- pipeline.auto_branch
|
|
25
|
+
- pipeline.branch_prefix
|
|
23
26
|
---
|
|
24
27
|
<objective>
|
|
25
28
|
Create a pull request (or publish a package) with full traceability from decisions to implementation. The PR body includes QA dimension scores, decision audit trail, and commit-to-subtask mapping. This is the final step in any track -- after verify passes, ship it.
|
|
@@ -286,11 +289,13 @@ Capture the PR URL from the output into `pr_url` (for example, the last line of
|
|
|
286
289
|
**Record `pr_url` on the task record (C56 A2).** `/apt:close-task` and the auto-close-phase path in `task close` both resolve the PR number from this URL to poll `gh pr view` for merge state — without it, the closer side cannot run:
|
|
287
290
|
|
|
288
291
|
```bash
|
|
289
|
-
node packages/framework/bin/apt-tools.mjs task update . --id {task-id} --pr-url {PR_URL}
|
|
292
|
+
ship_update=$(node packages/framework/bin/apt-tools.mjs task update . --id {task-id} --pr-url {PR_URL})
|
|
290
293
|
```
|
|
291
294
|
|
|
292
295
|
This same call **atomically flips `lifecycle_phase` from `reviewing` to `shipped-pending-merge`** when the task is in `reviewing` and no explicit `--lifecycle-phase` flag is passed. Section 6 is now the single load-bearing step that both records the PR and transitions the lifecycle; Section 8 below documents the semantics but no longer issues a separate command.
|
|
293
296
|
|
|
297
|
+
It also evaluates `ci_watch.after_ship` and may arm the post-ship CI watcher. Preserve the JSON envelope in `ship_update`; Section 7.2 reads `ci_watch_armed` and `ci_watch_skip_reason` from it instead of issuing a second auto-start command.
|
|
298
|
+
|
|
294
299
|
Display the resolution so users see which branch/base was used:
|
|
295
300
|
|
|
296
301
|
```
|
|
@@ -347,6 +352,63 @@ suggest_mode=$(jq -r '.pr_review.suggest_after_ship // "always"' .aperant/config
|
|
|
347
352
|
|
|
348
353
|
`suggest_after_ship` is purely additive — it does not affect `authorship_override`, `authorship_overrides`, or `max_rounds` in the same `pr_review` block.
|
|
349
354
|
|
|
355
|
+
### 7.2 Post-ship /apt:watch-ci hook
|
|
356
|
+
|
|
357
|
+
After Section 7.1's hint resolves (whether it ran the deep review or skipped), report or interactively arm the post-ship CI watcher. The hook is controlled by `ci_watch.after_ship` in `.aperant/config.json` (tri-state: `auto` | `ask` | `never`). The default depends on host capability — `auto` on cron-capable hosts (Claude Code, Pi), `never` elsewhere.
|
|
358
|
+
|
|
359
|
+
**Skip entirely** when no PR URL was captured in Section 6 (library `npm publish`-only path — same skip rule as 7.1).
|
|
360
|
+
|
|
361
|
+
**Read the Section 6 task-update envelope first:**
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
ci_watch_armed=$(echo "$ship_update" | jq -r '.ci_watch_armed // false')
|
|
365
|
+
ci_watch_skip_reason=$(echo "$ship_update" | jq -r '.ci_watch_skip_reason // empty')
|
|
366
|
+
ci_watch_host=$(echo "$ship_update" | jq -r '.ci_watch.host // "unknown"')
|
|
367
|
+
ci_watch_deadline=$(echo "$ship_update" | jq -r '.ci_watch.deadline // empty')
|
|
368
|
+
host_cron=$(node packages/framework/bin/apt-tools.mjs host-detect | jq -r '.host.capabilities.cron')
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
**Autonomy interaction** (apply BEFORE branching, same rule as 7.1): when `autonomy === 3` (YOLO), degrade `ask` → `auto`.
|
|
372
|
+
|
|
373
|
+
**Branch on the task-update envelope:**
|
|
374
|
+
|
|
375
|
+
- **`ci_watch_armed=true` AND `host_cron=true`** — emit:
|
|
376
|
+
|
|
377
|
+
```
|
|
378
|
+
[APT:ship] CI watcher armed (host cron: {ci_watch_host}). Deadline: {ci_watch_deadline}. Stop: /apt:watch-ci --stop --pr {N}.
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
- **`ci_watch_armed=true` AND `host_cron=false`** — emit:
|
|
382
|
+
|
|
383
|
+
```
|
|
384
|
+
[APT:ship] CI watcher state created (host has no cron; advance manually: /apt:watch-ci --tick --pr {N}).
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
This is the honest-gap surface per D-03 — we never lie about cron-capability.
|
|
388
|
+
|
|
389
|
+
- **`ci_watch_skip_reason=ask-deferred`** — emit:
|
|
390
|
+
|
|
391
|
+
```
|
|
392
|
+
[APT:ship] Arm CI watcher for PR {N} now? [Y/n]
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
On `Y` (or empty enter), call:
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
node packages/framework/bin/apt-tools.mjs ci-watch start . --pr {pr_number} --task-id {task-id} --host {cli}
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
Then emit the same host-cron-aware success banner used for `ci_watch_armed=true`. On `N` or any other response, proceed silently to Section 8.
|
|
402
|
+
|
|
403
|
+
- **`ci_watch_skip_reason=disabled`** — silent. Proceed directly to Section 8.
|
|
404
|
+
|
|
405
|
+
- **Any other skip reason** — emit:
|
|
406
|
+
```
|
|
407
|
+
[APT:ship] CI watcher not armed: {ci_watch_skip_reason}
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
Section 7.2 is purely additive — it does not affect Section 7.1's `pr_review.suggest_after_ship` policy or any other config block.
|
|
411
|
+
|
|
350
412
|
## 8. Transition lifecycle to `shipped-pending-merge` (C56 B5)
|
|
351
413
|
|
|
352
414
|
Ship is NOT the final closer. The PR has just been opened — it won't merge for minutes, hours, or days, and no agent will be present on merge. The task lifecycle is now `shipped-pending-merge` — the intermediate state between `reviewing` and `completed`. `/apt:close-task` runs post-merge (either manually via `/apt:close-task --all` or by the user when they return to the repo) and performs the actual closeout: phase flip, documentation narration, worktree GC, per-PR config strip, task archive.
|