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.
- package/.agent/INSTRUCTIONS.md +82 -0
- package/.agent/README.md +483 -0
- package/.agent/backend/skills/architect/SKILL.md +436 -0
- package/.agent/backend/skills/auth-and-permissions/SKILL.md +168 -0
- package/.agent/backend/skills/brainstorm/SKILL.md +127 -0
- package/.agent/backend/skills/code-reviewer/SKILL.md +324 -0
- package/.agent/backend/skills/create-blueprint/SKILL.md +650 -0
- package/.agent/backend/skills/debug-issue/SKILL.md +53 -0
- package/.agent/backend/skills/explore-codebase/SKILL.md +45 -0
- package/.agent/backend/skills/quick-execute/SKILL.md +99 -0
- package/.agent/backend/skills/refactor-safely/SKILL.md +46 -0
- package/.agent/backend/skills/security-assessment/SKILL.md +174 -0
- package/.agent/backend/workflows/module-runner.claude.md +226 -0
- package/.agent/backend/workflows/module-runner.codex.md +155 -0
- package/.agent/backend/workflows/module-runner.cursor.md +212 -0
- package/.agent/frontend/skills/architect/SKILL.md +644 -0
- package/.agent/frontend/skills/auth-and-permissions/SKILL.md +43 -0
- package/.agent/frontend/skills/create-blueprint/SKILL.md +635 -0
- package/.agent/frontend/skills/debug-issue/SKILL.md +28 -0
- package/.agent/frontend/skills/explore-codebase/SKILL.md +29 -0
- package/.agent/frontend/skills/feature-workflow/SKILL.md +61 -0
- package/.agent/frontend/skills/react-quality-review/SKILL.md +126 -0
- package/.agent/frontend/skills/react-quality-review/examples.md +24 -0
- package/.agent/frontend/skills/react-quality-review/rules/_sections.md +26 -0
- package/.agent/frontend/skills/react-quality-review/rules/_template.md +28 -0
- package/.agent/frontend/skills/react-quality-review/rules/advanced-event-handler-refs.md +55 -0
- package/.agent/frontend/skills/react-quality-review/rules/advanced-init-once.md +42 -0
- package/.agent/frontend/skills/react-quality-review/rules/react-rules-calling.md +66 -0
- package/.agent/frontend/skills/react-quality-review/rules/react-rules-hooks.md +91 -0
- package/.agent/frontend/skills/react-quality-review/rules/react-rules-purity.md +121 -0
- package/.agent/frontend/skills/react-quality-review/rules/rendering-activity.md +26 -0
- package/.agent/frontend/skills/react-quality-review/rules/rendering-conditional-render.md +40 -0
- package/.agent/frontend/skills/react-quality-review/rules/rendering-content-visibility.md +38 -0
- package/.agent/frontend/skills/react-quality-review/rules/rendering-hoist-jsx.md +46 -0
- package/.agent/frontend/skills/react-quality-review/rules/rendering-usetransition-loading.md +75 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-defer-reads.md +39 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-dependencies.md +45 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-derived-state-no-effect.md +40 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-derived-state.md +29 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-functional-setstate.md +74 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-lazy-state-init.md +58 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-memo-with-default-value.md +38 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-memo.md +44 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-move-effect-to-event.md +45 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-no-inline-components.md +82 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-simple-expression-in-memo.md +35 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-transitions.md +40 -0
- package/.agent/frontend/skills/react-quality-review/rules/rerender-use-ref-transient-values.md +73 -0
- package/.agent/frontend/skills/refactor-safely/SKILL.md +29 -0
- package/.agent/frontend/skills/vuexy-component-guide/SKILL.md +369 -0
- package/.agent/frontend/skills/vuexy-component-guide/examples.md +662 -0
- package/.agent/frontend/skills/vuexy-component-guide/reference.md +1036 -0
- package/.agent/frontend/workflows/build-feature-react.workflow.md +82 -0
- package/.agent/frontend/workflows/feature-module-runner.md +101 -0
- package/.agent/monolith/skills/architect/SKILL.md +648 -0
- package/.agent/monolith/skills/auth-and-permissions/SKILL.md +43 -0
- package/.agent/monolith/skills/code-reviewer/SKILL.md +281 -0
- package/.agent/monolith/skills/create-blueprint/SKILL.md +635 -0
- package/.agent/monolith/skills/debug-issue/SKILL.md +28 -0
- package/.agent/monolith/skills/explore-codebase/SKILL.md +29 -0
- package/.agent/monolith/skills/feature-workflow/SKILL.md +61 -0
- package/.agent/monolith/skills/react-quality-review/SKILL.md +126 -0
- package/.agent/monolith/skills/react-quality-review/examples.md +24 -0
- package/.agent/monolith/skills/react-quality-review/rules/_sections.md +26 -0
- package/.agent/monolith/skills/react-quality-review/rules/_template.md +28 -0
- package/.agent/monolith/skills/react-quality-review/rules/advanced-event-handler-refs.md +55 -0
- package/.agent/monolith/skills/react-quality-review/rules/advanced-init-once.md +42 -0
- package/.agent/monolith/skills/react-quality-review/rules/react-rules-calling.md +66 -0
- package/.agent/monolith/skills/react-quality-review/rules/react-rules-hooks.md +91 -0
- package/.agent/monolith/skills/react-quality-review/rules/react-rules-purity.md +121 -0
- package/.agent/monolith/skills/react-quality-review/rules/rendering-activity.md +26 -0
- package/.agent/monolith/skills/react-quality-review/rules/rendering-conditional-render.md +40 -0
- package/.agent/monolith/skills/react-quality-review/rules/rendering-content-visibility.md +38 -0
- package/.agent/monolith/skills/react-quality-review/rules/rendering-hoist-jsx.md +46 -0
- package/.agent/monolith/skills/react-quality-review/rules/rendering-usetransition-loading.md +75 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-defer-reads.md +39 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-dependencies.md +45 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-derived-state-no-effect.md +40 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-derived-state.md +29 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-functional-setstate.md +74 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-lazy-state-init.md +58 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-memo-with-default-value.md +38 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-memo.md +44 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-move-effect-to-event.md +45 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-no-inline-components.md +82 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-simple-expression-in-memo.md +35 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-transitions.md +40 -0
- package/.agent/monolith/skills/react-quality-review/rules/rerender-use-ref-transient-values.md +73 -0
- package/.agent/monolith/skills/refactor-safely/SKILL.md +29 -0
- package/.agent/monolith/skills/vuexy-component-guide/SKILL.md +369 -0
- package/.agent/monolith/skills/vuexy-component-guide/examples.md +662 -0
- package/.agent/monolith/skills/vuexy-component-guide/reference.md +1036 -0
- package/.agent/monolith/workflows/add-new-api-feature-module.md +63 -0
- package/.agent/monolith/workflows/backend-quality-review.md +27 -0
- package/.agent/monolith/workflows/build-feature-backend.workflow.md +91 -0
- package/.agent/monolith/workflows/build-feature-react.workflow.md +82 -0
- package/.agent/monolith/workflows/feature-module-runner.md +97 -0
- package/.agent/templates/FEATURE_PLAN.md +42 -0
- package/.agent/templates/MODULE.md +45 -0
- package/.agent/templates/REVIEW_REPORT.md +44 -0
- package/.agent/templates/SECURITY_REPORT.md +70 -0
- package/.agent/templates/TEST_PLAN.md +49 -0
- package/README.md +131 -0
- package/package.json +42 -0
- package/scripts/setup-rules.js +224 -0
- package/scripts/setup.js +518 -0
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-blueprint
|
|
3
|
+
description: Create or update project-memory artifacts (constitution, auth-model, repo-map, core-memory, models, architecture, quality-playbook) to keep them in sync with current codebase. Uses code-review-graph for efficient codebase analysis. Trigger with "create-blueprint all" to set up everything, or "create-blueprint <artifact_type>" for a specific artifact.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill: create-blueprint
|
|
8
|
+
|
|
9
|
+
Use this skill to generate or refresh project-memory documentation artifacts based on the current state of the codebase. Each artifact becomes a reference document that constrains and guides feature implementation.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## When to trigger
|
|
14
|
+
|
|
15
|
+
- User asks `create-blueprint all` — runs all artifact types in sequence (full project-memory setup).
|
|
16
|
+
- User asks `create-blueprint <artifact_type>` or `update-blueprint <artifact_type>` — creates or refreshes a single artifact.
|
|
17
|
+
- Artifact types: `constitution`, `auth-model`, `repo-map`, `core-memory`, `models`, `architecture`, `quality-playbook`.
|
|
18
|
+
- When codebase has evolved significantly and project-memory docs are stale or missing.
|
|
19
|
+
- After completing a major feature or architectural refactor to capture new patterns.
|
|
20
|
+
|
|
21
|
+
### `create-blueprint all` — full setup sequence
|
|
22
|
+
|
|
23
|
+
When the user passes `all`, run each artifact **in this order** (dependencies first):
|
|
24
|
+
|
|
25
|
+
1. `architecture` — establish system topology before anything else
|
|
26
|
+
2. `models` — domain entities inform the repo map and constitution
|
|
27
|
+
3. `repo-map` — module layout needed by all other docs
|
|
28
|
+
4. `constitution` — rules derived from observed patterns in the codebase
|
|
29
|
+
5. `auth-model` — auth flow and guards (depends on repo-map for file locations)
|
|
30
|
+
6. `quality-playbook` — patterns and anti-patterns (derived from real code)
|
|
31
|
+
7. `core-memory` — last, as it captures decisions made above
|
|
32
|
+
|
|
33
|
+
After each artifact is generated and approved, continue to the next without stopping for further user input unless a blocking question arises (e.g., ambiguous auth pattern). At the end, report a summary table of all artifacts created.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Supported artifacts
|
|
38
|
+
|
|
39
|
+
| Artifact | Purpose | When to create/update |
|
|
40
|
+
|----------|---------|----------------------|
|
|
41
|
+
| `constitution` | Non-negotiable rules (security, validation, DI, auth, SQL, error handling) | After major security decisions or framework upgrades |
|
|
42
|
+
| `auth-model` | Complete JWT flow, guard chain, RBAC entities, identity propagation, tenant/resource scoping | After auth system changes or new permission patterns |
|
|
43
|
+
| `repo-map` | Module layout, naming conventions, reusable components, key entry points, file registry | After adding new module categories or changing structure |
|
|
44
|
+
| `core-memory` | Historical implementation decisions, completed modules, design lessons, known patterns | End of each completed feature or milestone |
|
|
45
|
+
| `models` | Domain model inventory (ORM entities, associations, field contracts, constraints) | After new model additions or significant schema changes |
|
|
46
|
+
| `architecture` | System-level architecture decisions, module topology, data flow, integration points | After architectural refactors or major coupling changes |
|
|
47
|
+
| `quality-playbook` | High-signal check patterns with symptoms, root causes, preferred fixes | After discovering recurring bugs or anti-patterns |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Phase 1 — Understand intent
|
|
52
|
+
|
|
53
|
+
### 1.1 Parse user request
|
|
54
|
+
|
|
55
|
+
Extract:
|
|
56
|
+
- **Artifact type**: the specific project-memory file to create/update.
|
|
57
|
+
- **Intent**: is this a creation (new), update (refresh stale content), or refactor (reorganize)?
|
|
58
|
+
- **Scope**: does the user want all artifacts or a specific one?
|
|
59
|
+
|
|
60
|
+
### 1.2 Check for existing artifact
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
ls -la project-memory/<artifact-type>.md
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
If exists: → read the full file and understand its current state.
|
|
67
|
+
If absent: → proceed to Phase 2 with a blank slate.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Phase 2 — Analyze codebase with graph tools
|
|
72
|
+
|
|
73
|
+
Use code-review-graph to extract structured information about the codebase **first** — avoid large file reads until you have a focused direction.
|
|
74
|
+
|
|
75
|
+
### 2.1 Always call this first
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
get_minimal_context(task="Analyzing codebase for <artifact-type> blueprint")
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This gives you:
|
|
82
|
+
- Graph stats (total nodes, languages, communities, flows).
|
|
83
|
+
- Risk score.
|
|
84
|
+
- Key communities and flows.
|
|
85
|
+
|
|
86
|
+
### 2.2 Artifact-specific graph queries
|
|
87
|
+
|
|
88
|
+
Call the appropriate sequence based on what you're building:
|
|
89
|
+
|
|
90
|
+
#### For `repo-map` (module layout, conventions):
|
|
91
|
+
1. `list_communities(detail_level="minimal", sort_by="size")`
|
|
92
|
+
2. `query_graph(pattern="file_summary", target="src/")` (if src/ exists; adjust to your layout)
|
|
93
|
+
3. `semantic_search_nodes(query="module entry point", kind="Function", limit=20)`
|
|
94
|
+
|
|
95
|
+
#### For `architecture` (topology, coupling):
|
|
96
|
+
1. `get_architecture_overview()`
|
|
97
|
+
2. `get_bridge_nodes_tool(top_n=15)` — identify chokepoints
|
|
98
|
+
3. `get_surprising_connections_tool(top_n=15)` — find unexpected coupling
|
|
99
|
+
|
|
100
|
+
#### For `auth-model` (JWT, guards, RBAC):
|
|
101
|
+
1. `semantic_search_nodes(query="auth guard middleware", kind="Class", limit=10)`
|
|
102
|
+
2. `semantic_search_nodes(query="jwt token verify", limit=10)`
|
|
103
|
+
3. `semantic_search_nodes(query="permission check", limit=10)`
|
|
104
|
+
4. `query_graph(pattern="callees_of", target="<auth entry point>")`
|
|
105
|
+
|
|
106
|
+
#### For `models` (entities, associations, constraints):
|
|
107
|
+
1. `semantic_search_nodes(query="database model entity", kind="Class", limit=30)`
|
|
108
|
+
2. `semantic_search_nodes(query="association foreign key", limit=10)`
|
|
109
|
+
3. `query_graph(pattern="file_summary", target="src/path/to/models/")`
|
|
110
|
+
|
|
111
|
+
#### For `quality-playbook` (patterns, anti-patterns):
|
|
112
|
+
1. `list_graph_stats` — check for large functions
|
|
113
|
+
2. `find_large_functions(min_lines=100, limit=20)` — identify complexity hotspots
|
|
114
|
+
3. `get_knowledge_gaps_tool()` — find untested/undocumented areas
|
|
115
|
+
4. `detect_changes(base="HEAD~20")` — analyze recent patterns in recent commits
|
|
116
|
+
|
|
117
|
+
#### For `constitution` (security, validation, DI, error handling):
|
|
118
|
+
1. `semantic_search_nodes(query="validation input dto", limit=10)`
|
|
119
|
+
2. `semantic_search_nodes(query="auth guard decorator", limit=10)`
|
|
120
|
+
3. `semantic_search_nodes(query="error exception handler", limit=10)`
|
|
121
|
+
4. `semantic_search_nodes(query="dependency injection provider", limit=10)`
|
|
122
|
+
|
|
123
|
+
#### For `core-memory` (decisions, completed modules):
|
|
124
|
+
- If updating: read the existing file first (it's a manual record, not auto-derived).
|
|
125
|
+
- Use graph to identify:
|
|
126
|
+
1. `list_communities(sort_by="name")` — enumerate all modules/communities.
|
|
127
|
+
2. `query_graph(pattern="file_summary", target="src/")` — understand what modules exist.
|
|
128
|
+
- Cross-reference with existing core-memory to identify what's new or changed.
|
|
129
|
+
|
|
130
|
+
### 2.3 Token efficiency
|
|
131
|
+
|
|
132
|
+
- Use `detail_level="minimal"` on all queries.
|
|
133
|
+
- Target ≤8 graph calls total for Phase 2.
|
|
134
|
+
- Only escalate to `"standard"` if a query returns no results.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Phase 3 — Extract patterns from codebase
|
|
139
|
+
|
|
140
|
+
Based on the graph results, perform targeted reads **only** for files the graph identified as relevant. Never read entire directories or all files of a type.
|
|
141
|
+
|
|
142
|
+
### 3.1 For each artifact type, identify key sections
|
|
143
|
+
|
|
144
|
+
| Artifact | What to extract | How | Sources |
|
|
145
|
+
|----------|-----------------|-----|---------|
|
|
146
|
+
| `repo-map` | Module directories, naming conventions, required files per module type, reusable components, entry points | Read 1–3 representative module files per community; extract patterns | Graph: list_communities results; File reads: module index files, example modules |
|
|
147
|
+
| `architecture` | Layer structure, communication flows, module boundaries, coupling points | Read architecture-touching files (root module wiring, main controller/handler patterns) | Graph: get_architecture_overview, bridge/hub nodes; Spot-check: root module, integration points |
|
|
148
|
+
| `auth-model` | Guard types, token structure, permission check flow, tenant/resource scoping patterns | Read auth entry points and example auth-gated endpoints | Graph: semantic_search results for "auth guard", "jwt", "permission"; Spot-check: auth.module, sample protected endpoints |
|
|
149
|
+
| `models` | ORM conventions, association patterns, field naming, timestamps/soft deletes | Read 3–5 representative model files | Graph: semantic_search for "model entity"; Read: models from different domains |
|
|
150
|
+
| `constitution` | Validation rules, error envelope, DI patterns, SQL safety, logging, secret handling | Read representative implementations of each concern | Graph: semantic_search for "validation", "error", "provider", "query"; Spot-check: sample service, controller, query file |
|
|
151
|
+
| `quality-playbook` | Recurring bugs, anti-patterns, preferred fixes | Analyze graph results for hotspots; read examples of fixes in git history or test files | Graph: find_large_functions, get_knowledge_gaps; Bash: `git log --grep="fix:" --oneline \| head -20` |
|
|
152
|
+
| `core-memory` | Completed modules, design decisions, patterns to reuse/avoid | Existing file + graph enumeration | Existing core-memory.md; Graph: list_communities |
|
|
153
|
+
|
|
154
|
+
### 3.2 Read targeted files
|
|
155
|
+
|
|
156
|
+
For each file the graph flagged:
|
|
157
|
+
- Read it in full **once** (do not re-read).
|
|
158
|
+
- Extract the pattern or decision it exemplifies.
|
|
159
|
+
- Note: if file_path is long, use `offset` and `limit` to read only relevant sections.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Phase 4 — Generate the artifact
|
|
164
|
+
|
|
165
|
+
Create or update the project-memory file following the standard structure for that artifact type.
|
|
166
|
+
|
|
167
|
+
### Structure templates
|
|
168
|
+
|
|
169
|
+
#### constitution.md
|
|
170
|
+
|
|
171
|
+
```markdown
|
|
172
|
+
# Constitution
|
|
173
|
+
|
|
174
|
+
Non-negotiable rules for this codebase.
|
|
175
|
+
|
|
176
|
+
## 1. Project structure
|
|
177
|
+
- [Rule about module layout, naming, file organization]
|
|
178
|
+
- [Rule about where to put features]
|
|
179
|
+
- [Rule about shared vs feature-specific code]
|
|
180
|
+
|
|
181
|
+
## 2. Security
|
|
182
|
+
- [Rule about auth guards, token handling]
|
|
183
|
+
- [Rule about secrets, config, environment variables]
|
|
184
|
+
- [Rule about input validation, injection safety]
|
|
185
|
+
|
|
186
|
+
## 3. Validation
|
|
187
|
+
- [Rule about DTO usage, validation pipes]
|
|
188
|
+
- [Rule about boundary validation vs internal trust]
|
|
189
|
+
- [Rule about error messages, logging PII]
|
|
190
|
+
|
|
191
|
+
## 4. Auth invariants
|
|
192
|
+
- [Rule about request context ownership]
|
|
193
|
+
- [Rule about tenant/resource scoping]
|
|
194
|
+
- [Rule about permission checks (controller vs service level)]
|
|
195
|
+
|
|
196
|
+
## 5. Dependency injection
|
|
197
|
+
- [Rule about module structure, imports/exports]
|
|
198
|
+
- [Rule about token naming, reuse]
|
|
199
|
+
- [Rule about avoiding circular dependencies]
|
|
200
|
+
|
|
201
|
+
## 6. Database & SQL
|
|
202
|
+
- [Rule about parameterization, no string interpolation]
|
|
203
|
+
- [Rule about row-level security, ownership predicates]
|
|
204
|
+
- [Rule about migrations, schema versioning]
|
|
205
|
+
|
|
206
|
+
## 7. Error handling
|
|
207
|
+
- [Rule about status codes, error envelope]
|
|
208
|
+
- [Rule about logging vs swallowing errors]
|
|
209
|
+
|
|
210
|
+
## 8. Caching
|
|
211
|
+
- [Rule about cache key derivation]
|
|
212
|
+
- [Rule about cache bypass/refresh triggers]
|
|
213
|
+
|
|
214
|
+
## 9. Logging
|
|
215
|
+
- [Rule about PII, secrets, sensitive data]
|
|
216
|
+
- [Rule about structured logging, context]
|
|
217
|
+
|
|
218
|
+
## 10. Dependencies
|
|
219
|
+
- [Rule about adding external libraries]
|
|
220
|
+
- [Rule about framework usage, anti-patterns]
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
#### auth-model.md
|
|
224
|
+
|
|
225
|
+
```markdown
|
|
226
|
+
# Auth Model
|
|
227
|
+
|
|
228
|
+
Complete JWT flow, guard chain, RBAC entities, identity propagation.
|
|
229
|
+
|
|
230
|
+
## Token issuance
|
|
231
|
+
- [How JWT is created: algorithm, claims, expiry]
|
|
232
|
+
- [Where token issuance happens: auth controller/service endpoint]
|
|
233
|
+
- [Token refresh strategy if applicable]
|
|
234
|
+
|
|
235
|
+
## Guard chain
|
|
236
|
+
- [List of guards in order: auth guard, permission guard, custom guards]
|
|
237
|
+
- [How each guard is applied: decorators, middleware, imports]
|
|
238
|
+
- [Example endpoint with guard chain]
|
|
239
|
+
|
|
240
|
+
## Request context propagation
|
|
241
|
+
- [How authenticated user context flows into services]
|
|
242
|
+
- [How to access current user in controller/service: decorator, injection]
|
|
243
|
+
- [How tenant/ownership context is passed]
|
|
244
|
+
|
|
245
|
+
## RBAC entities
|
|
246
|
+
- [User role structure: built-in roles, custom roles]
|
|
247
|
+
- [Permission structure: what permissions exist, how they're grouped]
|
|
248
|
+
- [Role-permission associations: how roles get permissions]
|
|
249
|
+
|
|
250
|
+
## Tenant/resource scoping
|
|
251
|
+
- [How tenant is determined: from JWT claim, request context, or other]
|
|
252
|
+
- [How resources are filtered by tenant: query predicates, service-level checks]
|
|
253
|
+
- [How ownership is enforced: user ID checks, team ID checks]
|
|
254
|
+
|
|
255
|
+
## Identity propagation patterns
|
|
256
|
+
- [Example: controller accepting CurrentUser decorator → passing to service]
|
|
257
|
+
- [Example: service using authenticated context for filtering]
|
|
258
|
+
- [Example: cross-service calls preserving identity]
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
#### repo-map.md
|
|
262
|
+
|
|
263
|
+
```markdown
|
|
264
|
+
# Repo Map
|
|
265
|
+
|
|
266
|
+
Module layout, naming conventions, reusable components, file organization.
|
|
267
|
+
|
|
268
|
+
## Naming conventions
|
|
269
|
+
- Modules: [kebab-case, snake_case, camelCase?]
|
|
270
|
+
- Files: [extension patterns, file naming rules]
|
|
271
|
+
- Classes/functions: [camelCase, PascalCase rules]
|
|
272
|
+
- DTOs/entities: [naming patterns for requests, responses, database models]
|
|
273
|
+
|
|
274
|
+
## Directory structure
|
|
275
|
+
[Show the canonical structure: which folders hold features, which hold core, where config/shared lives]
|
|
276
|
+
|
|
277
|
+
## Module types
|
|
278
|
+
[For each type of module (API feature, core service, shared utility, etc.), list required files]
|
|
279
|
+
|
|
280
|
+
Example:
|
|
281
|
+
```
|
|
282
|
+
src/apis/my-feature/
|
|
283
|
+
├── my-feature.controller.ts
|
|
284
|
+
├── my-feature.service.ts
|
|
285
|
+
├── my-feature.dto.ts
|
|
286
|
+
├── my-feature.model.ts
|
|
287
|
+
├── my-feature.module.ts
|
|
288
|
+
├── my-feature.repository.ts
|
|
289
|
+
└── my-feature.spec.ts
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Reusable components
|
|
293
|
+
- [Auth guards, decorators, and where to import them]
|
|
294
|
+
- [Validation pipes, decorators]
|
|
295
|
+
- [Common services (logger, config, cache, storage)]
|
|
296
|
+
- [How to extend/use them in new features]
|
|
297
|
+
|
|
298
|
+
## Key entry points
|
|
299
|
+
- [Root module: where features are wired in]
|
|
300
|
+
- [Server entry: main.ts, app.module.ts, or equivalent]
|
|
301
|
+
- [Database: migrations, models registry]
|
|
302
|
+
- [Config: env var patterns, bootstrap]
|
|
303
|
+
|
|
304
|
+
## Known cross-module imports
|
|
305
|
+
- [What modules are safe to import from: e.g., src/common/, src/core/]
|
|
306
|
+
- [What modules should NOT be imported: avoid coupling]
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
#### core-memory.md
|
|
310
|
+
|
|
311
|
+
```markdown
|
|
312
|
+
# Core Memory
|
|
313
|
+
|
|
314
|
+
Historical implementation decisions, completed modules, design lessons.
|
|
315
|
+
|
|
316
|
+
## Completed modules / features
|
|
317
|
+
- [Feature name and milestone]
|
|
318
|
+
- [Brief description of what was built]
|
|
319
|
+
- [Key design decisions made (if interesting)]
|
|
320
|
+
- [Known limitations or follow-up work]
|
|
321
|
+
|
|
322
|
+
Example:
|
|
323
|
+
- **Auth system (M1-M3)**: Implemented JWT flow with Guardian guards. Uses @CurrentUser() for context propagation. Tenant scoping via JWT `tenant_id` claim. Follow-up: add refresh token rotation (deferred to M5).
|
|
324
|
+
|
|
325
|
+
## Design decisions & rationale
|
|
326
|
+
- [Decision]: [Why it was made] [Tradeoff or lessons learned]
|
|
327
|
+
|
|
328
|
+
Example:
|
|
329
|
+
- **Services handle all business logic, not controllers**: Keeps controllers thin, allows service reuse, testable in isolation. Downside: services can become large (mitigated by splitting into focused services per domain).
|
|
330
|
+
|
|
331
|
+
## Patterns to follow
|
|
332
|
+
- [Pattern name]: [When to use] [Example file]
|
|
333
|
+
|
|
334
|
+
Example:
|
|
335
|
+
- **Repository pattern for data access**: All database queries go through a repository. Controllers → Services → Repositories. Keeps SQL/ORM details out of business logic.
|
|
336
|
+
|
|
337
|
+
## Patterns to avoid
|
|
338
|
+
- [Anti-pattern]: [Why it's bad] [If encountered, how to fix]
|
|
339
|
+
|
|
340
|
+
Example:
|
|
341
|
+
- **Direct request data in queries**: Never pass req.body.userId into a SQL filter. Extract authenticated user context from JWT/request context instead.
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
#### models.md
|
|
345
|
+
|
|
346
|
+
```markdown
|
|
347
|
+
# Domain Models
|
|
348
|
+
|
|
349
|
+
Inventory of ORM entities, associations, field contracts, constraints.
|
|
350
|
+
|
|
351
|
+
## Model: [Entity name]
|
|
352
|
+
- **Table**: [table_name]
|
|
353
|
+
- **ORM**: [Sequelize / TypeORM / other]
|
|
354
|
+
- **Fields**:
|
|
355
|
+
- [field_name]: [type] [constraints: nullable, unique, default, indexed]
|
|
356
|
+
- [...]
|
|
357
|
+
- **Associations**:
|
|
358
|
+
- hasMany: [Target model] (via foreign key [fk_name])
|
|
359
|
+
- belongsTo: [Target model] (via foreign key [fk_name])
|
|
360
|
+
- [...]
|
|
361
|
+
- **Timestamps**: [createdAt, updatedAt strategy]
|
|
362
|
+
- **Soft delete**: [Yes/No, how]
|
|
363
|
+
- **Indexing**: [Indexes on [fields]]
|
|
364
|
+
- **Constraints**: [Unique, check, or business rules]
|
|
365
|
+
|
|
366
|
+
[Example for User model]
|
|
367
|
+
## Model: User
|
|
368
|
+
- **Table**: users
|
|
369
|
+
- **ORM**: Sequelize
|
|
370
|
+
- **Fields**:
|
|
371
|
+
- id (UUID, primary key)
|
|
372
|
+
- email (string, unique, not null)
|
|
373
|
+
- password_hash (string, not null)
|
|
374
|
+
- role_id (UUID, foreign key to roles, not null)
|
|
375
|
+
- tenant_id (UUID, foreign key to tenants, not null)
|
|
376
|
+
- created_at (timestamp, auto)
|
|
377
|
+
- updated_at (timestamp, auto)
|
|
378
|
+
- deleted_at (timestamp, soft delete)
|
|
379
|
+
- **Associations**:
|
|
380
|
+
- belongsTo: Role (via role_id)
|
|
381
|
+
- belongsTo: Tenant (via tenant_id)
|
|
382
|
+
- hasMany: Sessions (via user_id)
|
|
383
|
+
- **Timestamps**: Yes (created_at, updated_at)
|
|
384
|
+
- **Soft delete**: Yes (deleted_at)
|
|
385
|
+
- **Indexing**: tenant_id, role_id, email
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
#### architecture.md
|
|
389
|
+
|
|
390
|
+
```markdown
|
|
391
|
+
# Architecture
|
|
392
|
+
|
|
393
|
+
System-level architecture decisions, module topology, data flow, integration points.
|
|
394
|
+
|
|
395
|
+
## System layers
|
|
396
|
+
[Description of application layers: e.g., Controller → Service → Repository → Database]
|
|
397
|
+
|
|
398
|
+
## Module topology
|
|
399
|
+
- [Core modules]: [services that all other modules depend on]
|
|
400
|
+
- [API modules]: [feature-specific modules in src/apis/]
|
|
401
|
+
- [External integrations]: [modules for API clients, queues, storage, etc.]
|
|
402
|
+
|
|
403
|
+
## Data flow
|
|
404
|
+
[Diagram or description of how data moves through the system]
|
|
405
|
+
|
|
406
|
+
Example:
|
|
407
|
+
```
|
|
408
|
+
Request → Controller → Guard (auth) → Service → Repository → Database
|
|
409
|
+
↓
|
|
410
|
+
Interceptor (logging, error handling)
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
## Key integration points
|
|
414
|
+
- [External API]: [How it's called, timeout/retry strategy, error handling]
|
|
415
|
+
- [Message queue]: [How messages are published/consumed]
|
|
416
|
+
- [Cache layer]: [What's cached, TTL strategy]
|
|
417
|
+
- [Storage]: [File storage, blob service, bucket strategy]
|
|
418
|
+
|
|
419
|
+
## Cross-module boundaries
|
|
420
|
+
- [Module A imports from Module B]: [OK/Not OK; if OK, what interface]
|
|
421
|
+
- [Known coupling]: [Description of unavoidable cross-module dependency]
|
|
422
|
+
|
|
423
|
+
## Architectural decisions & tradeoffs
|
|
424
|
+
- [Decision]: [Why] [Tradeoff]
|
|
425
|
+
|
|
426
|
+
Example:
|
|
427
|
+
- **Monolithic API backend**: Simple to deploy and reason about. Tradeoff: harder to scale individual features independently (mitigated with feature flags and service extraction when needed).
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
#### quality-playbook.md
|
|
431
|
+
|
|
432
|
+
```markdown
|
|
433
|
+
# Quality Playbook
|
|
434
|
+
|
|
435
|
+
High-signal check patterns with symptoms, root causes, and preferred fixes.
|
|
436
|
+
|
|
437
|
+
## Pattern: [Name]
|
|
438
|
+
|
|
439
|
+
**When you see**: [Symptoms; what code looks like when this goes wrong]
|
|
440
|
+
|
|
441
|
+
**Root cause**: [Why this happens]
|
|
442
|
+
|
|
443
|
+
**Preferred fix**: [How to fix it; code pattern to follow]
|
|
444
|
+
|
|
445
|
+
**Example**:
|
|
446
|
+
[Code snippet showing the antipattern and the fix]
|
|
447
|
+
|
|
448
|
+
---
|
|
449
|
+
|
|
450
|
+
## Pattern: Unvalidated endpoint input
|
|
451
|
+
|
|
452
|
+
**When you see**: Controller method accepts `req.body` and passes it directly to a service, or passes `req.body.userId` directly into a query filter.
|
|
453
|
+
|
|
454
|
+
**Root cause**: Assuming the framework or downstream layers validate input. Trusting client data.
|
|
455
|
+
|
|
456
|
+
**Preferred fix**: Always validate at the controller boundary. Use DTOs + ValidationPipe. Extract authenticated context (user ID, tenant) from JWT/request context, never from request body.
|
|
457
|
+
|
|
458
|
+
**Example**:
|
|
459
|
+
```typescript
|
|
460
|
+
// ❌ Bad
|
|
461
|
+
@Post('transfer')
|
|
462
|
+
transfer(@Body() body: any) {
|
|
463
|
+
return this.service.transfer(body.fromId, body.toId, body.amount);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
// ✅ Good
|
|
467
|
+
@Post('transfer')
|
|
468
|
+
@UseGuards(CanAuthGuard)
|
|
469
|
+
transfer(
|
|
470
|
+
@CurrentUser() user: UserContext,
|
|
471
|
+
@Body() dto: TransferDto,
|
|
472
|
+
) {
|
|
473
|
+
return this.service.transfer(user.id, dto.toId, dto.amount);
|
|
474
|
+
}
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
## Pattern: [Next pattern]
|
|
480
|
+
...
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
## Phase 5 — Compare with existing artifact (if update)
|
|
486
|
+
|
|
487
|
+
### 5.1 Identify changes
|
|
488
|
+
|
|
489
|
+
If the artifact already exists, compare:
|
|
490
|
+
- **New sections**: sections in your generated version that don't exist in the current file.
|
|
491
|
+
- **Updated sections**: sections where content has changed (decisions, patterns, module list).
|
|
492
|
+
- **Stale sections**: sections that are outdated (modules that no longer exist, deprecated patterns).
|
|
493
|
+
|
|
494
|
+
### 5.2 Preserve manual decisions
|
|
495
|
+
|
|
496
|
+
For artifacts like `core-memory` that include manual decisions and lessons:
|
|
497
|
+
- **Do NOT delete** existing completed modules or design decisions.
|
|
498
|
+
- **Do ADD** new modules/decisions from the latest feature work.
|
|
499
|
+
- **Do UPDATE** rationale if the reasoning has changed.
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
## Phase 6 — Present changes to user
|
|
504
|
+
|
|
505
|
+
### 6.1 Show a diff-style summary
|
|
506
|
+
|
|
507
|
+
For an **update**:
|
|
508
|
+
```
|
|
509
|
+
# Changes to project-memory/auth-model.md
|
|
510
|
+
|
|
511
|
+
## New sections
|
|
512
|
+
- [New section name]: [brief description]
|
|
513
|
+
|
|
514
|
+
## Updated sections
|
|
515
|
+
- [Section name]: [what changed]
|
|
516
|
+
|
|
517
|
+
## Removed sections
|
|
518
|
+
- [Section name]: [why no longer relevant]
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
For a **creation**:
|
|
522
|
+
```
|
|
523
|
+
# New artifact: project-memory/repo-map.md
|
|
524
|
+
|
|
525
|
+
This artifact defines:
|
|
526
|
+
- [Key item 1]
|
|
527
|
+
- [Key item 2]
|
|
528
|
+
- ...
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
### 6.2 Ask for confirmation
|
|
532
|
+
|
|
533
|
+
Present the changes and ask:
|
|
534
|
+
- "Does this match the current codebase structure?"
|
|
535
|
+
- "Are there sections you'd like me to expand or clarify?"
|
|
536
|
+
- "Any decisions or patterns you want me to add manually?"
|
|
537
|
+
|
|
538
|
+
Wait for user approval before writing the file.
|
|
539
|
+
|
|
540
|
+
---
|
|
541
|
+
|
|
542
|
+
## Phase 7 — Write the artifact
|
|
543
|
+
|
|
544
|
+
### 7.1 Write to project-memory/
|
|
545
|
+
|
|
546
|
+
```
|
|
547
|
+
project-memory/<artifact-type>.md
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
### 7.2 Update project-memory/README.md
|
|
551
|
+
|
|
552
|
+
If the artifact is new, add an entry to the index:
|
|
553
|
+
|
|
554
|
+
```markdown
|
|
555
|
+
| [artifact-type].md | [Brief description] | [Who updates it: auto / manual / both] |
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
If artifact already exists, ensure the index is still accurate.
|
|
559
|
+
|
|
560
|
+
### 7.3 Set up symlinks
|
|
561
|
+
|
|
562
|
+
#### 7.3.1 Artifact symlinks (for new artifacts only)
|
|
563
|
+
|
|
564
|
+
If this is a **new artifact**, create symlinks in `.claude/` and `.cursor/` pointing to the single source of truth in `project-memory/`:
|
|
565
|
+
|
|
566
|
+
```bash
|
|
567
|
+
# For .claude/
|
|
568
|
+
ln -sf ../project-memory/<artifact-type>.md .claude/docs/<artifact-type>.md
|
|
569
|
+
|
|
570
|
+
# For .cursor/
|
|
571
|
+
ln -sf ../project-memory/<artifact-type>.md .cursor/docs/<artifact-type>.md
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
**Verify links exist and are correct**:
|
|
575
|
+
```bash
|
|
576
|
+
ls -la .claude/docs/<artifact-type>.md .cursor/docs/<artifact-type>.md
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
If either symlink already exists, skip (do not overwrite).
|
|
580
|
+
|
|
581
|
+
#### 7.3.2 Script symlink (always check)
|
|
582
|
+
|
|
583
|
+
Ensure `scripts/run-feature-modules.sh` is symlinked to `.agent/scripts/run-feature-modules.sh`:
|
|
584
|
+
|
|
585
|
+
```bash
|
|
586
|
+
# Check if symlink exists
|
|
587
|
+
if [ ! -L scripts/run-feature-modules.sh ]; then
|
|
588
|
+
# Remove the file if it exists as a regular file
|
|
589
|
+
rm -f scripts/run-feature-modules.sh
|
|
590
|
+
# Create the symlink
|
|
591
|
+
ln -sf ../.agent/scripts/run-feature-modules.sh scripts/run-feature-modules.sh
|
|
592
|
+
echo "✅ Created symlink: scripts/run-feature-modules.sh"
|
|
593
|
+
else
|
|
594
|
+
echo "✅ Symlink already exists: scripts/run-feature-modules.sh"
|
|
595
|
+
fi
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
**Verify**:
|
|
599
|
+
```bash
|
|
600
|
+
ls -la scripts/run-feature-modules.sh
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
This ensures the script is maintained in a single location (`.agent/scripts/`) and referenced from the root `scripts/` folder.
|
|
604
|
+
|
|
605
|
+
### 7.4 Confirm with user
|
|
606
|
+
|
|
607
|
+
Report:
|
|
608
|
+
- The artifact file path: `project-memory/<artifact-type>.md`
|
|
609
|
+
- Symlink paths created (if new): `.claude/docs/<artifact-type>.md`, `.cursor/docs/<artifact-type>.md`
|
|
610
|
+
- Whether this was a creation or update
|
|
611
|
+
- Number of sections/changes
|
|
612
|
+
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
## Quality gates
|
|
616
|
+
|
|
617
|
+
Before finalizing the artifact:
|
|
618
|
+
|
|
619
|
+
- [ ] All sections are present and complete for this artifact type.
|
|
620
|
+
- [ ] Examples are concrete and drawn from actual codebase (not hypothetical).
|
|
621
|
+
- [ ] Decisions/patterns are consistent with what the code actually does (not aspirational).
|
|
622
|
+
- [ ] No broken file paths or module names (spot-check against actual files).
|
|
623
|
+
- [ ] Language is clear and actionable (team members could follow the rules without asking).
|
|
624
|
+
- [ ] For updates: no useful content from the prior version was removed without reason.
|
|
625
|
+
|
|
626
|
+
---
|
|
627
|
+
|
|
628
|
+
## Notes
|
|
629
|
+
|
|
630
|
+
- **Single source of truth**: project-memory artifacts are the authoritative reference stored in `project-memory/<artifact-type>.md`. If they conflict with code, the code is wrong — update the code, not the artifact.
|
|
631
|
+
- **Symlink architecture**: Artifacts in `project-memory/` are symlinked from `.claude/docs/` and `.cursor/docs/` to avoid duplication. Symlinks are created automatically when a new artifact is generated. **Always edit the artifact in `project-memory/`, never in the symlink copies.**
|
|
632
|
+
- **Regular refresh cadence**: After each completed feature module (or every 2–3 weeks), run `create-blueprint` on `core-memory` and `repo-map` to keep them current.
|
|
633
|
+
- **Graph-first approach**: Always use code-review-graph tools before reading files. The graph is faster and gives you structural context.
|
|
634
|
+
- **Curation, not exhaustion**: Artifact sections describe the most important patterns and decisions, not every detail. If a pattern is used once, it probably doesn't need to be in the playbook.
|
|
635
|
+
- **Portable artifacts**: These skill generates artifacts that are project-specific in content but portable in structure. You can copy the `project-memory/` folder to another project and run the skill again to regenerate them with that project's codebase.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug-issue
|
|
3
|
+
description: Systematically debug issues using graph-powered code navigation
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Debug Issue
|
|
8
|
+
|
|
9
|
+
Use the knowledge graph to systematically trace and debug issues.
|
|
10
|
+
|
|
11
|
+
### Steps
|
|
12
|
+
|
|
13
|
+
1. Use `semantic_search_nodes` to find code related to the issue.
|
|
14
|
+
2. Use `query_graph` with `callers_of` and `callees_of` to trace call chains.
|
|
15
|
+
3. Use `get_flow` to see full execution paths through suspected areas.
|
|
16
|
+
4. Run `detect_changes` to check if recent changes caused the issue.
|
|
17
|
+
5. Use `get_impact_radius` on suspected files to see what else is affected.
|
|
18
|
+
|
|
19
|
+
### Tips
|
|
20
|
+
|
|
21
|
+
- Check both callers and callees to understand the full context.
|
|
22
|
+
- Look at affected flows to find the entry point that triggers the bug.
|
|
23
|
+
- Recent changes are the most common source of new issues.
|
|
24
|
+
|
|
25
|
+
## Token Efficiency Rules
|
|
26
|
+
- ALWAYS start with `get_minimal_context(task="<your task>")` before any other graph tool.
|
|
27
|
+
- Use `detail_level="minimal"` on all calls. Only escalate to "standard" when minimal is insufficient.
|
|
28
|
+
- Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explore-codebase
|
|
3
|
+
description: Navigate and understand codebase structure using the knowledge graph
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Explore Codebase
|
|
8
|
+
|
|
9
|
+
Use the code-review-graph MCP tools to explore and understand the codebase.
|
|
10
|
+
|
|
11
|
+
### Steps
|
|
12
|
+
|
|
13
|
+
1. Run `list_graph_stats` to see overall codebase metrics.
|
|
14
|
+
2. Run `get_architecture_overview` for high-level community structure.
|
|
15
|
+
3. Use `list_communities` to find major modules, then `get_community` for details.
|
|
16
|
+
4. Use `semantic_search_nodes` to find specific functions or classes.
|
|
17
|
+
5. Use `query_graph` with patterns like `callers_of`, `callees_of`, `imports_of` to trace relationships.
|
|
18
|
+
6. Use `list_flows` and `get_flow` to understand execution paths.
|
|
19
|
+
|
|
20
|
+
### Tips
|
|
21
|
+
|
|
22
|
+
- Start broad (stats, architecture) then narrow down to specific areas.
|
|
23
|
+
- Use `children_of` on a file to see all its functions and classes.
|
|
24
|
+
- Use `find_large_functions` to identify complex code.
|
|
25
|
+
|
|
26
|
+
## Token Efficiency Rules
|
|
27
|
+
- ALWAYS start with `get_minimal_context(task="<your task>")` before any other graph tool.
|
|
28
|
+
- Use `detail_level="minimal"` on all calls. Only escalate to "standard" when minimal is insufficient.
|
|
29
|
+
- Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.
|