nurosys-agents 2.0.0

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.
Files changed (106) hide show
  1. package/.agent/INSTRUCTIONS.md +82 -0
  2. package/.agent/README.md +483 -0
  3. package/.agent/backend/skills/architect/SKILL.md +436 -0
  4. package/.agent/backend/skills/auth-and-permissions/SKILL.md +168 -0
  5. package/.agent/backend/skills/brainstorm/SKILL.md +127 -0
  6. package/.agent/backend/skills/code-reviewer/SKILL.md +324 -0
  7. package/.agent/backend/skills/create-blueprint/SKILL.md +650 -0
  8. package/.agent/backend/skills/debug-issue/SKILL.md +53 -0
  9. package/.agent/backend/skills/explore-codebase/SKILL.md +45 -0
  10. package/.agent/backend/skills/quick-execute/SKILL.md +99 -0
  11. package/.agent/backend/skills/refactor-safely/SKILL.md +46 -0
  12. package/.agent/backend/skills/security-assessment/SKILL.md +174 -0
  13. package/.agent/backend/workflows/module-runner.claude.md +226 -0
  14. package/.agent/backend/workflows/module-runner.codex.md +155 -0
  15. package/.agent/backend/workflows/module-runner.cursor.md +212 -0
  16. package/.agent/frontend/skills/architect/SKILL.md +644 -0
  17. package/.agent/frontend/skills/auth-and-permissions/SKILL.md +43 -0
  18. package/.agent/frontend/skills/create-blueprint/SKILL.md +635 -0
  19. package/.agent/frontend/skills/debug-issue/SKILL.md +28 -0
  20. package/.agent/frontend/skills/explore-codebase/SKILL.md +29 -0
  21. package/.agent/frontend/skills/feature-workflow/SKILL.md +61 -0
  22. package/.agent/frontend/skills/react-quality-review/SKILL.md +126 -0
  23. package/.agent/frontend/skills/react-quality-review/examples.md +24 -0
  24. package/.agent/frontend/skills/react-quality-review/rules/_sections.md +26 -0
  25. package/.agent/frontend/skills/react-quality-review/rules/_template.md +28 -0
  26. package/.agent/frontend/skills/react-quality-review/rules/advanced-event-handler-refs.md +55 -0
  27. package/.agent/frontend/skills/react-quality-review/rules/advanced-init-once.md +42 -0
  28. package/.agent/frontend/skills/react-quality-review/rules/react-rules-calling.md +66 -0
  29. package/.agent/frontend/skills/react-quality-review/rules/react-rules-hooks.md +91 -0
  30. package/.agent/frontend/skills/react-quality-review/rules/react-rules-purity.md +121 -0
  31. package/.agent/frontend/skills/react-quality-review/rules/rendering-activity.md +26 -0
  32. package/.agent/frontend/skills/react-quality-review/rules/rendering-conditional-render.md +40 -0
  33. package/.agent/frontend/skills/react-quality-review/rules/rendering-content-visibility.md +38 -0
  34. package/.agent/frontend/skills/react-quality-review/rules/rendering-hoist-jsx.md +46 -0
  35. package/.agent/frontend/skills/react-quality-review/rules/rendering-usetransition-loading.md +75 -0
  36. package/.agent/frontend/skills/react-quality-review/rules/rerender-defer-reads.md +39 -0
  37. package/.agent/frontend/skills/react-quality-review/rules/rerender-dependencies.md +45 -0
  38. package/.agent/frontend/skills/react-quality-review/rules/rerender-derived-state-no-effect.md +40 -0
  39. package/.agent/frontend/skills/react-quality-review/rules/rerender-derived-state.md +29 -0
  40. package/.agent/frontend/skills/react-quality-review/rules/rerender-functional-setstate.md +74 -0
  41. package/.agent/frontend/skills/react-quality-review/rules/rerender-lazy-state-init.md +58 -0
  42. package/.agent/frontend/skills/react-quality-review/rules/rerender-memo-with-default-value.md +38 -0
  43. package/.agent/frontend/skills/react-quality-review/rules/rerender-memo.md +44 -0
  44. package/.agent/frontend/skills/react-quality-review/rules/rerender-move-effect-to-event.md +45 -0
  45. package/.agent/frontend/skills/react-quality-review/rules/rerender-no-inline-components.md +82 -0
  46. package/.agent/frontend/skills/react-quality-review/rules/rerender-simple-expression-in-memo.md +35 -0
  47. package/.agent/frontend/skills/react-quality-review/rules/rerender-transitions.md +40 -0
  48. package/.agent/frontend/skills/react-quality-review/rules/rerender-use-ref-transient-values.md +73 -0
  49. package/.agent/frontend/skills/refactor-safely/SKILL.md +29 -0
  50. package/.agent/frontend/skills/vuexy-component-guide/SKILL.md +369 -0
  51. package/.agent/frontend/skills/vuexy-component-guide/examples.md +662 -0
  52. package/.agent/frontend/skills/vuexy-component-guide/reference.md +1036 -0
  53. package/.agent/frontend/workflows/build-feature-react.workflow.md +82 -0
  54. package/.agent/frontend/workflows/feature-module-runner.md +101 -0
  55. package/.agent/monolith/skills/architect/SKILL.md +648 -0
  56. package/.agent/monolith/skills/auth-and-permissions/SKILL.md +43 -0
  57. package/.agent/monolith/skills/code-reviewer/SKILL.md +281 -0
  58. package/.agent/monolith/skills/create-blueprint/SKILL.md +635 -0
  59. package/.agent/monolith/skills/debug-issue/SKILL.md +28 -0
  60. package/.agent/monolith/skills/explore-codebase/SKILL.md +29 -0
  61. package/.agent/monolith/skills/feature-workflow/SKILL.md +61 -0
  62. package/.agent/monolith/skills/react-quality-review/SKILL.md +126 -0
  63. package/.agent/monolith/skills/react-quality-review/examples.md +24 -0
  64. package/.agent/monolith/skills/react-quality-review/rules/_sections.md +26 -0
  65. package/.agent/monolith/skills/react-quality-review/rules/_template.md +28 -0
  66. package/.agent/monolith/skills/react-quality-review/rules/advanced-event-handler-refs.md +55 -0
  67. package/.agent/monolith/skills/react-quality-review/rules/advanced-init-once.md +42 -0
  68. package/.agent/monolith/skills/react-quality-review/rules/react-rules-calling.md +66 -0
  69. package/.agent/monolith/skills/react-quality-review/rules/react-rules-hooks.md +91 -0
  70. package/.agent/monolith/skills/react-quality-review/rules/react-rules-purity.md +121 -0
  71. package/.agent/monolith/skills/react-quality-review/rules/rendering-activity.md +26 -0
  72. package/.agent/monolith/skills/react-quality-review/rules/rendering-conditional-render.md +40 -0
  73. package/.agent/monolith/skills/react-quality-review/rules/rendering-content-visibility.md +38 -0
  74. package/.agent/monolith/skills/react-quality-review/rules/rendering-hoist-jsx.md +46 -0
  75. package/.agent/monolith/skills/react-quality-review/rules/rendering-usetransition-loading.md +75 -0
  76. package/.agent/monolith/skills/react-quality-review/rules/rerender-defer-reads.md +39 -0
  77. package/.agent/monolith/skills/react-quality-review/rules/rerender-dependencies.md +45 -0
  78. package/.agent/monolith/skills/react-quality-review/rules/rerender-derived-state-no-effect.md +40 -0
  79. package/.agent/monolith/skills/react-quality-review/rules/rerender-derived-state.md +29 -0
  80. package/.agent/monolith/skills/react-quality-review/rules/rerender-functional-setstate.md +74 -0
  81. package/.agent/monolith/skills/react-quality-review/rules/rerender-lazy-state-init.md +58 -0
  82. package/.agent/monolith/skills/react-quality-review/rules/rerender-memo-with-default-value.md +38 -0
  83. package/.agent/monolith/skills/react-quality-review/rules/rerender-memo.md +44 -0
  84. package/.agent/monolith/skills/react-quality-review/rules/rerender-move-effect-to-event.md +45 -0
  85. package/.agent/monolith/skills/react-quality-review/rules/rerender-no-inline-components.md +82 -0
  86. package/.agent/monolith/skills/react-quality-review/rules/rerender-simple-expression-in-memo.md +35 -0
  87. package/.agent/monolith/skills/react-quality-review/rules/rerender-transitions.md +40 -0
  88. package/.agent/monolith/skills/react-quality-review/rules/rerender-use-ref-transient-values.md +73 -0
  89. package/.agent/monolith/skills/refactor-safely/SKILL.md +29 -0
  90. package/.agent/monolith/skills/vuexy-component-guide/SKILL.md +369 -0
  91. package/.agent/monolith/skills/vuexy-component-guide/examples.md +662 -0
  92. package/.agent/monolith/skills/vuexy-component-guide/reference.md +1036 -0
  93. package/.agent/monolith/workflows/add-new-api-feature-module.md +63 -0
  94. package/.agent/monolith/workflows/backend-quality-review.md +27 -0
  95. package/.agent/monolith/workflows/build-feature-backend.workflow.md +91 -0
  96. package/.agent/monolith/workflows/build-feature-react.workflow.md +82 -0
  97. package/.agent/monolith/workflows/feature-module-runner.md +97 -0
  98. package/.agent/templates/FEATURE_PLAN.md +42 -0
  99. package/.agent/templates/MODULE.md +45 -0
  100. package/.agent/templates/REVIEW_REPORT.md +44 -0
  101. package/.agent/templates/SECURITY_REPORT.md +70 -0
  102. package/.agent/templates/TEST_PLAN.md +49 -0
  103. package/README.md +131 -0
  104. package/package.json +42 -0
  105. package/scripts/setup-rules.js +224 -0
  106. package/scripts/setup.js +518 -0
