@sallmarta/eye-hate-agent 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +52 -28
  2. package/docs/templates/project-docs-template/index.md +192 -50
  3. package/docs/templates/project-docs-template/technical-guidelines/index.md +50 -21
  4. package/docs/templates/reusable-prompts/00-project-docs-bootstrap.md +26 -43
  5. package/docs/templates/reusable-prompts/00-project-docs-parity.md +1 -1
  6. package/docs/templates/reusable-prompts/00-project-docs-refresh.md +9 -7
  7. package/docs/templates/reusable-prompts/01-sdd-execute.md +1 -1
  8. package/docs/templates/reusable-prompts/02-sdd-discuss.md +1 -1
  9. package/docs/templates/rules/agent-rules.md +1 -1
  10. package/docs/templates/skills/{architecture/api-design → api-design}/SKILL.md +14 -25
  11. package/docs/templates/skills/{auditing/full-verification → code-audit}/SKILL.md +35 -53
  12. package/docs/templates/skills/db-schema-design/SKILL.md +120 -0
  13. package/docs/templates/skills/devops-ci-cd/SKILL.md +99 -0
  14. package/docs/templates/skills/observability/SKILL.md +99 -0
  15. package/docs/templates/skills/{auditing/parity → parity-audit}/SKILL.md +24 -50
  16. package/docs/templates/skills/refactor/SKILL.md +100 -0
  17. package/docs/templates/skills/security-audit/SKILL.md +149 -0
  18. package/docs/templates/skills/{architecture/system-analysis → system-analysis}/SKILL.md +19 -41
  19. package/docs/templates/skills/{engineering/test-authoring → system-tester}/SKILL.md +28 -222
  20. package/docs/templates/skills/ui-ux-design/SKILL.md +102 -0
  21. package/docs/templates/skills/wireframing/SKILL.md +88 -0
  22. package/package.json +1 -1
  23. package/src/engine/index.js +2 -0
  24. package/src/engine/install.js +1 -3
  25. package/src/engine/runtime-adapters.js +7 -4
  26. package/src/engine/skill-registry.js +37 -32
  27. package/docs/templates/project-docs-template/foundation/architecture.md +0 -79
  28. package/docs/templates/project-docs-template/foundation/changelog.md +0 -53
  29. package/docs/templates/project-docs-template/foundation/feature-inventory.md +0 -46
  30. package/docs/templates/project-docs-template/foundation/phases.md +0 -60
  31. package/docs/templates/project-docs-template/foundation/prd.md +0 -69
  32. package/docs/templates/project-docs-template/foundation/status.md +0 -57
  33. package/docs/templates/project-docs-template/foundation/workflow.md +0 -59
  34. package/docs/templates/project-docs-template/getting-started.md +0 -52
  35. package/docs/templates/project-docs-template/operations/ci-cd.md +0 -56
  36. package/docs/templates/project-docs-template/operations/compliance.md +0 -46
  37. package/docs/templates/project-docs-template/operations/governance.md +0 -46
  38. package/docs/templates/project-docs-template/operations/observability.md +0 -53
  39. package/docs/templates/project-docs-template/operations/production-runbook.md +0 -62
  40. package/docs/templates/project-docs-template/operations/security.md +0 -49
  41. package/docs/templates/project-docs-template/technical/api-contract.md +0 -49
  42. package/docs/templates/project-docs-template/technical/database.md +0 -59
  43. package/docs/templates/project-docs-template/technical/error-handling.md +0 -54
  44. package/docs/templates/project-docs-template/technical/internationalization.md +0 -46
  45. package/docs/templates/project-docs-template/technical/testing.md +0 -57
  46. package/docs/templates/project-docs-template/technical/ui-ux.md +0 -68
  47. package/docs/templates/skills/architecture/db-schema-design/SKILL.md +0 -14
  48. package/docs/templates/skills/auditing/security-audit/SKILL.md +0 -170
  49. package/docs/templates/skills/engineering/refactor-specialist/SKILL.md +0 -13
  50. package/docs/templates/skills/engineering/ui-ux-implementation/SKILL.md +0 -13
  51. package/docs/templates/skills/operations/ci-cd-authoring/SKILL.md +0 -13
  52. package/docs/templates/skills/operations/observability-setup/SKILL.md +0 -13
package/README.md CHANGED
@@ -1,67 +1,91 @@
1
1
  # Eye Hate Agent (EHA)
2
2
 
3
- A CLI engine that generates a shared set of rules, skills, and documentation workflows for AI agents (Claude, GitHub Copilot) directly into your repository.
3
+ A simple **Spec-Driven Development (SDD)**. Unified set of rules, specialist skills, and dynamic project documentation workflows, standardizing how AI coding agents receive instructions to make collaborative development completely predictable and highly efficient.
4
4
 
5
5
  ---
6
6
 
7
- ## Quick Start
7
+ ## Get Started
8
8
 
9
9
  ### 1. Initialize EHA in your project
