@sallmarta/eye-hate-agent 1.0.6 → 1.0.8
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 +46 -5
- package/bin/eha.js +53 -22
- package/docs/templates/project-docs-template/index.md +16 -6
- package/docs/templates/reusable-prompts/00-eha-help.md +56 -0
- package/docs/templates/reusable-prompts/00-project-docs-bootstrap.md +73 -4
- package/docs/templates/reusable-prompts/00-project-docs-refresh.md +17 -5
- package/docs/templates/rules/agent-rules.md +5 -1
- package/docs/templates/skills/parity-audit/SKILL.md +1 -1
- package/package.json +1 -1
- package/src/engine/runtime-adapters.js +2 -12
- package/src/engine/workflow-registry.js +6 -0
package/README.md
CHANGED
|
@@ -7,13 +7,14 @@ A simple **Spec-Driven Development (SDD)**. Unified set of rules, specialist ski
|
|
|
7
7
|
## Get Started
|
|
8
8
|
|
|
9
9
|
### 1. Initialize EHA in your project
|
|
10
|
-
Run directly in **your project root**:
|
|
10
|
+
Run directly in **your project/repo root**:
|
|
11
11
|
```bash
|
|
12
12
|
$ npx @sallmarta/eye-hate-agent
|
|
13
13
|
```
|
|
14
14
|
*Or install **globally** and run it:*
|
|
15
15
|
```bash
|
|
16
16
|
$ npm i -g @sallmarta/eye-hate-agent
|
|
17
|
+
$ cd your-project
|
|
17
18
|
$ eha
|
|
18
19
|
```
|
|
19
20
|
|
|
@@ -35,6 +36,7 @@ Once initialized, EHA projects a series of interactive workflows directly into y
|
|
|
35
36
|
| **`/eha-refresh`** | The main workhorse for repos with **any existing documentation**. Updates active SDD docs, migrates legacy docs, converts non-SDD docs, and creates missing SDD files — all by cross-referencing the actual codebase alongside existing material. Auto-detects the appropriate Taxonomy Tier for migration scenarios. Prompts the user to resolve any drift between codebase and docs. |
|
|
36
37
|
| **`/sdd-discuss`** | Collaborative brainstorming. Interviews you about edge cases, API shapes, data models, and constraints, then drafts spec snippets ready for injection into project docs. No code output. |
|
|
37
38
|
| **`/sdd-execute`** | Spec-Driven code generation via strict TDD. Reads specs → generates tests → generates code → validates against architecture. Refuses to code features not in the spec. |
|
|
39
|
+
| **`/eha-help`** | **EHA Help & Tutorial.** Interactive guide providing descriptions of EHA's 4-layer taxonomy, active workflows, and specialist skills. |
|
|
38
40
|
|
|
39
41
|
> **Looking for parity audits?** Use the `parity-audit` skill directly:
|
|
40
42
|
> `@agent use parity-audit on this repository`
|
|
@@ -42,15 +44,47 @@ Once initialized, EHA projects a series of interactive workflows directly into y
|
|
|
42
44
|
|
|
43
45
|
---
|
|
44
46
|
|
|
47
|
+
## Greenfield vs. Brownfield Workflows
|
|
48
|
+
|
|
49
|
+
EHA adapts its behavior automatically based on your repository's state:
|
|
50
|
+
|
|
51
|
+
### Greenfield Projects
|
|
52
|
+
**Start with Discussion:** run
|
|
53
|
+
```bash
|
|
54
|
+
/sdd-discuss
|
|
55
|
+
```
|
|
56
|
+
to brainstorm the tech stack and project specifications, then run
|
|
57
|
+
```bash
|
|
58
|
+
/eha-bootstrap
|
|
59
|
+
```
|
|
60
|
+
once the discussion is mature.
|
|
61
|
+
|
|
62
|
+
**Bootstrap Redirect:** If you run `/eha-bootstrap` in a brand-new empty repository, the agent will automatically redirect you to `/sdd-discuss` first.
|
|
63
|
+
|
|
64
|
+
### Brownfield Projects
|
|
65
|
+
**No Project Docs Yet:** Run
|
|
66
|
+
```bash
|
|
67
|
+
/eha-bootstrap
|
|
68
|
+
```
|
|
69
|
+
to scan your codebase complexity and generate an appropriate Taxonomy Tier (Lite, Standard, or Enterprise).
|
|
70
|
+
|
|
71
|
+
**Already Has Project Docs:** Run
|
|
72
|
+
```bash
|
|
73
|
+
/eha-refresh
|
|
74
|
+
```
|
|
75
|
+
to sync docs with code, migrate legacy folders, and resolve codebase-vs-doc drift with user guidance.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
45
79
|
## EHA CLI Command
|
|
46
80
|
|
|
47
81
|
The EHA CLI provides a lightweight, frictionless setup and maintenance toolbelt:
|
|
48
82
|
|
|
49
83
|
| Command | Primary Purpose |
|
|
50
84
|
| :--- | :--- |
|
|
51
|
-
| `eha init`
|
|
52
|
-
| `eha init <agent>` | Directly initiates the EHA project setup for a specific agent (e.g. `copilot`, `claude`, `antigravity`) |
|
|
53
|
-
| `eha doctor` | Performs a health check verifying that all
|
|
85
|
+
| `eha init` | Lets you choose your target AI agent, and projects standard rules/skills. |
|
|
86
|
+
| `eha init <agent>` | Directly initiates the EHA project setup for a specific agent (e.g. `copilot`, `claude`, `antigravity`). |
|
|
87
|
+
| `eha doctor` | Performs a health check verifying that all generated files are present and intact. |
|
|
54
88
|
| `eha remove [agent]` | Safely deletes EHA's generated contract files for the specified agent (or all agents if omitted), along with configuration files. |
|
|
55
89
|
|
|
56
90
|
---
|
|
@@ -91,4 +125,11 @@ Eye Hate Agent is built upon a core set of operational beliefs designed to optim
|
|
|
91
125
|
2. **Flexible, Non-Deterministic Context**: EHA documents define clear constraints, design parameters, and business logic (specific) but avoid locking implementation down into rigid boilerplate (generic and non-deterministic). This allows both developers and agents to exercise active engineering judgment and choose the best implementation pathways.
|
|
92
126
|
3. **Zero Agent Hallucination**: By anchoring AI agents to EHA's Single Master Registry catalog (`index.md`) and a strict 4-layer folder structure, EHA eliminates path hallucination, stale references, and prompt redundancy. Agents always know exactly where to read and write.
|
|
93
127
|
4. **Brainstorming & Discussion are Sacred**: Specifications are never written in isolation. EHA integrates a dedicated discuss loop (`02-sdd-discuss.md`), establishing collaborative brainstorming as the mandatory first step to align human intent with agent understanding before any code is generated.
|
|
94
|
-
5. **Native Agile & Scrum Alignment**: EHA is built for real-world software delivery. With structured sprint and epic trackers (`foundation/phases
|
|
128
|
+
5. **Native Agile & Scrum Alignment**: EHA is built for real-world software delivery. With structured sprint and epic trackers (`foundation/phases/`, `foundation/status.md`), EHA fits seamlessly into standard corporate Agile/Scrum lifecycles, enabling agents to act as high-velocity scrum contributors.
|
|
129
|
+
|
|
130
|
+
----------
|
|
131
|
+
$$
|
|
132
|
+
SuLyAdeE
|
|
133
|
+
$$
|
|
134
|
+
----------
|
|
135
|
+
|
package/bin/eha.js
CHANGED
|
@@ -25,33 +25,34 @@ async function promptAgentChoice(currentAgent) {
|
|
|
25
25
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
26
26
|
try {
|
|
27
27
|
const runtimes = listSupportedRuntimes();
|
|
28
|
-
const defaultIndex =
|
|
29
|
-
? runtimes.findIndex(r => r.id === currentAgent) + 1
|
|
30
|
-
: 1;
|
|
28
|
+
const defaultIndex = 1;
|
|
31
29
|
|
|
32
30
|
console.log('');
|
|
33
31
|
console.log('Which agent?');
|
|
34
32
|
for (let i = 0; i < runtimes.length; i++) {
|
|
35
33
|
console.log(` ${i + 1}. ${runtimes[i].name}`);
|
|
36
34
|
}
|
|
35
|
+
console.log(` ${runtimes.length + 1}. All Agents`);
|
|
37
36
|
|
|
37
|
+
const maxChoice = runtimes.length + 1;
|
|
38
38
|
const answer = await rl.question(
|
|
39
|
-
`Choose [1-${
|
|
39
|
+
`Choose [1-${maxChoice}] (default: ${defaultIndex}): `,
|
|
40
40
|
);
|
|
41
41
|
const trimmed = answer.trim();
|
|
42
42
|
|
|
43
|
-
// Accept number or name
|
|
44
43
|
if (!trimmed) return runtimes[defaultIndex - 1].id;
|
|
45
44
|
|
|
46
45
|
const num = parseInt(trimmed, 10);
|
|
47
46
|
if (num >= 1 && num <= runtimes.length) return runtimes[num - 1].id;
|
|
47
|
+
if (num === maxChoice) return 'all';
|
|
48
48
|
|
|
49
|
-
// Fallback: try to match by name (backward compat)
|
|
50
49
|
const normalized = trimmed.toLowerCase();
|
|
50
|
+
if (normalized === 'all') return 'all';
|
|
51
|
+
|
|
51
52
|
const match = runtimes.find(r => r.id === normalized);
|
|
52
53
|
if (match) return match.id;
|
|
53
54
|
|
|
54
|
-
return trimmed.toLowerCase();
|
|
55
|
+
return trimmed.toLowerCase();
|
|
55
56
|
} finally {
|
|
56
57
|
rl.close();
|
|
57
58
|
}
|
|
@@ -76,11 +77,11 @@ function resolveRootDir() {
|
|
|
76
77
|
} catch {
|
|
77
78
|
console.error(
|
|
78
79
|
chalk.red('No project root found.') +
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
' Run ' +
|
|
81
|
+
chalk.cyan('npm init -y') +
|
|
82
|
+
' or ' +
|
|
83
|
+
chalk.cyan('git init') +
|
|
84
|
+
' first.',
|
|
84
85
|
);
|
|
85
86
|
process.exit(1);
|
|
86
87
|
}
|
|
@@ -96,15 +97,13 @@ function printInitSummary(result) {
|
|
|
96
97
|
}
|
|
97
98
|
console.log('');
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
);
|
|
107
|
-
}
|
|
100
|
+
const agentNames = {
|
|
101
|
+
claude: 'Claude',
|
|
102
|
+
copilot: 'GitHub Copilot',
|
|
103
|
+
antigravity: 'Antigravity',
|
|
104
|
+
};
|
|
105
|
+
const name = agentNames[result.agentId] || result.agentId;
|
|
106
|
+
console.log(`Open ${name} in this project and run ${chalk.cyan('/eha-help')} to get started!`);
|
|
108
107
|
console.log('');
|
|
109
108
|
}
|
|
110
109
|
|
|
@@ -158,12 +157,44 @@ async function runInitWizard(agentIdArg) {
|
|
|
158
157
|
}
|
|
159
158
|
|
|
160
159
|
const normalized = String(agentId).trim().toLowerCase();
|
|
160
|
+
|
|
161
|
+
if (normalized === 'all') {
|
|
162
|
+
const installedAgents = config.agents || (config.agent ? [config.agent] : []);
|
|
163
|
+
if (isInteractive && installedAgents.length > 0) {
|
|
164
|
+
const listStr = installedAgents.map(a => chalk.cyan(a)).join(', ');
|
|
165
|
+
const confirm = await promptConfirm(
|
|
166
|
+
`EHA is set up for: ${listStr}. Overwrite / setup all agents?`,
|
|
167
|
+
true,
|
|
168
|
+
);
|
|
169
|
+
if (!confirm) {
|
|
170
|
+
console.log('Skipped.');
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
console.log(chalk.blue('\nInitializing EHA for all agents...'));
|
|
176
|
+
let fileCount = 0;
|
|
177
|
+
for (const id of SUPPORTED_AGENT_IDS) {
|
|
178
|
+
const result = initProject({ rootDir, agentId: id });
|
|
179
|
+
fileCount += result.fileCount;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
console.log('');
|
|
183
|
+
console.log(chalk.green('✓ EHA is ready for all agents.'));
|
|
184
|
+
console.log(` Agents : ${SUPPORTED_AGENT_IDS.map(a => chalk.cyan(a)).join(', ')}`);
|
|
185
|
+
console.log(` Files : ${fileCount} file(s) generated`);
|
|
186
|
+
console.log('');
|
|
187
|
+
console.log('Open Agents in this project and run ' + chalk.cyan('/eha-help') + ' to get started or run ' + chalk.cyan('eha doctor') + ' to see all files.');
|
|
188
|
+
console.log('');
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
161
192
|
if (!SUPPORTED_AGENT_IDS.includes(normalized)) {
|
|
162
193
|
const runtimes = listSupportedRuntimes();
|
|
163
194
|
const list = runtimes.map((r, i) => `${i + 1}. ${r.name}`).join(', ');
|
|
164
195
|
console.error(
|
|
165
196
|
chalk.red(`Unsupported agent: ${agentIdArg || agentId}.`) +
|
|
166
|
-
|
|
197
|
+
` Choose one of: ${list}, or ${runtimes.length + 1}. All Agents.`,
|
|
167
198
|
);
|
|
168
199
|
process.exit(1);
|
|
169
200
|
}
|
|
@@ -57,8 +57,8 @@ Every project document must include these numbered headings in this exact order.
|
|
|
57
57
|
| `foundation/architecture.md` | foundation | 1 | System architecture, tech stack, data flow, system flows, ADRs. |
|
|
58
58
|
| `foundation/status.md` | foundation | 1 | High-level status, recent wins, roadmap. |
|
|
59
59
|
| `foundation/workflow.md` | foundation | 1 | Branching, local development loop, PRs, code reviews. |
|
|
60
|
-
| `foundation/phases
|
|
61
|
-
| `foundation/changelog.md` | foundation |
|
|
60
|
+
| `foundation/phases/` | foundation | Conditional | Phase-based project planning. Generated when the project has active development phases (greenfield or brownfield). Contains `index.md` (phase registry) and individual phase files. |
|
|
61
|
+
| `foundation/changelog.md` | foundation | Conditional | Historical releases log. Generated when a project reaches a formal release milestone or requires historical change tracking. |
|
|
62
62
|
| `development/testing.md` | development | 2 | QA policy, matrices, environments, gates, naming standards. |
|
|
63
63
|
| `development/api-contract.md` | development | 2 | API authentication, endpoints, payloads, webhooks, rate limits. |
|
|
64
64
|
| `development/database.md` | development | 2 | Schema, entity models, indexes, migrations, data dictionary. |
|
|
@@ -117,13 +117,23 @@ This catalog defines the baseline required domain-specific headings for each doc
|
|
|
117
117
|
- PR & Code Review
|
|
118
118
|
- Issue Tracking
|
|
119
119
|
|
|
120
|
-
### `foundation/phases.md`
|
|
120
|
+
### `foundation/phases/index.md`
|
|
121
|
+
- Project Type (Greenfield / Brownfield)
|
|
121
122
|
- Overall Timeline
|
|
123
|
+
- Phase Registry (table of all phases with status, links to individual files)
|
|
124
|
+
- How to Add New Phases
|
|
125
|
+
|
|
126
|
+
### `foundation/phases/phase-{N}[-description].md` (Greenfield naming)
|
|
127
|
+
### `foundation/phases/phase-P{N}[-description].md` (Brownfield naming)
|
|
128
|
+
- Phase Goal
|
|
129
|
+
- Timeline (Start → End)
|
|
122
130
|
- Feature Summary & Core Functions
|
|
123
|
-
- Sub-Functions
|
|
124
|
-
- Deprecated Features
|
|
125
|
-
- Phase Registry
|
|
131
|
+
- Sub-Functions / Tasks
|
|
126
132
|
- Sprint Tracker
|
|
133
|
+
- Acceptance Criteria
|
|
134
|
+
- Dependencies & Blockers
|
|
135
|
+
- Status (Not Started / In Progress / Complete)
|
|
136
|
+
- Deprecated Features
|
|
127
137
|
|
|
128
138
|
### `foundation/changelog.md`
|
|
129
139
|
- [Unreleased] (Added/Changed/Deprecated/Removed/Fixed/Security entries)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "EHA workflow - help"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# EHA Help & Tutorial
|
|
6
|
+
|
|
7
|
+
This is your interactive guide to using Eye Hate Agent (EHA).
|
|
8
|
+
|
|
9
|
+
## 1. Overview
|
|
10
|
+
Eye Hate Agent (EHA) standardizes human-agent collaboration through a unified Spec-Driven Development (SDD) contract, structured workflows, and specialist skills.
|
|
11
|
+
|
|
12
|
+
## 2. The 4-Layer Taxonomy
|
|
13
|
+
All project documentation is structured under a predictable 4-layer taxonomy:
|
|
14
|
+
- `docs/project-docs/foundation/` — PRD, Phases, Status, Changelog
|
|
15
|
+
- `docs/project-docs/operations/` — CI/CD, Deployment, Runbooks
|
|
16
|
+
- `docs/project-docs/development/` — Testing, Database, Architecture, API-Contract, UI-UX
|
|
17
|
+
- `docs/project-docs/technical-guidelines/` — Stable project/language/linting guidelines
|
|
18
|
+
|
|
19
|
+
## 3. Interactive Workflow Commands
|
|
20
|
+
Trigger these commands inside your chat window to coordinate development:
|
|
21
|
+
|
|
22
|
+
| Trigger Command | Purpose | When to Use |
|
|
23
|
+
| :--- | :--- | :--- |
|
|
24
|
+
| `/eha-bootstrap` | Initializes a brand-new documentation set | Run in repos with **no existing docs**. For truly empty repos, it will guide you to `/eha-discuss` first. |
|
|
25
|
+
| `/eha-refresh` | Synchronizes and migrates project documentation | Run in **active projects** to sync code with docs. |
|
|
26
|
+
| `/sdd-discuss` | Brainstorm specifications and API contracts | Run **before coding** to align specs. |
|
|
27
|
+
| `/sdd-execute` | Spec-driven code generation via TDD | Run **during implementation** to write tests/code. |
|
|
28
|
+
|
|
29
|
+
## 4. Specialist Skills
|
|
30
|
+
Invoke skills directly in your prompts (e.g. `use eha-api-design`):
|
|
31
|
+
- `eha-system-analysis` — Inspect architecture and codebase logic
|
|
32
|
+
- `eha-api-design` — Plan or refactor REST/GraphQL/gRPC APIs
|
|
33
|
+
- `eha-db-schema-design` — Design schemas and migrations
|
|
34
|
+
- `eha-ui-ux-design` / `eha-wireframing` — UI/UX wireframes and styling systems
|
|
35
|
+
- `eha-code-audit` — Multi-layered verification and codebase scanning
|
|
36
|
+
- `eha-parity-audit` — Automated drift analysis
|
|
37
|
+
- `eha-security-audit` — Dependency scanning and threat modeling
|
|
38
|
+
- `eha-system-tester` — Rigorous testing plans and case design
|
|
39
|
+
- `eha-devops-ci-cd` — Build pipeline configurations
|
|
40
|
+
- `eha-observability` — Logs, metrics, trace instrumentation, and error handling
|
|
41
|
+
- `eha-refactor` — Technical debt cleanup and optimization
|
|
42
|
+
|
|
43
|
+
## 5. Quick Start Instructions
|
|
44
|
+
If starting a new feature:
|
|
45
|
+
1. Run `/sdd-discuss` to brainstorm specs.
|
|
46
|
+
2. Update project docs to reflect the spec.
|
|
47
|
+
3. Run `/sdd-execute` to execute code via TDD.
|
|
48
|
+
4. Maintain `changelog.md` and `status.md`.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 6. Strict Output Contract (Token Economy)
|
|
53
|
+
When the user triggers this command, you **MUST** adhere to the following rules to conserve maximum tokens:
|
|
54
|
+
1. **Ultra-Concision:** Respond immediately with extremely short, direct answers. Do not write introductory filler (no "Sure, let's look at...", "Here is...", or greetings).
|
|
55
|
+
2. **Minimal Text:** Keep all explanations under 5 words per item. Rely strictly on the tables and bullet lists above.
|
|
56
|
+
3. **Redirection:** Conclude the output in exactly one short question: "Which workflow would you like to run next?"
|
|
@@ -21,7 +21,32 @@ Bootstrap is for repos with no documentation. For repos with existing docs (even
|
|
|
21
21
|
|
|
22
22
|
Should I switch to the Refresh workflow?"
|
|
23
23
|
|
|
24
|
-
**If NONE exist (only code and/or a bare root README):** Proceed to Step
|
|
24
|
+
**If NONE exist (only code and/or a bare root README):** Proceed to Step 0.5.
|
|
25
|
+
|
|
26
|
+
## Step 0.5: Greenfield Detection
|
|
27
|
+
|
|
28
|
+
After passing the Pre-Flight Check, classify the repository:
|
|
29
|
+
|
|
30
|
+
**Greenfield (Empty/Near-Empty Repo):**
|
|
31
|
+
If the repository has no meaningful source files (only a bare `package.json`, `.gitignore`, or scaffolding from a project generator with no custom code), this is a greenfield project.
|
|
32
|
+
|
|
33
|
+
STOP. Inform the user:
|
|
34
|
+
|
|
35
|
+
"This repository appears to be a new/greenfield project with no meaningful codebase yet.
|
|
36
|
+
|
|
37
|
+
Bootstrap works best when there's code to analyze for complexity detection.
|
|
38
|
+
For a brand-new project, I recommend running `/eha-discuss` first to:
|
|
39
|
+
- Define your project vision, tech stack, and architecture
|
|
40
|
+
- Plan your development phases
|
|
41
|
+
- Draft initial specs
|
|
42
|
+
|
|
43
|
+
After that, come back to Bootstrap with the discuss output to generate your docs.
|
|
44
|
+
|
|
45
|
+
Alternatively, if you already know your project's scope, tell me about it and I'll bootstrap directly."
|
|
46
|
+
|
|
47
|
+
**If the user provides project context directly:** Proceed to Step 1 using the user's description instead of codebase analysis for complexity detection.
|
|
48
|
+
|
|
49
|
+
**Brownfield with code (normal case):** Proceed to Step 1.
|
|
25
50
|
|
|
26
51
|
## Step 1: Complexity Detection (The Adaptive Taxonomy)
|
|
27
52
|
Analyze the workspace to determine its complexity by inspecting the codebase.
|
|
@@ -36,7 +61,9 @@ Based on the repository's complexity, you MUST recommend one of the following **
|
|
|
36
61
|
- *Files Generated:* Everything in Tier 1 PLUS `development/testing.md`, `development/database.md`, `development/ui-ux.md`, `development/api-contract.md`, `operations/ci-cd.md`.
|
|
37
62
|
3. **Tier 3: Enterprise Profile**
|
|
38
63
|
- *Target:* Large-scale platforms, regulated systems, monorepos.
|
|
39
|
-
- *Files Generated:* Everything in Tier 2 PLUS `operations/governance.md`, `operations/security-compliance.md` (merged), `operations/observability-error-handling.md` (merged), `operations/production-runbook.md`, `development/internationalization.md
|
|
64
|
+
- *Files Generated:* Everything in Tier 2 PLUS `operations/governance.md`, `operations/security-compliance.md` (merged), `operations/observability-error-handling.md` (merged), `operations/production-runbook.md`, `development/internationalization.md`.
|
|
65
|
+
|
|
66
|
+
*Note: `foundation/phases/` (phases folder) and `foundation/changelog.md` (changelog) are offered independently via Step 2.5, not tied to any tier.*
|
|
40
67
|
|
|
41
68
|
**STOP AND ASK:** Present your analysis of the repo's complexity and ask the user: *"Which Taxonomy Tier should I generate?"* Do not proceed until the user approves a tier.
|
|
42
69
|
|
|
@@ -48,13 +75,55 @@ Once the user approves a tier, strictly follow the 4-layer file structure (`foun
|
|
|
48
75
|
2. Create project-specific truth in `docs/project-docs/`, not in the reusable prompt output itself.
|
|
49
76
|
3. Do not invent details. Mark uncertain facts as `TBD` or `Assumption`.
|
|
50
77
|
4. If reverse-engineering from code, explicitly state "Inferred from codebase" in the generated document until the user confirms it.
|
|
51
|
-
5. **DO NOT generate files outside the approved tier.**
|
|
78
|
+
5. **DO NOT generate files outside the approved tier unless explicitly chosen during the Step 2.5 conditional interview.**
|
|
79
|
+
|
|
80
|
+
## Step 2.5: Active Development, Phases, & Changelog Interview
|
|
81
|
+
After generating the tier-selected documents, assess whether the project needs phase-based planning or changelog tracking:
|
|
82
|
+
|
|
83
|
+
### For Greenfield Projects:
|
|
84
|
+
The project is obviously in active development. Ask the user:
|
|
85
|
+
"This is a new project. Would you like to set up development phases?
|
|
86
|
+
If yes, describe the phases you envision from start to launch.
|
|
87
|
+
Example: Phase 1: Research, Phase 2: API Development, Phase 3: UI/UX, Phase 4: Launch."
|
|
88
|
+
|
|
89
|
+
If the user provides phases:
|
|
90
|
+
- Create `foundation/phases/index.md` with the phase registry.
|
|
91
|
+
- Create individual phase files using greenfield naming: `phase-{N}[-description].md` (e.g., `phase-1-research.md`, `phase-2-api.md`).
|
|
92
|
+
- Populate each with the user's described scope and `TBD` for details not yet known.
|
|
93
|
+
|
|
94
|
+
If the user declines: Skip phases entirely.
|
|
95
|
+
|
|
96
|
+
Additionally, ask the user:
|
|
97
|
+
"Would you like to set up a changelog (`foundation/changelog.md`) to track historical releases?"
|
|
98
|
+
If yes, generate a boilerplate `foundation/changelog.md` with an initial unreleased section.
|
|
99
|
+
|
|
100
|
+
### For Brownfield Projects (with existing code):
|
|
101
|
+
Analyze the codebase for active development signals:
|
|
102
|
+
- Recent commits, open branches, TODO comments.
|
|
103
|
+
- Sprint-style branch names (`sprint-*`, `release-*`, `feat/*`).
|
|
104
|
+
- Issue tracker references in commits or code.
|
|
105
|
+
- CI/CD pipeline activity.
|
|
106
|
+
|
|
107
|
+
If active development signals are found, ask the user:
|
|
108
|
+
"This project appears to be in active development. Would you like to set up phase-based planning to track your development cycles?
|
|
109
|
+
If yes, describe the current and upcoming phases (or I can infer from your codebase)."
|
|
110
|
+
|
|
111
|
+
If the user provides phases:
|
|
112
|
+
- Create `foundation/phases/index.md` with the phase registry.
|
|
113
|
+
- Create individual phase files using brownfield naming: `phase-P{N}[-description].md` (e.g., `phase-P1-refactor.md`, `phase-P2-auth.md`).
|
|
114
|
+
|
|
115
|
+
If the user declines or no active development signals: Skip phases entirely.
|
|
116
|
+
|
|
117
|
+
Additionally, check for release signals (e.g., git tags, version updates in `package.json`, release branches). If found, ask the user:
|
|
118
|
+
"Would you like to set up a changelog (`foundation/changelog.md`) to track historical releases?"
|
|
119
|
+
If yes, generate `foundation/changelog.md` populated with current version information.
|
|
52
120
|
|
|
53
121
|
## Final Pass
|
|
54
122
|
Before finishing, check that:
|
|
55
123
|
1. No files are generated in the root of `project-docs/` except `index.md` and `getting-started.md`. Everything else must be in its respective subfolder.
|
|
56
124
|
2. `foundation/architecture.md` and `development/testing.md` do not conflict.
|
|
57
|
-
3. The generated documents strictly match the approved Taxonomy Tier and structural definitions cataloged in the master registry.
|
|
125
|
+
3. The generated documents strictly match the approved Taxonomy Tier, conditional choices, and structural definitions cataloged in the master registry.
|
|
126
|
+
4. If phases were generated, verify `foundation/phases/index.md` correctly registry-links to all individual phase files (`phase-*.md`), and each phase file has complete stable headings.
|
|
58
127
|
|
|
59
128
|
## Inputs
|
|
60
129
|
Use the project brief, codebase, and constraints provided below to begin your analysis.
|
|
@@ -17,6 +17,8 @@ Before refreshing, classify the repository's documentation state:
|
|
|
17
17
|
| **Non-SDD Docs** | `docs/` exists with unstructured markdown (no stable headings, no taxonomy) | Conversion refresh: treat as legacy input, create SDD docs from content + codebase |
|
|
18
18
|
| **Mixed** | `docs/project-docs/` exists AND legacy/reference folders also exist | Hybrid refresh: update active SDD docs + migrate unmapped legacy content + codebase |
|
|
19
19
|
|
|
20
|
+
*Note: For Active SDD and Mixed states, also check for the existence of `foundation/phases/` directory and `foundation/changelog.md` to determine if they need active refreshment.*
|
|
21
|
+
|
|
20
22
|
For **Legacy Only** and **Non-SDD Docs** states, auto-detect the Taxonomy Tier:
|
|
21
23
|
- Examine the breadth and depth of the existing documentation + codebase complexity.
|
|
22
24
|
- If content covers only core concerns (identity, architecture, status) → Tier 1 (Lite).
|
|
@@ -42,10 +44,10 @@ Proceed to the applicable action path.
|
|
|
42
44
|
9. If the change affects an optional regular doc or its metadata, update `docs/project-docs/index.md` when present.
|
|
43
45
|
10. If the change affects domain-specific technical guidance, update the owning guideline and `technical-guidelines/index.md` when present.
|
|
44
46
|
11. When legacy or reference docs are being mapped into the active owner-doc set, classify them by the durable concern they govern rather than by the legacy folder or filename; legacy names are hints only.
|
|
45
|
-
12. Normalize non-standard legacy labels by meaning when they map cleanly to an active owner. For example, `epic`, `milestone`, or `roadmap` material may map to `docs/project-docs/foundation/phases
|
|
47
|
+
12. Normalize non-standard legacy labels by meaning when they map cleanly to an active owner. For example, `epic`, `milestone`, or `roadmap` material may map to `docs/project-docs/foundation/phases/`, while `protocol`, `procedure`, `policy`, or `standard` material may map to `docs/project-docs/technical-guidelines/` when the content is domain-specific technical guidance.
|
|
46
48
|
13. When legacy or reference docs show that a justified optional doc should become active under `docs/project-docs/`, promote it into the active owner-doc set instead of leaving it stranded in reference-only folders.
|
|
47
49
|
14. When legacy or reference docs contain domain-specific technical guidance that is still valid, create or update the relevant files under `docs/project-docs/technical-guidelines/` and create `technical-guidelines/index.md` when any guideline becomes active.
|
|
48
|
-
15. When legacy or reference docs contain explicit phased planning, epic tracking, or execution-map detail that should stay active, create or update `docs/project-docs/foundation/phases
|
|
50
|
+
15. When legacy or reference docs contain explicit phased planning, epic tracking, or execution-map detail that should stay active, create or update `docs/project-docs/foundation/phases/` and register the active optional doc directory in `docs/project-docs/index.md`.
|
|
49
51
|
16. If a legacy artifact could plausibly map to more than one active owner, or if preserving the legacy label may be intentional, ask the user for direction instead of guessing.
|
|
50
52
|
17. Preserve valuable legacy sections (e.g., 'Decision Rationale') that do not exist in the starter templates. Decide whether this information belongs as a new custom section in an existing document or warrants a new separate file entirely. Ask the user if the best approach is ambiguous. Do not discard domain-specific knowledge just because it lacks a standard template heading.
|
|
51
53
|
18. When asking for that direction, prefer a concise question that states the inferred owner and the fallback choices. Example: `I found legacy "protocol" docs that look like technical guidance. Should I 1. skip them, 2. migrate them into active guideline docs, or 3. preserve "protocol" as a project-specific doc type?`
|
|
@@ -64,6 +66,16 @@ Proceed to the applicable action path.
|
|
|
64
66
|
- i18n config, locale files → development/internationalization
|
|
65
67
|
- README, inline comments, decision rationale → foundation/prd, architecture
|
|
66
68
|
23. Mark all codebase-inferred facts as `Inferred from codebase` until the user confirms them.
|
|
69
|
+
24. **Active Development & Phases Detection.** When refreshing a project that does not yet have `foundation/phases/`, check for active development signals (recent commits, sprint branches, open milestones, TODO density). If signals are found, prompt the user:
|
|
70
|
+
"This project appears to be in active development but has no phase-based planning docs.
|
|
71
|
+
Would you like to set up development phases to track your sprints and milestones?
|
|
72
|
+
If yes, describe the current and upcoming phases (or I can infer from your codebase)."
|
|
73
|
+
If the user agrees, create `foundation/phases/index.md` and individual phase files using brownfield naming (`phase-P{N}[-description].md`, e.g., `phase-P1-refactor.md`).
|
|
74
|
+
25. **Phases Update Workflow.** When `foundation/phases/` already exists, treat it as a living operational document:
|
|
75
|
+
- Update sprint tracker in the active phase file when sprint-related changes are detected.
|
|
76
|
+
- Mark completed phases by updating their status.
|
|
77
|
+
- If the user requests a new phase, create the next numbered phase file and update the index.
|
|
78
|
+
- Cross-reference `foundation/status.md` epics/roadmap with phase progress.
|
|
67
79
|
|
|
68
80
|
### Review Sequence
|
|
69
81
|
|
|
@@ -87,7 +99,7 @@ For each mapping below, also inspect the corresponding codebase artifacts (sourc
|
|
|
87
99
|
- stack or dependency changes → `foundation/architecture.md`, `development/testing.md`
|
|
88
100
|
- feature scope changes → `foundation/prd.md`, `foundation/status.md`
|
|
89
101
|
- detailed requirements or acceptance changes → `foundation/prd.md`, `foundation/status.md`
|
|
90
|
-
- workflow or roadmap changes → `foundation/status.md`, `foundation/phases
|
|
102
|
+
- workflow or roadmap changes → `foundation/status.md`, `foundation/phases/` index/phase files, workflow docs if present
|
|
91
103
|
- validation / CI changes → `development/testing.md`, `getting-started.md`
|
|
92
104
|
- production environment, rollout, rollback, or smoke-check changes → `operations/production-runbook.md`, `foundation/architecture.md`, `development/testing.md`
|
|
93
105
|
- API or integration changes → relevant API / integration docs plus `foundation/architecture.md`
|
|
@@ -96,9 +108,9 @@ For each mapping below, also inspect the corresponding codebase artifacts (sourc
|
|
|
96
108
|
- optional or conditional doc inventory changes → `docs/project-docs/index.md` plus the affected optional owner docs
|
|
97
109
|
- cross-cutting technical conventions or implementation rules → relevant `technical-guidelines/*.md`, `technical-guidelines/index.md`, and any summarizing core docs that reference them
|
|
98
110
|
- documentation-system migration from legacy docs → active owner docs under `docs/project-docs/` first, with `docs-legacy/`, `docs-old/`, or other clearly named archive/reference folders used only as source material
|
|
99
|
-
- semantic legacy-name normalization → map legacy names by content, for example `epic` or `roadmap` material to `foundation/phases
|
|
111
|
+
- semantic legacy-name normalization → map legacy names by content, for example `epic` or `roadmap` material to `foundation/phases/` and `protocol` or `standard` material to `technical-guidelines/` when their governed concern matches those owners
|
|
100
112
|
- legacy technical-guidance promotion → `docs/project-docs/technical-guidelines/*.md`, `technical-guidelines/index.md`, and any summarizing core docs that now depend on those active guidelines
|
|
101
|
-
- legacy phased-planning promotion → `docs/project-docs/foundation/phases
|
|
113
|
+
- legacy phased-planning promotion → `docs/project-docs/foundation/phases/`, `foundation/status.md`, and `docs/project-docs/index.md`
|
|
102
114
|
|
|
103
115
|
## Output Contract
|
|
104
116
|
|
|
@@ -32,7 +32,11 @@ Structure incoming requests before acting to reduce rework and catch ambiguity e
|
|
|
32
32
|
5. Treat a user-provided list as full scope unless the user changes it.
|
|
33
33
|
6. Confirm if the plan could materially change scope, output, or direction.
|
|
34
34
|
7. Then proceed.
|
|
35
|
-
- **3.2** **Lite Mode (Micro-Tasks):** Skip the 7-step intake checklist and SDD requirements
|
|
35
|
+
- **3.2** **Lite Mode (Micro-Tasks):** Skip the 7-step intake checklist and SDD requirements when the task is a trivial, isolated edit (e.g., typo fix, single UI tweak, comment addition). Lite Mode is triggered by:
|
|
36
|
+
1. The user prefixing their request with "Lite task:" (e.g., "Lite task: fix the typo in README").
|
|
37
|
+
2. The agent contextually recognizing an obviously trivial micro-task from the request itself (e.g., "fix that typo", "change the button color to blue").
|
|
38
|
+
In Lite Mode, bypass PRD validation and the 7-step checklist. Execute immediately.
|
|
39
|
+
Do NOT apply Lite Mode to tasks that are architectural, multi-file, or scope-changing — even if the user phrases them casually.
|
|
36
40
|
|
|
37
41
|
## 4. Docs, Verification, and Completion
|
|
38
42
|
|
|
@@ -98,7 +98,7 @@ Every mismatch should be classified as one of:
|
|
|
98
98
|
|
|
99
99
|
When evaluating legacy material, classify it by the durable concern it governs rather than by its legacy name or path. Treat names such as `epic`, `milestone`, `roadmap`, `protocol`, `procedure`, `policy`, or `standard` as hints only.
|
|
100
100
|
|
|
101
|
-
Report likely mappings when content points to an active owner even if naming differs, such as phased-planning content that should map to `foundation/phases
|
|
101
|
+
Report likely mappings when content points to an active owner even if naming differs, such as phased-planning content that should map to `foundation/phases/` or technical-rule content that should map to `technical-guidelines/`.
|
|
102
102
|
|
|
103
103
|
### Step 4 — Apply structural drift rules
|
|
104
104
|
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@ const EHA_COMPACT_RULES = `## EHA Project Doc Rules
|
|
|
19
19
|
|
|
20
20
|
**Legacy/Reference Docs:** Treat folders named \`archive/\`, \`docs-legacy/\`, or \`reference/\` as secondary migration input only, never as authoritative active truth.
|
|
21
21
|
|
|
22
|
-
**Mandatory core docs:** \`index.md\`, \`getting-started.md\`, \`foundation/prd.md\`, \`foundation/architecture.md\`, \`foundation/workflow.md\`, \`foundation/status.md\`, \`
|
|
22
|
+
**Mandatory core docs:** \`index.md\`, \`getting-started.md\`, \`foundation/prd.md\`, \`foundation/architecture.md\`, \`foundation/workflow.md\`, \`foundation/status.md\`, \`operations/ci-cd.md\`, \`operations/production-runbook.md\`, \`development/testing.md\`, \`development/api-contract.md\`, \`development/database.md\`, \`development/ui-ux.md\`.
|
|
23
23
|
|
|
24
24
|
**Authority order:** project docs → codebase → agent judgment. When docs conflict, the owning doc wins. When code and docs conflict and authority is unclear, surface the conflict and ask the user — do not guess.
|
|
25
25
|
|
|
@@ -31,7 +31,7 @@ const EHA_COMPACT_RULES = `## EHA Project Doc Rules
|
|
|
31
31
|
- Dev loop and PR process → \`foundation/workflow.md\`
|
|
32
32
|
- Verification commands and quality gates → \`development/testing.md\`
|
|
33
33
|
- Execution plan and progress → \`foundation/status.md\`
|
|
34
|
-
- Sprint tracking and backlogs → \`foundation/phases
|
|
34
|
+
- Sprint tracking and backlogs → \`foundation/phases/\`
|
|
35
35
|
- Optional doc inventory → \`index.md\`
|
|
36
36
|
- Domain-specific technical rules → \`technical-guidelines/\` (Create these only for durable cross-cutting rules; avoid placeholders).
|
|
37
37
|
|
|
@@ -213,11 +213,6 @@ const RUNTIME_ADAPTERS = {
|
|
|
213
213
|
content: buildClaudeCommandFile(workflow),
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
-
files.push({
|
|
217
|
-
relativePath: path.join('.claude', 'commands', 'eha', 'README.md'),
|
|
218
|
-
content: `# EHA Claude commands\n\nGenerated by \`eha init\`. Use \`/eha-bootstrap\`, \`/eha-refresh\`, \`/sdd-discuss\`, or \`/sdd-execute\` in Claude.\n`,
|
|
219
|
-
});
|
|
220
|
-
|
|
221
216
|
for (const skill of skills) {
|
|
222
217
|
files.push({
|
|
223
218
|
relativePath: path.join('.claude', 'skills', `eha-${skill.commandName}.md`),
|
|
@@ -277,11 +272,6 @@ const RUNTIME_ADAPTERS = {
|
|
|
277
272
|
content: buildAntigravityCommandFile(workflow),
|
|
278
273
|
});
|
|
279
274
|
}
|
|
280
|
-
files.push({
|
|
281
|
-
relativePath: path.join('.agents', 'commands', 'eha', 'README.md'),
|
|
282
|
-
content: `# EHA Antigravity commands\n\nGenerated by \`eha init\`. Call the generated skills directly.\n`,
|
|
283
|
-
});
|
|
284
|
-
|
|
285
275
|
for (const skill of skills) {
|
|
286
276
|
files.push({
|
|
287
277
|
relativePath: path.join('.agents', 'skills', `eha-${skill.commandName}`, 'SKILL.md'),
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
const path = require('node:path');
|
|
2
2
|
|
|
3
3
|
const WORKFLOW_DEFINITIONS = {
|
|
4
|
+
help: {
|
|
5
|
+
id: 'help',
|
|
6
|
+
commandName: 'help',
|
|
7
|
+
description: 'Get help and tutorial on EHA workflows and philosophy',
|
|
8
|
+
repoRelativePath: path.join('docs', 'templates', 'reusable-prompts', '00-eha-help.md'),
|
|
9
|
+
},
|
|
4
10
|
bootstrap: {
|
|
5
11
|
id: 'bootstrap',
|
|
6
12
|
commandName: 'bootstrap',
|