plan-flow-skill 1.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/.claude/commands/create-contract.md +468 -0
- package/.claude/commands/create-plan.md +512 -0
- package/.claude/commands/discovery-plan.md +561 -0
- package/.claude/commands/execute-plan.md +682 -0
- package/.claude/commands/review-code.md +459 -0
- package/.claude/commands/review-pr.md +651 -0
- package/.claude/commands/setup.md +1609 -0
- package/.claude/commands/write-tests.md +543 -0
- package/.claude/rules/core/allowed-patterns.md +175 -0
- package/.claude/rules/core/complexity-scoring.md +225 -0
- package/.claude/rules/core/forbidden-patterns.md +253 -0
- package/.claude/rules/languages/python-patterns.md +6 -0
- package/.claude/rules/languages/typescript-patterns.md +7 -0
- package/.claude/rules/patterns/contract-patterns.md +332 -0
- package/.claude/rules/patterns/discovery-patterns.md +342 -0
- package/.claude/rules/patterns/discovery-templates.md +319 -0
- package/.claude/rules/patterns/jest-patterns.md +482 -0
- package/.claude/rules/patterns/plans-patterns.md +225 -0
- package/.claude/rules/patterns/plans-templates.md +227 -0
- package/.claude/rules/patterns/pytest-patterns.md +457 -0
- package/.claude/rules/patterns/review-code-templates.md +305 -0
- package/.claude/rules/patterns/review-pr-patterns.md +360 -0
- package/.claude/rules/tools/auth-pr-tool.md +30 -0
- package/.claude/rules/tools/interactive-questions-tool.md +235 -0
- package/.claude/rules/tools/jest-testing-tool.md +73 -0
- package/.claude/rules/tools/plan-mode-tool.md +164 -0
- package/.claude/rules/tools/pytest-testing-tool.md +121 -0
- package/.claude/rules/tools/reference-expansion-tool.md +326 -0
- package/LICENSE +21 -0
- package/README.md +167 -0
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +139 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/handlers/claude.d.ts +9 -0
- package/dist/cli/handlers/claude.d.ts.map +1 -0
- package/dist/cli/handlers/claude.js +119 -0
- package/dist/cli/handlers/claude.js.map +1 -0
- package/dist/cli/handlers/codex.d.ts +9 -0
- package/dist/cli/handlers/codex.d.ts.map +1 -0
- package/dist/cli/handlers/codex.js +100 -0
- package/dist/cli/handlers/codex.js.map +1 -0
- package/dist/cli/handlers/cursor.d.ts +8 -0
- package/dist/cli/handlers/cursor.d.ts.map +1 -0
- package/dist/cli/handlers/cursor.js +34 -0
- package/dist/cli/handlers/cursor.js.map +1 -0
- package/dist/cli/handlers/openclaw.d.ts +8 -0
- package/dist/cli/handlers/openclaw.d.ts.map +1 -0
- package/dist/cli/handlers/openclaw.js +34 -0
- package/dist/cli/handlers/openclaw.js.map +1 -0
- package/dist/cli/handlers/shared.d.ts +9 -0
- package/dist/cli/handlers/shared.d.ts.map +1 -0
- package/dist/cli/handlers/shared.js +44 -0
- package/dist/cli/handlers/shared.js.map +1 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +43 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/types.d.ts +26 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +5 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/utils/files.d.ts +37 -0
- package/dist/cli/utils/files.d.ts.map +1 -0
- package/dist/cli/utils/files.js +122 -0
- package/dist/cli/utils/files.js.map +1 -0
- package/dist/cli/utils/logger.d.ts +11 -0
- package/dist/cli/utils/logger.d.ts.map +1 -0
- package/dist/cli/utils/logger.js +34 -0
- package/dist/cli/utils/logger.js.map +1 -0
- package/dist/cli/utils/prompts.d.ts +10 -0
- package/dist/cli/utils/prompts.d.ts.map +1 -0
- package/dist/cli/utils/prompts.js +65 -0
- package/dist/cli/utils/prompts.js.map +1 -0
- package/dist/test/setup.d.ts +5 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/test/setup.js +7 -0
- package/dist/test/setup.js.map +1 -0
- package/package.json +63 -0
- package/rules/core/_index.mdc +89 -0
- package/rules/core/allowed-patterns.mdc +185 -0
- package/rules/core/complexity-scoring.mdc +235 -0
- package/rules/core/forbidden-patterns.mdc +263 -0
- package/rules/languages/_index.mdc +80 -0
- package/rules/languages/python-patterns.mdc +188 -0
- package/rules/languages/typescript-patterns.mdc +128 -0
- package/rules/patterns/_index.mdc +185 -0
- package/rules/patterns/contract-patterns.mdc +344 -0
- package/rules/patterns/discovery-patterns.mdc +354 -0
- package/rules/patterns/discovery-templates.mdc +329 -0
- package/rules/patterns/jest-patterns.mdc +492 -0
- package/rules/patterns/plans-patterns.mdc +237 -0
- package/rules/patterns/plans-templates.mdc +237 -0
- package/rules/patterns/pytest-patterns.mdc +467 -0
- package/rules/patterns/review-code-templates.mdc +315 -0
- package/rules/patterns/review-pr-patterns.mdc +370 -0
- package/rules/skills/_index.mdc +174 -0
- package/rules/skills/create-contract-skill.mdc +239 -0
- package/rules/skills/create-plan-skill.mdc +271 -0
- package/rules/skills/discovery-skill.mdc +295 -0
- package/rules/skills/execute-plan-skill.mdc +388 -0
- package/rules/skills/review-code-skill.mdc +308 -0
- package/rules/skills/review-pr-skill.mdc +496 -0
- package/rules/skills/setup-skill.mdc +923 -0
- package/rules/skills/write-tests-skill.mdc +294 -0
- package/rules/templates/index-template.mdc +126 -0
- package/rules/tools/_index.mdc +114 -0
- package/rules/tools/auth-pr-tool.mdc +362 -0
- package/rules/tools/interactive-questions-tool.mdc +337 -0
- package/rules/tools/jest-testing-tool.mdc +96 -0
- package/rules/tools/plan-mode-tool.mdc +229 -0
- package/rules/tools/pytest-testing-tool.mdc +144 -0
- package/rules/tools/reference-expansion-tool.mdc +338 -0
- package/skills/plan-flow/SKILL.md +109 -0
- package/skills/plan-flow/create-contract/SKILL.md +139 -0
- package/skills/plan-flow/create-plan/SKILL.md +93 -0
- package/skills/plan-flow/discovery/SKILL.md +85 -0
- package/skills/plan-flow/execute-plan/SKILL.md +89 -0
- package/skills/plan-flow/review-code/SKILL.md +100 -0
- package/skills/plan-flow/review-pr/SKILL.md +122 -0
- package/skills/plan-flow/setup/SKILL.md +73 -0
- package/skills/plan-flow/write-tests/SKILL.md +115 -0
- package/templates/shared/AGENTS.md.template +60 -0
- package/templates/shared/CLAUDE.md.template +62 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Include when /write-tests is invoked or test coverage improvement is needed"
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Write Tests Skill
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Analyze current test coverage and **iteratively write or improve tests** for each file until the target coverage percentage is achieved across all files.
|
|
11
|
+
|
|
12
|
+
This skill writes test code to achieve the specified coverage target.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Inputs
|
|
17
|
+
|
|
18
|
+
| Input | Required | Description |
|
|
19
|
+
| ------------------- | -------- | ------------------------------------------------ |
|
|
20
|
+
| `target_coverage` | Yes | Minimum coverage percentage (e.g., 80, 90, 100) |
|
|
21
|
+
| `framework` | Optional | Testing framework (Jest or Pytest, auto-detected)|
|
|
22
|
+
| `specific_files` | Optional | Specific files to focus on |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
### Step 1: Detect Testing Framework
|
|
29
|
+
|
|
30
|
+
Identify the testing framework based on project files:
|
|
31
|
+
|
|
32
|
+
| Framework | Detection |
|
|
33
|
+
| --------- | --------------------------------------------- |
|
|
34
|
+
| Jest | `jest.config.js`, `package.json` with jest |
|
|
35
|
+
| Pytest | `pytest.ini`, `pyproject.toml`, `conftest.py` |
|
|
36
|
+
|
|
37
|
+
Load the appropriate patterns:
|
|
38
|
+
- Jest: `.cursor/rules/patterns/jest-patterns.mdc`
|
|
39
|
+
- Pytest: `.cursor/rules/patterns/pytest-patterns.mdc`
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### Step 2: Run Initial Coverage Analysis
|
|
44
|
+
|
|
45
|
+
Run the coverage command:
|
|
46
|
+
|
|
47
|
+
**Jest**:
|
|
48
|
+
```bash
|
|
49
|
+
npm run test -- --coverage
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Pytest**:
|
|
53
|
+
```bash
|
|
54
|
+
pytest --cov=src --cov-report=term-missing
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Parse the results to identify:
|
|
58
|
+
- Current coverage per file
|
|
59
|
+
- Files below target
|
|
60
|
+
- Uncovered lines/branches
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### Step 3: Create Work Queue
|
|
65
|
+
|
|
66
|
+
Sort files by coverage (lowest first):
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
## Coverage Work Queue
|
|
70
|
+
|
|
71
|
+
| File | Current | Target | Gap | Priority |
|
|
72
|
+
| --------------------------- | ------- | ------ | ---- | -------- |
|
|
73
|
+
| src/services/userService.ts | 45% | 80% | 35% | 1 |
|
|
74
|
+
| src/utils/validation.ts | 60% | 80% | 20% | 2 |
|
|
75
|
+
| src/components/Button.tsx | 75% | 80% | 5% | 3 |
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
### Step 4: For Each File Below Target
|
|
81
|
+
|
|
82
|
+
For each file in the work queue:
|
|
83
|
+
|
|
84
|
+
#### 4.1: Analyze Source File
|
|
85
|
+
|
|
86
|
+
1. Read the source file
|
|
87
|
+
2. Identify all functions/methods
|
|
88
|
+
3. Check existing tests (if any)
|
|
89
|
+
4. Identify uncovered code paths:
|
|
90
|
+
- Uncovered functions
|
|
91
|
+
- Uncovered branches (if/else, switch)
|
|
92
|
+
- Error handling paths
|
|
93
|
+
- Edge cases
|
|
94
|
+
|
|
95
|
+
#### 4.2: Write/Improve Tests
|
|
96
|
+
|
|
97
|
+
1. Create test file if missing
|
|
98
|
+
2. Add tests for uncovered lines
|
|
99
|
+
3. Follow testing patterns from patterns file
|
|
100
|
+
|
|
101
|
+
**Test File Naming**:
|
|
102
|
+
- Jest: `*.test.ts`, `*.spec.ts`
|
|
103
|
+
- Pytest: `test_*.py`, `*_test.py`
|
|
104
|
+
|
|
105
|
+
**Test Structure**:
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
// Jest example
|
|
109
|
+
describe('FunctionName', () => {
|
|
110
|
+
describe('when condition', () => {
|
|
111
|
+
it('should expected behavior', () => {
|
|
112
|
+
// Arrange
|
|
113
|
+
// Act
|
|
114
|
+
// Assert
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
# Pytest example
|
|
122
|
+
class TestFunctionName:
|
|
123
|
+
def test_when_condition_should_expected_behavior(self):
|
|
124
|
+
# Arrange
|
|
125
|
+
# Act
|
|
126
|
+
# Assert
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
#### 4.3: Verify File Coverage
|
|
130
|
+
|
|
131
|
+
After writing tests, run coverage for the specific file:
|
|
132
|
+
|
|
133
|
+
**Jest**:
|
|
134
|
+
```bash
|
|
135
|
+
npm run test -- --coverage --collectCoverageFrom="src/path/file.ts"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Pytest**:
|
|
139
|
+
```bash
|
|
140
|
+
pytest tests/test_file.py --cov=src/module --cov-report=term-missing
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**CRITICAL**: ALL metrics must meet target:
|
|
144
|
+
- Lines
|
|
145
|
+
- Statements
|
|
146
|
+
- Branches
|
|
147
|
+
- Functions
|
|
148
|
+
|
|
149
|
+
If not met, continue adding tests until all metrics pass.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### Step 5: Final Verification
|
|
154
|
+
|
|
155
|
+
After all files are processed, run full coverage:
|
|
156
|
+
|
|
157
|
+
**Jest**:
|
|
158
|
+
```bash
|
|
159
|
+
npm run test -- --coverage
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Pytest**:
|
|
163
|
+
```bash
|
|
164
|
+
pytest --cov=src --cov-report=term-missing
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Verify all files meet the target coverage.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Coverage Metrics Priority
|
|
172
|
+
|
|
173
|
+
1. **Lines**: Most important metric
|
|
174
|
+
2. **Branches**: Cover all conditional paths (if/else, ternary, switch)
|
|
175
|
+
3. **Functions**: Ensure all exported functions are tested
|
|
176
|
+
4. **Statements**: Usually follows lines coverage
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Test Writing Guidelines
|
|
181
|
+
|
|
182
|
+
### What to Test
|
|
183
|
+
|
|
184
|
+
| Priority | What to Test | Why |
|
|
185
|
+
| -------- | ------------------------------- | -------------------------------- |
|
|
186
|
+
| High | Public API / Exported functions | Contract with consumers |
|
|
187
|
+
| High | Error handling paths | Critical for reliability |
|
|
188
|
+
| High | Edge cases | Often source of bugs |
|
|
189
|
+
| Medium | Happy path scenarios | Basic functionality |
|
|
190
|
+
| Medium | Boundary conditions | Off-by-one errors |
|
|
191
|
+
| Low | Private helper functions | Tested via public API |
|
|
192
|
+
|
|
193
|
+
### Test Quality Checklist
|
|
194
|
+
|
|
195
|
+
- [ ] Tests are independent (no shared state)
|
|
196
|
+
- [ ] Tests have clear names describing behavior
|
|
197
|
+
- [ ] Tests follow AAA pattern (Arrange, Act, Assert)
|
|
198
|
+
- [ ] Mocks are minimal and focused
|
|
199
|
+
- [ ] Edge cases are covered
|
|
200
|
+
- [ ] Error scenarios are tested
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Handling Common Patterns
|
|
205
|
+
|
|
206
|
+
### Async Functions
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
it('should handle async operation', async () => {
|
|
210
|
+
const result = await asyncFunction();
|
|
211
|
+
expect(result).toBe(expected);
|
|
212
|
+
});
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Error Throwing
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
it('should throw error for invalid input', () => {
|
|
219
|
+
expect(() => functionWithValidation(null)).toThrow('Invalid input');
|
|
220
|
+
});
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Mocking Dependencies
|
|
224
|
+
|
|
225
|
+
```typescript
|
|
226
|
+
jest.mock('./dependency', () => ({
|
|
227
|
+
dependencyFunction: jest.fn().mockReturnValue('mocked'),
|
|
228
|
+
}));
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Output Format
|
|
234
|
+
|
|
235
|
+
Present progress after each file:
|
|
236
|
+
|
|
237
|
+
```markdown
|
|
238
|
+
## Test Progress: [file_path]
|
|
239
|
+
|
|
240
|
+
**Before**: 45% coverage
|
|
241
|
+
**After**: 82% coverage
|
|
242
|
+
|
|
243
|
+
**Tests Added**:
|
|
244
|
+
- test_when_valid_input_returns_result
|
|
245
|
+
- test_when_invalid_input_throws_error
|
|
246
|
+
- test_edge_case_empty_string
|
|
247
|
+
|
|
248
|
+
**Metrics**:
|
|
249
|
+
| Metric | Before | After | Target | Status |
|
|
250
|
+
| ---------- | ------ | ------ | ------ | ------ |
|
|
251
|
+
| Lines | 45% | 82% | 80% | Pass |
|
|
252
|
+
| Branches | 30% | 80% | 80% | Pass |
|
|
253
|
+
| Functions | 50% | 100% | 80% | Pass |
|
|
254
|
+
| Statements | 45% | 82% | 80% | Pass |
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Final Report
|
|
260
|
+
|
|
261
|
+
After completion, present summary:
|
|
262
|
+
|
|
263
|
+
```markdown
|
|
264
|
+
## Coverage Target Achieved!
|
|
265
|
+
|
|
266
|
+
**Target**: [X]%
|
|
267
|
+
**Final Coverage**: [Y]%
|
|
268
|
+
|
|
269
|
+
### Files Updated:
|
|
270
|
+
|
|
271
|
+
| File | Before | After |
|
|
272
|
+
| --------------------------- | ------ | ------ |
|
|
273
|
+
| src/services/userService.ts | 45% | 85% |
|
|
274
|
+
| src/utils/validation.ts | 60% | 92% |
|
|
275
|
+
|
|
276
|
+
### Tests Created/Updated:
|
|
277
|
+
|
|
278
|
+
- Created: X new test files
|
|
279
|
+
- Updated: Y existing test files
|
|
280
|
+
- Total tests added: Z
|
|
281
|
+
|
|
282
|
+
All metrics meet or exceed the target coverage.
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Related Files
|
|
288
|
+
|
|
289
|
+
| File | Purpose |
|
|
290
|
+
| ------------------------------------------- | ------------------------------- |
|
|
291
|
+
| `.cursor/rules/patterns/jest-patterns.mdc` | Jest testing patterns |
|
|
292
|
+
| `.cursor/rules/patterns/pytest-patterns.mdc`| Pytest testing patterns |
|
|
293
|
+
| `.cursor/rules/tools/jest-testing-tool.mdc` | Jest commands and utilities |
|
|
294
|
+
| `.cursor/rules/tools/pytest-testing-tool.mdc`| Pytest commands and utilities |
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Template for creating folder index files - copy and customize for each folder"
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Index Template
|
|
7
|
+
|
|
8
|
+
Use this template when creating `_index.mdc` files for each folder. Copy and customize the sections below.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Template
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
---
|
|
16
|
+
description: "Summary index for [FOLDER_NAME] - load this to see available references"
|
|
17
|
+
alwaysApply: false
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# [Folder Name] Index
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
24
|
+
Brief description of what this folder contains and when these rules/patterns are used.
|
|
25
|
+
|
|
26
|
+
**Total Files**: X files, ~Y lines
|
|
27
|
+
**Reference Codes**: [PREFIX]-1 through [PREFIX]-N
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Reference Codes
|
|
32
|
+
|
|
33
|
+
| Code | Description | Source | Lines |
|
|
34
|
+
| ----- | ------------------------------ | -------------- | ------------- |
|
|
35
|
+
| XXX-1 | [Brief description of section] | [filename.mdc] | [start]-[end] |
|
|
36
|
+
| XXX-2 | [Brief description of section] | [filename.mdc] | [start]-[end] |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## When to Expand
|
|
41
|
+
|
|
42
|
+
Use these guidelines to determine when to load full content:
|
|
43
|
+
|
|
44
|
+
| Code | Expand When |
|
|
45
|
+
| ----- | ------------------------------ |
|
|
46
|
+
| XXX-1 | [Specific use case or trigger] |
|
|
47
|
+
| XXX-2 | [Specific use case or trigger] |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Quick Reference
|
|
52
|
+
|
|
53
|
+
### [Category 1]
|
|
54
|
+
|
|
55
|
+
- **XXX-1**: [One-line summary]
|
|
56
|
+
- **XXX-2**: [One-line summary]
|
|
57
|
+
|
|
58
|
+
### [Category 2]
|
|
59
|
+
|
|
60
|
+
- **XXX-3**: [One-line summary]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Naming Conventions
|
|
66
|
+
|
|
67
|
+
### Reference Code Prefixes
|
|
68
|
+
|
|
69
|
+
| Prefix | Folder | Example |
|
|
70
|
+
| ------ | ---------- | -------------------- |
|
|
71
|
+
| COR- | core/ | COR-1, COR-2 |
|
|
72
|
+
| LNG- | languages/ | LNG-TS-1, LNG-PY-1 |
|
|
73
|
+
| PTN- | patterns/ | PTN-DIS-1, PTN-PLN-1 |
|
|
74
|
+
| SKL- | skills/ | SKL-DIS-1, SKL-PLN-1 |
|
|
75
|
+
| TLS- | tools/ | TLS-AUTH-1, TLS-AQ-1 |
|
|
76
|
+
|
|
77
|
+
### Sub-Category Codes
|
|
78
|
+
|
|
79
|
+
For folders with multiple files, use sub-categories:
|
|
80
|
+
|
|
81
|
+
| Pattern | Meaning | Example |
|
|
82
|
+
| ---------- | ------------------------------- | ------------------------- |
|
|
83
|
+
| LNG-TS-1 | Language: TypeScript, Section 1 | TypeScript best practices |
|
|
84
|
+
| LNG-PY-1 | Language: Python, Section 1 | Python best practices |
|
|
85
|
+
| PTN-DIS-1 | Pattern: Discovery, Section 1 | Discovery patterns |
|
|
86
|
+
| SKL-EXEC-1 | Skill: Execute, Section 1 | Execute plan workflow |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Section Identification Guidelines
|
|
91
|
+
|
|
92
|
+
When analyzing a file to create reference codes:
|
|
93
|
+
|
|
94
|
+
1. **Look for major headings** (## or ### level)
|
|
95
|
+
2. **Identify self-contained sections** that can stand alone
|
|
96
|
+
3. **Target 3-5 sections per file** (avoid over-fragmentation)
|
|
97
|
+
4. **Include complete context** in each section
|
|
98
|
+
|
|
99
|
+
### Good Section Boundaries
|
|
100
|
+
|
|
101
|
+
- Complete examples with explanation
|
|
102
|
+
- Full workflow steps
|
|
103
|
+
- Entire tables with headers
|
|
104
|
+
- Template blocks with instructions
|
|
105
|
+
|
|
106
|
+
### Bad Section Boundaries
|
|
107
|
+
|
|
108
|
+
- Partial code blocks
|
|
109
|
+
- Headers without content
|
|
110
|
+
- Single lines or small fragments
|
|
111
|
+
- Sections that reference other sections heavily
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Line Range Format
|
|
116
|
+
|
|
117
|
+
Use the format `start-end` for line ranges:
|
|
118
|
+
|
|
119
|
+
- `1-50` - Lines 1 through 50
|
|
120
|
+
- `100-150` - Lines 100 through 150
|
|
121
|
+
|
|
122
|
+
**Tips**:
|
|
123
|
+
|
|
124
|
+
- Include a few lines before/after for context
|
|
125
|
+
- Start at section headers
|
|
126
|
+
- End at the next section header minus 1
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Index of tool documentation with reference codes for on-demand expansion"
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tools Index
|
|
7
|
+
|
|
8
|
+
This index provides reference codes for all tool documentation. Load specific sections on-demand using the line ranges.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
| File | Lines | Description |
|
|
15
|
+
|------|-------|-------------|
|
|
16
|
+
| auth-pr-tool.mdc | 363 | PR authentication for GitHub/Azure DevOps |
|
|
17
|
+
| interactive-questions-tool.mdc | 338 | Interactive questions via Plan mode |
|
|
18
|
+
| jest-testing-tool.mdc | 97 | Jest test commands for JS/TS |
|
|
19
|
+
| plan-mode-tool.mdc | 230 | Plan mode switching for collaborative execution |
|
|
20
|
+
| pytest-testing-tool.mdc | 145 | Pytest commands for Python |
|
|
21
|
+
| reference-expansion-tool.mdc | 219 | Reference code expansion system |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Reference Codes
|
|
26
|
+
|
|
27
|
+
### TLS-AUTH: PR Authentication Tool
|
|
28
|
+
|
|
29
|
+
| Code | Lines | Description |
|
|
30
|
+
|------|-------|-------------|
|
|
31
|
+
| TLS-AUTH-1 | 1-41 | Purpose, usage, and environment configuration |
|
|
32
|
+
| TLS-AUTH-2 | 42-142 | Authentication workflow (detect, load, auth, verify, handle errors) |
|
|
33
|
+
| TLS-AUTH-3 | 144-198 | Authentication methods (GitHub CLI, Azure CLI, curl) |
|
|
34
|
+
| TLS-AUTH-4 | 199-224 | Allowed commands for GitHub and Azure DevOps |
|
|
35
|
+
| TLS-AUTH-5 | 225-250 | Security notes and required scopes |
|
|
36
|
+
| TLS-AUTH-6 | 251-363 | Usage examples and error handling |
|
|
37
|
+
|
|
38
|
+
### TLS-IQ: Interactive Questions Tool
|
|
39
|
+
|
|
40
|
+
| Code | Lines | Description |
|
|
41
|
+
|------|-------|-------------|
|
|
42
|
+
| TLS-IQ-1 | 1-38 | Purpose, usage, and critical instructions |
|
|
43
|
+
| TLS-IQ-2 | 40-82 | Step 1: Switch to Plan Mode |
|
|
44
|
+
| TLS-IQ-3 | 84-146 | Step 2: Ask Questions using AskQuestion tool |
|
|
45
|
+
| TLS-IQ-4 | 148-195 | Steps 3-5: Wait, Process, Return to Agent mode |
|
|
46
|
+
| TLS-IQ-5 | 197-228 | Complete workflow example |
|
|
47
|
+
| TLS-IQ-6 | 230-288 | When to use and question format guidelines |
|
|
48
|
+
| TLS-IQ-7 | 290-338 | Error handling and related tools |
|
|
49
|
+
|
|
50
|
+
### TLS-JEST: Jest Testing Tool
|
|
51
|
+
|
|
52
|
+
| Code | Lines | Description |
|
|
53
|
+
|------|-------|-------------|
|
|
54
|
+
| TLS-JEST-1 | 1-48 | Purpose, usage, and running tests |
|
|
55
|
+
| TLS-JEST-2 | 50-67 | Coverage commands |
|
|
56
|
+
| TLS-JEST-3 | 69-82 | Debugging tests |
|
|
57
|
+
| TLS-JEST-4 | 84-97 | CI/CD commands |
|
|
58
|
+
|
|
59
|
+
### TLS-PLN: Plan Mode Tool
|
|
60
|
+
|
|
61
|
+
| Code | Lines | Description |
|
|
62
|
+
|------|-------|-------------|
|
|
63
|
+
| TLS-PLN-1 | 1-68 | Purpose, usage, and how to switch |
|
|
64
|
+
| TLS-PLN-2 | 70-127 | Plan mode workflow (steps 1-5) |
|
|
65
|
+
| TLS-PLN-3 | 129-145 | When to use Plan mode |
|
|
66
|
+
| TLS-PLN-4 | 147-157 | Integration with Execute Plan command |
|
|
67
|
+
| TLS-PLN-5 | 159-192 | Benefits and error handling |
|
|
68
|
+
| TLS-PLN-6 | 194-230 | Complete workflow example |
|
|
69
|
+
|
|
70
|
+
### TLS-PYTEST: Pytest Testing Tool
|
|
71
|
+
|
|
72
|
+
| Code | Lines | Description |
|
|
73
|
+
|------|-------|-------------|
|
|
74
|
+
| TLS-PYTEST-1 | 1-55 | Purpose, usage, and running tests |
|
|
75
|
+
| TLS-PYTEST-2 | 57-76 | Coverage commands |
|
|
76
|
+
| TLS-PYTEST-3 | 78-99 | Debugging tests |
|
|
77
|
+
| TLS-PYTEST-4 | 101-124 | CI/CD commands |
|
|
78
|
+
| TLS-PYTEST-5 | 126-145 | Test selection |
|
|
79
|
+
|
|
80
|
+
### TLS-REF: Reference Expansion Tool
|
|
81
|
+
|
|
82
|
+
| Code | Lines | Description |
|
|
83
|
+
|------|-------|-------------|
|
|
84
|
+
| TLS-REF-1 | 1-38 | Purpose and reference code system |
|
|
85
|
+
| TLS-REF-2 | 40-74 | Expansion workflow (load, identify, expand, use) |
|
|
86
|
+
| TLS-REF-3 | 76-97 | When to expand vs when to skip |
|
|
87
|
+
| TLS-REF-4 | 99-140 | Examples (discovery and execute plan) |
|
|
88
|
+
| TLS-REF-5 | 142-170 | Maintenance guidelines |
|
|
89
|
+
| TLS-REF-6 | 172-219 | Index locations and troubleshooting |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## When to Expand
|
|
94
|
+
|
|
95
|
+
| Task | Codes to Expand |
|
|
96
|
+
|------|-----------------|
|
|
97
|
+
| Authenticating for PR review | TLS-AUTH-2, TLS-AUTH-3 |
|
|
98
|
+
| Asking interactive questions | TLS-IQ-1, TLS-IQ-2, TLS-IQ-3 |
|
|
99
|
+
| Running Jest tests | TLS-JEST-1, TLS-JEST-2 |
|
|
100
|
+
| Running pytest tests | TLS-PYTEST-1, TLS-PYTEST-2 |
|
|
101
|
+
| Switching to Plan mode | TLS-PLN-1, TLS-PLN-2 |
|
|
102
|
+
| Understanding reference system | TLS-REF-1, TLS-REF-2 |
|
|
103
|
+
| Maintaining index files | TLS-REF-5 |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Quick Reference
|
|
108
|
+
|
|
109
|
+
- **Need to authenticate?** Use TLS-AUTH-* codes
|
|
110
|
+
- **Need to ask questions?** Use TLS-IQ-* codes
|
|
111
|
+
- **Need to run JS/TS tests?** Use TLS-JEST-* codes
|
|
112
|
+
- **Need to run Python tests?** Use TLS-PYTEST-* codes
|
|
113
|
+
- **Need to switch modes?** Use TLS-PLN-* codes
|
|
114
|
+
- **Need to understand this system?** Use TLS-REF-* codes
|