10
- Run the wizard in your project root to generate the required agent instructions:
11
-
10
+ Run directly in **your project root**:
11
+ ```bash
12
+ $ npx @sallmarta/eye-hate-agent
13
+ ```
14
+ *Or install **globally** and run it:*
12
15
  ```bash
13
- npx @sallmarta/eye-hate-agent
16
+ $ npm i -g @sallmarta/eye-hate-agent
17
+ $ eha
14
18
  ```
15
- *(Or install globally: `npm i -g @sallmarta/eye-hate-agent` and run `eha`)*
16
19
 
17
20
  ### 2. Trigger your agent
18
- Once generated, the files are immediately ready to use in your IDE. Trigger the workflows using your agent's native slash commands, file mentions, or prompt attachments (e.g., typing `/eha-bootstrap` or attaching the bootstrap file in chat).
21
+ Once projected, EHA files are immediately active in your IDE. Trigger the workflows using your agent's native slash commands, file mentions, or prompt attachments (read more on [EHA Commands](#eha-commands)).
19
22
 
20
- ### 3. Commit the generated files
21
- The generated files (`.claude/` or `.github/`) act as your project's AI contract. Commit them to version control so your whole team shares the same agent behaviors and documentation standards.
23
+ ### 3. Commit the contract
24
+ The projected files (`.claude/`, `.github/`, or `.agents/`) act as your project's AI contract.
22
25
 
23
26
  ---
24
27
 
25
- ## CLI Commands
28
+ ## EHA Commands
26
29
 
27
- ```bash
28
- eha [init] # Wizard: detect project root, choose agent, generate files
29
- eha init [agent] # Set up EHA directly (e.g., claude, copilot, etc.)
30
- eha doctor # Verify generated files and EHA status
31
- eha remove # Remove all EHA-generated files and config
32
- ```
30
+ Once initialized, EHA projects a series of interactive workflows directly into your agent's configuration directory (e.g., `.agents/` or `.github/`). You can trigger these workflows inside your IDE chat using slash commands, file mentions, or prompt attachments:
31
+
32
+ | Slash Trigger | Primary Purpose |
33
+ | :--- | :--- |
34
+ | **`/eha-bootstrap`** | Initializes the repository's SDD document set, generating a tailored 4-layer taxonomy (Lite, Standard, Enterprise). |
35
+ | **`/eha-refresh`** | Re-aligns and updates the existing documentation set when project scope, stack, or directory layouts shift. |
36
+ | **`/eha-parity`** | Audits the repository to check for document drift, stale headings, structural errors, and ownership mismatches. |
37
+ | **`/sdd-discuss`** | Initiates collaborative scoping and brainstorming sessions to align intent and draft specs before writing code. |
38
+ | **`/sdd-execute`** | Spec-Driven Development execution—translates agreed specifications into robust, verified, and tested code. |
33
39
 
34
40
  ---
35
41
 
36
- ## What Gets Generated
42
+ ## EHA CLI Command
37
43
 
38
- Running `eha` detects your chosen agent and outputs fully self-contained files into its native configuration directory (e.g., `.claude/`, `.github/`, or `.antigravity/`). Every file is pre-injected with EHA's compact rules (4-layer taxonomy, ownership map, and Spec-Driven Development rules).
44
+ The EHA CLI provides a lightweight, frictionless setup and maintenance toolbelt:
39
45
 
40
- Regardless of the target agent, the output always includes:
41
- - **Workflows**: Ready-to-use commands for project bootstrapping, doc refreshing, parity checks, and discussions.
42
- - **Skills**: Expert capabilities like `code-audit`, `api-design`, `test-authoring`, and `full-verification`.
43
- - **Rules**: A central instruction file enforcing the EHA project contract.
46
+ | Command | Primary Purpose |
47
+ | :--- | :--- |
48
+ | `eha init` (or `npx...`) | Automatically scans your repo root, lets you choose your target AI agent, and projects standard rules/skills. |
49
+ | `eha init <agent>` | Directly initiates the EHA project setup for a specific agent (e.g. `copilot`, `claude`, `antigravity`) |
50
+ | `eha doctor` | Performs a health check verifying that all projected rules, stubs, and workflows are present and intact. |
51
+ | `eha remove` | Safely deletes EHA's configuration directories, manifest registries, and generated contract files from your repository. |
44
52
 
45
53
  ---
46
54
 
47
55
  ## Updating
48
56
 
49
- When a new version of EHA is released, simply run `eha` in your repository again. The engine will detect the version mismatch and automatically prompt you to regenerate the files with the latest improvements.
57
+ When a new version of EHA is released, simply run:
58
+ ```bash
59
+ $ eha
60
+ ```
61
+ in your repository. The engine will detect the version mismatch automatically, prompt you to regenerate the files **(if needed)**, and update them to the latest standards seamlessly.
50
62
 
51
63
  ---
52
64
 
53
- ## Uninstallation & Cleanup
65
+ ## Uninstallation
54
66
 
55
67
  To completely remove EHA from your project and device:
56
68
 
57
69
  ### 1. Remove project files
58
- Run the following command in your project root to clean up all generated AI context files and project metadata (`.eha/`):
70
+ Run the following command in your project root to clean up all projected AI files:
59
71
  ```bash
60
- eha remove
72
+ $ eha remove
61
73
  ```
