@sallmarta/eye-hate-agent 1.0.7 → 1.0.9
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 +45 -5
- package/docs/templates/project-docs-template/index.md +16 -6
- package/docs/templates/reusable-prompts/00-eha-help.md +1 -1
- package/docs/templates/reusable-prompts/00-project-docs-bootstrap.md +77 -4
- package/docs/templates/reusable-prompts/00-project-docs-refresh.md +39 -14
- 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/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
|
|
|
@@ -43,15 +44,47 @@ Once initialized, EHA projects a series of interactive workflows directly into y
|
|
|
43
44
|
|
|
44
45
|
---
|
|
45
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
|
+
|
|
46
79
|
## EHA CLI Command
|
|
47
80
|
|
|
48
81
|
The EHA CLI provides a lightweight, frictionless setup and maintenance toolbelt:
|
|
49
82
|
|
|
50
83
|
| Command | Primary Purpose |
|
|
51
84
|
| :--- | :--- |
|
|
52
|
-
| `eha init`
|
|
53
|
-
| `eha init <agent>` | Directly initiates the EHA project setup for a specific agent (e.g. `copilot`, `claude`, `antigravity`) |
|
|
54
|
-
| `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. |
|
|
55
88
|
| `eha remove [agent]` | Safely deletes EHA's generated contract files for the specified agent (or all agents if omitted), along with configuration files. |
|
|
56
89
|
|
|
57
90
|
---
|
|
@@ -92,4 +125,11 @@ Eye Hate Agent is built upon a core set of operational beliefs designed to optim
|
|
|
92
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.
|
|
93
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.
|
|
94
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.
|
|
95
|
-
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
|
+
|
|
@@ -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)
|
|
@@ -21,7 +21,7 @@ Trigger these commands inside your chat window to coordinate development:
|
|
|
21
21
|
|
|
22
22
|
| Trigger Command | Purpose | When to Use |
|
|
23
23
|
| :--- | :--- | :--- |
|
|
24
|
-
| `/eha-bootstrap` | Initializes a brand-new documentation set | Run
|
|
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
25
|
| `/eha-refresh` | Synchronizes and migrates project documentation | Run in **active projects** to sync code with docs. |
|
|
26
26
|
| `/sdd-discuss` | Brainstorm specifications and API contracts | Run **before coding** to align specs. |
|
|
27
27
|
| `/sdd-execute` | Spec-driven code generation via TDD | Run **during implementation** to write tests/code. |
|
|
@@ -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,59 @@ 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
|
+
You **MUST** check all four active development signals. Do NOT skip this step:
|
|
102
|
+
|
|
103
|
+
1. **Recent commits** — run `git log --oneline -20` or equivalent; if there are commits within the last 14 days, OR 10+ commits within the last 30 days, this signal is positive.
|
|
104
|
+
2. **Sprint/feature branches** — run `git branch -a` and look for naming patterns like `sprint/`, `phase/`, `release/`, `feature/`, `feat/`, `dev/`.
|
|
105
|
+
3. **Planning artifacts** — check for `TODO.md`, `ROADMAP.md`, `.github/ISSUE_TEMPLATE/`, issue tracker references in recent commits (e.g., `#123`, `fixes #`, `closes #`), or project board configs.
|
|
106
|
+
4. **TODO density** — grep the codebase for `TODO`, `FIXME`, `HACK` comments; if count ≥ 5, this signal is positive.
|
|
107
|
+
|
|
108
|
+
If **any one** signal is positive, you **MUST** ask the user:
|
|
109
|
+
"This project shows active development signals ([list which signals were positive and what was found]).
|
|
110
|
+
Would you like to set up `foundation/phases/` to track your development cycles?
|
|
111
|
+
If yes, describe the current and upcoming phases (or I can infer from your codebase)."
|
|
112
|
+
|
|
113
|
+
If the user provides phases:
|
|
114
|
+
- Create `foundation/phases/index.md` with the phase registry.
|
|
115
|
+
- Create individual phase files using brownfield naming: `phase-P{N}[-description].md` (e.g., `phase-P1-refactor.md`, `phase-P2-auth.md`).
|
|
116
|
+
|
|
117
|
+
If the user declines: Skip phases entirely.
|
|
118
|
+
If all four signals are negative: Skip the phases prompt but note in your output that all four active development signals were negative and no phases were offered.
|
|
119
|
+
|
|
120
|
+
Additionally, check for release signals (e.g., git tags, version updates in `package.json`, release branches). If found, ask the user:
|
|
121
|
+
"Would you like to set up a changelog (`foundation/changelog.md`) to track historical releases?"
|
|
122
|
+
If yes, generate `foundation/changelog.md` populated with current version information.
|
|
52
123
|
|
|
53
124
|
## Final Pass
|
|
54
125
|
Before finishing, check that:
|
|
55
126
|
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
127
|
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.
|
|
128
|
+
3. The generated documents strictly match the approved Taxonomy Tier, conditional choices, and structural definitions cataloged in the master registry.
|
|
129
|
+
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.
|
|
130
|
+
5. For brownfield projects: if any active development signal was positive during Step 2.5, confirm that the user was prompted about setting up phases. If this prompt was skipped, **stop and prompt the user now before finishing**.
|
|
58
131
|
|
|
59
132
|
## Inputs
|
|
60
133
|
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,21 +66,42 @@ 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 (MANDATORY).** When refreshing a project that does not yet have `foundation/phases/`, you **MUST** check all four active development signals before proceeding to doc refresh. Do NOT skip this step. The signals are:
|
|
70
|
+
|
|
71
|
+
1. **Recent commits** — run `git log --oneline -20` or equivalent; if there are commits within the last 14 days, OR 10+ commits within the last 30 days, this signal is positive.
|
|
72
|
+
2. **Sprint/feature branches** — run `git branch -a` and look for naming patterns like `sprint/`, `phase/`, `release/`, `feature/`, `feat/`, `dev/`.
|
|
73
|
+
3. **Planning artifacts** — check for `TODO.md`, `ROADMAP.md`, `.github/ISSUE_TEMPLATE/`, issue tracker references in recent commits (e.g., `#123`, `fixes #`, `closes #`), or project board configs.
|
|
74
|
+
4. **TODO density** — grep the codebase for `TODO`, `FIXME`, `HACK` comments; if count ≥ 5, this signal is positive.
|
|
75
|
+
|
|
76
|
+
If **any one** signal is positive, you **MUST** prompt the user:
|
|
77
|
+
"This project shows active development signals ([list which signals were positive and what was found]).
|
|
78
|
+
Would you like to set up `foundation/phases/` to track your development cycles?
|
|
79
|
+
If yes, describe the current and upcoming phases (or I can infer from your codebase)."
|
|
80
|
+
|
|
81
|
+
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`).
|
|
82
|
+
If the user declines, skip phases creation entirely — but still report the detection outcome in the Output Contract.
|
|
83
|
+
If all four signals are negative, skip the phases prompt but note in your output that all four active development signals were negative and no phases were offered.
|
|
84
|
+
25. **Phases Update Workflow.** When `foundation/phases/` already exists, treat it as a living operational document:
|
|
85
|
+
- Update sprint tracker in the active phase file when sprint-related changes are detected.
|
|
86
|
+
- Mark completed phases by updating their status.
|
|
87
|
+
- If the user requests a new phase, create the next numbered phase file and update the index.
|
|
88
|
+
- Cross-reference `foundation/status.md` epics/roadmap with phase progress.
|
|
67
89
|
|
|
68
90
|
### Review Sequence
|
|
69
91
|
|
|
70
92
|
1. Run Step 0 (Doc State Detection).
|
|
71
93
|
2. Read the change summary (if provided) or the user's intent.
|
|
72
94
|
3. **Scan the codebase** — inspect source code, configs, tests, CI/CD pipelines, and package manifests for current truth. This step is NOT optional.
|
|
73
|
-
4.
|
|
74
|
-
5. Read
|
|
75
|
-
6. Read
|
|
76
|
-
7. Read
|
|
77
|
-
8.
|
|
78
|
-
9.
|
|
79
|
-
10.
|
|
80
|
-
11. Refresh
|
|
81
|
-
12.
|
|
95
|
+
4. **Phases Detection Gate** — If `foundation/phases/` does not exist, execute Rule 24 (Active Development & Phases Detection) now. Run all four signal checks using the codebase data from step 3. If any signal is positive, prompt the user about setting up phases before continuing. If `foundation/phases/` already exists, proceed to step 5.
|
|
96
|
+
5. Read the owning project docs (if Active SDD or Mixed state).
|
|
97
|
+
6. Read `docs/project-docs/index.md` and `docs/project-docs/technical-guidelines/index.md` when present.
|
|
98
|
+
7. Read legacy/reference folders when present.
|
|
99
|
+
8. Read relevant guideline docs when the change touches technical rules.
|
|
100
|
+
9. Identify impacted dependent docs.
|
|
101
|
+
10. Cross-reference codebase findings against doc/legacy claims — resolve conflicts by prompting the user (see rule 21).
|
|
102
|
+
11. Refresh/create the owning docs first (using combined codebase + docs evidence).
|
|
103
|
+
12. Refresh summary or index docs second.
|
|
104
|
+
13. Run a consistency pass.
|
|
82
105
|
|
|
83
106
|
## Ownership Examples
|
|
84
107
|
|
|
@@ -87,7 +110,7 @@ For each mapping below, also inspect the corresponding codebase artifacts (sourc
|
|
|
87
110
|
- stack or dependency changes → `foundation/architecture.md`, `development/testing.md`
|
|
88
111
|
- feature scope changes → `foundation/prd.md`, `foundation/status.md`
|
|
89
112
|
- detailed requirements or acceptance changes → `foundation/prd.md`, `foundation/status.md`
|
|
90
|
-
- workflow or roadmap changes → `foundation/status.md`, `foundation/phases
|
|
113
|
+
- workflow or roadmap changes → `foundation/status.md`, `foundation/phases/` index/phase files, workflow docs if present
|
|
91
114
|
- validation / CI changes → `development/testing.md`, `getting-started.md`
|
|
92
115
|
- production environment, rollout, rollback, or smoke-check changes → `operations/production-runbook.md`, `foundation/architecture.md`, `development/testing.md`
|
|
93
116
|
- API or integration changes → relevant API / integration docs plus `foundation/architecture.md`
|
|
@@ -96,9 +119,9 @@ For each mapping below, also inspect the corresponding codebase artifacts (sourc
|
|
|
96
119
|
- optional or conditional doc inventory changes → `docs/project-docs/index.md` plus the affected optional owner docs
|
|
97
120
|
- cross-cutting technical conventions or implementation rules → relevant `technical-guidelines/*.md`, `technical-guidelines/index.md`, and any summarizing core docs that reference them
|
|
98
121
|
- 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
|
|
122
|
+
- 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
123
|
- 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
|
|
124
|
+
- legacy phased-planning promotion → `docs/project-docs/foundation/phases/`, `foundation/status.md`, and `docs/project-docs/index.md`
|
|
102
125
|
|
|
103
126
|
## Output Contract
|
|
104
127
|
|
|
@@ -110,6 +133,7 @@ Your result should state:
|
|
|
110
133
|
4. any remaining consistency risks or open questions
|
|
111
134
|
5. which codebase-vs-doc conflicts were resolved and how (per user direction)
|
|
112
135
|
6. the auto-detected tier (for Legacy Only / Non-SDD states), if applicable
|
|
136
|
+
7. whether active development signals were detected, which signals were positive/negative, and whether the user was prompted about `foundation/phases/` setup (include the user's response: accepted, declined, or not yet answered)
|
|
113
137
|
|
|
114
138
|
## Final Pass
|
|
115
139
|
|
|
@@ -120,6 +144,7 @@ Before finishing, check that:
|
|
|
120
144
|
3. no stale summary remains in `foundation/status.md`, `docs/project-docs/index.md`, `technical-guidelines/index.md`, or other index docs
|
|
121
145
|
4. codebase-inferred facts are clearly marked and do not silently override user-confirmed truths
|
|
122
146
|
5. the auto-detected tier (for Legacy Only / Non-SDD states) is stated in the output so the user can override it if needed
|
|
147
|
+
6. if `foundation/phases/` did not exist at the start of this refresh and any active development signal was positive, confirm that the user was prompted about setting up phases — if this prompt was skipped, **stop and prompt the user now before finishing**
|
|
123
148
|
|
|
124
149
|
## Inputs
|
|
125
150
|
|
|
@@ -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'),
|