@aacombarro89/praxis 0.1.8 → 0.1.9

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 (40) hide show
  1. package/README.md +26 -19
  2. package/dist/codex-marketplace.d.ts +19 -0
  3. package/dist/codex-marketplace.js +113 -0
  4. package/dist/codex-marketplace.js.map +1 -0
  5. package/dist/codex-security.d.ts +11 -0
  6. package/dist/codex-security.js +144 -0
  7. package/dist/codex-security.js.map +1 -0
  8. package/dist/emit.d.ts +14 -3
  9. package/dist/emit.js +122 -13
  10. package/dist/emit.js.map +1 -1
  11. package/dist/init.d.ts +16 -6
  12. package/dist/init.js +47 -10
  13. package/dist/init.js.map +1 -1
  14. package/dist/manifest.d.ts +2 -2
  15. package/dist/manifest.js +1 -1
  16. package/dist/manifest.js.map +1 -1
  17. package/dist/plugins.d.ts +14 -0
  18. package/dist/plugins.js +9 -0
  19. package/dist/plugins.js.map +1 -1
  20. package/dist/program.d.ts +3 -0
  21. package/dist/program.js +77 -31
  22. package/dist/program.js.map +1 -1
  23. package/dist/shared-instructions.d.ts +21 -0
  24. package/dist/shared-instructions.js +63 -0
  25. package/dist/shared-instructions.js.map +1 -0
  26. package/dist/sync.js +102 -6
  27. package/dist/sync.js.map +1 -1
  28. package/package.json +1 -1
  29. package/packages/external/ponytail/plugins.yaml +4 -1
  30. package/packages/layer1/instruction-upkeep/commands/instructions.md +14 -5
  31. package/packages/layer1/instruction-upkeep/rules.md +7 -3
  32. package/packages/layer1/onboarding/commands/onboard.md +42 -24
  33. package/packages/layer1/onboarding/rules.md +4 -4
  34. package/packages/layer1/safe-permissions/permissions.yaml +2 -2
  35. package/packages/layer1/session-handoff/commands/handoff.md +5 -5
  36. package/packages/layer1/session-handoff/rules.md +2 -2
  37. package/packages/layer1/upkeep/commands/upkeep.md +8 -5
  38. package/packages/layer1/upkeep/rules.md +8 -4
  39. package/packages/layer1/wiki-memory/commands/wiki.md +6 -6
  40. package/packages/layer1/wiki-memory/rules.md +4 -4
@@ -1,24 +1,37 @@
1
1
  ---
2
- description: Author the project-owned sections of CLAUDE.md for a fresh Praxis install build/run/test commands, layout, conventions, and always-do rules. One-shot: deletes .praxis-setup-pending when done.
2
+ description: Author project-owned agent instructions for a fresh Praxis install—build/run/test commands, layout, conventions, and always-do rules. One-shot: deletes .praxis-setup-pending when done.
3
3
  ---
4
4
 
5
- Scope: $ARGUMENTS
5
+ Scope: {{arguments}}
6
6
 
7
7
  This is the **first-run front gate** — the single entry point for a fresh Praxis
8
- install, symmetric to `/praxis-upkeep` (the ongoing front gate). It authors the
9
- **project-owned** sections of `CLAUDE.md`, then seeds the installed methodology
10
- packages, then hands off to `/praxis-upkeep` so the full baseline is established
8
+ install, symmetric to `{{workflow:praxis-upkeep}}` (the ongoing front gate). It authors
9
+ the **project-owned** agent instructions, then seeds the installed methodology
10
+ packages, then hands off to `{{workflow:praxis-upkeep}}` so the full baseline is established
11
11
  in one pass.
12
12
 
13
- Praxis never calls an LLM (D12); never edits `CLAUDE.md` directly (D13). The
13
+ Praxis never calls an LLM (D12) or authors project facts directly (D13). The
14
14
  **agent** writes the facts, guided by the steps below, asking the user for
15
15
  anything it cannot infer.
16
16
 