62
74
 
63
- ### 2. Uninstall the CLI (Total Removal)
75
+ ### 2. Uninstall the CLI globally
64
76
  To completely remove the CLI from your device, run:
65
77
  ```bash
66
- npm uninstall -g @sallmarta/eye-hate-agent
78
+ $ npm uninstall -g @sallmarta/eye-hate-agent
67
79
  ```
80
+
81
+ ---
82
+
83
+ ## EHA Philosophy
84
+
85
+ Eye Hate Agent is built upon a core set of operational beliefs designed to optimize the synergy between human developers and AI coding agents:
86
+
87
+ 1. **Readability First (Dual-Audience Design)**: Every registry, template, and workspace document generated by EHA strictly adheres to standard markdown structures, numbered stable headings, and clean tables. This ensures maximum readability for humans while granting AI agents 100% syntactic parsing clarity (completely eliminating context loss).
88
+ 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.
89
+ 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.
90
+ 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.
91
+ 5. **Native Agile & Scrum Alignment**: EHA is built for real-world software delivery. With structured sprint and epic trackers (`foundation/phases.md`, `foundation/status.md`), EHA fits seamlessly into standard corporate Agile/Scrum lifecycles, enabling agents to act as high-velocity scrum contributors.
@@ -1,66 +1,208 @@
1
- # Index
1
+ # Project Docs Registry
2
2
 
3
- Last update: YYYY-MM-DD
3
+ Last update: 2026-06-01
4
4
 
5
- Status: [Proposed | Draft | Live | Deprecated | Archived]
5
+ Status: Live
6
6
 
7
7
  ---
8
8
 
9
9
  ## 1. Description
10
- Use this index to list the optional and conditional regular project docs that are active for a repository. The always-required core docs are defined by the contract and do not need registry entries to exist. This index is the authoritative registry for optional and conditional regular docs; starter template files are recommended references, not the activation mechanism.
10
+ This index is the master registry and layout definition for all Spec-Driven Development (SDD) documentation within EHA-adopting repositories. It defines the universal stable headings schema and active document types.
11
11
 
12
12
  ## 2. Important
13
- Notes of important findings or critical constraints. Can be empty.
13
+ All documentation generated under `docs/project-docs/` (except `index.md`, `getting-started.md`, and guideline registries) must strictly implement the Universal Stable Headings schema and incorporate the unique domain-specific headings defined below.
14
14
 
15
15
  ## 3. Table of Contents
