@sallmarta/eye-hate-agent 1.0.3 → 1.0.5
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 +52 -28
- package/docs/templates/project-docs-template/index.md +192 -50
- package/docs/templates/project-docs-template/technical-guidelines/index.md +50 -21
- package/docs/templates/reusable-prompts/00-project-docs-bootstrap.md +26 -43
- package/docs/templates/reusable-prompts/00-project-docs-parity.md +1 -1
- package/docs/templates/reusable-prompts/00-project-docs-refresh.md +9 -7
- package/docs/templates/reusable-prompts/01-sdd-execute.md +1 -1
- package/docs/templates/reusable-prompts/02-sdd-discuss.md +1 -1
- package/docs/templates/rules/agent-rules.md +1 -1
- package/docs/templates/skills/{architecture/api-design → api-design}/SKILL.md +14 -25
- package/docs/templates/skills/{auditing/full-verification → code-audit}/SKILL.md +35 -53
- 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/templates/skills/{auditing/parity → parity-audit}/SKILL.md +24 -50
- package/docs/templates/skills/refactor/SKILL.md +100 -0
- package/docs/templates/skills/security-audit/SKILL.md +149 -0
- package/docs/templates/skills/{architecture/system-analysis → system-analysis}/SKILL.md +19 -41
- package/docs/templates/skills/{engineering/test-authoring → system-tester}/SKILL.md +28 -222
- package/docs/templates/skills/ui-ux-design/SKILL.md +102 -0
- package/docs/templates/skills/wireframing/SKILL.md +88 -0
- package/package.json +10 -6
- package/src/engine/index.js +2 -0
- package/src/engine/install.js +1 -3
- package/src/engine/runtime-adapters.js +7 -4
- package/src/engine/skill-registry.js +37 -32
- package/docs/templates/project-docs-template/foundation/architecture.md +0 -79
- package/docs/templates/project-docs-template/foundation/changelog.md +0 -53
- package/docs/templates/project-docs-template/foundation/feature-inventory.md +0 -46
- package/docs/templates/project-docs-template/foundation/phases.md +0 -60
- package/docs/templates/project-docs-template/foundation/prd.md +0 -69
- package/docs/templates/project-docs-template/foundation/status.md +0 -57
- package/docs/templates/project-docs-template/foundation/workflow.md +0 -59
- package/docs/templates/project-docs-template/getting-started.md +0 -52
- package/docs/templates/project-docs-template/operations/ci-cd.md +0 -56
- package/docs/templates/project-docs-template/operations/compliance.md +0 -46
- package/docs/templates/project-docs-template/operations/governance.md +0 -46
- package/docs/templates/project-docs-template/operations/observability.md +0 -53
- package/docs/templates/project-docs-template/operations/production-runbook.md +0 -62
- package/docs/templates/project-docs-template/operations/security.md +0 -49
- package/docs/templates/project-docs-template/technical/api-contract.md +0 -49
- package/docs/templates/project-docs-template/technical/database.md +0 -59
- package/docs/templates/project-docs-template/technical/error-handling.md +0 -54
- package/docs/templates/project-docs-template/technical/internationalization.md +0 -46
- package/docs/templates/project-docs-template/technical/testing.md +0 -57
- package/docs/templates/project-docs-template/technical/ui-ux.md +0 -68
- package/docs/templates/skills/architecture/db-schema-design/SKILL.md +0 -14
- package/docs/templates/skills/auditing/security-audit/SKILL.md +0 -170
- package/docs/templates/skills/engineering/refactor-specialist/SKILL.md +0 -13
- package/docs/templates/skills/engineering/ui-ux-implementation/SKILL.md +0 -13
- package/docs/templates/skills/operations/ci-cd-authoring/SKILL.md +0 -13
- package/docs/templates/skills/operations/observability-setup/SKILL.md +0 -13
|
@@ -32,7 +32,7 @@ Structure incoming requests before acting to reduce rework and catch ambiguity e
|
|
|
32
32
|
5. Treat a user-provided list as full scope unless the user changes it.
|
|
33
33
|
6. Confirm if the plan could materially change scope, output, or direction.
|
|
34
34
|
7. Then proceed.
|
|
35
|
-
- **3.2** Skip the intake checklist
|
|
35
|
+
- **3.2** **Lite Mode (Micro-Tasks):** Skip the 7-step intake checklist and SDD requirements ONLY if the user explicitly triggers Lite Mode (e.g., using a `/lite` slash command, or prefixing their request with "Lite task:") AND the task is a trivial, isolated edit (e.g., typo fix, single UI tweak). For Lite Mode, bypass PRD validation and execute immediately to save time.
|
|
36
36
|
|
|
37
37
|
## 4. Docs, Verification, and Completion
|
|
38
38
|
|
|
@@ -4,7 +4,7 @@ description: "Project-aware expert-role contract design for APIs, interfaces, re
|
|
|
4
4
|
argument-hint: "Describe the boundary, interface, endpoint, message contract, or service behavior to design or review"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# API Design
|
|
8
8
|
|
|
9
9
|
Produces a **project-aware, expert-level contract design or design review** by reading the repository's project docs first, then applying a reusable method to the current boundary type.
|
|
10
10
|
|
|
@@ -19,23 +19,18 @@ This skill is intentionally reusable across:
|
|
|
19
19
|
|
|
20
20
|
It should **not** assume one language, framework, transport, or architecture style until the project docs confirm them.
|
|
21
21
|
|
|
22
|
-
---
|
|
23
|
-
|
|
24
22
|
## Required Project Inputs
|
|
25
23
|
|
|
26
24
|
| Document | Why it matters |
|
|
27
25
|
| --- | --- |
|
|
28
|
-
|
|
29
26
|
| `docs/project-docs/foundation/architecture.md` | Defines stack, architecture boundaries, dependency rules, and integration patterns |
|
|
30
27
|
| `docs/project-docs/foundation/prd.md` | Clarifies scope, constraints, stakeholders, and non-goals |
|
|
31
|
-
| `docs/project-docs/
|
|
28
|
+
| `docs/project-docs/development/testing.md` | Defines how the contract should be validated |
|
|
32
29
|
| Relevant feature docs, API docs, or guidelines | Provide domain-specific rules, request/response shapes, workflows, and edge cases |
|
|
33
30
|
| Existing code or contracts in the repo | Show local naming, layering, serialization, validation, and error conventions |
|
|
34
31
|
|
|
35
32
|
If the repository lacks the contract-defining docs needed for the task, call that out and create or update the missing docs instead of inventing local rules in the skill.
|
|
36
33
|
|
|
37
|
-
---
|
|
38
|
-
|
|
39
34
|
## When To Use
|
|
40
35
|
|
|
41
36
|
Use this skill when designing or reviewing one of these boundary types.
|
|
@@ -49,8 +44,6 @@ Use this skill when designing or reviewing one of these boundary types.
|
|
|
49
44
|
| Event or message contract | payload schema, producer/consumer expectations, ordering, retry, dead-letter rules |
|
|
50
45
|
| Module boundary | public interface, dependency direction, allowed imports, extension points |
|
|
51
46
|
|
|
52
|
-
---
|
|
53
|
-
|
|
54
47
|
## Procedure
|
|
55
48
|
|
|
56
49
|
### Step 1 — Identify the contract owner
|
|
@@ -141,8 +134,6 @@ Examples:
|
|
|
141
134
|
|
|
142
135
|
The output should fit the repository style and include enough detail to implement safely without locking the repo into one stack-specific pattern that the docs do not support.
|
|
143
136
|
|
|
144
|
-
---
|
|
145
|
-
|
|
146
137
|
## Output Contract
|
|
147
138
|
|
|
148
139
|
When using this skill, the output should include:
|
|
@@ -155,8 +146,6 @@ When using this skill, the output should include:
|
|
|
155
146
|
6. verification strategy
|
|
156
147
|
7. open questions that still require product or architecture decisions
|
|
157
148
|
|
|
158
|
-
---
|
|
159
|
-
|
|
160
149
|
## Quality Checks
|
|
161
150
|
|
|
162
151
|
Use this checklist when reviewing an existing contract:
|
|
@@ -169,8 +158,6 @@ Use this checklist when reviewing an existing contract:
|
|
|
169
158
|
- Does the contract create hidden coupling or leak implementation details?
|
|
170
159
|
- Is there a clear verification strategy in `testing.md`?
|
|
171
160
|
|
|
172
|
-
---
|
|
173
|
-
|
|
174
161
|
## Anti-Patterns
|
|
175
162
|
|
|
176
163
|
- Embedding one stack's rules into the skill instead of reading project docs
|
|
@@ -180,19 +167,21 @@ Use this checklist when reviewing an existing contract:
|
|
|
180
167
|
- Ignoring versioning, compatibility, or migration concerns for externally visible contracts
|
|
181
168
|
- Over-designing the contract far beyond the current scope in `prd.md`
|
|
182
169
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
## Natural Prompt Shapes
|
|
186
|
-
|
|
187
|
-
- "Design the contract for this API or service boundary."
|
|
188
|
-
- "Check whether this endpoint or DTO shape is designed correctly."
|
|
189
|
-
- "Define the interface, error contract, and validation rules for this boundary."
|
|
190
|
-
- "Review whether this event or repository contract matches the architecture."
|
|
170
|
+
## Output Contract
|
|
191
171
|
|
|
192
|
-
|
|
172
|
+
When using this skill, the output should include:
|
|
173
|
+
1. the boundary type
|
|
174
|
+
2. the project docs consulted
|
|
175
|
+
3. the proposed contract shape
|
|
176
|
+
4. validation and error rules
|
|
177
|
+
5. ownership and dependency implications
|
|
178
|
+
6. verification strategy
|
|
179
|
+
7. open questions that still require product or architecture decisions
|
|
193
180
|
|
|
194
|
-
##
|
|
181
|
+
## Neutral Prompt Shape
|
|
182
|
+
`@agent use api-design on [Target Entity/Feature] focusing on [Specific Constraints/Version].`
|
|
195
183
|
|
|
184
|
+
## Example Prompt
|
|
196
185
|
- "Design the repository contract for this feature"
|
|
197
186
|
- "Review this controller and DTO boundary"
|
|
198
187
|
- "Design an event payload for this workflow"
|
|
@@ -1,37 +1,32 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: "code-audit"
|
|
3
3
|
description: "Project-aware expert-role broad verification that reads project docs first, classifies the verification target, and routes to the best specialist skill for executable or non-executable checks across code, contracts, docs, architecture, quality, security, reliability, and project health."
|
|
4
4
|
argument-hint: "Describe what should be verified against the contract, project docs, guidelines, code, APIs, architecture, or repository state"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Code Audit
|
|
8
8
|
|
|
9
9
|
Provides an **expert, project-aware broad verification entry point** for requests that ask whether something is correct, consistent, healthy, complete, or aligned with the repository's contract and project docs.
|
|
10
10
|
|
|
11
11
|
This skill is **routing-first**. Its primary job is to identify the dominant verification question and route to the single best specialist skill rather than duplicating every verification procedure itself.
|
|
12
12
|
|
|
13
|
-
This skill is intentionally **not tied to any single stack or framework**. When executable checks are needed, it should select the correct framework, commands, and conventions from the project's `
|
|
14
|
-
|
|
15
|
-
---
|
|
13
|
+
This skill is intentionally **not tied to any single stack or framework**. When executable checks are needed, it should select the correct framework, commands, and conventions from the project's `development/testing.md`, `foundation/architecture.md`, and local repository patterns.
|
|
16
14
|
|
|
17
15
|
## Required Project Inputs
|
|
18
16
|
|
|
19
17
|
| Document | Why it matters |
|
|
20
18
|
| --- | --- |
|
|
21
19
|
| EHA Rules | Defines routing, ownership, precedence, and the active skill model |
|
|
22
|
-
|
|
23
|
-
| `docs/project-docs/
|
|
24
|
-
| `docs/project-docs/foundation/
|
|
25
|
-
| `docs/project-docs/foundation/prd.md` | Defines goals, scope, non-goals, and success criteria |
|
|
20
|
+
| `docs/project-docs/foundation/architecture.md` | Defines boundaries, dependencies, stack choices, and anti-violation rules |
|
|
21
|
+
| `docs/project-docs/development/testing.md` | Defines available validation and evidence strength |
|
|
22
|
+
| `docs/project-docs/foundation/prd.md` | Clarifies scope, non-goals, and project stage |
|
|
26
23
|
| `docs/project-docs/foundation/status.md` | Defines maturity, roadmap, active workstreams, and readiness context |
|
|
27
24
|
| Relevant guideline docs under `docs/project-docs/technical-guidelines/` | Define technical standards such as API, logging, database, error-handling, code style, or design patterns |
|
|
28
25
|
| Relevant code, tests, docs, contracts, and repository artifacts | Provide the actual evidence surfaces to verify against |
|
|
29
26
|
|
|
30
27
|
If required project docs are missing, surface that gap explicitly and limit confidence rather than guessing.
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## When To Use
|
|
29
|
+
## When to Use
|
|
35
30
|
|
|
36
31
|
| Trigger | Example request |
|
|
37
32
|
| --- | --- |
|
|
@@ -43,15 +38,12 @@ If required project docs are missing, surface that gap explicitly and limit conf
|
|
|
43
38
|
|
|
44
39
|
Use a specialist skill directly when the dominant question is already obvious:
|
|
45
40
|
|
|
46
|
-
- `
|
|
41
|
+
- `system-tester` for executable verification strategy, stack-aware test selection, and test-writing decisions
|
|
47
42
|
- `code-audit` for code correctness, bug, risk, security, and boundary review
|
|
48
|
-
- `parity` for repository drift across docs, platform instruction surfaces, skills, prompts, and summaries
|
|
49
|
-
- `
|
|
50
|
-
- `analysis` for root-cause reasoning, trade-off evaluation, and requirement or decision analysis
|
|
43
|
+
- `parity-audit` for repository drift across docs, platform instruction surfaces, skills, prompts, and summaries
|
|
44
|
+
- `system-analysis` for root-cause reasoning, trade-off evaluation, and requirement or decision analysis
|
|
51
45
|
- `api-design` for API, schema, interface, or boundary contract design and review
|
|
52
46
|
|
|
53
|
-
---
|
|
54
|
-
|
|
55
47
|
## Procedure
|
|
56
48
|
|
|
57
49
|
### Step 1 — Identify the verification target
|
|
@@ -86,12 +78,11 @@ Prefer the single strongest verification path unless the user explicitly asks fo
|
|
|
86
78
|
|
|
87
79
|
| Dominant verification question | Route to |
|
|
88
80
|
| --- | --- |
|
|
89
|
-
| How should this be verified, tested, or regression-checked in the current stack? | `
|
|
81
|
+
| How should this be verified, tested, or regression-checked in the current stack? | `system-tester` |
|
|
90
82
|
| Is this code correct, safe, consistent, and free of obvious bugs or boundary violations? | `code-audit` |
|
|
91
83
|
| Does this API or interface contract match the docs, code, and boundary rules? | `api-design` |
|
|
92
|
-
| Do the docs, platform instruction surfaces, skills, prompts, and repository artifacts still agree? | `parity` |
|
|
93
|
-
|
|
|
94
|
-
| Do the requirements, trade-offs, design decisions, or explanations hold up? | `analysis` |
|
|
84
|
+
| Do the docs, platform instruction surfaces, skills, prompts, and repository artifacts still agree? | `parity-audit` |
|
|
85
|
+
| Do the requirements, trade-offs, design decisions, or explanations hold up? | `system-analysis` |
|
|
95
86
|
|
|
96
87
|
Example prompt shapes by verification category:
|
|
97
88
|
|
|
@@ -108,7 +99,7 @@ Example prompt shapes by verification category:
|
|
|
108
99
|
|
|
109
100
|
When executable validation is required, choose the appropriate framework and commands from project docs and local repo conventions.
|
|
110
101
|
|
|
111
|
-
Examples of the decision pattern:
|
|
102
|
+
**Examples** of the decision pattern:
|
|
112
103
|
|
|
113
104
|
- Go project -> use the Go testing approach documented in `testing.md`
|
|
114
105
|
- Python project -> use the Python testing approach documented in `testing.md`
|
|
@@ -126,7 +117,20 @@ State:
|
|
|
126
117
|
- what evidence and checks should be used
|
|
127
118
|
- what remains outside the chosen verification path
|
|
128
119
|
|
|
129
|
-
|
|
120
|
+
## Quality Check
|
|
121
|
+
|
|
122
|
+
- No finding without evidence from the target artifact
|
|
123
|
+
- No severity inflation
|
|
124
|
+
- No style nitpicks disguised as bugs
|
|
125
|
+
- No architecture complaint without reference to actual project boundaries
|
|
126
|
+
- No recommendation that ignores project stage or available validation
|
|
127
|
+
|
|
128
|
+
## Anti-Pattern
|
|
129
|
+
|
|
130
|
+
- Calling something dead code without checking workspace usage
|
|
131
|
+
- Calling something a bug without defining the failure condition
|
|
132
|
+
- Criticizing a pattern that the project explicitly chose in `architecture.md`
|
|
133
|
+
- Recommending wide rewrites before testing a local fix or a smaller boundary change
|
|
130
134
|
|
|
131
135
|
## Output Contract
|
|
132
136
|
|
|
@@ -141,33 +145,11 @@ When using this skill, the output should include:
|
|
|
141
145
|
7. any residual risks or uncovered verification areas
|
|
142
146
|
8. whether user direction is required before deciding between conflicting docs and implementation
|
|
143
147
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
## Quality Checks
|
|
147
|
-
|
|
148
|
-
- Route to the single best specialist skill unless the user explicitly asks for a broader sweep
|
|
149
|
-
- Do not duplicate another skill's full procedure inside this skill
|
|
150
|
-
- Do not assume frameworks or commands before checking the project docs
|
|
151
|
-
- Keep executable and non-executable verification clearly separated
|
|
152
|
-
- State when confidence is limited by missing docs or missing evidence
|
|
153
|
-
- Do not assume docs or implementation win when the repository does not define authority for the disputed fact
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
## Anti-Patterns
|
|
158
|
-
|
|
159
|
-
- Treating verification as synonymous with writing tests
|
|
160
|
-
- Hardcoding stack-specific frameworks into the skill text
|
|
161
|
-
- Routing a docs-drift problem to `code-audit`
|
|
162
|
-
- Routing a forward-looking improvement question to `analysis`
|
|
163
|
-
- Running a multi-skill sweep by default when one dominant verification path would answer the request
|
|
164
|
-
- Claiming the repository passed a check when the relevant evidence or command was never examined
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## Example Requests
|
|
148
|
+
## Neutral Prompt Shape
|
|
149
|
+
`@agent use code-audit on [Target File/Change] focusing on [Specific Risks/Boundaries].`
|
|
169
150
|
|
|
170
|
-
|
|
171
|
-
- "
|
|
172
|
-
- "
|
|
173
|
-
- "
|
|
151
|
+
## Example Prompt
|
|
152
|
+
- "Audit this service for boundary violations"
|
|
153
|
+
- "Review this change for correctness risks"
|
|
154
|
+
- "Check this module for dead code and duplication"
|
|
155
|
+
- "Audit this workflow implementation for operability gaps"
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "db-schema-design"
|
|
3
|
+
description: "Project-aware expert-role database schema and modeling design. Reads project docs first, then produces a schema design, migration plan, or query optimization strategy consistent with the current repository constraints."
|
|
4
|
+
argument-hint: "Describe the domain entities, tables, relationships, or queries to design or review"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Database Schema Design
|
|
8
|
+
|
|
9
|
+
Produces a **project-aware, expert-level database schema design or review** by reading the repository's project docs first, then applying a rigorous data modeling method.
|
|
10
|
+
|
|
11
|
+
This skill is reusable across:
|
|
12
|
+
|
|
13
|
+
- Relational Databases (PostgreSQL, MySQL, Aurora, etc)
|
|
14
|
+
- Document / NoSQL Databases (MongoDB, DynamoDB, etc)
|
|
15
|
+
- In-memory / Cache Models (Redis, Memcache, etc)
|
|
16
|
+
- Event Stores (Kafka, Pulsar, etc)
|
|
17
|
+
|
|
18
|
+
It should **not** assume a specific database engine, ORM, or normalization strategy until the project docs confirm them.
|
|
19
|
+
|
|
20
|
+
## Required Project Inputs
|
|
21
|
+
|
|
22
|
+
| Document | Why it matters |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| `docs/project-docs/development/database.md` | Defines the actual database engines, ORMs, migration tools, naming conventions, and constraints. |
|
|
25
|
+
| `docs/project-docs/foundation/architecture.md` | Defines where data logic lives (e.g., repository layer) and integration boundaries. |
|
|
26
|
+
| `docs/project-docs/foundation/prd.md` | Clarifies the feature scale, expected data volume, and access patterns. |
|
|
27
|
+
| `docs/project-docs/development/testing.md` | Defines how data layer code and migrations should be validated. |
|
|
28
|
+
|
|
29
|
+
If the repository lacks the database docs needed for the task, call that out and create or update the missing docs instead of inventing local rules in the skill.
|
|
30
|
+
|
|
31
|
+
## When to Use
|
|
32
|
+
|
|
33
|
+
Use this skill when designing or reviewing one of these boundary types:
|
|
34
|
+
|
|
35
|
+
| Boundary type | Typical artifacts |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| Schema Creation | Tables, columns, types, constraints, foreign keys, indexes |
|
|
38
|
+
| Migrations | Up/Down migration scripts, data backfills, zero-downtime strategies |
|
|
39
|
+
| Query Optimization | EXPLAIN plans, index selection, join reduction |
|
|
40
|
+
| Data Modeling | Domain entities, aggregates, document embedding vs referencing |
|
|
41
|
+
| Caching | Cache keys, TTL strategies, eviction policies |
|
|
42
|
+
|
|
43
|
+
## Procedure
|
|
44
|
+
|
|
45
|
+
### Step 1 — Identify the Engine and Tools
|
|
46
|
+
Extract from `database.md`:
|
|
47
|
+
- the primary database engine (e.g., Postgres 15)
|
|
48
|
+
- the schema management/migration tool (e.g., Prisma, Flyway, Alembic)
|
|
49
|
+
- the application access pattern (raw SQL vs Query Builder vs ORM)
|
|
50
|
+
|
|
51
|
+
### Step 2 — Identify the Access Patterns
|
|
52
|
+
Extract from `prd.md` and feature docs:
|
|
53
|
+
- Read/Write ratios (is it write-heavy or read-heavy?)
|
|
54
|
+
- Data volume expectations
|
|
55
|
+
- Latency requirements
|
|
56
|
+
- Multi-tenant data segregation rules (if any)
|
|
57
|
+
|
|
58
|
+
### Step 3 — Design the Schema Shape
|
|
59
|
+
Design the minimal schema that supports the required behavior.
|
|
60
|
+
Specify:
|
|
61
|
+
- Entity names and relationships (1:1, 1:N, M:N)
|
|
62
|
+
- Strict data types (prefer specific types like `UUID` or `TIMESTAMPTZ` over generic strings if the engine supports it)
|
|
63
|
+
- Constraints (NOT NULL, UNIQUE, CHECK)
|
|
64
|
+
- Primary and Foreign keys
|
|
65
|
+
|
|
66
|
+
### Step 4 — Define Indexing and Performance Strategies
|
|
67
|
+
Define the indexes required for the access patterns identified in Step 2.
|
|
68
|
+
- Consider composite indexes for multi-column queries.
|
|
69
|
+
- Consider partial/filtered indexes for specific status queries.
|
|
70
|
+
- Avoid over-indexing to protect write performance.
|
|
71
|
+
|
|
72
|
+
### Step 5 — Design the Migration Plan
|
|
73
|
+
Specify how the schema will be deployed safely:
|
|
74
|
+
- Can this be applied without locking tables?
|
|
75
|
+
- Does it require a multi-phase zero-downtime migration (e.g., Add column -> write to both -> backfill -> drop old column)?
|
|
76
|
+
- How will the rollback (down migration) function?
|
|
77
|
+
|
|
78
|
+
### Step 6 — Define Verification Requirements
|
|
79
|
+
Use `testing.md` to decide how this will be validated.
|
|
80
|
+
Examples:
|
|
81
|
+
- Schema validation tests
|
|
82
|
+
- Query performance benchmarks
|
|
83
|
+
- Migration dry-run tests
|
|
84
|
+
|
|
85
|
+
## Quality Check
|
|
86
|
+
|
|
87
|
+
Use this checklist when reviewing an existing schema or PR:
|
|
88
|
+
|
|
89
|
+
- Does the schema follow the project's naming conventions (e.g., snake_case vs camelCase)?
|
|
90
|
+
- Are foreign keys properly enforcing referential integrity?
|
|
91
|
+
- Are appropriate constraints in place to prevent bad data at the database level?
|
|
92
|
+
- Will the migration lock a critical table in production?
|
|
93
|
+
- Is there a clear separation between the database schema and the application's domain model?
|
|
94
|
+
|
|
95
|
+
## Anti-Pattern
|
|
96
|
+
|
|
97
|
+
- Assuming an ORM is used when the project strictly uses raw SQL.
|
|
98
|
+
- Suggesting a heavy relational model for a project that uses a document database.
|
|
99
|
+
- Proposing migrations that lock large tables (e.g., adding a column with a default value in older Postgres versions) without a zero-downtime strategy.
|
|
100
|
+
- Ignoring data types and using strings for dates, JSON, or booleans.
|
|
101
|
+
- Forgetting to define a rollback strategy for a destructive migration.
|
|
102
|
+
|
|
103
|
+
## Output Contract
|
|
104
|
+
|
|
105
|
+
When using this skill, the output should include:
|
|
106
|
+
|
|
107
|
+
1. the database engine and tools being targeted
|
|
108
|
+
2. the project docs consulted
|
|
109
|
+
3. the proposed schema / entity model
|
|
110
|
+
4. indexes and constraints
|
|
111
|
+
5. the migration strategy and risk assessment
|
|
112
|
+
6. verification strategy
|
|
113
|
+
7. open questions regarding data volume or access patterns
|
|
114
|
+
|
|
115
|
+
## Neutral Prompt Shape
|
|
116
|
+
`@agent use db-schema-design on [Target Feature/Entity] focusing on [Specific Requirement/Database Type].`
|
|
117
|
+
|
|
118
|
+
## Example Prompt
|
|
119
|
+
- "Design the schema migration for the new order tracking feature."
|
|
120
|
+
- "Optimize the indexing for this query based on read-heavy patterns."
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "devops-ci-cd"
|
|
3
|
+
description: "Project-aware expert-role for CI/CD pipeline design and implementation. Reads project docs first, enforces build caching, security gates, test execution, and deployment safety."
|
|
4
|
+
argument-hint: "Describe the workflow, pipeline, or deployment stage to build or review"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# DevOps CI/CD
|
|
8
|
+
|
|
9
|
+
Produces a **project-aware, expert-level CI/CD pipeline implementation** by reading the repository's project docs first, then applying robust deployment engineering practices.
|
|
10
|
+
|
|
11
|
+
This skill is reusable across CI providers (GitHub Actions, GitLab CI, Jenkins) and deployment targets (AWS, GCP, Vercel, Kubernetes).
|
|
12
|
+
|
|
13
|
+
It should **not** assume a specific CI provider or deployment strategy until the project docs confirm them.
|
|
14
|
+
|
|
15
|
+
## Required Project Inputs
|
|
16
|
+
|
|
17
|
+
| Document | Why it matters |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `docs/project-docs/operations/ci-cd.md` | Defines the required CI provider, branch protection rules, required jobs, and deployment environments. |
|
|
20
|
+
| `docs/project-docs/development/testing.md` | Defines which test suites must run and their coverage thresholds. |
|
|
21
|
+
| `docs/project-docs/operations/security.md` | Defines required security scanning tools (SAST, DAST, dependency checks). |
|
|
22
|
+
|
|
23
|
+
If the repository lacks the CI/CD docs needed for deployment, call that out and create or update the missing docs instead of blindly writing deployment scripts.
|
|
24
|
+
|
|
25
|
+
## When to Use
|
|
26
|
+
|
|
27
|
+
Use this skill when building or reviewing one of these boundary types.
|
|
28
|
+
|
|
29
|
+
| Boundary type | Typical artifacts |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Continuous Integration (CI) | Build scripts, linter checks, test runners, Docker builds. |
|
|
32
|
+
| Continuous Deployment (CD) | Terraform/Pulumi execution, environment promotion, artifact publishing. |
|
|
33
|
+
| Security & Compliance | Dependabot configuration, secret scanning, static analysis gates. |
|
|
34
|
+
| Pipeline Optimization | Caching strategies, matrix builds, job parallelization. |
|
|
35
|
+
|
|
36
|
+
## Procedure
|
|
37
|
+
|
|
38
|
+
### Step 1 — Identify the Pipeline Engine and Target
|
|
39
|
+
Extract from `ci-cd.md`:
|
|
40
|
+
- The CI platform (e.g., GitHub Actions).
|
|
41
|
+
- The deployment target (e.g., AWS ECS).
|
|
42
|
+
- Authentication mechanisms (e.g., OIDC vs long-lived secrets).
|
|
43
|
+
|
|
44
|
+
### Step 2 — Define the Build Matrix and Caching
|
|
45
|
+
- Ensure language-specific dependencies (node_modules, pip cache, go mod cache) are aggressively cached to reduce build times.
|
|
46
|
+
- If building Docker images, implement layer caching.
|
|
47
|
+
|
|
48
|
+
### Step 3 — Enforce Testing and Security Gates
|
|
49
|
+
Consult `testing.md` and `security.md`:
|
|
50
|
+
- The pipeline MUST block merges if linters or tests fail.
|
|
51
|
+
- The pipeline MUST block merges if critical security vulnerabilities are detected.
|
|
52
|
+
|
|
53
|
+
### Step 4 — Implement Safe Deployment Strategies
|
|
54
|
+
If deploying to production:
|
|
55
|
+
- Ensure the pipeline respects environment segregation.
|
|
56
|
+
- Implement rollback capabilities or canary/blue-green deployment steps if specified in `ci-cd.md`.
|
|
57
|
+
- Never hardcode secrets in the pipeline file; always use the CI provider's secrets manager.
|
|
58
|
+
|
|
59
|
+
### Step 5 — Verify Pipeline Robustness
|
|
60
|
+
Ensure the pipeline:
|
|
61
|
+
- Only triggers on appropriate branches or tags.
|
|
62
|
+
- Has reasonable timeout limits to prevent hung jobs.
|
|
63
|
+
- Cleans up temporary artifacts after execution.
|
|
64
|
+
|
|
65
|
+
## Quality Check
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
Use this checklist when reviewing an existing CI/CD configuration:
|
|
69
|
+
|
|
70
|
+
- Are dependencies and build outputs being cached?
|
|
71
|
+
- Are secrets injected securely via environment variables?
|
|
72
|
+
- Does a failing test or linter correctly fail the entire job?
|
|
73
|
+
- Is the deployment step locked down to specific branches or environments?
|
|
74
|
+
- Are timeouts explicitly defined to prevent runaway costs?
|
|
75
|
+
|
|
76
|
+
## Anti-Pattern
|
|
77
|
+
|
|
78
|
+
- Hardcoding API keys or passwords directly in the YAML file.
|
|
79
|
+
- Writing a pipeline that deploys to production from any branch.
|
|
80
|
+
- Skipping tests to make the pipeline run faster.
|
|
81
|
+
- Downloading dependencies without verifying lockfiles.
|
|
82
|
+
|
|
83
|
+
## Output Contract
|
|
84
|
+
|
|
85
|
+
When using this skill, the output should include:
|
|
86
|
+
|
|
87
|
+
1. the project docs consulted
|
|
88
|
+
2. the proposed pipeline architecture (triggers, jobs, steps)
|
|
89
|
+
3. the caching and optimization strategies used
|
|
90
|
+
4. the security and testing gates enforced
|
|
91
|
+
5. the final pipeline YAML or script
|
|
92
|
+
|
|
93
|
+
## Neutral Prompt Shape
|
|
94
|
+
`@agent use devops-ci-cd on [Target Pipeline/Workflow] focusing on [Specific Optimizations/Security Gates].`
|
|
95
|
+
|
|
96
|
+
## Example Prompt
|
|
97
|
+
- "Create a GitHub Actions workflow that implements the CI caching strategy."
|
|
98
|
+
- "Review this Jenkinsfile for security issues and hardcoded secrets."
|
|
99
|
+
- "Design a deployment pipeline that supports blue-green rollout."
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "observability"
|
|
3
|
+
description: "Project-aware expert-role for system observability and SRE engineering. Reads project docs first, enforces structured logging, tracing context injection, PII masking rules, and actionable metric generation."
|
|
4
|
+
argument-hint: "Describe the component, service, or workflow to instrument with observability"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Observability
|
|
8
|
+
|
|
9
|
+
Produces a **project-aware, expert-level observability implementation** by reading the repository's project docs first, then applying Site Reliability Engineering (SRE) standards for logging, metrics, and tracing.
|
|
10
|
+
|
|
11
|
+
This skill is reusable across logging frameworks (Winston, Logback, Zap), tracing standards (OpenTelemetry), and telemetry backends (Prometheus, Datadog, ELK).
|
|
12
|
+
|
|
13
|
+
It should **not** assume a specific logging library or metric format until the project docs confirm them.
|
|
14
|
+
|
|
15
|
+
## Required Project Inputs
|
|
16
|
+
|
|
17
|
+
| Document | Why it matters |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `docs/project-docs/operations/observability.md` | Defines the required logging frameworks, metric standards, alerting thresholds, and tracing architectures. |
|
|
20
|
+
| `docs/project-docs/operations/compliance.md` | Defines PII (Personally Identifiable Information) masking and data retention rules. |
|
|
21
|
+
| `docs/project-docs/foundation/architecture.md` | Defines how context (e.g., request IDs, user IDs) flows across service boundaries. |
|
|
22
|
+
|
|
23
|
+
If the repository lacks the observability docs needed to understand the current stack, call that out and create or update the missing docs instead of inventing arbitrary logging formats.
|
|
24
|
+
|
|
25
|
+
## When to Use
|
|
26
|
+
|
|
27
|
+
Use this skill when tasked with improving system visibility or instrumenting code.
|
|
28
|
+
|
|
29
|
+
| Boundary type | Typical artifacts |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Application Logging | Structured JSON logs, error stack traces, context injection. |
|
|
32
|
+
| Distributed Tracing | Spans, span contexts, OpenTelemetry configuration. |
|
|
33
|
+
| Application Metrics | Counters, gauges, histograms (e.g., request latency, error rates). |
|
|
34
|
+
| Alerting & Dashboards | Prometheus rules, Datadog monitors, Grafana dashboard JSON. |
|
|
35
|
+
|
|
36
|
+
## Procedure
|
|
37
|
+
|
|
38
|
+
### Step 1 — Extract Standards
|
|
39
|
+
Extract from `observability.md`:
|
|
40
|
+
- The approved logging library.
|
|
41
|
+
- Required log levels (e.g., `DEBUG` in dev, `INFO` in prod).
|
|
42
|
+
- Required structured fields (e.g., `requestId`, `tenantId`).
|
|
43
|
+
|
|
44
|
+
### Step 2 — Enforce Compliance and PII Masking
|
|
45
|
+
Extract from `compliance.md`:
|
|
46
|
+
- Identify fields that MUST NEVER be logged (e.g., passwords, credit card numbers, raw request bodies).
|
|
47
|
+
- Implement redaction/masking at the logger configuration level if possible.
|
|
48
|
+
|
|
49
|
+
### Step 3 — Instrument Tracing Context
|
|
50
|
+
When instrumenting a request flow:
|
|
51
|
+
- Ensure trace IDs (like `x-b3-traceid` or OpenTelemetry headers) are parsed at the entry point.
|
|
52
|
+
- Ensure the trace ID is attached to ALL subsequent log emissions and downstream HTTP calls.
|
|
53
|
+
|
|
54
|
+
### Step 4 — Define Actionable Metrics
|
|
55
|
+
Instead of generic logs, emit actionable metrics for:
|
|
56
|
+
- Throughput (requests per second).
|
|
57
|
+
- Error rates (4xx vs 5xx).
|
|
58
|
+
- Latency/Duration (histograms of processing time).
|
|
59
|
+
|
|
60
|
+
### Step 5 — Standardize Error Handling
|
|
61
|
+
When logging exceptions:
|
|
62
|
+
- Always log the full stack trace for unhandled errors.
|
|
63
|
+
- Do not swallow errors (e.g., `catch (e) { log(e.message) }` loses the stack trace).
|
|
64
|
+
- Ensure the log distinguishes between client errors (validation) and server errors (crashes).
|
|
65
|
+
|
|
66
|
+
## Quality Check
|
|
67
|
+
|
|
68
|
+
Use this checklist when reviewing observability code:
|
|
69
|
+
|
|
70
|
+
- Are logs structured (JSON) rather than plain text strings?
|
|
71
|
+
- Is context (like Request ID) present in every log entry for a transaction?
|
|
72
|
+
- Are sensitive fields (tokens, passwords, PII) explicitly redacted?
|
|
73
|
+
- Are metrics using standardized naming conventions (e.g., snake_case for Prometheus)?
|
|
74
|
+
- Are errors logged with stack traces and sufficient context to debug without guessing?
|
|
75
|
+
|
|
76
|
+
## Anti-Pattern
|
|
77
|
+
|
|
78
|
+
- `console.log()` or equivalent generic print statements in production code.
|
|
79
|
+
- Logging the entire raw HTTP Request or Response object.
|
|
80
|
+
- Silently swallowing exceptions without logging them.
|
|
81
|
+
- Emitting high-cardinality data (like User IDs) as metric labels/tags instead of log fields.
|
|
82
|
+
|
|
83
|
+
## Output Contract
|
|
84
|
+
|
|
85
|
+
When using this skill, the output should include:
|
|
86
|
+
|
|
87
|
+
1. the project docs consulted
|
|
88
|
+
2. the instrumentation code (logging, tracing, or metrics)
|
|
89
|
+
3. the structured payload shape being emitted
|
|
90
|
+
4. the PII masking and security constraints verified
|
|
91
|
+
5. how the new telemetry can be validated (e.g., local mock server, stdout check)
|
|
92
|
+
|
|
93
|
+
## Neutral Prompt Shape
|
|
94
|
+
`@agent use observability on [Target Service/Component] focusing on [Specific Metrics/Logs].`
|
|
95
|
+
|
|
96
|
+
## Example Prompt
|
|
97
|
+
- "Instrument this service with structured logging and trace context."
|
|
98
|
+
- "Review this controller to ensure PII is masked before logging."
|
|
99
|
+
- "Design Prometheus metrics for this asynchronous background job."
|