@aacombarro89/praxis 0.1.3 → 0.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aacombarro89/praxis",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "A CLI that installs an AI methodology layer into a codebase.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,4 +21,6 @@ and complete:
21
21
  anchors; staleness signals are future advisory work.
22
22
  - Make instruction-layer changes through `/praxis-instructions`, not ad-hoc edits — run
23
23
  it when unsure whether the instruction files still match the project, or whether
24
- they cover the sections above.
24
+ they cover the sections above. When this is part of reconciling the methodology
25
+ layer after a change, enter through the `/praxis-upkeep` front gate (which
26
+ delegates here) instead of running this pass alone.
@@ -10,11 +10,37 @@ You are a senior engineer writing a handoff document at the end of a working
10
10
  session. Capture ALL relevant context so a fresh session — with none of this
11
11
  conversation in memory — can read the file and immediately continue the work.
12
12
 
13
- The handoff is a **context cache, not just a status report.** A fresh session
14
- (or a resume subagent whose only briefing is this file) should be able to act
15
- from it without re-running the discovery you already did. Provide or reference
16
- the load-bearing context — files, line numbers, doc sections, prior art,
17
- commands — rather than making the next session rediscover it.
13
+ The handoff is a **context cache, not just a status report.** Whoever reads it —
14
+ with none of this conversation in memory should be able to act from it without
15
+ re-running the discovery you already did. Provide or reference the load-bearing
16
+ context — files, line numbers, doc sections, prior art, commands — rather than
17
+ making the reader rediscover it.
18
+
19
+ The brief serves two readers, and the same document works for both:
20
+ - **A fresh session** a human starts later to resume the work.
21
+ - **A subagent** the orchestrator dispatches *now* to execute a scoped
22
+ workstream (see *Delegation mode* below).
23
+
24
+ ## Delegation mode
25
+
26
+ By default this command writes one combined handoff for resuming the whole task.
27
+ Switch to delegation mode — **one scoped brief per workstream** instead of a
28
+ single combined doc — when you intend to delegate execution, for either reason
29
+ (they don't require parallelism):
30
+ - the work splits into **independent workstreams** to run concurrently, or
31
+ - a **context-heavy or sequential** stream is worth running in an execution
32
+ agent's *own* context (and on a lighter tier) to keep the orchestrator's clean.
33
+
34
+ - Write one brief per workstream — including a single sequential stream worth
35
+ isolating. Run Phases 1–5 per brief, scoped to that workstream only (its files,
36
+ prior art, commands, success criterion), so an execution agent runs it cold.
37
+ - Name each file for its workstream: `YYYY-MM-DD_HHMM_HANDOFF_<workstream>.md`, so
38
+ the set sorts together and each is identifiable.
39
+ - Keep workstreams at the right grain: independent ones don't coordinate
40
+ mid-flight; a sequential stream is one brief the agent works start to finish.
41
+
42
+ Everything else (sections, discipline, save location) is identical to the
43
+ single-doc flow below.
18
44
 
19
45
  ## Phase 1 — Build the filename
20
46
 
@@ -172,7 +198,8 @@ not reopen the file.]
172
198
 
173
199
  ## Phase 6 — Confirm and hand off
174
200
 
175
- After writing, print exactly this to chat (with real values substituted):
201
+ **Resume path (single combined handoff).** After writing, print exactly this to
202
+ chat (with real values substituted):
176
203
 
177
204
  ```
178
205
  ✅ Handoff saved: <relative/path/to/file.md>
@@ -181,5 +208,23 @@ To continue, open a NEW session and send:
181
208
  Read <relative/path/to/file.md> and continue from the Immediate Next Steps section.
182
209
  ```
183
210
 
184
- Do not attempt to spawn or launch another sessionthat is not supported in
185
- this environment. The user starts the next session manually.
211
+ Starting a new top-level session is a manual stepdo not try to launch one;
212
+ the user does that.
213
+
214
+ **Delegation path (per-workstream briefs).** After writing the briefs, print the
215
+ dispatch list so the orchestrator can fan the work out — one subagent per brief:
216
+
217
+ ```
218
+ ✅ Briefs saved:
219
+ - <relative/path/to/workstream-a.md>
220
+ - <relative/path/to/workstream-b.md>
221
+
222
+ To execute, dispatch one subagent per brief:
223
+ Read <brief> and complete the workstream it describes; verify against its
224
+ success criterion before returning.
225
+ ```
226
+
227
+ Spawning a subagent for each brief and verifying its result on return is the
228
+ orchestrator's job (the main thread, which has the subagent/Task tool) — this
229
+ command only produces the briefs. Within-session subagent delegation is
230
+ supported; launching a separate top-level session is not.
@@ -1,7 +1,10 @@
1
- # Package manifest (docs/wiki/packages-and-emit.md, D22/D24). Ships a standing reminder
1
+ # Package manifest (docs/wiki/packages-and-emit.md, D22/D24/D37). Ships a standing reminder
2
2
  # (rules.md) plus the /praxis-handoff command (commands/handoff.md): capture full
