@antomanc/aginit 0.4.0 → 0.5.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 (117) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +108 -28
  3. package/THIRD_PARTY_NOTICES.md +92 -16
  4. package/dist/adapters/agent-docs.d.ts +32 -0
  5. package/dist/adapters/agent-docs.d.ts.map +1 -0
  6. package/dist/adapters/agent-docs.js +146 -0
  7. package/dist/adapters/agent-docs.js.map +1 -0
  8. package/dist/adapters/agents-md.d.ts +13 -1
  9. package/dist/adapters/agents-md.d.ts.map +1 -1
  10. package/dist/adapters/agents-md.js +137 -120
  11. package/dist/adapters/agents-md.js.map +1 -1
  12. package/dist/adapters/e2e.d.ts +15 -0
  13. package/dist/adapters/e2e.d.ts.map +1 -0
  14. package/dist/adapters/e2e.js +55 -0
  15. package/dist/adapters/e2e.js.map +1 -0
  16. package/dist/adapters/skills.d.ts +5 -0
  17. package/dist/adapters/skills.d.ts.map +1 -1
  18. package/dist/adapters/skills.js +17 -0
  19. package/dist/adapters/skills.js.map +1 -1
  20. package/dist/adapters/tool-ignores.d.ts +9 -0
  21. package/dist/adapters/tool-ignores.d.ts.map +1 -0
  22. package/dist/adapters/tool-ignores.js +121 -0
  23. package/dist/adapters/tool-ignores.js.map +1 -0
  24. package/dist/cli/capabilities.d.ts +17 -0
  25. package/dist/cli/capabilities.d.ts.map +1 -0
  26. package/dist/cli/capabilities.js +149 -0
  27. package/dist/cli/capabilities.js.map +1 -0
  28. package/dist/cli/doctor.d.ts +16 -0
  29. package/dist/cli/doctor.d.ts.map +1 -1
  30. package/dist/cli/doctor.js +104 -70
  31. package/dist/cli/doctor.js.map +1 -1
  32. package/dist/cli/init.js +1 -1
  33. package/dist/cli/init.js.map +1 -1
  34. package/dist/cli/main.d.ts.map +1 -1
  35. package/dist/cli/main.js +123 -20
  36. package/dist/cli/main.js.map +1 -1
  37. package/dist/cli/new.d.ts +15 -1
  38. package/dist/cli/new.d.ts.map +1 -1
  39. package/dist/cli/new.js +163 -67
  40. package/dist/cli/new.js.map +1 -1
  41. package/dist/cli/wizard.d.ts +5 -0
  42. package/dist/cli/wizard.d.ts.map +1 -1
  43. package/dist/cli/wizard.js +104 -102
  44. package/dist/cli/wizard.js.map +1 -1
  45. package/dist/config/defaults.d.ts +14 -6
  46. package/dist/config/defaults.d.ts.map +1 -1
  47. package/dist/config/defaults.js +38 -174
  48. package/dist/config/defaults.js.map +1 -1
  49. package/dist/config/schema.d.ts +14 -0
  50. package/dist/config/schema.d.ts.map +1 -1
  51. package/dist/config/schema.js.map +1 -1
  52. package/dist/config/validation.d.ts +1 -0
  53. package/dist/config/validation.d.ts.map +1 -1
  54. package/dist/config/validation.js +63 -0
  55. package/dist/config/validation.js.map +1 -1
  56. package/dist/detect/index.d.ts +18 -0
  57. package/dist/detect/index.d.ts.map +1 -0
  58. package/dist/detect/index.js +120 -0
  59. package/dist/detect/index.js.map +1 -0
  60. package/dist/index.d.ts +5 -0
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +5 -0
  63. package/dist/index.js.map +1 -1
  64. package/dist/presets/cli.d.ts.map +1 -1
  65. package/dist/presets/cli.js +7 -0
  66. package/dist/presets/cli.js.map +1 -1
  67. package/dist/presets/generic.d.ts.map +1 -1
  68. package/dist/presets/generic.js +4 -1
  69. package/dist/presets/generic.js.map +1 -1
  70. package/dist/presets/testing.d.ts +1 -1
  71. package/dist/presets/testing.d.ts.map +1 -1
  72. package/dist/presets/testing.js +22 -8
  73. package/dist/presets/testing.js.map +1 -1
  74. package/dist/presets/web.d.ts.map +1 -1
  75. package/dist/presets/web.js +39 -5
  76. package/dist/presets/web.js.map +1 -1
  77. package/dist/registry/catalog.d.ts +13 -0
  78. package/dist/registry/catalog.d.ts.map +1 -0
  79. package/dist/registry/catalog.js +544 -0
  80. package/dist/registry/catalog.js.map +1 -0
  81. package/dist/registry/index.d.ts +84 -0
  82. package/dist/registry/index.d.ts.map +1 -0
  83. package/dist/registry/index.js +309 -0
  84. package/dist/registry/index.js.map +1 -0
  85. package/dist/registry/setup.d.ts +14 -0
  86. package/dist/registry/setup.d.ts.map +1 -0
  87. package/dist/registry/setup.js +25 -0
  88. package/dist/registry/setup.js.map +1 -0
  89. package/dist/registry/types.d.ts +115 -0
  90. package/dist/registry/types.d.ts.map +1 -0
  91. package/dist/registry/types.js +2 -0
  92. package/dist/registry/types.js.map +1 -0
  93. package/package.json +3 -2
  94. package/src/adapters/agent-docs.ts +184 -0
  95. package/src/adapters/agents-md.ts +160 -137
  96. package/src/adapters/e2e.ts +58 -0
  97. package/src/adapters/skills.ts +18 -0
  98. package/src/adapters/tool-ignores.ts +158 -0
  99. package/src/cli/capabilities.ts +176 -0
  100. package/src/cli/doctor.ts +100 -66
  101. package/src/cli/init.ts +1 -1
  102. package/src/cli/main.ts +130 -20
  103. package/src/cli/new.ts +199 -73
  104. package/src/cli/wizard.ts +130 -103
  105. package/src/config/defaults.ts +57 -179
  106. package/src/config/schema.ts +15 -0
  107. package/src/config/validation.ts +56 -0
  108. package/src/detect/index.ts +134 -0
  109. package/src/index.ts +5 -0
  110. package/src/presets/cli.ts +6 -0
  111. package/src/presets/generic.ts +4 -1
  112. package/src/presets/testing.ts +29 -12
  113. package/src/presets/web.ts +39 -5
  114. package/src/registry/catalog.ts +569 -0
  115. package/src/registry/index.ts +395 -0
  116. package/src/registry/setup.ts +40 -0
  117. package/src/registry/types.ts +109 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.0] - 2026-10-15
