@smartsoft001/pro-claude-plugins 0.2.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/.claude-plugin/marketplace.json +26 -0
- package/README.md +56 -0
- package/package.json +14 -0
- package/plugins/flow/.claude-plugin/README.md +91 -0
- package/plugins/flow/.claude-plugin/merge-permissions.js +115 -0
- package/plugins/flow/.claude-plugin/plugin.json +5 -0
- package/plugins/flow/.claude-plugin/settings.template.json +86 -0
- package/plugins/flow/agents/angular-component-scaffolder.md +176 -0
- package/plugins/flow/agents/angular-directive-builder.md +154 -0
- package/plugins/flow/agents/angular-guard-builder.md +244 -0
- package/plugins/flow/agents/angular-jest-test-writer.md +475 -0
- package/plugins/flow/agents/angular-pipe-builder.md +170 -0
- package/plugins/flow/agents/angular-resolver-builder.md +287 -0
- package/plugins/flow/agents/angular-service-builder.md +162 -0
- package/plugins/flow/agents/angular-signal-state-builder.md +340 -0
- package/plugins/flow/agents/angular-test-diagnostician.md +279 -0
- package/plugins/flow/agents/angular-testbed-configurator.md +315 -0
- package/plugins/flow/agents/arch-scaffolder.md +278 -0
- package/plugins/flow/agents/e2e-data-testid-injector.md +195 -0
- package/plugins/flow/agents/e2e-project-scaffolder.md +194 -0
- package/plugins/flow/agents/e2e-test-writer.md +357 -0
- package/plugins/flow/agents/shared-agent-evolver.md +294 -0
- package/plugins/flow/agents/shared-build-verifier.md +160 -0
- package/plugins/flow/agents/shared-config-updater.md +310 -0
- package/plugins/flow/agents/shared-coverage-enforcer.md +184 -0
- package/plugins/flow/agents/shared-error-handler.md +217 -0
- package/plugins/flow/agents/shared-file-creator.md +344 -0
- package/plugins/flow/agents/shared-impl-orchestrator.md +312 -0
- package/plugins/flow/agents/shared-impl-reporter.md +368 -0
- package/plugins/flow/agents/shared-impl-teammate.md +201 -0
- package/plugins/flow/agents/shared-linear-subtask-iterator.md +337 -0
- package/plugins/flow/agents/shared-logic-implementer.md +244 -0
- package/plugins/flow/agents/shared-maia-api.md +26 -0
- package/plugins/flow/agents/shared-parallelization-analyzer.md +343 -0
- package/plugins/flow/agents/shared-performance-validator.md +168 -0
- package/plugins/flow/agents/shared-plan-perspective.md +271 -0
- package/plugins/flow/agents/shared-project-standardizer.md +205 -0
- package/plugins/flow/agents/shared-report-synthesizer.md +188 -0
- package/plugins/flow/agents/shared-review-teammate.md +189 -0
- package/plugins/flow/agents/shared-security-scanner.md +186 -0
- package/plugins/flow/agents/shared-style-enforcer.md +230 -0
- package/plugins/flow/agents/shared-subtask-dependency-analyzer.md +189 -0
- package/plugins/flow/agents/shared-tdd-developer.md +350 -0
- package/plugins/flow/agents/shared-team-coordinator.md +192 -0
- package/plugins/flow/agents/shared-test-fixer.md +186 -0
- package/plugins/flow/agents/shared-test-runner.md +191 -0
- package/plugins/flow/agents/shared-ui-classifier.md +263 -0
- package/plugins/flow/agents/shared-verification-orchestrator.md +194 -0
- package/plugins/flow/agents/shared-verification-runner.md +140 -0
- package/plugins/flow/agents/ui-a11y-validator.md +305 -0
- package/plugins/flow/agents/ui-screenshot-reporter.md +329 -0
- package/plugins/flow/agents/ui-web-designer.md +214 -0
- package/plugins/flow/scripts/compute-session-tokens.sh +39 -0
- package/plugins/flow/skills/a11y-audit/SKILL.md +214 -0
- package/plugins/flow/skills/angular-patterns/SKILL.md +191 -0
- package/plugins/flow/skills/browser-capture/SKILL.md +238 -0
- package/plugins/flow/skills/commit/SKILL.md +259 -0
- package/plugins/flow/skills/debug-helper/SKILL.md +375 -0
- package/plugins/flow/skills/impl/SKILL.md +992 -0
- package/plugins/flow/skills/karpathy-guidelines/SKILL.md +72 -0
- package/plugins/flow/skills/linear-suggestion/SKILL.md +132 -0
- package/plugins/flow/skills/maia-files-delete/SKILL.md +59 -0
- package/plugins/flow/skills/maia-files-upload/SKILL.md +57 -0
- package/plugins/flow/skills/nx-conventions/SKILL.md +326 -0
- package/plugins/flow/skills/plan/SKILL.md +1033 -0
- package/plugins/flow/skills/push/SKILL.md +759 -0
- package/plugins/flow/skills/review/SKILL.md +443 -0
- package/plugins/flow/skills/test-e2e/SKILL.md +164 -0
- package/plugins/flow/skills/test-unit/SKILL.md +456 -0
- package/plugins/flow-external/.claude-plugin/README.md +146 -0
- package/plugins/flow-external/.claude-plugin/merge-permissions.js +94 -0
- package/plugins/flow-external/.claude-plugin/plugin.json +5 -0
- package/plugins/flow-external/.claude-plugin/settings.template.json +78 -0
- package/plugins/flow-external/agents/angular-component-scaffolder.md +271 -0
- package/plugins/flow-external/agents/angular-directive-builder.md +134 -0
- package/plugins/flow-external/agents/angular-guard-builder.md +73 -0
- package/plugins/flow-external/agents/angular-pipe-builder.md +90 -0
- package/plugins/flow-external/agents/angular-resolver-builder.md +79 -0
- package/plugins/flow-external/agents/angular-service-builder.md +168 -0
- package/plugins/flow-external/agents/angular-state-builder.md +263 -0
- package/plugins/flow-external/agents/shared-build-verifier.md +67 -0
- package/plugins/flow-external/agents/shared-impl-orchestrator.md +90 -0
- package/plugins/flow-external/agents/shared-impl-reporter.md +135 -0
- package/plugins/flow-external/agents/shared-linear-subtask-iterator.md +70 -0
- package/plugins/flow-external/agents/shared-ui-classifier.md +38 -0
- package/plugins/flow-external/agents/ui-web-designer.md +203 -0
- package/plugins/flow-external/scripts/compute-session-tokens.sh +39 -0
- package/plugins/flow-external/skills/a11y-audit/SKILL.md +97 -0
- package/plugins/flow-external/skills/angular-cli-conventions/SKILL.md +268 -0
- package/plugins/flow-external/skills/angular-patterns/SKILL.md +182 -0
- package/plugins/flow-external/skills/browser-capture/SKILL.md +74 -0
- package/plugins/flow-external/skills/commit/SKILL.md +114 -0
- package/plugins/flow-external/skills/debug-helper/SKILL.md +135 -0
- package/plugins/flow-external/skills/impl/SKILL.md +218 -0
- package/plugins/flow-external/skills/karpathy-guidelines/SKILL.md +72 -0
- package/plugins/flow-external/skills/linear-suggestion/SKILL.md +62 -0
- package/plugins/flow-external/skills/maia-files-delete/SKILL.md +34 -0
- package/plugins/flow-external/skills/maia-files-upload/SKILL.md +41 -0
- package/plugins/flow-external/skills/plan/SKILL.md +334 -0
- package/plugins/flow-external/skills/push/SKILL.md +232 -0
- package/plugins/flow-legacy/.claude-plugin/README.md +143 -0
- package/plugins/flow-legacy/.claude-plugin/merge-permissions.js +94 -0
- package/plugins/flow-legacy/.claude-plugin/plugin.json +5 -0
- package/plugins/flow-legacy/.claude-plugin/settings.template.json +79 -0
- package/plugins/flow-legacy/agents/angular-component-scaffolder.md +327 -0
- package/plugins/flow-legacy/agents/angular-directive-builder.md +253 -0
- package/plugins/flow-legacy/agents/angular-guard-builder.md +326 -0
- package/plugins/flow-legacy/agents/angular-pipe-builder.md +238 -0
- package/plugins/flow-legacy/agents/angular-resolver-builder.md +339 -0
- package/plugins/flow-legacy/agents/angular-service-builder.md +271 -0
- package/plugins/flow-legacy/agents/angular-state-builder.md +480 -0
- package/plugins/flow-legacy/agents/shared-impl-orchestrator.md +174 -0
- package/plugins/flow-legacy/agents/shared-impl-reporter.md +232 -0
- package/plugins/flow-legacy/agents/shared-linear-subtask-iterator.md +198 -0
- package/plugins/flow-legacy/agents/shared-tdd-developer.md +307 -0
- package/plugins/flow-legacy/agents/shared-test-runner.md +133 -0
- package/plugins/flow-legacy/agents/shared-ui-classifier.md +145 -0
- package/plugins/flow-legacy/scripts/compute-session-tokens.sh +39 -0
- package/plugins/flow-legacy/skills/a11y-audit/SKILL.md +214 -0
- package/plugins/flow-legacy/skills/angular-patterns/SKILL.md +346 -0
- package/plugins/flow-legacy/skills/browser-capture/SKILL.md +238 -0
- package/plugins/flow-legacy/skills/commit/SKILL.md +215 -0
- package/plugins/flow-legacy/skills/debug-helper/SKILL.md +395 -0
- package/plugins/flow-legacy/skills/impl/SKILL.md +710 -0
- package/plugins/flow-legacy/skills/karpathy-guidelines/SKILL.md +72 -0
- package/plugins/flow-legacy/skills/linear-suggestion/SKILL.md +132 -0
- package/plugins/flow-legacy/skills/maia-files-delete/SKILL.md +59 -0
- package/plugins/flow-legacy/skills/maia-files-upload/SKILL.md +57 -0
- package/plugins/flow-legacy/skills/nx-conventions/SKILL.md +368 -0
- package/plugins/flow-legacy/skills/plan/SKILL.md +742 -0
- package/plugins/flow-legacy/skills/push/SKILL.md +645 -0
- package/plugins/flow-legacy/skills/test-unit/SKILL.md +500 -0
- package/plugins/smart-pro/.claude-plugin/README.md +115 -0
- package/plugins/smart-pro/.claude-plugin/merge-permissions.js +129 -0
- package/plugins/smart-pro/.claude-plugin/plugin.json +5 -0
- package/plugins/smart-pro/.claude-plugin/settings.template.json +94 -0
- package/plugins/smart-pro/agents/angular-components/AGENT.md +214 -0
- package/plugins/smart-pro/hooks/CONFIG.md +198 -0
- package/plugins/smart-pro/hooks/README.md +139 -0
- package/plugins/smart-pro/hooks/audit_logger.py +107 -0
- package/plugins/smart-pro/hooks/auto_format.sh +11 -0
- package/plugins/smart-pro/hooks/hooks.json +79 -0
- package/plugins/smart-pro/hooks/safety_validator.py +129 -0
- package/plugins/smart-pro/hooks/sensitive_file_blocker.py +58 -0
- package/plugins/smart-pro/hooks/skill_validator.py +220 -0
- package/plugins/smart-pro/skills/angular-components-action-panel/SKILL.md +159 -0
- package/plugins/smart-pro/skills/angular-components-avatar/SKILL.md +142 -0
- package/plugins/smart-pro/skills/angular-components-badge/SKILL.md +110 -0
- package/plugins/smart-pro/skills/angular-components-breadcrumbs/SKILL.md +91 -0
- package/plugins/smart-pro/skills/angular-components-button/SKILL.md +146 -0
- package/plugins/smart-pro/skills/angular-components-button-group/SKILL.md +121 -0
- package/plugins/smart-pro/skills/angular-components-calendar/SKILL.md +78 -0
- package/plugins/smart-pro/skills/angular-components-card/SKILL.md +110 -0
- package/plugins/smart-pro/skills/angular-components-card-heading/SKILL.md +105 -0
- package/plugins/smart-pro/skills/angular-components-command-palette/SKILL.md +168 -0
- package/plugins/smart-pro/skills/angular-components-container/SKILL.md +93 -0
- package/plugins/smart-pro/skills/angular-components-description-list/SKILL.md +102 -0
- package/plugins/smart-pro/skills/angular-components-details/SKILL.md +70 -0
- package/plugins/smart-pro/skills/angular-components-divider/SKILL.md +110 -0
- package/plugins/smart-pro/skills/angular-components-drawer/SKILL.md +136 -0
- package/plugins/smart-pro/skills/angular-components-dropdown/SKILL.md +131 -0
- package/plugins/smart-pro/skills/angular-components-empty-state/SKILL.md +103 -0
- package/plugins/smart-pro/skills/angular-components-feed/SKILL.md +110 -0
- package/plugins/smart-pro/skills/angular-components-form/SKILL.md +77 -0
- package/plugins/smart-pro/skills/angular-components-grid-list/SKILL.md +91 -0
- package/plugins/smart-pro/skills/angular-components-input/SKILL.md +118 -0
- package/plugins/smart-pro/skills/angular-components-list/SKILL.md +75 -0
- package/plugins/smart-pro/skills/angular-components-list-container/SKILL.md +106 -0
- package/plugins/smart-pro/skills/angular-components-media-object/SKILL.md +133 -0
- package/plugins/smart-pro/skills/angular-components-modal/SKILL.md +159 -0
- package/plugins/smart-pro/skills/angular-components-multi-column-layout/SKILL.md +84 -0
- package/plugins/smart-pro/skills/angular-components-navbar/SKILL.md +93 -0
- package/plugins/smart-pro/skills/angular-components-notification/SKILL.md +147 -0
- package/plugins/smart-pro/skills/angular-components-page/SKILL.md +162 -0
- package/plugins/smart-pro/skills/angular-components-page-heading/SKILL.md +96 -0
- package/plugins/smart-pro/skills/angular-components-paging/SKILL.md +86 -0
- package/plugins/smart-pro/skills/angular-components-progress-bars/SKILL.md +94 -0
- package/plugins/smart-pro/skills/angular-components-searchbar/SKILL.md +113 -0
- package/plugins/smart-pro/skills/angular-components-section-heading/SKILL.md +156 -0
- package/plugins/smart-pro/skills/angular-components-select-menu/SKILL.md +101 -0
- package/plugins/smart-pro/skills/angular-components-sidebar-layout/SKILL.md +121 -0
- package/plugins/smart-pro/skills/angular-components-sidebar-navigation/SKILL.md +80 -0
- package/plugins/smart-pro/skills/angular-components-sign-in-form/SKILL.md +91 -0
- package/plugins/smart-pro/skills/angular-components-stacked-layout/SKILL.md +114 -0
- package/plugins/smart-pro/skills/angular-components-stacked-list/SKILL.md +93 -0
- package/plugins/smart-pro/skills/angular-components-stats/SKILL.md +87 -0
- package/plugins/smart-pro/skills/angular-components-table/SKILL.md +98 -0
- package/plugins/smart-pro/skills/angular-components-tabs/SKILL.md +99 -0
- package/plugins/smart-pro/skills/angular-components-textarea/SKILL.md +111 -0
- package/plugins/smart-pro/skills/angular-components-toggle/SKILL.md +109 -0
- package/plugins/smart-pro/skills/angular-components-vertical-navigation/SKILL.md +139 -0
- package/plugins/smart-pro/skills/audit-log/SKILL.md +82 -0
- package/plugins/smart-pro/skills/format-code/SKILL.md +46 -0
- package/plugins/smart-pro/skills/project-conventions/SKILL.md +90 -0
- package/plugins/smart-pro/skills/safety-check/SKILL.md +0 -0
- package/src/index.d.ts +6 -0
- package/src/index.js +7 -0
- package/src/index.js.map +1 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit
|
|
3
|
+
description: Create a conventional commit message based on Linear task and staged changes. Fetches task details, analyzes changes, generates commit message, and optionally runs parallelization analysis.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- Read
|
|
7
|
+
- Glob
|
|
8
|
+
- Grep
|
|
9
|
+
- AskUserQuestion
|
|
10
|
+
- TaskCreate
|
|
11
|
+
- TaskUpdate
|
|
12
|
+
- TaskList
|
|
13
|
+
- TaskGet
|
|
14
|
+
- mcp__linear__get_issue
|
|
15
|
+
- mcp__linear__list_comments
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Commit Skill
|
|
19
|
+
|
|
20
|
+
Create a conventional commit message based on Linear task and staged changes.
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
/commit [linearTaskId]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Parameters
|
|
29
|
+
|
|
30
|
+
- `linearTaskId` - Linear task ID (e.g., ENG-123)
|
|
31
|
+
|
|
32
|
+
## Execution Checklist
|
|
33
|
+
|
|
34
|
+
Execute each step in order. Do not skip any step marked as MANDATORY.
|
|
35
|
+
|
|
36
|
+
- [ ] **1. Fetch Linear task** — get title, description, labels/type from MCP Linear server
|
|
37
|
+
- [ ] **2. Analyze staged changes** — run `git diff --cached` to understand scope
|
|
38
|
+
- [ ] **3. Verify completeness** — compare task requirements with staged changes; if incomplete, ask user whether to continue or stop
|
|
39
|
+
- [ ] **4. Read commitlint config** — read `commitlint.config.js` for valid scopes and format
|
|
40
|
+
- [ ] **5. Generate commit message** — draft `<type>(<scope>): <subject>` with body and `Refs: <linearTaskId>`
|
|
41
|
+
- [ ] **6. Show message to user** — present commit message for approval before proceeding
|
|
42
|
+
- [ ] **7. MANDATORY: Pre-commit preparation** — run `nvm use 24` then `npm run format`, stage any formatting changes
|
|
43
|
+
- [ ] **8. Create commit** — execute `git commit` with the approved message
|
|
44
|
+
- [ ] **9. Parallelization analysis (optional)** — fetch Linear comments, search for orchestration plan, delegate to `shared-parallelization-analyzer` if found
|
|
45
|
+
|
|
46
|
+
### Task Progress Tracking
|
|
47
|
+
|
|
48
|
+
**MANDATORY**: Use Claude Code's built-in task tracking to provide real-time progress visibility.
|
|
49
|
+
|
|
50
|
+
**Task naming convention**: Every task subject MUST be prefixed with the Linear task ID:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
<linearTaskId> <step description>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**At skill start**: Create tasks for each checklist step using `TaskCreate`:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
TaskCreate({
|
|
60
|
+
subject: "MM-123 Fetch Linear task",
|
|
61
|
+
description: "Get title, description, labels/type from MCP Linear server",
|
|
62
|
+
activeForm: "MM-123 Fetching Linear task"
|
|
63
|
+
})
|
|
64
|
+
TaskCreate({
|
|
65
|
+
subject: "MM-123 Analyze staged changes",
|
|
66
|
+
description: "Run git diff --cached to understand scope",
|
|
67
|
+
activeForm: "MM-123 Analyzing staged changes"
|
|
68
|
+
})
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**During execution**:
|
|
72
|
+
|
|
73
|
+
- Before starting a step → `TaskUpdate({ taskId, status: "in_progress" })`
|
|
74
|
+
- After completing a step → `TaskUpdate({ taskId, status: "completed" })`
|
|
75
|
+
|
|
76
|
+
**At checkpoints**: Use `TaskList` to review overall progress before presenting status to user.
|
|
77
|
+
|
|
78
|
+
## Instructions
|
|
79
|
+
|
|
80
|
+
You are tasked with creating a git commit based on a Linear task and staged changes.
|
|
81
|
+
|
|
82
|
+
### Step 1: Fetch Linear Task Details
|
|
83
|
+
|
|
84
|
+
Use the MCP Linear server to fetch task details for the provided `linearTaskId`. Extract:
|
|
85
|
+
|
|
86
|
+
- Task title
|
|
87
|
+
- Task description
|
|
88
|
+
- Task labels/type (bug, feature, improve etc.)
|
|
89
|
+
|
|
90
|
+
### Step 2: Analyze Staged Changes
|
|
91
|
+
|
|
92
|
+
Run `git diff --cached` to see what files have been changed and understand the scope of changes.
|
|
93
|
+
|
|
94
|
+
### Step 2.5: Verify Implementation Completeness
|
|
95
|
+
|
|
96
|
+
Before proceeding with the commit, verify that all requirements from the Linear task have been implemented:
|
|
97
|
+
|
|
98
|
+
1. **Compare task requirements with actual changes**:
|
|
99
|
+
|
|
100
|
+
- Review the Linear task description and acceptance criteria
|
|
101
|
+
- Analyze the staged changes from `git diff --cached`
|
|
102
|
+
- Identify any requirements from the task that are not reflected in the code changes
|
|
103
|
+
|
|
104
|
+
2. **Ask user if implementation is incomplete**:
|
|
105
|
+
|
|
106
|
+
- If any task requirements appear to be missing from the staged changes, use `AskUserQuestion` to ask the user:
|
|
107
|
+
- Option 1: "Continue with commit" (Proceed with committing only the current changes)
|
|
108
|
+
- Option 2: "Complete implementation first" (Recommended) - Stop the commit process so user can implement missing requirements
|
|
109
|
+
|
|
110
|
+
3. **Handle user decision**:
|
|
111
|
+
- If user chooses "Continue with commit": Proceed to Step 3
|
|
112
|
+
- If user chooses "Complete implementation first": Stop the commit process and inform the user about what's missing
|
|
113
|
+
|
|
114
|
+
**Note**: This verification step helps ensure commits are complete and aligned with task requirements, reducing the need for follow-up commits.
|
|
115
|
+
|
|
116
|
+
### Step 3: Read Commitlint Configuration
|
|
117
|
+
|
|
118
|
+
Read the `commitlint.config.js` file to understand:
|
|
119
|
+
|
|
120
|
+
- Available scopes (from the `scope-enum` rule)
|
|
121
|
+
- Commit message format requirements
|
|
122
|
+
|
|
123
|
+
### Step 4: Generate Commit Message
|
|
124
|
+
|
|
125
|
+
Based on the Linear task details and code changes, generate a commit message following conventional commits format:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
<type>(<scope>): <subject>
|
|
129
|
+
|
|
130
|
+
<body>
|
|
131
|
+
|
|
132
|
+
Refs: <linearTaskId>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Where:
|
|
136
|
+
|
|
137
|
+
- **type**: Choose from: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `build`, `ci`, `perf`, `style`
|
|
138
|
+
- Use task labels/type to determine (bug → fix, feature → feat, etc.)
|
|
139
|
+
- **scope**: Select from available scopes in commitlint.config.js based on changed files
|
|
140
|
+
- If multiple scopes affected, choose the primary one or use a general scope
|
|
141
|
+
- The scope must be one of the valid scopes from commitlint config
|
|
142
|
+
- **subject**: Brief description (use Linear task title as base, keep under 72 chars)
|
|
143
|
+
- **body**: Optional detailed explanation if needed (from task description or complex changes)
|
|
144
|
+
- **footer**: Always include `Refs: <linearTaskId>` to link to Linear task
|
|
145
|
+
|
|
146
|
+
### Step 4.5: Pre-commit Preparation (Mandatory)
|
|
147
|
+
|
|
148
|
+
Before creating the commit, **always** run the following commands:
|
|
149
|
+
|
|
150
|
+
1. **Switch to Node.js 24**:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
source ~/.nvm/nvm.sh && nvm use 24
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
2. **Format the code**:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npm run format
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
3. **Stage any formatting changes**:
|
|
163
|
+
- If `npm run format` modified any files, stage them with `git add`
|
|
164
|
+
- This ensures all committed code is properly formatted
|
|
165
|
+
|
|
166
|
+
### Step 5: Create Commit
|
|
167
|
+
|
|
168
|
+
Execute the commit with the generated message:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
git commit -m "<type>(<scope>): <subject>" -m "<body>" -m "Refs: <linearTaskId>"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Step 6: Post-Commit Parallelization Analysis (Optional)
|
|
175
|
+
|
|
176
|
+
After the commit is created, perform an optional parallelization analysis:
|
|
177
|
+
|
|
178
|
+
1. **Fetch Linear comments** for the task using the MCP Linear server
|
|
179
|
+
2. **Search for `🎭 Agent Orchestration Plan` blocks** in the comments
|
|
180
|
+
3. **If found**: Delegate analysis to `shared-parallelization-analyzer` agent:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
Analyze orchestration plan for parallelization opportunities:
|
|
184
|
+
- Linear Task ID: [linearTaskId]
|
|
185
|
+
- Orchestration Plan: [the 🎭 Agent Orchestration Plan block content]
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
The agent will:
|
|
189
|
+
|
|
190
|
+
- Parse the orchestration plan (agents table, execution flow, TDD cycles)
|
|
191
|
+
- Build a dependency graph from file I/O analysis
|
|
192
|
+
- Identify false sequential dependencies and parallelization opportunities
|
|
193
|
+
- Generate a console report with current vs proposed execution
|
|
194
|
+
|
|
195
|
+
4. **If not found**: Skip silently — no message needed (common for hotfixes, config-only commits)
|
|
196
|
+
|
|
197
|
+
**IMPORTANT**:
|
|
198
|
+
|
|
199
|
+
- This step is **non-blocking** and **advisory only**
|
|
200
|
+
- The analysis report is shown to the user in the console but is NOT auto-applied
|
|
201
|
+
- Recurring orchestrator improvement suggestions (if any) are filed as Linear issues in the "Framework 2.0" project via `linear-suggestion` skill — no user interaction required
|
|
202
|
+
- A commit failure or missing orchestration plan should never cause this step to error
|
|
203
|
+
|
|
204
|
+
### Guidelines
|
|
205
|
+
|
|
206
|
+
1. Keep the subject line concise and imperative mood
|
|
207
|
+
2. Choose the most appropriate type based on task nature and code changes
|
|
208
|
+
3. Select scope based on the primary area of code changes
|
|
209
|
+
4. If task type is unclear, analyze the code changes to determine type
|
|
210
|
+
5. Always include the Linear task reference in the footer
|
|
211
|
+
6. If there are no staged changes, warn the user and don't create commit
|
|
212
|
+
7. After a successful commit, run the optional parallelization analysis (Step 6) to surface optimization opportunities from the orchestration plan. Recurring patterns are filed as Linear issues automatically via `linear-suggestion` skill
|
|
213
|
+
|
|
214
|
+
### Example
|
|
215
|
+
|
|
216
|
+
For Linear task "ENG-123: Add dark mode toggle to settings":
|
|
217
|
+
|
|
218
|
+
- Type: `feat` (new feature)
|
|
219
|
+
- Scope: `shared-angular` (if changes are in libs/shared/angular)
|
|
220
|
+
- Subject: "add dark mode toggle to settings"
|
|
221
|
+
- Result: `feat(shared-angular): add dark mode toggle to settings`
|
|
222
|
+
|
|
223
|
+
**Post-commit analysis** (if orchestration plan exists in Linear comments):
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
## Parallelization Analysis Report
|
|
227
|
+
|
|
228
|
+
**Task**: ENG-123 - Add dark mode toggle to settings
|
|
229
|
+
|
|
230
|
+
### Opportunities Found
|
|
231
|
+
|
|
232
|
+
| # | Type | Agents Affected | Reason |
|
|
233
|
+
| --- | ----------------------- | -------------------------------------- | ---------------------------- |
|
|
234
|
+
| 1 | Independent scaffolding | scaffold-component, scaffold-service | No shared output files |
|
|
235
|
+
|
|
236
|
+
### Estimated Impact
|
|
237
|
+
|
|
238
|
+
- **Current steps**: 5 sequential
|
|
239
|
+
- **Proposed steps**: 4 (1 parallel group + 3 sequential)
|
|
240
|
+
- **Reduction**: 1 fewer sequential step
|
|
241
|
+
|
|
242
|
+
### Orchestrator Improvement Suggestions
|
|
243
|
+
|
|
244
|
+
**Suggestion**: Independent scaffolding agents are always falsely sequentialized
|
|
245
|
+
**Target**: `shared-impl-orchestrator.md` → Parallel vs Sequential
|
|
246
|
+
**Linear issue**: FRA-100 — https://linear.app/smartflow001/issue/FRA-100
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
_Analysis generated by shared-parallelization-analyzer_
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
If a recurring pattern is detected, a Linear issue is automatically created in "Framework 2.0" via `linear-suggestion` skill.
|
|
254
|
+
|
|
255
|
+
If no orchestration plan is found in Linear comments, this step is silently skipped.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
**Important**: Before committing, show the generated commit message to the user for approval.
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug-helper
|
|
3
|
+
description: Cross-stack debugging workflows for Angular, NestJS, and MongoDB applications
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Debug Helper
|
|
7
|
+
|
|
8
|
+
This skill provides debugging workflows and techniques for this project's tech stack.
|
|
9
|
+
|
|
10
|
+
## 1. Angular Debugging
|
|
11
|
+
|
|
12
|
+
### Component Not Rendering
|
|
13
|
+
|
|
14
|
+
1. **Check selector usage**
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
// Verify selector matches
|
|
18
|
+
@Component({ selector: 'app-my-component' })
|
|
19
|
+
// Template: <app-my-component />
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
2. **Check imports (standalone)**
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
@Component({
|
|
26
|
+
standalone: true,
|
|
27
|
+
imports: [MyComponent], // Is it imported?
|
|
28
|
+
})
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
3. **Check module exports (non-standalone)**
|
|
32
|
+
```typescript
|
|
33
|
+
@NgModule({
|
|
34
|
+
exports: [MyComponent], // Is it exported?
|
|
35
|
+
})
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Signal/Reactive Issues
|
|
39
|
+
|
|
40
|
+
1. **Signal not updating**
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
// Wrong: mutating object
|
|
44
|
+
items()[0].name = 'new'; // Won't trigger update
|
|
45
|
+
|
|
46
|
+
// Correct: create new reference
|
|
47
|
+
items.update((arr) =>
|
|
48
|
+
arr.map((item) => (item.id === id ? { ...item, name: 'new' } : item)),
|
|
49
|
+
);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
2. **Effect not running**
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
// Ensure signal is read inside effect
|
|
56
|
+
effect(() => {
|
|
57
|
+
const value = this.mySignal(); // Must call signal
|
|
58
|
+
console.log('Value changed:', value);
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
3. **Computed not recalculating**
|
|
63
|
+
```typescript
|
|
64
|
+
// Ensure all dependencies are read
|
|
65
|
+
readonly filtered = computed(() => {
|
|
66
|
+
const items = this.items(); // Dependency
|
|
67
|
+
const filter = this.filter(); // Dependency
|
|
68
|
+
return items.filter(i => i.name.includes(filter));
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Change Detection Issues
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
// Force change detection
|
|
76
|
+
constructor(private cdr: ChangeDetectorRef) {}
|
|
77
|
+
|
|
78
|
+
// After async operation
|
|
79
|
+
this.cdr.detectChanges();
|
|
80
|
+
|
|
81
|
+
// Or mark for check (OnPush)
|
|
82
|
+
this.cdr.markForCheck();
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### HTTP Debugging
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
// Add HTTP interceptor for logging
|
|
89
|
+
export const loggingInterceptor: HttpInterceptorFn = (req, next) => {
|
|
90
|
+
console.log('Request:', req.method, req.url);
|
|
91
|
+
return next(req).pipe(
|
|
92
|
+
tap({
|
|
93
|
+
next: (event) => {
|
|
94
|
+
if (event instanceof HttpResponse) {
|
|
95
|
+
console.log('Response:', event.status, event.body);
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
error: (error) => console.error('HTTP Error:', error),
|
|
99
|
+
}),
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Browser DevTools
|
|
105
|
+
|
|
106
|
+
1. **Angular DevTools** - Install Chrome extension
|
|
107
|
+
2. **Component inspector** - Click "Components" tab
|
|
108
|
+
3. **Profiler** - Record change detection cycles
|
|
109
|
+
4. **Network tab** - Check API calls
|
|
110
|
+
|
|
111
|
+
## 2. NestJS Debugging
|
|
112
|
+
|
|
113
|
+
### Request Not Reaching Controller
|
|
114
|
+
|
|
115
|
+
1. **Check route path**
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
@Controller('features') // /features
|
|
119
|
+
@Get(':id') // /features/:id
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
2. **Check module imports**
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
@Module({
|
|
126
|
+
imports: [FeatureModule], // Is module imported?
|
|
127
|
+
})
|
|
128
|
+
export class AppModule {}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
3. **Check guards/interceptors**
|
|
132
|
+
```typescript
|
|
133
|
+
@UseGuards(AuthGuard) // Is guard blocking?
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Dependency Injection Errors
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
Error: Nest can't resolve dependencies of FeatureService
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Solutions:**
|
|
143
|
+
|
|
144
|
+
1. Check provider is in module
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
@Module({
|
|
148
|
+
providers: [FeatureService, FeatureRepository],
|
|
149
|
+
})
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
2. Check circular dependencies
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
// Use forwardRef
|
|
156
|
+
@Inject(forwardRef(() => OtherService))
|
|
157
|
+
private readonly other: OtherService,
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
3. Check module exports
|
|
161
|
+
```typescript
|
|
162
|
+
@Module({
|
|
163
|
+
providers: [SharedService],
|
|
164
|
+
exports: [SharedService], // Must export if used elsewhere
|
|
165
|
+
})
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Logging
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
import { Logger } from '@nestjs/common';
|
|
172
|
+
|
|
173
|
+
@Injectable()
|
|
174
|
+
export class FeatureService {
|
|
175
|
+
private readonly logger = new Logger(FeatureService.name);
|
|
176
|
+
|
|
177
|
+
async findAll() {
|
|
178
|
+
this.logger.log('Finding all features');
|
|
179
|
+
this.logger.debug('Debug info');
|
|
180
|
+
this.logger.warn('Warning');
|
|
181
|
+
this.logger.error('Error occurred', error.stack);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Exception Debugging
|
|
187
|
+
|
|
188
|
+
```typescript
|
|
189
|
+
// Global exception filter
|
|
190
|
+
@Catch()
|
|
191
|
+
export class AllExceptionsFilter implements ExceptionFilter {
|
|
192
|
+
private readonly logger = new Logger('ExceptionFilter');
|
|
193
|
+
|
|
194
|
+
catch(exception: unknown, host: ArgumentsHost) {
|
|
195
|
+
const ctx = host.switchToHttp();
|
|
196
|
+
const response = ctx.getResponse();
|
|
197
|
+
const request = ctx.getRequest();
|
|
198
|
+
|
|
199
|
+
this.logger.error(
|
|
200
|
+
`${request.method} ${request.url}`,
|
|
201
|
+
exception instanceof Error ? exception.stack : exception,
|
|
202
|
+
);
|
|
203
|
+
|
|
204
|
+
// Return error response
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## 3. MongoDB/Mongoose Debugging
|
|
210
|
+
|
|
211
|
+
### Connection Issues
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
// Log connection events
|
|
215
|
+
mongoose.connection.on('connected', () => console.log('MongoDB connected'));
|
|
216
|
+
mongoose.connection.on('error', (err) => console.error('MongoDB error:', err));
|
|
217
|
+
mongoose.connection.on('disconnected', () =>
|
|
218
|
+
console.log('MongoDB disconnected'),
|
|
219
|
+
);
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Query Debugging
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
// Enable Mongoose debug mode
|
|
226
|
+
mongoose.set('debug', true);
|
|
227
|
+
|
|
228
|
+
// Or for specific query
|
|
229
|
+
const result = await this.model.find({ status: 'active' });
|
|
230
|
+
console.log('Query:', this.model.find({ status: 'active' }).getQuery());
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Aggregation Debugging
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
// Log pipeline
|
|
237
|
+
const pipeline = [
|
|
238
|
+
{ $match: { status: 'active' } },
|
|
239
|
+
{ $group: { _id: '$category', count: { $sum: 1 } } },
|
|
240
|
+
];
|
|
241
|
+
console.log('Pipeline:', JSON.stringify(pipeline, null, 2));
|
|
242
|
+
|
|
243
|
+
// Explain query
|
|
244
|
+
const explanation = await this.model.aggregate(pipeline).explain();
|
|
245
|
+
console.log('Explain:', explanation);
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Index Issues
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
# Check indexes in MongoDB shell
|
|
252
|
+
db.features.getIndexes()
|
|
253
|
+
|
|
254
|
+
# Check query uses index
|
|
255
|
+
db.features.find({ status: 'active' }).explain('executionStats')
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## 4. Common Debugging Patterns
|
|
259
|
+
|
|
260
|
+
### Console Debugging
|
|
261
|
+
|
|
262
|
+
```typescript
|
|
263
|
+
// Temporary debug logs (remove before commit)
|
|
264
|
+
console.log('DEBUG:', variable);
|
|
265
|
+
console.table(arrayOfObjects);
|
|
266
|
+
console.group('Group');
|
|
267
|
+
console.log('Item 1');
|
|
268
|
+
console.log('Item 2');
|
|
269
|
+
console.groupEnd();
|
|
270
|
+
console.time('Operation');
|
|
271
|
+
// ... operation
|
|
272
|
+
console.timeEnd('Operation');
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Breakpoint Debugging
|
|
276
|
+
|
|
277
|
+
```typescript
|
|
278
|
+
// Add debugger statement
|
|
279
|
+
function processData(data: Data) {
|
|
280
|
+
debugger; // Execution pauses here in DevTools
|
|
281
|
+
return transform(data);
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### VS Code Launch Configuration
|
|
286
|
+
|
|
287
|
+
```json
|
|
288
|
+
// .vscode/launch.json
|
|
289
|
+
{
|
|
290
|
+
"version": "0.2.0",
|
|
291
|
+
"configurations": [
|
|
292
|
+
{
|
|
293
|
+
"type": "node",
|
|
294
|
+
"request": "launch",
|
|
295
|
+
"name": "Debug NestJS",
|
|
296
|
+
"runtimeArgs": ["-r", "ts-node/register"],
|
|
297
|
+
"args": ["${workspaceFolder}/apps/api/src/main.ts"],
|
|
298
|
+
"cwd": "${workspaceFolder}"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"type": "chrome",
|
|
302
|
+
"request": "launch",
|
|
303
|
+
"name": "Debug Angular",
|
|
304
|
+
"url": "http://localhost:4210",
|
|
305
|
+
"webRoot": "${workspaceFolder}/apps/web/src"
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## 5. Error Investigation Workflow
|
|
312
|
+
|
|
313
|
+
### Step 1: Reproduce
|
|
314
|
+
|
|
315
|
+
- Get exact steps to reproduce
|
|
316
|
+
- Note environment (browser, Node version)
|
|
317
|
+
|
|
318
|
+
### Step 2: Isolate
|
|
319
|
+
|
|
320
|
+
- Identify component/service causing issue
|
|
321
|
+
- Check if issue is frontend, backend, or database
|
|
322
|
+
|
|
323
|
+
### Step 3: Trace
|
|
324
|
+
|
|
325
|
+
- Add logging at key points
|
|
326
|
+
- Use debugger to step through code
|
|
327
|
+
- Check network requests/responses
|
|
328
|
+
|
|
329
|
+
### Step 4: Root Cause
|
|
330
|
+
|
|
331
|
+
- Identify the actual cause (not symptoms)
|
|
332
|
+
- Document findings
|
|
333
|
+
|
|
334
|
+
### Step 5: Fix & Verify
|
|
335
|
+
|
|
336
|
+
- Apply fix
|
|
337
|
+
- Write test that catches the bug
|
|
338
|
+
- Verify fix doesn't introduce regressions
|
|
339
|
+
|
|
340
|
+
## 6. Quick Fixes
|
|
341
|
+
|
|
342
|
+
### "Cannot read property of undefined"
|
|
343
|
+
|
|
344
|
+
```typescript
|
|
345
|
+
// Use optional chaining
|
|
346
|
+
const name = user?.profile?.name;
|
|
347
|
+
|
|
348
|
+
// With nullish coalescing
|
|
349
|
+
const name = user?.profile?.name ?? 'Unknown';
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### "Expression has changed after it was checked"
|
|
353
|
+
|
|
354
|
+
```typescript
|
|
355
|
+
// Option 1: setTimeout
|
|
356
|
+
ngAfterViewInit() {
|
|
357
|
+
setTimeout(() => this.value = newValue);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// Option 2: ChangeDetectorRef
|
|
361
|
+
ngAfterViewInit() {
|
|
362
|
+
this.value = newValue;
|
|
363
|
+
this.cdr.detectChanges();
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### "Circular dependency detected"
|
|
368
|
+
|
|
369
|
+
```typescript
|
|
370
|
+
// Use forwardRef
|
|
371
|
+
@Inject(forwardRef(() => ServiceB))
|
|
372
|
+
private serviceB: ServiceB
|
|
373
|
+
|
|
374
|
+
// Or refactor to remove circular dependency
|
|
375
|
+
```
|