id3-cli 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja-JP.md +769 -0
- package/README.ko-KR.md +769 -0
- package/README.md +769 -0
- package/README.tr-TR.md +769 -0
- package/README.zh-CN.md +769 -0
- package/dist/bin/cli.d.ts +2 -0
- package/dist/bin/cli.js +40 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/scripts/build-hooks.d.ts +1 -0
- package/dist/scripts/build-hooks.js +58 -0
- package/dist/scripts/build-hooks.js.map +1 -0
- package/dist/src/hooks/auto-audit.d.ts +4 -0
- package/dist/src/hooks/auto-audit.js +47 -0
- package/dist/src/hooks/auto-audit.js.map +1 -0
- package/dist/src/hooks/claude-pretool-entry.d.ts +1 -0
- package/dist/src/hooks/claude-pretool-entry.js +36 -0
- package/dist/src/hooks/claude-pretool-entry.js.map +1 -0
- package/dist/src/hooks/claude-stop-entry.d.ts +1 -0
- package/dist/src/hooks/claude-stop-entry.js +7 -0
- package/dist/src/hooks/claude-stop-entry.js.map +1 -0
- package/dist/src/hooks/post-commit-entry.d.ts +1 -0
- package/dist/src/hooks/post-commit-entry.js +7 -0
- package/dist/src/hooks/post-commit-entry.js.map +1 -0
- package/dist/src/hooks/pre-commit-entry.d.ts +1 -0
- package/dist/src/hooks/pre-commit-entry.js +16 -0
- package/dist/src/hooks/pre-commit-entry.js.map +1 -0
- package/dist/src/hooks/rule-check.d.ts +8 -0
- package/dist/src/hooks/rule-check.js +101 -0
- package/dist/src/hooks/rule-check.js.map +1 -0
- package/dist/src/hooks/schema-drift.d.ts +17 -0
- package/dist/src/hooks/schema-drift.js +151 -0
- package/dist/src/hooks/schema-drift.js.map +1 -0
- package/dist/src/hooks/shared.d.ts +43 -0
- package/dist/src/hooks/shared.js +98 -0
- package/dist/src/hooks/shared.js.map +1 -0
- package/dist/src/init.d.ts +20 -0
- package/dist/src/init.js +193 -0
- package/dist/src/init.js.map +1 -0
- package/dist/src/preview/mockup-generator.d.ts +56 -0
- package/dist/src/preview/mockup-generator.js +402 -0
- package/dist/src/preview/mockup-generator.js.map +1 -0
- package/dist/src/preview/renderer.d.ts +30 -0
- package/dist/src/preview/renderer.js +145 -0
- package/dist/src/preview/renderer.js.map +1 -0
- package/dist/src/preview/server.d.ts +9 -0
- package/dist/src/preview/server.js +55 -0
- package/dist/src/preview/server.js.map +1 -0
- package/dist/src/preview/ui-auditor.d.ts +27 -0
- package/dist/src/preview/ui-auditor.js +141 -0
- package/dist/src/preview/ui-auditor.js.map +1 -0
- package/dist/src/preview/ui-gate.d.ts +66 -0
- package/dist/src/preview/ui-gate.js +210 -0
- package/dist/src/preview/ui-gate.js.map +1 -0
- package/dist/src/utils/ascii.d.ts +7 -0
- package/dist/src/utils/ascii.js +41 -0
- package/dist/src/utils/ascii.js.map +1 -0
- package/dist/src/utils/fs.d.ts +6 -0
- package/dist/src/utils/fs.js +39 -0
- package/dist/src/utils/fs.js.map +1 -0
- package/dist/templates/hooks/iddd-auto-audit.js +121 -0
- package/dist/templates/hooks/iddd-schema-drift.js +279 -0
- package/dist/templates/hooks/post-commit +121 -0
- package/dist/templates/hooks/pre-commit +348 -0
- package/package.json +37 -0
- package/templates/.agents/skills/.gitkeep +0 -0
- package/templates/.claude/hooks/.gitkeep +0 -0
- package/templates/.claude/hooks/hook-config.json +34 -0
- package/templates/.claude/skills/.gitkeep +0 -0
- package/templates/.codex/.gitkeep +0 -0
- package/templates/.codex/hooks.json +40 -0
- package/templates/.iddd/commit-count +1 -0
- package/templates/.iddd/preview/.gitkeep +0 -0
- package/templates/AGENTS.md +204 -0
- package/templates/CLAUDE.md +215 -0
- package/templates/README.md +476 -0
- package/templates/docs/.gitkeep +0 -0
- package/templates/docs/business-rules.md +14 -0
- package/templates/docs/domain-glossary.md +8 -0
- package/templates/docs/info-debt.md +17 -0
- package/templates/docs/model-changelog.md +12 -0
- package/templates/hooks/.gitkeep +0 -0
- package/templates/hooks/iddd-auto-audit.js +121 -0
- package/templates/hooks/iddd-schema-drift.js +279 -0
- package/templates/hooks/post-commit +121 -0
- package/templates/hooks/pre-commit +348 -0
- package/templates/skills/id3-design-information/SKILL.md +170 -0
- package/templates/skills/id3-design-information/references/phase2-procedure.md +241 -0
- package/templates/skills/id3-design-ui/.gitkeep +0 -0
- package/templates/skills/id3-design-ui/SKILL.md +200 -0
- package/templates/skills/id3-design-ui/references/.gitkeep +0 -0
- package/templates/skills/id3-design-ui/references/step1-structure-derivation.md +177 -0
- package/templates/skills/id3-design-ui/references/step2-visual-contract.md +257 -0
- package/templates/skills/id3-design-ui/references/step3-gate-and-mockup.md +177 -0
- package/templates/skills/id3-design-ui/references/step4-implementation.md +244 -0
- package/templates/skills/id3-identify-entities/SKILL.md +239 -0
- package/templates/skills/id3-identify-entities/references/.gitkeep +0 -0
- package/templates/skills/id3-identify-entities/references/phase0-brownfield.md +377 -0
- package/templates/skills/id3-identify-entities/references/phase1-greenfield.md +319 -0
- package/templates/skills/id3-info-audit/.gitkeep +0 -0
- package/templates/skills/id3-info-audit/SKILL.md +191 -0
- package/templates/skills/id3-preview/.gitkeep +0 -0
- package/templates/skills/id3-preview/SKILL.md +168 -0
- package/templates/skills/id3-spawn-team/.gitkeep +0 -0
- package/templates/skills/id3-spawn-team/SKILL.md +213 -0
- package/templates/specs/.gitkeep +0 -0
- package/templates/specs/data-model.md +26 -0
- package/templates/specs/entity-catalog.md +22 -0
- package/templates/specs/ui-design-contract.md +54 -0
- package/templates/specs/ui-inventory.md +24 -0
- package/templates/specs/ui-structure.md +32 -0
- package/templates/src/.gitkeep +0 -0
- package/templates/steering/.gitkeep +0 -0
- package/templates/steering/data-conventions.md +42 -0
- package/templates/steering/product.md +38 -0
package/README.md
ADDED
|
@@ -0,0 +1,769 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
**English** · [한국어](README.ko-KR.md) · [简体中文](README.zh-CN.md) · [日本語](README.ja-JP.md) · [Türkçe](README.tr-TR.md)
|
|
4
|
+
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
╔════════════════════════════════════════════════════════════════════════════════════════╗
|
|
9
|
+
║ ║
|
|
10
|
+
║ ██╗██████╗ ██████╗ ██████╗ ║
|
|
11
|
+
║ ██║██╔══██╗██╔══██╗██╔══██╗ Information Design-Driven Development ║
|
|
12
|
+
║ ██║██║ ██║██║ ██║██║ ██║ ║
|
|
13
|
+
║ ██║██║ ██║██║ ██║██║ ██║ "What information exists?" ║
|
|
14
|
+
║ ██║██████╔╝██████╔╝██████╔╝ -- always the first question. ║
|
|
15
|
+
║ ╚═╝╚═════╝ ╚═════╝ ╚═════╝ v0.9.1 ║
|
|
16
|
+
║ ║
|
|
17
|
+
║ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ║
|
|
18
|
+
║ ║
|
|
19
|
+
║ ┌─────────────────────────┐ ┌─────────────────────────┐ ║
|
|
20
|
+
║ │ │ │ │ ║
|
|
21
|
+
║ │ INFORMATION │ │ AGENT │ ║
|
|
22
|
+
║ │ MODEL │──────────>│ HARNESS │ ║
|
|
23
|
+
║ │ │ │ │ ║
|
|
24
|
+
║ │ - Entity Catalog │ │ - Hook Enforcement │ ║
|
|
25
|
+
║ │ - Data Model │ │ - Drift Detection │ ║
|
|
26
|
+
║ │ - Business Rules │ │ - Auto Audit │ ║
|
|
27
|
+
║ │ - Domain Glossary │ │ - Version Tracking │ ║
|
|
28
|
+
║ │ │ │ │ ║
|
|
29
|
+
║ └─────────────────────────┘ └────────────┬────────────┘ ║
|
|
30
|
+
║ │ ║
|
|
31
|
+
║ v ║
|
|
32
|
+
║ ┌─────────────────────────┐ ║
|
|
33
|
+
║ │ │ ║
|
|
34
|
+
║ │ AI AGENT │ ║
|
|
35
|
+
║ │ (Constrained) │ ║
|
|
36
|
+
║ │ │ ║
|
|
37
|
+
║ │ Agent = Model │ ║
|
|
38
|
+
║ │ + Harness │ ║
|
|
39
|
+
║ │ │ ║
|
|
40
|
+
║ └─────────────────────────┘ ║
|
|
41
|
+
║ ║
|
|
42
|
+
╚════════════════════════════════════════════════════════════════════════════════════════╝
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Start from "What information exists?" -- not "What features should we build?"**
|
|
46
|
+
|
|
47
|
+
IDDD is a development methodology and AI agent skill package that places the **information model** at the center of all software development. By building a rigorous entity catalog, data model, business rules, and domain glossary *before* any technology choice is made, IDDD ensures that 80% of application behavior is already defined at the logical model stage. The information model then becomes the generative center from which requirements, API contracts, screen designs, and validation rules are systematically derived.
|
|
48
|
+
|
|
49
|
+
This package installs IDDD as a set of AI agent skills, harness hooks, and document templates so that your coding agent enforces information-first discipline throughout the entire development lifecycle.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## What is IDDD?
|
|
54
|
+
|
|
55
|
+
Most software projects begin by asking *"What features should we build?"* and jump straight into implementation. IDDD inverts this. It starts from **"What information exists in this domain?"** and treats the information model not as a section of the spec, but as the **single source of truth** from which every other development artifact is derived.
|
|
56
|
+
|
|
57
|
+
### Core Principles
|
|
58
|
+
|
|
59
|
+
1. **Information model is the generative center.** All code, APIs, UI, and tests are derived from the entity catalog and data model. If code disagrees with the spec, the spec wins.
|
|
60
|
+
2. **Entity-first identification.** Before writing any code, entities must be identified and documented. New features start with "what entities are involved?" not "what endpoints do we need?"
|
|
61
|
+
3. **Data model traceability.** Every column, constraint, and relationship in the codebase must trace back to an entry in the entity catalog. Untracked schema elements are considered drift.
|
|
62
|
+
4. **Output-first design.** Design what users *see* (dashboards, reports, lists) before designing inputs (forms, APIs). The output image drives the information model.
|
|
63
|
+
5. **Business rules are explicit.** Every validation, constraint, and derivation rule is registered with a BR-xxx identifier. Code-only rules are considered debt.
|
|
64
|
+
|
|
65
|
+
### Three-Stage Data Modeling Mapped to Software Development
|
|
66
|
+
|
|
67
|
+
IDDD maps the classic three-stage data modeling process directly to software development phases:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
┌───────────────────────────────────────────┐ ┌───────────────────────────────────────────┐
|
|
71
|
+
│ Conceptual Model │ │ Requirements / Scope Definition │
|
|
72
|
+
│ "What information exists?" │────────>│ Entity identification, user stories │
|
|
73
|
+
└───────────────────────────────────────────┘ └───────────────────────────────────────────┘
|
|
74
|
+
│
|
|
75
|
+
v
|
|
76
|
+
┌───────────────────────────────────────────┐ ┌───────────────────────────────────────────┐
|
|
77
|
+
│ Logical Model │ │ API Contracts / Validation / Biz Logic │
|
|
78
|
+
│ "How is it structured?" │────────>│ 80% of behavior defined here │
|
|
79
|
+
└───────────────────────────────────────────┘ └───────────────────────────────────────────┘
|
|
80
|
+
│
|
|
81
|
+
v
|
|
82
|
+
┌───────────────────────────────────────────┐ ┌───────────────────────────────────────────┐
|
|
83
|
+
│ Physical Model │ │ Implementation Decisions │
|
|
84
|
+
│ "How is it stored/executed?" │────────>│ Technology choices, storage, deployment │
|
|
85
|
+
└───────────────────────────────────────────┘ └───────────────────────────────────────────┘
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Each element of the information model automatically implies development artifacts:
|
|
89
|
+
|
|
90
|
+
| Information Model Element | Derived Artifact |
|
|
91
|
+
|----------------------------|-----------------------------------------------------|
|
|
92
|
+
| Entity identification | Requirements scope, user stories |
|
|
93
|
+
| Relationships & cardinality| API endpoint structure, navigation |
|
|
94
|
+
| Attributes & data types | Form fields, validation rules, DTOs |
|
|
95
|
+
| Constraints | Input validation, type definitions |
|
|
96
|
+
| Derived attributes | Business logic, computation rules |
|
|
97
|
+
| State transitions | Workflows, state management |
|
|
98
|
+
| Aggregation / relation rules| Transaction boundaries, consistency rules |
|
|
99
|
+
|
|
100
|
+
**When the logical model is complete, 80% of application behavior is already defined -- before any technology choice is made.**
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Supported Platforms
|
|
105
|
+
|
|
106
|
+
| Platform | Agent System | Multi-Agent Strategy |
|
|
107
|
+
|--------------|-----------------------|----------------------------------------------|
|
|
108
|
+
| Claude Code | Claude Agent Teams | Peer messaging, independent worktrees |
|
|
109
|
+
| OpenAI Codex | Codex Agents SDK | Handoff pattern via MCP Server |
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Prerequisites
|
|
114
|
+
|
|
115
|
+
| Requirement | Details |
|
|
116
|
+
|----------------|------------------------------------------------------|
|
|
117
|
+
| Node.js | **18+** (with npm or a compatible package manager) |
|
|
118
|
+
| Claude Code | **Claude Max** membership + Agent Teams enabled |
|
|
119
|
+
| OpenAI Codex | **ChatGPT Plus** or higher (Pro/Business/Enterprise) |
|
|
120
|
+
|
|
121
|
+
You need Node.js for the `npx` installer. The AI platform subscription is required for whichever platform you use.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Installation
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npx id3@latest
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
No sub-command is needed -- `id3` runs the init process directly. It will:
|
|
132
|
+
|
|
133
|
+
1. Copy all IDDD templates (specs, docs, steering, skills, hooks) into your project.
|
|
134
|
+
2. Create platform-specific symlinks (`.claude/skills/` or `.agents/skills/`) pointing to the canonical `skills/` originals.
|
|
135
|
+
3. Register harness hooks in your platform's configuration file.
|
|
136
|
+
4. Initialize the `.iddd/` state directory (commit counter, preview output).
|
|
137
|
+
|
|
138
|
+
### Options
|
|
139
|
+
|
|
140
|
+
| Option | Description |
|
|
141
|
+
|-----------------|----------------------------------------------------------|
|
|
142
|
+
| `[target-dir]` | Target directory (defaults to current directory `.`) |
|
|
143
|
+
| `--no-symlink` | Copy skill files instead of symlinking (useful on Windows) |
|
|
144
|
+
| `--platform` | Force platform: `claude`, `codex`, or `all` |
|
|
145
|
+
|
|
146
|
+
### Overwrite Detection
|
|
147
|
+
|
|
148
|
+
If `CLAUDE.md` already exists in the target directory, `id3` will prompt:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
"IDDD appears to be already installed. Overwrite? (y/N)"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Post-Install Output
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
┌── IDDD installed ─────────────────────────────────────────┐
|
|
158
|
+
│ │
|
|
159
|
+
│ Next steps: │
|
|
160
|
+
│ │
|
|
161
|
+
│ 1. Fill in steering/product.md │
|
|
162
|
+
│ 2. Run /id3-identify-entities to start │
|
|
163
|
+
│ 3. Customize steering/data-conventions.md │
|
|
164
|
+
│ │
|
|
165
|
+
│ Skills: │
|
|
166
|
+
│ ├── id3-identify-entities (Phase 0/1) │
|
|
167
|
+
│ ├── id3-design-information (Phase 2) │
|
|
168
|
+
│ ├── id3-design-ui (Phase 2.5) │
|
|
169
|
+
│ ├── id3-spawn-team (Phase 3-5) │
|
|
170
|
+
│ ├── id3-info-audit (Audit) │
|
|
171
|
+
│ └── id3-preview (Visual Preview) │
|
|
172
|
+
│ │
|
|
173
|
+
└───────────────────────────────────────────────────────────┘
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Directory Structure After Installation
|
|
179
|
+
|
|
180
|
+
After running `npx id3@latest`, your project gains the following structure:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
your-project/
|
|
184
|
+
│
|
|
185
|
+
│ ===== Shared (all platforms) =====
|
|
186
|
+
│
|
|
187
|
+
├── skills/ Skill originals (single source of truth)
|
|
188
|
+
│ ├── id3-identify-entities/ Phase 0/1: Entity identification
|
|
189
|
+
│ │ ├── SKILL.md
|
|
190
|
+
│ │ └── references/
|
|
191
|
+
│ │ ├── phase0-brownfield.md Reverse-extract from existing code
|
|
192
|
+
│ │ └── phase1-greenfield.md Structured interview for new projects
|
|
193
|
+
│ ├── id3-design-information/ Phase 2: Information structuring
|
|
194
|
+
│ │ ├── SKILL.md
|
|
195
|
+
│ │ └── references/
|
|
196
|
+
│ │ └── phase2-procedure.md Refinement procedure
|
|
197
|
+
│ ├── id3-design-ui/ Phase 2.5: UI design & implementation
|
|
198
|
+
│ │ ├── SKILL.md
|
|
199
|
+
│ │ └── references/
|
|
200
|
+
│ │ ├── step1-structure-derivation.md
|
|
201
|
+
│ │ ├── step2-visual-contract.md
|
|
202
|
+
│ │ ├── step3-gate-and-mockup.md
|
|
203
|
+
│ │ └── step4-implementation.md
|
|
204
|
+
│ ├── id3-spawn-team/ Dispatch multi-agent implementation
|
|
205
|
+
│ ├── id3-info-audit/ Entropy audit (drift detection)
|
|
206
|
+
│ └── id3-preview/ Visual preview of information model
|
|
207
|
+
│
|
|
208
|
+
├── specs/ Information model artifacts
|
|
209
|
+
│ ├── entity-catalog.md Entity inventory + summary table
|
|
210
|
+
│ ├── data-model.md Mermaid ERD + design decisions
|
|
211
|
+
│ ├── ui-inventory.md Screen inventory + mapping matrix
|
|
212
|
+
│ ├── ui-structure.md Screen inventory + navigation (Phase 2.5)
|
|
213
|
+
│ └── ui-design-contract.md Design tokens + component mapping (Phase 2.5)
|
|
214
|
+
│
|
|
215
|
+
├── docs/ Supporting documentation
|
|
216
|
+
│ ├── business-rules.md BR-xxx indexed business rules
|
|
217
|
+
│ ├── domain-glossary.md Term / English / definition / notes
|
|
218
|
+
│ ├── info-debt.md Inconsistency tracker
|
|
219
|
+
│ └── model-changelog.md Keep-a-Changelog format
|
|
220
|
+
│
|
|
221
|
+
├── steering/ Project-level conventions
|
|
222
|
+
│ ├── product.md Product vision & scope (user-authored)
|
|
223
|
+
│ └── data-conventions.md PK strategy, naming, timestamps, etc.
|
|
224
|
+
│
|
|
225
|
+
├── hooks/ Harness hook scripts (built JS bundles)
|
|
226
|
+
│ ├── iddd-schema-drift.js Schema drift detection
|
|
227
|
+
│ ├── iddd-rule-check.js Business rule tracking
|
|
228
|
+
│ ├── iddd-auto-audit.js Automatic entropy audit
|
|
229
|
+
│ ├── pre-commit Git hook (schema-drift + rule-check)
|
|
230
|
+
│ └── post-commit Git hook (auto-audit)
|
|
231
|
+
│
|
|
232
|
+
├── .iddd/ IDDD internal state
|
|
233
|
+
│ ├── commit-count Auto-audit interval counter
|
|
234
|
+
│ └── preview/ Generated preview HTML
|
|
235
|
+
│
|
|
236
|
+
│ ===== Platform: Claude Code =====
|
|
237
|
+
│
|
|
238
|
+
├── CLAUDE.md Lead agent context document
|
|
239
|
+
├── .claude/
|
|
240
|
+
│ ├── settings.local.json Hook registration (injected by init)
|
|
241
|
+
│ ├── skills/ -> skills/ Symlinks to skills/ originals
|
|
242
|
+
│ └── hooks/
|
|
243
|
+
│ └── hook-config.json IDDD hook settings
|
|
244
|
+
│
|
|
245
|
+
│ ===== Platform: OpenAI Codex =====
|
|
246
|
+
│
|
|
247
|
+
├── AGENTS.md Cross-platform agent instructions
|
|
248
|
+
├── .agents/
|
|
249
|
+
│ └── skills/ -> skills/ Symlinks to skills/ originals
|
|
250
|
+
└── .codex/
|
|
251
|
+
└── hooks.json Codex hook configuration
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Skill File Sharing Strategy
|
|
255
|
+
|
|
256
|
+
Skill content is maintained in a single canonical location (`skills/`). Platform-specific paths (`.claude/skills/`, `.agents/skills/`) are symlinks created dynamically by the `init` CLI. This ensures a single point of maintenance across all platforms. On Windows, use `--no-symlink` to create copies instead.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Workflow
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
╔══════════════════════════════════════════════════════════════════════════╗
|
|
264
|
+
║ IDDD WORKFLOW OVERVIEW ║
|
|
265
|
+
╚══════════════════════════════════════════════════════════════════════════╝
|
|
266
|
+
|
|
267
|
+
┌──────────────┐ ┌──────────────┐
|
|
268
|
+
│ │<--- dialog ----->│ │
|
|
269
|
+
│ User │ │ Lead Agent │
|
|
270
|
+
│ │ │ │
|
|
271
|
+
└──────────────┘ └──────┬───────┘
|
|
272
|
+
│
|
|
273
|
+
┌──────────────────┴──────────────────┐
|
|
274
|
+
│ │
|
|
275
|
+
v v
|
|
276
|
+
┌────────────────────┐ ┌────────────────────┐
|
|
277
|
+
│ Existing code? │ │ No existing code? │
|
|
278
|
+
└─────────┬──────────┘ └─────────┬──────────┘
|
|
279
|
+
│ │
|
|
280
|
+
v v
|
|
281
|
+
┌──────────────────────────────────┐ ┌──────────────────────────────────┐
|
|
282
|
+
│ Phase 0: Reverse-Extract │ │ Phase 1: Structured Interview │
|
|
283
|
+
│ │ │ │
|
|
284
|
+
│ - Scan ORM / schema files │ │ "What information does │
|
|
285
|
+
│ - Extract entities │ │ your domain manage?" │
|
|
286
|
+
│ - Extract relationships │ │ - Identify core entities │
|
|
287
|
+
│ - Verification Interview │ │ - Discover relationships │
|
|
288
|
+
└────────────────┬─────────────────┘ └────────────────┬─────────────────┘
|
|
289
|
+
│ │
|
|
290
|
+
v v
|
|
291
|
+
┌─────────────────────────────────────────────────────┐
|
|
292
|
+
│ Entity Catalog Produced │
|
|
293
|
+
└─────────────────────────┬───────────────────────────┘
|
|
294
|
+
│
|
|
295
|
+
v
|
|
296
|
+
┌────────────────────────────────────────────────────────────────────┐
|
|
297
|
+
│ Phase 2: Information Design │
|
|
298
|
+
│ │
|
|
299
|
+
│ - Conceptual --> Logical model │
|
|
300
|
+
│ - Derive business rules (BR-xxx) │
|
|
301
|
+
│ - Register hooks + version headers │
|
|
302
|
+
└─────────────────────────────────┬──────────────────────────────────┘
|
|
303
|
+
│
|
|
304
|
+
v
|
|
305
|
+
┌────────────────────────────────────────────────────────────────────┐
|
|
306
|
+
│ Phase 2.5: UI Design (id3-design-ui) │
|
|
307
|
+
│ │
|
|
308
|
+
│ - Entity --> Screen auto-derivation │
|
|
309
|
+
│ - Visual design contract (tokens, components) │
|
|
310
|
+
│ - 7-Pillar gate + 3-level mockup preview │
|
|
311
|
+
│ - Agent Teams implementation + post-audit │
|
|
312
|
+
└─────────────────────────────────┬──────────────────────────────────┘
|
|
313
|
+
│
|
|
314
|
+
v
|
|
315
|
+
┌─────────────────────────────────────────────────────┐
|
|
316
|
+
│ /id3-spawn-team │
|
|
317
|
+
└─────────────────────────┬───────────────────────────┘
|
|
318
|
+
│
|
|
319
|
+
┌──────────────┴──────────────┐
|
|
320
|
+
│ │
|
|
321
|
+
v v
|
|
322
|
+
┌────────────────────────────────┐ ┌────────────────────────────────┐
|
|
323
|
+
│ Claude Code: Agent Teams │ │ Codex: Agents SDK │
|
|
324
|
+
│ │ │ │
|
|
325
|
+
│ ┌────────┐ ┌──────┐ ┌────┐ │ │ ┌──────────────────────────┐ │
|
|
326
|
+
│ │ spec │ │ impl │ │ qa │ │ │ │ Handoff Pattern │ │
|
|
327
|
+
│ └───┬────┘ └──┬───┘ └─┬──┘ │ │ │ via MCP Server │ │
|
|
328
|
+
│ │ │ │ │ │ └──────────────────────────┘ │
|
|
329
|
+
│ └── messaging ────┘ │ │ │
|
|
330
|
+
│ (peer-to-peer) │ │ spec -> impl -> qa │
|
|
331
|
+
│ │ │ (sequential handoff) │
|
|
332
|
+
└────────────────────────────────┘ └────────────────────────────────┘
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Phase Walkthrough
|
|
336
|
+
|
|
337
|
+
**Phase 0/1 -- Entity Identification:**
|
|
338
|
+
Open your AI coding agent and run `/id3-identify-entities`. The agent automatically detects whether you have an existing codebase (brownfield) or are starting fresh (greenfield), then runs the appropriate identification flow.
|
|
339
|
+
|
|
340
|
+
**Phase 2 -- Information Design:**
|
|
341
|
+
Run `/id3-design-information`. The agent refines the conceptual model into a logical model, derives business rules, and sets up version headers and hook configurations.
|
|
342
|
+
|
|
343
|
+
**Phase 2.5 -- UI Design:**
|
|
344
|
+
Run `/id3-design-ui`. The agent derives screen structure from the entity catalog, establishes a visual design contract with design tokens, runs a 7-pillar quality gate with interactive mockup preview, and then spawns Agent Teams for parallel screen implementation with post-audit.
|
|
345
|
+
|
|
346
|
+
**Phase 3-5 -- Implementation via Agent Teams:**
|
|
347
|
+
Run `/id3-spawn-team`. The agent reads the finalized information model and spawns a team of specialized agents (spec-generator, implementer, qa-reviewer) to implement the system in parallel.
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Skills
|
|
352
|
+
|
|
353
|
+
### id3-identify-entities (Phase 0/1)
|
|
354
|
+
|
|
355
|
+
The entry point of the IDDD workflow. This skill **automatically branches** between brownfield and greenfield paths.
|
|
356
|
+
|
|
357
|
+
**Trigger keywords:** `identify entities`, `information analysis`, `domain analysis`, `new project`, `entity identification`
|
|
358
|
+
|
|
359
|
+
**Auto-detection logic:** The skill scans the project root for ORM/schema files (Prisma, Drizzle, Django models, TypeORM entities, SQL migrations, Sequelize configs). If found, it enters Phase 0; otherwise, Phase 1.
|
|
360
|
+
|
|
361
|
+
#### Phase 0: Brownfield -- Reverse-Extract Information Model
|
|
362
|
+
|
|
363
|
+
For existing codebases, the agent systematically extracts the implicit information model from four layers:
|
|
364
|
+
|
|
365
|
+
| Layer | Source | What is examined | Reliability |
|
|
366
|
+
|-------|------------------|--------------------------------------------------------|-------------|
|
|
367
|
+
| L1 | DB Schema | Tables, columns, FK, indexes, constraints | Highest |
|
|
368
|
+
| L2 | ORM / Models | Virtual fields, derived attributes, soft delete, state | High |
|
|
369
|
+
| L3 | API Contracts | Endpoints, DTOs, validation logic | Medium |
|
|
370
|
+
| L4 | Frontend | Routes, components, form fields | Reference |
|
|
371
|
+
|
|
372
|
+
The L4 investigation is thorough: it scans file-based routing (Next.js `app/`, `pages/`), React Router, Vue Router, etc. to build a complete UI inventory (`specs/ui-inventory.md`) with screen-entity mapping matrices.
|
|
373
|
+
|
|
374
|
+
Findings are classified as **match** (consistent across layers), **mismatch** (logged in `docs/info-debt.md`), or **implicit** (hidden in code logic, surfaced as explicit business rules).
|
|
375
|
+
|
|
376
|
+
After extraction, a **verification interview** confirms accuracy with the user.
|
|
377
|
+
|
|
378
|
+
**Artifacts produced:** `specs/entity-catalog.md`, `specs/data-model.md`, `specs/ui-inventory.md`, `docs/business-rules.md`, `docs/info-debt.md`
|
|
379
|
+
|
|
380
|
+
#### Phase 1: Greenfield -- Structured Interview
|
|
381
|
+
|
|
382
|
+
For new projects, the agent conducts a structured interview to discover domain information:
|
|
383
|
+
|
|
384
|
+
1. **Information identification** -- "What core 'things' (nouns) does this system manage?"
|
|
385
|
+
2. **Relationship discovery** -- "How are these things related? One-to-many or many-to-many?"
|
|
386
|
+
3. **Rule discovery** -- "What rules must be enforced? Any state transitions?"
|
|
387
|
+
4. **Silverston universal pattern checklist** -- The agent cross-references discovered entities against proven patterns: Party, Product/Service, Order/Transaction, Classification, Status/Lifecycle, Hierarchy, Contact Mechanism, Document/Content.
|
|
388
|
+
|
|
389
|
+
**Artifacts produced:** `specs/entity-catalog.md`, `specs/data-model.md`, `docs/business-rules.md`
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
### id3-design-information (Phase 2)
|
|
394
|
+
|
|
395
|
+
Refines the conceptual model into a **logical model**. Business rules, validity constraints, and derivation rules are automatically derived from the information model.
|
|
396
|
+
|
|
397
|
+
**Trigger keywords:** `design information`, `refine model`, `logical model`, `schema design`, `information structuring`
|
|
398
|
+
|
|
399
|
+
**Prerequisite:** `specs/entity-catalog.md` must exist with at least 2 identified entities.
|
|
400
|
+
|
|
401
|
+
**Procedure:**
|
|
402
|
+
|
|
403
|
+
1. **Attribute refinement** -- Assign concrete data types (UUID, TEXT, INTEGER, TIMESTAMP, JSONB, etc.), NOT NULL / DEFAULT / UNIQUE constraints, and index requirements.
|
|
404
|
+
2. **Relationship concretization** -- Determine FK placement, delete/update rules (CASCADE, SET NULL, RESTRICT), and identify junction tables for many-to-many relationships.
|
|
405
|
+
3. **Automatic business rule derivation:**
|
|
406
|
+
- NOT NULL constraint --> "This field is required" (BR-xxx)
|
|
407
|
+
- UNIQUE constraint --> "No duplicates allowed" (BR-xxx)
|
|
408
|
+
- FK + CASCADE --> "Deleting parent also deletes children" (BR-xxx)
|
|
409
|
+
- State transitions --> "Allowed transition paths" (BR-xxx)
|
|
410
|
+
- Derived attributes --> "Computation rule" (BR-xxx)
|
|
411
|
+
4. **Design decision questions** -- The agent asks the user about large-data storage strategy, soft delete scope, multi-tenancy, audit trail needs, etc.
|
|
412
|
+
5. **Artifact finalization** -- Update all spec files with version headers and hook configurations.
|
|
413
|
+
|
|
414
|
+
**Artifacts updated:** `specs/entity-catalog.md`, `specs/data-model.md`, `docs/business-rules.md`
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
### id3-design-ui (Phase 2.5)
|
|
419
|
+
|
|
420
|
+
Derives UI structure and visual design from the information model, then implements screens using Agent Teams.
|
|
421
|
+
|
|
422
|
+
**Trigger keywords:** `design ui`, `ui design`, `screen design`, `phase 2.5`, `ui structure`
|
|
423
|
+
|
|
424
|
+
**Prerequisite:** Phase 2 complete (`entity-catalog.md` version >= `"1.0"`).
|
|
425
|
+
|
|
426
|
+
**4-Step Pipeline:**
|
|
427
|
+
|
|
428
|
+
1. **UI Structure Derivation** -- Automatically maps entities to screens using 9 derivation rules (entity -> list/detail/form/dashboard). Maps attributes to widgets using 12 type-based rules. Applies "output first, input second" principle.
|
|
429
|
+
2. **Visual Design Contract** -- Detects existing frontend framework (React, Vue, Svelte, etc.) and UI library. Establishes 5 design token areas: spacing, typography, color, copywriting, component registry.
|
|
430
|
+
3. **Pre-Implementation Gate** -- Runs 7-Pillar verification (structure completeness, spacing, typography, color, copywriting, component registry, traceability). Generates 3-level HTML mockups (wireframe, styled, interactive) with sample data.
|
|
431
|
+
4. **Implementation + Post-Audit** -- Spawns Agent Teams for parallel screen implementation. Post-implementation visual audit scores each pillar 1-4 and derives top 3 fixes.
|
|
432
|
+
|
|
433
|
+
**Artifacts:** `specs/ui-structure.md`, `specs/ui-design-contract.md`, `.iddd/preview/mockup-*.html`, `.iddd/preview/ui-audit.html`
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
### id3-spawn-team (Phase 3-5)
|
|
438
|
+
|
|
439
|
+
Spawns a team of specialized agents to implement the system based on the finalized information model.
|
|
440
|
+
|
|
441
|
+
**Prerequisite:** `specs/entity-catalog.md` and `specs/data-model.md` must exist with Phase 2 complete.
|
|
442
|
+
|
|
443
|
+
#### Claude Code: Agent Teams
|
|
444
|
+
|
|
445
|
+
Three team members are spawned, each with independent context windows and independent Git worktrees:
|
|
446
|
+
|
|
447
|
+
| Team Member | Role |
|
|
448
|
+
|------------------|---------------------------------------------------------------|
|
|
449
|
+
| spec-generator | Transforms the information model into requirements.md and api-contracts.md |
|
|
450
|
+
| implementer | Builds code from specs, one entity per atomic commit |
|
|
451
|
+
| qa-reviewer | Verifies implementation against the information model; sends direct messages to implementer on failure |
|
|
452
|
+
|
|
453
|
+
**Task generation rules:**
|
|
454
|
+
- Entity catalog is read to create one task per entity (model + migration + API + validation + tests).
|
|
455
|
+
- FK dependencies from the data model determine the dependency graph.
|
|
456
|
+
- Independent entities run in parallel; dependent entities wait for their parents.
|
|
457
|
+
|
|
458
|
+
#### OpenAI Codex: Agents SDK + Handoff Pattern
|
|
459
|
+
|
|
460
|
+
On Codex, multi-agent work uses the Agents SDK handoff pattern. Codex is started as an MCP Server (`codex --mcp-server`), and a Project Manager agent reads the entity catalog to distribute tasks across the same three roles (spec-generator, implementer, qa-reviewer) via handoffs.
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
### id3-info-audit
|
|
465
|
+
|
|
466
|
+
Audits the codebase against the information model to detect drift and entropy.
|
|
467
|
+
|
|
468
|
+
**Trigger keywords:** `info audit`, `information audit`, `model audit`, `drift check`
|
|
469
|
+
|
|
470
|
+
**Procedure:**
|
|
471
|
+
|
|
472
|
+
1. Read the entity list from `specs/entity-catalog.md`.
|
|
473
|
+
2. Scan the codebase for:
|
|
474
|
+
- Unimplemented entities / undefined models
|
|
475
|
+
- Business rules in `docs/business-rules.md` not reflected in code
|
|
476
|
+
- Data type / constraint mismatches
|
|
477
|
+
3. Check UI consistency against `specs/ui-structure.md` and `specs/ui-design-contract.md`:
|
|
478
|
+
- Unimplemented screens / undefined screens
|
|
479
|
+
- Form field vs. attribute mapping mismatches
|
|
480
|
+
- Missing navigation paths
|
|
481
|
+
4. Update version headers (`last_verified`, `audit_status`).
|
|
482
|
+
5. Check hook bypass history (`.iddd/skip-history.log`).
|
|
483
|
+
6. Output a per-entity status report with visual indicators.
|
|
484
|
+
|
|
485
|
+
**Visual output:** The audit results are rendered as an interactive HTML dashboard in `.iddd/preview/audit-{date}.html`.
|
|
486
|
+
|
|
487
|
+
---
|
|
488
|
+
|
|
489
|
+
### id3-preview
|
|
490
|
+
|
|
491
|
+
Starts a lightweight local HTTP server to view the information model and audit results in a browser.
|
|
492
|
+
|
|
493
|
+
**Trigger keywords:** `preview`, `show erd`, `show model`, `visual preview`
|
|
494
|
+
|
|
495
|
+
The server uses `listen(0)` (OS-assigned port) and serves:
|
|
496
|
+
- **ERD Preview** -- Interactive Mermaid ERD with entity click-through to catalog details
|
|
497
|
+
- **UI Mockup** -- Wireframe layouts derived from `specs/ui-structure.md` and `specs/ui-design-contract.md`
|
|
498
|
+
- **Audit Dashboard** -- Per-entity status cards with business rule coverage
|
|
499
|
+
|
|
500
|
+
All HTML files persist in `.iddd/preview/` and can be opened directly in a browser even without the server.
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
## Harness Hook System
|
|
505
|
+
|
|
506
|
+
IDDD enforces information-first discipline through automated hooks. The philosophy is not "please follow the process" but **"the commit is blocked if you don't."**
|
|
507
|
+
|
|
508
|
+
### Hook Overview
|
|
509
|
+
|
|
510
|
+
| Hook | Trigger | Action | Severity |
|
|
511
|
+
|----------------|------------------|-----------------------------------------------------|------------|
|
|
512
|
+
| schema-drift | pre-commit | Verifies schema changes match entity-catalog.md | **BLOCK** (commit rejected) |
|
|
513
|
+
| rule-check | pre-commit | Checks new validation logic against business-rules.md | **WARN** (commit allowed, message shown) |
|
|
514
|
+
| auto-audit | post-commit | Runs info-audit every N commits | **INFO** (report generated) |
|
|
515
|
+
|
|
516
|
+
### schema-drift (BLOCK)
|
|
517
|
+
|
|
518
|
+
When you modify schema-related files (Prisma, Drizzle, Django models, TypeORM entities, SQL migrations, etc.), the hook checks whether `specs/entity-catalog.md` has been updated accordingly. If not, the commit is **rejected**. The information model must always be updated *before* the code.
|
|
519
|
+
|
|
520
|
+
**Monitored file patterns** (configurable):
|
|
521
|
+
```
|
|
522
|
+
prisma/schema.prisma, drizzle/**/*.ts, **/migrations/*.sql,
|
|
523
|
+
**/models.py, **/entities/*.ts, **/entities/*.java, schema.sql
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
### rule-check (WARN)
|
|
527
|
+
|
|
528
|
+
When you add or modify validation logic (Zod, Yup, Joi, Pydantic, etc.), the hook checks for a corresponding `BR-xxx` entry in `docs/business-rules.md`. If missing, a warning is emitted. The commit proceeds, but the missing rule is flagged.
|
|
529
|
+
|
|
530
|
+
**Monitored file patterns** (configurable):
|
|
531
|
+
```
|
|
532
|
+
*.schema.ts, *.validator.*, **/validators/**
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
### auto-audit (INFO)
|
|
536
|
+
|
|
537
|
+
After every N commits (default: 10, configurable), the harness automatically runs an info-audit comparing the codebase against the information model. The commit counter is stored in `.iddd/commit-count`. Results are written to `.iddd/preview/audit-{date}.html`.
|
|
538
|
+
|
|
539
|
+
### Hook Configuration
|
|
540
|
+
|
|
541
|
+
All hook settings live in `.claude/hooks/hook-config.json` (Claude Code) or `.codex/hooks.json` (Codex).
|
|
542
|
+
|
|
543
|
+
```json
|
|
544
|
+
{
|
|
545
|
+
"enabled": true,
|
|
546
|
+
"hooks": {
|
|
547
|
+
"pre-commit": {
|
|
548
|
+
"schema-drift": {
|
|
549
|
+
"enabled": true,
|
|
550
|
+
"severity": "block",
|
|
551
|
+
"monitored_patterns": [
|
|
552
|
+
"prisma/schema.prisma",
|
|
553
|
+
"drizzle/**/*.ts",
|
|
554
|
+
"**/migrations/*.sql",
|
|
555
|
+
"**/models.py",
|
|
556
|
+
"**/entities/*.ts",
|
|
557
|
+
"**/entities/*.java"
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
"rule-check": {
|
|
561
|
+
"enabled": true,
|
|
562
|
+
"severity": "warn",
|
|
563
|
+
"validation_patterns": [
|
|
564
|
+
"*.schema.ts",
|
|
565
|
+
"*.validator.*",
|
|
566
|
+
"**/validators/**"
|
|
567
|
+
]
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
"post-commit": {
|
|
571
|
+
"auto-audit": {
|
|
572
|
+
"enabled": true,
|
|
573
|
+
"interval_commits": 10
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
To disable all IDDD hooks, set `"enabled": false` at the top level. To disable a single hook, set its `"enabled"` to `false`. To change the auto-audit frequency, adjust `"interval_commits"`.
|
|
581
|
+
|
|
582
|
+
### Hook Bypass
|
|
583
|
+
|
|
584
|
+
Set `IDDD_SKIP_HOOKS=1` to temporarily skip all hooks. Bypasses are logged to `.iddd/skip-history.log` and reviewed during audits.
|
|
585
|
+
|
|
586
|
+
---
|
|
587
|
+
|
|
588
|
+
## Entropy Management
|
|
589
|
+
|
|
590
|
+
Over time, information models drift from code. IDDD fights entropy through three mechanisms:
|
|
591
|
+
|
|
592
|
+
### Version Headers
|
|
593
|
+
|
|
594
|
+
`specs/entity-catalog.md` and `specs/data-model.md` contain YAML frontmatter that tracks model state:
|
|
595
|
+
|
|
596
|
+
```yaml
|
|
597
|
+
---
|
|
598
|
+
version: "1.0"
|
|
599
|
+
last_verified: "2026-04-05"
|
|
600
|
+
phase: "Phase 2 Complete"
|
|
601
|
+
entity_count: 12
|
|
602
|
+
rule_count: 19
|
|
603
|
+
audit_status: "clean"
|
|
604
|
+
---
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
**Rules:**
|
|
608
|
+
- `version` is incremented on each phase completion (Phase 1: `"0.1"`, Phase 2: `"1.0"`, subsequent: `"1.1"`, `"1.2"`, ...).
|
|
609
|
+
- `last_verified` is updated whenever the model is audited or verified.
|
|
610
|
+
- If `last_verified` is **more than 7 days old**, the agent will prompt you to run `/id3-info-audit` before proceeding with new work. Stale models lead to drift.
|
|
611
|
+
|
|
612
|
+
### Change Log
|
|
613
|
+
|
|
614
|
+
All model changes are recorded in `docs/model-changelog.md` using [Keep a Changelog](https://keepachangelog.com/) format:
|
|
615
|
+
|
|
616
|
+
```markdown
|
|
617
|
+
## [1.0] -- 2026-04-05
|
|
618
|
+
### Phase 2 Complete
|
|
619
|
+
- 12 entities finalized in logical model
|
|
620
|
+
- 19 business rules derived
|
|
621
|
+
- Design decisions: D-01 (S3 separation), D-02 (multi-tenant reservation), D-03 (soft delete scope)
|
|
622
|
+
- UI proposals: 6 screens generated
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
### Automatic Audit
|
|
626
|
+
|
|
627
|
+
The `auto-audit` hook (post-commit) runs a full information audit every N commits, catching drift before it accumulates.
|
|
628
|
+
|
|
629
|
+
---
|
|
630
|
+
|
|
631
|
+
## Customization Guide
|
|
632
|
+
|
|
633
|
+
IDDD is designed to be adapted to your project's conventions. Here is what to customize and where:
|
|
634
|
+
|
|
635
|
+
| What to customize | File to edit |
|
|
636
|
+
|------------------------------------------------|------------------------------------|
|
|
637
|
+
| Product vision & scope | `steering/product.md` |
|
|
638
|
+
| Naming conventions, PK strategy, timestamps, soft-delete policy, ENUM vs reference tables | `steering/data-conventions.md` |
|
|
639
|
+
| Entity definitions | `specs/entity-catalog.md` |
|
|
640
|
+
| Data model (ERD) | `specs/data-model.md` |
|
|
641
|
+
| Business rules | `docs/business-rules.md` |
|
|
642
|
+
| Domain glossary | `docs/domain-glossary.md` |
|
|
643
|
+
| UI screen inventory | `specs/ui-inventory.md` |
|
|
644
|
+
| UI structure (screen derivation) | `specs/ui-structure.md` |
|
|
645
|
+
| UI design contract (tokens, components) | `specs/ui-design-contract.md` |
|
|
646
|
+
| Hook behavior (enable/disable, severity) | `.claude/hooks/hook-config.json` |
|
|
647
|
+
| Monitored file patterns for hooks | `.claude/hooks/hook-config.json` |
|
|
648
|
+
| Auto-audit commit interval | `.claude/hooks/hook-config.json` |
|
|
649
|
+
| Codex hook configuration | `.codex/hooks.json` |
|
|
650
|
+
|
|
651
|
+
**Tip:** All `specs/` and `docs/` files use YAML frontmatter with version headers. The IDDD harness tracks these versions to detect entropy drift. Always update the version header when you modify a spec file.
|
|
652
|
+
|
|
653
|
+
---
|
|
654
|
+
|
|
655
|
+
## Usage Examples
|
|
656
|
+
|
|
657
|
+
### Example 1: Starting a New Project (Greenfield)
|
|
658
|
+
|
|
659
|
+
```
|
|
660
|
+
$ mkdir my-saas && cd my-saas && git init
|
|
661
|
+
$ npx id3@latest
|
|
662
|
+
|
|
663
|
+
IDDD installed. Next: fill in steering/product.md
|
|
664
|
+
|
|
665
|
+
$ claude
|
|
666
|
+
> /id3-identify-entities
|
|
667
|
+
|
|
668
|
+
Agent: "What core 'things' does your system manage?"
|
|
669
|
+
You: "Users, Organizations, Subscriptions, Invoices, and Features."
|
|
670
|
+
Agent: "How are Users related to Organizations?"
|
|
671
|
+
You: "Many-to-many through a Membership entity with a role attribute."
|
|
672
|
+
...
|
|
673
|
+
|
|
674
|
+
Entity catalog produced: specs/entity-catalog.md (5 entities, 7 relationships)
|
|
675
|
+
|
|
676
|
+
> /id3-design-information
|
|
677
|
+
|
|
678
|
+
Agent refines attributes, derives 14 business rules.
|
|
679
|
+
specs/entity-catalog.md updated (version: 1.0)
|
|
680
|
+
docs/business-rules.md updated (BR-001 through BR-014)
|
|
681
|
+
|
|
682
|
+
> /id3-design-ui
|
|
683
|
+
|
|
684
|
+
Step 1: Deriving UI structure from 5 entities... 8 screens mapped
|
|
685
|
+
Step 2: Design contract established (React + Tailwind detected)
|
|
686
|
+
Step 3: 7-Pillar gate passed. Mockup preview: http://localhost:52341
|
|
687
|
+
Step 4: Spawning Agent Teams for screen implementation...
|
|
688
|
+
Post-audit: all 7 pillars scored 3+/4
|
|
689
|
+
|
|
690
|
+
specs/ui-structure.md generated
|
|
691
|
+
specs/ui-design-contract.md generated
|
|
692
|
+
|
|
693
|
+
> /id3-spawn-team
|
|
694
|
+
|
|
695
|
+
Spawning Agent Teams:
|
|
696
|
+
- spec-generator: generating requirements.md, api-contracts.md
|
|
697
|
+
- implementer: building User -> Organization -> Membership -> ...
|
|
698
|
+
- qa-reviewer: verifying against information model
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
### Example 2: Applying to an Existing Project (Brownfield)
|
|
702
|
+
|
|
703
|
+
```
|
|
704
|
+
$ cd existing-django-project
|
|
705
|
+
$ npx id3@latest
|
|
706
|
+
|
|
707
|
+
Detected: Django models (models.py), PostgreSQL migrations
|
|
708
|
+
IDDD installed.
|
|
709
|
+
|
|
710
|
+
$ claude
|
|
711
|
+
> /id3-identify-entities
|
|
712
|
+
|
|
713
|
+
Phase 0 (Brownfield) activated.
|
|
714
|
+
Scanning L1 (DB schema)... 23 tables found
|
|
715
|
+
Scanning L2 (Django models)... 19 models found
|
|
716
|
+
Scanning L3 (API contracts)... DRF serializers analyzed
|
|
717
|
+
Scanning L4 (Frontend)... React routes mapped
|
|
718
|
+
|
|
719
|
+
Discrepancies found:
|
|
720
|
+
- 4 tables have no corresponding Django model (logged in info-debt.md)
|
|
721
|
+
- 3 implicit business rules surfaced from view logic
|
|
722
|
+
|
|
723
|
+
Agent: "Does this information model accurately reflect your codebase?"
|
|
724
|
+
You: "Yes, but the legacy_audit table is deprecated -- remove it."
|
|
725
|
+
|
|
726
|
+
Entity catalog produced: 19 entities, 11 info-debt items
|
|
727
|
+
|
|
728
|
+
> /id3-design-information
|
|
729
|
+
|
|
730
|
+
Refining existing model...
|
|
731
|
+
New business rules derived from Django validators: BR-015 through BR-023
|
|
732
|
+
|
|
733
|
+
> /id3-design-ui
|
|
734
|
+
|
|
735
|
+
Step 1: Deriving UI structure... comparing with existing ui-inventory.md
|
|
736
|
+
Change summary: 2 new screens proposed, 3 existing screens updated
|
|
737
|
+
Step 2-4: Design contract, gate, and implementation...
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
---
|
|
741
|
+
|
|
742
|
+
## Intellectual Lineage
|
|
743
|
+
|
|
744
|
+
IDDD synthesizes ideas from several intellectual traditions:
|
|
745
|
+
|
|
746
|
+
- **Peter Chen's ER Model (1976)** -- "The real world consists of entities and relationships." The foundational insight that information structure precedes application logic.
|
|
747
|
+
- **Len Silverston's Universal Data Models** -- Reusable information patterns (Party, Product, Order, Hierarchy) that serve as a checklist against which discovered entities are validated.
|
|
748
|
+
- **Eric Evans' Domain-Driven Design (2003)** -- Bounded Context, Ubiquitous Language, and Aggregate patterns. IDDD inherits the emphasis on domain language and explicit boundaries.
|
|
749
|
+
- **Sophia Prater's OOUX (Object-Oriented UX)** -- "Design objects before interactions." The ORCA framework (Objects, Relationships, CTAs, Attributes) directly informs IDDD's output-first UI derivation.
|
|
750
|
+
- **Jamie Lord's "Data First, Code Second" (2024)** -- "Fold knowledge into data." Applying the Unix Rule of Representation to modern software development.
|
|
751
|
+
- **Mitchell Hashimoto's Harness Engineering (2026)** -- `Agent = Model + Harness`. The insight that AI agents need architectural constraints, context engineering, and entropy management to remain effective over time. IDDD's hook system, version headers, and auto-audit are direct applications of harness engineering principles.
|
|
752
|
+
|
|
753
|
+
**Core insight:** *When the logical model is complete, 80% of application behavior is already defined -- before any technology choice is made. And that information model itself is the best harness for AI agents.*
|
|
754
|
+
|
|
755
|
+
---
|
|
756
|
+
|
|
757
|
+
## License
|
|
758
|
+
|
|
759
|
+
MIT
|
|
760
|
+
|
|
761
|
+
---
|
|
762
|
+
|
|
763
|
+
```
|
|
764
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
765
|
+
│ │
|
|
766
|
+
│ "What information exists?" -- always the first question. │
|
|
767
|
+
│ │
|
|
768
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
769
|
+
```
|