4
+
5
+ ### Added
6
+
7
+ - A VHS demo of the interactive wizard, capability selection and successful doctor run, embedded in the README for GitHub and npm.
8
+
9
+ - Capability registry (`src/registry/`). Every skill, tool and test engine is one declarative entry: install steps, doctor checks, AGENTS.md routing row, rebuttals and docs. `init`, `list`, `add`, `remove`, `doctor` and the docs read it. See `docs/adr/0003-capability-registry-and-stack-agnostic-setup.md`.
10
+ - Stack detection (`src/detect/`) for Flutter, Swift, Kotlin/Android, React Native/Expo, web frameworks, Node, Rust, Go and Python, with the host toolchain's commands in AGENTS.md.
11
+ - Non-JS projects get no root `package.json`, `tsconfig.json` or Vitest files. Node-only tooling is refused for them with a pointer to `--testing e2e` or `native`.
12
+ - New capabilities: Superpowers and `minimal` methodologies, `karpathy-guidelines` (default), agent-device (default UI driver for mobile), Chrome DevTools MCP, BrowserSkill, tester-army/e2e (root for Node projects, isolated `.agents/e2e/` otherwise), context-mode and Worktrunk add-ons.
13
+ - CLI: `--platform`, `--methodology`, `--design`, `--testing`, `--ui-driver`, `--addons`, `--add-skill`, `--without`; `-y, --yes`; `aginit [options]` as a shortcut for `init`; `aginit list`, `aginit add`, `aginit remove`.
14
+ - AGENTS.md gets a managed `<!-- aginit:start -->` block with Karpathy guardrails, a Task Routing table and an Anti-Rationalization table, plus `docs/agents/testing.md`, `ui-verification.md` and `workflows.md`. Existing AGENTS.md content stays as written.
15
+ - Config: optional `platform`, `stack`, `capabilities`, `customCapabilities` and `disabledCapabilities`. Older configs load unchanged and their capabilities are inferred.
16
+ - `aginit doctor` reports one row per active capability (skill files, CLIs, the Graft index).
17
+
18
+ ### Changed
19
+
20
+ - The interactive wizard uses detected stack defaults and registry choices for platform, methodology, design, testing and UI automation, plus optional registry add-ons. Short labels and a setup summary make choices easier to review.
21
+
22
+ - AGENTS.md's "AI Capabilities & Skills" list moved to `docs/agents/workflows.md`.
23
+ - A generic preset on an existing Node project defaults to the project's own test runner (`native`) instead of claiming Vitest it never installed.
24
+
25
+ ### Fixed
26
+
27
+ - Committed Claude helpers resolve Graft at runtime without personal machine paths.
28
+
29
+ - THIRD_PARTY_NOTICES.md credited humanizer and Impeccable to the wrong authors. It now credits every integration, with licenses checked upstream; a test keeps it in sync with the registry.
30
+
31
+ ## 0.4.1 — 2026-10-11
32
+
33
+ ### Fixed
34
+
35
+ - `typecheck` on existing web projects uses the framework's checker instead of `tsc --noEmit`, which can't resolve Astro virtual modules or single-file components: `astro check` (adds `@astrojs/check`), `nuxi typecheck`, `svelte-kit sync && svelte-check` or `svelte-check`, and `vue-tsc` (each adds its checker package when missing). An existing `typecheck` script is left alone.
36
+ - Projects with a solution-style `tsconfig.json` (`"files": []` plus `references`, as in the Vite templates) get `tsc -b --noEmit`. Plain `tsc --noEmit` checked nothing there, so a fresh `--framework vite` project passed typecheck with type errors.
37
+ - Vendored skills no longer break the project's linters and formatters. `aginit init` and `aginit update` add `.agents/` and `.claude/` to `.prettierignore`, to `.eslintignore` (legacy ESLint, oxlint), to the global ignores of a flat ESLint config (`globalIgnores([...])` or an ignores-only object), and to `files.includes` in `biome.json` (Biome 2.2+). Configs that can't be edited safely get a warning with the exact line to add.
38
+ - `aginit doctor` reports linters and formatters that still check vendored skills.
39
+
3
40
  ## 0.4.0 — 2026-10-11
4
41
 
5
42
  ### Added
package/README.md CHANGED
@@ -3,9 +3,10 @@
3
3
  **Set up a new or existing project for AI coding agents with one command.**
4
4
 
5
5
  aginit gives a repo what agents need to do good work from the first session: an `AGENTS.md`