@@ -0,0 +1,281 @@
1
+ ---
2
+ name: code-reviewer
3
+ description: Full-stack code review for backend changes on the current branch. Reads all project-memory docs, audits changed files against the constitution/quality-playbook/auth-model/architecture/models, and writes a structured REVIEW_REPORT to documentation/reports/ (or the active feature folder). Trigger on any "review my changes", "review this branch", "do a code review", or "review <feature>" request.
4
+ ---
5
+
6
+ # Skill: code-reviewer
7
+
8
+ Use this skill to perform a thorough, standards-aligned code review of all uncommitted or branch-level changes. The output is a structured review report written to the project's `documentation/reports/` directory (or the active feature folder when one is clearly identified).
9
+
10
+ ---
11
+
12
+ ## When to trigger
13
+
14
+ - User says "review my changes", "do a code review", "review this branch", or similar.
15
+ - User asks for a review of a specific feature or module before merging.
16
+ - Used automatically at the end of a feature-module implementation workflow.
17
+
18
+ ---
19
+
20
+ ## Phase 1 — Understand the change surface
21
+
22
+ ### 1.1 Identify changed files
23
+
24
+ Run the following to understand what is in scope:
25
+
26
+ ```bash
27
+ git status
28
+ git diff --name-only HEAD
29
+ git diff --name-only --cached
30
+ ```
31
+
32
+ For a branch comparison against main:
33
+
34
+ ```bash
35
+ git diff --name-only main...HEAD
36
+ ```
37
+
38
+ Collect:
39
+ - All modified, added, and deleted files.
40
+ - The active branch name (to infer feature name and milestone if present).
41
+ - Whether changes are staged, unstaged, or committed ahead of main.
42
+
43
+ ### 1.2 Infer feature and milestone
44
+
45
+ Extract from the branch name or the changed file paths:
46
+ - **Feature name**: the slug after `feature/`, `feat/`, or derived from the dominant changed folder under `src/apis/` (e.g. `influencer-discovery`).
47
+ - **Milestone**: if module files exist under `documentation/features/<feature>/`, identify the highest module number being reviewed (e.g. `M3`). Otherwise use `M0` or omit.
48
+
49
+ ### 1.3 Use graph tools first (per CLAUDE.md)
50
+
51
+ Before reading any file, use the code-review-graph MCP tools for efficient structural analysis:
52
+
53
+ 1. `get_minimal_context(task="<review summary>")` — **always call this first** to orient the graph.
54
+ 2. `detect_changes` — get a risk-scored diff summary of what changed and why it matters.
55
+ 3. `get_review_context` — retrieve token-efficient source snippets for changed symbols.
56
+ 4. `get_impact_radius` — for any modified service/module, understand blast radius.
57
+ 5. `get_affected_flows` — identify which execution paths are affected.
58
+ 6. `query_graph(pattern="tests_for")` — for any high-risk function, verify test coverage.
59
+
60
+ Fall back to direct file reads only when the graph does not cover what you need.
61
+
62
+ **Token efficiency**: use `detail_level="minimal"` on all graph calls; only escalate to `"standard"` when minimal is insufficient. Target ≤5 graph tool calls for the structural analysis phase.
63
+
64
+ ---
65
+
66
+ ## Phase 2 — Load project-memory context
67
+
68
+ Read all of the following files in full before reviewing any code. These define the non-negotiable constraints for this codebase.
69
+
70
+ | File | Purpose |
71
+ |------|---------|
72
+ | `project-memory/constitution.md` | Non-negotiable rules: structure, security, validation, auth, DI, SQL, error handling |
73
+ | `project-memory/quality-playbook.md` | High-signal check patterns with symptoms, root causes, and preferred fixes |
74
+ | `project-memory/auth-model.md` | JWT flow, guard chain, RBAC entities, tenant/resource scoping |
75
+ | `project-memory/architecture.md` | System-level architecture decisions and module topology |
76
+ | `project-memory/models.md` | Domain model inventory: Sequelize entities, associations, field contracts |
77
+ | `project-memory/repo-map.md` | Module layout, naming conventions, reusable component registry |
78
+ | `project-memory/core-memory.md` | Historical implementation decisions and completed module record |
79
+ | `project-memory/README.md` | Index of all project-memory docs |
80
+
81
+ If a file does not exist, skip it and note the omission in the review.
82
+
83
+ ---
84
+
85
+ ## Phase 3 — Review the changed code
86
+
87
+ For each changed file, perform the following checks. Record every finding, tagged by severity.
88
+
89
+ ### 3.1 Structural alignment (Constitution §Project structure, repo-map.md §Module layout)
90
+
91
+ - [ ] New feature modules follow the directory structure and naming convention defined in `project-memory/repo-map.md`.
92
+ - [ ] All required files for this project type are present (see repo-map for the checklist: e.g., DB-backed features might need `.model.ts`, `.service.ts`, `.dto.ts`, etc.).
93
+ - [ ] New models/entities are registered per `project-memory/repo-map.md` (e.g., in a models registry file).
94
+ - [ ] Feature module is wired into the module tree per repo-map (e.g., imported in a root APIs module or feature module).
95
+ - [ ] No new file duplicates functionality already documented in `project-memory/repo-map.md`.
96
+
97
+ ### 3.2 Security and auth (Constitution, quality-playbook)
98
+
99
+ - [ ] Every endpoint has an explicit auth decision: protected (requires auth/permission) or intentionally public.
100
+ - [ ] Protected endpoints use your project's auth guard/middleware (see `project-memory/auth-model.md`).
101
+ - [ ] Permission/authorization checks happen both at endpoint level and service level where applicable.
102
+ - [ ] Service/query layer enforces ownership/tenant scoping using authenticated context, never client-supplied IDs.
103
+ - [ ] Identity and tenant context come from authenticated request context, never from request body/query.
104
+ - [ ] No secrets or config values hardcoded in code; use your project's config service/mechanism.
105
+
106
+ ### 3.3 Input validation (Constitution, quality-playbook)
107
+
108
+ - [ ] All endpoints validate inputs (body, query, path params) using your project's validation mechanism (e.g., DTOs, validation pipes, decorators).
109
+ - [ ] No raw request data passed to services/repositories/queries; always validate at the boundary.
110
+ - [ ] Unknown/extra fields are rejected for auth-sensitive and data-sensitive endpoints (explicit allowlist or default deny).
111
+
112
+ ### 3.4 Dependency injection and module wiring (Constitution, quality-playbook)
113
+
114
+ - [ ] DI tokens/identifiers are defined consistently and reused across the module.
115
+ - [ ] No new circular dependencies; if DI needs bidirectional wiring, it's explicitly documented.
116
+ - [ ] Module/package imports and exports are correctly wired for all dependencies.
117
+ - [ ] Controllers/handlers are thin; business logic lives in services, not at the boundary.
118
+
119
+ ### 3.5 Error handling (Constitution)
120
+
121
+ - [ ] Client errors (validation, auth, resource not found) use appropriate status codes (4xx), not 500.
122
+ - [ ] Errors are not silently swallowed; all error paths are logged or explicitly documented.
123
+ - [ ] Error responses follow your project's consistent envelope shape (see `project-memory/constitution.md`).
124
+
125
+ ### 3.6 SQL and query safety (Constitution §9–11)
126
+
127
+ - [ ] All user-influenced values are parameterized (use your ORM/query builder's parameterization mechanism, never string interpolation).
128
+ - [ ] No string concatenation of request input into SQL templates.
129
+ - [ ] Raw queries (if used) employ parameterization consistently with your project's query library (see `project-memory/repo-map.md` for patterns).
130
+ - [ ] Row-level security applied via server-side tenant/ownership predicates, never from client-supplied IDs.
131
+
132
+ ### 3.7 Logging and PII (Constitution)
133
+
134
+ - [ ] No secrets, tokens, passwords, credentials, or sensitive user data logged.
135
+ - [ ] No full request/response bodies logged for auth-sensitive or PII-containing endpoints.
136
+ - [ ] Logged context is actionable: route identifier, request/trace ID, function/service, error type/message.
137
+
138
+ ### 3.8 Dependencies (Constitution)
139
+
140
+ - [ ] No new external dependency added without explicit justification (why not use existing libs?).
141
+ - [ ] Prefer reusing your project's existing libraries and frameworks over adding new ones.
142
+
143
+ ### 3.9 Caching (Constitution)
144
+
145
+ - [ ] Cache keys derived from canonicalized inputs using your project's cache key strategy.
146
+ - [ ] Cache bypass/refresh happens only where freshness is explicitly required.
147
+ - [ ] No accidental changes to cache key derivation or TTL semantics that would break stale invalidations.
148
+
149
+ ### 3.10 Model and domain alignment (project-memory/models.md)
150
+
151
+ - [ ] New data models follow your project's ORM conventions and naming rules (see repo-map and models doc).
152
+ - [ ] Table/entity metadata is explicit (table names, timestamps, field-to-column mappings).
153
+ - [ ] Associations (foreign keys, relationships) are correctly defined; no orphaned or unmapped foreign keys.
154
+ - [ ] Field naming is consistent with project conventions (e.g., snake_case in DB, camelCase in code).
155
+
156
+ ### 3.11 Architecture alignment (project-memory/architecture.md)
157
+
158
+ - [ ] Changes respect the module topology and layers described in your architecture doc.
159
+ - [ ] No new unexpected coupling between modules without documented rationale (see repo-map).
160
+ - [ ] External-service integration (APIs, queues, caches, etc.) follows your project's established patterns.
161
+
162
+ ---
163
+
164
+ ## Phase 4 — Determine the output location
165
+
166
+ Choose the report location based on context:
167
+
168
+ | Condition | Output path |
169
+ |-----------|-------------|
170
+ | Active feature with a folder under `documentation/features/<feature>/` | `documentation/features/<feature>/REVIEW_REPORT_<feature>_<milestone>.md` |
171
+ | General / no clearly scoped feature folder | `documentation/reports/REVIEW_REPORT_<feature>_<milestone>.md` |
172
+ | No feature identifiable | `documentation/reports/REVIEW_REPORT_<branch-slug>.md` |
173
+
174
+ Name the file using:
175
+ - `<feature>` = feature slug in your project's naming convention (e.g., kebab-case).
176
+ - `<milestone>` = module/phase label if applicable (e.g., `M3`), otherwise omit.
177
+
178
+ ---
179
+
180
+ ## Phase 5 — Write the review report
181
+
182
+ Save the review report to the path determined in Phase 4. Use this template:
183
+
184
+ ```markdown
185
+ # Backend Code Review Report
186
+
187
+ ## Feature
188
+ `<feature-name>` — <short description of the change being reviewed>
189
+
190
+ ## Branch
191
+ `<branch-name>`
192
+
193
+ ## Scope Reviewed
194
+ <Bullet list of changed files/folders reviewed and what each covers>
195
+
196
+ ---
197
+
198
+ ## Findings
199
+
200
+ ### BLOCKER
201
+ <List each blocker finding with:>
202
+ - **File**: `path/to/file.ts` (line N if known)
203
+ - **Issue**: What is wrong.
204
+ - **Rule**: Which constitution / quality-playbook rule is violated.
205
+ - **Fix**: Minimum change needed to resolve.
206
+
207
+ *(none)* if no blockers.
208
+
209
+ ### HIGH
210
+ <Same format. HIGH = must fix before merge, not necessarily a blocker today.>
211
+
212
+ *(none)* if none.
213
+
214
+ ### MEDIUM
215
+ <Same format. MEDIUM = should fix in this PR; acceptable to defer with documented rationale.>
216
+
217
+ *(none)* if none.
218
+
219
+ ### LOW / SUGGESTION
220
+ <Same format. LOW = nice-to-have improvements or style alignment.>
221
+
222
+ *(none)* if none.
223
+
224
+ ---
225
+
226
+ ## Architecture Alignment
227
+ <1–3 bullet points on how well the changes align with project-memory/architecture.md and repo-map.md. Note any deviations.>
228
+
229
+ ## Auth and Security Summary
230
+ <1–2 sentences confirming auth coverage or identifying remaining gaps.>
231
+
232
+ ## Quality Gate Status
233
+
234
+ | Gate | Status | Notes |
235
+ |------|--------|-------|
236
+ | TypeScript compile (`npx tsc --noEmit`) | pass / fail / not run | |
237
+ | Lint (`npm run lint`) | pass / fail / not run | |
238
+ | Unit tests | pass / fail / not run | |
239
+ | E2E tests | pass / fail / not run | |
240
+
241
+ Run the gates that are feasible given the current environment. Report blocked gates and whether they are pre-existing failures unrelated to these changes.
242
+
243
+ ## Recommendation
244
+
245
+ **APPROVE** / **APPROVE WITH CONDITIONS** / **REQUEST CHANGES**
246
+
247
+ <1–2 sentences explaining the recommendation and any required follow-up.>
248
+ ```
249
+
250
+ ---
251
+
252
+ ## Phase 6 — Report to user
253
+
254
+ After writing the file, output to the user:
255
+
256
+ 1. The full path of the written report.
257
+ 2. A concise inline summary:
258
+ - Number of blockers, high, medium, low findings.
259
+ - Overall recommendation (APPROVE / APPROVE WITH CONDITIONS / REQUEST CHANGES).
260
+ - Any critical finding that must be addressed before merge.
261
+
262
+ ---
263
+
264
+ ## Quality gates for the review itself
265
+
266
+ Before finalizing the report, verify:
267
+
268
+ - [ ] Every finding links to a specific constitution/quality-playbook rule or project-memory doc section.
269
+ - [ ] Every finding names the exact file (and line where possible).
270
+ - [ ] The report does not describe what code does — it states what is wrong and what the fix is.
271
+ - [ ] Auth and validation coverage has been explicitly confirmed or flagged, not assumed.
272
+ - [ ] No findings are added for purely stylistic preferences without a rule citation.
273
+ - [ ] The gate status table reflects actual command output, not assumptions.
274
+
275
+ ---
276
+
277
+ ## Notes
278
+
279
+ - This skill reads project-memory docs but does NOT modify them. After implementation modules, `core-memory.md` is updated by the feature-module-runner, not this skill.
280
+ - If this review is triggered mid-module (not post-implementation), findings should feed back into the implementation, not the merge decision.
281
+ - For auth-heavy changes, complement this review with `.agent/skills/auth-and-permissions/SKILL.md`.