17
- 1. **Bulk discovery lean on the tool's native `/init` first.** If `CLAUDE.md`
18
- does not yet exist (or is empty), suggest running the tool's built-in `/init`
19
- command so the model can auto-discover repository facts (files, build config,
20
- README). Incorporate any useful output into the project-owned sections below,
21
- rather than restating it from scratch.
17
+ 1. **Choose the project instruction surfaces from `praxis.yaml`.** For a Codex-only
18
+ install, author project facts as free prose outside managed blocks in `AGENTS.md`.
19
+ For Claude-only, retain the existing `CLAUDE.md` flow. When both are selected,
20
+ maintain both native files as peers never make either import or replace the
21
+ other. Put facts shared by both tools inside exactly one project-owned block in
22
+ each file, with identical content and these marker lines:
23
+
24
+ ```markdown
25
+ <!-- praxis:shared-project begin -->
26
+ ...shared project facts...
27
+ <!-- praxis:shared-project end -->
28
+ ```
29
+
30
+ The markers declare a parity contract, not Praxis ownership: the project owns
31
+ the prose and both native files remain complete if Praxis is removed. Guidance
32
+ outside this block may differ by target. If the active tool offers a native
33
+ repository initialization workflow, suggest it for bulk discovery and
34
+ incorporate useful output rather than re-deriving it.
22
35
 
23
36
  2. **Check detected stacks (if known).** Read `praxis.yaml` for the `stacks:`
24
37
  field. If stacks are declared, tailor the sections below to those stacks (e.g.
@@ -44,30 +57,35 @@ anything it cannot infer.
44
57
  short; a long always-do list is never read.
45
58
 
46
59
  4. **Ask the user for anything not inferable.** If a section can't be filled from
47
- config files, git history, or the `/init` output, ask a targeted question
48
- rather than inventing a plausible answer. Content inclusion bar: a fact only
49
- enters if it's backed by the code, config, a canonical doc, or the user.
60
+ config files, git history, or the native initialization workflow's output, ask
61
+ a targeted question rather than inventing a plausible answer. Content
62
+ inclusion bar: a fact only enters if it's backed by the code, config, a
63
+ canonical doc, or the user.
50
64
 
51
65
  5. **Write only project-owned content.** Never put content inside a Praxis
52
- managed block (a `<!-- praxis-start … -->` / `<!-- praxis-end … -->` region).
53
- Project facts belong in the free-prose sections the author controls; Praxis
54
- owns only its own managed blocks.
66
+ managed block (a `<!-- praxis:begin … -->` / `<!-- praxis:end … -->` region).
67
+ Project facts belong in the free-prose sections the author controls; the
68
+ unhashed `praxis:shared-project` block is also project-owned. Praxis owns only
69
+ its hashed managed blocks. When both native files are selected, write the four
70
+ rubric sections to both shared blocks in one edit and keep their content exact.
55
71
 
56
72
  6. **Run each installed companion bootstrap action** (each seeds part of the
57
- methodology), then hand off to `/praxis-upkeep`:
73
+ methodology), then hand off to `{{workflow:praxis-upkeep}}`:
58
74
 
59
75
  <!-- praxis:bootstrap-delegations -->
60
76
 
61
- After the bootstrap actions above complete, run `/praxis-upkeep` to confirm
62
- the full methodology baseline is in sync. If `/praxis-upkeep` is not
77
+ After the bootstrap actions above complete, run `{{workflow:praxis-upkeep}}` to confirm
78
+ the full methodology baseline is in sync. If `{{workflow:praxis-upkeep}}` is not
63
79
  installed, skip this step.
64
80
 
65
81
  7. **Delete `.praxis-setup-pending`** to make this one-shot. Once the rubric
66
- sections are authored and the user is satisfied, remove the sentinel file
67
- from the repo root. This prevents the bootstrap rule (`.claude/rules/
68
- praxis-onboarding.md`) from re-offering onboarding on the next session.
82
+ sections are authored, the bootstrap actions and upkeep pass above have run,
83
+ and the user is satisfied, remove the sentinel file from the repo root. This
84
+ prevents the bootstrap rule from re-offering onboarding on the next session
85
+ deleting it any earlier would leave an interrupted session with no re-offer
86
+ and an unseeded baseline.
69
87
 
70
88
  8. **Report what was written / left.** Summarise which rubric sections were
71
89
  filled, which were left empty (and why — e.g. "no build step detected"), and
72
90
  any follow-up items for the user. The baseline is now established; from here
