@preapexis/pi-kit 1.0.0 → 1.0.7
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/.github/workflows/publish.yml +30 -30
- package/LICENSE +15 -15
- package/README.md +373 -370
- package/extensions/brand-ui.ts +107 -107
- package/extensions/sound-cues.ts +88 -88
- package/extensions/update.ts +245 -245
- package/extensions/usage-tracker.ts +154 -154
- package/package.json +6 -2
- package/prompts/init.md +98 -98
- package/settings.json +4 -4
- package/skills/component-implementation/SKILL.md +80 -80
- package/skills/frontend-onboarding/SKILL.md +76 -76
- package/skills/frontend-quality/SKILL.md +85 -85
- package/skills/safe-coding/SKILL.md +48 -48
- package/themes/latte-review.json +77 -77
- package/themes/neon-guardian.json +77 -77
- package/themes/safe-dark.json +75 -75
- package/themes/tokyo-midnight.json +77 -77
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: component-implementation
|
|
3
|
-
description: Builds or modifies frontend components using the project's existing component patterns, styling system, accessibility rules, and test conventions.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Component Implementation
|
|
9
|
-
|
|
10
|
-
Use this skill when creating or modifying frontend UI components.
|
|
11
|
-
|
|
12
|
-
Do not use this skill for backend-only changes, database work, deployment work, or general refactors unless they directly affect frontend components.
|
|
13
|
-
|
|
14
|
-
## Before Editing
|
|
15
|
-
|
|
16
|
-
Inspect existing nearby components to understand:
|
|
17
|
-
|
|
18
|
-
- naming conventions
|
|
19
|
-
- file layout
|
|
20
|
-
- props style
|
|
21
|
-
- styling approach
|
|
22
|
-
- accessibility patterns
|
|
23
|
-
- test style
|
|
24
|
-
- story/demo pattern, if any
|
|
25
|
-
|
|
26
|
-
If the component requirements are unclear, ask questions before editing.
|
|
27
|
-
|
|
28
|
-
## Component Rules
|
|
29
|
-
|
|
30
|
-
- Prefer small, focused components.
|
|
31
|
-
- Keep props clear and typed.
|
|
32
|
-
- Avoid unnecessary state.
|
|
33
|
-
- Prefer controlled inputs when the project already uses them.
|
|
34
|
-
- Reuse existing design-system components.
|
|
35
|
-
- Reuse existing icons, spacing, colors, and typography tokens.
|
|
36
|
-
- Do not add a new UI package unless explicitly asked.
|
|
37
|
-
- Avoid large rewrites of existing components.
|
|
38
|
-
- Match the project's existing component style.
|
|
39
|
-
|
|
40
|
-
## Accessibility Rules
|
|
41
|
-
|
|
42
|
-
Check:
|
|
43
|
-
|
|
44
|
-
- semantic HTML
|
|
45
|
-
- keyboard navigation
|
|
46
|
-
- visible focus states
|
|
47
|
-
- labels for inputs
|
|
48
|
-
- button vs link usage
|
|
49
|
-
- alt text for meaningful images
|
|
50
|
-
- ARIA only when necessary
|
|
51
|
-
- color contrast risks
|
|
52
|
-
|
|
53
|
-
## State Rules
|
|
54
|
-
|
|
55
|
-
- Keep local UI state local.
|
|
56
|
-
- Do not introduce global state unless needed.
|
|
57
|
-
- Avoid duplicating server state in local state.
|
|
58
|
-
- Preserve existing loading, error, and empty states.
|
|
59
|
-
|
|
60
|
-
## After Editing
|
|
61
|
-
|
|
62
|
-
Run the narrowest relevant command if available:
|
|
63
|
-
|
|
64
|
-
- component test
|
|
65
|
-
- unit test
|
|
66
|
-
- typecheck
|
|
67
|
-
- lint
|
|
68
|
-
- storybook check
|
|
69
|
-
|
|
70
|
-
If checks are not available or cannot run, explain why.
|
|
71
|
-
|
|
72
|
-
## Output
|
|
73
|
-
|
|
74
|
-
Explain:
|
|
75
|
-
|
|
76
|
-
1. What component changed
|
|
77
|
-
2. Why the approach matches existing patterns
|
|
78
|
-
3. Accessibility considerations
|
|
79
|
-
4. Tests or checks run
|
|
80
|
-
5. Any remaining risks
|
|
1
|
+
---
|
|
2
|
+
name: component-implementation
|
|
3
|
+
description: Builds or modifies frontend components using the project's existing component patterns, styling system, accessibility rules, and test conventions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Component Implementation
|
|
9
|
+
|
|
10
|
+
Use this skill when creating or modifying frontend UI components.
|
|
11
|
+
|
|
12
|
+
Do not use this skill for backend-only changes, database work, deployment work, or general refactors unless they directly affect frontend components.
|
|
13
|
+
|
|
14
|
+
## Before Editing
|
|
15
|
+
|
|
16
|
+
Inspect existing nearby components to understand:
|
|
17
|
+
|
|
18
|
+
- naming conventions
|
|
19
|
+
- file layout
|
|
20
|
+
- props style
|
|
21
|
+
- styling approach
|
|
22
|
+
- accessibility patterns
|
|
23
|
+
- test style
|
|
24
|
+
- story/demo pattern, if any
|
|
25
|
+
|
|
26
|
+
If the component requirements are unclear, ask questions before editing.
|
|
27
|
+
|
|
28
|
+
## Component Rules
|
|
29
|
+
|
|
30
|
+
- Prefer small, focused components.
|
|
31
|
+
- Keep props clear and typed.
|
|
32
|
+
- Avoid unnecessary state.
|
|
33
|
+
- Prefer controlled inputs when the project already uses them.
|
|
34
|
+
- Reuse existing design-system components.
|
|
35
|
+
- Reuse existing icons, spacing, colors, and typography tokens.
|
|
36
|
+
- Do not add a new UI package unless explicitly asked.
|
|
37
|
+
- Avoid large rewrites of existing components.
|
|
38
|
+
- Match the project's existing component style.
|
|
39
|
+
|
|
40
|
+
## Accessibility Rules
|
|
41
|
+
|
|
42
|
+
Check:
|
|
43
|
+
|
|
44
|
+
- semantic HTML
|
|
45
|
+
- keyboard navigation
|
|
46
|
+
- visible focus states
|
|
47
|
+
- labels for inputs
|
|
48
|
+
- button vs link usage
|
|
49
|
+
- alt text for meaningful images
|
|
50
|
+
- ARIA only when necessary
|
|
51
|
+
- color contrast risks
|
|
52
|
+
|
|
53
|
+
## State Rules
|
|
54
|
+
|
|
55
|
+
- Keep local UI state local.
|
|
56
|
+
- Do not introduce global state unless needed.
|
|
57
|
+
- Avoid duplicating server state in local state.
|
|
58
|
+
- Preserve existing loading, error, and empty states.
|
|
59
|
+
|
|
60
|
+
## After Editing
|
|
61
|
+
|
|
62
|
+
Run the narrowest relevant command if available:
|
|
63
|
+
|
|
64
|
+
- component test
|
|
65
|
+
- unit test
|
|
66
|
+
- typecheck
|
|
67
|
+
- lint
|
|
68
|
+
- storybook check
|
|
69
|
+
|
|
70
|
+
If checks are not available or cannot run, explain why.
|
|
71
|
+
|
|
72
|
+
## Output
|
|
73
|
+
|
|
74
|
+
Explain:
|
|
75
|
+
|
|
76
|
+
1. What component changed
|
|
77
|
+
2. Why the approach matches existing patterns
|
|
78
|
+
3. Accessibility considerations
|
|
79
|
+
4. Tests or checks run
|
|
80
|
+
5. Any remaining risks
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: frontend-onboarding
|
|
3
|
-
description: Understands the frontend app structure, framework, routing, build tools, styling system, and test setup. Use when starting work in an unfamiliar frontend repo or feature area.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Frontend Onboarding
|
|
9
|
-
|
|
10
|
-
Use this skill before making frontend changes in an unfamiliar codebase.
|
|
11
|
-
|
|
12
|
-
This skill is read-only. Do not edit files during onboarding unless explicitly asked.
|
|
13
|
-
|
|
14
|
-
## Inspect First
|
|
15
|
-
|
|
16
|
-
Read the most relevant files:
|
|
17
|
-
|
|
18
|
-
- README.md
|
|
19
|
-
- AGENTS.md
|
|
20
|
-
- package.json
|
|
21
|
-
- vite.config._ / next.config._ / webpack.config._ / astro.config._ / svelte.config.\*
|
|
22
|
-
- tsconfig.json
|
|
23
|
-
- eslint.config._ / .eslintrc._
|
|
24
|
-
- prettier config
|
|
25
|
-
- tailwind.config.\* / theme files / design-system files
|
|
26
|
-
- src/ or app/
|
|
27
|
-
- routes/pages directory
|
|
28
|
-
- components directory
|
|
29
|
-
- tests directory
|
|
30
|
-
- storybook config, if present
|
|
31
|
-
|
|
32
|
-
## Identify
|
|
33
|
-
|
|
34
|
-
Find and summarize:
|
|
35
|
-
|
|
36
|
-
1. Frontend framework
|
|
37
|
-
2. Routing approach
|
|
38
|
-
3. State management approach
|
|
39
|
-
4. Styling approach
|
|
40
|
-
5. Component organization
|
|
41
|
-
6. API/data fetching pattern
|
|
42
|
-
7. Form handling pattern
|
|
43
|
-
8. Test setup
|
|
44
|
-
9. Build/lint/typecheck commands
|
|
45
|
-
10. Important files that should be edited carefully
|
|
46
|
-
|
|
47
|
-
## Safety Rules
|
|
48
|
-
|
|
49
|
-
- Do not change global styles.
|
|
50
|
-
- Do not introduce new UI libraries.
|
|
51
|
-
- Do not change routing, auth, or data-fetching behavior casually.
|
|
52
|
-
- Do not edit generated files or build output.
|
|
53
|
-
- Prefer existing patterns over new abstractions.
|
|
54
|
-
- If the frontend structure is unclear, ask questions before suggesting changes.
|
|
55
|
-
|
|
56
|
-
## Output
|
|
57
|
-
|
|
58
|
-
Return:
|
|
59
|
-
|
|
60
|
-
# Frontend Summary
|
|
61
|
-
|
|
62
|
-
# App Structure
|
|
63
|
-
|
|
64
|
-
# Styling System
|
|
65
|
-
|
|
66
|
-
# State and Data Flow
|
|
67
|
-
|
|
68
|
-
# Forms and Validation
|
|
69
|
-
|
|
70
|
-
# Test Commands
|
|
71
|
-
|
|
72
|
-
# Risks and Careful Areas
|
|
73
|
-
|
|
74
|
-
# Suggested Frontend Agent Rules
|
|
75
|
-
|
|
76
|
-
# Open Questions
|
|
1
|
+
---
|
|
2
|
+
name: frontend-onboarding
|
|
3
|
+
description: Understands the frontend app structure, framework, routing, build tools, styling system, and test setup. Use when starting work in an unfamiliar frontend repo or feature area.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Frontend Onboarding
|
|
9
|
+
|
|
10
|
+
Use this skill before making frontend changes in an unfamiliar codebase.
|
|
11
|
+
|
|
12
|
+
This skill is read-only. Do not edit files during onboarding unless explicitly asked.
|
|
13
|
+
|
|
14
|
+
## Inspect First
|
|
15
|
+
|
|
16
|
+
Read the most relevant files:
|
|
17
|
+
|
|
18
|
+
- README.md
|
|
19
|
+
- AGENTS.md
|
|
20
|
+
- package.json
|
|
21
|
+
- vite.config._ / next.config._ / webpack.config._ / astro.config._ / svelte.config.\*
|
|
22
|
+
- tsconfig.json
|
|
23
|
+
- eslint.config._ / .eslintrc._
|
|
24
|
+
- prettier config
|
|
25
|
+
- tailwind.config.\* / theme files / design-system files
|
|
26
|
+
- src/ or app/
|
|
27
|
+
- routes/pages directory
|
|
28
|
+
- components directory
|
|
29
|
+
- tests directory
|
|
30
|
+
- storybook config, if present
|
|
31
|
+
|
|
32
|
+
## Identify
|
|
33
|
+
|
|
34
|
+
Find and summarize:
|
|
35
|
+
|
|
36
|
+
1. Frontend framework
|
|
37
|
+
2. Routing approach
|
|
38
|
+
3. State management approach
|
|
39
|
+
4. Styling approach
|
|
40
|
+
5. Component organization
|
|
41
|
+
6. API/data fetching pattern
|
|
42
|
+
7. Form handling pattern
|
|
43
|
+
8. Test setup
|
|
44
|
+
9. Build/lint/typecheck commands
|
|
45
|
+
10. Important files that should be edited carefully
|
|
46
|
+
|
|
47
|
+
## Safety Rules
|
|
48
|
+
|
|
49
|
+
- Do not change global styles.
|
|
50
|
+
- Do not introduce new UI libraries.
|
|
51
|
+
- Do not change routing, auth, or data-fetching behavior casually.
|
|
52
|
+
- Do not edit generated files or build output.
|
|
53
|
+
- Prefer existing patterns over new abstractions.
|
|
54
|
+
- If the frontend structure is unclear, ask questions before suggesting changes.
|
|
55
|
+
|
|
56
|
+
## Output
|
|
57
|
+
|
|
58
|
+
Return:
|
|
59
|
+
|
|
60
|
+
# Frontend Summary
|
|
61
|
+
|
|
62
|
+
# App Structure
|
|
63
|
+
|
|
64
|
+
# Styling System
|
|
65
|
+
|
|
66
|
+
# State and Data Flow
|
|
67
|
+
|
|
68
|
+
# Forms and Validation
|
|
69
|
+
|
|
70
|
+
# Test Commands
|
|
71
|
+
|
|
72
|
+
# Risks and Careful Areas
|
|
73
|
+
|
|
74
|
+
# Suggested Frontend Agent Rules
|
|
75
|
+
|
|
76
|
+
# Open Questions
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: frontend-quality
|
|
3
|
-
description: Reviews frontend code for accessibility, responsiveness, performance, UX states, browser behavior, and maintainability.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Frontend Quality Review
|
|
9
|
-
|
|
10
|
-
Use this skill when reviewing or improving frontend quality.
|
|
11
|
-
|
|
12
|
-
Do not edit files unless explicitly asked.
|
|
13
|
-
|
|
14
|
-
## Review Areas
|
|
15
|
-
|
|
16
|
-
Check for:
|
|
17
|
-
|
|
18
|
-
- broken UI states
|
|
19
|
-
- missing loading states
|
|
20
|
-
- missing error states
|
|
21
|
-
- missing empty states
|
|
22
|
-
- poor responsive behavior
|
|
23
|
-
- keyboard accessibility issues
|
|
24
|
-
- focus management issues
|
|
25
|
-
- incorrect semantic HTML
|
|
26
|
-
- unnecessary re-renders
|
|
27
|
-
- expensive rendering logic
|
|
28
|
-
- unstable keys in lists
|
|
29
|
-
- hydration issues
|
|
30
|
-
- client/server boundary mistakes
|
|
31
|
-
- inconsistent styling
|
|
32
|
-
- duplicated UI logic
|
|
33
|
-
- missing tests
|
|
34
|
-
|
|
35
|
-
## Accessibility Checklist
|
|
36
|
-
|
|
37
|
-
Verify:
|
|
38
|
-
|
|
39
|
-
- interactive elements are keyboard reachable
|
|
40
|
-
- form fields have labels
|
|
41
|
-
- modals/dialogs manage focus correctly
|
|
42
|
-
- buttons are buttons and links are links
|
|
43
|
-
- images have appropriate alt text
|
|
44
|
-
- errors are announced or clearly visible
|
|
45
|
-
- focus states are not removed
|
|
46
|
-
- ARIA is not used incorrectly
|
|
47
|
-
|
|
48
|
-
## Performance Checklist
|
|
49
|
-
|
|
50
|
-
Look for:
|
|
51
|
-
|
|
52
|
-
- large unnecessary client bundles
|
|
53
|
-
- avoidable client components
|
|
54
|
-
- repeated expensive computations
|
|
55
|
-
- unnecessary effects
|
|
56
|
-
- unnecessary global state
|
|
57
|
-
- unoptimized images
|
|
58
|
-
- layout shift risks
|
|
59
|
-
- over-fetching data
|
|
60
|
-
|
|
61
|
-
## Rules
|
|
62
|
-
|
|
63
|
-
- Prefer specific findings with file paths.
|
|
64
|
-
- Do not report generic advice as a finding.
|
|
65
|
-
- If unsure, mark it as a question.
|
|
66
|
-
- Prioritize user-visible issues first.
|
|
67
|
-
- Suggest safe, small follow-up fixes.
|
|
68
|
-
|
|
69
|
-
## Output
|
|
70
|
-
|
|
71
|
-
Return:
|
|
72
|
-
|
|
73
|
-
# Critical Issues
|
|
74
|
-
|
|
75
|
-
# Recommended Fixes
|
|
76
|
-
|
|
77
|
-
# Accessibility Notes
|
|
78
|
-
|
|
79
|
-
# Performance Notes
|
|
80
|
-
|
|
81
|
-
# Tests to Add
|
|
82
|
-
|
|
83
|
-
# Safe Follow-Up Changes
|
|
84
|
-
|
|
85
|
-
# Open Questions
|
|
1
|
+
---
|
|
2
|
+
name: frontend-quality
|
|
3
|
+
description: Reviews frontend code for accessibility, responsiveness, performance, UX states, browser behavior, and maintainability.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Frontend Quality Review
|
|
9
|
+
|
|
10
|
+
Use this skill when reviewing or improving frontend quality.
|
|
11
|
+
|
|
12
|
+
Do not edit files unless explicitly asked.
|
|
13
|
+
|
|
14
|
+
## Review Areas
|
|
15
|
+
|
|
16
|
+
Check for:
|
|
17
|
+
|
|
18
|
+
- broken UI states
|
|
19
|
+
- missing loading states
|
|
20
|
+
- missing error states
|
|
21
|
+
- missing empty states
|
|
22
|
+
- poor responsive behavior
|
|
23
|
+
- keyboard accessibility issues
|
|
24
|
+
- focus management issues
|
|
25
|
+
- incorrect semantic HTML
|
|
26
|
+
- unnecessary re-renders
|
|
27
|
+
- expensive rendering logic
|
|
28
|
+
- unstable keys in lists
|
|
29
|
+
- hydration issues
|
|
30
|
+
- client/server boundary mistakes
|
|
31
|
+
- inconsistent styling
|
|
32
|
+
- duplicated UI logic
|
|
33
|
+
- missing tests
|
|
34
|
+
|
|
35
|
+
## Accessibility Checklist
|
|
36
|
+
|
|
37
|
+
Verify:
|
|
38
|
+
|
|
39
|
+
- interactive elements are keyboard reachable
|
|
40
|
+
- form fields have labels
|
|
41
|
+
- modals/dialogs manage focus correctly
|
|
42
|
+
- buttons are buttons and links are links
|
|
43
|
+
- images have appropriate alt text
|
|
44
|
+
- errors are announced or clearly visible
|
|
45
|
+
- focus states are not removed
|
|
46
|
+
- ARIA is not used incorrectly
|
|
47
|
+
|
|
48
|
+
## Performance Checklist
|
|
49
|
+
|
|
50
|
+
Look for:
|
|
51
|
+
|
|
52
|
+
- large unnecessary client bundles
|
|
53
|
+
- avoidable client components
|
|
54
|
+
- repeated expensive computations
|
|
55
|
+
- unnecessary effects
|
|
56
|
+
- unnecessary global state
|
|
57
|
+
- unoptimized images
|
|
58
|
+
- layout shift risks
|
|
59
|
+
- over-fetching data
|
|
60
|
+
|
|
61
|
+
## Rules
|
|
62
|
+
|
|
63
|
+
- Prefer specific findings with file paths.
|
|
64
|
+
- Do not report generic advice as a finding.
|
|
65
|
+
- If unsure, mark it as a question.
|
|
66
|
+
- Prioritize user-visible issues first.
|
|
67
|
+
- Suggest safe, small follow-up fixes.
|
|
68
|
+
|
|
69
|
+
## Output
|
|
70
|
+
|
|
71
|
+
Return:
|
|
72
|
+
|
|
73
|
+
# Critical Issues
|
|
74
|
+
|
|
75
|
+
# Recommended Fixes
|
|
76
|
+
|
|
77
|
+
# Accessibility Notes
|
|
78
|
+
|
|
79
|
+
# Performance Notes
|
|
80
|
+
|
|
81
|
+
# Tests to Add
|
|
82
|
+
|
|
83
|
+
# Safe Follow-Up Changes
|
|
84
|
+
|
|
85
|
+
# Open Questions
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: safe-coding
|
|
3
|
-
description: Applies safe, reviewable coding practices when modifying any file. Enforces small diffs, pre-read, no secrets, no lockfiles, and post-edit verification.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Safe Coding
|
|
9
|
-
|
|
10
|
-
Use this skill when modifying code.
|
|
11
|
-
|
|
12
|
-
## Before Editing
|
|
13
|
-
|
|
14
|
-
- Read the file or files you plan to change before making edits.
|
|
15
|
-
- Understand the existing patterns, naming conventions, and structure.
|
|
16
|
-
- Identify related files that may be affected by the change.
|
|
17
|
-
- If the task is unclear, ask questions before editing.
|
|
18
|
-
|
|
19
|
-
## Rules
|
|
20
|
-
|
|
21
|
-
- Make small, focused, reviewable changes.
|
|
22
|
-
- Preserve existing behavior unless explicitly asked to change it.
|
|
23
|
-
- Do not edit secrets, env files, lockfiles, build output, coverage reports, or `.git` internals.
|
|
24
|
-
- Prefer targeted edits over full rewrites.
|
|
25
|
-
- Do not install packages, delete files, or rewrite history without clear user approval.
|
|
26
|
-
- Prefer additive changes; avoid destructive updates.
|
|
27
|
-
- Explain risky or irreversible operations before executing them.
|
|
28
|
-
- Match the project’s existing style and conventions.
|
|
29
|
-
|
|
30
|
-
## After Editing
|
|
31
|
-
|
|
32
|
-
Run the narrowest relevant verification command if available:
|
|
33
|
-
|
|
34
|
-
- unit or component test
|
|
35
|
-
- typecheck
|
|
36
|
-
- lint
|
|
37
|
-
- integration test, if applicable
|
|
38
|
-
|
|
39
|
-
If verification cannot be run, explain why.
|
|
40
|
-
|
|
41
|
-
## Output
|
|
42
|
-
|
|
43
|
-
Explain:
|
|
44
|
-
|
|
45
|
-
1. What changed and why
|
|
46
|
-
2. How existing behavior is preserved
|
|
47
|
-
3. Any risks or follow-up actions needed
|
|
48
|
-
4. Verification command run and its result
|
|
1
|
+
---
|
|
2
|
+
name: safe-coding
|
|
3
|
+
description: Applies safe, reviewable coding practices when modifying any file. Enforces small diffs, pre-read, no secrets, no lockfiles, and post-edit verification.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Safe Coding
|
|
9
|
+
|
|
10
|
+
Use this skill when modifying code.
|
|
11
|
+
|
|
12
|
+
## Before Editing
|
|
13
|
+
|
|
14
|
+
- Read the file or files you plan to change before making edits.
|
|
15
|
+
- Understand the existing patterns, naming conventions, and structure.
|
|
16
|
+
- Identify related files that may be affected by the change.
|
|
17
|
+
- If the task is unclear, ask questions before editing.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- Make small, focused, reviewable changes.
|
|
22
|
+
- Preserve existing behavior unless explicitly asked to change it.
|
|
23
|
+
- Do not edit secrets, env files, lockfiles, build output, coverage reports, or `.git` internals.
|
|
24
|
+
- Prefer targeted edits over full rewrites.
|
|
25
|
+
- Do not install packages, delete files, or rewrite history without clear user approval.
|
|
26
|
+
- Prefer additive changes; avoid destructive updates.
|
|
27
|
+
- Explain risky or irreversible operations before executing them.
|
|
28
|
+
- Match the project’s existing style and conventions.
|
|
29
|
+
|
|
30
|
+
## After Editing
|
|
31
|
+
|
|
32
|
+
Run the narrowest relevant verification command if available:
|
|
33
|
+
|
|
34
|
+
- unit or component test
|
|
35
|
+
- typecheck
|
|
36
|
+
- lint
|
|
37
|
+
- integration test, if applicable
|
|
38
|
+
|
|
39
|
+
If verification cannot be run, explain why.
|
|
40
|
+
|
|
41
|
+
## Output
|
|
42
|
+
|
|
43
|
+
Explain:
|
|
44
|
+
|
|
45
|
+
1. What changed and why
|
|
46
|
+
2. How existing behavior is preserved
|
|
47
|
+
3. Any risks or follow-up actions needed
|
|
48
|
+
4. Verification command run and its result
|