@sallmarta/eye-hate-agent 1.0.1 → 1.0.3
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 +38 -310
- package/bin/eha.js +203 -118
- package/docs/templates/project-docs-template/foundation/architecture.md +79 -0
- package/docs/templates/project-docs-template/foundation/changelog.md +53 -0
- package/docs/templates/project-docs-template/foundation/feature-inventory.md +46 -0
- package/docs/templates/project-docs-template/foundation/phases.md +60 -0
- package/docs/templates/project-docs-template/foundation/prd.md +69 -0
- package/docs/templates/project-docs-template/foundation/status.md +57 -0
- package/docs/templates/project-docs-template/foundation/workflow.md +59 -0
- package/docs/templates/project-docs-template/getting-started.md +52 -0
- package/docs/{vibes → templates}/project-docs-template/index.md +12 -12
- package/docs/templates/project-docs-template/operations/ci-cd.md +56 -0
- package/docs/templates/project-docs-template/operations/compliance.md +46 -0
- package/docs/templates/project-docs-template/operations/governance.md +46 -0
- package/docs/templates/project-docs-template/operations/observability.md +53 -0
- package/docs/templates/project-docs-template/operations/production-runbook.md +62 -0
- package/docs/templates/project-docs-template/operations/security.md +49 -0
- package/docs/templates/project-docs-template/technical/api-contract.md +49 -0
- package/docs/templates/project-docs-template/technical/database.md +59 -0
- package/docs/templates/project-docs-template/technical/error-handling.md +54 -0
- package/docs/templates/project-docs-template/technical/internationalization.md +46 -0
- package/docs/templates/project-docs-template/technical/testing.md +57 -0
- package/docs/templates/project-docs-template/technical/ui-ux.md +68 -0
- package/docs/{vibes → templates}/project-docs-template/technical-guidelines/index.md +3 -3
- package/docs/{vibes → templates}/reusable-prompts/00-project-docs-bootstrap.md +2 -4
- package/docs/{vibes → templates}/reusable-prompts/00-project-docs-parity.md +3 -5
- package/docs/{vibes → templates}/reusable-prompts/00-project-docs-refresh.md +2 -4
- package/docs/{vibes → templates}/reusable-prompts/02-sdd-discuss.md +2 -2
- package/{.agents/rules/agent.md → docs/templates/rules/agent-rules.md} +6 -11
- package/docs/templates/skills/architecture/db-schema-design/SKILL.md +14 -0
- package/docs/{vibes/skills → templates/skills/auditing}/full-verification/SKILL.md +1 -1
- package/docs/{vibes/skills → templates/skills/auditing}/parity/SKILL.md +2 -2
- package/docs/templates/skills/engineering/refactor-specialist/SKILL.md +13 -0
- package/docs/{vibes/skills → templates/skills/engineering}/test-authoring/SKILL.md +177 -1
- package/docs/templates/skills/engineering/ui-ux-implementation/SKILL.md +13 -0
- package/docs/templates/skills/operations/ci-cd-authoring/SKILL.md +13 -0
- package/docs/templates/skills/operations/observability-setup/SKILL.md +13 -0
- package/package.json +4 -6
- package/src/engine/index.js +7 -12
- package/src/engine/install.js +67 -163
- package/src/engine/runtime-adapters.js +263 -50
- package/src/engine/skill-registry.js +67 -0
- package/src/engine/state.js +29 -7
- package/src/engine/workflow-registry.js +14 -23
- package/.claude/commands/eha/README.md +0 -3
- package/.claude/commands/eha/eha-bootstrap.md +0 -9
- package/.claude/commands/eha/eha-discuss.md +0 -9
- package/.claude/commands/eha/eha-execute.md +0 -9
- package/.claude/commands/eha/eha-parity.md +0 -9
- package/.claude/commands/eha/eha-refresh.md +0 -9
- package/.claude/commands/eha/eha-verify.md +0 -9
- package/.claude/rules/agent-rules.md +0 -64
- package/.github/instructions/agent-rules.instructions.md +0 -63
- package/.github/instructions/eha-workflows.instructions.md +0 -21
- package/docs/eyehateagent-contract.md +0 -475
- package/docs/eyehateagent-maintenance.md +0 -103
- package/docs/project-docs/changelog.md +0 -293
- package/docs/project-docs/foundation/architecture.md +0 -117
- package/docs/project-docs/foundation/status.md +0 -32
- package/docs/project-docs/foundation/workflow.md +0 -63
- package/docs/project-docs/index.md +0 -20
- package/docs/project-docs/testing.md +0 -73
- package/docs/vibes/project-docs-template/foundation/architecture.md +0 -79
- package/docs/vibes/project-docs-template/foundation/changelog.md +0 -53
- package/docs/vibes/project-docs-template/foundation/feature-inventory.md +0 -46
- package/docs/vibes/project-docs-template/foundation/phases.md +0 -60
- package/docs/vibes/project-docs-template/foundation/prd.md +0 -69
- package/docs/vibes/project-docs-template/foundation/status.md +0 -57
- package/docs/vibes/project-docs-template/foundation/workflow.md +0 -59
- package/docs/vibes/project-docs-template/getting-started.md +0 -52
- package/docs/vibes/project-docs-template/operations/ci-cd.md +0 -56
- package/docs/vibes/project-docs-template/operations/compliance.md +0 -46
- package/docs/vibes/project-docs-template/operations/governance.md +0 -46
- package/docs/vibes/project-docs-template/operations/observability.md +0 -53
- package/docs/vibes/project-docs-template/operations/production-runbook.md +0 -62
- package/docs/vibes/project-docs-template/operations/security.md +0 -49
- package/docs/vibes/project-docs-template/technical/api-contract.md +0 -49
- package/docs/vibes/project-docs-template/technical/database.md +0 -59
- package/docs/vibes/project-docs-template/technical/error-handling.md +0 -54
- package/docs/vibes/project-docs-template/technical/internationalization.md +0 -46
- package/docs/vibes/project-docs-template/technical/testing.md +0 -57
- package/docs/vibes/project-docs-template/technical/ui-ux.md +0 -68
- package/docs/vibes/skills/project-elevation/SKILL.md +0 -157
- package/docs/vibes/skills/test-authoring/references/patterns.md +0 -116
- package/docs/vibes/skills/test-authoring/references/test-types.md +0 -52
- /package/docs/{vibes → templates}/reusable-prompts/01-sdd-execute.md +0 -0
- /package/docs/{vibes/skills → templates/skills/architecture}/api-design/SKILL.md +0 -0
- /package/docs/{vibes/skills/analysis → templates/skills/architecture/system-analysis}/SKILL.md +0 -0
- /package/docs/{vibes/skills/code-audit → templates/skills/auditing/security-audit}/SKILL.md +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Error Handling
|
|
2
|
+
|
|
3
|
+
Last update: YYYY-MM-DD
|
|
4
|
+
|
|
5
|
+
Status: [Proposed | Draft | Live | Deprecated | Archived]
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Description
|
|
10
|
+
Briefly describe the purpose of this document and what it contains.
|
|
11
|
+
|
|
12
|
+
## 2. Important
|
|
13
|
+
Notes of important findings or critical constraints. Can be empty.
|
|
14
|
+
|
|
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)]
|
|
17
|
+
|
|
18
|
+
## 4. Scope
|
|
19
|
+
The boundaries of what this document covers.
|
|
20
|
+
|
|
21
|
+
## 5. Goals
|
|
22
|
+
What we aim to achieve with this specific document.
|
|
23
|
+
|
|
24
|
+
## 6. Non Goals
|
|
25
|
+
What is explicitly excluded from the scope of this document.
|
|
26
|
+
|
|
27
|
+
## 7. Standard Error Payload
|
|
28
|
+
The exact JSON shape returned on failure.
|
|
29
|
+
|
|
30
|
+
## 8. Global Error Codes
|
|
31
|
+
A registry of specific business logic errors.
|
|
32
|
+
|
|
33
|
+
## 9. Client-Side Handling Rules
|
|
34
|
+
How the frontend should display or retry failures.
|
|
35
|
+
|
|
36
|
+
## 10. Server-Side Fallbacks
|
|
37
|
+
Circuit breakers and degraded modes. Diagram of fallback flow is preferred. Use mermaid.
|
|
38
|
+
|
|
39
|
+
```mermaid
|
|
40
|
+
graph TD
|
|
41
|
+
A[Request] --> B{Service Online?}
|
|
42
|
+
B -- Yes --> C[Process Request]
|
|
43
|
+
B -- No --> D[Trigger Circuit Breaker]
|
|
44
|
+
D --> E[Return Fallback Payload]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 11. Success Metrics
|
|
48
|
+
How we measure if the goals of this document are achieved.
|
|
49
|
+
|
|
50
|
+
## 12. Related Documents
|
|
51
|
+
[Link to related document](path) - Short brief note about why it's related.
|
|
52
|
+
|
|
53
|
+
## 13. Open Questions
|
|
54
|
+
Any unresolved questions or assumptions. Can be empty.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Internationalization & Localization
|
|
2
|
+
|
|
3
|
+
Last update: YYYY-MM-DD
|
|
4
|
+
|
|
5
|
+
Status: [Proposed | Draft | Live | Deprecated | Archived]
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Description
|
|
10
|
+
Briefly describe the purpose of this document and what it contains.
|
|
11
|
+
|
|
12
|
+
## 2. Important
|
|
13
|
+
Notes of important findings or critical constraints. Can be empty.
|
|
14
|
+
|
|
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)]
|
|
17
|
+
|
|
18
|
+
## 4. Scope
|
|
19
|
+
The boundaries of what this document covers.
|
|
20
|
+
|
|
21
|
+
## 5. Goals
|
|
22
|
+
What we aim to achieve with this specific document.
|
|
23
|
+
|
|
24
|
+
## 6. Non Goals
|
|
25
|
+
What is explicitly excluded from the scope of this document.
|
|
26
|
+
|
|
27
|
+
## 7. Supported Languages / Locales
|
|
28
|
+
The explicit list of target regions.
|
|
29
|
+
|
|
30
|
+
## 8. Translation Workflow (TMS)
|
|
31
|
+
How strings are extracted, translated, and merged.
|
|
32
|
+
|
|
33
|
+
## 9. Fallback Locales
|
|
34
|
+
The default language when a string is missing.
|
|
35
|
+
|
|
36
|
+
## 10. Date & Currency Formats
|
|
37
|
+
Regional formatting rules.
|
|
38
|
+
|
|
39
|
+
## 11. Success Metrics
|
|
40
|
+
How we measure if the goals of this document are achieved.
|
|
41
|
+
|
|
42
|
+
## 12. Related Documents
|
|
43
|
+
[Link to related document](path) - Short brief note about why it's related.
|
|
44
|
+
|
|
45
|
+
## 13. Open Questions
|
|
46
|
+
Any unresolved questions or assumptions. Can be empty.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Testing & Verification
|
|
2
|
+
|
|
3
|
+
Last update: YYYY-MM-DD
|
|
4
|
+
|
|
5
|
+
Status: [Proposed | Draft | Live | Deprecated | Archived]
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Description
|
|
10
|
+
Briefly describe the purpose of this document and what it contains.
|
|
11
|
+
|
|
12
|
+
## 2. Important
|
|
13
|
+
Notes of important findings or critical constraints. Can be empty.
|
|
14
|
+
|
|
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)]
|
|
17
|
+
|
|
18
|
+
## 4. Scope
|
|
19
|
+
The boundaries of what this document covers.
|
|
20
|
+
|
|
21
|
+
## 5. Goals
|
|
22
|
+
What we aim to achieve with this specific document.
|
|
23
|
+
|
|
24
|
+
## 6. Non Goals
|
|
25
|
+
What is explicitly excluded from the scope of this document.
|
|
26
|
+
|
|
27
|
+
## 7. Verification Policy & Objectives
|
|
28
|
+
Define the overarching philosophy for how this repository chooses, runs, and reports testing. What are we trying to prove with our test suite?
|
|
29
|
+
|
|
30
|
+
## 8. Verification Matrix & Coverage
|
|
31
|
+
The required types of testing (Blackbox, Unit, Security) mapping against expected coverage metrics (e.g., 85% branch coverage).
|
|
32
|
+
|
|
33
|
+
| Change type | Preferred validation | Fallback |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| Code change | TBD | TBD |
|
|
36
|
+
| Documentation change | TBD | TBD |
|
|
37
|
+
|
|
38
|
+
## 9. Test Layers & Environments
|
|
39
|
+
Detail the exact split of Unit, Component, Integration, and E2E tests. Include the required infrastructure, mocks, and seed data needed to run them.
|
|
40
|
+
|
|
41
|
+
## 10. Commands & CI Gates
|
|
42
|
+
The exact terminal commands for linting and testing. Outline the required pre-merge CI checks (blocking vs advisory).
|
|
43
|
+
|
|
44
|
+
## 11. Naming & File Conventions
|
|
45
|
+
Where tests live, how test files are named (e.g., `*.spec.ts`), and how fixtures are stored.
|
|
46
|
+
|
|
47
|
+
## 12. Manual Checks & Fallbacks
|
|
48
|
+
Necessary manual testing steps and fallback procedures for human verification when automation is impossible.
|
|
49
|
+
|
|
50
|
+
## 13. Success Metrics
|
|
51
|
+
How we measure if the goals of this document are achieved.
|
|
52
|
+
|
|
53
|
+
## 14. Related Documents
|
|
54
|
+
[Link to related document](path) - Short brief note about why it's related.
|
|
55
|
+
|
|
56
|
+
## 15. Open Questions
|
|
57
|
+
Any unresolved questions or assumptions. Can be empty.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# UI/UX
|
|
2
|
+
|
|
3
|
+
Last update: YYYY-MM-DD
|
|
4
|
+
|
|
5
|
+
Status: [Proposed | Draft | Live | Deprecated | Archived]
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Description
|
|
10
|
+
Briefly describe the purpose of this document and what it contains.
|
|
11
|
+
|
|
12
|
+
## 2. Important
|
|
13
|
+
Notes of important findings or critical constraints. Can be empty.
|
|
14
|
+
|
|
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)]
|
|
17
|
+
|
|
18
|
+
## 4. Scope
|
|
19
|
+
The boundaries of what this document covers.
|
|
20
|
+
|
|
21
|
+
## 5. Goals
|
|
22
|
+
What we aim to achieve with this specific document.
|
|
23
|
+
|
|
24
|
+
## 6. Non Goals
|
|
25
|
+
What is explicitly excluded from the scope of this document.
|
|
26
|
+
|
|
27
|
+
## 7. Design Philosophy
|
|
28
|
+
The core principles guiding the user experience.
|
|
29
|
+
|
|
30
|
+
## 8. Design System & Theme
|
|
31
|
+
Colors, typography, and visual guidelines.
|
|
32
|
+
|
|
33
|
+
## 9. Wireframing & Prototyping
|
|
34
|
+
Links to external tools (Figma, Adobe) or raw UI specs generated by humans/AI in the repo.
|
|
35
|
+
|
|
36
|
+
## 10. Screen Layouts
|
|
37
|
+
Core page structures and navigation flows. Wireframes are preferred. Use mermaid.
|
|
38
|
+
|
|
39
|
+
```mermaid
|
|
40
|
+
graph TD
|
|
41
|
+
A[Home Page] --> B[Dashboard]
|
|
42
|
+
A --> C[Profile Settings]
|
|
43
|
+
B --> D[Details View]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 11. Component Library
|
|
47
|
+
Reusable UI elements (buttons, modals).
|
|
48
|
+
|
|
49
|
+
## 12. Responsive Breakpoints
|
|
50
|
+
Behavior across mobile, tablet, and desktop.
|
|
51
|
+
|
|
52
|
+
## 13. Accessibility (a11y) Requirements
|
|
53
|
+
Contrast ratios, ARIA labels.
|
|
54
|
+
|
|
55
|
+
## 14. Implementation Backlog
|
|
56
|
+
List of UI tasks (e.g., `Task-ID: Description`).
|
|
57
|
+
|
|
58
|
+
## 15. Design Handoff Approaches
|
|
59
|
+
How designs are explicitly transferred to developers.
|
|
60
|
+
|
|
61
|
+
## 16. Success Metrics
|
|
62
|
+
How we measure if the goals of this document are achieved.
|
|
63
|
+
|
|
64
|
+
## 17. Related Documents
|
|
65
|
+
[Link to related document](path) - Short brief note about why it's related.
|
|
66
|
+
|
|
67
|
+
## 18. Open Questions
|
|
68
|
+
Any unresolved questions or assumptions. Can be empty.
|
|
@@ -7,7 +7,7 @@ Status: [Proposed | Draft | Live | Deprecated | Archived]
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## 1. Summary
|
|
10
|
-
|
|
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.
|
|
11
11
|
|
|
12
12
|
## 2. When To Add A Guideline
|
|
13
13
|
- Add a guideline when a technical domain has cross-cutting rules that would otherwise be repeated across tasks.
|
|
@@ -31,7 +31,7 @@ Status: [Proposed | Draft | Live | Deprecated | Archived]
|
|
|
31
31
|
| `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
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 |
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Remove rows for inactive domains and add a new row in the `## 3. Active Guidelines` table above for any other active guideline files.
|
|
35
35
|
|
|
36
36
|
## 4. Ownership And Review
|
|
37
37
|
- Keep this index aligned with the files that actually exist under `technical-guidelines/`.
|
|
@@ -41,7 +41,7 @@ Status: [Proposed | Draft | Live | Deprecated | Archived]
|
|
|
41
41
|
- Cross-reference owning project docs such as `architecture.md` or `testing.md` when a guideline depends on them.
|
|
42
42
|
|
|
43
43
|
## 5. Stable Headings
|
|
44
|
-
|
|
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.
|
|
45
45
|
|
|
46
46
|
1. **`## 1. Summary`**: A brief overview of what rules this guideline documents.
|
|
47
47
|
2. **`## 2. Scope`**: The explicit boundaries of what these rules cover (and don't cover).
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
# Project Docs Bootstrap Reusable Prompt
|
|
2
|
-
|
|
3
|
-
Read `docs/eyehateagent-contract.md` first.
|
|
1
|
+
# Project Docs Bootstrap Reusable Prompt
|
|
4
2
|
|
|
5
3
|
Generate the **initial project documentation set** for a repository.
|
|
6
4
|
You must dynamically adjust your behavior based on the current state of the repository.
|
|
@@ -12,7 +10,7 @@ Before writing any documents, analyze the workspace to determine its state:
|
|
|
12
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.
|
|
13
11
|
|
|
14
12
|
## Required Behavior
|
|
15
|
-
1. Follow the 4-layer file structure defined in
|
|
13
|
+
1. Follow the 4-layer file structure defined in the EHA Project Doc Rules above (`foundation/`, `operations/`, `technical/`, `technical-guidelines/`).
|
|
16
14
|
2. Create project-specific truth in `docs/project-docs/`, not in the reusable prompt output itself.
|
|
17
15
|
3. Do not invent details. Mark uncertain facts as `TBD` or `Assumption`.
|
|
18
16
|
4. If reverse-engineering from code, explicitly state "Inferred from codebase" in the generated document until the user confirms it.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Project Docs Parity Reusable Prompt
|
|
2
2
|
|
|
3
|
-
Read `docs/eyehateagent-contract.md` first.
|
|
4
|
-
|
|
5
3
|
Audit the repository for **documentation-system drift**.
|
|
6
4
|
|
|
7
5
|
## Goal
|
|
@@ -18,8 +16,8 @@ Check at least these areas when present:
|
|
|
18
16
|
- relevant code, tests, configs, or runtime-facing artifacts when a finding depends on current implementation behavior or source-of-truth ownership
|
|
19
17
|
- clearly named reference or archive folders such as `docs-legacy/`, `docs-old/`, `archive/`, or `reference/`
|
|
20
18
|
- platform instruction surfaces (mirrored rule files)
|
|
21
|
-
- `docs/
|
|
22
|
-
- `docs/
|
|
19
|
+
- `docs/templates/skills/`
|
|
20
|
+
- `docs/templates/reusable-prompts/`
|
|
23
21
|
- workflow docs and handoff docs
|
|
24
22
|
|
|
25
23
|
### High-Value Drift Categories
|
|
@@ -40,7 +38,7 @@ Check at least these areas when present:
|
|
|
40
38
|
## Required Behavior
|
|
41
39
|
|
|
42
40
|
1. Use project docs as the primary source of truth for documentation ownership and doc-to-doc drift unless the repository explicitly states otherwise.
|
|
43
|
-
2.
|
|
41
|
+
2. Use the EHA Project Doc Rules above as the ownership map.
|
|
44
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.
|
|
45
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.
|
|
46
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.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Project Docs Refresh Reusable Prompt
|
|
2
2
|
|
|
3
|
-
Read `docs/eyehateagent-contract.md` first.
|
|
4
|
-
|
|
5
3
|
Refresh the existing project documentation after a change in scope, stack, workflow, architecture, testing policy, or product behavior.
|
|
6
4
|
|
|
7
5
|
## Goal
|
|
@@ -11,7 +9,7 @@ Update **only the docs that own the changed information** while keeping the docu
|
|
|
11
9
|
## Required Behavior
|
|
12
10
|
|
|
13
11
|
1. Read the current project docs before editing anything.
|
|
14
|
-
2. Use
|
|
12
|
+
2. Use the EHA Project Doc Rules above to identify which files own the changed information.
|
|
15
13
|
3. Read `docs/project-docs/index.md` and `docs/project-docs/technical-guidelines/index.md` when present and treat them as the authoritative inventories for optional docs and guideline docs.
|
|
16
14
|
4. When clearly named reference or archive folders such as `docs-legacy/`, `docs-old/`, `archive/`, or `reference/` exist, read them as migration input only and do not treat them as owner-doc paths.
|
|
17
15
|
5. Update only the affected docs and any documents that summarize them.
|
|
@@ -72,7 +70,7 @@ Your result should state:
|
|
|
72
70
|
|
|
73
71
|
Before finishing, check that:
|
|
74
72
|
|
|
75
|
-
1. the updated docs still match the
|
|
73
|
+
1. the updated docs still match the EHA Project Doc Rules above
|
|
76
74
|
2. platform instruction surfaces and skills would now read the correct project-specific truth
|
|
77
75
|
3. no stale summary remains in `foundation/status.md`, `docs/project-docs/index.md`, `technical-guidelines/index.md`, or other index docs
|
|
78
76
|
|
|
@@ -23,5 +23,5 @@ Act as a Senior Engineer / Agile Product Manager to help the user brainstorm and
|
|
|
23
23
|
## Inputs
|
|
24
24
|
|
|
25
25
|
- The user's rough feature idea or concept.
|
|
26
|
-
- `docs/project-docs/foundation/prd.md` (to understand current scope)
|
|
27
|
-
- `docs/project-docs/foundation/architecture.md` (to understand current stack constraints)
|
|
26
|
+
- Read `docs/project-docs/foundation/prd.md` if it exists (to understand current scope).
|
|
27
|
+
- Read `docs/project-docs/foundation/architecture.md` if it exists (to understand current stack constraints).
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
trigger: always_on
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
description: "Lean always-on rules for guardrails, context, intake, verification, and doc sync."
|
|
7
|
-
---
|
|
8
|
-
|
|
9
1
|
# Agent Rules
|
|
10
2
|
|
|
11
3
|
## 1. Guardrails & Approach
|
|
@@ -22,7 +14,10 @@ Protect the prompt prefix cache and manage context-window capacity to preserve t
|
|
|
22
14
|
|
|
23
15
|
- **2.1** Keep always-on context small. Keep rules generic and leave project-specific facts in project docs under `docs/project-docs/`.
|
|
24
16
|
- **2.2** Read the smallest owning doc that resolves the decision rather than scanning the entire repository.
|
|
25
|
-
- **2.3** **
|
|
17
|
+
- **2.3** **Agent-Specific Cache Strategies:**
|
|
18
|
+
- **Claude (Prefix & Lookback Integrity):** Cache reads cost 90% less but require a byte-identical prefix in tools -> system -> messages order. Never reorder, add, or remove tool definitions mid-session. Never inject dynamic content (timestamps, per-request IDs) into the system prompt. In heavy agentic loops, be aware of the ~20-block lookback window; explicitly request the user to perform a minor conversational interaction to prevent silent cache misses.
|
|
19
|
+
- **Antigravity (Prefix Stability):** Never reorder tool definitions, system instructions, or serialized schemas mid-session. The implicit prefix cache requires a byte-identical prompt prefix for the 90% cached-token discount. Append all per-turn dynamic data after the stable prefix. If cache-hit rates drop unexpectedly, suspect non-deterministic serialization.
|
|
20
|
+
- **Copilot (Context Efficiency):** Under usage-based billing, cached tokens still cost AI Credits — keep instruction files and session context lean rather than exhaustive. Prefer explicit context (`#file`, `#selection`) over broad implicit context. Start a fresh session or use `/clear` when switching to an unrelated task to prevent context clutter.
|
|
26
21
|
- **2.4** **Session Continuity (No Dynamic Compaction):** Never modify, compact, or delete prior chat turns mid-session—this destroys the hardware prefix cache. If context reaches ~65% capacity, compile a comprehensive session-handoff.md to `active-repo/memories/session/session-handoff.md` (overwriting any previous handoff, and ensure `active-repo/memories/session/` is added to `.gitignore` if created). The handoff must contain a full, detailed summary of the active conversation's progress, decisions, and open threads, strictly redact all sensitive information (such as API keys, passwords, credentials, or PII), and incorporate any user-provided compaction arguments as next-session focus areas. Prompt the user to run `/clear` or open a new session with this file loaded, providing a copy-pasteable short prompt (e.g., "Resume session from memories/session/session-handoff.md") to load the handoff instantly.
|
|
27
22
|
|
|
28
23
|
## 3. Intake & Scope Alignment
|
|
@@ -58,9 +53,9 @@ Embed the critical behavioral rules from the contract so agents follow them with
|
|
|
58
53
|
- **5.2 Decision Precedence:** Resolve routing, conflict, and behavior decisions in this strict order:
|
|
59
54
|
1. User's requested goal and output.
|
|
60
55
|
2. User's explicit constraints or preferences.
|
|
61
|
-
3. The active
|
|
56
|
+
3. The active EHA rules and the owning project docs under `docs/project-docs/`.
|
|
62
57
|
4. Attached context (skills, notes, or examples) treated as relevance hints unless made mandatory.
|
|
63
58
|
5. Automatic agent judgment.
|
|
64
59
|
- **5.3 Failure & Fallback:** If a required project doc is missing, note the gap and create the smallest owning doc that unblocks the task. If code, tests, configs, or runtime-facing artifacts conflict with active docs and authority is unclear, do not guess: surface the conflict, cite the evidence, and ask the user before choosing the fix path.
|
|
65
60
|
- **5.4 Codebase & Comment Integrity:** Maintain absolute documentation and codebase integrity when making modifications. Preserve all existing comments, docstrings, formatting, and structures that are unrelated to your changes unless explicitly instructed otherwise. Never delete unrelated comments or placeholder code silently.
|
|
66
|
-
- **5.5 Completion & Verification:** End each task with the requested output and the narrowest applicable validation from `docs/project-docs/testing.md` (or a structural review with an explicit limitation if no executable check exists). Re-read output for correctness, edge cases, and unexpected side effects before finishing. Include a doc-sync check when ownership changed.
|
|
61
|
+
- **5.5 Completion & Verification:** End each task with the requested output and the narrowest applicable validation from `docs/project-docs/testing.md` (or a structural review with an explicit limitation if no executable check exists). Re-read output for correctness, edge cases, and unexpected side effects before finishing. Include a doc-sync check when ownership changed.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Database Schema Design Skill
|
|
2
|
+
|
|
3
|
+
You are an expert Database Architect. Your task is to design robust, scalable, and normalized database schemas (or optimized NoSQL data models) based on the project's requirements.
|
|
4
|
+
|
|
5
|
+
## Responsibilities
|
|
6
|
+
1. Analyze `docs/project-docs/foundation/prd.md` to understand data storage needs.
|
|
7
|
+
2. Design tables/collections, defining strict types, primary keys, and foreign keys.
|
|
8
|
+
3. Establish proper indexes for common query patterns to ensure high performance.
|
|
9
|
+
4. Document the relationships (1:1, 1:N, M:N) clearly in `docs/project-docs/technical/database.md`.
|
|
10
|
+
|
|
11
|
+
## Output Constraints
|
|
12
|
+
- Always use standard Entity-Relationship terminology.
|
|
13
|
+
- When generating SQL schemas, prefer standard ANSI SQL unless a specific dialect (e.g., PostgreSQL, MySQL) is requested.
|
|
14
|
+
- Highlight any potential bottlenecks (e.g., heavily joined tables, wide rows).
|
|
@@ -18,7 +18,7 @@ This skill is intentionally **not tied to any single stack or framework**. When
|
|
|
18
18
|
|
|
19
19
|
| Document | Why it matters |
|
|
20
20
|
| --- | --- |
|
|
21
|
-
|
|
|
21
|
+
| EHA Rules | Defines routing, ownership, precedence, and the active skill model |
|
|
22
22
|
|
|
23
23
|
| `docs/project-docs/technical/testing.md` | Defines executable and non-executable verification rules, commands, and fallback policy |
|
|
24
24
|
| `docs/project-docs/foundation/architecture.md` | Defines boundaries, stack, interfaces, dependency rules, and runtime assumptions |
|
|
@@ -16,7 +16,7 @@ This skill is the reusable complement to the parity reusable prompt. Use it when
|
|
|
16
16
|
|
|
17
17
|
| Document | Why it matters |
|
|
18
18
|
| --- | --- |
|
|
19
|
-
|
|
|
19
|
+
| EHA Rules | Ownership map and canonical doc taxonomy |
|
|
20
20
|
| `docs/project-docs/foundation/prd.md` | Active project identity and scope |
|
|
21
21
|
| `docs/project-docs/foundation/architecture.md` | Active stack and architecture truth |
|
|
22
22
|
| `docs/project-docs/technical/testing.md` | Active verification truth |
|
|
@@ -59,7 +59,7 @@ Check for disagreement across:
|
|
|
59
59
|
|
|
60
60
|
### Step 1 — Establish the source of truth
|
|
61
61
|
|
|
62
|
-
Use the
|
|
62
|
+
Use the active EHA rules as the default source of truth for documentation ownership unless the repository explicitly states otherwise.
|
|
63
63
|
|
|
64
64
|
### Step 2 — Compare dependent layers
|
|
65
65
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Refactoring Specialist Skill
|
|
2
|
+
|
|
3
|
+
You are a strict, senior Software Architect specialized in cleaning up technical debt, reducing cyclomatic complexity, and improving maintainability.
|
|
4
|
+
|
|
5
|
+
## Responsibilities
|
|
6
|
+
1. Analyze target files for anti-patterns, duplicated logic, and overly complex control flows.
|
|
7
|
+
2. Break down monolithic functions into smaller, highly testable, pure functions.
|
|
8
|
+
3. Apply SOLID principles and appropriate design patterns without over-engineering.
|
|
9
|
+
|
|
10
|
+
## Output Constraints
|
|
11
|
+
- Ensure all refactored code has identical external behavior (unless explicitly fixing a bug).
|
|
12
|
+
- Preserve all existing comments and docstrings unless they are invalidated by the new architecture.
|
|
13
|
+
- Briefly explain the core structural changes before writing the code.
|
|
@@ -145,7 +145,7 @@ Separate:
|
|
|
145
145
|
| Interface, handler, adapter, or contract boundary | Contract or integration test | `testing.md`, API / integration docs |
|
|
146
146
|
| Interactive or end-user-visible flow | UI or end-to-end test | `testing.md`, app-flow / UI docs |
|
|
147
147
|
| Asynchronous, scheduled, staged, or event-driven processing | Integration or component test | `testing.md`, `architecture.md`, workflow docs |
|
|
148
|
-
| Rule, skill, reusable prompt, or documentation change | Consistency review or structural validation |
|
|
148
|
+
| Rule, skill, reusable prompt, or documentation change | Consistency review or structural validation | EHA rules, `testing.md` |
|
|
149
149
|
|
|
150
150
|
---
|
|
151
151
|
|
|
@@ -199,3 +199,179 @@ When using this skill, the output should include:
|
|
|
199
199
|
- "What tests should cover this API contract update?"
|
|
200
200
|
- "Write a test plan for this migration change"
|
|
201
201
|
- "This repo has no code yet — how should I validate a reusable prompt or platform instruction surface update?"
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
# Test Patterns Reference — Project-Aware
|
|
207
|
+
|
|
208
|
+
Quick reference for common test-pattern shapes. Use these as **structural examples**, then adapt them using the repository's `testing.md`, `architecture.md`, and local conventions.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Pattern A: Narrow Unit Or Component Test
|
|
213
|
+
|
|
214
|
+
Use when you want the fastest check at a clear boundary.
|
|
215
|
+
|
|
216
|
+
### Pattern A Skeleton
|
|
217
|
+
|
|
218
|
+
```text
|
|
219
|
+
Arrange inputs and collaborators
|
|
220
|
+
Act on one function, method, or component boundary
|
|
221
|
+
Assert on the returned value, state change, or emitted effect
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Pattern A Good Fit
|
|
225
|
+
|
|
226
|
+
- pure functions
|
|
227
|
+
- mappers or transformers
|
|
228
|
+
- validators
|
|
229
|
+
- repository or service methods with mocked dependencies
|
|
230
|
+
- small boundary-level business logic
|
|
231
|
+
|
|
232
|
+
### Pattern A Checklist
|
|
233
|
+
|
|
234
|
+
- isolate one behavior
|
|
235
|
+
- keep collaborators fake or mocked when helpful
|
|
236
|
+
- assert on outcomes, not internal implementation noise
|
|
237
|
+
- name tests by observable behavior
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Pattern B: Persistence Or Contract Test
|
|
242
|
+
|
|
243
|
+
Use when you need confidence in schema, queries, serialization, or boundary compatibility.
|
|
244
|
+
|
|
245
|
+
### Pattern B Skeleton
|
|
246
|
+
|
|
247
|
+
```text
|
|
248
|
+
Set up an isolated persistence or contract environment
|
|
249
|
+
Insert or send representative inputs
|
|
250
|
+
Read back or decode the resulting output
|
|
251
|
+
Assert on correctness, constraints, and error cases
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Pattern B Good Fit
|
|
255
|
+
|
|
256
|
+
- database queries
|
|
257
|
+
- repository persistence rules
|
|
258
|
+
- schema evolution
|
|
259
|
+
- migration behavior
|
|
260
|
+
- request / response or message serialization
|
|
261
|
+
- interface compatibility checks
|
|
262
|
+
|
|
263
|
+
### Pattern B Checklist
|
|
264
|
+
|
|
265
|
+
- include one happy path
|
|
266
|
+
- include one invalid or edge case
|
|
267
|
+
- assert on durable outcomes, not just returned status
|
|
268
|
+
- use representative fixtures where that improves clarity
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Pattern C: Flow Or Interaction Test
|
|
273
|
+
|
|
274
|
+
Use when the value lies in verifying a user, operator, or system flow instead of an isolated unit.
|
|
275
|
+
|
|
276
|
+
### Pattern C Skeleton
|
|
277
|
+
|
|
278
|
+
```text
|
|
279
|
+
Start from a realistic entry point
|
|
280
|
+
Drive the interaction or workflow
|
|
281
|
+
Wait for the expected state transition
|
|
282
|
+
Assert on visible output, routed behavior, or side effects
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Pattern C Good Fit
|
|
286
|
+
|
|
287
|
+
- UI interactions
|
|
288
|
+
- endpoint-to-service flow
|
|
289
|
+
- command or job workflows
|
|
290
|
+
- integration boundaries
|
|
291
|
+
- navigation or routing flows
|
|
292
|
+
|
|
293
|
+
### Pattern C Checklist
|
|
294
|
+
|
|
295
|
+
- keep the flow focused on one meaningful outcome
|
|
296
|
+
- mock or isolate irrelevant external dependencies when possible
|
|
297
|
+
- assert on the behavior the caller or user experiences
|
|
298
|
+
- avoid testing multiple unrelated journeys in one case
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Common Assertions To Prefer
|
|
303
|
+
|
|
304
|
+
- returned values or result envelopes
|
|
305
|
+
- persisted state
|
|
306
|
+
- emitted events or messages
|
|
307
|
+
- visible UI state
|
|
308
|
+
- boundary calls that materially define behavior
|
|
309
|
+
- error category and recovery path
|
|
310
|
+
|
|
311
|
+
Prefer observable behavior over internal implementation details.
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Common Anti-Patterns
|
|
316
|
+
|
|
317
|
+
- testing too many branches in one test
|
|
318
|
+
- asserting on private implementation details
|
|
319
|
+
- using full integration tests when a narrow unit or contract test would falsify the same assumption
|
|
320
|
+
- naming tests after implementation rather than behavior
|
|
321
|
+
- copying framework-specific scaffolds without checking `testing.md`
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
# Test Type Decision Table — Project-Aware
|
|
327
|
+
|
|
328
|
+
Use this table to choose the smallest verification type that matches the actual boundary being changed. Confirm the final choice against the repository's `testing.md`.
|
|
329
|
+
|
|
330
|
+
| Scenario | Preferred check type | Why |
|
|
331
|
+
| --- | --- | --- |
|
|
332
|
+
| Pure function, mapper, validator, parser | Unit | Fastest falsifiable check with minimal setup |
|
|
333
|
+
| Internal service or repository rule | Unit or component | Verifies business behavior without unnecessary system setup |
|
|
334
|
+
| Persistence query, migration, or schema rule | Persistence / migration test | Verifies durable state and compatibility at the right boundary |
|
|
335
|
+
| Request, handler, controller, or public API contract | Contract or integration test | Verifies visible boundary behavior and schema expectations |
|
|
336
|
+
| UI or operator interaction flow | Flow / interaction test | Verifies user-visible behavior rather than isolated internals |
|
|
337
|
+
| Async job, workflow, or queue behavior | Component or integration test | Verifies sequencing, retry, and side-effect behavior |
|
|
338
|
+
| Documentation, reusable prompt, or platform instruction surfaces change | Structural consistency review | Executable tests may not exist; consistency becomes the real boundary |
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## Test Type Summary
|
|
343
|
+
|
|
344
|
+
| Type | Best for | Typical cost | Isolation |
|
|
345
|
+
| --- | --- | --- | --- |
|
|
346
|
+
| Unit | Pure logic and narrow behavior | Lowest | Highest |
|
|
347
|
+
| Component | One internal boundary with collaborators | Low to medium | High |
|
|
348
|
+
| Persistence / contract | Durable state or schema behavior | Low to medium | Medium to high |
|
|
349
|
+
| Flow / interaction | User or system-visible path | Medium | Medium |
|
|
350
|
+
| Integration | Real dependency or end-to-end boundary | Highest | Lowest |
|
|
351
|
+
| Consistency review | Docs, reusable prompts, platform instruction surfaces, and template systems | Low | High |
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## Selection Rules
|
|
356
|
+
|
|
357
|
+
1. Prefer the narrowest check that can prove the change is correct.
|
|
358
|
+
2. Escalate to broader tests only when the boundary truly requires it.
|
|
359
|
+
3. Use project docs to choose commands, harnesses, and file placement.
|
|
360
|
+
4. When no executable validation exists, make the structural review explicit rather than pretending the repo is fully testable.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## Naming Guidance
|
|
365
|
+
|
|
366
|
+
Prefer behavior-driven names such as:
|
|
367
|
+
|
|
368
|
+
- `returns empty result when no records match`
|
|
369
|
+
- `rejects invalid payload when required field is missing`
|
|
370
|
+
- `shows retry state after dependency timeout`
|
|
371
|
+
- `persists latest progress after successful update`
|
|
372
|
+
|
|
373
|
+
Avoid placeholder names such as:
|
|
374
|
+
|
|
375
|
+
- `test1`
|
|
376
|
+
- `happy path`
|
|
377
|
+
- `error case`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# UI/UX Implementation Skill
|
|
2
|
+
|
|
3
|
+
You are a Senior Frontend Engineer specialized in translating design requirements into pixel-perfect, accessible, and responsive user interfaces.
|
|
4
|
+
|
|
5
|
+
## Responsibilities
|
|
6
|
+
1. Translate conceptual designs or `ui-ux.md` requirements into modular component code (React, Vue, HTML/CSS, etc.).
|
|
7
|
+
2. Enforce mobile-first responsive design principles.
|
|
8
|
+
3. Ensure strict adherence to Web Content Accessibility Guidelines (WCAG 2.1 AA), including proper ARIA labels, semantic HTML, and keyboard navigation.
|
|
9
|
+
|
|
10
|
+
## Output Constraints
|
|
11
|
+
- Write clean, modular, and reusable frontend components.
|
|
12
|
+
- Do not introduce new CSS frameworks unless strictly permitted by the repository's configuration.
|
|
13
|
+
- Always include hover, focus, and active states for interactive elements.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# CI/CD Authoring Skill
|
|
2
|
+
|
|
3
|
+
You are a DevOps Engineer specializing in Continuous Integration and Continuous Deployment pipelines.
|
|
4
|
+
|
|
5
|
+
## Responsibilities
|
|
6
|
+
1. Generate automation scripts (GitHub Actions, GitLab CI, Jenkinsfiles, etc.) based on the project's build, test, and deployment requirements.
|
|
7
|
+
2. Write optimized `Dockerfile` and `docker-compose.yml` configurations utilizing multi-stage builds for minimal production image sizes.
|
|
8
|
+
3. Configure secure handling of secrets and environment variables.
|
|
9
|
+
|
|
10
|
+
## Output Constraints
|
|
11
|
+
- Prioritize security: Never hardcode secrets. Always use native secret injection mechanisms.
|
|
12
|
+
- Prioritize performance: Utilize caching mechanisms for dependencies (e.g., node_modules, maven layers).
|
|
13
|
+
- Keep pipeline YAML configurations extremely clean and well-commented.
|