6
- that explains the project, a curated set of engineering skills, a codebase graph so agents
7
- read less and understand more, and a test harness they can actually run. It wires up
8
- upstream tools instead of reimplementing them.
6
+ that routes each task to the right doc, a curated set of engineering skills, a codebase graph
7
+ so agents read less and understand more, a test harness they can actually run, and a way to
8
+ see the UI they change. It works for web, native mobile (Flutter, Swift, Kotlin), React Native,
9
+ backend and CLI projects, and it wires up upstream tools instead of reimplementing them.
9
10
 
10
11
  ```bash
11
12
  npx @antomanc/aginit
@@ -15,7 +16,7 @@ npx @antomanc/aginit
15
16
  [![npm version](https://img.shields.io/npm/v/@antomanc/aginit)](https://www.npmjs.com/package/@antomanc/aginit)
16
17
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
17
18
 
18
- <p align="center"><img src="docs/assets/demo.gif" alt="aginit wizard creating a CLI project with AGENTS.md, skills and a Graft codebase graph" width="720"></p>
19
+ <p align="center"><img src="https://raw.githubusercontent.com/antomanc/aginit/main/docs/assets/demo.gif" alt="aginit v2 detecting a web project, configuring capabilities and e2e, and passing every doctor check" width="720"></p>
19
20
 
20
21
  > **Beta.** Expect flags and defaults to change before 1.0.
21
22
 
@@ -34,13 +35,17 @@ aginit sets all of this up the same way every time, and you can re-run it whenev
34
35
 
35
36
  | | |
36
37
  |---|---|
37
- | **Instructions** | `AGENTS.md` with the project's real commands, invariants and a first-session playbook, shared by Antigravity, Codex and any agent that reads `AGENTS.md`, plus a one-line `CLAUDE.md` (`@AGENTS.md`) so Claude Code loads it too |
38
- | **Skills** | All 27 stable [Matt Pocock skills](https://github.com/mattpocock/skills) (`tdd`, `code-review`, `diagnosing-bugs`, `to-spec`, `to-tickets`, `implement-spec`, `pr`...) plus [humanizer](https://github.com/blader/humanizer) and [ponytail](https://github.com/DietrichGebert/ponytail), installed in `.agents/skills/` via the [Skills CLI](https://github.com/vercel-labs/skills) and linked into `.claude/skills/` for Claude Code |
38
+ | **Instructions** | A lean `AGENTS.md`: invariants, the project's real commands, Karpathy guardrails, a **Task Routing** table and an **Anti-Rationalization** table. Details live in `docs/agents/testing.md`, `ui-verification.md` and `workflows.md`, which agents load only when the task needs them. A one-line `CLAUDE.md` (`@AGENTS.md`) makes Claude Code read it too |
39
+ | **Skills** | One methodology ([Matt Pocock skills](https://github.com/mattpocock/skills) by default, or [Superpowers](https://github.com/obra/superpowers), or none) plus [ponytail](https://github.com/DietrichGebert/ponytail), [karpathy-guidelines](https://github.com/multica-ai/andrej-karpathy-skills) and [humanizer](https://github.com/blader/humanizer). Installed in `.agents/skills/` via the [Skills CLI](https://github.com/vercel-labs/skills), linked into `.claude/skills/` |
39
40
  | **Codebase graph** | [Graft](https://www.npmjs.com/package/@nanonets/graft): `graft map` and `graft ask` give agents the relevant code spans before they grep |
40
- | **Test tooling** | Vitest for TypeScript projects, plus Playwright when a web framework is selected |
41
- | **Web extras** | [Impeccable](https://github.com/pbakaus/impeccable) for UI design and [agent-browser](https://github.com/vercel-labs/agent-browser) for visual QA, with its CLI and browser binaries installed so it works out of the box |
42
- | **Scaffolding** | Official Vite and Next.js scaffolders, or a Commander-based TypeScript CLI |
43
- | **Maintenance** | `aginit doctor` checks readiness; `aginit update` refreshes skills and the graph |
41
+ | **Design** | [Impeccable](https://github.com/pbakaus/impeccable) on web and mobile (`/impeccable init`, `audit`, `polish`). It needs no Node, so it works in Flutter, Swift and Kotlin repos |
42
+ | **UI verification** | [agent-browser](https://github.com/vercel-labs/agent-browser) for web, [agent-device](https://github.com/callstack/agent-device) for iOS Simulator and Android Emulator. Optional: [Chrome DevTools MCP](https://github.com/ChromeDevTools/chrome-devtools-mcp), [BrowserSkill](https://github.com/Tencent/BrowserSkill) |
43
+ | **Testing** | Vitest (+ Playwright with a web framework) for Node projects, the host runner (`flutter test`, `cargo test`, ...) otherwise, and optionally [e2e](https://github.com/tester-army/e2e), natural-language E2E tests with a zero-cost replay cache |
44
+ | **Add-ons** | [context-mode](https://github.com/mksglu/context-mode) keeps huge logs out of the context window; [Worktrunk](https://github.com/max-sixty/worktrunk) gives parallel agents their own worktrees |
45
+ | **Maintenance** | `aginit list`, `add` and `remove` change capabilities in place; `doctor` checks every active one; `update` refreshes skills and the graph |
46
+
47
+ Non-JS projects stay non-JS: aginit never adds a root `package.json` to a Flutter, Swift,
48
+ Kotlin, Rust, Go or Python repo. e2e gets its own workspace in `.agents/e2e/`.
44
49
 
45
50
  ## Quick start
46
51
 
@@ -65,20 +70,59 @@ npm install -g @nanonets/graft
65
70
  ## Commands
66
71
 
67
72
  ```
