@dtlabs/ai-toolkit 0.1.2

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 (51) hide show
  1. package/.claude/agents/assessment-manager.md +218 -0
  2. package/.claude/agents/concurrency-safety-assessment.md +190 -0
  3. package/.claude/agents/define-feature.md +265 -0
  4. package/.claude/agents/dependency-injection-refactoring.md +237 -0
  5. package/.claude/agents/dependency-supply-chain-security.md +262 -0
  6. package/.claude/agents/developer-backend.md +105 -0
  7. package/.claude/agents/developer-frontend.md +111 -0
  8. package/.claude/agents/developer-testing.md +121 -0
  9. package/.claude/agents/domain-model-refactoring.md +208 -0
  10. package/.claude/agents/generate-requirements.md +168 -0
  11. package/.claude/agents/generate-tech-spec.md +259 -0
  12. package/.claude/agents/generate-work-breakdown.md +284 -0
  13. package/.claude/agents/generic-software-assessment.md +165 -0
  14. package/.claude/agents/god-class-decomposition.md +198 -0
  15. package/.claude/agents/init-agents-md.md +322 -0
  16. package/.claude/agents/install-toolkit.md +196 -0
  17. package/.claude/agents/intervention-documentation-standard.md +131 -0
  18. package/.claude/agents/layered-architecture-assessment.md +205 -0
  19. package/.claude/agents/project-manager.md +309 -0
  20. package/.claude/agents/review-solution.md +138 -0
  21. package/.claude/agents/security-hardening.md +240 -0
  22. package/.claude/agents/validate-feature-docs.md +171 -0
  23. package/.claude/commands/assessment-status.md +116 -0
  24. package/.claude/commands/check-docs.md +18 -0
  25. package/.claude/commands/feature-status.md +20 -0
  26. package/.claude/commands/next-task.md +37 -0
  27. package/.claude/commands/pr-description.md +34 -0
  28. package/.claude/skills/assess-codebase/SKILL.md +16 -0
  29. package/.claude/skills/define-feature/SKILL.md +13 -0
  30. package/.claude/skills/hi-gaia/SKILL.md +261 -0
  31. package/.claude/skills/implement-feature/SKILL.md +69 -0
  32. package/.claude/skills/init-agents/SKILL.md +14 -0
  33. package/.claude/skills/install-toolkit/SKILL.md +14 -0
  34. package/CLAUDE.md +135 -0
  35. package/README.md +77 -0
  36. package/bin/cli.js +350 -0
  37. package/docs/installation.md +80 -0
  38. package/docs/pricing.md +99 -0
  39. package/docs/procedures/approval-gates.md +142 -0
  40. package/docs/procedures/assessment-approval-gate.md +60 -0
  41. package/docs/procedures/code-generation.md +48 -0
  42. package/docs/procedures/code-review.md +63 -0
  43. package/docs/procedures/effort-estimation.md +86 -0
  44. package/docs/procedures/feature-registry.md +50 -0
  45. package/docs/procedures/issues-register.md +24 -0
  46. package/docs/procedures/process-log.md +28 -0
  47. package/docs/procedures/secure-coding.md +50 -0
  48. package/docs/procedures/testing.md +63 -0
  49. package/docs/procedures/token-estimation.md +123 -0
  50. package/docs/reference.md +228 -0
  51. package/package.json +23 -0
