@aacombarro89/praxis 0.1.4 → 0.1.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/dist/program.d.ts +24 -0
- package/dist/program.js +67 -20
- package/dist/program.js.map +1 -1
- package/package.json +1 -1
- package/packages/layer1/instruction-upkeep/rules.md +3 -1
- package/packages/layer1/session-handoff/commands/handoff.md +12 -9
- package/packages/layer1/session-handoff/rules.md +30 -18
- package/packages/layer1/upkeep/commands/upkeep.md +16 -7
- package/packages/layer1/upkeep/rules.md +6 -0
- package/packages/layer1/wiki-memory/rules.md +4 -1
package/dist/program.d.ts
CHANGED
|
@@ -1,2 +1,26 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
import { type AnchorCheckReport } from "./anchors.js";
|
|
3
|
+
import { type SyncReport } from "./sync.js";
|
|
4
|
+
/** This CLI's own version, read from its shipped package.json (falls back to "unknown"). */
|
|
5
|
+
export declare function praxisVersion(): string;
|
|
6
|
+
export interface ReconcileResult {
|
|
7
|
+
version: string;
|
|
8
|
+
syncReport?: SyncReport;
|
|
9
|
+
/** Set when the manifest could not be resolved (e.g. an unknown package). */
|
|
10
|
+
syncError?: string;
|
|
11
|
+
/** Present only in check mode. */
|
|
12
|
+
anchorReport?: AnchorCheckReport;
|
|
13
|
+
exitCode: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Pure orchestration for `sync`/`check`, split out from console I/O so the
|
|
17
|
+
* decoupling below is testable (conformance/anchors.conformance.test.ts).
|
|
18
|
+
*
|
|
19
|
+
* The knowledge-anchor tripwire reads markdown only — it needs nothing from the
|
|
20
|
+
* manifest — so in check mode it runs even when `runSync` throws. A stale or
|
|
21
|
+
* incompatible CLI (e.g. an old npx-cached build that can't resolve today's
|
|
22
|
+
* `praxis.yaml`) must still report whether cited repo reality resolves, rather
|
|
23
|
+
* than silently skipping the check and leaving the tripwire dark. (D40)
|
|
24
|
+
*/
|
|
25
|
+
export declare function reconcile(cwd: string, write: boolean, mode: "sync" | "check"): ReconcileResult;
|
|
2
26
|
export declare function buildProgram(): Command;
|
package/dist/program.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
1
4
|
import { cancel, confirm, intro, isCancel, multiselect, note, outro, select } from "@clack/prompts";
|
|
2
5
|
import { Command } from "commander";
|
|
3
6
|
import { checkAnchors } from "./anchors.js";
|
|
@@ -37,32 +40,76 @@ function formatAnchorReport(report) {
|
|
|
37
40
|
return `\nBroken knowledge anchors:\n${diagnostics}`;
|
|
38
41
|
}
|
|
39
42
|
// --- sync / check ---------------------------------------------------------
|
|
40
|
-
|
|
43
|
+
/** This CLI's own version, read from its shipped package.json (falls back to "unknown"). */
|
|
44
|
+
export function praxisVersion() {
|
|
41
45
|
try {
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
const pkgPath = join(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
|
|
47
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
48
|
+
const version = pkg.version;
|
|
49
|
+
return typeof version === "string" ? version : "unknown";
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return "unknown";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Pure orchestration for `sync`/`check`, split out from console I/O so the
|
|
57
|
+
* decoupling below is testable (conformance/anchors.conformance.test.ts).
|
|
58
|
+
*
|
|
59
|
+
* The knowledge-anchor tripwire reads markdown only — it needs nothing from the
|
|
60
|
+
* manifest — so in check mode it runs even when `runSync` throws. A stale or
|
|
61
|
+
* incompatible CLI (e.g. an old npx-cached build that can't resolve today's
|
|
62
|
+
* `praxis.yaml`) must still report whether cited repo reality resolves, rather
|
|
63
|
+
* than silently skipping the check and leaving the tripwire dark. (D40)
|
|
64
|
+
*/
|
|
65
|
+
export function reconcile(cwd, write, mode) {
|
|
66
|
+
const version = praxisVersion();
|
|
67
|
+
let syncReport;
|
|
68
|
+
let syncError;
|
|
69
|
+
let exitCode = 0;
|
|
70
|
+
try {
|
|
71
|
+
syncReport = runSync({ cwd, write });
|
|
72
|
+
if (mode === "check" ? syncReport.changed || syncReport.hasConflicts : syncReport.hasConflicts) {
|
|
73
|
+
exitCode = 1;
|
|
51
74
|
}
|
|
52
|
-
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
syncError = err.message;
|
|
78
|
+
exitCode = 1;
|
|
79
|
+
}
|
|
80
|
+
let anchorReport;
|
|
81
|
+
if (mode === "check") {
|
|
82
|
+
anchorReport = checkAnchors(cwd);
|
|
83
|
+
if (!anchorReport.ok)
|
|
84
|
+
exitCode = 1;
|
|
85
|
+
}
|
|
86
|
+
return { version, syncReport, syncError, anchorReport, exitCode };
|
|
87
|
+
}
|
|
88
|
+
function runReconcile(write, mode) {
|
|
89
|
+
const result = reconcile(process.cwd(), write, mode);
|
|
90
|
+
// Surface the running version in check output so a stale npx-cached build is
|
|
91
|
+
// visible instead of silently under-reporting (D40).
|
|
92
|
+
if (mode === "check")
|
|
93
|
+
console.log(`praxis v${result.version}`);
|
|
94
|
+
if (result.syncError) {
|
|
95
|
+
console.error(`praxis: ${result.syncError}`);
|
|
96
|
+
}
|
|
97
|
+
else if (result.syncReport) {
|
|
98
|
+
console.log(formatPlan(result.syncReport, mode));
|
|
99
|
+
if (result.syncReport.hasConflicts) {
|
|
53
100
|
console.error("\nConflicts: you edited Praxis-managed content. It was left untouched.\n" +
|
|
54
101
|
"Resolve by promoting the change upstream or moving it outside the managed block.");
|
|
55
102
|
}
|
|
56
|
-
if (mode === "check"
|
|
57
|
-
? report.changed || report.hasConflicts || !anchorReport?.ok
|
|
58
|
-
: report.hasConflicts) {
|
|
59
|
-
process.exitCode = 1;
|
|
60
|
-
}
|
|
61
103
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
104
|
+
if (result.anchorReport) {
|
|
105
|
+
const output = formatAnchorReport(result.anchorReport);
|
|
106
|
+
if (result.anchorReport.ok)
|
|
107
|
+
console.log(output);
|
|
108
|
+
else
|
|
109
|
+
console.error(output);
|
|
65
110
|
}
|
|
111
|
+
if (result.exitCode !== 0)
|
|
112
|
+
process.exitCode = result.exitCode;
|
|
66
113
|
}
|
|
67
114
|
// --- init -----------------------------------------------------------------
|
|
68
115
|
async function runInit(opts) {
|
|
@@ -211,7 +258,7 @@ export function buildProgram() {
|
|
|
211
258
|
program
|
|
212
259
|
.name("praxis")
|
|
213
260
|
.description("Install and sync an AI methodology layer into a codebase.")
|
|
214
|
-
.version(
|
|
261
|
+
.version(praxisVersion());
|
|
215
262
|
program
|
|
216
263
|
.command("init", { isDefault: true })
|
|
217
264
|
.description("Install the methodology layer (detect, preview, confirm, write).")
|
package/dist/program.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAA0B,MAAM,cAAc,CAAC;AACpE,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,MAAM,EAA0C,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,OAAO,EAAoC,MAAM,WAAW,CAAC;AA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G,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAE9C,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -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.
|
|
@@ -24,17 +24,20 @@ The brief serves two readers, and the same document works for both:
|
|
|
24
24
|
## Delegation mode
|
|
25
25
|
|
|
26
26
|
By default this command writes one combined handoff for resuming the whole task.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
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.
|
|
34
37
|
- Name each file for its workstream: `YYYY-MM-DD_HHMM_HANDOFF_<workstream>.md`, so
|
|
35
38
|
the set sorts together and each is identifiable.
|
|
36
|
-
- Keep workstreams
|
|
37
|
-
|
|
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.
|
|
38
41
|
|
|
39
42
|
Everything else (sections, discipline, save location) is identical to the
|
|
40
43
|
single-doc flow below.
|
|
@@ -21,30 +21,42 @@ the current conversation in memory, can resume without guessing or re-deriving.
|
|
|
21
21
|
|
|
22
22
|
## Delegated execution
|
|
23
23
|
|
|
24
|
-
A handoff brief is not only for the *next* session — it is also the briefing
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
29
|
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
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.
|
|
33
44
|
- Brief each workstream as a self-contained context cache — the same discipline
|
|
34
45
|
as a handoff. An execution agent starts cold: give it the load-bearing files
|
|
35
46
|
(`path:line`), the prior art to mirror, the exact build/test commands, and a
|
|
36
47
|
crisp success/verify criterion. A vague brief gets vague work back.
|
|
37
48
|
- Keep the tiers to their jobs. The orchestrator plans, decomposes, verifies, and
|
|
38
|
-
integrates;
|
|
39
|
-
|
|
40
|
-
orchestrator. (Stated by role, not by
|
|
41
|
-
releases.)
|
|
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.)
|
|
42
53
|
- Verify on return; trust nothing unread. Each returned workstream is checked
|
|
43
54
|
against its stated success criterion (build, tests, a read of the diff) before
|
|
44
55
|
it is integrated — the orchestrator owns correctness of the whole.
|
|
45
|
-
- Produce the briefs with `/praxis-handoff` (run it per workstream), not by hand
|
|
46
|
-
so each is self-contained
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Run the deterministic drift check plus the instruction-layer audit and wiki maintenance passes, and report one consolidated result.
|
|
3
3
|
argument-hint: [optional-area-to-focus]
|
|
4
|
-
allowed-tools: Bash(npx @aacombarro89/praxis check:*), Bash(npx @aacombarro89/praxis sync:*), Bash(praxis check:*), Bash(praxis sync:*)
|
|
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
7
|
Focus: $ARGUMENTS — if empty, cover all three passes at a high level.
|
|
@@ -12,12 +12,21 @@ them — restating their logic here would duplicate content that drifts
|
|
|
12
12
|
independently of its canonical home.
|
|
13
13
|
|
|
14
14
|
1. **Deterministic drift.** Run `praxis check` if the CLI is on PATH; otherwise
|
|
15
|
-
fall back to `npx @aacombarro89/praxis check
|
|
16
|
-
`
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
fall back to `npx @aacombarro89/praxis@latest check` (pin `@latest` — a bare
|
|
16
|
+
`npx @aacombarro89/praxis` can silently reuse a stale cached build). If it
|
|
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.
|
|
19
|
+
This step needs no LLM judgment — do it first so the semantic passes below
|
|
20
|
+
build on a known-good baseline. **If the CLI is unavailable even via npx,
|
|
21
|
+
skip only this step and proceed with steps 2 and 3 — do not skip the entire
|
|
22
|
+
pass.**
|
|
23
|
+
|
|
24
|
+
Read the output, don't just check the exit code. A completed check prints a
|
|
25
|
+
`praxis v<version>` line and a `Knowledge anchors: <N> checked` line. **If the
|
|
26
|
+
anchor line is absent, or the command errored (e.g. an unknown-package or
|
|
27
|
+
invalid-manifest message), the check did not fully run — report that as a
|
|
28
|
+
failure, never as "0 checked, all fine".** A stale npx-cached CLI is the usual
|
|
29
|
+
cause; re-run pinned to `@latest`, and note the version if it still lags.
|
|
21
30
|
2. **Instruction layer.** Perform the update defined by `/praxis-instructions`,
|
|
22
31
|
scoped to the focus above. Follow that command's own steps; do not
|
|
23
32
|
re-derive them here.
|
|
@@ -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.
|