73
- `/praxis-upkeep` keeps the methodology layer current.
91
+ `{{workflow:praxis-upkeep}}` keeps the methodology layer current.
@@ -1,10 +1,10 @@
1
1
  ## First-run onboarding
2
2
 
3
3
  At the start of work, check for the `.praxis-setup-pending` sentinel file in
4
- the repo root: present means a fresh Praxis install whose project-owned
5
- `CLAUDE.md` sections aren't authored yet.
4
+ the repo root: present means a fresh Praxis install whose project-owned agent
5
+ instruction sections aren't authored yet.
6
6
 
7
- - **Present:** offer to run `/praxis-onboard`; it deletes the sentinel on
7
+ - **Present:** offer to run `{{workflow:praxis-onboard}}`; it deletes the sentinel on
8
8
  completion, making this check one-shot. Never nag when absent.
9
- - **Absent:** do nothing here — `/praxis-upkeep` (ongoing front gate, D29/D31)
9
+ - **Absent:** do nothing here — `{{workflow:praxis-upkeep}}` (ongoing front gate, D29/D31)
10
10
  handles currency after initial setup.
@@ -1,7 +1,7 @@
1
1
  # Neutral permission policy — the enforcement side of the rails
2
2
  # (docs/wiki/emitters.md, D18/D19). Tool-agnostic INTENT expressed as capabilities; per-tool emitters
3
- # translate to concrete rule strings (Claude Code today; tools without a
4
- # permission model emit nothing). Edit your own settings to tune — Praxis owns
3
+ # translate to target-native Claude Code and Codex controls; tools without a
4
+ # permission model emit nothing. Edit your own settings to tune — Praxis owns
5
5
  # only the rules it emits and never clobbers rules you add.
6
6
  #
7
7
  # Posture: allow common local dev (smooth); prompt before anything that leaves the
@@ -46,10 +46,10 @@ single-doc flow below.
46
46
 
47
47
  Read the clock so the name sorts chronologically (do not guess the time):
48
48
 
49
- - Timestamp: !`date +%Y-%m-%d_%H%M`
49
+ - Timestamp: {{shell:date +%Y-%m-%d_%H%M}}
50
50
 
51
51
  Build the filename `YYYY-MM-DD_HHMM_HANDOFF_<topic>.md`:
52
- - `<topic>` is a short kebab-case slug for the work. Use `$ARGUMENTS` if
52
+ - `<topic>` is a short kebab-case slug for the work. Use {{arguments}} if
53
53
  provided; otherwise derive it from the task.
54
54
  - Date-and-time first means a plain alphabetical listing is chronological.
55
55
 
@@ -73,9 +73,9 @@ references* section below. Don't re-derive them; you already paid for them.
73
73
  If in a git repo, capture current branch, staged/unstaged changes, and recent
74
74
  commits from this session:
75
75
 
76
- - Branch: !`git branch --show-current 2>/dev/null`
77
- - Status: !`git status --short 2>/dev/null`
78
- - Recent commits: !`git log --oneline -10 2>/dev/null`
76
+ - Branch: {{shell:git branch --show-current 2>/dev/null}}
77
+ - Status: {{shell:git status --short 2>/dev/null}}
78
+ - Recent commits: {{shell:git log --oneline -10 2>/dev/null}}
79
79
 
80
80
  Capture verification state too: identify the project's own build/test/lint
81
81
  commands (from its config / docs / CI) and record their current result — what
@@ -2,7 +2,7 @@
2
2
 
3
3
  Work outlives a single session: at a natural boundary in a verified state —
4
4
  never mid-edit — capture context before it's lost. Write handoffs by running
5
- `/praxis-handoff`, not by hand; it's the next session's only briefing.
5
+ `{{workflow:praxis-handoff}}`, not by hand; it's the next session's only briefing.
6
6
 
7
7
  ## Delegated execution
8
8
 
@@ -11,5 +11,5 @@ neither requiring parallelism: **independent workstreams** (specifiable up
11
11
  front, no mid-flight coordination) and **context/budget isolation** (a
12
12
  context-heavy or mechanical run worth its own context and a lighter tier —
13
13
  holds even for one sequential stream). Name the split at plan time. Produce
