agent-manifesto-kit 0.0.0-development → 1.1.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/LICENSE +21 -21
- package/README.md +159 -95
- package/collection/NOTICE.md +36 -36
- package/collection/agents/code-reviewer.md +103 -103
- package/collection/agents/docs-manager.md +127 -127
- package/collection/bundles/kit-adopt/README.md +36 -36
- package/collection/bundles/kit-adopt/conventions/recommended-companions.md +43 -43
- package/collection/bundles/kit-adopt/pipelines/kit-adopt.md +52 -52
- package/collection/bundles/kit-adopt/skills/kit-adopt/SKILL.md +72 -72
- package/collection/bundles/qa-automation/README.md +48 -0
- package/collection/bundles/qa-automation/RECOMMENDS.md +19 -0
- package/collection/bundles/qa-automation/agents/qa-explorer.md +55 -0
- package/collection/bundles/qa-automation/agents/qa-test-reviewer.md +71 -0
- package/collection/bundles/qa-automation/conventions/qa-verification.md +50 -0
- package/collection/bundles/qa-automation/pipelines/qa-test-debug.md +66 -0
- package/collection/bundles/qa-automation/pipelines/qa-test-from-spec.md +65 -0
- package/collection/bundles/qa-automation/skills/qa-playwright-cli/SKILL.md +83 -0
- package/collection/bundles/qa-automation/skills/qa-test-debugger/SKILL.md +60 -0
- package/collection/bundles/qa-automation/skills/qa-test-writer/SKILL.md +60 -0
- package/collection/bundles/sdd/README.md +50 -50
- package/collection/bundles/sdd/RECOMMENDS.md +21 -21
- package/collection/bundles/sdd/agents/sdd-gap-analyzer.md +79 -79
- package/collection/bundles/sdd/agents/sdd-spec-reviewer.md +75 -75
- package/collection/bundles/sdd/conventions/sdd-doc-set.md +136 -136
- package/collection/bundles/sdd/pipelines/sdd-adopt.md +60 -60
- package/collection/bundles/sdd/pipelines/sdd-bootstrap.md +60 -60
- package/collection/bundles/sdd/skills/sdd-doc-author/SKILL.md +69 -69
- package/collection/bundles/sdd/skills/sdd-feature-author/SKILL.md +71 -71
- package/collection/bundles/sdd/skills/sdd-index-sync/SKILL.md +61 -61
- package/collection/bundles/sdd/templates/docs/INDEX.md +35 -35
- package/collection/bundles/sdd/templates/docs/api.md +23 -23
- package/collection/bundles/sdd/templates/docs/architecture.md +42 -42
- package/collection/bundles/sdd/templates/docs/db.md +22 -22
- package/collection/bundles/sdd/templates/docs/decisions/ADR-template.md +24 -24
- package/collection/bundles/sdd/templates/docs/design.md +43 -43
- package/collection/bundles/sdd/templates/docs/idea.md +46 -46
- package/collection/bundles/sdd/templates/docs/operations.md +28 -28
- package/collection/bundles/sdd/templates/docs/roadmap.md +26 -26
- package/collection/bundles/sdd/templates/docs/security.md +24 -24
- package/collection/bundles/sdd/templates/docs/testing.md +34 -34
- package/collection/bundles/sdd/templates/features/F000_template/requirements.md +38 -38
- package/collection/bundles/sdd/templates/features/F000_template/scenarios.md +26 -26
- package/collection/bundles/sdd/templates/features/F000_template/tasks.md +11 -11
- package/collection/skills/brainstorm/SKILL.md +46 -46
- package/collection/skills/business-analyst/SKILL.md +58 -58
- package/collection/skills/documentation-maintenance/SKILL.md +60 -60
- package/collection/skills/explain-code/SKILL.md +81 -81
- package/collection/skills/frontend-audit/SKILL.md +135 -135
- package/collection/skills/frontend-impeccable-design/SKILL.md +135 -135
- package/collection/skills/frontend-impeccable-polish/SKILL.md +118 -118
- package/collection/skills/implement-feature/SKILL.md +99 -99
- package/collection/skills/memory-management/SKILL.md +75 -75
- package/collection/skills/meta-tags-optimizer/SKILL.md +73 -73
- package/collection/skills/pencil-design/SKILL.md +83 -83
- package/collection/skills/playwright-cli/SKILL.md +104 -104
- package/collection/skills/prepare-release-notes/SKILL.md +109 -109
- package/collection/skills/refactor-code/SKILL.md +104 -104
- package/collection/skills/review-code/SKILL.md +98 -98
- package/collection/skills/schema-markup-generator/SKILL.md +80 -80
- package/collection/skills/task-complete/SKILL.md +79 -79
- package/collection/skills/task-discovery/SKILL.md +69 -69
- package/collection/skills/task-validation/SKILL.md +71 -71
- package/collection/skills/test-review/SKILL.md +72 -72
- package/collection/skills/test-writer/SKILL.md +78 -78
- package/collection/skills/work-with-git/SKILL.md +154 -154
- package/dist/cli.js +31 -22
- package/dist/commands/adopt.js +240 -40
- package/dist/providers.js +3 -6
- package/package.json +48 -49
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: prepare-release-notes
|
|
3
|
-
description: Generates structured release notes by curating commits since the last release. Maintains the project's changelog file as the authoritative release record.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Scope
|
|
7
|
-
|
|
8
|
-
- Generate a structured release entry for the project's changelog file (commonly `CHANGES.md` or `CHANGELOG.md`) covering commits since the last release tag or version heading.
|
|
9
|
-
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
Before generating or editing release notes, confirm:
|
|
13
|
-
- Git is installed and available; verify with `git --version` and use <https://git-scm.com/docs> for command semantics.
|
|
14
|
-
- The target is a Git repository; verify with `git rev-parse --is-inside-work-tree`.
|
|
15
|
-
- The changelog file is identified and readable, or the user has approved the file to create.
|
|
16
|
-
- The release range has a clear baseline. Use `HEAD` as the upper bound unless the user provides another commit or ref.
|
|
17
|
-
- The target version and release date are known from user input, project release metadata, or existing changelog pattern.
|
|
18
|
-
- The commits in range can be inspected closely enough to distinguish product behavior from docs, tests, tooling, automation, and release-prep work.
|
|
19
|
-
|
|
20
|
-
## Safety Constraints
|
|
21
|
-
|
|
22
|
-
- Do not create, move, delete, or rewrite git tags.
|
|
23
|
-
- Do not run release, publish, version bump, commit, or push commands.
|
|
24
|
-
- Do not include uncommitted work unless the user explicitly requested draft notes from the working tree.
|
|
25
|
-
- Do not invent user-facing impact from commit messages alone when the diff does not support it.
|
|
26
|
-
- Do not include secrets, credentials, private URLs, or internal incident details in release notes.
|
|
27
|
-
|
|
28
|
-
## Stop Conditions
|
|
29
|
-
|
|
30
|
-
- Stop and report blocked when no git history exists; ask for the release range or commit to use as the baseline in `Blockers`.
|
|
31
|
-
- Stop and report blocked when no git tags exist and no version heading is present in the changelog; ask for the version number and baseline.
|
|
32
|
-
- Stop and report blocked when no changelog file exists (no `CHANGES.md`, `CHANGELOG.md`, or equivalent); ask for the filename and location.
|
|
33
|
-
- Stop and report blocked when git tags and changelog version headings disagree about the latest release baseline.
|
|
34
|
-
- Stop and report blocked when multiple changelog files appear authoritative.
|
|
35
|
-
- Stop and report blocked when the target version or release date cannot be determined.
|
|
36
|
-
- Stop and report blocked when no eligible product changes remain after filtering commits.
|
|
37
|
-
- Stop and report blocked when an entry for the target version already exists and replacing or merging it was not explicitly approved.
|
|
38
|
-
|
|
39
|
-
## Procedure
|
|
40
|
-
|
|
41
|
-
1. Start from the latest git tag or the most recent version heading in the changelog file.
|
|
42
|
-
2. Inspect commits in range; include only those that modify meaningful product behavior.
|
|
43
|
-
3. Exclude documentation-only commits, test-only commits, tooling and automation commits, and release preparation commits.
|
|
44
|
-
4. Include mixed commits when they contain relevant product changes alongside excluded content.
|
|
45
|
-
5. Use `Internal` only for release-relevant internal changes that affect shipped behavior, compatibility, security posture, or operator-visible release behavior. Otherwise, exclude dependency, refactor, and build-only commits.
|
|
46
|
-
6. Group changes into `Added`, `Changed`, `Fixed`, `Internal`; omit empty categories.
|
|
47
|
-
7. Write the entry per the Entry Format below and place it at the top of the changelog file.
|
|
48
|
-
|
|
49
|
-
## Content Standards
|
|
50
|
-
|
|
51
|
-
- Use concise, user-facing language.
|
|
52
|
-
- Avoid raw commit hashes, author attributions, and internal implementation details.
|
|
53
|
-
- Categories:
|
|
54
|
-
- `Added` — new features or capabilities
|
|
55
|
-
- `Changed` — changed behavior in existing features
|
|
56
|
-
- `Fixed` — bug fixes
|
|
57
|
-
- `Internal` — release-relevant dependency, refactor, or build changes that affect shipped behavior, compatibility, security posture, or operator-visible release behavior
|
|
58
|
-
|
|
59
|
-
## Entry Format
|
|
60
|
-
|
|
61
|
-
```markdown
|
|
62
|
-
## [version] - YYYY-MM-DD
|
|
63
|
-
|
|
64
|
-
### Added
|
|
65
|
-
- ...
|
|
66
|
-
|
|
67
|
-
### Changed
|
|
68
|
-
- ...
|
|
69
|
-
|
|
70
|
-
### Fixed
|
|
71
|
-
- ...
|
|
72
|
-
|
|
73
|
-
### Internal
|
|
74
|
-
- ...
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Place the newest entry at the top of the changelog file. Omit empty categories, including `Internal`.
|
|
78
|
-
|
|
79
|
-
## Verification
|
|
80
|
-
|
|
81
|
-
Before reporting completion, verify:
|
|
82
|
-
- The newest non-empty release entry is at the top of the changelog.
|
|
83
|
-
- The version, date, and release range match the intended release.
|
|
84
|
-
- Every included bullet is supported by an eligible commit or diff.
|
|
85
|
-
- Empty categories are omitted.
|
|
86
|
-
- Existing changelog entries were not reordered or rewritten unintentionally.
|
|
87
|
-
|
|
88
|
-
Completion requires a non-empty changelog entry for the target version.
|
|
89
|
-
|
|
90
|
-
## Output Contract
|
|
91
|
-
|
|
92
|
-
Emit:
|
|
93
|
-
|
|
94
|
-
`Skill: prepare-release-notes - output below`
|
|
95
|
-
|
|
96
|
-
Then include:
|
|
97
|
-
|
|
98
|
-
| Field | Content |
|
|
99
|
-
| --- | --- |
|
|
100
|
-
| Status | `completed`, `skipped`, or `blocked` |
|
|
101
|
-
| Changelog File | File updated, proposed, or `none` |
|
|
102
|
-
| Release | Version and date, or `unknown` |
|
|
103
|
-
| Range | Baseline and upper bound used |
|
|
104
|
-
| Changed Files | Changelog file changed, or `none` |
|
|
105
|
-
| Assumptions | Inferences used, or `none` |
|
|
106
|
-
| Excluded Commits | Count or short reason summary |
|
|
107
|
-
| Blockers | Remaining blockers, or `none` |
|
|
108
|
-
|
|
109
|
-
Then include the formatted changelog entry per the Entry Format above.
|
|
1
|
+
---
|
|
2
|
+
name: prepare-release-notes
|
|
3
|
+
description: Generates structured release notes by curating commits since the last release. Maintains the project's changelog file as the authoritative release record.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
|
|
8
|
+
- Generate a structured release entry for the project's changelog file (commonly `CHANGES.md` or `CHANGELOG.md`) covering commits since the last release tag or version heading.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Before generating or editing release notes, confirm:
|
|
13
|
+
- Git is installed and available; verify with `git --version` and use <https://git-scm.com/docs> for command semantics.
|
|
14
|
+
- The target is a Git repository; verify with `git rev-parse --is-inside-work-tree`.
|
|
15
|
+
- The changelog file is identified and readable, or the user has approved the file to create.
|
|
16
|
+
- The release range has a clear baseline. Use `HEAD` as the upper bound unless the user provides another commit or ref.
|
|
17
|
+
- The target version and release date are known from user input, project release metadata, or existing changelog pattern.
|
|
18
|
+
- The commits in range can be inspected closely enough to distinguish product behavior from docs, tests, tooling, automation, and release-prep work.
|
|
19
|
+
|
|
20
|
+
## Safety Constraints
|
|
21
|
+
|
|
22
|
+
- Do not create, move, delete, or rewrite git tags.
|
|
23
|
+
- Do not run release, publish, version bump, commit, or push commands.
|
|
24
|
+
- Do not include uncommitted work unless the user explicitly requested draft notes from the working tree.
|
|
25
|
+
- Do not invent user-facing impact from commit messages alone when the diff does not support it.
|
|
26
|
+
- Do not include secrets, credentials, private URLs, or internal incident details in release notes.
|
|
27
|
+
|
|
28
|
+
## Stop Conditions
|
|
29
|
+
|
|
30
|
+
- Stop and report blocked when no git history exists; ask for the release range or commit to use as the baseline in `Blockers`.
|
|
31
|
+
- Stop and report blocked when no git tags exist and no version heading is present in the changelog; ask for the version number and baseline.
|
|
32
|
+
- Stop and report blocked when no changelog file exists (no `CHANGES.md`, `CHANGELOG.md`, or equivalent); ask for the filename and location.
|
|
33
|
+
- Stop and report blocked when git tags and changelog version headings disagree about the latest release baseline.
|
|
34
|
+
- Stop and report blocked when multiple changelog files appear authoritative.
|
|
35
|
+
- Stop and report blocked when the target version or release date cannot be determined.
|
|
36
|
+
- Stop and report blocked when no eligible product changes remain after filtering commits.
|
|
37
|
+
- Stop and report blocked when an entry for the target version already exists and replacing or merging it was not explicitly approved.
|
|
38
|
+
|
|
39
|
+
## Procedure
|
|
40
|
+
|
|
41
|
+
1. Start from the latest git tag or the most recent version heading in the changelog file.
|
|
42
|
+
2. Inspect commits in range; include only those that modify meaningful product behavior.
|
|
43
|
+
3. Exclude documentation-only commits, test-only commits, tooling and automation commits, and release preparation commits.
|
|
44
|
+
4. Include mixed commits when they contain relevant product changes alongside excluded content.
|
|
45
|
+
5. Use `Internal` only for release-relevant internal changes that affect shipped behavior, compatibility, security posture, or operator-visible release behavior. Otherwise, exclude dependency, refactor, and build-only commits.
|
|
46
|
+
6. Group changes into `Added`, `Changed`, `Fixed`, `Internal`; omit empty categories.
|
|
47
|
+
7. Write the entry per the Entry Format below and place it at the top of the changelog file.
|
|
48
|
+
|
|
49
|
+
## Content Standards
|
|
50
|
+
|
|
51
|
+
- Use concise, user-facing language.
|
|
52
|
+
- Avoid raw commit hashes, author attributions, and internal implementation details.
|
|
53
|
+
- Categories:
|
|
54
|
+
- `Added` — new features or capabilities
|
|
55
|
+
- `Changed` — changed behavior in existing features
|
|
56
|
+
- `Fixed` — bug fixes
|
|
57
|
+
- `Internal` — release-relevant dependency, refactor, or build changes that affect shipped behavior, compatibility, security posture, or operator-visible release behavior
|
|
58
|
+
|
|
59
|
+
## Entry Format
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
## [version] - YYYY-MM-DD
|
|
63
|
+
|
|
64
|
+
### Added
|
|
65
|
+
- ...
|
|
66
|
+
|
|
67
|
+
### Changed
|
|
68
|
+
- ...
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
- ...
|
|
72
|
+
|
|
73
|
+
### Internal
|
|
74
|
+
- ...
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Place the newest entry at the top of the changelog file. Omit empty categories, including `Internal`.
|
|
78
|
+
|
|
79
|
+
## Verification
|
|
80
|
+
|
|
81
|
+
Before reporting completion, verify:
|
|
82
|
+
- The newest non-empty release entry is at the top of the changelog.
|
|
83
|
+
- The version, date, and release range match the intended release.
|
|
84
|
+
- Every included bullet is supported by an eligible commit or diff.
|
|
85
|
+
- Empty categories are omitted.
|
|
86
|
+
- Existing changelog entries were not reordered or rewritten unintentionally.
|
|
87
|
+
|
|
88
|
+
Completion requires a non-empty changelog entry for the target version.
|
|
89
|
+
|
|
90
|
+
## Output Contract
|
|
91
|
+
|
|
92
|
+
Emit:
|
|
93
|
+
|
|
94
|
+
`Skill: prepare-release-notes - output below`
|
|
95
|
+
|
|
96
|
+
Then include:
|
|
97
|
+
|
|
98
|
+
| Field | Content |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| Status | `completed`, `skipped`, or `blocked` |
|
|
101
|
+
| Changelog File | File updated, proposed, or `none` |
|
|
102
|
+
| Release | Version and date, or `unknown` |
|
|
103
|
+
| Range | Baseline and upper bound used |
|
|
104
|
+
| Changed Files | Changelog file changed, or `none` |
|
|
105
|
+
| Assumptions | Inferences used, or `none` |
|
|
106
|
+
| Excluded Commits | Count or short reason summary |
|
|
107
|
+
| Blockers | Remaining blockers, or `none` |
|
|
108
|
+
|
|
109
|
+
Then include the formatted changelog entry per the Entry Format above.
|
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: refactor-code
|
|
3
|
-
description: Behavior-preserving restructuring of existing code. Use when reshaping code without changing user-facing behavior.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Scope
|
|
7
|
-
|
|
8
|
-
- Reshape existing code without changing user-facing behavior.
|
|
9
|
-
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
Before editing, confirm:
|
|
13
|
-
- The user requested or approved behavior-preserving restructuring.
|
|
14
|
-
- The code area, preserved behavior, and intended improvement are clear enough to state.
|
|
15
|
-
- Relevant implementation, tests, public API, configuration, and conventions can be read.
|
|
16
|
-
- A meaningful before-and-after verification path is available.
|
|
17
|
-
- The change can be made without overwriting unrelated user work.
|
|
18
|
-
|
|
19
|
-
If any item is false, stop and report what is missing.
|
|
20
|
-
|
|
21
|
-
## Safety Constraints
|
|
22
|
-
|
|
23
|
-
- Do not bundle unrelated cleanup, feature work, formatting churn, dependency changes, or test rewrites into the refactor.
|
|
24
|
-
- Do not change public API, persisted data shape, permissions, defaults, or user-visible behavior; if required, stop and treat the task as non-refactor work.
|
|
25
|
-
- Do not adjust tests to hide a behavior change.
|
|
26
|
-
- Do not overwrite unrelated user changes.
|
|
27
|
-
|
|
28
|
-
## Stop Conditions
|
|
29
|
-
|
|
30
|
-
Stop and report the refactor as blocked when:
|
|
31
|
-
- Behavior preservation cannot be stated concretely.
|
|
32
|
-
- Required context or public API boundaries cannot be inspected.
|
|
33
|
-
- The baseline verification fails before editing.
|
|
34
|
-
- The refactor would require a behavior change, breaking public API change, schema migration, generated artifact rewrite, new dependency, broad architecture change, or test expectation change.
|
|
35
|
-
- Existing architecture or project conventions conflict with the requested refactor.
|
|
36
|
-
- Required verification cannot be run or cannot provide meaningful evidence.
|
|
37
|
-
|
|
38
|
-
## Procedure
|
|
39
|
-
|
|
40
|
-
### 1. Frame The Refactor
|
|
41
|
-
|
|
42
|
-
Before editing, state:
|
|
43
|
-
- what is being reshaped and why
|
|
44
|
-
- what behavior must be preserved
|
|
45
|
-
- the protective tests that confirm preservation
|
|
46
|
-
- the intended verification approach
|
|
47
|
-
|
|
48
|
-
If the refactor crosses into system-level or shared infrastructure, stop and surface the risk before editing.
|
|
49
|
-
|
|
50
|
-
### 2. Read Required Context
|
|
51
|
-
|
|
52
|
-
Read the existing implementation thoroughly before editing.
|
|
53
|
-
|
|
54
|
-
Also read relevant architecture documentation, coding conventions, and the public API of the touched abstraction.
|
|
55
|
-
|
|
56
|
-
### 3. Establish A Behavior Baseline
|
|
57
|
-
|
|
58
|
-
Before editing, run targeted tests covering the touched behavior, plus type checks and linting.
|
|
59
|
-
|
|
60
|
-
If the baseline fails, stop and surface the failure instead of refactoring against an unstable state.
|
|
61
|
-
|
|
62
|
-
### 4. Refactor Under Project Boundaries
|
|
63
|
-
|
|
64
|
-
Follow project coding conventions. Preserve the public API of the touched abstraction.
|
|
65
|
-
|
|
66
|
-
Do not change behavior incidentally during a refactor. Do not bundle unrelated cleanup into the same refactor.
|
|
67
|
-
|
|
68
|
-
When multiple refactor approaches are plausible and differ materially in blast radius, public contract, ownership, or long-term maintainability, stop and surface the options instead of choosing silently.
|
|
69
|
-
|
|
70
|
-
### 5. Verify Preservation
|
|
71
|
-
|
|
72
|
-
After editing, re-run the same targeted tests from the baseline. Run the full test suite when shared or framework-level behavior is touched.
|
|
73
|
-
|
|
74
|
-
If a previously passing targeted test now fails, or if a test expectation had to change, stop and surface the behavior change. Test code may be restructured only to preserve existing expectations.
|
|
75
|
-
|
|
76
|
-
## Verification
|
|
77
|
-
|
|
78
|
-
Before reporting completion, verify:
|
|
79
|
-
- The diff is limited to behavior-preserving restructuring and test-code restructuring that preserves existing expectations.
|
|
80
|
-
- Baseline and final verification cover the same preserved behavior.
|
|
81
|
-
- No public API, persisted data shape, default, permission, or user-facing output changed unintentionally.
|
|
82
|
-
- Any failed or skipped verification is reported with enough context for follow-up.
|
|
83
|
-
|
|
84
|
-
## Output Contract
|
|
85
|
-
|
|
86
|
-
Emit:
|
|
87
|
-
|
|
88
|
-
`Skill: refactor-code - output below`
|
|
89
|
-
|
|
90
|
-
Then include:
|
|
91
|
-
|
|
92
|
-
| Field | Content |
|
|
93
|
-
| --- | --- |
|
|
94
|
-
| Status | `completed` or `blocked` |
|
|
95
|
-
| Scope | Code area, abstraction, or behavior refactored |
|
|
96
|
-
| Preserved Behavior | Behavior that was required to remain unchanged |
|
|
97
|
-
| Changed Files | Files changed, or `none` |
|
|
98
|
-
| Assumptions | Inferences used, or `none` |
|
|
99
|
-
| Baseline Verification | Commands/checks run before editing and results |
|
|
100
|
-
| Final Verification | Commands/checks run after editing and results |
|
|
101
|
-
| Skipped Checks | Checks not run with reasons, or `none` |
|
|
102
|
-
| Blockers | Remaining blockers, or `none` |
|
|
103
|
-
|
|
104
|
-
`Status` may be `completed` only when the refactor is applied and the smallest meaningful available baseline and final checks provide preservation evidence. Report unavailable or inapplicable checks under `Skipped Checks`; use `blocked` when no meaningful preservation evidence is available.
|
|
1
|
+
---
|
|
2
|
+
name: refactor-code
|
|
3
|
+
description: Behavior-preserving restructuring of existing code. Use when reshaping code without changing user-facing behavior.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
|
|
8
|
+
- Reshape existing code without changing user-facing behavior.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Before editing, confirm:
|
|
13
|
+
- The user requested or approved behavior-preserving restructuring.
|
|
14
|
+
- The code area, preserved behavior, and intended improvement are clear enough to state.
|
|
15
|
+
- Relevant implementation, tests, public API, configuration, and conventions can be read.
|
|
16
|
+
- A meaningful before-and-after verification path is available.
|
|
17
|
+
- The change can be made without overwriting unrelated user work.
|
|
18
|
+
|
|
19
|
+
If any item is false, stop and report what is missing.
|
|
20
|
+
|
|
21
|
+
## Safety Constraints
|
|
22
|
+
|
|
23
|
+
- Do not bundle unrelated cleanup, feature work, formatting churn, dependency changes, or test rewrites into the refactor.
|
|
24
|
+
- Do not change public API, persisted data shape, permissions, defaults, or user-visible behavior; if required, stop and treat the task as non-refactor work.
|
|
25
|
+
- Do not adjust tests to hide a behavior change.
|
|
26
|
+
- Do not overwrite unrelated user changes.
|
|
27
|
+
|
|
28
|
+
## Stop Conditions
|
|
29
|
+
|
|
30
|
+
Stop and report the refactor as blocked when:
|
|
31
|
+
- Behavior preservation cannot be stated concretely.
|
|
32
|
+
- Required context or public API boundaries cannot be inspected.
|
|
33
|
+
- The baseline verification fails before editing.
|
|
34
|
+
- The refactor would require a behavior change, breaking public API change, schema migration, generated artifact rewrite, new dependency, broad architecture change, or test expectation change.
|
|
35
|
+
- Existing architecture or project conventions conflict with the requested refactor.
|
|
36
|
+
- Required verification cannot be run or cannot provide meaningful evidence.
|
|
37
|
+
|
|
38
|
+
## Procedure
|
|
39
|
+
|
|
40
|
+
### 1. Frame The Refactor
|
|
41
|
+
|
|
42
|
+
Before editing, state:
|
|
43
|
+
- what is being reshaped and why
|
|
44
|
+
- what behavior must be preserved
|
|
45
|
+
- the protective tests that confirm preservation
|
|
46
|
+
- the intended verification approach
|
|
47
|
+
|
|
48
|
+
If the refactor crosses into system-level or shared infrastructure, stop and surface the risk before editing.
|
|
49
|
+
|
|
50
|
+
### 2. Read Required Context
|
|
51
|
+
|
|
52
|
+
Read the existing implementation thoroughly before editing.
|
|
53
|
+
|
|
54
|
+
Also read relevant architecture documentation, coding conventions, and the public API of the touched abstraction.
|
|
55
|
+
|
|
56
|
+
### 3. Establish A Behavior Baseline
|
|
57
|
+
|
|
58
|
+
Before editing, run targeted tests covering the touched behavior, plus type checks and linting.
|
|
59
|
+
|
|
60
|
+
If the baseline fails, stop and surface the failure instead of refactoring against an unstable state.
|
|
61
|
+
|
|
62
|
+
### 4. Refactor Under Project Boundaries
|
|
63
|
+
|
|
64
|
+
Follow project coding conventions. Preserve the public API of the touched abstraction.
|
|
65
|
+
|
|
66
|
+
Do not change behavior incidentally during a refactor. Do not bundle unrelated cleanup into the same refactor.
|
|
67
|
+
|
|
68
|
+
When multiple refactor approaches are plausible and differ materially in blast radius, public contract, ownership, or long-term maintainability, stop and surface the options instead of choosing silently.
|
|
69
|
+
|
|
70
|
+
### 5. Verify Preservation
|
|
71
|
+
|
|
72
|
+
After editing, re-run the same targeted tests from the baseline. Run the full test suite when shared or framework-level behavior is touched.
|
|
73
|
+
|
|
74
|
+
If a previously passing targeted test now fails, or if a test expectation had to change, stop and surface the behavior change. Test code may be restructured only to preserve existing expectations.
|
|
75
|
+
|
|
76
|
+
## Verification
|
|
77
|
+
|
|
78
|
+
Before reporting completion, verify:
|
|
79
|
+
- The diff is limited to behavior-preserving restructuring and test-code restructuring that preserves existing expectations.
|
|
80
|
+
- Baseline and final verification cover the same preserved behavior.
|
|
81
|
+
- No public API, persisted data shape, default, permission, or user-facing output changed unintentionally.
|
|
82
|
+
- Any failed or skipped verification is reported with enough context for follow-up.
|
|
83
|
+
|
|
84
|
+
## Output Contract
|
|
85
|
+
|
|
86
|
+
Emit:
|
|
87
|
+
|
|
88
|
+
`Skill: refactor-code - output below`
|
|
89
|
+
|
|
90
|
+
Then include:
|
|
91
|
+
|
|
92
|
+
| Field | Content |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| Status | `completed` or `blocked` |
|
|
95
|
+
| Scope | Code area, abstraction, or behavior refactored |
|
|
96
|
+
| Preserved Behavior | Behavior that was required to remain unchanged |
|
|
97
|
+
| Changed Files | Files changed, or `none` |
|
|
98
|
+
| Assumptions | Inferences used, or `none` |
|
|
99
|
+
| Baseline Verification | Commands/checks run before editing and results |
|
|
100
|
+
| Final Verification | Commands/checks run after editing and results |
|
|
101
|
+
| Skipped Checks | Checks not run with reasons, or `none` |
|
|
102
|
+
| Blockers | Remaining blockers, or `none` |
|
|
103
|
+
|
|
104
|
+
`Status` may be `completed` only when the refactor is applied and the smallest meaningful available baseline and final checks provide preservation evidence. Report unavailable or inapplicable checks under `Skipped Checks`; use `blocked` when no meaningful preservation evidence is available.
|
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: review-code
|
|
3
|
-
description: Read-only review of code changes, branches, diffs, or artifacts. Use to evaluate changes without implementing fixes.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Scope
|
|
7
|
-
|
|
8
|
-
- Evaluate code changes, branches, diffs, or artifacts without implementing fixes.
|
|
9
|
-
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
Before reviewing, confirm the requested review depth is clear, or a default bug-risk review is acceptable and stated.
|
|
13
|
-
|
|
14
|
-
If the target scope is unclear, ask the smallest clarifying question before reviewing.
|
|
15
|
-
|
|
16
|
-
## Safety Constraints
|
|
17
|
-
|
|
18
|
-
- Do not modify files, apply fixes, stage changes, commit, or run destructive commands.
|
|
19
|
-
- Do not invent issues just to produce findings.
|
|
20
|
-
- Distinguish confirmed defects from risks, questions, and missing evidence.
|
|
21
|
-
- Do not treat style preferences as findings unless they create correctness, maintainability, or operational risk.
|
|
22
|
-
|
|
23
|
-
## Stop Conditions
|
|
24
|
-
|
|
25
|
-
Stop and report the review as blocked when:
|
|
26
|
-
- The target scope cannot be located or read.
|
|
27
|
-
- A code-change review is requested but no diff, branch, patch, file list, or artifact set is available.
|
|
28
|
-
- Required context is unavailable and reviewing without it would make findings speculative.
|
|
29
|
-
- The review would require executing fixes, changing files, or making product decisions.
|
|
30
|
-
|
|
31
|
-
## Procedure
|
|
32
|
-
|
|
33
|
-
### 1. Frame The Review Scope
|
|
34
|
-
|
|
35
|
-
State which files, branch, diff, or artifact set is in scope and what review depth is requested.
|
|
36
|
-
|
|
37
|
-
### 2. Load Relevant References
|
|
38
|
-
|
|
39
|
-
Read the architecture documentation, coding conventions, and verification requirements for the project before reviewing.
|
|
40
|
-
|
|
41
|
-
### 3. Inspect The Scope
|
|
42
|
-
|
|
43
|
-
For code changes, inspect in dependency order: from foundational components to consuming components.
|
|
44
|
-
|
|
45
|
-
Check:
|
|
46
|
-
- naming, placement, and layer conventions
|
|
47
|
-
- correctness and behavior preservation
|
|
48
|
-
- test coverage and quality
|
|
49
|
-
- verification sufficiency
|
|
50
|
-
- hidden coupling or boundary violations
|
|
51
|
-
- simplicity and unnecessary complexity
|
|
52
|
-
- duplication that creates maintenance, correctness, or behavior-drift risk
|
|
53
|
-
- public API or contract changes
|
|
54
|
-
- concurrency and CI/runtime risks when relevant
|
|
55
|
-
|
|
56
|
-
Prioritize confirmed correctness, regression, data-loss, security, compatibility, and test-quality issues before maintainability concerns. Ignore formatting-only issues unless they affect behavior, maintainability, or future breakage risk.
|
|
57
|
-
|
|
58
|
-
### 4. Produce Findings
|
|
59
|
-
|
|
60
|
-
Lead with findings ordered by severity with file and line references where available.
|
|
61
|
-
|
|
62
|
-
Use these sections:
|
|
63
|
-
|
|
64
|
-
- **Blocking** — must be fixed before handoff
|
|
65
|
-
- **Non-blocking** — should be addressed; can follow up
|
|
66
|
-
- **Questions** — ambiguities requiring clarification
|
|
67
|
-
|
|
68
|
-
Empty sections are allowed.
|
|
69
|
-
|
|
70
|
-
## Verification
|
|
71
|
-
|
|
72
|
-
Before emitting the review, verify:
|
|
73
|
-
- Every finding names the affected file and line when available.
|
|
74
|
-
- Each finding explains the risk and likely fix direction.
|
|
75
|
-
- Questions are limited to ambiguities that affect correctness, acceptance, or review confidence.
|
|
76
|
-
- Residual verification gaps are explicitly listed.
|
|
77
|
-
|
|
78
|
-
## Output Contract
|
|
79
|
-
|
|
80
|
-
Do not modify repository files.
|
|
81
|
-
|
|
82
|
-
Emit:
|
|
83
|
-
|
|
84
|
-
`Skill: review-code - output below`
|
|
85
|
-
|
|
86
|
-
Then include:
|
|
87
|
-
|
|
88
|
-
| Field | Content |
|
|
89
|
-
| --- | --- |
|
|
90
|
-
| Status | `completed`, `skipped`, or `blocked` |
|
|
91
|
-
| Scope | Files, branch, diff, patch, or artifact set reviewed |
|
|
92
|
-
| Sources Read | Code, docs, tests, diffs, or verification evidence inspected |
|
|
93
|
-
| Assumptions | Inferences used, or `none` |
|
|
94
|
-
| Findings | Blocking, non-blocking, and questions with file/line references where available |
|
|
95
|
-
| Verification Gaps | Missing or insufficient checks, or `none` |
|
|
96
|
-
| Blockers | Remaining blockers, or `none` |
|
|
97
|
-
|
|
98
|
-
Use `blocked` when required scope or evidence cannot be inspected.
|
|
1
|
+
---
|
|
2
|
+
name: review-code
|
|
3
|
+
description: Read-only review of code changes, branches, diffs, or artifacts. Use to evaluate changes without implementing fixes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
|
|
8
|
+
- Evaluate code changes, branches, diffs, or artifacts without implementing fixes.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Before reviewing, confirm the requested review depth is clear, or a default bug-risk review is acceptable and stated.
|
|
13
|
+
|
|
14
|
+
If the target scope is unclear, ask the smallest clarifying question before reviewing.
|
|
15
|
+
|
|
16
|
+
## Safety Constraints
|
|
17
|
+
|
|
18
|
+
- Do not modify files, apply fixes, stage changes, commit, or run destructive commands.
|
|
19
|
+
- Do not invent issues just to produce findings.
|
|
20
|
+
- Distinguish confirmed defects from risks, questions, and missing evidence.
|
|
21
|
+
- Do not treat style preferences as findings unless they create correctness, maintainability, or operational risk.
|
|
22
|
+
|
|
23
|
+
## Stop Conditions
|
|
24
|
+
|
|
25
|
+
Stop and report the review as blocked when:
|
|
26
|
+
- The target scope cannot be located or read.
|
|
27
|
+
- A code-change review is requested but no diff, branch, patch, file list, or artifact set is available.
|
|
28
|
+
- Required context is unavailable and reviewing without it would make findings speculative.
|
|
29
|
+
- The review would require executing fixes, changing files, or making product decisions.
|
|
30
|
+
|
|
31
|
+
## Procedure
|
|
32
|
+
|
|
33
|
+
### 1. Frame The Review Scope
|
|
34
|
+
|
|
35
|
+
State which files, branch, diff, or artifact set is in scope and what review depth is requested.
|
|
36
|
+
|
|
37
|
+
### 2. Load Relevant References
|
|
38
|
+
|
|
39
|
+
Read the architecture documentation, coding conventions, and verification requirements for the project before reviewing.
|
|
40
|
+
|
|
41
|
+
### 3. Inspect The Scope
|
|
42
|
+
|
|
43
|
+
For code changes, inspect in dependency order: from foundational components to consuming components.
|
|
44
|
+
|
|
45
|
+
Check:
|
|
46
|
+
- naming, placement, and layer conventions
|
|
47
|
+
- correctness and behavior preservation
|
|
48
|
+
- test coverage and quality
|
|
49
|
+
- verification sufficiency
|
|
50
|
+
- hidden coupling or boundary violations
|
|
51
|
+
- simplicity and unnecessary complexity
|
|
52
|
+
- duplication that creates maintenance, correctness, or behavior-drift risk
|
|
53
|
+
- public API or contract changes
|
|
54
|
+
- concurrency and CI/runtime risks when relevant
|
|
55
|
+
|
|
56
|
+
Prioritize confirmed correctness, regression, data-loss, security, compatibility, and test-quality issues before maintainability concerns. Ignore formatting-only issues unless they affect behavior, maintainability, or future breakage risk.
|
|
57
|
+
|
|
58
|
+
### 4. Produce Findings
|
|
59
|
+
|
|
60
|
+
Lead with findings ordered by severity with file and line references where available.
|
|
61
|
+
|
|
62
|
+
Use these sections:
|
|
63
|
+
|
|
64
|
+
- **Blocking** — must be fixed before handoff
|
|
65
|
+
- **Non-blocking** — should be addressed; can follow up
|
|
66
|
+
- **Questions** — ambiguities requiring clarification
|
|
67
|
+
|
|
68
|
+
Empty sections are allowed.
|
|
69
|
+
|
|
70
|
+
## Verification
|
|
71
|
+
|
|
72
|
+
Before emitting the review, verify:
|
|
73
|
+
- Every finding names the affected file and line when available.
|
|
74
|
+
- Each finding explains the risk and likely fix direction.
|
|
75
|
+
- Questions are limited to ambiguities that affect correctness, acceptance, or review confidence.
|
|
76
|
+
- Residual verification gaps are explicitly listed.
|
|
77
|
+
|
|
78
|
+
## Output Contract
|
|
79
|
+
|
|
80
|
+
Do not modify repository files.
|
|
81
|
+
|
|
82
|
+
Emit:
|
|
83
|
+
|
|
84
|
+
`Skill: review-code - output below`
|
|
85
|
+
|
|
86
|
+
Then include:
|
|
87
|
+
|
|
88
|
+
| Field | Content |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| Status | `completed`, `skipped`, or `blocked` |
|
|
91
|
+
| Scope | Files, branch, diff, patch, or artifact set reviewed |
|
|
92
|
+
| Sources Read | Code, docs, tests, diffs, or verification evidence inspected |
|
|
93
|
+
| Assumptions | Inferences used, or `none` |
|
|
94
|
+
| Findings | Blocking, non-blocking, and questions with file/line references where available |
|
|
95
|
+
| Verification Gaps | Missing or insufficient checks, or `none` |
|
|
96
|
+
| Blockers | Remaining blockers, or `none` |
|
|
97
|
+
|
|
98
|
+
Use `blocked` when required scope or evidence cannot be inspected.
|