68
- aginit new [name] Create a new project
69
- aginit init Add or update agent setup in the current directory
70
- aginit doctor Check Node.js, package manager, Git, Graft, Codex, Skills CLI, agent-browser, Claude Code wiring and config
71
- aginit update Update installed skills and rebuild the Graft index
73
+ aginit [options] Set up or update the current directory (same as aginit init)
74
+ aginit new [name] Create a new project
75
+ aginit init Add or update agent setup in the current directory
76
+ aginit list Show the capability registry and what this project enables
77
+ aginit add <id|owner/repo> Enable capabilities (installs skills, refreshes AGENTS.md and docs)
78
+ aginit remove <id> Disable capabilities and remove their skills
79
+ aginit doctor Check the environment and every active capability
80
+ aginit update Update installed skills and rebuild the Graft index
72
81
  ```
73
82
 
74
- Useful flags: `--preset web|cli|generic`, `--framework none|vite|next|existing`,
75
- `--package-manager pnpm|npm|yarn|bun`, `--dry-run`, `--no-skills`, `--no-graft`, `--no-git`.
83
+ Bare `aginit` opens the wizard in a terminal and prints help elsewhere. The wizard detects your stack,
84
+ then offers platform, methodology, design, testing, UI driver and optional add-on choices with a setup summary.
85
+ Initializing an existing directory preserves its stack; Node-only tools are hidden for other stacks. Pass any option, or
86
+ `--yes`, to initialize without prompts.
87
+
88
+ Setup flags: `--preset web|cli|generic`, `--framework none|vite|next|existing`,
89
+ `--package-manager pnpm|npm|yarn|bun`, `--dry-run`, `--yes`, `--no-skills`, `--no-graft`, `--no-git`.
90
+
91
+ Capability flags (the platform is detected; flags override it):
92
+
93
+ | Flag | Values |
94
+ | --- | --- |
95
+ | `--platform` | `auto`, `web`, `mobile-native`, `mobile-rn`, `backend`, `cli` |
96
+ | `--methodology` | `pocock` (default), `superpowers`, `minimal` |
97
+ | `--design` | `impeccable` (default for UI platforms), `none` |
98
+ | `--testing` | `e2e`, `playwright`, `vitest`, `native` |
99
+ | `--ui-driver` | `auto`, `agent-browser`, `agent-device`, `chrome-devtools-mcp`, `browserskill`, `none` |
100
+ | `--addons` | `context-mode`, `worktrunk`, `chrome-devtools-mcp`, `browserskill` (comma-separated) |
101
+ | `--add-skill` | any `owner/repo` skill repository (repeatable) |
102
+ | `--without` | any capability id, e.g. `graft` or `humanizer` (repeatable) |
103
+
104
+ ### Examples
76
105
 
77
106
  ```bash
