@cratylus/canon 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/agents/architect.js +14 -108
  2. package/dist/agents/architect.js.map +1 -1
  3. package/dist/agents/assayer.d.ts +2 -0
  4. package/dist/agents/assayer.js +20 -0
  5. package/dist/agents/assayer.js.map +1 -0
  6. package/dist/agents/implementer.js +9 -69
  7. package/dist/agents/implementer.js.map +1 -1
  8. package/dist/agents/kino.js +24 -110
  9. package/dist/agents/kino.js.map +1 -1
  10. package/dist/agents/mav.js +43 -79
  11. package/dist/agents/mav.js.map +1 -1
  12. package/dist/agents/nico.js +33 -61
  13. package/dist/agents/nico.js.map +1 -1
  14. package/dist/agents/planner.js +8 -80
  15. package/dist/agents/planner.js.map +1 -1
  16. package/dist/dimensions/autonomy/human-on-the-loop.js +1 -1
  17. package/dist/dimensions/autonomy/human-on-the-loop.js.map +1 -1
  18. package/dist/dimensions/role/architect.js +19 -1
  19. package/dist/dimensions/role/architect.js.map +1 -1
  20. package/dist/dimensions/role/{build.d.ts → assayer.d.ts} +1 -1
  21. package/dist/dimensions/role/assayer.js +25 -0
  22. package/dist/dimensions/role/assayer.js.map +1 -0
  23. package/dist/dimensions/role/{diagnose.d.ts → implementer.d.ts} +1 -1
  24. package/dist/dimensions/role/implementer.js +12 -0
  25. package/dist/dimensions/role/implementer.js.map +1 -0
  26. package/dist/dimensions/role/{curate.d.ts → planner.d.ts} +1 -1
  27. package/dist/dimensions/role/planner.js +14 -0
  28. package/dist/dimensions/role/planner.js.map +1 -0
  29. package/dist/hook-cells.js +5 -2
  30. package/dist/hook-cells.js.map +1 -1
  31. package/dist/hooks/deploy-drift-notice.js +1 -1
  32. package/dist/hooks/deploy-drift-notice.js.map +1 -1
  33. package/dist/hooks/purview-guardrail.d.ts +2 -0
  34. package/dist/hooks/purview-guardrail.js +302 -0
  35. package/dist/hooks/purview-guardrail.js.map +1 -0
  36. package/dist/hooks/stance-guardrail-pre.js +17 -22
  37. package/dist/hooks/stance-guardrail-pre.js.map +1 -1
  38. package/dist/hooks/stance-guardrail.js +84 -27
  39. package/dist/hooks/stance-guardrail.js.map +1 -1
  40. package/dist/plan-states.d.ts +3 -3
  41. package/dist/plan-states.js +3 -3
  42. package/dist/roles/architect.d.ts +2 -0
  43. package/dist/roles/architect.js +101 -0
  44. package/dist/roles/architect.js.map +1 -0
  45. package/dist/roles/assayer.d.ts +2 -0
  46. package/dist/roles/assayer.js +66 -0
  47. package/dist/roles/assayer.js.map +1 -0
  48. package/dist/roles/hold.d.ts +57 -0
  49. package/dist/roles/hold.js +105 -0
  50. package/dist/roles/hold.js.map +1 -0
  51. package/dist/roles/implementer.d.ts +2 -0
  52. package/dist/roles/implementer.js +60 -0
  53. package/dist/roles/implementer.js.map +1 -0
  54. package/dist/roles/planner.d.ts +2 -0
  55. package/dist/roles/planner.js +70 -0
  56. package/dist/roles/planner.js.map +1 -0
  57. package/dist/skills/carry-on/skill.js +2 -2
  58. package/dist/skills/carry-on/skill.js.map +1 -1
  59. package/dist/skills/deliver/skill.js +41 -3
  60. package/dist/skills/deliver/skill.js.map +1 -1
  61. package/package.json +3 -6
  62. package/dist/dimensions/role/build.js +0 -2
  63. package/dist/dimensions/role/build.js.map +0 -1
  64. package/dist/dimensions/role/converse.d.ts +0 -2
  65. package/dist/dimensions/role/converse.js +0 -2
  66. package/dist/dimensions/role/converse.js.map +0 -1
  67. package/dist/dimensions/role/curate.js +0 -2
  68. package/dist/dimensions/role/curate.js.map +0 -1
  69. package/dist/dimensions/role/diagnose.js +0 -2
  70. package/dist/dimensions/role/diagnose.js.map +0 -1
  71. package/dist/dimensions/role/document.d.ts +0 -2
  72. package/dist/dimensions/role/document.js +0 -2
  73. package/dist/dimensions/role/document.js.map +0 -1
  74. package/dist/dimensions/role/implement.d.ts +0 -2
  75. package/dist/dimensions/role/implement.js +0 -2
  76. package/dist/dimensions/role/implement.js.map +0 -1
  77. package/dist/dimensions/role/operate.d.ts +0 -2
  78. package/dist/dimensions/role/operate.js +0 -2
  79. package/dist/dimensions/role/operate.js.map +0 -1
  80. package/dist/dimensions/role/orchestrate.d.ts +0 -2
  81. package/dist/dimensions/role/orchestrate.js +0 -2
  82. package/dist/dimensions/role/orchestrate.js.map +0 -1
  83. package/dist/dimensions/role/plan.d.ts +0 -2
  84. package/dist/dimensions/role/plan.js +0 -2
  85. package/dist/dimensions/role/plan.js.map +0 -1
  86. package/dist/dimensions/role/research.d.ts +0 -2
  87. package/dist/dimensions/role/research.js +0 -2
  88. package/dist/dimensions/role/research.js.map +0 -1
  89. package/dist/dimensions/role/review.d.ts +0 -2
  90. package/dist/dimensions/role/review.js +0 -2
  91. package/dist/dimensions/role/review.js.map +0 -1
  92. package/dist/dimensions/role/test.d.ts +0 -2
  93. package/dist/dimensions/role/test.js +0 -2
  94. package/dist/dimensions/role/test.js.map +0 -1
  95. package/dist/hooks/praxis-continuity.d.ts +0 -2
  96. package/dist/hooks/praxis-continuity.js +0 -132
  97. package/dist/hooks/praxis-continuity.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratylus/canon",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "The canonical corpus of discovered optimal-signifiers — agents, skills, dimensions and rules as typed TS source. Markdown is a projection of these modules.",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -21,7 +21,7 @@
