@sleepy_panda_srl/portulan 0.1.2 → 0.2.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 (81) hide show
  1. package/README.md +7 -6
  2. package/cli/README.md +142 -291
  3. package/cli/advisory.mjs +354 -0
  4. package/cli/comments.mjs +932 -0
  5. package/cli/compile.mjs +1443 -1210
  6. package/cli/context.mjs +883 -0
  7. package/cli/control-chars.mjs +12 -301
  8. package/cli/discover.mjs +17 -574
  9. package/cli/doctor.mjs +225 -1071
  10. package/cli/drills.mjs +1107 -0
  11. package/cli/feedback.mjs +16 -237
  12. package/cli/finish.mjs +437 -0
  13. package/cli/form.mjs +644 -0
  14. package/cli/fuzz-shell.mjs +595 -0
  15. package/cli/gate.mjs +7 -198
  16. package/cli/goldens.mjs +311 -0
  17. package/cli/index.mjs +305 -655
  18. package/cli/init.mjs +244 -564
  19. package/cli/inside.mjs +3 -28
  20. package/cli/instructions.mjs +829 -0
  21. package/cli/ledger.mjs +778 -0
  22. package/cli/librarian.mjs +135 -599
  23. package/cli/manifest.mjs +2 -39
  24. package/cli/mutants.mjs +764 -0
  25. package/cli/new.mjs +12 -243
  26. package/cli/pack-identity.mjs +6 -68
  27. package/cli/pack-version.mjs +13 -248
  28. package/cli/plugin-lint.mjs +42 -658
  29. package/cli/portulan.mjs +5 -124
  30. package/cli/recipe-set.mjs +16 -240
  31. package/cli/release-eval.mjs +748 -0
  32. package/cli/review-meter.mjs +500 -0
  33. package/cli/rule-carriers.mjs +12 -175
  34. package/cli/sessions.mjs +82 -0
  35. package/cli/skill-goldens.mjs +424 -0
  36. package/cli/skills-set.mjs +12 -414
  37. package/cli/stop-gate.mjs +126 -454
  38. package/cli/symbols.mjs +1132 -0
  39. package/cli/telemetry.mjs +582 -0
  40. package/cli/upgrade.mjs +171 -314
  41. package/cli/vendor.mjs +146 -476
  42. package/cli/version-carriers.mjs +9 -74
  43. package/core/README.md +1 -1
  44. package/core/engine.md +3 -9
  45. package/core/operating/autonomy.md +1 -1
  46. package/core/operating/context.md +183 -0
  47. package/core/operating/evolution.md +3 -3
  48. package/core/operating/loop.md +13 -20
  49. package/core/operating/memory.md +12 -3
  50. package/core/operating/sessions.md +100 -0
  51. package/core/personas/librarian.md +2 -2
  52. package/core/skills/consolidate/SKILL.md +4 -2
  53. package/core/templates/gate-policy.md +27 -8
  54. package/core/templates/handoff.md +28 -15
  55. package/core/templates/memory-entry.md +1 -0
  56. package/evals/README.md +320 -0
  57. package/evals/releases/0.1.3.json +134 -0
  58. package/evals/releases/0.1.3.md +64 -0
  59. package/evals/releases/0.2.0.json +146 -0
  60. package/evals/releases/0.2.0.md +67 -0
  61. package/evals/releases/README.md +32 -0
  62. package/package.json +9 -2
  63. package/packs/rituals/checkpoints/README.md +9 -2
  64. package/packs/rituals/checkpoints/pack.json +1 -1
  65. package/packs/rituals/checkpoints/skills/pre-commit/SKILL.md +32 -2
  66. package/packs/tools/github/verify/actions-pinned.sh +10 -55
  67. package/spec/README.md +112 -6
  68. package/spec/migrations/0001-repository-declares-its-tree.mjs +1 -26
  69. package/spec/migrations/0002-bundle-fallback-path.mjs +13 -74
  70. package/spec/migrations/0003-handoff-index-not-kept.mjs +66 -0
  71. package/spec/migrations/0004-changelog-fragments.mjs +53 -0
  72. package/spec/migrations/0005-session-log-retired.mjs +69 -0
  73. package/spec/migrations/0006-boot-card.mjs +77 -0
  74. package/spec/migrations/0007-guidance-compiled.mjs +31 -0
  75. package/spec/migrations/0008-card-reading.mjs +55 -0
  76. package/spec/migrations/0009-instruction-sections-on-read.mjs +60 -0
  77. package/spec/migrations/0010-comment-rail.mjs +57 -0
  78. package/spec/migrations/README.md +45 -10
  79. package/spec/pack.schema.json +1 -1
  80. package/spec/slots.md +359 -23
  81. package/spec/workspace.schema.json +145 -4