14
- each brief with `/praxis-handoff`, not by hand, and verify a returned
14
+ each brief with `{{workflow:praxis-handoff}}`, not by hand, and verify a returned
15
15
  workstream against its success criterion before integrating it.
@@ -4,18 +4,21 @@ argument-hint: [optional-area-to-focus]
4
4
  allowed-tools: Bash(npx @aacombarro89/praxis@latest check:*), Bash(npx @aacombarro89/praxis@latest sync:*), Bash(npx @aacombarro89/praxis check:*), Bash(npx @aacombarro89/praxis sync:*), Bash(praxis check:*), Bash(praxis sync:*)
5
5
  ---
6
6
 
7
- Focus: $ARGUMENTS — if empty, cover all three passes at a high level.
7
+ Focus: {{arguments}} — if empty, cover all three passes at a high level.
8
8
 
9
9
  This is the single entry point for "is my methodology layer still current
10
10
  with reality?" It sequences three existing checks rather than re-implementing
11
11
  them — restating their logic here would duplicate content that drifts
12
12
  independently of its canonical home.
13
13
 
14
- 1. **Deterministic drift.** Run `praxis check` if the CLI is on PATH; otherwise
14
+ 1. **Deterministic drift.** Run `praxis check` if the CLI is on PATH. Otherwise
15
15
  fall back to `npx @aacombarro89/praxis@latest check` (pin `@latest` — a bare
16
16
  `npx @aacombarro89/praxis` can silently reuse a stale cached build). If it