78
- aginit new my-app --preset web --framework vite
79
- aginit new my-app --preset web --framework next --package-manager npm
80
- aginit new my-cli --preset cli
81
- aginit init --preset generic --dry-run
107
+ # Web: Vite app with agent-browser, Impeccable and e2e tests
108
+ aginit new my-app --preset web --framework vite --testing e2e
109
+
110
+ # Flutter / Swift / Kotlin: run inside the existing app. Detected as mobile-native, it gets
111
+ # agent-device and Impeccable, and e2e is isolated in .agents/e2e/ (no root package.json)
112
+ cd my_flutter_app && aginit --testing e2e
113
+ cd .agents/e2e && npm install # then: npx e2e run against a booted simulator
114
+
115
+ # React Native / Expo: detected as mobile-rn (agent-device, the project's own test script)
116
+ cd my-expo-app && aginit --yes
117
+
118
+ # CLI or library without UI tooling, Superpowers instead of Pocock skills
119
+ aginit init --platform cli --design none --methodology superpowers
120
+
121
+ # Change an existing project
122
+ aginit add context-mode worktrunk
123
+ aginit add superpowers # swaps out the current methodology
124
+ aginit remove impeccable
125
+ aginit list
82
126
  ```
83
127
 
84
128
  ## Presets
@@ -92,9 +136,40 @@ aginit init --preset generic --dry-run
92
136
  The web preset's `--framework none` (default) creates a TypeScript baseline without a bundler
93
137
  or browser tests. `existing` keeps the framework you already have.
94
138
 
95
- Your choices (preset, framework, package manager, agents, skill sources) are saved in
96
- `aginit.config.json`, so the next run starts from them. The package manager is also passed
97
- to framework scaffolders.
139
+ Your choices (preset, framework, package manager, platform, stack, capabilities, skill
140
+ sources) are saved in `aginit.config.json`, and a plain rerun applies them as written. The
141
+ package manager is also passed to framework scaffolders. On a non-Node stack the preset is
142
+ `generic`, which writes no Node files.
143
+
144
+ ## Extending the registry
145
+
146
+ Every tool aginit knows is one entry in [`src/registry/catalog.ts`](src/registry/catalog.ts).
147
+ `init`, `list`, `add`, `remove`, `doctor`, the AGENTS.md routing table and the `docs/agents/`
148
+ pages all read from it, so a new skill takes one entry and no other code:
149
+
150
+ ```ts
151
+ {
152
+ id: 'my-skill', name: 'My skill', description: 'What it does',
153
+ category: 'discipline', author: 'Me', repoUrl: 'https://github.com/me/my-skill',
154
+ license: 'MIT', supportedPlatforms: ['all'], requiresNodeInProjectRoot: false,
155
+ install: [{ kind: 'skills-sh', repo: 'me/my-skill', skills: ['my-skill'] }],
156
+ routing: { task: 'When to use it', read: '`my-skill` skill' }
157
+ }
158
+ ```
159
+
160
+ Without a release, add a skill repository to one project with `aginit add owner/repo` (or
161
+ `--add-skill`), or declare it in `aginit.config.json`:
162
+
163
+ ```json
164
+ "customCapabilities": [
165
+ { "id": "acme-review", "repo": "acme/agent-skills", "skills": ["review"],
166
+ "binary": { "bin": "acme", "install": "npm i -g acme-cli" } }
167
+ ],
168
+ "disabledCapabilities": ["humanizer"]
169
+ ```
170
+
171
+ Doctor then checks `.agents/skills/review/SKILL.md` and the `acme` CLI, and
172
+ `docs/agents/workflows.md` lists the skill.
98
173
 
99
174
  ## Existing projects
100
175
 
@@ -102,14 +177,19 @@ to framework scaffolders.
102
177
  dependency versions and test configs, and only adds what's missing. If you already use a
103
178
  different test runner, aginit adds a separate `test:unit` script instead of touching yours.
104
179
 
105
- An existing `AGENTS.md` is preserved; aginit only appends its bootstrap section. Configs from
106
- older versions that used the retired default skill selection are upgraded to the current
107
- set, while a skill list you narrowed by hand stays as written.
180
+ An existing `AGENTS.md` is preserved. aginit adds its managed block between
181
+ `<!-- aginit:start -->` and `<!-- aginit:end -->`, above Graft's block, and refreshes only that
182
+ block afterwards. The `docs/agents/` pages carry a marker line; delete it and aginit leaves
183
+ that page to you. Configs from older versions keep loading unchanged. Their capabilities are
184
+ inferred from `skills.sources` and the `codebase`/`browser` switches until you run
185
+ `aginit add`, `remove` or pass a capability flag.
108
186
 
109
187
  ## Design
110
188
 
111
- - **Orchestrates, doesn't vendor.** Skills, Graft, Vite, Next.js and Playwright come from
112
- their upstream tools. aginit picks good defaults and runs them.
189
+ - **Orchestrates, doesn't vendor.** Skills, Graft, e2e, Vite, Next.js and Playwright come
190
+ from their upstream tools. aginit picks good defaults and runs them. CLIs it does not
191
+ install itself (agent-device, context-mode, `wt`, `bsk`) are checked, and the upstream
192
+ install command is printed.
113
193
  - **Idempotent.** Re-running the same init is safe; explicit options override saved settings.
114
194
  - **Honest dry-run.** `--dry-run` lists every planned operation without writing files or
115
195
  downloading tools. (Files produced by upstream scaffolders are only known after they run.)
@@ -1,28 +1,40 @@
1
1
  # Third-Party Notices & Upstream Capabilities
2
2
 
3
- Aginit is an orchestrator and bootstrapper that configures and integrates independent open-source tools and skills. Aginit does not vendor, fork, claim ownership of, or relicense upstream software.
3
+ Aginit is an orchestrator and bootstrapper that configures and integrates independent open-source tools and skills. Aginit does not vendor, fork, claim ownership of, or relicense upstream software. Each capability is installed from its upstream source (the Skills CLI, npm, or the tool's own installer) when a project enables it.
4
4
 
5
- Each integrated upstream tool is governed by its respective authors and licenses:
5
+ Each integrated upstream tool is governed by its respective authors and licenses. The capability registry (`src/registry/catalog.ts`) records the same author, license and repository for every entry, and the test suite checks that each one is listed here.
6
6
 
7
- - **Graft**
8
- - Project: Codebase understanding & context graph CLI
9
- - Author: NanoNets / Graft contributors
10
- - Repository: https://github.com/NanoNets/context-graph-engine
7
+ ## Installers
11
8
 
12
9
  - **Skills CLI / skills.sh**
13
10
  - Project: Decentralized agent skill package installer
14
11
  - Author: Vercel Inc. and contributors
15
- - Website: https://skills.sh
12
+ - License: MIT
13
+ - Repository: https://github.com/vercel-labs/skills
14
+
15
+ ## Codebase graph
16
+
17
+ - **Graft** (now part of Trail-Code)
18
+ - Project: Codebase understanding & context graph CLI (`@nanonets/graft`)
19
+ - Author: NanoNets / Trail and Graft contributors
20
+ - License: MIT
21
+ - Repository: https://github.com/trailhq/Trail-Code (formerly NanoNets/context-graph-engine)
22
+
23
+ ## Methodology
16
24
 
17
25
  - **Matt Pocock Skills**
18
- - Project: Workflow skills (`tdd`, `code-review`, `diagnosing-bugs`, `to-spec`, `to-tickets`, `implement-spec`)
26
+ - Project: Workflow skills (`tdd`, `code-review`, `diagnosing-bugs`, `to-spec`, `to-tickets`, `implement-spec`, ...)
19
27
  - Author: Matt Pocock
28
+ - License: MIT
20
29
  - Repository: https://github.com/mattpocock/skills
21
30
 
22
- - **Humanizer**
23
- - Project: Agent skill that removes signs of AI-generated writing from text
24
- - Author: Blake Robbins / Humanizer contributors
25
- - Repository: https://github.com/blader/humanizer
31
+ - **Superpowers**
32
+ - Project: Agentic skills framework and development methodology
33
+ - Author: Jesse Vincent (obra)
34
+ - License: MIT
35
+ - Repository: https://github.com/obra/superpowers
36
+
37
+ ## Discipline
26
38
 
27
39
  - **Ponytail**
28
40
  - Project: Agent skill for the smallest complete change and less over-engineering
@@ -30,18 +42,82 @@ Each integrated upstream tool is governed by its respective authors and licenses
30
42
  - License: MIT
31
43
  - Repository: https://github.com/DietrichGebert/ponytail
32
44
 
45
+ - **Karpathy guidelines**
46
+ - Project: `karpathy-guidelines` skill, derived from Andrej Karpathy's observations on LLM coding pitfalls
47
+ - Author: Jiayuan Zhang (forrestchang)
48
+ - License: MIT, as declared in the skill's frontmatter (the repository has no LICENSE file)
49
+ - Repository: https://github.com/multica-ai/andrej-karpathy-skills (formerly forrestchang/andrej-karpathy-skills)
50
+
51
+ - **Humanizer**
52
+ - Project: Agent skill that removes signs of AI-generated writing from text
53
+ - Author: Siqi Chen (blader)
54
+ - License: MIT
55
+ - Repository: https://github.com/blader/humanizer
56
+
57
+ ## Design
58
+
33
59
  - **Impeccable**
34
- - Project: Frontend craft & design system review skill
35
- - Author: Peter Bak-Hansen
60
+ - Project: Design language, design-system and anti-slop review skill for web and native UI
61
+ - Author: Paul Bakaus
62
+ - License: Apache-2.0
36
63
  - Repository: https://github.com/pbakaus/impeccable
37
64
 
65
+ ## UI drivers
66
+
38
67
  - **agent-browser**
39
- - Project: Fast headless/CDP browser automation CLI for AI agents
68
+ - Project: Browser automation CLI for AI agents
40
69
  - Author: Vercel Labs
70
+ - License: Apache-2.0
41
71
  - Repository: https://github.com/vercel-labs/agent-browser
42
72
 
73
+ - **agent-device**
74
+ - Project: iOS Simulator / Android Emulator automation for AI agents
75
+ - Author: Callstack
76
+ - License: MIT
77
+ - Repository: https://github.com/callstack/agent-device (formerly callstackincubator/agent-device)
78
+
79
+ - **Chrome DevTools MCP**
80
+ - Project: Chrome DevTools for coding agents (network, performance, memory)
81
+ - Author: Google Chrome DevTools team
82
+ - License: Apache-2.0
83
+ - Repository: https://github.com/ChromeDevTools/chrome-devtools-mcp
84
+
85
+ - **BrowserSkill**
86
+ - Project: Lets agents use the user's real, logged-in browser (`bsk`)
87
+ - Author: Tencent
88
+ - License: MIT
89
+ - Repository: https://github.com/Tencent/BrowserSkill
90
+
91
+ ## Testing
92
+
93
+ - **Vitest**
94
+ - Project: Unit test framework
95
+ - Author: Vitest team
96
+ - License: MIT
97
+ - Repository: https://github.com/vitest-dev/vitest
98
+
43
99
  - **Playwright**
44
100
  - Project: End-to-end testing framework
45
101
  - Author: Microsoft Corporation
46
102
  - License: Apache-2.0
47
- - Website: https://playwright.dev
103
+ - Repository: https://github.com/microsoft/playwright
104
+
105
+ - **e2e**
106
+ - Project: AI-assisted end-to-end testing framework for web and mobile apps with a replay cache
107
+ - Author: TesterArmy
108
+ - License: Apache-2.0
109
+ - Repository: https://github.com/tester-army/e2e
110
+
111
+ ## Context guards (opt-in add-ons)
112
+
113
+ - **context-mode**
114
+ - Project: Context window optimization that sandboxes large tool output
115
+ - Author: Mert Köseoğlu (mksglu)
116
+ - License: Elastic License 2.0 (ELv2). This is a source-available license, not an OSI open-source license; review its terms before enabling the add-on.
117
+ - Repository: https://github.com/mksglu/context-mode
118
+
119
+ - **Worktrunk**
120
+ - Project: Git worktree manager for parallel agents (`wt`)
121
+ - Author: Maximilian Roos (max-sixty)
122
+ - License: MIT OR Apache-2.0
123
+ - Repository: https://github.com/max-sixty/worktrunk
@@ -0,0 +1,32 @@
1
+ import { AginitConfig } from '../config/schema.js';
2
+ import { CapabilityDescriptor, GuideContext, MicroDoc, Platform, Stack } from '../registry/index.js';
3
+ export interface ProjectProfile extends GuideContext {
4
+ active: CapabilityDescriptor[];
5
+ }
6
+ /** Platform and stack: saved in v2 configs, detected for older ones. */
7
+ export declare function resolvePlatformStack(config: AginitConfig, targetDir?: string): {
8
+ platform: Platform;
9
+ stack: Stack;
10
+ };
11
+ export declare function projectProfile(config: AginitConfig, options?: {
12
+ targetDir?: string;
13
+ scripts?: Record<string, string>;
14
+ }): ProjectProfile;
15
+ export declare const DOCS_DIR: string;
16
+ export declare const GENERATED_MARKER = "<!-- Generated by aginit from aginit.config.json. Rerun `aginit` to refresh; delete this line to edit by hand. -->";
17
+ /** Markdown for one micro-doc, or null when no active capability contributes to it. */
18
+ export declare function renderMicroDoc(doc: MicroDoc, profile: ProjectProfile): string | null;
19
+ export declare const MICRO_DOCS: MicroDoc[];
20
+ export declare function microDocPath(doc: MicroDoc): string;
21
+ /**
22
+ * Write the docs/agents/ micro-docs for the active capabilities. A doc whose
23
+ * marker line was removed belongs to the user and is never touched; a doc no
24
+ * capability contributes to any more is deleted. Returns the docs that exist.
25
+ */
26
+ export declare function setupMicroDocs(targetDir: string, profile: ProjectProfile, options?: {
27
+ dryRun?: boolean;
28
+ silent?: boolean;
29
+ }): MicroDoc[];
30
+ /** Docs that will exist for a profile (used when rendering AGENTS.md without a target). */
31
+ export declare function plannedMicroDocs(profile: ProjectProfile): MicroDoc[];
32
+ //# sourceMappingURL=agent-docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-docs.d.ts","sourceRoot":"","sources":["../../src/adapters/agent-docs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAEL,oBAAoB,EAGpB,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,KAAK,EACN,MAAM,sBAAsB,CAAC;AAI9B,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD,MAAM,EAAE,oBAAoB,EAAE,CAAC;CAChC;AAED,wEAAwE;AACxE,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,SAAS,CAAC,EAAE,MAAM,GACjB;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAQtC;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAO,GACrE,cAAc,CAehB;AAED,eAAO,MAAM,QAAQ,QAA8B,CAAC;AACpD,eAAO,MAAM,gBAAgB,uHACyF,CAAC;AAsDvH,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,GAAG,IAAI,CAmBpF;AAED,eAAO,MAAM,UAAU,EAAE,QAAQ,EAAgD,CAAC;AAElF,wBAAgB,YAAY,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAElD;AAQD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,cAAc,EACvB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACnD,QAAQ,EAAE,CAuBZ;AAED,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,QAAQ,EAAE,CAEpE"}
@@ -0,0 +1,146 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { presetPlatform } from '../config/defaults.js';
4
+ import { detectProject, projectCommands } from '../detect/index.js';
5
+ import { activeCapabilities, CATALOG, e2eDirFor } from '../registry/index.js';
6
+ import { readTextFile, safeWriteFile } from '../utils/fs.js';
7
+ import { logger } from '../utils/logger.js';
8
+ /** Platform and stack: saved in v2 configs, detected for older ones. */
9
+ export function resolvePlatformStack(config, targetDir) {
10
+ const detected = targetDir && (!config.platform || !config.stack) ? detectProject(targetDir) : null;
11
+ return {
12
+ platform: config.platform ??
13
+ (config.preset !== 'generic' ? presetPlatform(config.preset) : (detected?.platform ?? 'cli')),
14
+ stack: config.stack ?? (detected && detected.stack !== 'unknown' ? detected.stack : 'node')
15
+ };
16
+ }
17
+ export function projectProfile(config, options = {}) {
18
+ const { platform, stack } = resolvePlatformStack(config, options.targetDir);
19
+ const active = activeCapabilities(config);
20
+ const ids = new Set(active.map((c) => c.id));
21
+ return {
22
+ platform,
23
+ stack,
24
+ active,
25
+ has: (id) => ids.has(id),
26
+ commands: projectCommands(options.targetDir ?? '.', stack, {
27
+ packageManager: config.packageManager,
28
+ scripts: options.scripts
29
+ }),
30
+ e2eDir: e2eDirFor(stack)
31
+ };
32
+ }
33
+ export const DOCS_DIR = path.join('docs', 'agents');
34
+ export const GENERATED_MARKER = '<!-- Generated by aginit from aginit.config.json. Rerun `aginit` to refresh; delete this line to edit by hand. -->';
35
+ const DOC_TITLES = {
36
+ testing: 'Testing',
37
+ 'ui-verification': 'Live UI verification',
38
+ workflows: 'Engineering workflows & skills'
39
+ };
40
+ const skillNames = (capability) => capability.install.flatMap((step) => (step.kind === 'skills-sh' ? step.skills : []));
41
+ function testingIntro(profile) {
42
+ const { commands } = profile;
43
+ const rows = [
44
+ ['Build', commands.build],
45
+ ['Typecheck', commands.typecheck],
46
+ ['Lint / analyze', commands.lint],
47
+ ['Test', commands.test],
48
+ ['Unit test', commands.unitTest],
49
+ ['E2E', commands.e2e]
50
+ ];
51
+ const lines = rows.filter(([, cmd]) => cmd).map(([label, cmd]) => `- ${label}: \`${cmd}\``);
52
+ return lines.length
53
+ ? ['Run the full check before calling a change done:', ...lines]
54
+ : ['Record the project build and test commands here once they exist.'];
55
+ }
56
+ function workflowsExtras(profile) {
57
+ // Skill capabilities without their own guide still show up, so new registry
58
+ // entries and custom skill repos are documented without extra code.
59
+ const plain = profile.active.filter((c) => !c.guide && c.install.some((step) => step.kind === 'skills-sh'));
60
+ const bullet = (c) => {
61
+ const skills = skillNames(c);
62
+ const label = skills.length ? skills.map((s) => '`' + s + '`').join(', ') : `\`${c.id}\``;
63
+ return `- ${label}: ${c.description}.`;
64
+ };
65
+ const discipline = plain.filter((c) => c.category === 'discipline');
66
+ const others = plain.filter((c) => c.category !== 'discipline');
67
+ return [
68
+ ...(discipline.length ? ['## Discipline (apply to every change)', ...discipline.map(bullet)] : []),
69
+ ...(others.length ? ['', '## Other skills', ...others.map(bullet)] : [])
70
+ ];
71
+ }
72
+ // Drivers come before the design review that uses them; unit runners before E2E.
73
+ const SECTION_ORDER = ['methodology', 'ui-driver', 'design', 'testing-engine', 'context-guard'];
74
+ const sectionRank = (c) => {
75
+ const category = SECTION_ORDER.indexOf(c.category);
76
+ const index = CATALOG.indexOf(c);
77
+ return (category === -1 ? SECTION_ORDER.length : category) * 1000 + (index === -1 ? 999 : index);
78
+ };
79
+ /** Markdown for one micro-doc, or null when no active capability contributes to it. */
80
+ export function renderMicroDoc(doc, profile) {
81
+ const sections = profile.active
82
+ .filter((c) => c.guide?.doc === doc)
83
+ .sort((a, b) => sectionRank(a) - sectionRank(b))
84
+ .map((c) => c.guide.render(profile));
85
+ const extras = doc === 'workflows' ? workflowsExtras(profile) : [];
86
+ if (sections.length === 0 && extras.length === 0)
87
+ return null;
88
+ const intro = doc === 'testing'
89
+ ? testingIntro(profile)
90
+ : doc === 'workflows'
91
+ ? [
92
+ 'Skills live in `.agents/skills/` (linked into `.claude/skills/` for Claude Code). Invoke one by name',
93
+ '(for example `/tdd`), or let the agent pick it from its description.'
94
+ ]
95
+ : ['Verify UI changes in the running app, not only in tests.'];
96
+ const body = [`# ${DOC_TITLES[doc]}`, '', ...intro, '', ...sections.flatMap((s) => [s, ''])];
97
+ if (extras.length)
98
+ body.push(...extras, '');
99
+ return [GENERATED_MARKER, ...body].join('\n').replace(/\n{3,}/g, '\n\n').trimEnd() + '\n';
100
+ }
101
+ export const MICRO_DOCS = ['testing', 'ui-verification', 'workflows'];
102
+ export function microDocPath(doc) {
103
+ return path.join(DOCS_DIR, `${doc}.md`).split(path.sep).join('/');
104
+ }
105
+ /** Docs aginit owns: files it wrote that still carry the generated marker. */
106
+ function ownedByAginit(file) {
107
+ const text = readTextFile(file);
108
+ return text === null || text.startsWith(GENERATED_MARKER);
109
+ }
110
+ /**
111
+ * Write the docs/agents/ micro-docs for the active capabilities. A doc whose
112
+ * marker line was removed belongs to the user and is never touched; a doc no
113
+ * capability contributes to any more is deleted. Returns the docs that exist.
114
+ */
115
+ export function setupMicroDocs(targetDir, profile, options = {}) {
116
+ const { dryRun = false, silent = false } = options;
117
+ const present = [];
118
+ for (const doc of MICRO_DOCS) {
119
+ const file = path.join(targetDir, DOCS_DIR, `${doc}.md`);
120
+ const content = renderMicroDoc(doc, profile);
121
+ if (!ownedByAginit(file)) {
122
+ if (!silent)
123
+ logger.dim(`${microDocPath(doc)} was edited by hand, preserving it.`);
124
+ present.push(doc);
125
+ continue;
126
+ }
127
+ if (content === null) {
128
+ if (fs.existsSync(file)) {
129
+ if (dryRun)
130
+ logger.dim(`[dry-run] Would remove file: ${file}`);
131
+ else
132
+ fs.rmSync(file);
133
+ }
134
+ continue;
135
+ }
136
+ present.push(doc);
137
+ if (readTextFile(file) !== content)
138
+ safeWriteFile(file, content, { overwrite: true, dryRun, silent });
139
+ }
140
+ return present;
141
+ }
142
+ /** Docs that will exist for a profile (used when rendering AGENTS.md without a target). */
143
+ export function plannedMicroDocs(profile) {
144
+ return MICRO_DOCS.filter((doc) => renderMicroDoc(doc, profile) !== null);
145
+ }
146
+ //# sourceMappingURL=agent-docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-docs.js","sourceRoot":"","sources":["../../src/adapters/agent-docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EACL,kBAAkB,EAElB,OAAO,EACP,SAAS,EAKV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM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AAC;QAClB,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,OAAO;YAChC,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,gBAAgB,CAAC,OAAuB;IACtD,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC;AAC3E,CAAC"}
@@ -1,9 +1,21 @@
1
1
  import { AginitConfig } from '../config/schema.js';
