@hexagen-monaco/sync 0.12.0 → 0.13.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.
- package/README.md +429 -0
- package/dist/cli.js +6253 -439
- package/dist/cli.js.map +1 -1
- package/dist/commands/arch/edit.d.ts.map +1 -1
- package/dist/commands/contract/evaluate.d.ts +45 -0
- package/dist/commands/contract/evaluate.d.ts.map +1 -0
- package/dist/commands/contract/index.d.ts +24 -0
- package/dist/commands/contract/index.d.ts.map +1 -0
- package/dist/commands/evidence/check.d.ts +31 -0
- package/dist/commands/evidence/check.d.ts.map +1 -0
- package/dist/commands/evidence/index.d.ts +3 -0
- package/dist/commands/evidence/index.d.ts.map +1 -0
- package/dist/commands/evidence/pack.d.ts +41 -0
- package/dist/commands/evidence/pack.d.ts.map +1 -0
- package/dist/commands/grant/build.d.ts +53 -0
- package/dist/commands/grant/build.d.ts.map +1 -0
- package/dist/commands/grant/canonical.d.ts +27 -0
- package/dist/commands/grant/canonical.d.ts.map +1 -0
- package/dist/commands/grant/check.d.ts +26 -0
- package/dist/commands/grant/check.d.ts.map +1 -0
- package/dist/commands/grant/duration.d.ts +8 -0
- package/dist/commands/grant/duration.d.ts.map +1 -0
- package/dist/commands/grant/index.d.ts +2 -0
- package/dist/commands/grant/index.d.ts.map +1 -0
- package/dist/commands/grant/issue.d.ts +23 -0
- package/dist/commands/grant/issue.d.ts.map +1 -0
- package/dist/commands/grant/key-init.d.ts +16 -0
- package/dist/commands/grant/key-init.d.ts.map +1 -0
- package/dist/commands/grant/revoke.d.ts +35 -0
- package/dist/commands/grant/revoke.d.ts.map +1 -0
- package/dist/commands/grant/show.d.ts +18 -0
- package/dist/commands/grant/show.d.ts.map +1 -0
- package/dist/commands/grant/sign.d.ts +3 -0
- package/dist/commands/grant/sign.d.ts.map +1 -0
- package/dist/commands/grant/signing-key.d.ts +22 -0
- package/dist/commands/grant/signing-key.d.ts.map +1 -0
- package/dist/commands/grant/verify.d.ts +45 -0
- package/dist/commands/grant/verify.d.ts.map +1 -0
- package/dist/commands/grant/workspace.d.ts +11 -0
- package/dist/commands/grant/workspace.d.ts.map +1 -0
- package/dist/commands/observe/imports/jsonc.d.ts +6 -0
- package/dist/commands/observe/imports/jsonc.d.ts.map +1 -0
- package/dist/commands/observe/imports/pass.d.ts +45 -0
- package/dist/commands/observe/imports/pass.d.ts.map +1 -0
- package/dist/commands/observe/imports/resolve.d.ts +44 -0
- package/dist/commands/observe/imports/resolve.d.ts.map +1 -0
- package/dist/commands/observe/imports/safe-read.d.ts +30 -0
- package/dist/commands/observe/imports/safe-read.d.ts.map +1 -0
- package/dist/commands/observe/imports/scan.d.ts +59 -0
- package/dist/commands/observe/imports/scan.d.ts.map +1 -0
- package/dist/commands/observe/index.d.ts +59 -0
- package/dist/commands/observe/index.d.ts.map +1 -0
- package/dist/commands/observe/same-path.d.ts +9 -0
- package/dist/commands/observe/same-path.d.ts.map +1 -0
- package/dist/commands/observe/walk.d.ts +29 -0
- package/dist/commands/observe/walk.d.ts.map +1 -0
- package/dist/commands/shared/brownfield-sidecar.d.ts +68 -0
- package/dist/commands/shared/brownfield-sidecar.d.ts.map +1 -0
- package/dist/commands/shared/git-exclude.d.ts +36 -0
- package/dist/commands/shared/git-exclude.d.ts.map +1 -0
- package/dist/commands/shared/glob.d.ts +29 -0
- package/dist/commands/shared/glob.d.ts.map +1 -0
- package/dist/commands/shared/ignore.d.ts +32 -0
- package/dist/commands/shared/ignore.d.ts.map +1 -0
- package/dist/commands/shared/sidecar-out.d.ts +6 -0
- package/dist/commands/shared/sidecar-out.d.ts.map +1 -0
- package/dist/commands/shared/sidecar-write.d.ts +2 -0
- package/dist/commands/shared/sidecar-write.d.ts.map +1 -0
- package/dist/commands/slice/index.d.ts +23 -0
- package/dist/commands/slice/index.d.ts.map +1 -0
- package/dist/commands/workbook/allow-list.d.ts +27 -0
- package/dist/commands/workbook/allow-list.d.ts.map +1 -0
- package/dist/commands/workbook/export.d.ts +41 -0
- package/dist/commands/workbook/export.d.ts.map +1 -0
- package/dist/commands/workbook/index.d.ts +3 -0
- package/dist/commands/workbook/index.d.ts.map +1 -0
- package/dist/commands/workbook/zip-read.d.ts +7 -0
- package/dist/commands/workbook/zip-read.d.ts.map +1 -0
- package/dist/fs-utils.d.ts.map +1 -1
- package/dist/generators/barrels/recursive.d.ts.map +1 -1
- package/dist/generators/root-file-templates.d.ts +5 -4
- package/dist/generators/root-file-templates.d.ts.map +1 -1
- package/dist/generators/root-files.d.ts.map +1 -1
- package/dist/index.js +355 -75
- package/dist/index.js.map +1 -1
- package/dist/templates/agents-md/findings/0001-session-log-grows-unbounded.md +35 -0
- package/dist/templates/ci-github-actions/findings/0001-ci-runners-have-no-zsh.md +34 -0
- package/dist/templates/orchestration/README.md +88 -0
- package/dist/templates/orchestration/files/.agents/skills/orchestrate-wave/SKILL.md +511 -0
- package/dist/templates/orchestration/files/.agents/skills/orchestrate-wave/references/briefs.md +178 -0
- package/dist/templates/orchestration/files/.agents/skills/orchestrate-wave/references/rationale.md +520 -0
- package/dist/templates/orchestration/files/.agents/skills/orchestrate-wave/scripts/wave-event.sh +17 -0
- package/dist/templates/orchestration/files/.github/workflows/gate.yml +66 -0
- package/dist/templates/orchestration/findings/0001-relative-runbook-links-escape-the-skill.md +48 -0
- package/dist/templates/orchestration/findings/0002-interpolation-hazard-in-graphql-line.md +46 -0
- package/dist/templates/orchestration/manifest.json +41 -0
- package/dist/types/manifest/monorepo.d.ts +4 -0
- package/dist/types/manifest/monorepo.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 0001
|
|
3
|
+
subject: agents-md
|
|
4
|
+
subjectKind: template
|
|
5
|
+
subjectVersion: "1.0.0"
|
|
6
|
+
fixedIn: null
|
|
7
|
+
class: unbounded-growth
|
|
8
|
+
severity: high
|
|
9
|
+
surface: dx
|
|
10
|
+
status: open
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## What happens
|
|
14
|
+
|
|
15
|
+
The `AGENTS.md` this template emits instructs agents to append session notes
|
|
16
|
+
to `.agents/session-log.md`. The instructions give the file no rotation, no
|
|
17
|
+
size bound and no cursor: every session appends, and any agent told to consult
|
|
18
|
+
it pays the whole file as input. Growth is unbounded, and the cost is paid on
|
|
19
|
+
every read — the artifact meant to make agents faster slowly makes every
|
|
20
|
+
subsequent agent slower.
|
|
21
|
+
|
|
22
|
+
## Minimal repro
|
|
23
|
+
|
|
24
|
+
A project that has run the template's workflow N times re-reads
|
|
25
|
+
`.agents/session-log.md` before acting: its size, and the tokens an agent
|
|
26
|
+
spends on it, grow at every append with no boundary anywhere in the template's
|
|
27
|
+
instructions.
|
|
28
|
+
|
|
29
|
+
## Fix
|
|
30
|
+
|
|
31
|
+
Bound the log in the template's instructions: define a maximum size (or a
|
|
32
|
+
session window); when it is exceeded, rotate `.agents/session-log.md` to a
|
|
33
|
+
dated archive the log itself names and start a fresh page that references the
|
|
34
|
+
archive. Appends are unbounded no more: the file a working agent must read
|
|
35
|
+
stays small, and everything older is opt-in.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 0001
|
|
3
|
+
subject: ci-github-actions
|
|
4
|
+
subjectKind: template
|
|
5
|
+
subjectVersion: "1.0.0"
|
|
6
|
+
fixedIn: null
|
|
7
|
+
class: host-assumption
|
|
8
|
+
severity: high
|
|
9
|
+
surface: ci
|
|
10
|
+
status: open
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## What happens
|
|
14
|
+
|
|
15
|
+
The CI workflow this template emits runs the project's test suite on a stock
|
|
16
|
+
GitHub Actions runner. The runner image ships `bash` and `sh` but no `zsh`.
|
|
17
|
+
A test suite that spawns `zsh` — shell-integration fixtures, scripts run
|
|
18
|
+
through the author's interactive shell, `zsh -c` steps — passes on a macOS
|
|
19
|
+
developer machine and fails in CI with an ENOENT from the spawn. The template
|
|
20
|
+
gave no warning that the environment it provisions lacks the shell the project
|
|
21
|
+
may assume.
|
|
22
|
+
|
|
23
|
+
## Minimal repro
|
|
24
|
+
|
|
25
|
+
Any test that executes the host shell, e.g. `zsh -c "echo ok"`, in a suite run
|
|
26
|
+
by the emitted workflow on a stock `ubuntu-latest` runner: green on macOS,
|
|
27
|
+
red in CI.
|
|
28
|
+
|
|
29
|
+
## Fix
|
|
30
|
+
|
|
31
|
+
Keep the emitted workflow POSIX-neutral and record the assumption: run steps
|
|
32
|
+
must not name `zsh`, and the checklist gains a line telling the author that
|
|
33
|
+
stock runners ship no zsh — a test that needs one owns a skip guard
|
|
34
|
+
(`skipIf(!hasZsh)`) rather than a CI workaround.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Orchestration (`orchestration`)
|
|
2
|
+
|
|
3
|
+
> Delegated wave orchestration: the `orchestrate-wave` skill and a `gate.yml` that runs the one
|
|
4
|
+
> gate your own config declares.
|
|
5
|
+
|
|
6
|
+
| | |
|
|
7
|
+
| ------------- | ------------------------------------------ |
|
|
8
|
+
| **ID** | `orchestration` |
|
|
9
|
+
| **Category** | Tooling |
|
|
10
|
+
| **Provides** | `platform.orchestration` |
|
|
11
|
+
| **Requires** | — |
|
|
12
|
+
| **Conflicts** | none |
|
|
13
|
+
| **Branch** | `feature/generator-template-orchestration` |
|
|
14
|
+
|
|
15
|
+
Author/agent-facing reference, beside `manifest.json` — not emitted into projects. It is the
|
|
16
|
+
template root, not `files/`, exactly like `ci-github-actions`'s: `README.md` and `findings/` are
|
|
17
|
+
documentation about the template, and an output is a file a consumer project receives.
|
|
18
|
+
|
|
19
|
+
## What it does
|
|
20
|
+
|
|
21
|
+
Installs the `orchestrate-wave` skill — the operating contract for running one wave of a plan
|
|
22
|
+
across per-lane worktrees — and a `gate.yml` whose single CI step is `hexagen-orchestration-gate`.
|
|
23
|
+
|
|
24
|
+
## What it scaffolds
|
|
25
|
+
|
|
26
|
+
| Output | What it is |
|
|
27
|
+
| --------------------------------------------------------- | ------------------------------------------------------------- |
|
|
28
|
+
| `.github/workflows/gate.yml` | one job, one step: the gate bin |
|
|
29
|
+
| `.agents/skills/orchestrate-wave/SKILL.md` | the operating contract |
|
|
30
|
+
| `.agents/skills/orchestrate-wave/references/rationale.md` | why each rule is what it is |
|
|
31
|
+
| `.agents/skills/orchestrate-wave/references/briefs.md` | prompt templates A–D (lane brief, reviewer, fix brief, sweep) |
|
|
32
|
+
| `.agents/skills/orchestrate-wave/scripts/wave-event.sh` | appends one JSON event line per stage transition |
|
|
33
|
+
|
|
34
|
+
## The overlay, and why it is not an output
|
|
35
|
+
|
|
36
|
+
`.agents/orchestration/` — `config.yaml`, `house-rules.md`, `cast.md`, `lessons.md`,
|
|
37
|
+
`rationale.local.md` — is **yours**. It is never declared in `outputs`, so `hexagen add` never
|
|
38
|
+
writes it, never hashes it, and never conflict-copies it, and no version bump can touch it.
|
|
39
|
+
`hexagen-orchestration-init` scaffolds it once and skips whatever already exists; run
|
|
40
|
+
`hexagen-orchestration-doctor` to check the config against the invariants the skill locks.
|
|
41
|
+
|
|
42
|
+
`config.yaml` is also the single source for the gate's step list. `gate.yml` names no steps of its
|
|
43
|
+
own, so CI and a human running `hexagen-orchestration-gate` consult the same file.
|
|
44
|
+
|
|
45
|
+
## Install
|
|
46
|
+
|
|
47
|
+
`hexagen add orchestration`. Questions:
|
|
48
|
+
|
|
49
|
+
| Question | Options (default) |
|
|
50
|
+
| -------------- | ------------------------------------------------------------------------------------------------------- |
|
|
51
|
+
| `agents_md` | `true` — whether `init` scaffolds the Wave Observability text for you to paste into `AGENTS.md` |
|
|
52
|
+
| `node_version` | `auto` — taken from a recorded `ci-github-actions` answer when there is one, else `22`. Never prompted. |
|
|
53
|
+
|
|
54
|
+
## Checklist (post-install)
|
|
55
|
+
|
|
56
|
+
1. `yarn add -D @hexagen-monaco/orchestration`
|
|
57
|
+
2. Optionally add a `"gate": "hexagen-orchestration-gate"` script to `package.json` by hand, for
|
|
58
|
+
local convenience. Templates cannot write `package.json`, and `gate.yml` does not need it — the
|
|
59
|
+
workflow invokes the bin directly with `--no-install`.
|
|
60
|
+
3. `npx hexagen-orchestration-init`
|
|
61
|
+
4. If you answered yes to `agents_md`, paste the Wave Observability section from
|
|
62
|
+
`.agents/orchestration/house-rules.md` into `AGENTS.md`. The section is not a template output:
|
|
63
|
+
the engine has no append capability, and your `AGENTS.md` is never-edit.
|
|
64
|
+
5. `npx hexagen-orchestration-doctor`
|
|
65
|
+
6. `mutate` and `verify-manifests` run only when `.agents/orchestration/config.yaml` sets
|
|
66
|
+
`mutate: true`.
|
|
67
|
+
|
|
68
|
+
## Notes for agents
|
|
69
|
+
|
|
70
|
+
- **`requires` is empty on purpose.** The engine treats `requires` as "apply this too if it is not
|
|
71
|
+
recorded installed", so requiring `ci-github-actions` would silently auto-install it and write a
|
|
72
|
+
first-ever `ci.yml` as a conflict copy against an existing one. If `ci-github-actions` is not
|
|
73
|
+
installed, `doctor` says so; nothing installs it behind your back.
|
|
74
|
+
- **`--immutable` here, not in `ci.yml`.** `gate.yml` lands after `yarn add`, so the lockfile
|
|
75
|
+
exists. `ci-github-actions`'s first run does not have one.
|
|
76
|
+
- **No Turbo cache step.** That belongs to `ci-github-actions`'s own workflow; `gate.yml` has no
|
|
77
|
+
equivalent.
|
|
78
|
+
- **Upgrades.** `hexagen add --force orchestration` re-emits the five outputs above, per file,
|
|
79
|
+
writing a `.hexagen-update.*` conflict copy where you have edited one. It does not touch
|
|
80
|
+
`.agents/orchestration/**`.
|
|
81
|
+
- **The skill is one copy.** The template's `files/` tree is the canonical source. A
|
|
82
|
+
byte-identical mirror at hexagen's own `.agents/skills/orchestrate-wave/`, and the guard test
|
|
83
|
+
that holds it so, are OW6's deliverables; neither exists yet.
|
|
84
|
+
|
|
85
|
+
## Related
|
|
86
|
+
|
|
87
|
+
Pairs with [`ci-github-actions`](../ci-github-actions), whose `ci.yml` is the default `ciWorkflow`
|
|
88
|
+
that `doctor` checks for (A-32), and [`agents-md`](../agents-md) (`AGENTS.md`, which you paste into by hand).
|