16
- [Generate a hyperlinked table of contents here containing ALL headings in this file (1 through N). Use standard markdown links, e.g., - [1. Description](#1-description)]
16
+ - [1. Description](#1-description)
17
+ - [2. Important](#2-important)
18
+ - [3. Table of Contents](#3-table-of-contents)
19
+ - [4. Scope](#4-scope)
20
+ - [5. Goals](#5-goals)
21
+ - [6. Non Goals](#6-non-goals)
22
+ - [7. Universal Stable Headings](#7-universal-stable-headings)
23
+ - [8. Active Doc Type Registry](#8-active-doc-type-registry)
24
+ - [9. Domain-Specific Headings Catalog](#9-domain-specific-headings-catalog)
17
25
 
18
26
  ## 4. Scope
19
- The boundaries of what this document covers.
27
+ Covers the structural headings, layers (`foundation/`, `development/`, `operations/`), and domain headings for EHA-governed repositories.
20
28
 
21
29
  ## 5. Goals
22
- What we aim to achieve with this specific document.
30
+ Eliminate template boilerplate redundancy, prevent cross-document drift, and lower agent context consumption.
23
31
 
24
32
  ## 6. Non Goals
25
- What is explicitly excluded from the scope of this document.
26
-
27
- ## 7. How to Use This Documentation
28
- A guide for new developers on where to start reading.
29
-
30
- ## 8. Documentation Ownership
31
- Who is responsible for keeping specific files up to date (e.g., "Backend team owns `api-contract.md`").
32
-
33
- ## 9. Foundational Required Docs
34
- - `prd.md`
35
- - `architecture.md`
36
- - `testing.md`
37
- - `workflow.md`
38
- - `status.md`
39
-
40
- ## 10. Optional And Conditional Docs
41
- | File | Purpose | Status | Owner | Creation trigger |
42
- | --- | --- | --- | --- | --- |
43
- | `changelog.md` | Release or milestone change history | conditional | TBD | When changes need release or milestone tracking |
44
- | `getting-started.md` | Setup, onboarding, and first-run guidance | conditional | TBD | When setup or onboarding needs a dedicated owner doc |
45
- | `feature-inventory.md` | Detailed feature catalog | conditional | TBD | When the feature surface is large enough to need inventory-level tracking |
46
- | `production-runbook.md` | Release, rollback, smoke-check, and recovery guidance | conditional | TBD | Before production operation needs a dedicated runbook |
47
- | `phases/index.md` | Multi-phase planning or epic registry | conditional | TBD | When roadmap work needs explicit phase tracking |
48
- | `YOUR_NEW_DOC.md` | State the purpose of the next optional regular doc here | conditional | TBD | State the creation trigger for the next optional regular doc here |
49
-
50
- Use status values such as `active`, `conditional`, `deprecated`, or `archived`. Add a new row in the `## 10. Optional And Conditional Docs` table above for each additional optional regular doc type that the repo activates.
51
-
52
- ## 11. Registry Rules
53
- - Add a new row in the `## 10. Optional And Conditional Docs` table above when an optional or conditional regular doc becomes part of the repo's active documentation set.
54
- - A row in this index activates a known optional doc type for bootstrap, refresh, and parity behavior.
55
- - If no starter template file exists for a listed doc type, use the stable headings or ownership rules defined in the contract.
56
- - Keep this index aligned with the files that actually exist under `docs/project-docs/`.
57
- - If a listed doc is deprecated or archived, update its status rather than silently removing its history.
58
-
59
- ## 12. Success Metrics
60
- How we measure if the goals of this document are achieved.
61
-
62
- ## 13. Related Documents
63
- [Link to related document](path) - Short brief note about why it's related.
64
-
65
- ## 14. Open Questions
66
- Any unresolved questions or assumptions. Can be empty.
33
+ Does not define technical guidelines rules (refer to `technical-guidelines/index.md`).
34
+
35
+ ## 7. Universal Stable Headings
36
+ Every project document must include these numbered headings in this exact order. Domain-specific headings go after § 6 and before the closing set. Feel free to add extra domain-specific headings if needed to capture important project context.
37
+
38
+ ### Opening Set:
39
+ 1. Description
40
+ 2. Important
41
+ 3. Table of Contents
42
+ 4. Scope
43
+ 5. Goals
44
+ 6. Non Goals
45
+
46
+ ### Closing Set (always last, in this order):
47
+ - Success Metrics
48
+ - Related Documents
49
+ - Open Questions
50
+
51
+ ## 8. Active Doc Type Registry
52
+
53
+ | Doc Type | Layer | Tier | Description |
54
+ | :--- | :--- | :--- | :--- |
55
+ | `getting-started.md` | Root | 1 | Orientation and local setup instructions. |
56
+ | `foundation/prd.md` | foundation | 1 | Vision statement, target personas, user journeys, features. |
57
+ | `foundation/architecture.md` | foundation | 1 | System architecture, tech stack, data flow, system flows, ADRs. |
58
+ | `foundation/status.md` | foundation | 1 | High-level status, recent wins, roadmap. |
59
+ | `foundation/workflow.md` | foundation | 1 | Branching, local development loop, PRs, code reviews. |
60
+ | `foundation/phases.md` | foundation | 3 | Overall timelines, features, sub-functions, sprints. (Merged phases + feature inventory) |
61
+ | `foundation/changelog.md` | foundation | 3 | Historical releases log. |
62
+ | `development/testing.md` | development | 2 | QA policy, matrices, environments, gates, naming standards. |
63
+ | `development/api-contract.md` | development | 2 | API authentication, endpoints, payloads, webhooks, rate limits. |
64
+ | `development/database.md` | development | 2 | Schema, entity models, indexes, migrations, data dictionary. |
65
+ | `development/ui-ux.md` | development | 2 | Design rules, wireframes, screen layouts, design tokens, responsive, a11y. |
66
+ | `development/internationalization.md` | development | 3 | Languages support, translations flow, currency, dates. |
67
+ | `operations/ci-cd.md` | operations | 2 | CI/CD pipelines, test gates, secrets handling, deploys. |
68
+ | `operations/production-runbook.md` | operations | 3 | Release procedures, rollback, environment config, smoke checks. |
69
+ | `operations/governance.md` | operations | 3 | Versioning policy, release cadence, code ownership rules. |
70
+ | `operations/security-compliance.md` | operations | 3 | Threat mitigation, RBAC, encryption, data privacy/retention, audit logging. (Merged security + compliance) |
71
+ | `operations/observability-error-handling.md` | operations | 3 | Log levels, error payloads, server fallbacks, alerts, dashboard metrics. (Merged observability + error handling) |
72
+ | `[custom-path].md` | [layer] | [tier] | [Add custom document templates here as needed to activate additional files] |
73
+
74
+ ## 9. Domain-Specific Headings Catalog
75
+
76
+ This catalog defines the baseline required domain-specific headings for each document type. When documenting a repository, both developers and AI agents are **NOT** limited to this baseline catalog; they must actively append additional, custom domain-specific headings to capture the unique features, patterns, and architectural realities discovered in the codebase.
77
+
78
+ ### `getting-started.md`
79
+ - Prerequisites
80
+ - First Steps
81
+ - Local Setup
82
+ - Verification
83
+ - Troubleshooting
84
+
85
+ ### `foundation/prd.md`
86
+ - Vision Statement
87
+ - Target Personas
88
+ - Core Business Value
89
+ - User Journeys & App Flow
90
+ - Feature Workflows
91
+ - Functional Requirements
92
+ - Non-Functional Requirements
93
+ - Acceptance Criteria
94
+ - External Dependencies & Partners
95
+
96
+ ### `foundation/architecture.md`
97
+ - Tech Stack Overview
98
+ - Architecture Pattern
99
+ - System Flow
100
+ - Data Flow
101
+ - Tools Integration
102
+ - Global Parameters and Constraints
103
+ - Architecture Decision Records
104
+
105
+ ### `foundation/status.md`
106
+ - Current State
107
+ - Recent Accomplishments
108
+ - Upcoming Focus
109
+ - Key Metrics
110
+ - Roadmap
111
+ - Epics
112
+ - Risks/Blockers
113
+
114
+ ### `foundation/workflow.md`
115
+ - Local Dev Loop
116
+ - Branching Strategy
117
+ - PR & Code Review
118
+ - Issue Tracking
119
+
120
+ ### `foundation/phases.md`
121
+ - Overall Timeline
122
+ - Feature Summary & Core Functions
123
+ - Sub-Functions
124
+ - Deprecated Features
125
+ - Phase Registry
126
+ - Sprint Tracker
127
+
128
+ ### `foundation/changelog.md`
129
+ - [Unreleased] (Added/Changed/Deprecated/Removed/Fixed/Security entries)
130
+
131
+ ### `development/testing.md`
132
+ - Verification Policy & Objectives
133
+ - Verification Matrix & Coverage
134
+ - Test Layers & Environments
135
+ - Commands & CI Gates
136
+ - Naming & File Conventions
137
+ - Manual Checks & Fallbacks
138
+
139
+ ### `development/api-contract.md`
140
+ - Base URL & Auth
141
+ - Request/Response Format
142
+ - Endpoints
143
+ - Webhooks
144
+ - Rate Limiting
145
+
146
+ ### `development/database.md`
147
+ - DB Architecture
148
+ - Schema Definitions
149
+ - Indexes
150
+ - Migration Strategy
151
+ - Data Dictionary
152
+
153
+ ### `development/ui-ux.md`
154
+ - Design Philosophy
155
+ - Design System
156
+ - Wireframing
157
+ - Screen Layouts
158
+ - Component Library
159
+ - Responsive
160
+ - Accessibility (A11y)
161
+ - Design Handoff
162
+
163
+ ### `development/internationalization.md`
164
+ - Supported Languages
165
+ - Translation Workflow
166
+ - Fallback Locales
167
+ - Date & Currency
168
+
169
+ ### `operations/ci-cd.md`
170
+ - Pipeline Architecture
171
+ - Build Steps
172
+ - Testing & Quality Gates
173
+ - Deployment Environments
174
+ - Secrets
175
+
176
+ ### `operations/production-runbook.md`
177
+ - Environment Overview
178
+ - Prerequisites & Access
179
+ - Release Procedure
180
+ - Smoke Checks
181
+ - Rollback
182
+ - Operational Notes
183
+
184
+ ### `operations/governance.md`
185
+ - Versioning Policy
186
+ - Release Cadence
187
+ - Code Ownership
188
+ - Contribution Guidelines
189
+
190
+ ### `operations/security-compliance.md`
191
+ - Security Objectives & Threats
192
+ - Access Control & RBAC
193
+ - Data Encryption & Privacy
194
+ - Data Retention
195
+ - Audit Logging
196
+ - Compliance Audits & Legal Disclaimers
197
+
198
+ ### `operations/observability-error-handling.md`
199
+ - Logging Strategy
200
+ - Standard Error Payloads
201
+ - Global Error Codes
202
+ - Client-Side Rules & Server Fallbacks
203
+ - Metrics & Dashboards
204
+ - Alerting Rules
205
+ - Distributed Tracing
206
+
207
+ ### `[custom-path].md`
208
+ - [Add the custom document's unique domain headings here, e.g., "Caching Strategy" or "Performance Budgets"]
@@ -1,24 +1,44 @@
1
- # Guidelines Index
1
+ # Guidelines Registry
2
2
 
3
- Last update: YYYY-MM-DD
3
+ Last update: 2026-06-01
4
4
 
5
- Status: [Proposed | Draft | Live | Deprecated | Archived]
5
+ Status: Live
6
6
 
7
7
  ---
8
8
 
9
- ## 1. Summary
10
- Use this index to list the active technical guideline documents for the repository. Core project docs explain the repository generally. Guidelines explain the durable technical rules that recurring implementation and review work should follow. This index is the authoritative registry for active guideline types; starter template files are recommended references, not the activation mechanism.
9
+ ## 1. Description
10
+ This registry is the authoritative catalog and schema definition for all active technical guideline documents inside the repository. While core project documents explain the repository generally, technical guidelines document the durable, cross-cutting coding and design conventions that developers and AI agents must follow during implementation.
11
11
 
12
- ## 2. When To Add A Guideline
13
- - Add a guideline when a technical domain has cross-cutting rules that would otherwise be repeated across tasks.
14
- - Do not create a guideline as a placeholder.
15
- - Keep one primary domain per guideline file.
16
- - If a rule is broad project truth, keep it in the core project docs and reference that doc here instead.
17
- - Add a new row in the `## 3. Active Guidelines` table below when activating a known guideline type, even if no starter template file exists for it yet.
12
+ ## 2. Important
13
+ Guidelines are durable, codebase-level rulebooks. They must never be created as simple placeholders. A guideline is officially activated in bootstrap, refresh, and parity loops only when it has an active row registered in the Active Guidelines table below.
18
14
 
19
- ## 3. Active Guidelines
20
- | Guideline | Domain | Purpose | Owner | Review trigger |
21
- | --- | --- | --- | --- | --- |
15
+ ## 3. Table of Contents
16
+ - [1. Description](#1-description)
17
+ - [2. Important](#2-important)
18
+ - [3. Table of Contents](#3-table-of-contents)
19
+ - [4. Scope](#4-scope)
20
+ - [5. Goals](#5-goals)
21
+ - [6. Non Goals](#6-non-goals)
22
+ - [7. Active Guidelines Registry](#7-active-guidelines-registry)
23
+ - [8. Registry Rules & Ownership](#8-registry-rules--ownership)
24
+ - [9. Guideline Stable Headings](#9-guideline-stable-headings)
25
+ - [10. Success Metrics](#10-success-metrics)
26
+ - [11. Related Documents](#11-related-documents)
27
+ - [12. Open Questions](#12-open-questions)
28
+
29
+ ## 4. Scope
30
+ Covers the active guideline categories, ownership tracking, review triggers, and standard heading rules for technical guidelines.
31
+
32
+ ## 5. Goals
33
+ Standardize the coding and architectural rules across the codebase, preventing design-pattern divergence and ensuring high code quality.
34
+
35
+ ## 6. Non Goals
36
+ Does not document general project setup, business logic, or operational procedures (refer to the master project docs registry `index.md`).
37
+
38
+ ## 7. Active Guidelines Registry
39
+
40
+ | Guideline | Domain | Purpose | Owner | Review Trigger |
41
+ | :--- | :--- | :--- | :--- | :--- |
22
42
  | `technical-guidelines/api.md` | API | Request or response contracts, versioning rules, and integration boundaries | TBD | API contract or integration changes |
23
43
  | `technical-guidelines/database.md` | Database | Schema, migration, naming, and persistence rules | TBD | Schema or storage changes |
24
44
  | `technical-guidelines/logging.md` | Logging | Event naming, log levels, redaction, and correlation rules | TBD | Logging policy or observability changes |
@@ -29,24 +49,33 @@ Use this index to list the active technical guideline documents for the reposito
29
49
  | `technical-guidelines/internationalization.md` | i18n/l10n | Rules for i18n keys, fallbacks, and adding new languages | TBD | i18n tooling or language changes |
30
50
  | `technical-guidelines/testing.md` | Testing | Rules for writing tests, naming conventions, mocking, and coverage | TBD | Testing framework or coverage changes |
31
51
  | `technical-guidelines/ui-ux.md` | UI/UX | Rules for UI components, accessibility standards, and design system usage | TBD | Design system or component library changes |
32
- | `technical-guidelines/your-new-guideline.md` | State the domain of the next guideline here | State the purpose of the next guideline here | TBD | State the review trigger for the next guideline here |
52
+ | `technical-guidelines/[custom-guideline].md` | [Domain] | [Durable technical rules and conventions for custom domain] | TBD | [Review trigger, e.g. "API or schema changes"] |
33
53
 
34
- Remove rows for inactive domains and add a new row in the `## 3. Active Guidelines` table above for any other active guideline files.
54
+ Remove rows for inactive domains and add a new row in the `## 7. Active Guidelines Registry` table above for any other active guideline files.
35
55
 
36
- ## 4. Ownership And Review
56
+ ## 8. Registry Rules & Ownership
37
57
  - Keep this index aligned with the files that actually exist under `technical-guidelines/`.
38
58
  - A row in this index activates a known guideline type for bootstrap, refresh, and parity behavior.
39
- - If no starter template file exists for a listed guideline type, use the stable guideline headings from the contract.
59
+ - If no starter template file exists for a listed guideline type, use the Stable Headings schema defined below.
40
60
  - Update the relevant row whenever a guideline changes owner, scope, or review trigger.
41
61
  - Cross-reference owning project docs such as `architecture.md` or `testing.md` when a guideline depends on them.
42
62
 
43
- ## 5. Stable Headings
44
- New guideline files must include the standard numbered headings below to keep all rulebooks consistent. Feel free to add extra domain-specific headings if needed.
63
+ ## 9. Guideline Stable Headings
64
+ New guideline files must include the standard numbered headings below to keep all rulebooks consistent. When documenting a guideline, both developers and AI agents are **NOT** limited to this baseline schema; they must actively append additional, custom domain-specific headings (for example, under Section 3 or as subheadings) to capture the unique technical standards, tooling, and constraints of the codebase.
45
65
 
46
66
  1. **`## 1. Summary`**: A brief overview of what rules this guideline documents.
47
67
  2. **`## 2. Scope`**: The explicit boundaries of what these rules cover (and don't cover).
48
68
  3. **`## 3. Rules`**: The hard rules that must be followed.
49
69
  4. **`## 4. Preferred Patterns`**: Examples or guidelines of the *best* way to do something.
50
70
  5. **`## 5. Anti-Patterns`**: Examples of what *not* to do.
51
- 6. **`## 6. Related Docs`**: Links to `technical/` docs or other guidelines.
71
+ 6. **`## 6. Related Docs`**: Links to active core project documents or other guidelines.
52
72
  7. **`## 7. Open Questions`**: Any unresolved rules or edge cases.
73
+
74
+ ## 10. Success Metrics
75
+ AI agents and developers can easily reference, follow, and validate cross-cutting code standard compliance during changes.
76
+
77
+ ## 11. Related Documents
78
+ - [Master Project Registry](../index.md) - The active document catalog.
79
+
80
+ ## 12. Open Questions
81
+ None.
@@ -3,55 +3,38 @@
3
3
  Generate the **initial project documentation set** for a repository.
4
4
  You must dynamically adjust your behavior based on the current state of the repository.
5
5
 
6
- ## State Detection (Universal Document Handler)
7
- Before writing any documents, analyze the workspace to determine its state:
8
- 1. **Zero Docs (Fresh Repo):** No existing documentation and no code. You must ask the user questions to build the specifications from scratch.
9
- 2. **Unclear Docs (Running Repo):** Code exists but docs are missing or outdated. Analyze the existing codebase (package files, database schemas, api routes) to reverse-engineer `foundation/architecture.md` and `technical/database.md`. Ask the user to fill in the missing product goals.
10
- 3. **Mature Docs:** Existing legacy documentation exists but isn't in the EHA format. Map the existing docs into the new 4-layer taxonomy `docs/project-docs/` format without losing historical context.
11
-
12
- ## Required Behavior
13
- 1. Follow the 4-layer file structure defined in the EHA Project Doc Rules above (`foundation/`, `operations/`, `technical/`, `technical-guidelines/`).
6
+ ## Step 1: State & Complexity Detection (The Adaptive Taxonomy)
7
+ Before writing any documents, analyze the workspace to determine its state (Zero Docs vs. Unclear Docs vs. Mature Docs) and its complexity.
8
+
9
+ Based on the repository's complexity, you MUST recommend one of the following **Taxonomy Tiers**:
10
+
11
+ 1. **Tier 1: Lite Profile**
12
+ - *Target:* Small scripts, micro-libraries, single-component repos.
13
+ - *Files Generated:* `index.md`, `getting-started.md`, `foundation/prd.md`, `foundation/architecture.md`, `foundation/status.md`.
14
+ 2. **Tier 2: Standard Profile**
15
+ - *Target:* Typical web applications, APIs, standard services.
16
+ - *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`.
17
+ 3. **Tier 3: Enterprise Profile**
18
+ - *Target:* Large-scale platforms, regulated systems, monorepos.
19
+ - *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`, `foundation/phases.md` (merged phases + feature inventory), `foundation/changelog.md`.
20
+
21
+ **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.
22
+
23
+ ## Step 2: Document Generation
24
+ Once the user approves a tier, strictly follow the 4-layer file structure (`foundation/`, `operations/`, `development/`, `technical-guidelines/`).
25
+
26
+ ### Required Behavior
27
+ 1. **Dynamic Generation from Registry:** You MUST read the master registry file `docs/templates/project-docs-template/index.md` to obtain the universal stable headings schema and the unique domain-specific headings for each document type within the approved tier. Generate each document dynamically using this structural mapping.
14
28
  2. Create project-specific truth in `docs/project-docs/`, not in the reusable prompt output itself.
15
29
  3. Do not invent details. Mark uncertain facts as `TBD` or `Assumption`.
16
30
  4. If reverse-engineering from code, explicitly state "Inferred from codebase" in the generated document until the user confirms it.
17
-
18
- ## Output Contract (The Massive Document Structure)
19
- Create these files under `docs/project-docs/`. If you lack the context to fill them out, generate the markdown headings and mark the content as TBD.
20
-
21
- **Root:**
22
- - `index.md`
23
- - `getting-started.md`
24
-
25
- **Foundation:**
26
- - `foundation/prd.md`
27
- - `foundation/architecture.md`
28
- - `foundation/workflow.md`
29
- - `foundation/status.md`
30
- - `foundation/phases.md`
31
- - `foundation/changelog.md`
32
- - `foundation/feature-inventory.md`
33
-
34
- **Operations:**
35
- - `operations/ci-cd.md`
36
- - `operations/production-runbook.md`
37
- - `operations/governance.md`
38
- - `operations/compliance.md`
39
- - `operations/observability.md`
40
- - `operations/security.md`
41
-
42
- **Technical:**
43
- - `technical/testing.md`
44
- - `technical/api-contract.md`
45
- - `technical/database.md`
46
- - `technical/ui-ux.md`
47
- - `technical/error-handling.md`
48
- - `technical/internationalization.md`
31
+ 5. **DO NOT generate files outside the approved tier.**
49
32
 
50
33
  ## Final Pass
51
34
  Before finishing, check that:
52
35
  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.
53
- 2. `foundation/architecture.md` and `technical/testing.md` do not conflict.
54
- 3. The generated documents strictly follow the Flexible Baselines principle (you may omit heavily specialized docs if the user confirms they aren't needed).
36
+ 2. `foundation/architecture.md` and `development/testing.md` do not conflict.
37
+ 3. The generated documents strictly match the approved Taxonomy Tier and structural definitions cataloged in the master registry.
55
38
 
56
39
  ## Inputs
57
- Use the project brief, codebase, and constraints provided below to begin generation.
40
+ Use the project brief, codebase, and constraints provided below to begin your Phase 1 analysis.
@@ -42,7 +42,7 @@ Check at least these areas when present:
42
42
  3. Treat `docs/project-docs/index.md` and `docs/project-docs/technical-guidelines/index.md` as the authoritative inventories for optional regular docs and guideline docs when present.
43
43
  4. Treat clearly named reference or archive folders such as `docs-legacy/`, `docs-old/`, `archive/`, or `reference/` as migration input only, not as owner-doc paths.
44
44
  5. 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.
45
- 6. 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/`.
45
+ 6. 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.md` or technical-rule content that should map to `technical-guidelines/`.
46
46
  7. Distinguish between:
47
47
  - true contradiction
48
48
  - stale summary
@@ -43,19 +43,21 @@ Update **only the docs that own the changed information** while keeping the docu
43
43
 
44
44
  ## Ownership Examples
45
45
 
46
- - stack or dependency changes → `foundation/architecture.md`, `technical/testing.md`
47
- - feature scope changes → `foundation/prd.md`, `foundation/feature-inventory.md`, `foundation/status.md`
46
+ - stack or dependency changes → `foundation/architecture.md`, `development/testing.md`
47
+ - feature scope changes → `foundation/prd.md`, `foundation/status.md`
48
48
  - detailed requirements or acceptance changes → `foundation/prd.md`, `foundation/status.md`
49
- - workflow or roadmap changes → `foundation/status.md`, `foundation/phases/index.md`, workflow docs if present
50
- - validation / CI changes → `technical/testing.md`, `getting-started.md`
51
- - production environment, rollout, rollback, or smoke-check changes → `operations/production-runbook.md`, `foundation/architecture.md`, `technical/testing.md`
49
+ - workflow or roadmap changes → `foundation/status.md`, `foundation/phases.md`, workflow docs if present
50
+ - validation / CI changes → `development/testing.md`, `getting-started.md`
51
+ - production environment, rollout, rollback, or smoke-check changes → `operations/production-runbook.md`, `foundation/architecture.md`, `development/testing.md`
52
52
  - API or integration changes → relevant API / integration docs plus `foundation/architecture.md`
53
+ - security or compliance changes → `operations/security-compliance.md`
54
+ - observability, logging, or error-handling changes → `operations/observability-error-handling.md`
53
55
  - optional or conditional doc inventory changes → `docs/project-docs/index.md` plus the affected optional owner docs
54
56
  - cross-cutting technical conventions or implementation rules → relevant `technical-guidelines/*.md`, `technical-guidelines/index.md`, and any summarizing core docs that reference them
55
57
  - 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
56
- - 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
58
+ - semantic legacy-name normalization → map legacy names by content, for example `epic` or `roadmap` material to `foundation/phases.md` and `protocol` or `standard` material to `technical-guidelines/` when their governed concern matches those owners
57
59
  - 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
58
- - legacy phased-planning promotion → `docs/project-docs/foundation/phases/index.md`, the relevant phase or epic docs, `foundation/status.md`, and `docs/project-docs/index.md`
60
+ - legacy phased-planning promotion → `docs/project-docs/foundation/phases.md`, `foundation/status.md`, and `docs/project-docs/index.md`
59
61
 
60
62
  ## Output Contract
61
63
 
@@ -31,4 +31,4 @@ Translate a newly updated project specification into tested, working code by fol
31
31
  - The user's prompt requesting the execution of a feature.
32
32
  - `docs/project-docs/foundation/prd.md`
33
33
  - `docs/project-docs/foundation/architecture.md`
34
- - `docs/project-docs/technical/testing.md`
34
+ - `docs/project-docs/development/testing.md`
@@ -12,7 +12,7 @@ Act as a Senior Engineer / Agile Product Manager to help the user brainstorm and
12
12
  - API shapes and payload structures.
13
13
  - UI/UX constraints or responsive layouts.
14
14
  - Data model changes (new tables, columns, relations).
15
- 3. **Draft the Spec:** Once the user answers your questions and you reach an agreement, output a drafted, markdown-formatted snippet that is ready to be injected into the specific target documents (e.g., `foundation/prd.md`, `foundation/architecture.md`, `technical/api-contract.md`).
15
+ 3. **Draft the Spec:** Once the user answers your questions and you reach an agreement, output a drafted, markdown-formatted snippet that is ready to be injected into the specific target documents (e.g., `foundation/prd.md`, `foundation/architecture.md`, `development/api-contract.md`).
16
16
  4. **Final Approval:** Ask the user: "Should I execute the SDD workflow (`01-sdd-execute.md`) with these specifications?"
17
17
 
18
18
  ## Output Contract