2
- export declare function generateAgentsMarkdown(config: AginitConfig, scripts?: Record<string, string>): string;
2
+ import { MicroDoc } from '../registry/index.js';
3
+ import { ProjectProfile } from './agent-docs.js';
4
+ export declare const AGINIT_BLOCK_START = "<!-- aginit:start -->";
5
+ export declare const AGINIT_BLOCK_END = "<!-- aginit:end -->";
6
+ /**
7
+ * The part of AGENTS.md aginit keeps in sync with the active capabilities:
8
+ * guardrails, the Task Routing table and the Anti-Rationalization table.
9
+ */
10
+ export declare function renderAgentsBlock(config: AginitConfig, profile: ProjectProfile, docs?: MicroDoc[]): string;
11
+ export declare function generateAgentsMarkdown(config: AginitConfig, scripts?: Record<string, string>, targetDir?: string): string;
12
+ /** Insert or refresh the aginit block in an existing AGENTS.md, leaving everything else as written. */
13
+ export declare function mergeAgentsBlock(existing: string, block: string): string;
3
14
  export declare function setupAgentsMarkdown(targetDir: string, config: AginitConfig, options?: {
4
15
  overwrite?: boolean;
5
16
  dryRun?: boolean;
6
17
  silent?: boolean;
18
+ docs?: MicroDoc[];
7
19
  }): boolean;
8
20
  export declare const CLAUDE_AGENTS_IMPORT = "@AGENTS.md";
9
21
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"agents-md.d.ts","sourceRoot":"","sources":["../../src/adapters/agents-md.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