@sallmarta/eye-hate-agent 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +1 -1
- 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
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: parity
|
|
2
|
+
name: "parity-audit"
|
|
3
3
|
description: "Expert-role parity check across project docs, platform instruction surfaces, skills, reusable prompts, workflows, quick-reference material, and implementation evidence when authority depends on the current codebase. Use when checking whether the template system still agrees with itself or when preparing cleanup after major changes."
|
|
4
4
|
argument-hint: "Describe the scope to audit: full repository, docs only, reusable prompt system, platform instruction surfaces and skills, or a specific workstream"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Parity
|
|
7
|
+
# Parity Audit
|
|
8
8
|
|
|
9
|
-
Performs an
|
|
9
|
+
Performs an expert repository-wide drift audit to find contradictions, stale summaries, duplicated ownership, code-vs-doc authority conflicts, and historical artifacts that should be classified rather than confused with active truth.
|
|
10
10
|
|
|
11
11
|
This skill is the reusable complement to the parity reusable prompt. Use it when the task is analytical rather than generative.
|
|
12
12
|
|
|
13
|
-
---
|
|
14
|
-
|
|
15
13
|
## Required Project Inputs
|
|
16
14
|
|
|
17
15
|
| Document | Why it matters |
|
|
@@ -19,16 +17,14 @@ This skill is the reusable complement to the parity reusable prompt. Use it when
|
|
|
19
17
|
| EHA Rules | Ownership map and canonical doc taxonomy |
|
|
20
18
|
| `docs/project-docs/foundation/prd.md` | Active project identity and scope |
|
|
21
19
|
| `docs/project-docs/foundation/architecture.md` | Active stack and architecture truth |
|
|
22
|
-
| `docs/project-docs/
|
|
20
|
+
| `docs/project-docs/development/testing.md` | Active verification truth |
|
|
23
21
|
| `docs/project-docs/foundation/status.md` | Active roadmap and current-state truth |
|
|
24
22
|
| Platform instruction surfaces | Automatic behavior layer |
|
|
25
23
|
| Skills and reusable prompts | Reusable procedure and generation layers |
|
|
26
24
|
| Workflow, handoff, and historical docs | Potentially valid references or stale artifacts |
|
|
27
25
|
| Relevant code, tests, configs, and runtime-facing artifacts | Evidence for whether active docs still match the current repository |
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## When To Use
|
|
27
|
+
## When to Use
|
|
32
28
|
|
|
33
29
|
| Trigger | Example request |
|
|
34
30
|
| --- | --- |
|
|
@@ -37,10 +33,6 @@ This skill is the reusable complement to the parity reusable prompt. Use it when
|
|
|
37
33
|
| Template maintenance | "Audit platform instruction surfaces and skills after changing the contract" |
|
|
38
34
|
| Handoff preparation | "Find contradictions before handing this repo to another maintainer" |
|
|
39
35
|
|
|
40
|
-
Use `full-verification` instead when the user asks for a broad verification entry point and repository drift is only one possible verification path.
|
|
41
|
-
|
|
42
|
-
Typical audit targets include:
|
|
43
|
-
|
|
44
36
|
Check for disagreement across:
|
|
45
37
|
|
|
46
38
|
- project identity and naming
|
|
@@ -53,8 +45,6 @@ Check for disagreement across:
|
|
|
53
45
|
- rule expectations vs documented workflow
|
|
54
46
|
- active docs vs current code, tests, configs, or runtime-facing behavior when authority is disputed
|
|
55
47
|
|
|
56
|
-
---
|
|
57
|
-
|
|
58
48
|
## Procedure
|
|
59
49
|
|
|
60
50
|
### Step 1 — Establish the source of truth
|
|
@@ -99,29 +89,7 @@ Determine whether the mismatch affects:
|
|
|
99
89
|
|
|
100
90
|
Recommend which owning file or layer should be updated. Do not spread the same fact across more files than necessary.
|
|
101
91
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
## Output Contract
|
|
105
|
-
|
|
106
|
-
For each finding, include:
|
|
107
|
-
|
|
108
|
-
1. severity
|
|
109
|
-
2. fact in conflict
|
|
110
|
-
3. source-of-truth location
|
|
111
|
-
4. conflicting location
|
|
112
|
-
5. classification
|
|
113
|
-
6. why it matters
|
|
114
|
-
7. recommended owner to update
|
|
115
|
-
8. whether user direction is required before deciding the fix path
|
|
116
|
-
|
|
117
|
-
End with:
|
|
118
|
-
|
|
119
|
-
1. highest-priority drift items
|
|
120
|
-
2. acceptable historical artifacts that should not be treated as blockers
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Quality Checks
|
|
92
|
+
## Quality Check
|
|
125
93
|
|
|
126
94
|
- Do not confuse reference material with active truth
|
|
127
95
|
- Do not propose fixing both sides of a contradiction when one side clearly owns the fact
|
|
@@ -129,9 +97,7 @@ End with:
|
|
|
129
97
|
- Keep the audit actionable, not just descriptive
|
|
130
98
|
- Do not assume docs or code win when authority for the disputed fact is not explicit
|
|
131
99
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
## Anti-Patterns
|
|
100
|
+
## Anti-Pattern
|
|
135
101
|
|
|
136
102
|
- Treating summary files as the owner when the contract defines a different source of truth
|
|
137
103
|
- Reporting drift without naming the owning file or layer that should change
|
|
@@ -139,20 +105,28 @@ End with:
|
|
|
139
105
|
- Duplicating the same fact across multiple layers as a fix for drift
|
|
140
106
|
- Assuming implementation drift or documentation drift without checking whether the repository defines authority for that fact
|
|
141
107
|
|
|
142
|
-
|
|
108
|
+
## Output Contract
|
|
143
109
|
|
|
144
|
-
|
|
110
|
+
For each finding, include:
|
|
145
111
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
-
|
|
149
|
-
|
|
112
|
+
1. severity
|
|
113
|
+
2. fact in conflict
|
|
114
|
+
3. source-of-truth location
|
|
115
|
+
4. conflicting location
|
|
116
|
+
5. classification
|
|
117
|
+
6. why it matters
|
|
118
|
+
7. recommended owner to update
|
|
119
|
+
8. whether user direction is required before deciding the fix path
|
|
150
120
|
|
|
151
|
-
|
|
121
|
+
End with:
|
|
122
|
+
1. highest-priority drift items
|
|
123
|
+
2. acceptable historical artifacts that should not be treated as blockers
|
|
152
124
|
|
|
153
|
-
##
|
|
125
|
+
## Neutral Prompt Shape
|
|
126
|
+
`@agent use parity-audit on [Target Scope/Repo] focusing on [Specific Conflicts/Docs].`
|
|
154
127
|
|
|
128
|
+
## Example Prompt
|
|
155
129
|
- "Audit the repository for contradictions after the latest template changes"
|
|
156
130
|
- "Check whether reusable prompts and skills still match the contract"
|
|
157
131
|
- "Find stale summaries in the project docs"
|
|
158
|
-
- "Classify which mismatches are blockers versus historical artifacts"
|
|
132
|
+
- "Classify which mismatches are blockers versus historical artifacts"
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "refactor"
|
|
3
|
+
description: "Project-aware expert-role for code refactoring. Reads project docs first, enforces TDD, and restructures code to reduce cyclomatic complexity and improve maintainability without altering external behavior."
|
|
4
|
+
argument-hint: "Describe the function, file, or module to refactor"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Refactor
|
|
8
|
+
|
|
9
|
+
Produces a project-aware, expert-level refactoring plan and execution by reading the repository's project docs first, then applying strict structural improvements.
|
|
10
|
+
|
|
11
|
+
This skill is reusable across any programming language. It focuses on reducing technical debt, splitting monolithic structures, and improving testability. It should not assume a specific framework or design pattern until the project docs confirm them.
|
|
12
|
+
|
|
13
|
+
## Required Project Inputs
|
|
14
|
+
|
|
15
|
+
| Document | Why it matters |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `docs/project-docs/foundation/architecture.md` | Defines the acceptable patterns, boundaries, and coupling rules for the project. |
|
|
18
|
+
| `docs/project-docs/development/testing.md` | Defines the required testing frameworks and test coverage expectations. |
|
|
19
|
+
| `docs/project-docs/technical-guidelines/index.md` | Provides language-specific linting, style, or idiom rules. |
|
|
20
|
+
|
|
21
|
+
If the repository lacks the testing docs needed for safe refactoring, call that out and create or update the missing docs instead of refactoring blindly.
|
|
22
|
+
|
|
23
|
+
## When to Use
|
|
24
|
+
|
|
25
|
+
Use this skill when tasked with improving existing code without changing its feature set.
|
|
26
|
+
|
|
27
|
+
| Boundary type | Typical artifacts |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Function / Method | Reducing cyclomatic complexity, extracting pure functions, eliminating nested conditionals. |
|
|
30
|
+
| Class / Module | Applying SOLID principles, injecting dependencies, splitting god classes. |
|
|
31
|
+
| File / Directory | Reorganizing imports, breaking large files into logical cohesive units. |
|
|
32
|
+
| Naming & Style | Standardizing variable names, updating to project idioms. |
|
|
33
|
+
|
|
34
|
+
## Procedure
|
|
35
|
+
|
|
36
|
+
### Step 1 — Identify the Architecture Constraints
|
|
37
|
+
Extract from `architecture.md`:
|
|
38
|
+
- Domain boundaries and allowed dependency directions.
|
|
39
|
+
- Prescribed patterns (e.g., Use Repositories for data access, use Services for business logic).
|
|
40
|
+
|
|
41
|
+
### Step 2 — Read Existing Tests
|
|
42
|
+
Extract from the codebase:
|
|
43
|
+
- Are there existing unit or integration tests for the target code?
|
|
44
|
+
- If NO: **Stop.** You must write tests to establish a baseline before changing any structural code.
|
|
45
|
+
|
|
46
|
+
### Step 3 — Analyze the Target Code
|
|
47
|
+
Evaluate the target code for:
|
|
48
|
+
- High cyclomatic complexity (too many if/else branches).
|
|
49
|
+
- Side effects hidden within otherwise pure logic.
|
|
50
|
+
- Tight coupling to infrastructure or external dependencies.
|
|
51
|
+
- Duplicated logic.
|
|
52
|
+
|
|
53
|
+
### Step 4 — Formulate the Refactoring Plan
|
|
54
|
+
Design the new structure:
|
|
55
|
+
- Extract pure functions for testability.
|
|
56
|
+
- Introduce dependency injection where hardcoded dependencies exist.
|
|
57
|
+
- Replace complex conditionals with polymorphism, lookup tables, or guard clauses.
|
|
58
|
+
|
|
59
|
+
### Step 5 — Test-Driven Execution
|
|
60
|
+
1. Ensure the baseline tests pass.
|
|
61
|
+
2. Apply the refactoring incrementally.
|
|
62
|
+
3. Continuously verify that tests pass after each structural change.
|
|
63
|
+
|
|
64
|
+
### Step 6 — Preserve Documentation
|
|
65
|
+
Ensure all existing comments and docstrings are preserved unless the new structure explicitly invalidates them. In that case, update them accurately.
|
|
66
|
+
|
|
67
|
+
## Quality Check
|
|
68
|
+
|
|
69
|
+
Use this checklist when reviewing refactored code:
|
|
70
|
+
|
|
71
|
+
- Has the external API or behavior of the function/module changed? (It shouldn't).
|
|
72
|
+
- Is the new code easier to unit test?
|
|
73
|
+
- Were dependency rules from `architecture.md` respected?
|
|
74
|
+
- Were original comments preserved or updated?
|
|
75
|
+
- Did the refactoring introduce any new dependencies?
|
|
76
|
+
|
|
77
|
+
## Anti-Pattern
|
|
78
|
+
|
|
79
|
+
- Refactoring code without baseline tests.
|
|
80
|
+
- Over-engineering (e.g., introducing a complex Factory pattern for a simple two-branch conditional).
|
|
81
|
+
- Changing feature behavior or fixing bugs silently during a refactor.
|
|
82
|
+
- Silently deleting developer comments or context notes.
|
|
83
|
+
|
|
84
|
+
## Output Contract
|
|
85
|
+
|
|
86
|
+
When using this skill, the output should include:
|
|
87
|
+
|
|
88
|
+
1. the project docs consulted
|
|
89
|
+
2. the identified code smells / issues in the target code
|
|
90
|
+
3. the baseline testing strategy used
|
|
91
|
+
4. the step-by-step refactoring changes applied
|
|
92
|
+
5. verification that all external behavior remains identical
|
|
93
|
+
|
|
94
|
+
## Neutral Prompt Shape
|
|
95
|
+
`@agent use refactor on [Target Function/File] focusing on [Specific Architecture/Simplicity Goal].`
|
|
96
|
+
|
|
97
|
+
## Example Prompt
|
|
98
|
+
- "Refactor this god class into smaller cohesive services."
|
|
99
|
+
- "Reduce the cyclomatic complexity of this function."
|
|
100
|
+
- "Reorganize the imports and structure of this legacy file."
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "security-audit"
|
|
3
|
+
description: "Project-aware expert-role for security and vulnerability auditing. Reads project docs first, enforces strict boundary controls, OWASP Top 10 mitigation, authentication, and data privacy rules across the codebase."
|
|
4
|
+
argument-hint: "Point to the code, file, module, or change to audit"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Security Audit
|
|
8
|
+
|
|
9
|
+
Produces a project-aware, **expert-level security audit** by reading the repository's project docs first, then applying rigorous threat modeling and vulnerability analysis to the current architecture.
|
|
10
|
+
|
|
11
|
+
This skill is reusable across application logic, API boundaries, infrastructure configurations, and data persistence layers. It should not assume specific compliance frameworks (like SOC2 or HIPAA) until the project docs explicitly confirm them.
|
|
12
|
+
|
|
13
|
+
## Required Project Inputs
|
|
14
|
+
|
|
15
|
+
| Document | Why it matters |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `docs/project-docs/operations/security-compliance.md` | Defines the actual threat model, acceptable risk, security gates, PII masking, data retention, and regulatory requirements. |
|
|
18
|
+
| `docs/project-docs/foundation/architecture.md` | Defines trust boundaries, network zones, and where authentication/authorization is enforced. |
|
|
19
|
+
| `docs/project-docs/development/api-contract.md` | Clarifies the expected payload shapes and validation rules to prevent injection attacks. |
|
|
20
|
+
|
|
21
|
+
If the repository lacks the security docs needed for a proper audit, call that out and establish baseline security assumptions before reviewing code.
|
|
22
|
+
|
|
23
|
+
## When to Use
|
|
24
|
+
|
|
25
|
+
Use this skill when tasked with identifying vulnerabilities or ensuring code meets security standards.
|
|
26
|
+
|
|
27
|
+
| Boundary type | Typical artifacts |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Authentication / Authorization | JWT validation, role-based access control (RBAC), session management. |
|
|
30
|
+
| API / Input Validation | Preventing SQL injection, XSS, CSRF, and mass assignment vulnerabilities. |
|
|
31
|
+
| Data Privacy / Cryptography | Encryption at rest/transit, hashing algorithms, secret management. |
|
|
32
|
+
| Infrastructure Security | Dockerfile security, IAM permissions, network exposure. |
|
|
33
|
+
|
|
34
|
+
## Procedure
|
|
35
|
+
|
|
36
|
+
### Step 1 — Understand intent
|
|
37
|
+
|
|
38
|
+
- What is this code supposed to do?
|
|
39
|
+
- What inputs, outputs, and side effects should it have?
|
|
40
|
+
- Which boundary does it sit behind?
|
|
41
|
+
- What project rules apply here?
|
|
42
|
+
|
|
43
|
+
### Step 2 — Check correctness risks
|
|
44
|
+
|
|
45
|
+
Look for:
|
|
46
|
+
|
|
47
|
+
- runtime crashes
|
|
48
|
+
- missing validation
|
|
49
|
+
- broken assumptions around nullability or absence
|
|
50
|
+
- incorrect state transitions
|
|
51
|
+
- failure to handle empty, partial, duplicate, or delayed inputs
|
|
52
|
+
- unsafe retry or transaction behavior
|
|
53
|
+
- concurrency or sequencing defects
|
|
54
|
+
- schema or serialization mismatches
|
|
55
|
+
|
|
56
|
+
### Step 3 — Check boundary violations
|
|
57
|
+
|
|
58
|
+
Use `architecture.md` to inspect:
|
|
59
|
+
|
|
60
|
+
- layer or module import violations
|
|
61
|
+
- leaked internal types across boundaries
|
|
62
|
+
- controllers or UI doing business logic that belongs elsewhere
|
|
63
|
+
- repositories or services depending on the wrong layer
|
|
64
|
+
- transport or persistence details leaking into durable domain concepts when the project forbids that
|
|
65
|
+
- identify where untrusted input enters the system (e.g., public APIs, webhooks, file uploads).
|
|
66
|
+
- identify where trust is explicitly verified (e.g., API gateways, auth middlewares).
|
|
67
|
+
|
|
68
|
+
### Step 4 — Audit Authentication and Session State
|
|
69
|
+
Evaluate auth mechanisms against `security-compliance.md`:
|
|
70
|
+
- Are tokens securely stored (e.g., HttpOnly cookies instead of LocalStorage)?
|
|
71
|
+
- Are session timeouts and revocation mechanisms implemented?
|
|
72
|
+
- Is authorization checked on every privileged action, not just at the UI level?
|
|
73
|
+
|
|
74
|
+
Also look for:
|
|
75
|
+
|
|
76
|
+
- duplicated logic
|
|
77
|
+
- unused or unreachable branches
|
|
78
|
+
- stale abstractions
|
|
79
|
+
- helper functions with no callers
|
|
80
|
+
- repeated literal values that should be owned centrally
|
|
81
|
+
- duplicated normalization or mapping logic that should be shared
|
|
82
|
+
|
|
83
|
+
### Step 5 — Check Secret Management and Cryptography
|
|
84
|
+
Ensure: No hardcoded secrets, passwords, or API keys exist in the codebase. Sensitive data is hashed using strong algorithms (e.g., Argon2, bcrypt) with salts. Data in transit is strictly TLS-enforced.
|
|
85
|
+
|
|
86
|
+
### Step 6 — Verify Compliance and PII Handling
|
|
87
|
+
Consult `security-compliance.md`: Ensure PII is not leaked into application logs, error messages, or third-party analytics tools. Verify data retention constraints are implemented.
|
|
88
|
+
|
|
89
|
+
### Step 7 — Prioritize findings
|
|
90
|
+
|
|
91
|
+
Classify findings by severity:
|
|
92
|
+
|
|
93
|
+
- critical
|
|
94
|
+
- high
|
|
95
|
+
- medium
|
|
96
|
+
- low
|
|
97
|
+
|
|
98
|
+
Each finding should include:
|
|
99
|
+
|
|
100
|
+
- location
|
|
101
|
+
- issue
|
|
102
|
+
- why it matters
|
|
103
|
+
- concrete corrective direction
|
|
104
|
+
|
|
105
|
+
## Quality Check
|
|
106
|
+
|
|
107
|
+
- Are all inputs crossing a trust boundary rigorously validated?
|
|
108
|
+
- Are secrets injected via environment variables rather than hardcoded?
|
|
109
|
+
- Are dependencies checked for known CVEs?
|
|
110
|
+
- Does the code adhere to the Principle of Least Privilege?
|
|
111
|
+
- Are error messages stripped of internal stack traces before returning to the client?
|
|
112
|
+
- No finding without evidence from the target artifact
|
|
113
|
+
- No severity inflation
|
|
114
|
+
- No style nitpicks disguised as bugs
|
|
115
|
+
- No architecture complaint without reference to actual project boundaries
|
|
116
|
+
- No recommendation that ignores project stage or available validation
|
|
117
|
+
|
|
118
|
+
## Anti-Pattern
|
|
119
|
+
|
|
120
|
+
- Relying exclusively on client-side validation for security.
|
|
121
|
+
- Concatenating SQL queries with user input.
|
|
122
|
+
- Logging raw request bodies that might contain passwords or PII.
|
|
123
|
+
- Implementing custom cryptography instead of using proven industry standards.
|
|
124
|
+
- Assuming an internal network is completely trustworthy without zero-trust checks.
|
|
125
|
+
- Calling something dead code without checking workspace usage
|
|
126
|
+
- Calling something a bug without defining the failure condition
|
|
127
|
+
- Criticizing a pattern that the project explicitly chose in `architecture.md`
|
|
128
|
+
- Recommending wide rewrites before testing a local fix or a smaller boundary change
|
|
129
|
+
|
|
130
|
+
## Output Contract
|
|
131
|
+
|
|
132
|
+
When using this skill, the output should include:
|
|
133
|
+
1. the project docs consulted and assumed threat model
|
|
134
|
+
2. identified vulnerabilities categorized by OWASP standard
|
|
135
|
+
3. severity rating (Critical, High, Medium, Low) for each finding
|
|
136
|
+
4. exploitability and impact analysis
|
|
137
|
+
5. specific, actionable remediation steps for each finding
|
|
138
|
+
|
|
139
|
+
## Neutral Prompt Shape
|
|
140
|
+
`@agent use security-audit on [Target Component/API] focusing on [Specific Threat/Vulnerability].`
|
|
141
|
+
|
|
142
|
+
## Example Prompt
|
|
143
|
+
- "Audit this new authentication controller for session management flaws."
|
|
144
|
+
- "Review this file upload endpoint for security risks."
|
|
145
|
+
- "Perform a security audit on this database migration script."
|
|
146
|
+
- "Review this code for bugs, risks, and boundary issues."
|
|
147
|
+
- "Audit this module like a strict senior reviewer."
|
|
148
|
+
- "Check whether this implementation has correctness or security problems."
|
|
149
|
+
- "Find dead code, logic flaws, and maintainability risks in this change."
|
|
@@ -1,34 +1,29 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: analysis
|
|
2
|
+
name: "system-analysis"
|
|
3
3
|
description: "Project-aware expert-role analysis for architecture, debugging, trade-offs, risk, performance, requirements, and design questions. Reads project docs first, then applies expert structured reasoning to the current repository context."
|
|
4
4
|
argument-hint: "Describe the problem, decision, artifact, or system to analyze"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Analysis
|
|
7
|
+
# System Analysis
|
|
8
8
|
|
|
9
9
|
Produces a **rigorous, expert-level analysis** of a problem, decision, artifact, or system after first reading the project documentation that defines the repository's actual context.
|
|
10
10
|
|
|
11
11
|
This skill is reusable across product, backend, frontend, infrastructure, monorepo, and documentation-heavy projects. It should not assume a particular stack until the project docs confirm it.
|
|
12
12
|
|
|
13
|
-
---
|
|
14
|
-
|
|
15
13
|
## Required Project Inputs
|
|
16
14
|
|
|
17
15
|
| Document | Why it matters |
|
|
18
16
|
| --- | --- |
|
|
19
|
-
|
|
20
17
|
| `docs/project-docs/foundation/prd.md` | Clarifies goals, scope, stakeholders, and success metrics |
|
|
21
18
|
| `docs/project-docs/foundation/architecture.md` | Defines stack, boundaries, integration model, constraints, and runtime assumptions |
|
|
22
19
|
| `docs/project-docs/foundation/status.md` | Reveals maturity, roadmap, active workstreams, and known blockers |
|
|
23
|
-
| `docs/project-docs/
|
|
20
|
+
| `docs/project-docs/development/testing.md` | Shows what validation exists and how strong the available evidence can be |
|
|
24
21
|
| Relevant feature, workflow, API, or guideline docs | Supply domain-specific truth for the topic being analyzed |
|
|
25
22
|
| Relevant code, logs, tests, or runtime evidence | Support findings with direct evidence rather than guesswork |
|
|
26
23
|
|
|
27
24
|
If the required project docs are missing, note the gap explicitly and limit confidence accordingly.
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## When To Use
|
|
26
|
+
## When to Use
|
|
32
27
|
|
|
33
28
|
| Trigger | Example request |
|
|
34
29
|
| --- | --- |
|
|
@@ -40,8 +35,6 @@ If the required project docs are missing, note the gap explicitly and limit conf
|
|
|
40
35
|
| Performance diagnosis | "Analyze where this request path will bottleneck" |
|
|
41
36
|
| Product or roadmap question | "Analyze whether this feature belongs in MVP" |
|
|
42
37
|
|
|
43
|
-
---
|
|
44
|
-
|
|
45
38
|
## Procedure
|
|
46
39
|
|
|
47
40
|
### Step 1 — Understand the question
|
|
@@ -121,22 +114,7 @@ When comparing options or hypotheses:
|
|
|
121
114
|
- say what could change the conclusion
|
|
122
115
|
- tie the recommendation back to the project's actual constraints
|
|
123
116
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
## Output Contract
|
|
127
|
-
|
|
128
|
-
Your output should include:
|
|
129
|
-
|
|
130
|
-
1. summary
|
|
131
|
-
2. analysis by area or component
|
|
132
|
-
3. key findings ordered by importance
|
|
133
|
-
4. recommendation or decision guidance
|
|
134
|
-
5. risks and open questions
|
|
135
|
-
6. confidence and evidence limitations when relevant
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## Quality Checks
|
|
117
|
+
## Quality Check
|
|
140
118
|
|
|
141
119
|
- No claim without evidence or clearly marked assumption
|
|
142
120
|
- No false precision when evidence is weak
|
|
@@ -144,9 +122,7 @@ Your output should include:
|
|
|
144
122
|
- No vague recommendation without an actionable next step
|
|
145
123
|
- No hidden stack assumptions that were not confirmed from project docs
|
|
146
124
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
## Anti-Patterns
|
|
125
|
+
## Anti-Pattern
|
|
150
126
|
|
|
151
127
|
- Listing facts without evaluating them
|
|
152
128
|
- Jumping to the first plausible conclusion
|
|
@@ -154,20 +130,22 @@ Your output should include:
|
|
|
154
130
|
- Recommending a rewrite when an incremental fix would solve the problem
|
|
155
131
|
- Ignoring the project stage, roadmap, or non-goals in `prd.md` and `status.md`
|
|
156
132
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
## Natural Prompt Shapes
|
|
133
|
+
## Output Contract
|
|
160
134
|
|
|
161
|
-
|
|
162
|
-
- "Analyze this decision and tell me whether it still makes sense."
|
|
163
|
-
- "What are the trade-offs and risks of these two options?"
|
|
164
|
-
- "Check whether these requirements or assumptions still hold up."
|
|
135
|
+
When using this skill, the output should include:
|
|
165
136
|
|
|
166
|
-
|
|
137
|
+
1. summary
|
|
138
|
+
2. analysis by area or component
|
|
139
|
+
3. key findings ordered by importance
|
|
140
|
+
4. recommendation or decision guidance
|
|
141
|
+
5. risks and open questions
|
|
142
|
+
6. confidence and evidence limitations when relevant
|
|
167
143
|
|
|
168
|
-
##
|
|
144
|
+
## Neutral Prompt Shape
|
|
145
|
+
`@agent use system-analysis on [Target Directory/Component] focusing on [Specific Goal/Flow].`
|
|
169
146
|
|
|
147
|
+
## Example Prompt
|
|
148
|
+
- "Analyze this decision and tell me whether it still makes sense."
|
|
170
149
|
- "Analyze this module boundary for coupling risk"
|
|
171
150
|
- "Analyze why this workflow fails intermittently"
|
|
172
|
-
- "Analyze option A vs option B for this integration"
|
|
173
|
-
- "Analyze whether this feature belongs in MVP"
|
|
151
|
+
- "Analyze option A vs option B for this integration"
|