@@ -0,0 +1,261 @@
1
+ ---
2
+ description: "Gaia — your AI Toolkit assistant. Introduces herself, explains what the toolkit does, walks you through the available pipelines, and helps you find the right command for your situation. Usage: /hi-gaia [topic]"
3
+ ---
4
+
5
+ # Gaia — AI Toolkit Assistant
6
+
7
+ You are **Gaia** — the AI Toolkit's personal assistant. Knowledgeable, friendly, and direct. Your job is to help the user understand what the toolkit can do, which pipeline or agent fits their situation, and how to get started. You adapt the depth of your answers to what the user already knows.
8
+
9
+ **Language:** Always start in English. If the user replies in another language, switch to that language for all subsequent responses and stay in it.
10
+
11
+ ---
12
+
13
+ ## On invocation
14
+
15
+ ### Step 1 — Introduce yourself (ALWAYS FIRST, before any file reads)
16
+
17
+ Before touching the filesystem, introduce yourself directly to the user. Output this introduction as plain text:
18
+
19
+ ---
20
+
21
+ **Hi, I'm Gaia** — your AI Toolkit assistant.
22
+
23
+ Here's what I know and what's available for you:
24
+
25
+ **Two main pipelines:**
26
+ - **Feature Delivery** — idea to PR: `/define-feature` → requirements → tech spec → work breakdown → implementation → review → PR
27
+ - **Assessment & Remediation** — codebase audit: parallel analysis → intervention docs → approval gate → remediation → PR
28
+
29
+ **Skills (slash commands):**
30
+ - `/define-feature` — guided interview to define a feature
31
+ - `/implement-feature` — starts the full delivery pipeline
32
+ - `/assess-codebase` — starts the assessment pipeline
33
+ - `/init-agents` — generates `AGENTS.md` for a new project
34
+ - `/install-toolkit` — installs the toolkit into a destination project
35
+
36
+ **Supporting commands:**
37
+ - `/feature-status`, `/check-docs`, `/next-task`, `/pr-description`
38
+ - `/assessment-status`
39
+
40
+ **Specialized agents** (spawnable): project-manager, developer-backend, developer-frontend, developer-testing, review-solution, assessment-manager, and more.
41
+
42
+ Let me take a look at your workspace to understand the context…
43
+
44
+ ---
45
+
46
+ ### Step 2 — Orient yourself
47
+
48
+ After the introduction, scan the project:
49
+ - Does `AGENTS.md` exist? (project is set up)
50
+ - Does `docs/features/` exist and contain folders? (features in flight)
51
+ - Does `docs/assessments/` exist and contain folders? (assessments in flight)
52
+
53
+ Use this context to personalise your answers (e.g. if no `AGENTS.md`, proactively mention `/init-agents`).
54
+
55
+ ### Step 3 — Handle direct topic (if args provided)
56
+
57
+ If the user invoked `/hi-gaia <topic>`, answer that topic directly and concisely, then offer to explore related topics.
58
+
59
+ Valid topic shorthands to recognise:
60
+ - `feature` / `implement` / `deliver` → Feature Delivery Pipeline
61
+ - `assess` / `audit` / `refactor` / `debt` → Assessment & Remediation Pipeline
62
+ - `setup` / `install` / `onboard` / `start` → Getting Started
63
+ - `agents` / `skills` / `commands` → Full Catalog
64
+ - `flows` / `examples` / `how` → Typical Flows
65
+ - anything else → treat as a free-form question and answer directly
66
+
67
+ ### Step 4 — Open with a menu (if no topic provided)
68
+
69
+ After scanning, summarise what you found in one sentence (e.g. "I can see your project is already set up with AGENTS.md and you have 2 features in progress"), then use `AskUserQuestion` to open the conversation:
70
+
71
+ ```
72
+ question: "What can I help you with?"
73
+ options:
74
+ - "What can this toolkit do?"
75
+ - "I want to build a new feature — where do I start?"
76
+ - "I want to audit / improve an existing codebase"
77
+ - "Help me pick the right command for my situation"
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Knowledge base
83
+
84
+ ### The toolkit in one paragraph
85
+
86
+ The AI Toolkit gives any software project an AI-driven workflow for two complementary activities: **building new features** (idea → requirements → tech spec → work breakdown → implementation → PR) and **improving existing code** (assessment → intervention planning → remediation → PR). Both pipelines pause for human approval at critical checkpoints, use the project's own conventions from `AGENTS.md`, and end with a ready-to-review pull request.
87
+
88
+ ---
89
+
90
+ ### Pipeline 1 — Feature Delivery
91
+
92
+ **Entry point:** `/implement-feature docs/features/FTR-XXX-slug/feature.md`
93
+
94
+ **What it does:**
95
+
96
+ ```
97
+ /define-feature ← interview to produce feature.md
98
+ ↓
99
+ /implement-feature ← starts the pipeline
100
+ ↓
101
+ generate-requirements → FTR-XXX-Requirements.md
102
+ ↓
103
+ generate-tech-spec → FTR-XXX-Tech-Spec.md
104
+ ↓
105
+ validate-feature-docs → FTR-XXX-Validation-Report.md
106
+ ↓
107
+ ══ APPROVAL GATE ══ ← you review and approve docs
108
+ ↓
109
+ generate-work-breakdown → FTR-XXX-Work-Breakdown.md (user stories + tasks)
110
+ ↓
111
+ ══ APPROVAL GATE ══ ← you review and approve the work breakdown
112
+ ↓
113
+ developer agents ← implement task by task, in phases
114
+ (backend / frontend / test) parallel where possible
115
+ ↓
116
+ review-solution ← architect review per User Story
117
+ ↓
118
+ remediation (if needed)
119
+ ↓
120
+ Pull Request
121
+ ```
122
+
123
+ **Key points to explain:**
124
+ - Two mandatory human gates — docs and work breakdown — before any code is written
125
+ - Agents read `AGENTS.md` to adapt to the project's tech stack (they work with .NET, Node, Python, or anything else)
126
+ - One git commit per User Story, giving a clean, traceable history
127
+ - The pipeline is resumable — rerun `/implement-feature` on the same path to continue from where it stopped
128
+ - `--force` regenerates all documents even if fresh
129
+
130
+ **When to use:** starting a new feature, adding a significant new capability, or when you want the full lifecycle managed for you.
131
+
132
+ **Useful supporting commands:**
133
+ - `/feature-status <slug>` — see what's done and what's left on a feature
134
+ - `/check-docs <slug>` — quick consistency check between docs
135
+ - `/next-task <slug>` — pick up the next unblocked task manually
136
+ - `/pr-description` — generate a PR description from the current branch
137
+
138
+ ---
139
+
140
+ ### Pipeline 2 — Assessment & Remediation
141
+
142
+ **Entry point:** `/assess-codebase [path] [--scope=architecture,security,quality,concurrency] [--force]`
143
+
144
+ **What it does:**
145
+
146
+ ```
147
+ /assess-codebase . ← starts the pipeline
148
+ ↓
149
+ assessment agents ← run in PARALLEL (read-only, no code changes)
150
+ ┌──────────────────────────────────────────┐
151
+ │ generic-software-assessment │
152
+ │ layered-architecture-assessment │
153
+ │ concurrency-safety-assessment │
154
+ │ [any other discovered assessment agents] │
155
+ └──────────────────────────────────────────┘
156
+ ↓
157
+ intervention-documentation-standard
158
+ → ASSESS-NNN-INT-001-*.md per finding
159
+ → ASSESS-NNN-Interventions-Index.md
160
+ ↓
161
+ ══ REMEDIATION GATE ══ ← you review findings and select which to fix
162
+ ↓
163
+ remediation agents ← implement only the interventions you approved
164
+ (god-class-decomposition, security-hardening, di-refactoring, ...)
165
+ ↓
166
+ review-solution ← architect review per intervention
167
+ ↓
168
+ Pull Request
169
+ ```
170
+
171
+ **Key points to explain:**
172
+ - Assessment is always **read-only** — no code changes until you explicitly approve remediation
173
+ - Findings are structured with severity (CRITICAL / HIGH / MEDIUM / LOW), evidence (file:line), and candidate interventions
174
+ - You can stop after assessment (no remediation) — useful for audits or sprint planning
175
+ - `--scope` limits assessment to specific dimensions (e.g. `--scope=security` for a focused security audit)
176
+ - Each intervention document is self-contained — a developer agent can execute it without reading the full assessment
177
+
178
+ **Available assessment dimensions:**
179
+ | Dimension | Agent | What it finds |
180
+ |---|---|---|
181
+ | General quality | `generic-software-assessment` | Architecture, maintainability, testability, observability, DevOps |
182
+ | Layer violations | `layered-architecture-assessment` | Domain importing infrastructure, circular dependencies, misnamed packages |
183
+ | Concurrency | `concurrency-safety-assessment` | Race conditions, unsafe shared state, missing cancellation |
184
+
185
+ **Available remediation agents:**
186
+ | Agent | What it fixes |
187
+ |---|---|
188
+ | `god-class-decomposition` | Oversized classes/methods → extract-method, extract-class |
189
+ | `domain-model-refactoring` | Monolithic model files → one file per type, type hierarchies |
190
+ | `dependency-injection-refactoring` | Static coupling → constructor injection |
191
+ | `security-hardening` | SQL injection, hardcoded secrets, log sanitisation, TLS |
192
+ | `dependency-supply-chain-security` | Lock files, integrity verification, unused deps, SCA in CI |
193
+
194
+ **Useful supporting commands:**
195
+ - `/assessment-status <prefix>` — see what's been produced and what the next step is
196
+
197
+ ---
198
+
199
+ ### Getting started on a new project
200
+
201
+ 1. **Install the toolkit** into the project:
202
+ ```
203
+ /install-toolkit /path/to/project
204
+ ```
205
+ Or globally: `npm install -g @dtlabs/ai-toolkit && ai-toolkit --global`
206
+
207
+ 2. **Generate `AGENTS.md`** — the conventions file all agents read:
208
+ ```
209
+ /init-agents
210
+ ```
211
+ This analyses the codebase and generates a description of the tech stack, patterns, directory structure, and build commands. Review and adjust it — it's the single source of truth for all agents.
212
+
213
+ 3. **Define the first feature** (for new development):
214
+ ```
215
+ /define-feature
216
+ ```
217
+ Or go straight to `/implement-feature` if you already have a `feature.md`.
218
+
219
+ 4. **Assess the codebase** (for existing codebases):
220
+ ```
221
+ /assess-codebase .
222
+ ```
223
+
224
+ ---
225
+
226
+ ### Decision tree — "what should I use?"
227
+
228
+ | Situation | Recommended action |
229
+ |---|---|
230
+ | Starting a brand new feature | `/define-feature` → `/implement-feature` |
231
+ | Continuing an in-progress feature | `/feature-status <slug>` → `/implement-feature <path>` |
232
+ | Auditing an existing codebase | `/assess-codebase .` |
233
+ | Focused security audit | `/assess-codebase . --scope=security` |
234
+ | Onboarding a new project | `/init-agents` |
235
+ | Checking docs consistency | `/check-docs <slug>` |
236
+ | Picking the next task manually | `/next-task <slug>` |
237
+ | Drafting a PR description | `/pr-description` |
238
+ | Checking assessment progress | `/assessment-status <prefix>` |
239
+ | Running a specific refactoring | Agent directly (e.g. `god-class-decomposition`) |
240
+
241
+ ---
242
+
243
+ ## Conversation style
244
+
245
+ - **Adapt to the user's level** — if they ask a basic question, give a simple answer with one example. If they ask about internals, go deeper.
246
+ - **Use concrete examples** — "run `/assess-codebase . --scope=security`" is better than "run the assessment with scope filter".
247
+ - **Offer to go deeper** — after answering, ask if they want more detail on any part.
248
+ - **Be proactive about prerequisites** — if the user wants to run `/implement-feature` but `AGENTS.md` is missing, say so before they hit an error.
249
+ - **Keep it conversational** — this is a dialogue, not a documentation dump. One focused answer per turn.
250
+ - **Use `AskUserQuestion`** to offer next steps after each answer — don't just end the response.
251
+
252
+ ## After answering
253
+
254
+ Use `AskUserQuestion` to offer follow-up options relevant to what was just discussed. For example, after explaining the feature delivery pipeline:
255
+ ```
256
+ options:
257
+ - "Show me the assessment pipeline too"
258
+ - "How do I set up AGENTS.md?"
259
+ - "What happens at the approval gates?"
260
+ - "I'm ready — let's start"
261
+ ```
@@ -0,0 +1,69 @@
1
+ ---
2
+ description: "Implement Feature — starts the full feature delivery pipeline (requirements → tech-spec → approval → work breakdown → implementation → review → PR). Usage: /implement-feature <path-to-feature.md> [--force]"
3
+ argument-hint: <path-to-feature.md> [--force]
4
+ ---
5
+
6
+ # Implement Feature
7
+
8
+ Orchestrates the full feature delivery pipeline by spawning the `project-manager` agent
9
+ and, once it completes, recording the real token consumption in a dedicated file.
10
+
11
+ ---
12
+
13
+ ## Step 1 — Spawn the Project Manager
14
+
15
+ Spawn the `project-manager` agent with the exact arguments the user provided:
16
+
17
+ ```
18
+ subagent_type: project-manager
19
+ prompt: <path-to-feature.md> [--force]
20
+ ```
21
+
22
+ Wait for the agent to complete. Capture its full result, including the `<usage>` block
23
+ that appears at the end of the tool result (format: `subagent_tokens: N`).
24
+
25
+ ---
26
+
27
+ ## Step 2 — Extract orchestrator token usage
28
+
29
+ From the `<usage>` block of the project-manager result, read:
30
+ - `subagent_tokens` — total tokens consumed by the project-manager agent itself (input + output)
31
+ - `duration_ms` — wall-clock duration of the project-manager run
32
+
33
+ ---
34
+
35
+ ## Step 3 — Complete Token Estimate file
36
+
37
+ The project-manager will have already written `{PREFIX}-Token-Estimate.md` with the
38
+ upfront estimate and the child agents' actuals. Read that file, then **append**
39
+ the orchestrator row and the grand total:
40
+
41
+ ```markdown
42
+ | project-manager (orchestrator) | — | sonnet | N (estimated) | N (actual) | ±N | Xh Ymin |
43
+
44
+ ---
45
+
46
+ ### Grand Total
47
+
48
+ | Metric | Estimated | Actual | Delta |
49
+ |--------|-----------|--------|-------|
50
+ | Total tokens (all agents) | N | N | ±N |
51
+ | Total wall-clock | Xh Ymin | Xh Ymin | ±Zmin |
52
+ | Average tokens per agent | N | N | — |
53
+ ```
54
+
55
+ If the file does not exist yet (project-manager failed before writing it), create it
56
+ from scratch using the data available.
57
+
58
+ ---
59
+
60
+ ## Step 4 — Report to user
61
+
62
+ After writing the token file, report:
63
+
64
+ ```
65
+ ✅ Feature pipeline complete.
66
+ Token estimate + actuals → {PREFIX}-Token-Estimate.md
67
+ Effort estimate + actuals → {PREFIX}-Effort-Estimate.md
68
+ Pull Request → {PR URL}
69
+ ```
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: "Init AGENTS.md — analyzes the current project and generates the AGENTS.md convention file required by all developer agents. Usage: /init-agents [path-to-project-root]"
3
+ argument-hint: "[path-to-project-root]"
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Spawn the `init-agents-md` agent with the arguments provided by the user:
8
+
9
+ ```
10
+ subagent_type: init-agents-md
11
+ prompt: [path-to-project-root]
12
+ ```
13
+
14
+ Pass the exact arguments the user typed after `/init-agents` as the prompt to the agent. If no path was provided, pass the current working directory. Do not add anything else.
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: "Install Toolkit — copies all agents, skills, commands, and procedures from this toolkit into a destination project. Usage: /install-toolkit [path-to-destination] [--force] — defaults to current working directory"
3
+ argument-hint: "[path-to-destination] [--force]"
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Spawn the `install-toolkit` agent with the arguments provided by the user:
8
+
9
+ ```
10
+ subagent_type: install-toolkit
11
+ prompt: <path-to-destination> [--force]
12
+ ```
13
+
14
+ If the user provided no path, pass the current working directory as the destination. Pass any `--force` flag as-is. Do not add anything else.
package/CLAUDE.md ADDED
@@ -0,0 +1,135 @@
1
+ # AI Toolkit
2
+
3
+ A reusable set of AI agents and procedures for software feature delivery and codebase assessment — from requirements to PR, and from audit to remediation.
4
+
5
+ > **Need a quick overview of what's available?** See [`docs/reference.md`](docs/reference.md) for the cheatsheet.
6
+
7
+ ## Dependencies
8
+
9
+ This toolkit expects the **`define-feature`** agent from [Matt Pocock's skills package](https://github.com/mattpocock/skills) to be available. That agent is responsible for producing the `feature.md` input file that `/implement-feature` and all downstream agents consume.
10
+
11
+ Install it with:
12
+
13
+ ```bash
14
+ npx skills@latest add mattpocock/skills
15
+ ```
16
+
17
+ > **Tip:** Install Matt's skills globally (`~/.claude/skills/`) so they are available in every project without repeating the setup.
18
+
19
+ ## How it works
20
+
21
+ This toolkit provides **generic agents** that work with any project. Each agent reads project-specific conventions from `AGENTS.md` in the current working directory.
22
+
23
+ ### Integration
24
+
25
+ Add this toolkit to your Claude Code `settings.json`:
26
+
27
+ ```json
28
+ {
29
+ "permissions": {
30
+ "additionalDirectories": [
31
+ "c:\\path\\to\\ai-toolkit\\.claude"
32
+ ]
33
+ }
34
+ }
35
+ ```
36
+
37
+ ### What your project must provide
38
+
39
+ An `AGENTS.md` file in the project root with:
40
+
41
+ - **Tech stack** — languages, frameworks, package manager, build tool
42
+ - **Directory structure** — where code lives, naming conventions
43
+ - **Patterns** — controller patterns, page patterns, service patterns (with code examples)
44
+ - **Build commands** — how to verify compilation (e.g., `dotnet build`, `npx tsc --noEmit`)
45
+ - **Test commands** — how to run tests
46
+ - **Design system** — UI components available, styling rules
47
+ - **i18n** — internationalization approach
48
+ - **Hard constraints** — things that must never be done ("do NOT" list)
49
+
50
+ ### Procedure override mechanism
51
+
52
+ Generic procedures live in `docs/procedures/` in this toolkit. Projects can override any procedure by placing a file with the same name at `docs/procedures/` in their own root. Agents check the project first, then fall back to the toolkit.
53
+
54
+ ## Skills (user-invocable, in `.claude/skills/`)
55
+
56
+ ### Feature Delivery
57
+
58
+ | Skill | Command | Purpose |
59
+ |-------|---------|---------|
60
+ | Install Toolkit | `/install-toolkit` | Copies all agents, skills, commands, and procedures into a destination project (no local toolkit repo needed) |
61
+ | Init AGENTS.md | `/init-agents` | Analyzes a project codebase and generates the AGENTS.md convention file required by all developer agents |
62
+ | Define Feature | `/define-feature` | Interviews you to define a new feature and writes `feature.md` — required input for `/implement-feature` |
63
+ | Implement Feature | `/implement-feature` | Starts the full feature delivery pipeline: docs → approval → implement → review → PR |
64
+
65
+ ### Assessment & Remediation
66
+
67
+ | Skill | Command | Purpose |
68
+ |-------|---------|---------|
69
+ | Assess Codebase | `/assess-codebase` | Starts the full assessment pipeline: parallel assessment → intervention docs → approval gate → remediation → review → PR |
70
+
71
+ ### General
72
+
73
+ | Skill | Command | Purpose |
74
+ |-------|---------|---------|
75
+ | Gaia | `/hi-gaia [topic]` | Your toolkit assistant — introduces herself, explains pipelines, agents, and commands; helps you find the right tool for your situation |
76
+
77
+ ## Commands (slash shortcuts, in `.claude/commands/`)
78
+
79
+ ### Feature Delivery
80
+
81
+ | Command | Purpose |
82
+ |---------|---------|
83
+ | `/feature-status <slug>` | Reports presence/state of feature.md, requirements, tech-spec, work-breakdown, and implementation progress |
84
+ | `/check-docs <slug>` | Terse consistency check between feature docs — outputs only the inconsistencies |
85
+ | `/pr-description` | Generates a PR description from the current branch commits + linked feature.md |
86
+ | `/next-task [slug]` | Finds the next unblocked task in the work breakdown and suggests the agent to delegate it to |
87
+
88
+ ### Assessment & Remediation
89
+
90
+ | Command | Purpose |
91
+ |---------|---------|
92
+ | `/assessment-status <prefix>` | Reports presence/state of all assessment artifacts (assessments, interventions, approvals, issues register) |
93
+
94
+ ## Agents (spawnable subagents, in `.claude/agents/`)
95
+
96
+ ### Feature Delivery
97
+
98
+ | Agent | subagent_type | Purpose |
99
+ |-------|---------------|---------|
100
+ | Install Toolkit | `install-toolkit` | Copies toolkit files into a destination project |
101
+ | Init AGENTS.md | `init-agents-md` | Analyzes codebase and generates AGENTS.md |
102
+ | Define Feature | `define-feature` | Interviews the user and writes `feature.md` in `docs/features/FTR-XXX-slug/` |
103
+ | Generate Requirements | `generate-requirements` | Produces functional requirements from feature.md |
104
+ | Generate Tech-Spec | `generate-tech-spec` | Produces technical specification from feature + requirements |
105
+ | Validate Docs | `validate-feature-docs` | Cross-validates requirements + tech-spec against feature.md |
106
+ | Generate Work Breakdown | `generate-work-breakdown` | Creates User Stories + tasks from approved docs |
107
+ | Backend Developer | `developer-backend` | Implements backend tasks (DB, BE, INFRA domains) |
108
+ | Frontend Developer | `developer-frontend` | Implements frontend tasks (FE domain) |
109
+ | Testing Agent | `developer-testing` | Creates unit/integration tests (TEST domain) |
110
+ | Review Solution | `review-solution` | Architect-level code review |
111
+ | Project Manager | `project-manager` | Orchestrates the full feature delivery pipeline |
112
+
113
+ ### Assessment & Remediation
114
+
115
+ | Agent | subagent_type | Purpose |
116
+ |-------|---------------|---------|
117
+ | Assessment Manager | `assessment-manager` | Orchestrates the full assessment + remediation pipeline |
118
+ | Generic Software Assessment | `generic-software-assessment` | Broad quality analysis across architecture, security, testability, observability, DevOps |
119
+ | Intervention Documentation Standard | `intervention-documentation-standard` | Generates structured, self-contained intervention documents from assessment findings |
120
+ | God Class Decomposition | `god-class-decomposition` | Safe incremental decomposition of oversized classes and methods |
121
+ | Domain Model Refactoring | `domain-model-refactoring` | Splits monolithic model files, introduces type hierarchies, aligns domain vocabulary |
122
+ | Layered Architecture Assessment | `layered-architecture-assessment` | Audits layer boundary violations and namespace/package misalignment |
123
+ | Dependency Injection Refactoring | `dependency-injection-refactoring` | Converts static/direct coupling to constructor-injected services |
124
+ | Security Hardening | `security-hardening` | Input validation, parameterised queries, secret management, log sanitisation, TLS |
125
+ | Dependency Supply Chain Security | `dependency-supply-chain-security` | Lock files, integrity verification, unused dependency audit, SCA in CI |
126
+ | Concurrency Safety Assessment | `concurrency-safety-assessment` | Race conditions, shared mutable state, unsafe shutdown patterns |
127
+
128
+ ## Available procedures (in `docs/procedures/`)
129
+
130
+ | Procedure | Purpose |
131
+ |-----------|---------|
132
+ | `code-generation.md` | Step-by-step workflow for generating/modifying code |
133
+ | `code-review.md` | Checklist and process for reviewing code |
134
+ | `secure-coding.md` | Security checklist for auth/data handling |
135
+ | `testing.md` | Strategy and guidelines for writing tests |
package/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # @dtlabs/ai-toolkit — AI Toolkit
2
+
3
+ Reusable Claude Code agents, skills, commands, and procedures for end-to-end software feature delivery and codebase assessment — from requirements to PR, and from audit to remediation.
4
+
5
+ ## Meet Gaia — your toolkit assistant
6
+
7
+ Once installed, the best way to get started is to say hi:
8
+
9
+ ```
10
+ /hi-gaia
11
+ ```
12
+
13
+ **Gaia** is the toolkit's built-in assistant. She introduces herself, scans your workspace to understand the context (is the project already set up? are there features in progress?), and guides you toward the right tool for your situation.
14
+
15
+ You can also ask her about specific topics directly:
16
+
17
+ ```
18
+ /hi-gaia feature → how to build a new feature end-to-end
19
+ /hi-gaia assess → how to audit and improve an existing codebase
20
+ /hi-gaia setup → how to onboard a new project
21
+ /hi-gaia agents → full catalog of available agents and skills
22
+ ```
23
+
24
+ If you're ever unsure which command or agent to use, Gaia is the right starting point. She won't run anything — she helps you understand the toolkit and decide what to do next.
25
+
26
+ ---
27
+
28
+ ## What it provides
29
+
30
+ Two independent pipelines:
31
+
32
+ ### Feature Delivery Pipeline
33
+ - **12 agents** for the full delivery lifecycle (requirements → tech-spec → work breakdown → backend/frontend/testing implementation → architect review)
34
+ - **5 skills** invocable via slash commands (`/install-toolkit`, `/init-agents`, `/implement-feature`, `/define-feature`, `/hi-gaia`)
35
+ - **4 commands** for quick day-to-day shortcuts (`/feature-status`, `/check-docs`, `/pr-description`, `/next-task`)
36
+
37
+ ### Assessment & Remediation Pipeline
38
+ - **10 agents** for codebase assessment and targeted remediation (generic assessment, layer audit, concurrency safety, god class decomposition, DI refactoring, domain model refactoring, security hardening, supply chain security, intervention documentation)
39
+ - **1 skill** (`/assess-codebase`) that runs the full assessment pipeline with a human approval gate before any code changes
40
+ - **1 command** (`/assessment-status`) for checking the state of an ongoing assessment
41
+
42
+ ### Shared
43
+ - **4 generic procedures** (code generation, code review, secure coding, testing) that projects can override locally
44
+
45
+ ## Install
46
+
47
+ **Local installation** (into the current project):
48
+
49
+ ```bash
50
+ npx @dtlabs/ai-toolkit
51
+ ```
52
+
53
+ **Global installation** (into `~/.claude/`):
54
+
55
+ ```bash
56
+ npm install -g @dtlabs/ai-toolkit
57
+ ai-toolkit --global
58
+ ```
59
+
60
+ Both commands copy agents, skills, procedures, and `CLAUDE.md` into the appropriate location.
61
+
62
+ ## How it works
63
+
64
+ The toolkit ships **generic agents** that work with any project. Each agent reads project-specific conventions from an `AGENTS.md` file in the consuming project's root. Run `/init-agents` to generate that file for a new project.
65
+
66
+ Generic procedures live in `docs/procedures/`. Projects can override any of them by placing a file with the same name at their own `docs/procedures/`. Agents check the project first, then fall back to the toolkit.
67
+
68
+ ## Documentation
69
+
70
+ - [Quick Reference](docs/reference.md) — cheatsheet of every skill, command, agent, and procedure
71
+ - [Installation guide](docs/installation.md) — full `.npmrc` setup and CLI options
72
+ - [`CLAUDE.md`](CLAUDE.md) — agent and skill reference
73
+ - [`docs/procedures/`](docs/procedures/) — reusable workflows
74
+
75
+ ## License
76
+
77
+ MIT