17
17
  reports file drift, run `praxis sync` (or `npx @aacombarro89/praxis@latest
18
- sync`) to fix it. Surface managed-block conflicts or broken anchors as-is.
18
+ sync`) to fix it. Surface managed-block conflicts, shared-project parity
19
+ drift, or broken anchors as-is. `sync` fixes generated artifacts but must
20
+ never choose a winner between project-owned `CLAUDE.md` and `AGENTS.md`
21
+ blocks; route that drift to the instruction pass below.
19
22
  This step needs no LLM judgment — do it first so the semantic passes below
20
23
  build on a known-good baseline. **If the CLI is unavailable even via npx,
21
24
  skip only this step and proceed with steps 2 and 3 — do not skip the entire
@@ -27,10 +30,10 @@ independently of its canonical home.
27
30
  invalid-manifest message), the check did not fully run — report that as a
28
31
  failure, never as "0 checked, all fine".** A stale npx-cached CLI is the usual
29
32
  cause; re-run pinned to `@latest`, and note the version if it still lags.
30
- 2. **Instruction layer.** Perform the update defined by `/praxis-instructions`,
33
+ 2. **Instruction layer.** Perform the update defined by `{{workflow:praxis-instructions}}`,
31
34
  scoped to the focus above. Follow that command's own steps; do not
32
35
  re-derive them here.
33
- 3. **Wiki.** Perform the wiki maintenance defined by `/praxis-wiki`, scoped to
36
+ 3. **Wiki.** Perform the wiki maintenance defined by `{{workflow:praxis-wiki}}`, scoped to
34
37
  the focus above — it files newly-authored knowledge and lints existing pages,
35
38
  and no-ops when there is nothing to do. Follow that command's own steps; do
36
39
  not re-derive them here. (Full delegation, symmetric with the audit pass —
@@ -1,10 +1,14 @@
1
1
  ## Upkeep
2
2
 
3
- The methodology layer (instructions, wiki, emitted `.claude/` files) drifts
3
+ The methodology layer (instructions, wiki, emitted agent files) drifts
4
4
  from project reality like code drifts from docs. When work reveals drift, or
5
- produces new durable knowledge to file, run `/praxis-upkeep` — the single
6
- front gate sequencing `praxis check`, `/praxis-instructions`, and
7
- `/praxis-wiki` — rather than fixing it ad hoc or piecemeal.
5
+ produces new durable knowledge to file, run `{{workflow:praxis-upkeep}}` — the single
6
+ front gate sequencing `praxis check`, `{{workflow:praxis-instructions}}`, and
7
+ `{{workflow:praxis-wiki}}` — rather than fixing it ad hoc or piecemeal.
8
+
9
+ When Claude Code and Codex coexist, this gate covers both native instruction
10
+ surfaces. Keep their project-owned shared sections synchronized while preserving
11
+ target-specific guidance; never make one surface import or replace the other.
8
12
 
9
13
  Run all three passes through the gate even when only one looks like it has
10
14
  work — skipping straight to a sub-skill is the piecemeal use this rule
@@ -10,8 +10,8 @@ You are curating a durable knowledge wiki for this project: linked markdown page
10
10
  of long-lived knowledge that a future session reads instead of re-deriving. This
11
11
  is the agent's cross-session memory **of the project** — version-controlled and
12
12
  shared with the team. It is NOT a per-session handoff (transient — that is
13
- `/praxis-handoff`) and NOT the authored instruction layer (`CLAUDE.md`,
14
- `.claude/rules` — that is `/praxis-instructions`).
13
+ `{{workflow:praxis-handoff}}`) and NOT the authored agent instruction layer
14
+ (that is `{{workflow:praxis-instructions}}`).
15
15
 
16
16
  The wiki has two kinds of durable knowledge:
17
17
  - **Derived summaries** compress code, config, and canonical docs. The underlying
@@ -21,7 +21,7 @@ The wiki has two kinds of durable knowledge:
21
21
  diverge, surface the drift for human judgment instead of silently overwriting
22
22
  one with the other.
23
23
 
24
- Focus: $ARGUMENTS — if empty, refresh and lint the whole wiki at a high level.
24
+ Focus: {{arguments}} — if empty, refresh and lint the whole wiki at a high level.
25
25
 
26
26
  ## Phase 1 — Locate or create the wiki
27
27
 
@@ -31,8 +31,8 @@ Use the first of these that already exists; otherwise create the first one
31
31
  2. `wiki/`
32
32
  3. `.praxis/wiki/`
33
33
 
34
- - Existing entries: !`ls -R docs/wiki wiki .praxis/wiki 2>/dev/null || true`
35
- - Today (for log entries, do not guess): !`date +%Y-%m-%d`
34
+ - Existing entries: {{shell:ls -R docs/wiki wiki .praxis/wiki 2>/dev/null || true}}
35
+ - Today (for log entries, do not guess): {{shell:date +%Y-%m-%d}}
36
36
 
37
37
  Front the wiki with two entry-point files; create them if missing:
38
38
  - `index.md` — a catalog of every page: a link and a one-line summary each.
@@ -81,7 +81,7 @@ Health-check the wiki and fix what you can (ask before large deletions):
81
81
  - **Contradictions** — derived summaries that disagree with current code/config
82
82
  lose to the source; fix the wiki. Canonical-intent entries are different: if
83
83
  code and intent diverge, report the drift and route it to a decision/update
84
- step (or `/praxis-instructions` for instruction-layer changes) instead of deciding
84
+ step (or `{{workflow:praxis-instructions}}` for instruction-layer changes) instead of deciding
85
85
  automatically. Two wiki entries that disagree resolve to the more recent /
86
86
  authoritative / better-supported claim, with the resolution noted.
87
87
  - **Stale claims** — derived facts the current code has invalidated: fix or
@@ -2,13 +2,13 @@
2
2
 
3
3
  Knowledge outlives a single conversation. Keep a durable, in-repo knowledge
4
4
  wiki — linked markdown pages a future session reads instead of re-deriving —
5
- distinct from a handoff (transient) and from `CLAUDE.md`/`.claude/rules`
6
- (authored instructions). At the start of a task, read the wiki's `index.md`
5
+ distinct from a handoff (transient) and from authored agent instructions
6
+ (the instruction layer). At the start of a task, read the wiki's `index.md`
7
7
  and follow the links that bear on the work.
8
8
 
9
9
  When you learn something durable — an architecture fact, a gotcha, a decision,
10
10
  a workflow — file or update it, and periodically lint the wiki for
11
- contradictions and staleness. Do this by running `/praxis-wiki`, not by hand.
11
+ contradictions and staleness. Do this by running `{{workflow:praxis-wiki}}`, not by hand.
12
12
  When reconciling the methodology layer after a change, enter through
13
- `/praxis-upkeep`; call `/praxis-wiki` directly only for a deliberate single
13
+ `{{workflow:praxis-upkeep}}`; call `{{workflow:praxis-wiki}}` directly only for a deliberate single
14
14
  pass (e.g. first-run bootstrap).