package/cli/manifest.mjs CHANGED
@@ -1,39 +1,9 @@
1
- // The two facts every tool here needs out of `package.json`, read once and in a module that imports
2
- // nothing of ours.
3
- //
4
- // ## Why this is its own file, which is the part worth reading
5
- //
6
- // `VERSION` lived in `portulan.mjs` because that is where it was first needed, and it was right there:
7
- // one carrier, read from the manifest that publishes it rather than written down twice.
8
- //
9
- // Then `feedback.mjs` needed the same value and imported it from `portulan.mjs` — still one carrier,
10
- // and **it hung the command line**. `portulan.mjs` ends in `process.exitCode = await run(…)`, `run`
11
- // dynamically imports the subcommand, and the subcommand statically imported `portulan.mjs` back. Node
12
- // cannot finish evaluating a module that is waiting on a module waiting on it: `portulan feedback
13
- // --help` printed nothing and exited **13**, `Detected unsettled top-level await`.
14
- //
15
- // Nothing in the suite could see it. Every dispatch case injects the loader — correctly, since
16
- // re-asserting what each tool proves itself would make the entry point's suite a second carrier of it
17
- // — and an injected loader never imports the real module, so the cycle does not exist under test. It
18
- // was found by the one case that spawns the real binary, written in the same change for exactly this
19
- // reason. **A harness you write to check your own change inherits your change's blind spot**, for the
20
- // third recorded time in this repository.
21
- //
22
- // So the shared read moved down here, where it has no dependencies to be circular with. `portulan.mjs`
23
- // re-exports `VERSION` so its published surface is unchanged.
1
+ // The two facts every tool here needs out of `package.json`, read once and in a module that imports nothing of ours.
24
2
 
25
3
  import fs from "node:fs";
26
4
  import path from "node:path";
27
5
  import { fileURLToPath } from "node:url";
28
6
 
29
- /**
30
- * The manifest, in both layouts that matter: from a checkout it is one level above `cli/`, and the
31
- * published package keeps that shape because `files` ships `cli/` under the package root.
32
- *
33
- * Falls back rather than throwing. A version string and a repository name are not worth taking the
34
- * command line down for — and the callers that need the repository to be real say so themselves
35
- * rather than inheriting a crash from here.
36
- */
37
7
  const manifest = (() => {
38
8
  try {
39
9
  const at = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "package.json");
@@ -45,14 +15,7 @@ const manifest = (() => {
45
15
 
46
16
  export const VERSION = manifest.version ?? "unknown";
47
17
 
48
- /**
49
- * The repository issues are filed into, derived from the `bugs.url` the manifest already publishes
50
- * rather than minted as a second constant — `portulan feedback` would otherwise carry a copy that
51
- * nothing holds to this one.
52
- *
53
- * `null` when the manifest carries no usable URL, which the sender turns into a refusal naming
54
- * `--repo`; guessing a repository to file a public issue into is the one wrong answer here.
55
- */
18
+ /** The repository issues are filed into, as `owner/name` from `bugs.url`; null, never a guess, when that names none. */
56
19
  export const REPOSITORY = (() => {
57
20
  const match = /github\.com\/([^/]+\/[^/]+?)(?:\/issues)?\/?$/.exec(manifest.bugs?.url ?? "");
58
21
  return match ? match[1] : null;