@zedtech/zedkit-ai 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +175 -2
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +8 -0
- package/dist/bin.js.map +1 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +123 -0
- package/dist/cli.js.map +1 -0
- package/dist/frontmatter.d.ts +9 -0
- package/dist/frontmatter.d.ts.map +1 -0
- package/dist/frontmatter.js +22 -0
- package/dist/frontmatter.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/install.d.ts +36 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +238 -0
- package/dist/install.js.map +1 -0
- package/dist/kit.d.ts +13 -0
- package/dist/kit.d.ts.map +1 -0
- package/dist/kit.js +36 -0
- package/dist/kit.js.map +1 -0
- package/dist/validate.d.ts +22 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +240 -0
- package/dist/validate.js.map +1 -0
- package/kit/AGENTS.template.md +96 -0
- package/kit/THIRD_PARTY_NOTICES.md +63 -0
- package/kit/agents/architect.md +48 -0
- package/kit/agents/explorer.md +33 -0
- package/kit/agents/improver.md +34 -0
- package/kit/agents/plan-challenger.md +50 -0
- package/kit/agents/security-reviewer.md +33 -0
- package/kit/agents/verifier.md +39 -0
- package/kit/commands/challenge.md +5 -0
- package/kit/commands/handoff.md +5 -0
- package/kit/commands/implement.md +5 -0
- package/kit/commands/plan.md +5 -0
- package/kit/commands/pr.md +5 -0
- package/kit/commands/review.md +5 -0
- package/kit/commands/setup-ai.md +5 -0
- package/kit/kit.json +47 -0
- package/kit/skills/LICENSE-humanlayer-Apache-2.0 +202 -0
- package/kit/skills/LICENSE-mattpocock-skills-MIT +21 -0
- package/kit/skills/LICENSE-ponytail-MIT +21 -0
- package/kit/skills/adversarial-tests/SKILL.md +64 -0
- package/kit/skills/challenge/SKILL.md +18 -0
- package/kit/skills/code-review/SKILL.md +74 -0
- package/kit/skills/code-review/agents/openai.yaml +3 -0
- package/kit/skills/codebase-design/DEEPENING.md +37 -0
- package/kit/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/kit/skills/codebase-design/SKILL.md +114 -0
- package/kit/skills/codebase-design/agents/openai.yaml +3 -0
- package/kit/skills/definition-of-done/SKILL.md +53 -0
- package/kit/skills/diagnosing-bugs/SKILL.md +138 -0
- package/kit/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/kit/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
- package/kit/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/kit/skills/domain-modeling/GLOSSARY-FORMAT.md +60 -0
- package/kit/skills/domain-modeling/SKILL.md +74 -0
- package/kit/skills/domain-modeling/agents/openai.yaml +3 -0
- package/kit/skills/ground-truth/SKILL.md +50 -0
- package/kit/skills/handoff/SKILL.md +16 -0
- package/kit/skills/handoff/agents/openai.yaml +5 -0
- package/kit/skills/implement/SKILL.md +25 -0
- package/kit/skills/implement/agents/openai.yaml +5 -0
- package/kit/skills/implement-spec/SKILL.md +42 -0
- package/kit/skills/implement-spec/agents/openai.yaml +5 -0
- package/kit/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/kit/skills/improve-codebase-architecture/SKILL.md +71 -0
- package/kit/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/kit/skills/parallel-work/SKILL.md +61 -0
- package/kit/skills/persona-review/SKILL.md +38 -0
- package/kit/skills/plan/SKILL.md +38 -0
- package/kit/skills/ponytail/SKILL.md +53 -0
- package/kit/skills/ponytail-audit/SKILL.md +103 -0
- package/kit/skills/ponytail-debt/SKILL.md +44 -0
- package/kit/skills/ponytail-gain/SKILL.md +52 -0
- package/kit/skills/ponytail-help/SKILL.md +76 -0
- package/kit/skills/ponytail-review/SKILL.md +119 -0
- package/kit/skills/pr/CREDITS.md +3 -0
- package/kit/skills/pr/SKILL.md +170 -0
- package/kit/skills/pr/agents/openai.yaml +3 -0
- package/kit/skills/research/SKILL.md +12 -0
- package/kit/skills/research/agents/openai.yaml +3 -0
- package/kit/skills/retro/SKILL.md +44 -0
- package/kit/skills/retro/agents/openai.yaml +5 -0
- package/kit/skills/review/SKILL.md +37 -0
- package/kit/skills/rules-upkeep/SKILL.md +55 -0
- package/kit/skills/setup-ai/SKILL.md +139 -0
- package/kit/skills/setup-matt-pocock-skills/SKILL.md +118 -0
- package/kit/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
- package/kit/skills/setup-matt-pocock-skills/domain.md +51 -0
- package/kit/skills/setup-matt-pocock-skills/issue-tracker-github.md +46 -0
- package/kit/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +46 -0
- package/kit/skills/setup-matt-pocock-skills/issue-tracker-local.md +30 -0
- package/kit/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
- package/kit/skills/setup-ts-deep-modules/SKILL.md +102 -0
- package/kit/skills/setup-ts-deep-modules/agents/openai.yaml +5 -0
- package/kit/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +95 -0
- package/kit/skills/tdd/SKILL.md +38 -0
- package/kit/skills/tdd/agents/openai.yaml +3 -0
- package/kit/skills/tdd/mocking.md +59 -0
- package/kit/skills/tdd/tests.md +77 -0
- package/kit/skills/to-spec/SKILL.md +75 -0
- package/kit/skills/to-spec/agents/openai.yaml +5 -0
- package/kit/skills/to-tickets/SKILL.md +105 -0
- package/kit/skills/to-tickets/agents/openai.yaml +5 -0
- package/kit/skills/triage/AGENT-BRIEF.md +207 -0
- package/kit/skills/triage/OUT-OF-SCOPE.md +105 -0
- package/kit/skills/triage/SKILL.md +112 -0
- package/kit/skills/triage/agents/openai.yaml +5 -0
- package/kit/skills/use-zedkit/SKILL.md +32 -0
- package/kit/skills/wayfinder/SKILL.md +128 -0
- package/kit/skills/wayfinder/agents/openai.yaml +5 -0
- package/kit/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/kit/skills/writing-for-agents/SKILL.md +81 -0
- package/kit/skills/writing-for-agents/agents/openai.yaml +3 -0
- package/package.json +48 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 zedtech-fr
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,176 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @zedtech/zedkit-ai
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An agent-agnostic AI setup for a code repo: an `AGENTS.md` template, skills,
|
|
4
|
+
subagents, and a small installer and validator. Works with Claude Code,
|
|
5
|
+
Cursor, Codex, Muse and any tool that reads `AGENTS.md` or Agent Skills.
|
|
6
|
+
Original work by the same author, plus vendored MIT skills (see
|
|
7
|
+
[kit/THIRD_PARTY_NOTICES.md](kit/THIRD_PARTY_NOTICES.md)).
|
|
8
|
+
|
|
9
|
+
## Use it
|
|
10
|
+
|
|
11
|
+
Not published to npm yet. From a zedkit checkout, pack the tarballs;
|
|
12
|
+
then in your own repo, install and run with `npx`:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
for p in ai core; do (cd packages/$p && pnpm pack --pack-destination /tmp/zedkit-pack); done
|
|
16
|
+
npm install --no-save /tmp/zedkit-pack/*.tgz # in your own repo
|
|
17
|
+
npx zedkit-ai init . # copy the core kit into this repo
|
|
18
|
+
# then ask your agent: "run the setup-ai skill"
|
|
19
|
+
npx zedkit-ai validate # check skills and subagents
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
With pnpm instead of npm, pin the unpacked core tarball first (pnpm
|
|
23
|
+
resolves each tarball's dependencies independently — this goes away once
|
|
24
|
+
the packages publish):
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
mkdir -p /tmp/zedkit-core && tar -xzf /tmp/zedkit-pack/zedkit-core-*.tgz -C /tmp/zedkit-core
|
|
28
|
+
# package.json: { "pnpm": { "overrides": { "@zedtech/zedkit-core": "file:/tmp/zedkit-core/package" } } }
|
|
29
|
+
pnpm add /tmp/zedkit-pack/zedtech-zedkit-ai-0.1.0.tgz
|
|
30
|
+
./node_modules/.bin/zedkit-ai init . --provider cursor
|
|
31
|
+
./node_modules/.bin/zedkit-ai validate # must print: ok
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`init` installs generic instructions. The `setup-ai` skill makes them specific:
|
|
35
|
+
it explores the repo (code, docs, CI, history), runs the commands it finds,
|
|
36
|
+
then fills `AGENTS.md` with verified facts and proposes repo-specific nested
|
|
37
|
+
rules, skills and subagents. If a setup already exists (`AGENTS.md`,
|
|
38
|
+
`.cursor/rules`, `CLAUDE.md`, ...), it audits it first (stale, contradictory,
|
|
39
|
+
duplicated, too long) and improves it in place instead of replacing it.
|
|
40
|
+
`setup-ai` also fills the template's `Role and style` section (role, tone,
|
|
41
|
+
reply language) from repo evidence — docs language, commit style — asking a
|
|
42
|
+
single question when the evidence cannot tell. At a multi-repo workspace
|
|
43
|
+
root (several child checkouts) it switches to workspace mode: it inventories
|
|
44
|
+
each repo, maps cross-repo dependencies, and writes a root `AGENTS.md`
|
|
45
|
+
without touching the children unasked.
|
|
46
|
+
|
|
47
|
+
Developing the kit itself? From a zedkit checkout, build once and call
|
|
48
|
+
the binary directly: `pnpm --filter @zedtech/zedkit-ai build`, then
|
|
49
|
+
`node packages/ai/dist/bin.js init <dir>`.
|
|
50
|
+
|
|
51
|
+
`init` options: `--preset core|full`, `--provider cursor,claude,codex,muse,all`
|
|
52
|
+
(`--target` is an alias), `--dry-run`. It copies files (you own them
|
|
53
|
+
afterwards) and never overwrites an existing one; the one exception is an
|
|
54
|
+
existing `AGENTS.md` without the ladder, which gets the ladder section
|
|
55
|
+
appended (reported as `append`). It also skips
|
|
56
|
+
`.cursor/rules/project.mdc` (with a skip line naming the rule) when another
|
|
57
|
+
rule in `.cursor/rules/` is already always on (`alwaysApply: true`), instead
|
|
58
|
+
of adding a second one. Run `zedkit-ai list` to see presets, subagents and
|
|
59
|
+
commands.
|
|
60
|
+
|
|
61
|
+
## Providers
|
|
62
|
+
|
|
63
|
+
One shared source (`.agents/`), then a thin layer per provider:
|
|
64
|
+
|
|
65
|
+
| Provider | Layer | Reads |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| `cursor` | `.cursor/rules/project.mdc`, `.cursor/skills` link, agents and commands as real-file copies | its `.cursor/` layer |
|
|
68
|
+
| `claude` | `CLAUDE.md` link, `.claude/{skills,agents,commands}` links | its `.claude/` layer |
|
|
69
|
+
| `codex` | none | `AGENTS.md` and `.agents/skills` directly |
|
|
70
|
+
| `muse` | none | `.agents/` directly |
|
|
71
|
+
|
|
72
|
+
Cursor gets copies because a symlinked folder shows up empty there. Copies
|
|
73
|
+
can drift when `.agents/` changes: `zedkit-ai validate` reports each missing
|
|
74
|
+
or drifted copy — fix it by copying the file over (init never overwrites).
|
|
75
|
+
`setup-ai` takes provider names (`setup-ai cursor claude`) and asks once
|
|
76
|
+
which providers to wire when it cannot tell.
|
|
77
|
+
|
|
78
|
+
## What you get
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
AGENTS.md instructions every tool reads
|
|
82
|
+
CLAUDE.md -> AGENTS.md
|
|
83
|
+
.agents/skills/ workflows (the Agent Skills layout)
|
|
84
|
+
.agents/agents/ subagents
|
|
85
|
+
.agents/commands/ one-keystroke commands (thin: each runs a skill)
|
|
86
|
+
.claude/{skills,agents,commands} symlinks to .agents/
|
|
87
|
+
.cursor/skills symlink to .agents/skills
|
|
88
|
+
.cursor/{agents,commands} real-file copies (a link shows up empty)
|
|
89
|
+
.cursor/rules/project.mdc one always-on rule pointing at AGENTS.md
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
One source (`.agents/`), thin per-tool links. Nested `AGENTS.md` files hold
|
|
93
|
+
per-folder rules.
|
|
94
|
+
|
|
95
|
+
Commands (`review`, `plan`, `challenge`, `implement`, `setup-ai`, `pr`,
|
|
96
|
+
`handoff`) are 3-6 line files: each runs its skill on the command arguments
|
|
97
|
+
(or the current context). Both tools also list skills as `/` commands
|
|
98
|
+
nowadays; the files stay as the explicit one-keystroke path and as fallback
|
|
99
|
+
when the skills link is not followed.
|
|
100
|
+
|
|
101
|
+
## The kit
|
|
102
|
+
|
|
103
|
+
**Principles it enforces**
|
|
104
|
+
|
|
105
|
+
- *Verify, do not guess* (`ground-truth`): read the source before relying on a
|
|
106
|
+
name, shape, flag or version; cite `file:line`; say what was not checked.
|
|
107
|
+
- *Smallest complete change* (`ponytail`, MIT, vendored): reuse before adding.
|
|
108
|
+
- *Parallel and context-aware* (`parallel-work`): fan out independent work to
|
|
109
|
+
subagents with self-contained briefs; contract first, disjoint files.
|
|
110
|
+
- *Proven done* (`definition-of-done`, agent `verifier`): gates on the final
|
|
111
|
+
state, no weakened tests, refactor parity by reading bodies, cold second
|
|
112
|
+
review.
|
|
113
|
+
|
|
114
|
+
**Skills first-party:** `ground-truth`, `parallel-work`, `definition-of-done`,
|
|
115
|
+
`adversarial-tests`, `rules-upkeep`, `persona-review`, `setup-ai`, `use-zedkit`.
|
|
116
|
+
|
|
117
|
+
**Entry points (one command per phase):** `review` (pins the diff, fans out
|
|
118
|
+
`code-review` + `persona-review` + `adversarial-tests`/`security-reviewer`
|
|
119
|
+
when relevant, one verdict), `plan` (`to-spec`/`to-tickets`/`wayfinder`, then
|
|
120
|
+
`challenge`), `challenge` (`plan-challenger` + domain/design checks),
|
|
121
|
+
`implement` (extended: challenged plan in, `definition-of-done`, `review`).
|
|
122
|
+
All four live in the `core` preset; the detailed skills stay reusable and are
|
|
123
|
+
never copied into them.
|
|
124
|
+
|
|
125
|
+
**Skills vendored (MIT):** `ponytail` (+ review, audit, debt, gain, help) and
|
|
126
|
+
the Matt Pocock engineering skills (`tdd`, `code-review`, `diagnosing-bugs`,
|
|
127
|
+
`handoff`, `pr`, `to-spec`, `triage`, ...).
|
|
128
|
+
|
|
129
|
+
**Subagents:** `explorer` (read-only lookup), `architect` (plan, never code),
|
|
130
|
+
`plan-challenger` (pre-mortem and ranked objections), `verifier` (gate),
|
|
131
|
+
`improver` (apply review findings, smallest diff), `security-reviewer`.
|
|
132
|
+
|
|
133
|
+
**Presets:** `core` (the skills most projects benefit from; `zedkit-ai list`
|
|
134
|
+
shows them) and `full` (all). Keep the skill count low: every skill's name and
|
|
135
|
+
description is loaded into context up front (Codex caps that list at about 2%
|
|
136
|
+
of the context window and shortens descriptions past it). Subagents are always
|
|
137
|
+
installed; their files are only read when one is used.
|
|
138
|
+
|
|
139
|
+
## Choices worth knowing
|
|
140
|
+
|
|
141
|
+
- Subagent `model` is left unset (inherits). An unknown model id silently
|
|
142
|
+
falls back in some tools, so pin one in your project only after listing what
|
|
143
|
+
your tool accepts. The validator rejects any other value in the kit.
|
|
144
|
+
- Subagent `description` is one line: a block (`>`) can be shown literally and
|
|
145
|
+
the agent is then never chosen. The validator checks it.
|
|
146
|
+
- Read-only subagents say so in their prompt body and set
|
|
147
|
+
`disallowedTools: Write, Edit` (Claude Code honors it; other tools tolerate
|
|
148
|
+
the key). There is deliberately no `readonly:` key: at least one tool
|
|
149
|
+
silently drops a subagent file with an unknown field, so the validator
|
|
150
|
+
rejects it.
|
|
151
|
+
- Cursor reads `.cursor/agents`, `.claude/agents` and `.codex/agents`
|
|
152
|
+
([docs](https://cursor.com/docs/subagents), checked 2026-10-24); the installer
|
|
153
|
+
links `.cursor/agents` anyway so a Cursor-only repo needs nothing else.
|
|
154
|
+
- Codex reads `.agents/skills` (it follows symlinks) and `AGENTS.md`
|
|
155
|
+
([docs](https://developers.openai.com/codex/skills), checked 2026-10-24), so
|
|
156
|
+
it needs no adapter. The subagent files are not wired for Codex.
|
|
157
|
+
- Muse reads `AGENTS.md`, `.agents/skills` and `.agents/agents` directly
|
|
158
|
+
(verified empirically 2026-10-24 with `muse skills list` and a headless
|
|
159
|
+
`muse exec` run: every core skill and all 6 subagents load), so it needs
|
|
160
|
+
no adapter either. It ignores the `.claude/` and `.cursor/` links. This is
|
|
161
|
+
how the `readonly:` ban above was found: files setting it never appear in
|
|
162
|
+
its agent list.
|
|
163
|
+
- Symlinks need a filesystem that supports them (Windows: developer mode or
|
|
164
|
+
WSL).
|
|
165
|
+
|
|
166
|
+
## API
|
|
167
|
+
|
|
168
|
+
`installKit(options)` and `validateKit(dir)`: see [CATALOG.md](CATALOG.md).
|
|
169
|
+
|
|
170
|
+
## Verify
|
|
171
|
+
|
|
172
|
+
```sh
|
|
173
|
+
pnpm --filter @zedtech/zedkit-ai typecheck && pnpm --filter @zedtech/zedkit-ai lint && pnpm --filter @zedtech/zedkit-ai build && pnpm --filter @zedtech/zedkit-ai test
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The tests also validate the whole bundled kit.
|
package/dist/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
|
package/dist/bin.js
ADDED
package/dist/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,oCAAoC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IAC7C,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;IAChC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;CACnC,CAAC,CAAC"}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Where the CLI writes: normal lines and error lines. */
|
|
2
|
+
export type Sinks = {
|
|
3
|
+
out: (line: string) => void;
|
|
4
|
+
err: (line: string) => void;
|
|
5
|
+
};
|
|
6
|
+
/** Run the CLI. Returns the process exit code (0 ok, 1 validation problems, 2 usage or runtime error). */
|
|
7
|
+
export declare function main(argv: string[], sinks: Sinks): number;
|
|
8
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAyBA,0DAA0D;AAC1D,MAAM,MAAM,KAAK,GAAG;IAAE,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,CAAC;AAqFjF,0GAA0G;AAC1G,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAQzD"}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// Original work by the same author.
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { dirname, join, resolve } from "node:path";
|
|
4
|
+
import { parseArgs } from "node:util";
|
|
5
|
+
import { err, ok, tryCatch } from "@zedtech/zedkit-core";
|
|
6
|
+
import { installKit } from "./install.js";
|
|
7
|
+
import { readManifest } from "./kit.js";
|
|
8
|
+
import { checkDrift, validateKit } from "./validate.js";
|
|
9
|
+
const USAGE = `zedkit-ai <command>
|
|
10
|
+
|
|
11
|
+
init [dir] [--preset core|full] [--provider ...] [--dry-run]
|
|
12
|
+
Copy skills, subagents, commands and an AGENTS.md template into dir
|
|
13
|
+
(default .), then wire the providers (default all). Never overwrites
|
|
14
|
+
existing files (an existing AGENTS.md without the ladder gets the
|
|
15
|
+
ladder section appended). --provider takes cursor,claude,codex,muse,all;
|
|
16
|
+
--target is an alias of --provider.
|
|
17
|
+
validate [dir]
|
|
18
|
+
Check skills, subagents and commands, plus provider-copy drift
|
|
19
|
+
(default dir: .agents; a project root is accepted too). Exit 1
|
|
20
|
+
on problems.
|
|
21
|
+
list
|
|
22
|
+
Show presets, subagents and commands.
|
|
23
|
+
`;
|
|
24
|
+
const OPTIONS = {
|
|
25
|
+
preset: { type: "string" },
|
|
26
|
+
provider: { type: "string" },
|
|
27
|
+
target: { type: "string" },
|
|
28
|
+
"dry-run": { type: "boolean" },
|
|
29
|
+
};
|
|
30
|
+
function parse(args, options, maxPositionals) {
|
|
31
|
+
const parsed = tryCatch(() => parseArgs({ args, allowPositionals: true, options }));
|
|
32
|
+
if (!parsed.ok)
|
|
33
|
+
return err(parsed.error);
|
|
34
|
+
if (parsed.value.positionals.length > maxPositionals) {
|
|
35
|
+
return err(new Error(`unexpected argument "${parsed.value.positionals[maxPositionals]}"`));
|
|
36
|
+
}
|
|
37
|
+
return ok(parsed.value);
|
|
38
|
+
}
|
|
39
|
+
function parseProviders(value) {
|
|
40
|
+
if (value === undefined)
|
|
41
|
+
return ok(undefined);
|
|
42
|
+
const names = String(value).split(",").map((s) => s.trim());
|
|
43
|
+
if (names.includes("all"))
|
|
44
|
+
return ok(undefined);
|
|
45
|
+
const bad = names.find((n) => n !== "claude" && n !== "cursor" && n !== "codex" && n !== "muse");
|
|
46
|
+
if (bad !== undefined)
|
|
47
|
+
return err(new Error(`unknown provider "${bad}" (cursor, claude, codex, muse, all)`));
|
|
48
|
+
return ok(names);
|
|
49
|
+
}
|
|
50
|
+
function fail(message, sinks) {
|
|
51
|
+
sinks.err(`error: ${message}`);
|
|
52
|
+
return 2;
|
|
53
|
+
}
|
|
54
|
+
function runInit(args, sinks) {
|
|
55
|
+
const parsed = parse(args, OPTIONS, 1);
|
|
56
|
+
if (!parsed.ok)
|
|
57
|
+
return fail(parsed.error.message, sinks);
|
|
58
|
+
const { values, positionals } = parsed.value;
|
|
59
|
+
const providers = parseProviders(values.provider ?? values.target);
|
|
60
|
+
if (!providers.ok)
|
|
61
|
+
return fail(providers.error.message, sinks);
|
|
62
|
+
const dryRun = values["dry-run"] === true;
|
|
63
|
+
const preset = typeof values.preset === "string" ? values.preset : undefined;
|
|
64
|
+
const result = installKit({
|
|
65
|
+
dest: resolve(positionals[0] ?? "."),
|
|
66
|
+
...(preset !== undefined && { preset }),
|
|
67
|
+
...(providers.value !== undefined && { providers: providers.value }),
|
|
68
|
+
dryRun,
|
|
69
|
+
});
|
|
70
|
+
if (!result.ok)
|
|
71
|
+
return fail(result.error.message, sinks);
|
|
72
|
+
for (const action of result.value) {
|
|
73
|
+
sinks.out(`${action.kind.padEnd(5)} ${action.path}${action.note ? ` (${action.note})` : ""}`);
|
|
74
|
+
}
|
|
75
|
+
sinks.out(dryRun ? "dry run: nothing written" : "next: ask your agent to run the `setup-ai` skill, then `zedkit-ai validate`");
|
|
76
|
+
return 0;
|
|
77
|
+
}
|
|
78
|
+
function runValidate(args, sinks) {
|
|
79
|
+
const parsed = parse(args, {}, 1);
|
|
80
|
+
if (!parsed.ok)
|
|
81
|
+
return fail(parsed.error.message, sinks);
|
|
82
|
+
const dir = resolve(parsed.value.positionals[0] ?? ".agents");
|
|
83
|
+
if (!existsSync(dir))
|
|
84
|
+
return fail(`no such directory: ${dir}`, sinks);
|
|
85
|
+
// A project root points at its .agents/; an .agents/ dir drifts against
|
|
86
|
+
// its own parent. Any other dir just has nothing to drift against.
|
|
87
|
+
const nested = join(dir, ".agents");
|
|
88
|
+
const agentsDir = existsSync(nested) ? nested : dir;
|
|
89
|
+
const projectRoot = agentsDir === dir ? dirname(dir) : dir;
|
|
90
|
+
const issues = [...validateKit(agentsDir), ...checkDrift(projectRoot, agentsDir)];
|
|
91
|
+
for (const issue of issues)
|
|
92
|
+
sinks.out(`${issue.path}: ${issue.message}`);
|
|
93
|
+
sinks.out(issues.length === 0 ? "ok" : `${issues.length} problem(s)`);
|
|
94
|
+
return issues.length === 0 ? 0 : 1;
|
|
95
|
+
}
|
|
96
|
+
function runList(args, sinks) {
|
|
97
|
+
const parsed = parse(args, {}, 0);
|
|
98
|
+
if (!parsed.ok)
|
|
99
|
+
return fail(parsed.error.message, sinks);
|
|
100
|
+
const manifest = readManifest();
|
|
101
|
+
if (!manifest.ok)
|
|
102
|
+
return fail(manifest.error.message, sinks);
|
|
103
|
+
for (const [name, skills] of Object.entries(manifest.value.presets)) {
|
|
104
|
+
sinks.out(`preset ${name}: ${skills === "*" ? "every skill" : skills.join(", ")}`);
|
|
105
|
+
}
|
|
106
|
+
sinks.out(`agents: ${manifest.value.agents.join(", ")}`);
|
|
107
|
+
sinks.out(`commands: ${(manifest.value.commands ?? []).join(", ") || "(none)"}`);
|
|
108
|
+
return 0;
|
|
109
|
+
}
|
|
110
|
+
/** Run the CLI. Returns the process exit code (0 ok, 1 validation problems, 2 usage or runtime error). */
|
|
111
|
+
export function main(argv, sinks) {
|
|
112
|
+
const [command, ...rest] = argv;
|
|
113
|
+
if (command === "init")
|
|
114
|
+
return runInit(rest, sinks);
|
|
115
|
+
if (command === "validate")
|
|
116
|
+
return runValidate(rest, sinks);
|
|
117
|
+
if (command === "list")
|
|
118
|
+
return runList(rest, sinks);
|
|
119
|
+
const help = command === undefined || command === "--help" || command === "-h";
|
|
120
|
+
(help ? sinks.out : sinks.err)(USAGE.trimEnd());
|
|
121
|
+
return help ? 0 : 2;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAe,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAiB,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,KAAK,GAAG;;;;;;;;;;;;;;CAcb,CAAC;AAOF,MAAM,OAAO,GAAG;IACd,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC5B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,SAA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
5
|
+
/** Frontmatter source text, without the `---` fences. */
|
|
6
|
+
raw: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function parseFrontmatter(text: string): Result<Frontmatter>;
|
|
9
|
+
//# sourceMappingURL=frontmatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGtE,MAAM,MAAM,WAAW,GAAG;IACxB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAKF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,CAelE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Original work by the same author.
|
|
2
|
+
import { err, ok, tryCatch } from "@zedtech/zedkit-core";
|
|
3
|
+
import { parse } from "yaml";
|
|
4
|
+
// Optional BOM, opening fence, body (may be empty), closing fence.
|
|
5
|
+
const FENCE = /^\uFEFF?---[ \t]*\n(?:([\s\S]*?)\n)?---[ \t]*(?:\n|$)/;
|
|
6
|
+
export function parseFrontmatter(text) {
|
|
7
|
+
const match = FENCE.exec(text.replace(/\r\n/g, "\n"));
|
|
8
|
+
if (!match) {
|
|
9
|
+
return err(new Error("missing frontmatter (file must start with a --- block)"));
|
|
10
|
+
}
|
|
11
|
+
const raw = match[1] ?? "";
|
|
12
|
+
const parsed = tryCatch(() => parse(raw));
|
|
13
|
+
if (!parsed.ok) {
|
|
14
|
+
return err(new Error(`invalid YAML frontmatter: ${parsed.error.message}`));
|
|
15
|
+
}
|
|
16
|
+
const value = parsed.value ?? {};
|
|
17
|
+
if (typeof value !== "object" || Array.isArray(value)) {
|
|
18
|
+
return err(new Error("frontmatter must be a YAML mapping"));
|
|
19
|
+
}
|
|
20
|
+
return ok({ data: value, raw });
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=frontmatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAe,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAS7B,mEAAmE;AACnE,MAAM,KAAK,GAAG,uDAAuD,CAAC;AAEtE,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IACtD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,GAAG,CAAC,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC,CAAC;IAClF,CAAC;IACD,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAY,CAAC,CAAC;IACrD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,GAAG,CAAC,IAAI,KAAK,CAAC,6BAA6B,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7E,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;IACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACtD,OAAO,GAAG,CAAC,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAgC,EAAE,GAAG,EAAE,CAAC,CAAC;AAC7D,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxG,OAAO,EAAE,KAAK,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxG,OAAO,EAAc,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type Result } from "@zedtech/zedkit-core";
|
|
2
|
+
export type Provider = "claude" | "cursor" | "codex" | "muse";
|
|
3
|
+
/** @deprecated Use {@link Provider}. Kept so `--target` and old callers keep working. */
|
|
4
|
+
export type Target = Provider;
|
|
5
|
+
export type InstallOptions = {
|
|
6
|
+
/** Project directory to install into. */
|
|
7
|
+
dest: string;
|
|
8
|
+
/** Preset name from kit.json. Default `core`. */
|
|
9
|
+
preset?: string;
|
|
10
|
+
/** Providers to wire. Default: all. */
|
|
11
|
+
providers?: Provider[];
|
|
12
|
+
/** @deprecated Use `providers`. */
|
|
13
|
+
targets?: Target[];
|
|
14
|
+
/** Report what would happen without touching the disk. */
|
|
15
|
+
dryRun?: boolean;
|
|
16
|
+
/** Custom kit directory (default: the bundled kit). */
|
|
17
|
+
kit?: string;
|
|
18
|
+
};
|
|
19
|
+
export type Action = {
|
|
20
|
+
kind: "copy" | "link" | "write" | "append" | "skip";
|
|
21
|
+
path: string;
|
|
22
|
+
/** Why it was skipped, what was appended, or what a link points to. */
|
|
23
|
+
note?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Install the kit into a project. The shared source (skills, subagents,
|
|
27
|
+
* commands, AGENTS.md) is copied into `.agents/` (the project owns it from
|
|
28
|
+
* then on); each chosen provider then gets its thin layer, links where the
|
|
29
|
+
* provider follows them, real files where it does not. Existing files are
|
|
30
|
+
* never overwritten: they are reported as skipped, except an existing
|
|
31
|
+
* AGENTS.md missing the ladder, which gets the ladder section appended
|
|
32
|
+
* (reported as `append`). A bad preset or kit fails before anything is
|
|
33
|
+
* written.
|
|
34
|
+
*/
|
|
35
|
+
export declare function installKit(options: InstallOptions): Result<Action[]>;
|
|
36
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAeA,OAAO,EAAqB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAItE,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9D,yFAAyF;AACzF,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC;AAE9B,MAAM,MAAM,cAAc,GAAG;IAC3B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAsNF;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAapE"}
|