@sallmarta/eye-hate-agent 1.0.2 → 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.
- package/README.md +56 -304
- package/bin/eha.js +203 -118
- package/docs/templates/project-docs-template/index.md +208 -0
- package/docs/templates/project-docs-template/technical-guidelines/index.md +81 -0
- package/docs/templates/reusable-prompts/00-project-docs-bootstrap.md +40 -0
- package/docs/{vibes → templates}/reusable-prompts/00-project-docs-parity.md +4 -6
- package/docs/{vibes → templates}/reusable-prompts/00-project-docs-refresh.md +11 -11
- package/docs/{vibes → templates}/reusable-prompts/01-sdd-execute.md +1 -1
- package/docs/{vibes → templates}/reusable-prompts/02-sdd-discuss.md +3 -3
- package/{.agents/rules/agent.md → docs/templates/rules/agent-rules.md} +7 -12
- package/docs/{vibes → templates}/skills/api-design/SKILL.md +14 -25
- package/docs/{vibes/skills/full-verification → templates/skills/code-audit}/SKILL.md +36 -54
- package/docs/templates/skills/db-schema-design/SKILL.md +120 -0
- package/docs/templates/skills/devops-ci-cd/SKILL.md +99 -0
- package/docs/templates/skills/observability/SKILL.md +99 -0
- package/docs/{vibes/skills/parity → templates/skills/parity-audit}/SKILL.md +26 -52
- package/docs/templates/skills/refactor/SKILL.md +100 -0
- package/docs/templates/skills/security-audit/SKILL.md +149 -0
- package/docs/{vibes/skills/analysis → templates/skills/system-analysis}/SKILL.md +19 -41
- package/docs/{vibes/skills/test-authoring → templates/skills/system-tester}/SKILL.md +28 -46
- package/docs/templates/skills/ui-ux-design/SKILL.md +102 -0
- package/docs/templates/skills/wireframing/SKILL.md +88 -0
- package/package.json +4 -6
- package/src/engine/index.js +9 -12
- package/src/engine/install.js +67 -165
- package/src/engine/runtime-adapters.js +266 -50
- package/src/engine/skill-registry.js +72 -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 -299
- 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/index.md +0 -66
- 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/project-docs-template/technical-guidelines/index.md +0 -52
- package/docs/vibes/reusable-prompts/00-project-docs-bootstrap.md +0 -59
- package/docs/vibes/skills/code-audit/SKILL.md +0 -170
- 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
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const path = require('node:path');
|
|
2
|
+
|
|
3
|
+
const SKILL_DEFINITIONS = {
|
|
4
|
+
'system-analysis': {
|
|
5
|
+
id: 'system-analysis',
|
|
6
|
+
commandName: 'system-analysis',
|
|
7
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'system-analysis', 'SKILL.md'),
|
|
8
|
+
},
|
|
9
|
+
'api-design': {
|
|
10
|
+
id: 'api-design',
|
|
11
|
+
commandName: 'api-design',
|
|
12
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'api-design', 'SKILL.md'),
|
|
13
|
+
},
|
|
14
|
+
'db-schema-design': {
|
|
15
|
+
id: 'db-schema-design',
|
|
16
|
+
commandName: 'db-schema-design',
|
|
17
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'db-schema-design', 'SKILL.md'),
|
|
18
|
+
},
|
|
19
|
+
'ui-ux-design': {
|
|
20
|
+
id: 'ui-ux-design',
|
|
21
|
+
commandName: 'ui-ux-design',
|
|
22
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'ui-ux-design', 'SKILL.md'),
|
|
23
|
+
},
|
|
24
|
+
'wireframing': {
|
|
25
|
+
id: 'wireframing',
|
|
26
|
+
commandName: 'wireframing',
|
|
27
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'wireframing', 'SKILL.md'),
|
|
28
|
+
},
|
|
29
|
+
'code-audit': {
|
|
30
|
+
id: 'code-audit',
|
|
31
|
+
commandName: 'code-audit',
|
|
32
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'code-audit', 'SKILL.md'),
|
|
33
|
+
},
|
|
34
|
+
'parity-audit': {
|
|
35
|
+
id: 'parity-audit',
|
|
36
|
+
commandName: 'parity-audit',
|
|
37
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'parity-audit', 'SKILL.md'),
|
|
38
|
+
},
|
|
39
|
+
'security-audit': {
|
|
40
|
+
id: 'security-audit',
|
|
41
|
+
commandName: 'security-audit',
|
|
42
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'security-audit', 'SKILL.md'),
|
|
43
|
+
},
|
|
44
|
+
'system-tester': {
|
|
45
|
+
id: 'system-tester',
|
|
46
|
+
commandName: 'system-tester',
|
|
47
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'system-tester', 'SKILL.md'),
|
|
48
|
+
},
|
|
49
|
+
'devops-ci-cd': {
|
|
50
|
+
id: 'devops-ci-cd',
|
|
51
|
+
commandName: 'devops-ci-cd',
|
|
52
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'devops-ci-cd', 'SKILL.md'),
|
|
53
|
+
},
|
|
54
|
+
'observability': {
|
|
55
|
+
id: 'observability',
|
|
56
|
+
commandName: 'observability',
|
|
57
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'observability', 'SKILL.md'),
|
|
58
|
+
},
|
|
59
|
+
'refactor': {
|
|
60
|
+
id: 'refactor',
|
|
61
|
+
commandName: 'refactor',
|
|
62
|
+
repoRelativePath: path.join('docs', 'templates', 'skills', 'refactor', 'SKILL.md'),
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
function listSkills() {
|
|
67
|
+
return Object.values(SKILL_DEFINITIONS).map((skill) => ({ ...skill }));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
module.exports = {
|
|
71
|
+
listSkills,
|
|
72
|
+
};
|
package/src/engine/state.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
const fs = require('node:fs');
|
|
2
2
|
const path = require('node:path');
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const ROOT_MARKERS = ['package.json', '.git'];
|
|
5
|
+
const DEFAULT_CONFIG = {
|
|
6
|
+
configVersion: 1,
|
|
7
|
+
agent: null,
|
|
8
|
+
};
|
|
6
9
|
|
|
7
10
|
function ensureDir(dirPath) {
|
|
8
11
|
fs.mkdirSync(dirPath, { recursive: true });
|
|
@@ -62,14 +65,31 @@ function getEnginePaths(rootDir) {
|
|
|
62
65
|
const ehaDir = path.join(rootDir, '.eha');
|
|
63
66
|
return {
|
|
64
67
|
ehaDir,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
configPath: path.join(ehaDir, 'config.json'),
|
|
69
|
+
manifestPath: path.join(ehaDir, 'manifest.json'),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function normalizeConfig(config) {
|
|
74
|
+
const candidate = config && typeof config === 'object' ? config : {};
|
|
75
|
+
return {
|
|
76
|
+
configVersion: Number.isInteger(candidate.configVersion) ? candidate.configVersion : DEFAULT_CONFIG.configVersion,
|
|
77
|
+
agent: candidate.agent ? String(candidate.agent).trim().toLowerCase() : null,
|
|
70
78
|
};
|
|
71
79
|
}
|
|
72
80
|
|
|
81
|
+
function readConfig(rootDir) {
|
|
82
|
+
const { configPath } = getEnginePaths(rootDir);
|
|
83
|
+
return normalizeConfig(readJsonIfExists(configPath) || DEFAULT_CONFIG);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function writeConfig(rootDir, value) {
|
|
87
|
+
const { configPath } = getEnginePaths(rootDir);
|
|
88
|
+
const normalizedConfig = normalizeConfig(value);
|
|
89
|
+
writeJson(configPath, normalizedConfig);
|
|
90
|
+
return normalizedConfig;
|
|
91
|
+
}
|
|
92
|
+
|
|
73
93
|
function removeFileIfExists(filePath) {
|
|
74
94
|
if (fs.existsSync(filePath)) {
|
|
75
95
|
fs.unlinkSync(filePath);
|
|
@@ -101,9 +121,11 @@ module.exports = {
|
|
|
101
121
|
getBundledAssetPath,
|
|
102
122
|
getEnginePaths,
|
|
103
123
|
getPackageRoot,
|
|
124
|
+
readConfig,
|
|
104
125
|
readJsonIfExists,
|
|
105
126
|
removeEmptyParents,
|
|
106
127
|
removeFileIfExists,
|
|
128
|
+
writeConfig,
|
|
107
129
|
writeJson,
|
|
108
130
|
writeText,
|
|
109
131
|
};
|
|
@@ -4,45 +4,36 @@ const WORKFLOW_DEFINITIONS = {
|
|
|
4
4
|
bootstrap: {
|
|
5
5
|
id: 'bootstrap',
|
|
6
6
|
commandName: 'bootstrap',
|
|
7
|
-
description: '
|
|
8
|
-
repoRelativePath: path.join('docs', '
|
|
7
|
+
description: 'Generate the initial project documentation set',
|
|
8
|
+
repoRelativePath: path.join('docs', 'templates', 'reusable-prompts', '00-project-docs-bootstrap.md'),
|
|
9
9
|
},
|
|
10
10
|
refresh: {
|
|
11
11
|
id: 'refresh',
|
|
12
12
|
commandName: 'refresh',
|
|
13
|
-
description: '
|
|
14
|
-
repoRelativePath: path.join('docs', '
|
|
13
|
+
description: 'Refresh project docs after a change in scope, stack, or behavior',
|
|
14
|
+
repoRelativePath: path.join('docs', 'templates', 'reusable-prompts', '00-project-docs-refresh.md'),
|
|
15
15
|
},
|
|
16
16
|
parity: {
|
|
17
17
|
id: 'parity',
|
|
18
18
|
commandName: 'parity',
|
|
19
|
-
description: '
|
|
20
|
-
repoRelativePath: path.join('docs', '
|
|
19
|
+
description: 'Audit for documentation drift and ownership mismatches',
|
|
20
|
+
repoRelativePath: path.join('docs', 'templates', 'reusable-prompts', '00-project-docs-parity.md'),
|
|
21
21
|
},
|
|
22
22
|
discuss: {
|
|
23
23
|
id: 'discuss',
|
|
24
24
|
commandName: 'discuss',
|
|
25
|
-
description: '
|
|
26
|
-
repoRelativePath: path.join('docs', '
|
|
25
|
+
description: 'Brainstorm and finalize a feature spec before implementation',
|
|
26
|
+
repoRelativePath: path.join('docs', 'templates', 'reusable-prompts', '02-sdd-discuss.md'),
|
|
27
27
|
},
|
|
28
|
-
execute: {
|
|
29
|
-
id: 'execute',
|
|
30
|
-
commandName: 'execute',
|
|
31
|
-
description: '
|
|
32
|
-
repoRelativePath: path.join('docs', '
|
|
33
|
-
},
|
|
34
|
-
verify: {
|
|
35
|
-
id: 'verify',
|
|
36
|
-
commandName: 'verify',
|
|
37
|
-
description: 'Prepare the verification workflow',
|
|
38
|
-
repoRelativePath: path.join('docs', 'vibes', 'reusable-prompts', '00-project-docs-parity.md'),
|
|
39
|
-
capabilityNote: 'A dedicated verify workflow does not exist yet; verify currently routes to the parity workflow.',
|
|
28
|
+
'sdd-execute': {
|
|
29
|
+
id: 'sdd-execute',
|
|
30
|
+
commandName: 'sdd-execute',
|
|
31
|
+
description: 'Translate a project specification into tested, working code',
|
|
32
|
+
repoRelativePath: path.join('docs', 'templates', 'reusable-prompts', '01-sdd-execute.md'),
|
|
40
33
|
},
|
|
41
34
|
};
|
|
42
35
|
|
|
43
|
-
const WORKFLOW_ALIASES = {
|
|
44
|
-
init: 'bootstrap',
|
|
45
|
-
};
|
|
36
|
+
const WORKFLOW_ALIASES = {};
|
|
46
37
|
|
|
47
38
|
function normalizeWorkflowId(input) {
|
|
48
39
|
if (!input) {
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Run the EHA bootstrap workflow"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Read `docs/eyehateagent-contract.md` first.
|
|
6
|
-
|
|
7
|
-
Execute `docs/vibes/reusable-prompts/00-project-docs-bootstrap.md`.
|
|
8
|
-
|
|
9
|
-
If the user provides additional context, apply it while preserving the workflow's output contract and the owning-doc rules in `docs/project-docs/`.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Run the EHA discuss workflow"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Read `docs/eyehateagent-contract.md` first.
|
|
6
|
-
|
|
7
|
-
Execute `docs/vibes/reusable-prompts/02-sdd-discuss.md`.
|
|
8
|
-
|
|
9
|
-
If the user provides additional context, apply it while preserving the workflow's output contract and the owning-doc rules in `docs/project-docs/`.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Run the EHA execute workflow"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Read `docs/eyehateagent-contract.md` first.
|
|
6
|
-
|
|
7
|
-
Execute `docs/vibes/reusable-prompts/01-sdd-execute.md`.
|
|
8
|
-
|
|
9
|
-
If the user provides additional context, apply it while preserving the workflow's output contract and the owning-doc rules in `docs/project-docs/`.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Run the EHA parity workflow"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Read `docs/eyehateagent-contract.md` first.
|
|
6
|
-
|
|
7
|
-
Execute `docs/vibes/reusable-prompts/00-project-docs-parity.md`.
|
|
8
|
-
|
|
9
|
-
If the user provides additional context, apply it while preserving the workflow's output contract and the owning-doc rules in `docs/project-docs/`.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Run the EHA refresh workflow"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Read `docs/eyehateagent-contract.md` first.
|
|
6
|
-
|
|
7
|
-
Execute `docs/vibes/reusable-prompts/00-project-docs-refresh.md`.
|
|
8
|
-
|
|
9
|
-
If the user provides additional context, apply it while preserving the workflow's output contract and the owning-doc rules in `docs/project-docs/`.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Run the EHA verify workflow"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Read `docs/eyehateagent-contract.md` first.
|
|
6
|
-
|
|
7
|
-
Execute `docs/vibes/reusable-prompts/00-project-docs-parity.md`.
|
|
8
|
-
|
|
9
|
-
If the user provides additional context, apply it while preserving the workflow's output contract and the owning-doc rules in `docs/project-docs/`.
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Lean always-on rules for guardrails, context, intake, verification, and doc sync."
|
|
3
|
-
applyTo: "**"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Agent Rules
|
|
7
|
-
|
|
8
|
-
## 1. Guardrails & Approach
|
|
9
|
-
|
|
10
|
-
Prevent unilateral changes that could surprise the user and balance proactive execution with alignment.
|
|
11
|
-
|
|
12
|
-
- **1.1** Ask before making material architecture, naming, or tool changes. Skip this for micro-decisions.
|
|
13
|
-
- **1.2** Balance proactive execution with user alignment so initiative never outpaces agreement.
|
|
14
|
-
- **1.3** If a better approach exists, compare the user's apparent expectation with the recommended path clearly and briefly. Use a short table when that sharpens the tradeoff. Phrasing to use: *"I have an alternative approach that may be better - want me to use it instead?"*
|
|
15
|
-
|
|
16
|
-
## 2. Context & Cache Integrity
|
|
17
|
-
|
|
18
|
-
Protect the prompt prefix cache and manage context-window capacity to preserve the 90% cached-token discount.
|
|
19
|
-
|
|
20
|
-
- **2.1** Keep always-on context small. Keep rules generic and leave project-specific facts in project docs under `docs/project-docs/`.
|
|
21
|
-
- **2.2** Read the smallest owning doc that resolves the decision rather than scanning the entire repository.
|
|
22
|
-
- **2.3** **Prefix & Lookback Integrity (Claude):** 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 — move it to a late user message instead.
|
|
23
|
-
- **2.4** **Claude Cache Breakpoints:** In heavy agentic loops, be aware of the ~20-block lookback window. If a single turn produces more than ~15 tool-use/tool-result pairs, explicitly request the user to perform a minor conversational interaction or place a cache breakpoint block to prevent silent cache misses on subsequent turns.
|
|
24
|
-
- **2.5** **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.
|
|
25
|
-
|
|
26
|
-
## 3. Intake & Scope Alignment
|
|
27
|
-
|
|
28
|
-
Structure incoming requests before acting to reduce rework and catch ambiguity early.
|
|
29
|
-
|
|
30
|
-
- **3.1** For non-trivial tasks, follow this 7-step checklist before coding:
|
|
31
|
-
1. Summarize the request in 1–3 sentences.
|
|
32
|
-
2. Analyze before implementing. Brainstorm when the task benefits from options, tradeoffs, or sequencing.
|
|
33
|
-
3. Ask clarifying questions when the request is ambiguous, under-specified, expectations are misplaced, or confidence is below 95%. **Clarify scope or output format before execution, not at completion.**
|
|
34
|
-
4. Make a short ordered plan or todo list.
|
|
35
|
-
5. Treat a user-provided list as full scope unless the user changes it.
|
|
36
|
-
6. Confirm if the plan could materially change scope, output, or direction.
|
|
37
|
-
7. Then proceed.
|
|
38
|
-
- **3.2** Skip the intake checklist only for trivial single-step edits.
|
|
39
|
-
|
|
40
|
-
## 4. Docs, Verification, and Completion
|
|
41
|
-
|
|
42
|
-
Ensure every task ends with verified output, synchronized documentation, and clear follow-ups.
|
|
43
|
-
|
|
44
|
-
- **4.1** State a point once, in its strongest owning section.
|
|
45
|
-
- **4.2** Default live response shape when no stronger format applies: Summary -> What I'll Do -> Result or Next Action -> Validation or Limitation -> Optional Follow-Up.
|
|
46
|
-
- **4.3** Stronger formats win: user formatting requests > mode-specific files > skill or prompt `Output Contract`.
|
|
47
|
-
- **4.4** **Knowledge & Memory Preservation:** Preserve unique information when writing to memory. If valuable legacy or codebase knowledge does not fit standard headings, decide: new section, new file, or ask the user if the best location is ambiguous.
|
|
48
|
-
- **4.5** **Documentation Sync:** After code or rule changes, sync affected docs under `docs/project-docs/` to ensure they remain the canonical source of truth.
|
|
49
|
-
- **4.6** **Follow-Up Suggestions:** After completing a task, you may suggest 1–3 high-value, optional next actions. Never apply them silently. Phrasing: *"Task complete. Noticed X could be improved - want me to handle that too? or I can explain it if you want to review first."*
|
|
50
|
-
|
|
51
|
-
## 5. Contract Essentials
|
|
52
|
-
|
|
53
|
-
Embed the critical behavioral rules from the contract so agents follow them without opening the full contract on every task.
|
|
54
|
-
|
|
55
|
-
- **5.1 Skills & Relevance:** Treat attached or mentioned skills as relevance hints, not automatic requirements. If a skill is clearly unnecessary, say so briefly and proceed directly unless the user insists. Prefer the single most relevant skill over chaining multiple.
|
|
56
|
-
- **5.2 Decision Precedence:** Resolve routing, conflict, and behavior decisions in this strict order:
|
|
57
|
-
1. User's requested goal and output.
|
|
58
|
-
2. User's explicit constraints or preferences.
|
|
59
|
-
3. The active contract (`docs/eyehateagent-contract.md`) and the owning project docs under `docs/project-docs/`.
|
|
60
|
-
4. Attached context (skills, notes, or examples) treated as relevance hints unless made mandatory.
|
|
61
|
-
5. Automatic agent judgment.
|
|
62
|
-
- **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.
|
|
63
|
-
- **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.
|
|
64
|
-
- **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.
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Lean always-on rules for guardrails, context, intake, verification, and doc sync."
|
|
3
|
-
applyTo: "**"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Agent Rules
|
|
7
|
-
|
|
8
|
-
## 1. Guardrails & Approach
|
|
9
|
-
|
|
10
|
-
Prevent unilateral changes that could surprise the user and balance proactive execution with alignment.
|
|
11
|
-
|
|
12
|
-
- **1.1** Ask before making material architecture, naming, or tool changes. Skip this for micro-decisions.
|
|
13
|
-
- **1.2** Balance proactive execution with user alignment so initiative never outpaces agreement.
|
|
14
|
-
- **1.3** If a better approach exists, compare the user's apparent expectation with the recommended path clearly and briefly. Use a short table when that sharpens the tradeoff. Phrasing to use: *"I have an alternative approach that may be better - want me to use it instead?"*
|
|
15
|
-
|
|
16
|
-
## 2. Context & Cache Integrity
|
|
17
|
-
|
|
18
|
-
Protect the prompt prefix cache and manage context-window capacity to preserve the 90% cached-token discount.
|
|
19
|
-
|
|
20
|
-
- **2.1** Keep always-on context small. Keep rules generic and leave project-specific facts in project docs under `docs/project-docs/`.
|
|
21
|
-
- **2.2** Read the smallest owning doc that resolves the decision rather than scanning the entire repository.
|
|
22
|
-
- **2.3** **Context Efficiency (Copilot):** 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 from degrading cache-hit quality. Do not accumulate stale file references or conversation history that is no longer relevant to the active task.
|
|
23
|
-
- **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.
|
|
24
|
-
|
|
25
|
-
## 3. Intake & Scope Alignment
|
|
26
|
-
|
|
27
|
-
Structure incoming requests before acting to reduce rework and catch ambiguity early.
|
|
28
|
-
|
|
29
|
-
- **3.1** For non-trivial tasks, follow this 7-step checklist before coding:
|
|
30
|
-
1. Summarize the request in 1–3 sentences.
|
|
31
|
-
2. Analyze before implementing. Brainstorm when the task benefits from options, tradeoffs, or sequencing.
|
|
32
|
-
3. Ask clarifying questions when the request is ambiguous, under-specified, expectations are misplaced, or confidence is below 95%. **Clarify scope or output format before execution, not at completion.**
|
|
33
|
-
4. Make a short ordered plan or todo list.
|
|
34
|
-
5. Treat a user-provided list as full scope unless the user changes it.
|
|
35
|
-
6. Confirm if the plan could materially change scope, output, or direction.
|
|
36
|
-
7. Then proceed.
|
|
37
|
-
- **3.2** Skip the intake checklist only for trivial single-step edits.
|
|
38
|
-
|
|
39
|
-
## 4. Docs, Verification, and Completion
|
|
40
|
-
|
|
41
|
-
Ensure every task ends with verified output, synchronized documentation, and clear follow-ups.
|
|
42
|
-
|
|
43
|
-
- **4.1** State a point once, in its strongest owning section.
|
|
44
|
-
- **4.2** Default live response shape when no stronger format applies: Summary -> What I'll Do -> Result or Next Action -> Validation or Limitation -> Optional Follow-Up.
|
|
45
|
-
- **4.3** Stronger formats win: user formatting requests > mode-specific files > skill or prompt `Output Contract`.
|
|
46
|
-
- **4.4** **Knowledge & Memory Preservation:** Preserve unique information when writing to memory. If valuable legacy or codebase knowledge does not fit standard headings, decide: new section, new file, or ask the user if the best location is ambiguous.
|
|
47
|
-
- **4.5** **Documentation Sync:** After code or rule changes, sync affected docs under `docs/project-docs/` to ensure they remain the canonical source of truth.
|
|
48
|
-
- **4.6** **Follow-Up Suggestions:** After completing a task, you may suggest 1–3 high-value, optional next actions. Never apply them silently. Phrasing: *"Task complete. Noticed X could be improved - want me to handle that too? or I can explain it if you want to review first."*
|
|
49
|
-
|
|
50
|
-
## 5. Contract Essentials
|
|
51
|
-
|
|
52
|
-
Embed the critical behavioral rules from the contract so agents follow them without opening the full contract on every task.
|
|
53
|
-
|
|
54
|
-
- **5.1 Skills & Relevance:** Treat attached or mentioned skills as relevance hints, not automatic requirements. If a skill is clearly unnecessary, say so briefly and proceed directly unless the user insists. Prefer the single most relevant skill over chaining multiple.
|
|
55
|
-
- **5.2 Decision Precedence:** Resolve routing, conflict, and behavior decisions in this strict order:
|
|
56
|
-
1. User's requested goal and output.
|
|
57
|
-
2. User's explicit constraints or preferences.
|
|
58
|
-
3. The active contract (`docs/eyehateagent-contract.md`) and the owning project docs under `docs/project-docs/`.
|
|
59
|
-
4. Attached context (skills, notes, or examples) treated as relevance hints unless made mandatory.
|
|
60
|
-
5. Automatic agent judgment.
|
|
61
|
-
- **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.
|
|
62
|
-
- **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.
|
|
63
|
-
- **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.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Generated EHA workflow routing for GitHub Copilot"
|
|
3
|
-
applyTo: "**"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# EHA Engine Workflows
|
|
7
|
-
|
|
8
|
-
When a user asks to run an EHA workflow, prefer the canonical reusable prompt file listed below and preserve its output contract.
|
|
9
|
-
|
|
10
|
-
- `bootstrap` -> `docs/vibes/reusable-prompts/00-project-docs-bootstrap.md`
|
|
11
|
-
- `refresh` -> `docs/vibes/reusable-prompts/00-project-docs-refresh.md`
|
|
12
|
-
- `parity` -> `docs/vibes/reusable-prompts/00-project-docs-parity.md`
|
|
13
|
-
- `discuss` -> `docs/vibes/reusable-prompts/02-sdd-discuss.md`
|
|
14
|
-
- `execute` -> `docs/vibes/reusable-prompts/01-sdd-execute.md`
|
|
15
|
-
- `verify` -> `docs/vibes/reusable-prompts/00-project-docs-parity.md` (A dedicated verify workflow does not exist yet; verify currently routes to the parity workflow.)
|
|
16
|
-
|
|
17
|
-
## Runtime support
|
|
18
|
-
|
|
19
|
-
- GitHub Copilot support tier is **guided**
|
|
20
|
-
- this install generates repo-local instructions, not slash commands
|
|
21
|
-
- generated outputs stay inside the repository for transparency
|