3
- # session context into a chronologically-named, self-contained handoff doc so a
4
- # fresh agent session resumes without losing state or re-running discovery.
3
+ # session context into a chronologically-named, self-contained handoff doc that
4
+ # carries work across both boundaries it can cross a session boundary (a fresh
5
+ # agent session resumes without re-running discovery) and an agent boundary (a
6
+ # subagent executes a scoped workstream the orchestrator delegated, D37). One
7
+ # context-cache artifact serves both readers.
5
8
  # Layer 1 / stack- & tool-agnostic — the command adapts to whatever build/test,
6
9
  # design doc, and instruction layer the target project has; it hardcodes none of
7
10
  # Praxis's own specifics.
@@ -18,3 +18,45 @@ the current conversation in memory, can resume without guessing or re-deriving.
18
18
  that makes the authored instruction files stale or incomplete, say so.
19
19
  - Keep handoffs together in one directory so they sort in chronological order;
20
20
  don't scatter them into the codebase.
21
+
22
+ ## Delegated execution
23
+
24
+ A handoff brief is not only for the *next* session — it is also the briefing an
25
+ execution agent needs to do scoped work *now*. The reason to delegate is to keep
26
+ in the orchestrator's context only what it needs — the *result*, not the
27
+ execution detail — and to match each piece of work to the cheapest tier that can
28
+ do it. Delegate when that holds; do the work inline when it doesn't.
29
+
30
+ - Delegate when you need the result, not the detail. Two triggers, often
31
+ combined — **neither requires parallelism**:
32
+ - *Independent workstreams* — parts specifiable up front and runnable without
33
+ coordination mid-flight (concurrently, where the tool allows). If two parts
34
+ must talk constantly, they are one workstream.
35
+ - *Context or budget isolation* — a context-heavy or mechanical run (a wide
36
+ refactor, a multi-step migration, a long grind) worth executing in an
37
+ execution agent's *own* context window, on a lighter/faster tier, so the
38
+ orchestrator's context stays clean. This holds for a *single sequential*
39
+ stream: size and cost justify delegating on their own.
40
+ - Name the split at plan time. When a plan's steps form independent or
41
+ context-heavy workstreams, surface the delegation split *as part of the plan* —
42
+ what each execution agent runs and how its result returns — rather than only
43
+ deciding to delegate mid-execution.
44
+ - Brief each workstream as a self-contained context cache — the same discipline
45
+ as a handoff. An execution agent starts cold: give it the load-bearing files
46
+ (`path:line`), the prior art to mirror, the exact build/test commands, and a
47
+ crisp success/verify criterion. A vague brief gets vague work back.
48
+ - Keep the tiers to their jobs. The orchestrator plans, decomposes, verifies, and
49
+ integrates; execution agents do bounded, fully-specified work and return the
50
+ result, not the intermediate detail. Match the tier to the work — execution
51
+ agents can be lighter/faster than the orchestrator. (Stated by role, not by
52
+ model name, so it survives model releases.)
53
+ - Verify on return; trust nothing unread. Each returned workstream is checked
54
+ against its stated success criterion (build, tests, a read of the diff) before
55
+ it is integrated — the orchestrator owns correctness of the whole.
56
+ - Produce the briefs with `/praxis-handoff` (run it per workstream), not by hand,
57
+ so each is self-contained. Dispatch a subagent per brief where the tool
58
+ supports subagents; where it does not, run the briefs inline in sequence or
59
+ hand them to a fresh session — same brief, different venue.
60
+ - Use judgment on whether to delegate at all. It pays off for multi-workstream or
61
+ context-heavy work; for a small single-thread change the briefing cost exceeds
62
+ the savings — just do it inline.
@@ -10,3 +10,9 @@ It is the single front gate: it sequences `praxis check` and fully delegates to
10
10
  `/praxis-instructions` (instruction layer) and `/praxis-wiki` (knowledge wiki). The
11
11
  command itself only sequences and reports; the sub-skills make any edits, each
12
12
  behind its own confirmation gate.
13
+
14
+ Run all three passes through the gate even when only one looks like it has work.
15
+ The gate exists so you do not pre-decide which passes are needed — the irrelevant
16
+ ones no-op cheaply, and skipping straight to a sub-skill because the others "look
17
+ like no-ops" is exactly the piecemeal use this rule prevents (it is how a pass
18
+ that did have work gets silently skipped).
@@ -46,4 +46,7 @@ unlike a tool's machine-local native memory.
46
46
  - Do wiki work by running `/praxis-wiki`, not by hand — bootstrapping, filing new
47
47
  knowledge, and linting all run the skill rather than hand-authoring pages and
48
48
  hand-editing `index.md`/`log.md` around it. It keeps the index, log, and anchors
49
- consistent.
49
+ consistent. When the wiki pass is part of reconciling the methodology layer
50
+ after a change, enter through the `/praxis-upkeep` front gate (which delegates
51
+ here) instead of running it alone; call `/praxis-wiki` directly only for a
52
+ deliberate single pass, e.g. first-run bootstrap.