21
21
  "@cratylus/schema": "0.2.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@cratylus/forge": "0.5.0",
24
+ "@cratylus/forge": "0.6.0",
25
25
  "@cratylus/runtime": "0.2.0",
26
26
  "@cratylus/tooling": "0.0.0",
27
27
  "@types/node": "^22.0.0",
@@ -55,13 +55,10 @@
55
55
  "scripts": {
56
56
  "build": "pnpm run clean && tsc -p tsconfig.build.json",
57
57
  "clean": "rm -rf dist",
58
- "continuity": "sh targets/continuity/continuity-hook.sh",
59
58
  "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
60
- "oracle": "sh tooling/render-oracle/render-oracle.sh check",
61
- "oracle:update": "sh tooling/render-oracle/render-oracle.sh update",
62
59
  "pack:smoke": "tsx tooling/pack-smoke/pack-smoke-cli.ts",
63
60
  "plan-set": "tsx tooling/plan-set-cli.ts",
64
- "praxis": "sh tooling/praxis/praxis.sh",
61
+ "plan": "sh tooling/plan-set/plan-set.sh",
65
62
  "project:targets": "tsx tooling/project-targets-cli.ts",
66
63
  "scaffold": "tsx tooling/scaffold-cli.ts",
67
64
  "stance-guard:test": "sh test/support/guardrail/test-stance-guardrail.sh",
@@ -1,2 +0,0 @@
1
- export const build = `build ≜ ⟨conceive design produce deliver⟩`;
2
- //# sourceMappingURL=build.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/dimensions/role/build.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAS,2CAA2C,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Role } from '../../manifest.js';
2
- export declare const converse: Role;
@@ -1,2 +0,0 @@
1
- export const converse = `converse ≜ dialogue ⟨the-deliverable⟩`;
2
- //# sourceMappingURL=converse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converse.js","sourceRoot":"","sources":["../../../src/dimensions/role/converse.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAS,uCAAuC,CAAC"}
@@ -1,2 +0,0 @@
1
- export const curate = `curate ≜ ⟨canonical-corpus⟩`;
2
- //# sourceMappingURL=curate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"curate.js","sourceRoot":"","sources":["../../../src/dimensions/role/curate.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAS,6BAA6B,CAAC"}
@@ -1,2 +0,0 @@
1
- export const diagnose = `diagnose`;
2
- //# sourceMappingURL=diagnose.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"diagnose.js","sourceRoot":"","sources":["../../../src/dimensions/role/diagnose.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAS,UAAU,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Role } from '../../manifest.js';
2
- export declare const document: Role;
@@ -1,2 +0,0 @@
1
- export const document = `document ≜ ⟨reader-facing explanatory⟩`;
2
- //# sourceMappingURL=document.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../src/dimensions/role/document.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAS,wCAAwC,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Role } from '../../manifest.js';
2
- export declare const implement: Role;
@@ -1,2 +0,0 @@
1
- export const implement = `implement`;
2
- //# sourceMappingURL=implement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"implement.js","sourceRoot":"","sources":["../../../src/dimensions/role/implement.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAS,WAAW,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Role } from '../../manifest.js';
2
- export declare const operate: Role;
@@ -1,2 +0,0 @@
1
- export const operate = `operate ≜ live-system ⟨steady-state⟩`;
2
- //# sourceMappingURL=operate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operate.js","sourceRoot":"","sources":["../../../src/dimensions/role/operate.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAS,sCAAsC,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Role } from '../../manifest.js';
2
- export declare const orchestrate: Role;
@@ -1,2 +0,0 @@
1
- export const orchestrate = `orchestrate`;
2
- //# sourceMappingURL=orchestrate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"orchestrate.js","sourceRoot":"","sources":["../../../src/dimensions/role/orchestrate.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAS,aAAa,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Role } from '../../manifest.js';
2
- export declare const plan: Role;
@@ -1,2 +0,0 @@
1
- export const plan = `plan ≜ ⟨decompose sequence⟩`;
2
- //# sourceMappingURL=plan.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/dimensions/role/plan.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAS,6BAA6B,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Role } from '../../manifest.js';
2
- export declare const research: Role;
@@ -1,2 +0,0 @@
1
- export const research = `research`;
2
- //# sourceMappingURL=research.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"research.js","sourceRoot":"","sources":["../../../src/dimensions/role/research.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAS,UAAU,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Role } from '../../manifest.js';
2
- export declare const review: Role;
@@ -1,2 +0,0 @@
1
- export const review = `review`;
2
- //# sourceMappingURL=review.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"review.js","sourceRoot":"","sources":["../../../src/dimensions/role/review.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAS,QAAQ,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Role } from '../../manifest.js';
2
- export declare const test: Role;
@@ -1,2 +0,0 @@
1
- export const test = `test ≜ ⟨exercise pass-fail-evidence⟩`;
2
- //# sourceMappingURL=test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test.js","sourceRoot":"","sources":["../../../src/dimensions/role/test.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAS,sCAAsC,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { HookCell } from '../manifest.js';
2
- export declare const praxisContinuity: HookCell;
@@ -1,132 +0,0 @@
1
- // praxis-continuity — the repo-level post-commit reminder. A scope-activated source
2
- // cell on the GIT substrate: `vcs.commit.post` is an ordinary member of this
3
- // corpus's `CANONICAL_EVENTS` carrying `substrate: 'git'`, so it is routed rather
4
- // than refused — the `.husky/post-commit` dispatcher runs the committed worker
5
- // directly and nothing reaches `settings.json`. Its `workers[].content` are the
6
- // byte-anchors the committed `targets/continuity/` workers regenerate from
7
- // (byte-locked).
8
- //
9
- // THE REVIEW THIS CELL WAS FLAGGED FOR IS CLOSED. The note read "not in FORGE's
10
- // `CanonicalEvent` taxonomy" — stale by one package before it was stale by two, and
11
- // it asked for either an addition to the taxonomy or a named exception. Neither was
12
- // owed: the event was never exceptional, only unliterable, because the taxonomy was
13
- // a closed union in `schema` that a git moment had no member to be. The vocabulary
14
- // now lives where signification lives, `EventName` is open, and this cell names its
15
- // moment exactly as a harness cell names its own.
16
- export const praxisContinuity = {
17
- id: 'praxis-continuity',
18
- residue: 'post-commit detector ⟨task-file crosses state-folder ⇒ plan-mirror stale⟩ · nudge re-mirror · ¬edit · opt-in ↾ clone · exit-0 ⟨reminder ¬fail-commit⟩',
19
- substrate: 'git',
20
- events: ['vcs.commit.post'],
21
- // git substrate: the entry is still named, never spelled as a path. Which
22
- // directory git invokes it from is git's projection to make, not this cell's.
23
- entry: 'praxis-advance-nudge.sh',
24
- refs: [],
25
- workers: [
26
- {
27
- filename: 'continuity-hook.sh',
28
- targetPath: 'packages/canon/targets/continuity/continuity-hook.sh',
29
- executable: true,
30
- content: `#!/usr/bin/env sh
31
- # continuity-hook — opt this repo in/out of the post-commit continuity ritual.
32
- #
33
- # The opt-in flag is a per-repo git config (agentfactory.continuity) living in .git/config,
34
- # which is NOT checked in — so opting in is local to your clone and a fresh clone is
35
- # opted out by default. The .husky/post-commit dispatcher reads this flag.
36
- #
37
- # pnpm run continuity:install → set agentfactory.continuity true
38
- # pnpm run continuity:uninstall → unset (back to default off)
39
- # pnpm run continuity:status → show current state
40
- #
41
- # Usage: continuity-hook.sh {install|uninstall|status}
42
-
43
- set -e
44
-
45
- cmd="\${1:-status}"
46
-
47
- case "$cmd" in
48
- install | on | true)
49
- git config --bool agentfactory.continuity true
50
- printf 'continuity: ENABLED for this repo (agentfactory.continuity=true).\\n'
51
- printf ' Commits touching plans/**/{pending,ready,active,completed}/ now print a /praxis re-mirror reminder.\\n'
52
- ;;
53
- uninstall | off | false)
54
- git config --unset agentfactory.continuity 2>/dev/null || true
55
- printf 'continuity: DISABLED for this repo (agentfactory.continuity unset → default off).\\n'
56
- ;;
57
- status)
58
- state=$(git config --bool agentfactory.continuity 2>/dev/null || echo "false")
59
- printf 'continuity: %s (agentfactory.continuity=%s)\\n' \\
60
- "$([ "$state" = "true" ] && echo ENABLED || echo "disabled (default)")" "$state"
61
- ;;
62
- *)
63
- printf 'usage: continuity-hook.sh {install|uninstall|status}\\n' >&2
64
- exit 2
65
- ;;
66
- esac
67
- `,
68
- },
69
- {
70
- filename: 'praxis-advance-nudge.sh',
71
- targetPath: 'packages/canon/targets/continuity/praxis-advance-nudge.sh',
72
- executable: true,
73
- content: `#!/usr/bin/env sh
74
- # praxis-advance-nudge — the repo-level continuity ritual, as a post-commit reminder.
75
- #
76
- # WHAT IT DOES (and deliberately does NOT do):
77
- # When a commit moves plan task-files between their state folders
78
- # (plans/**/{pending,ready,active,completed}/), PLAN.md — the hand-authored
79
- # mirror of that folder-state — may now be stale. This script DETECTS that and
80
- # PRINTS A REMINDER to re-mirror via /praxis. It never edits PLAN.md: the mirror
81
- # is hand-authored prose; auto-rewriting it is out of scope (a future "mechanized
82
- # PLAN.md generation" task). Detect → remind, never edit. (doc-mirrors-runtime-truth:
83
- # the folders are the truth; this only flags that the mirror lagged.)
84
- #
85
- # SCOPE: praxis-advance is the ONE repo-level continuity ritual. Per-agent memory
86
- # operations (the \`memory\` runtime capability's sidecar state under
87
- # ~/.claude/agents/<name>/*) are not repo state — a git hook can't meaningfully
88
- # fire them — so they are out of this hook's scope.
89
- #
90
- # OPT-IN: this runs only when \`git config --bool agentfactory.continuity\` is true. A fresh
91
- # clone is opted out, so default commit behavior is unchanged. See continuity-hook.sh.
92
- #
93
- # POSIX sh; no deps beyond git. Exits 0 always — a reminder must never fail a commit.
94
-
95
- set -e
96
-
97
- # The commit just made (post-commit runs after HEAD has advanced).
98
- git rev-parse HEAD >/dev/null 2>&1 || exit 0
99
-
100
- # Files changed by HEAD. For a root commit (no parent) diff against the root.
101
- if git rev-parse --verify --quiet HEAD^ >/dev/null 2>&1; then
102
- changed=$(git diff-tree --no-commit-id --name-only -r HEAD 2>/dev/null) || exit 0
103
- else
104
- changed=$(git diff-tree --no-commit-id --name-only -r --root HEAD 2>/dev/null) || exit 0
105
- fi
106
-
107
- # Did this commit touch any plan state-folder? Match the four canonical states under
108
- # any plans/ subtree (works whether or not a tasks/ or {concern} wrapper is present).
109
- touched=$(printf '%s\\n' "$changed" \\
110
- | grep -E '^plans/.*/(pending|ready|active|completed)/' || true)
111
-
112
- [ -z "$touched" ] && exit 0
113
-
114
- # Which plan dirs were touched (dedup to the plan root: plans/<plan>/).
115
- plans=$(printf '%s\\n' "$touched" \\
116
- | sed -E 's#^(plans/[^/]+)/.*#\\1#' | sort -u)
117
-
118
- printf '\\n'
119
- printf 'continuity · praxis-advance — plan state changed in this commit:\\n'
120
- printf '%s\\n' "$plans" | sed 's/^/ /'
121
- printf '\\n'
122
- printf ' PLAN.md mirrors the task-folder state; it may now be stale.\\n'
123
- printf ' Re-mirror with /praxis (advance the task, re-sync PLAN.md), then amend or follow-up commit.\\n'
124
- printf ' (This is a reminder only — nothing was edited. Disable: pnpm run continuity:uninstall)\\n'
125
- printf '\\n'
126
-
127
- exit 0
128
- `,
129
- },
130
- ],
131
- };
132
- //# sourceMappingURL=praxis-continuity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"praxis-continuity.js","sourceRoot":"","sources":["../../src/hooks/praxis-continuity.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,6EAA6E;AAC7E,kFAAkF;AAClF,+EAA+E;AAC/E,gFAAgF;AAChF,2EAA2E;AAC3E,iBAAiB;AACjB,EAAE;AACF,gFAAgF;AAChF,oFAAoF;AACpF,oFAAoF;AACpF,oFAAoF;AACpF,mFAAmF;AACnF,oFAAoF;AACpF,kDAAkD;AAElD,MAAM,CAAC,MAAM,gBAAgB,GAAa;IACxC,EAAE,EAAE,mBAAmB;IACvB,OAAO,EACL,uJAAuJ;IACzJ,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,CAAC,iBAAiB,CAAC;IAC3B,0EAA0E;IAC1E,8EAA8E;IAC9E,KAAK,EAAE,yBAAyB;IAChC,IAAI,EAAE,EAAE;IACR,OAAO,EAAE;QACP;YACE,QAAQ,EAAE,oBAAoB;YAC9B,UAAU,EAAE,sDAAsD;YAClE,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCd;SACI;QACD;YACE,QAAQ,EAAE,yBAAyB;YACnC,UAAU,EAAE,2DAA2D;YACvE,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDd;SACI;KACF;CACF,CAAC"}