@moon791017/neo-skills 1.1.5 → 1.1.6
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/package.json
CHANGED
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
|
|
7
7
|
# Requirement Clarification Specifications
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Apply the Inversion & Generator Pattern. Follow this protocol strictly to translate raw, chaotic user complaints and screenshots into clean, structured system specifications.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
|
|
7
7
|
# Code Review Specifications
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Apply the Reviewer Pattern. Follow this protocol strictly to systematically, objectively, and constructively review the user's code changes.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -37,9 +37,10 @@ You are a senior code review expert (Reviewer Pattern). Follow this protocol str
|
|
|
37
37
|
[review-checklist.md](file:///Users/ben/Projects/neo-skills/skills/neo-code-review/references/review-checklist.md)
|
|
38
38
|
|
|
39
39
|
2. **Systematically Evaluate Code**:
|
|
40
|
-
- Analyze the code logic deeply and compare it against the
|
|
41
|
-
-
|
|
42
|
-
-
|
|
40
|
+
- Analyze the code logic deeply and compare it against the checklist dimensions: Correctness, Regression Risk, Security, Performance, Data & Concurrency, Test Gaps, SOLID/Design Principles, Logging/Observability, Maintainability, and Style.
|
|
41
|
+
- Prioritize evidence-backed findings that create concrete behavioral, security, operational, compatibility, or maintainability risk.
|
|
42
|
+
- Filter out **🔴 Critical Issues (Must-fix)** for defects such as requirement breakage, security vulnerabilities, data corruption/loss, broken authorization, severe regressions, or production-impacting reliability failures.
|
|
43
|
+
- Classify lower-risk performance, design, logging, test coverage, readability, and maintainability issues under **🟡 Suggestions** when they have a clear reason and actionable remediation.
|
|
43
44
|
|
|
44
45
|
---
|
|
45
46
|
|
|
@@ -1,76 +1,136 @@
|
|
|
1
1
|
# Code Review Checklist
|
|
2
2
|
|
|
3
|
-
This checklist
|
|
3
|
+
This checklist is the review baseline for `neo-code-review`. During review, compare the code changes against these criteria and categorize findings by severity: Critical Issues (🔴 Must-fix), Suggestions (🟡 Clean Code/Performance), and Praise (🟢 High Quality).
|
|
4
|
+
|
|
5
|
+
Only report a finding when the risk is supported by the diff, surrounding code, tests, runtime behavior, or a clearly stated requirement. Do not turn every checklist item into a finding.
|
|
4
6
|
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
## 1. Correctness & Logic
|
|
8
10
|
|
|
9
|
-
- [ ] **
|
|
10
|
-
- [ ] **
|
|
11
|
+
- [ ] **Requirement Preservation**: Does the change break an existing or stated requirement? Does it miss a required business path?
|
|
12
|
+
- [ ] **Logic Errors**: Are conditionals, loops, ordering, calculations, parsing, validation, or branching rules incorrect?
|
|
13
|
+
- [ ] **Boundary Conditions**: Are edge cases handled properly, such as `null`, `undefined`, empty values, maximum/minimum values, negative numbers, special characters, duplicate input, timezone boundaries, or partial data?
|
|
14
|
+
- [ ] **State Transitions**: Are status changes, lifecycle transitions, retries, rollbacks, or cleanup steps consistent and reversible where required?
|
|
11
15
|
- [ ] **Exception Handling**:
|
|
12
|
-
- Are error-prone operations
|
|
13
|
-
- Are caught exceptions
|
|
14
|
-
- [ ] **Concurrency & Thread Safety**: In multi-threaded or asynchronous environments, are there potential race conditions, deadlocks, or unawaited async operations?
|
|
15
|
-
- [ ] **State Management**: Are variable lifecycles correct? Are there any unintended side effects or global namespace pollution?
|
|
16
|
+
- Are error-prone operations such as I/O, network requests, database calls, parsing, serialization, or background jobs handled safely?
|
|
17
|
+
- Are caught exceptions recovered, propagated, or logged appropriately instead of being swallowed silently?
|
|
16
18
|
|
|
17
19
|
---
|
|
18
20
|
|
|
19
|
-
## 2.
|
|
21
|
+
## 2. Regression Risk & Compatibility
|
|
20
22
|
|
|
21
|
-
- [ ] **
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- [ ] **
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
- [ ] **Existing APIs**: Does the change break public APIs, endpoint behavior, method signatures, event contracts, or SDK/client expectations?
|
|
24
|
+
- [ ] **Data Formats**: Does it change request/response schemas, database shape, serialized fields, enum values, date formats, number precision, or default values in an incompatible way?
|
|
25
|
+
- [ ] **Error Formats**: Does it break existing error codes, problem details, validation messages, HTTP status codes, or client-side error handling assumptions?
|
|
26
|
+
- [ ] **Permission Flows**: Does it alter authentication, authorization, role checks, ownership checks, or approval flows in a way that blocks valid users or grants excessive access?
|
|
27
|
+
- [ ] **User Workflows**: Does it break existing user journeys, backward compatibility, migrations, imports/exports, saved settings, deep links, or integrations?
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 3. Security — 🔴 Critical
|
|
32
|
+
|
|
33
|
+
- [ ] **Injection**:
|
|
34
|
+
- SQL injection, NoSQL injection, command injection, LDAP injection, or template injection.
|
|
35
|
+
- Unsafe string concatenation in queries, shell commands, templates, filters, or dynamic expressions.
|
|
36
|
+
- [ ] **Web Security**:
|
|
37
|
+
- XSS caused by missing output encoding, unsafe HTML rendering, unsafe markdown rendering, or scriptable user content.
|
|
38
|
+
- CSRF exposure on state-changing requests.
|
|
39
|
+
- CORS misconfiguration that allows unintended origins, credentials, or methods.
|
|
28
40
|
- [ ] **Authentication & Authorization**:
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
- [ ] **
|
|
32
|
-
-
|
|
33
|
-
-
|
|
41
|
+
- Broken authentication, broken access control, IDOR, missing ownership checks, weak session handling, or bypassable authorization logic.
|
|
42
|
+
- Missing rate limit or abuse protection on sensitive endpoints such as login, reset, invite, export, payment, or AI calls.
|
|
43
|
+
- [ ] **Sensitive Data Protection**:
|
|
44
|
+
- Sensitive data exposure, secret/token leakage, hardcoded credentials, connection strings, private keys, or unsafe debug output.
|
|
45
|
+
- Insecure logging of tokens, passwords, PII, connection strings, full sensitive payloads, or reversible sensitive data.
|
|
46
|
+
- [ ] **File, Network & Execution Risks**:
|
|
47
|
+
- SSRF, path traversal, arbitrary file read/write, unsafe upload handling, insecure deserialization, unsafe reflection, or dynamic execution.
|
|
48
|
+
- [ ] **Validation & Encoding**:
|
|
49
|
+
- Missing input validation, output encoding, authorization checks, allowlists, size limits, content-type validation, or schema validation.
|
|
50
|
+
- [ ] **Cryptography**:
|
|
51
|
+
- Insecure crypto, weak hashes, predictable random values, missing salt, hardcoded keys, custom crypto, or unsafe key management.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 4. Performance & Resource Management
|
|
56
|
+
|
|
57
|
+
- [ ] **Database Efficiency**:
|
|
58
|
+
- N+1 queries, repeated database roundtrips, missing batching, unnecessary joins, fetching unused columns, or repeated writes.
|
|
59
|
+
- Unpaginated large queries, unbounded result sets, missing limits, or missing necessary index guidance for hot queries.
|
|
60
|
+
- [ ] **Async & External Calls**:
|
|
61
|
+
- Synchronous blocking inside async flows, sync-over-async, unawaited tasks, missing cancellation token propagation, or thread-pool starvation risk.
|
|
62
|
+
- External API calls without timeout, retry/backoff, idempotency strategy, or circuit-breaker consideration where failures could cascade.
|
|
63
|
+
- [ ] **Memory & Resource Use**:
|
|
64
|
+
- Large allocations, loading entire large files or payloads into memory, unbounded buffers, unclosed streams, undisposed resources, or leaked handles.
|
|
65
|
+
- Unregistered event listeners, long-lived references, growing global caches, or background work that cannot be stopped.
|
|
66
|
+
- [ ] **Algorithmic Efficiency**:
|
|
67
|
+
- Inefficient algorithms, repeated computation, unnecessary nested loops, repeated serialization/deserialization, or expensive work in hot paths.
|
|
68
|
+
- [ ] **Logging Cost**:
|
|
69
|
+
- Excessive logging in hot paths, logging large payloads, or synchronous logging that can slow requests.
|
|
70
|
+
- [ ] **Caching**:
|
|
71
|
+
- Incorrect cache keys, stale cache invalidation, cache stampede risk, missing TTLs, or caching data with user-specific authorization requirements.
|
|
34
72
|
|
|
35
73
|
---
|
|
36
74
|
|
|
37
|
-
##
|
|
75
|
+
## 5. Data & Concurrency
|
|
38
76
|
|
|
39
|
-
- [ ] **
|
|
40
|
-
- [ ] **
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- [ ] **Resource
|
|
44
|
-
|
|
45
|
-
- Are resources released in `finally` blocks or using structural patterns like `using` (.NET) or `with` (Python)?
|
|
46
|
-
- [ ] **Memory Leaks**:
|
|
47
|
-
- Are there unregistered event listeners, infinitely growing global caches, or long-lived objects retaining references to short-lived objects?
|
|
48
|
-
- [ ] **Caching & Lazy Loading**: Is an appropriate caching strategy used for high-frequency, low-variance expensive computations or I/O operations?
|
|
77
|
+
- [ ] **Transaction Consistency**: Are related writes protected by transactions or compensating logic where partial failure would corrupt state?
|
|
78
|
+
- [ ] **Duplicate Writes & Idempotency**: Can retries, double-clicks, queue redelivery, or webhook replay create duplicate records or repeated side effects?
|
|
79
|
+
- [ ] **Race Conditions**: Are there check-then-act races, lost updates, optimistic concurrency gaps, locking mistakes, deadlocks, or shared mutable state issues?
|
|
80
|
+
- [ ] **Cache Invalidation**: Does the change keep cache, database, search index, derived data, and client state consistent?
|
|
81
|
+
- [ ] **Resource Release**: Are locks, transactions, database connections, file handles, timers, subscriptions, and background workers released on success and failure?
|
|
82
|
+
- [ ] **Async Error Handling**: Are async failures observed, propagated, retried safely, or surfaced to monitoring instead of becoming unhandled background errors?
|
|
49
83
|
|
|
50
84
|
---
|
|
51
85
|
|
|
52
|
-
##
|
|
86
|
+
## 6. Test Gaps
|
|
53
87
|
|
|
54
|
-
- [ ] **
|
|
55
|
-
- [ ] **
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- [ ] **
|
|
59
|
-
- Does the code follow the **DRY (Don't Repeat Yourself)** principle?
|
|
60
|
-
- Does the code follow **SOLID principles** (especially the Single Responsibility Principle - SRP)?
|
|
61
|
-
- [ ] **Testability**:
|
|
62
|
-
- Is the code easy to unit test?
|
|
63
|
-
- Is there appropriate dependency injection or decoupling to facilitate mocking external dependencies?
|
|
64
|
-
- Are there corresponding test cases for new features or bug fixes?
|
|
88
|
+
- [ ] **High-Risk Branches**: Are new critical branches, feature flags, migrations, fallbacks, retries, or failure branches covered?
|
|
89
|
+
- [ ] **Error Paths**: Are validation errors, dependency failures, timeouts, malformed data, and partial failures tested?
|
|
90
|
+
- [ ] **Permission Boundaries**: Are unauthorized, unauthenticated, wrong-owner, wrong-role, and cross-tenant cases tested?
|
|
91
|
+
- [ ] **Data Conversion**: Are serialization, parsing, mapping, rounding, timezone handling, enum changes, and schema compatibility tested?
|
|
92
|
+
- [ ] **Regression Scenarios**: Are tests present for the bug being fixed or the existing workflow that could be broken?
|
|
65
93
|
|
|
66
94
|
---
|
|
67
95
|
|
|
68
|
-
##
|
|
96
|
+
## 7. SOLID / Design Principles
|
|
69
97
|
|
|
70
|
-
- [ ] **
|
|
71
|
-
- [ ] **
|
|
72
|
-
|
|
73
|
-
|
|
98
|
+
- [ ] **SRP (Single Responsibility Principle)**: Does a class, method, component, or service take on too many responsibilities, making bugs or tests more likely?
|
|
99
|
+
- [ ] **OCP (Open/Closed Principle)**: Will common new requirements require repeatedly editing fragile core logic instead of extending through stable seams?
|
|
100
|
+
- [ ] **LSP (Liskov Substitution Principle)**: Do inheritance, interface, or polymorphic changes violate existing contracts or caller assumptions?
|
|
101
|
+
- [ ] **ISP (Interface Segregation Principle)**: Are callers forced to depend on methods, fields, DTO members, or service operations they do not need?
|
|
102
|
+
- [ ] **DIP (Dependency Inversion Principle)**: Do high-level modules directly depend on concrete implementations in a way that makes testing, replacement, or isolation difficult?
|
|
103
|
+
|
|
104
|
+
Only list SOLID/design findings when the violation clearly increases defect risk, breaks extension, makes tests meaningfully harder, or creates concrete maintenance risk. Do not report abstract design preferences as findings.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 8. Logging / Observability
|
|
109
|
+
|
|
110
|
+
- [ ] **Coverage of Important Failure Points**: Do important error paths, external APIs, database operations, background jobs, scheduled jobs, payment flows, and AI calls have enough logging or telemetry to debug production failures?
|
|
111
|
+
- [ ] **Diagnostic Context**: Do logs include useful correlation fields such as request id, entity id, user/tenant identifier when safe, operation, status, duration, and exception details?
|
|
112
|
+
- [ ] **Log Levels**: Are expected business outcomes logged below `error`, and real failures not hidden as `debug` or omitted entirely?
|
|
113
|
+
- [ ] **Sensitive Data Safety**: Logs must not include tokens, passwords, connection strings, personal data, full sensitive payloads, or content that can reconstruct sensitive data.
|
|
114
|
+
- [ ] **Signal-to-Noise**: Do not require logging on every line. Report logging gaps only for failure points that would be difficult to investigate after deployment.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 9. Maintainability & Style
|
|
119
|
+
|
|
120
|
+
- [ ] **Clear Naming**: Are variables, functions, classes, files, and modules named clearly enough to reflect intent?
|
|
121
|
+
- [ ] **Complexity Control**:
|
|
122
|
+
- Is a function, method, component, or query too long or deeply nested to review safely?
|
|
123
|
+
- Is cyclomatic complexity high enough to hide bugs or make tests brittle?
|
|
124
|
+
- [ ] **Modularity & Duplication**:
|
|
125
|
+
- Does the code avoid meaningful duplication, copy-pasted business rules, and divergent validation logic?
|
|
126
|
+
- Is shared behavior placed at the right abstraction level without over-engineering?
|
|
127
|
+
- [ ] **Testability**:
|
|
128
|
+
- Is the code easy to unit test or integration test?
|
|
129
|
+
- Are dependencies injectable or isolatable where tests need control over time, I/O, network calls, randomness, or external systems?
|
|
130
|
+
- [ ] **Idiomatic Best Practices**: Does the code use language and framework conventions appropriately without fighting the platform?
|
|
131
|
+
- [ ] **Formatting & Consistency**:
|
|
132
|
+
- Do indentation, spacing, imports, quotes, naming, and file organization match the codebase?
|
|
133
|
+
- Does the code pass the local formatter, linter, and type checker when applicable?
|
|
74
134
|
- [ ] **Comment Quality**:
|
|
75
|
-
- Do comments explain
|
|
76
|
-
- Has obsolete or commented-out dead code been
|
|
135
|
+
- Do comments explain non-obvious intent and tradeoffs instead of restating the code?
|
|
136
|
+
- Has obsolete, misleading, or commented-out dead code been removed?
|
|
@@ -18,7 +18,7 @@ metadata:
|
|
|
18
18
|
|
|
19
19
|
## Workflow (Generator Pattern)
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Follow these steps exactly to create robust, high-performance C# Tag Helpers.
|
|
22
22
|
|
|
23
23
|
### Step 1: Perceive & Gather Requirements (Inversion)
|
|
24
24
|
Before writing any code, ask the user to clarify the following if not already provided:
|
package/skills/neo-rust/SKILL.md
CHANGED
|
@@ -11,7 +11,7 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
# Neo Rust Expert
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Write safe, maintainable, and idiomatic Rust code by strictly following the official design patterns, leveraging Rust's powerful type system, and avoiding anti-patterns.
|
|
15
15
|
|
|
16
16
|
## Gotchas
|
|
17
17
|
|