declare-cc 1.0.7 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +153 -187
- package/dist/client/assets/index-BVuhr02G.css +1 -0
- package/dist/client/assets/index-DujGXAYw.js +9 -0
- package/dist/client/index.html +23 -0
- package/dist/index.js +17459 -0
- package/package.json +38 -45
- package/src/agents/prompts/00-research.md +90 -0
- package/src/agents/prompts/01-vision.md +38 -0
- package/src/agents/prompts/02-declarations.md +47 -0
- package/src/agents/prompts/03-milestones.md +43 -0
- package/src/agents/prompts/04-actions.md +90 -0
- package/src/agents/prompts/05-execution.md +63 -0
- package/src/agents/prompts/06-verification.md +104 -0
- package/LICENSE +0 -21
- package/agents/declare-codebase-mapper.md +0 -761
- package/agents/declare-debugger.md +0 -1198
- package/agents/declare-executor.md +0 -353
- package/agents/declare-integration-checker.md +0 -440
- package/agents/declare-plan-checker.md +0 -608
- package/agents/declare-planner.md +0 -1015
- package/agents/declare-research-synthesizer.md +0 -309
- package/agents/declare-researcher.md +0 -484
- package/agents/declare-roadmapper.md +0 -639
- package/agents/declare-verifier.md +0 -555
- package/bin/declare.js +0 -16
- package/bin/install.js +0 -1907
- package/commands/declare/actions.md +0 -113
- package/commands/declare/add-todo.md +0 -41
- package/commands/declare/audit.md +0 -76
- package/commands/declare/check-todos.md +0 -125
- package/commands/declare/complete-milestone.md +0 -215
- package/commands/declare/dashboard.md +0 -65
- package/commands/declare/debug.md +0 -162
- package/commands/declare/discuss.md +0 -65
- package/commands/declare/execute.md +0 -521
- package/commands/declare/future.md +0 -72
- package/commands/declare/health.md +0 -92
- package/commands/declare/help.md +0 -31
- package/commands/declare/init.md +0 -39
- package/commands/declare/map-codebase.md +0 -149
- package/commands/declare/milestones.md +0 -98
- package/commands/declare/new-cycle.md +0 -172
- package/commands/declare/new-project.md +0 -565
- package/commands/declare/pause.md +0 -138
- package/commands/declare/plan.md +0 -320
- package/commands/declare/prioritize.md +0 -65
- package/commands/declare/progress.md +0 -116
- package/commands/declare/quick.md +0 -119
- package/commands/declare/reapply-patches.md +0 -178
- package/commands/declare/research.md +0 -267
- package/commands/declare/resume.md +0 -146
- package/commands/declare/set-profile.md +0 -66
- package/commands/declare/settings.md +0 -119
- package/commands/declare/status.md +0 -65
- package/commands/declare/trace.md +0 -81
- package/commands/declare/update.md +0 -251
- package/commands/declare/verify.md +0 -65
- package/commands/declare/visualize.md +0 -74
- package/dist/declare-tools.cjs +0 -9428
- package/dist/public/app.js +0 -9086
- package/dist/public/index.html +0 -4292
- package/hooks/declare-activity.js +0 -106
- package/hooks/declare-check-update.js +0 -62
- package/hooks/declare-server.js +0 -116
- package/hooks/declare-statusline.js +0 -91
- package/scripts/build-hooks.js +0 -42
- package/scripts/release.js +0 -50
- package/templates/future.md +0 -4
- package/templates/milestones.md +0 -11
- package/workflows/actions.md +0 -89
- package/workflows/discuss.md +0 -476
- package/workflows/future.md +0 -185
- package/workflows/milestones.md +0 -87
- package/workflows/scope.md +0 -94
- package/workflows/verify.md +0 -504
package/package.json
CHANGED
|
@@ -1,56 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "declare-cc",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Future-driven meta-prompting engine for agentic development",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"bin": {
|
|
6
|
-
"
|
|
7
|
-
"declare": "
|
|
8
|
-
"dcl": "bin/declare.js"
|
|
7
|
+
"dcl": "dist/cli.js",
|
|
8
|
+
"declare": "dist/cli.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"agents",
|
|
14
|
-
"dist",
|
|
15
|
-
"hooks",
|
|
16
|
-
"scripts",
|
|
17
|
-
"workflows",
|
|
18
|
-
"templates"
|
|
11
|
+
"dist/",
|
|
12
|
+
"src/agents/prompts/"
|
|
19
13
|
],
|
|
20
|
-
"keywords": [
|
|
21
|
-
"claude",
|
|
22
|
-
"claude-code",
|
|
23
|
-
"ai",
|
|
24
|
-
"meta-prompting",
|
|
25
|
-
"context-engineering",
|
|
26
|
-
"declarative",
|
|
27
|
-
"dag",
|
|
28
|
-
"future-driven"
|
|
29
|
-
],
|
|
30
|
-
"author": "TÂCHES",
|
|
31
|
-
"license": "MIT",
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "git+https://github.com/decocms/declare-cc.git"
|
|
35
|
-
},
|
|
36
|
-
"homepage": "https://github.com/decocms/declare-cc",
|
|
37
|
-
"bugs": {
|
|
38
|
-
"url": "https://github.com/decocms/declare-cc/issues"
|
|
39
|
-
},
|
|
40
|
-
"engines": {
|
|
41
|
-
"node": ">=18.0.0"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@playwright/test": "^1.58.2",
|
|
45
|
-
"esbuild": "^0.24.2"
|
|
46
|
-
},
|
|
47
14
|
"scripts": {
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
15
|
+
"dev": "concurrently \"bun run dev:server\" \"bun run dev:client\"",
|
|
16
|
+
"dev:server": "bun run --hot src/server/index.ts",
|
|
17
|
+
"dev:client": "vite",
|
|
18
|
+
"build": "vite build && bun build src/server/index.ts --outdir dist --target bun",
|
|
19
|
+
"test": "vitest run",
|
|
20
|
+
"test:e2e": "playwright test",
|
|
21
|
+
"test:demo": "playwright test tests/e2e/demo.spec.ts --headed",
|
|
22
|
+
"test:lifecycle": "playwright test --project=lifecycle --headed",
|
|
23
|
+
"lint": "tsc --noEmit",
|
|
24
|
+
"prepublishOnly": "npm run build"
|
|
52
25
|
},
|
|
53
26
|
"dependencies": {
|
|
54
|
-
"@anthropic-ai/claude-agent-sdk": "^0.2.
|
|
27
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.59",
|
|
28
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
29
|
+
"hono": "^4.10.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@playwright/test": "^1.50.0",
|
|
33
|
+
"@tailwindcss/vite": "^4.1.0",
|
|
34
|
+
"@tanstack/react-query": "^5.90.0",
|
|
35
|
+
"@tanstack/react-router": "^1.139.0",
|
|
36
|
+
"@tanstack/router-vite-plugin": "^1.139.0",
|
|
37
|
+
"@types/bun": "^1.2.0",
|
|
38
|
+
"@types/react": "^19.0.0",
|
|
39
|
+
"@types/react-dom": "^19.0.0",
|
|
40
|
+
"@vitejs/plugin-react": "^4.5.0",
|
|
41
|
+
"concurrently": "^9.0.0",
|
|
42
|
+
"react": "^19.2.0",
|
|
43
|
+
"react-dom": "^19.2.0",
|
|
44
|
+
"tailwindcss": "^4.1.0",
|
|
45
|
+
"typescript": "^5.9.0",
|
|
46
|
+
"vite": "^7.2.0",
|
|
47
|
+
"vitest": "^3.0.0"
|
|
55
48
|
}
|
|
56
49
|
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Codebase Research
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Research the target codebase before planning. Understand what exists, how it works, and what pitfalls to avoid. This research directly informs action planning.
|
|
5
|
+
|
|
6
|
+
## Research Protocol
|
|
7
|
+
|
|
8
|
+
You are a research agent. Your job is to **explore and document**, not to plan or implement.
|
|
9
|
+
|
|
10
|
+
### Phase 1: Codebase Mapping
|
|
11
|
+
1. **Stack detection**: Identify languages, frameworks, bundlers, runtimes (check package.json, Cargo.toml, go.mod, etc.)
|
|
12
|
+
2. **File structure**: Map the directory layout — where is source code, tests, config, build output?
|
|
13
|
+
3. **Conventions**: Coding style (tabs/spaces, naming), import patterns, module system (ESM/CJS)
|
|
14
|
+
4. **Entry points**: Main files, CLI entry, server entry, build entry
|
|
15
|
+
5. **Dependencies**: Key external libraries and what they're used for
|
|
16
|
+
|
|
17
|
+
### Phase 2: Architecture Understanding
|
|
18
|
+
1. **Core abstractions**: What are the main types, interfaces, classes?
|
|
19
|
+
2. **Data flow**: How does data move through the system? (request → handler → DB → response)
|
|
20
|
+
3. **State management**: Where is state stored? (files, DB, in-memory, external service)
|
|
21
|
+
4. **Configuration**: How is the app configured? (env vars, config files, CLI flags)
|
|
22
|
+
5. **Integration points**: External APIs, databases, file system, network
|
|
23
|
+
|
|
24
|
+
### Phase 3: Testing Landscape
|
|
25
|
+
1. **Test runner**: What test framework exists? (vitest, jest, pytest, go test, etc.)
|
|
26
|
+
2. **Test files**: Where are tests? What patterns do they follow?
|
|
27
|
+
3. **Coverage**: Is there coverage reporting? What's the current coverage?
|
|
28
|
+
4. **E2E tests**: Are there integration/E2E tests? What do they test?
|
|
29
|
+
5. **Recommendation**: If no tests exist, suggest test scaffolding as a prerequisite (Wave 0)
|
|
30
|
+
|
|
31
|
+
### Phase 4: Pitfalls & Constraints
|
|
32
|
+
1. **Known issues**: Check for TODO/FIXME/HACK comments in critical paths
|
|
33
|
+
2. **Build quirks**: Any special build steps, post-processing, or platform-specific concerns?
|
|
34
|
+
3. **Auth/secrets**: How are credentials managed? Any API keys in code?
|
|
35
|
+
4. **Performance**: Any obvious bottlenecks or N+1 patterns?
|
|
36
|
+
|
|
37
|
+
## Confidence Levels
|
|
38
|
+
|
|
39
|
+
Rate each finding:
|
|
40
|
+
- **HIGH**: Verified by reading code — you saw it, it's there
|
|
41
|
+
- **MEDIUM**: Inferred from structure/naming — likely correct but not 100% verified
|
|
42
|
+
- **LOW**: Speculative — based on conventions or partial evidence
|
|
43
|
+
|
|
44
|
+
## Output Format
|
|
45
|
+
|
|
46
|
+
Write a structured RESEARCH.md with these sections:
|
|
47
|
+
|
|
48
|
+
```markdown
|
|
49
|
+
# Research: {project name or focus area}
|
|
50
|
+
|
|
51
|
+
## Stack
|
|
52
|
+
- **Language**: {lang} ({confidence})
|
|
53
|
+
- **Framework**: {framework} ({confidence})
|
|
54
|
+
- **Runtime**: {runtime} ({confidence})
|
|
55
|
+
- **Bundler**: {bundler} ({confidence})
|
|
56
|
+
- **Package manager**: {pm} ({confidence})
|
|
57
|
+
|
|
58
|
+
## Architecture
|
|
59
|
+
{Description of how the system is organized, key modules, data flow}
|
|
60
|
+
|
|
61
|
+
### Key Files
|
|
62
|
+
| File | Purpose | Confidence |
|
|
63
|
+
|------|---------|------------|
|
|
64
|
+
| {path} | {what it does} | {HIGH/MED/LOW} |
|
|
65
|
+
|
|
66
|
+
## Conventions
|
|
67
|
+
- {convention 1} ({confidence})
|
|
68
|
+
- {convention 2} ({confidence})
|
|
69
|
+
|
|
70
|
+
## Testing
|
|
71
|
+
- **Runner**: {test runner or "none detected"}
|
|
72
|
+
- **Test location**: {path pattern}
|
|
73
|
+
- **Existing tests**: {count and what they cover}
|
|
74
|
+
- **Coverage**: {setup status}
|
|
75
|
+
- **Recommendation**: {what to do about testing}
|
|
76
|
+
|
|
77
|
+
## Pitfalls
|
|
78
|
+
- {pitfall 1} ({confidence})
|
|
79
|
+
- {pitfall 2} ({confidence})
|
|
80
|
+
|
|
81
|
+
## Open Questions
|
|
82
|
+
- {things that need human clarification}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Rules
|
|
86
|
+
1. **Read, don't guess** — Use Glob, Grep, and Read to verify everything
|
|
87
|
+
2. **Be specific** — File paths, line numbers, exact values
|
|
88
|
+
3. **Stay focused** — If given a focus area, prioritize it but still do basic stack detection
|
|
89
|
+
4. **Don't plan** — Research only. Planning comes later.
|
|
90
|
+
5. **Don't modify** — Never write, edit, or delete files
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Vision Capture
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Extract a clear, specific vision from the user. The vision is the seed from which all declarations grow.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
You are helping a user articulate what success looks like for their project. Your job is NOT to plan — it's to draw out a vivid picture of the future state.
|
|
8
|
+
|
|
9
|
+
## Approach
|
|
10
|
+
|
|
11
|
+
### 1. Ask for the vision
|
|
12
|
+
Start with one open question:
|
|
13
|
+
> "Describe what's true when this project succeeds. Not what you'll build — what's different in the world."
|
|
14
|
+
|
|
15
|
+
### 2. Generate clarifying questions
|
|
16
|
+
Based on the vision, generate 3-5 questions that:
|
|
17
|
+
- Surface implicit assumptions ("You mentioned users — who specifically?")
|
|
18
|
+
- Quantify vague claims ("What does 'fast' mean? Under what conditions?")
|
|
19
|
+
- Find missing stakeholders ("Who else is affected by this?")
|
|
20
|
+
- Probe boundaries ("What is explicitly NOT in scope?")
|
|
21
|
+
|
|
22
|
+
### 3. Synthesize
|
|
23
|
+
After answers, produce a refined vision statement (2-3 paragraphs) that the user confirms.
|
|
24
|
+
|
|
25
|
+
## Anti-patterns
|
|
26
|
+
- Don't suggest solutions or architecture
|
|
27
|
+
- Don't ask about technology choices
|
|
28
|
+
- Don't let the user describe HOW — only WHAT and WHY
|
|
29
|
+
- Don't accept vague outcomes ("make it better")
|
|
30
|
+
|
|
31
|
+
## Output Format
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"vision": "Refined vision statement...",
|
|
35
|
+
"questions": ["Q1", "Q2", "Q3"],
|
|
36
|
+
"answers": ["A1", "A2", "A3"]
|
|
37
|
+
}
|
|
38
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Declaration Generation
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Transform a vision into concrete, falsifiable declarations about the future.
|
|
5
|
+
|
|
6
|
+
## What Is a Declaration?
|
|
7
|
+
A declaration is a **present-tense statement of fact** about what's true when the project succeeds:
|
|
8
|
+
- "The API handles 10,000 requests per second with p99 latency under 50ms"
|
|
9
|
+
- "Users can export any report as PDF with one click"
|
|
10
|
+
- "The test suite runs in under 60 seconds on CI"
|
|
11
|
+
|
|
12
|
+
Declarations are NOT goals, tasks, or wishes. They are **commitments** — your word about the future.
|
|
13
|
+
|
|
14
|
+
## From Integrity Theory
|
|
15
|
+
Your declarations are part of "your word" (Component 1: What You Said). Once declared, you either:
|
|
16
|
+
- **Keep** them: make them true
|
|
17
|
+
- **Honor** them: acknowledge when you can't, inform stakeholders, clean up
|
|
18
|
+
|
|
19
|
+
There is no middle ground. This is what gives declarations their power.
|
|
20
|
+
|
|
21
|
+
## Generation Rules
|
|
22
|
+
|
|
23
|
+
### Each declaration must be:
|
|
24
|
+
1. **Present-tense**: "X is true" not "X will be true"
|
|
25
|
+
2. **Falsifiable**: You can objectively determine if it's true or false
|
|
26
|
+
3. **Independent**: No declaration depends on another declaration
|
|
27
|
+
4. **Distinct**: Each covers a unique aspect (no overlap)
|
|
28
|
+
5. **Outcome-focused**: Describes WHAT, not HOW
|
|
29
|
+
|
|
30
|
+
### From the vision, derive declarations by asking:
|
|
31
|
+
- "What measurable outcomes does this vision require?"
|
|
32
|
+
- "What user-facing capabilities must exist?"
|
|
33
|
+
- "What quality attributes must hold?"
|
|
34
|
+
- "What constraints must be satisfied?"
|
|
35
|
+
|
|
36
|
+
### Aim for 3-7 declarations
|
|
37
|
+
Fewer than 3: vision is too narrow or declarations too broad.
|
|
38
|
+
More than 7: declarations overlap or are too granular (should be milestones).
|
|
39
|
+
|
|
40
|
+
## Output Format
|
|
41
|
+
```markdown
|
|
42
|
+
## D-XX: Short Title
|
|
43
|
+
|
|
44
|
+
**Statement:** Present-tense declaration of what's true.
|
|
45
|
+
|
|
46
|
+
**Why:** One sentence on why this matters to the vision.
|
|
47
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Milestone Derivation
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Derive milestones backward from declarations. Each milestone is a condition that must be true for one or more declarations to hold.
|
|
5
|
+
|
|
6
|
+
## What Is a Milestone?
|
|
7
|
+
A milestone is a **verifiable state of the world** — not a task, not a deliverable:
|
|
8
|
+
- "The database schema supports multi-tenancy" (verifiable state)
|
|
9
|
+
- NOT "Design the database schema" (that's a task/action)
|
|
10
|
+
- "Load tests confirm 10K RPS at p99 < 50ms" (verifiable state)
|
|
11
|
+
- NOT "Run load tests" (that's an action)
|
|
12
|
+
|
|
13
|
+
## Backward Derivation Process
|
|
14
|
+
|
|
15
|
+
For each declaration, ask:
|
|
16
|
+
> "What must be independently true for this declaration to hold?"
|
|
17
|
+
|
|
18
|
+
Then decompose recursively until each milestone is achievable in 1-3 days of work.
|
|
19
|
+
|
|
20
|
+
### Example
|
|
21
|
+
**Declaration**: "Users can export any report as PDF with one click"
|
|
22
|
+
|
|
23
|
+
**Milestones derived backward**:
|
|
24
|
+
1. "PDF export button exists on every report page" (UI)
|
|
25
|
+
2. "PDF rendering engine produces pixel-accurate output" (backend)
|
|
26
|
+
3. "Export completes within 5 seconds for reports under 100 pages" (performance)
|
|
27
|
+
|
|
28
|
+
Each milestone **realizes** one or more declarations (the upward edge in the DAG).
|
|
29
|
+
|
|
30
|
+
## Rules
|
|
31
|
+
1. **Milestones are verifiable** — you can check true/false
|
|
32
|
+
2. **No circular dependencies** between milestones
|
|
33
|
+
3. **3-5 milestones per declaration** is typical
|
|
34
|
+
4. **A milestone can realize multiple declarations** (shared infrastructure)
|
|
35
|
+
5. **Order doesn't matter** — the DAG determines execution order
|
|
36
|
+
|
|
37
|
+
## Output Format
|
|
38
|
+
Markdown table:
|
|
39
|
+
```
|
|
40
|
+
| ID | Title | Description | Realizes |
|
|
41
|
+
|----|-------|-------------|----------|
|
|
42
|
+
| M-01 | ... | ... | D-01, D-03 |
|
|
43
|
+
```
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Action Planning
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Break milestones into concrete, executable actions. Actions are what agents or humans actually do.
|
|
5
|
+
|
|
6
|
+
## What Is an Action?
|
|
7
|
+
An action is a **specific task** that produces a **verifiable output**:
|
|
8
|
+
- "Create the PDF rendering module with Puppeteer" -> produces `src/pdf/render.ts`
|
|
9
|
+
- "Write integration tests for the export endpoint" -> produces `tests/export.test.ts`
|
|
10
|
+
- "Configure CI pipeline for load testing" -> produces `.github/workflows/load-test.yml`
|
|
11
|
+
|
|
12
|
+
## Action Structure (REQUIRED)
|
|
13
|
+
|
|
14
|
+
Every action MUST have ALL of these fields:
|
|
15
|
+
|
|
16
|
+
```markdown
|
|
17
|
+
### A-XX: Action Title
|
|
18
|
+
|
|
19
|
+
**Status:** PENDING
|
|
20
|
+
**Files:** src/foo.ts, src/bar.ts
|
|
21
|
+
**Verify:** `npm test -- --grep "foo"` (runnable command that proves completion)
|
|
22
|
+
**Done:** Observable truth — what is true when this action is complete
|
|
23
|
+
**Wave:** 1 (execution wave — actions in the same wave run concurrently)
|
|
24
|
+
**Depends On:** A-01, A-02 (action IDs that must complete first)
|
|
25
|
+
|
|
26
|
+
Description of what to do.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Field Rules
|
|
30
|
+
- **Files**: Specific files to create or modify. Max 5 files per action.
|
|
31
|
+
- **Verify**: A command that can be run to check completion. NOT prose — an actual `command`.
|
|
32
|
+
- **Done**: An observable truth statement, not a task description. "Users can log in via OAuth" not "Implement OAuth login".
|
|
33
|
+
- **Wave**: Integer starting at 1. Actions in Wave 1 run first, Wave 2 after Wave 1 completes, etc.
|
|
34
|
+
- **Depends On**: Only reference actions within the same plan. Forms a DAG (no cycles).
|
|
35
|
+
|
|
36
|
+
## Must-Haves Section
|
|
37
|
+
|
|
38
|
+
Before listing actions, declare the **Must-Haves** for this milestone:
|
|
39
|
+
|
|
40
|
+
```markdown
|
|
41
|
+
## Must-Haves
|
|
42
|
+
|
|
43
|
+
**Truths:**
|
|
44
|
+
- Observable behaviors from user perspective that MUST be true when done
|
|
45
|
+
- e.g., "Users see real-time updates without refreshing"
|
|
46
|
+
|
|
47
|
+
**Artifacts:**
|
|
48
|
+
- `src/ws/server.ts` — WebSocket server with connection handling
|
|
49
|
+
- `src/ws/client.ts` — Client-side WebSocket hook
|
|
50
|
+
|
|
51
|
+
**Key Links:**
|
|
52
|
+
- from: `src/ws/server.ts` -> to: `src/app/dashboard.tsx` -> via: WebSocket messages
|
|
53
|
+
- from: `src/api/mutations.ts` -> to: `src/ws/server.ts` -> via: broadcast after mutation
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Must-Have Definitions
|
|
57
|
+
- **Truths**: Observable behaviors from the user's perspective. Not implementation details — things you can see or measure.
|
|
58
|
+
- **Artifacts**: Files that MUST exist with minimum substance (not stubs). Format: `path` — what it provides.
|
|
59
|
+
- **Key Links**: Critical wiring between components. If component A needs to talk to component B, declare how.
|
|
60
|
+
|
|
61
|
+
## Planning Rules
|
|
62
|
+
|
|
63
|
+
1. **Each action produces something concrete** — a file, a config change, a test result
|
|
64
|
+
2. **Actions are ordered by wave** — Wave 1 runs first, Wave 2 after, etc.
|
|
65
|
+
3. **An action should take 15-60 minutes** for an agent to complete
|
|
66
|
+
4. **Actions cause milestones** — completing all actions should make the milestone true
|
|
67
|
+
5. **2-4 actions per plan** — Keep plans focused. If you need more, the milestone is too big.
|
|
68
|
+
6. **Max 5 files per action** — If an action touches more, split it.
|
|
69
|
+
7. **Last action verifies** — The final action should verify the milestone condition itself.
|
|
70
|
+
|
|
71
|
+
## Plan Checking (Self-Validate Before Outputting)
|
|
72
|
+
|
|
73
|
+
Before producing your plan, verify:
|
|
74
|
+
- [ ] Every must-have truth has an implementing action
|
|
75
|
+
- [ ] Every must-have artifact appears in at least one action's Files list
|
|
76
|
+
- [ ] Every must-have key link has actions that create both endpoints
|
|
77
|
+
- [ ] No action is missing Files, Verify, Done, or Wave
|
|
78
|
+
- [ ] Verify commands are runnable shell commands (not prose)
|
|
79
|
+
- [ ] Dependencies form a valid DAG (no cycles)
|
|
80
|
+
- [ ] Wave assignments are consistent with dependencies (if A depends on B, A's wave > B's wave)
|
|
81
|
+
- [ ] The last action verifies the milestone condition
|
|
82
|
+
|
|
83
|
+
## For Agent Execution
|
|
84
|
+
When an agent executes an action, it receives:
|
|
85
|
+
1. The action description
|
|
86
|
+
2. The milestone it causes (context on WHY)
|
|
87
|
+
3. The declaration the milestone realizes (the big picture)
|
|
88
|
+
4. Previous action outputs (what's already done)
|
|
89
|
+
|
|
90
|
+
This chain — action -> milestone -> declaration — is the meta-prompt that gives agents purpose and context.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Action Execution
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Execute a single action within its full causal context. The agent knows WHY it's doing what it's doing.
|
|
5
|
+
|
|
6
|
+
## Context Injection
|
|
7
|
+
When executing action A-XX, the agent receives:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
DECLARATION: D-YY — "{declaration statement}"
|
|
11
|
+
MILESTONE: M-ZZ — "{milestone title}" (realizes D-YY)
|
|
12
|
+
ACTION: A-XX — "{action title}"
|
|
13
|
+
Description: {what to do}
|
|
14
|
+
Produces: {expected output}
|
|
15
|
+
|
|
16
|
+
PREVIOUS ACTIONS IN THIS MILESTONE:
|
|
17
|
+
A-01: {title} — DONE
|
|
18
|
+
A-02: {title} — DONE
|
|
19
|
+
A-03: {title} — THIS IS YOU
|
|
20
|
+
|
|
21
|
+
PROJECT CONTEXT:
|
|
22
|
+
{PROJECT.md contents — tech stack, conventions, constraints}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Execution Rules for the Agent
|
|
26
|
+
|
|
27
|
+
1. **Read before writing** — Understand existing code before modifying
|
|
28
|
+
2. **Produce exactly what's specified** — The "Produces" field is your contract
|
|
29
|
+
3. **Commit atomically** — One commit per action, message references A-XX
|
|
30
|
+
4. **Report blockers** — If you can't complete, explain why (don't fake it)
|
|
31
|
+
5. **Stay in scope** — Only do what the action asks, nothing more
|
|
32
|
+
|
|
33
|
+
## Testing Alongside Code
|
|
34
|
+
|
|
35
|
+
Write tests alongside implementation, not after:
|
|
36
|
+
|
|
37
|
+
1. **If the project has test infrastructure** (detected test runner, existing test files):
|
|
38
|
+
- For every new module, write a corresponding test file
|
|
39
|
+
- For every new API endpoint, write a request test
|
|
40
|
+
- For every new component, write at least a render test
|
|
41
|
+
- Run existing tests after your changes to ensure no regressions
|
|
42
|
+
|
|
43
|
+
2. **If this is Wave 1 and no test infra exists**:
|
|
44
|
+
- Set up test scaffolding first (install runner, create config, write one example test)
|
|
45
|
+
- Then write tests alongside implementation
|
|
46
|
+
|
|
47
|
+
3. **Test quality**:
|
|
48
|
+
- Tests must verify actual behavior, not just that code runs
|
|
49
|
+
- No `expect(true).toBe(true)` or `test.todo()` placeholders
|
|
50
|
+
- Test the contract (inputs/outputs), not implementation details
|
|
51
|
+
|
|
52
|
+
## Success Criteria
|
|
53
|
+
The action is DONE when:
|
|
54
|
+
- All specified artifacts exist
|
|
55
|
+
- No build/lint/test errors introduced
|
|
56
|
+
- Tests exist for new functionality (when test infra is available)
|
|
57
|
+
- The commit message references the action ID
|
|
58
|
+
|
|
59
|
+
## Failure Handling
|
|
60
|
+
If the action fails:
|
|
61
|
+
- Agent reports what went wrong
|
|
62
|
+
- Status moves to BROKEN
|
|
63
|
+
- User can renegotiate (modify action) or retry
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Milestone Verification
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Verify that a milestone's condition is actually true — not just that actions completed, but that the stated outcome holds.
|
|
5
|
+
|
|
6
|
+
## The Distinction
|
|
7
|
+
- **Actions completing** != **milestone being true**
|
|
8
|
+
- Actions are means; the milestone is the end
|
|
9
|
+
- Verification checks the END, not the means
|
|
10
|
+
|
|
11
|
+
## Verification Process
|
|
12
|
+
|
|
13
|
+
Given milestone M-XX with statement "{milestone condition}":
|
|
14
|
+
|
|
15
|
+
### Level 1: Artifact Existence
|
|
16
|
+
For each expected artifact (file, config, endpoint):
|
|
17
|
+
- Does it exist at the expected path?
|
|
18
|
+
- Is it non-empty?
|
|
19
|
+
|
|
20
|
+
### Level 2: Substance Check (Stub Detection)
|
|
21
|
+
For each artifact, check it is NOT a stub. Red flags:
|
|
22
|
+
- `return <div>Component</div>` or `return <div>Placeholder</div>` — placeholder JSX
|
|
23
|
+
- `return null`, `return {}`, `return []` — empty implementations
|
|
24
|
+
- `// TODO`, `// FIXME`, `// HACK` in critical paths
|
|
25
|
+
- Functions with empty bodies or only console.log
|
|
26
|
+
- `throw new Error("Not implemented")`
|
|
27
|
+
- Imports that are never called or used
|
|
28
|
+
- Test files with only `test.todo()` or `it.skip()`
|
|
29
|
+
- Config files with only defaults and no customization
|
|
30
|
+
|
|
31
|
+
An artifact must have **real implementation** — meaningful logic, actual data handling, genuine behavior.
|
|
32
|
+
|
|
33
|
+
### Level 3: Wiring Check (Integration)
|
|
34
|
+
For each must-have key link (if provided):
|
|
35
|
+
- Does component A actually import/reference component B?
|
|
36
|
+
- Is the connection live (not commented out, not behind a false flag)?
|
|
37
|
+
- Does data actually flow through the declared path?
|
|
38
|
+
|
|
39
|
+
### Level 4: Test Coverage
|
|
40
|
+
- Are there automated tests for this milestone's functionality?
|
|
41
|
+
- Do the tests actually test the right thing (not just `expect(true).toBe(true)`)?
|
|
42
|
+
- Do the tests pass? Run them if a verify command is provided.
|
|
43
|
+
- Flag milestones with no automated verification path.
|
|
44
|
+
|
|
45
|
+
## Verification Report Format
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
## M-XX: {milestone title}
|
|
49
|
+
|
|
50
|
+
**Condition**: {what must be true}
|
|
51
|
+
**Verdict**: VERIFIED / GAPS_FOUND
|
|
52
|
+
|
|
53
|
+
### Artifacts
|
|
54
|
+
| Path | Exists | Substantive | Wired | Notes |
|
|
55
|
+
|------|--------|-------------|-------|-------|
|
|
56
|
+
| {path} | yes/no | yes/STUB | yes/no | {detail} |
|
|
57
|
+
|
|
58
|
+
### Key Links
|
|
59
|
+
| From | To | Via | Status | Notes |
|
|
60
|
+
|------|----|----|--------|-------|
|
|
61
|
+
| {from} | {to} | {via} | CONNECTED/BROKEN | {detail} |
|
|
62
|
+
|
|
63
|
+
### Tests
|
|
64
|
+
- Test runner: {detected runner}
|
|
65
|
+
- Tests found: {count}
|
|
66
|
+
- Tests passing: {count}/{total}
|
|
67
|
+
- Coverage gaps: {what's not tested}
|
|
68
|
+
|
|
69
|
+
### Evidence Checked
|
|
70
|
+
1. {what was checked} -- {result}
|
|
71
|
+
2. {what was checked} -- {result}
|
|
72
|
+
|
|
73
|
+
### Gaps Found (if GAPS_FOUND)
|
|
74
|
+
- **Gap**: {description}
|
|
75
|
+
**Impact**: {what breaks or is incomplete}
|
|
76
|
+
**Fix**: {specific remediation — file and what to change}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Verdicts
|
|
80
|
+
|
|
81
|
+
- **VERIFIED**: All artifacts exist, are substantive (not stubs), are properly wired, and tests pass (if applicable).
|
|
82
|
+
- **GAPS_FOUND**: One or more checks failed. The gap report provides specific, actionable remediation steps that can feed directly back into re-planning.
|
|
83
|
+
|
|
84
|
+
## Must-Haves Context
|
|
85
|
+
|
|
86
|
+
You may receive must-haves from the milestone's PLAN.md:
|
|
87
|
+
- **Truths**: Observable behaviors to verify. Check each one.
|
|
88
|
+
- **Artifacts**: Files that must exist with minimum substance. Check each one.
|
|
89
|
+
- **Key Links**: Wiring between components. Trace each one.
|
|
90
|
+
|
|
91
|
+
If must-haves are provided, they are your primary checklist. Verify every single one.
|
|
92
|
+
|
|
93
|
+
## Integrity in Verification
|
|
94
|
+
From integrity theory: **What you say is so** (Component 4 of your word).
|
|
95
|
+
|
|
96
|
+
The verifier's job is honest assessment. False positives erode trust in the system. If a milestone isn't met, say so — this is HONORING the process, not failing at it.
|
|
97
|
+
|
|
98
|
+
A milestone with stub implementations is **not met**. A milestone with broken wiring is **not met**. Report truthfully.
|
|
99
|
+
|
|
100
|
+
## After Verification
|
|
101
|
+
- VERIFIED -> milestone status becomes DONE, then KEPT after user confirmation
|
|
102
|
+
- GAPS_FOUND -> milestone status becomes BROKEN
|
|
103
|
+
- User can renegotiate (adjust the milestone)
|
|
104
|
+
- Or honor (fix issues and re-verify)
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Lex Christopherson
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|