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,72 +1,72 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: test-review
|
|
3
|
-
description: Reviews and strengthens tests during the TDD green or refactor phase. Use after initial tests pass to ensure comprehensive coverage before handoff.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Scope
|
|
7
|
-
|
|
8
|
-
- Review tests after the initial implementation passes. Identify coverage, maintainability, flakiness, and convention issues before the task is closed.
|
|
9
|
-
- Use after baseline tests pass or validation evidence is available to evaluate test quality.
|
|
10
|
-
|
|
11
|
-
## Prerequisites
|
|
12
|
-
|
|
13
|
-
Before reviewing tests, confirm:
|
|
14
|
-
- The test files, diff, branch, or artifact set in scope can be identified and read.
|
|
15
|
-
- The code under test can be inspected.
|
|
16
|
-
- Initial test validation has passed, or the current validation result is available.
|
|
17
|
-
- Relevant project test conventions, commands, and expected behavior can be inspected.
|
|
18
|
-
|
|
19
|
-
If the scope is unclear, ask the smallest clarifying question before reviewing.
|
|
20
|
-
|
|
21
|
-
## Safety Constraints
|
|
22
|
-
|
|
23
|
-
- Do not edit, create, delete, stage, or commit files.
|
|
24
|
-
- Do not add, remove, or refactor tests during test review.
|
|
25
|
-
- Do not change production code or test expectations.
|
|
26
|
-
- Do not invent coverage claims that are not supported by inspected tests, code, or validation output.
|
|
27
|
-
|
|
28
|
-
## Stop Conditions
|
|
29
|
-
|
|
30
|
-
Stop and report the review as blocked when a prerequisite remains unavailable after minimal clarification, or when the requested action violates Safety Constraints.
|
|
31
|
-
|
|
32
|
-
## Procedure
|
|
33
|
-
|
|
34
|
-
1. Confirm scoped tests have current passing validation evidence when available.
|
|
35
|
-
2. Identify edge cases and regression scenarios not covered during initial test creation.
|
|
36
|
-
3. Recommend missing test cases for edge scenarios, error paths, and boundary conditions.
|
|
37
|
-
4. Identify readability and maintainability improvements while preserving existing behavior.
|
|
38
|
-
5. Evaluate overall test coverage and identify any remaining gaps.
|
|
39
|
-
|
|
40
|
-
Evaluate tests on:
|
|
41
|
-
- correctness: the test verifies the behavior it claims to protect
|
|
42
|
-
- maintainability: setup, naming, assertions, and fixtures are clear and localized
|
|
43
|
-
- simplicity and duplication risk: repeated setup, helpers, or cases are flagged only when they obscure behavior, increase maintenance risk, or create behavior-drift risk
|
|
44
|
-
- flakiness risk: timing, ordering, external services, randomness, filesystem, network, or environment coupling
|
|
45
|
-
- convention alignment: file placement, naming, structure, and project test patterns
|
|
46
|
-
|
|
47
|
-
## Verification
|
|
48
|
-
|
|
49
|
-
Before emitting the review, verify:
|
|
50
|
-
- Each finding is tied to a specific test, assertion, setup pattern, or missing behavior.
|
|
51
|
-
- Findings distinguish confirmed defects from risks and open questions.
|
|
52
|
-
- Recommended additions describe the scenario and expected assertion, not implementation steps.
|
|
53
|
-
- Remaining coverage gaps are explicit and not presented as completed work.
|
|
54
|
-
|
|
55
|
-
## Output Contract
|
|
56
|
-
|
|
57
|
-
Emit:
|
|
58
|
-
|
|
59
|
-
`Skill: test-review - output below`
|
|
60
|
-
|
|
61
|
-
Then include:
|
|
62
|
-
|
|
63
|
-
| Field | Content |
|
|
64
|
-
| --- | --- |
|
|
65
|
-
| Status | `completed`, `skipped`, or `blocked` |
|
|
66
|
-
| Scope | Test files, diff, branch, or artifact set reviewed |
|
|
67
|
-
| Sources Read | Tests, code under test, docs, conventions, or validation evidence inspected |
|
|
68
|
-
| Initial Test Status | Passing, failing, unavailable, or not applicable |
|
|
69
|
-
| Findings | Prioritized findings for correctness, maintainability, flakiness, and convention alignment |
|
|
70
|
-
| Recommended Additions | Missing edge cases, regression scenarios, or assertions, or `none` |
|
|
71
|
-
| Assumptions | Inferences used, or `none` |
|
|
72
|
-
| Blockers | Missing scope, unreadable context, unavailable validation, or `none` |
|
|
1
|
+
---
|
|
2
|
+
name: test-review
|
|
3
|
+
description: Reviews and strengthens tests during the TDD green or refactor phase. Use after initial tests pass to ensure comprehensive coverage before handoff.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
|
|
8
|
+
- Review tests after the initial implementation passes. Identify coverage, maintainability, flakiness, and convention issues before the task is closed.
|
|
9
|
+
- Use after baseline tests pass or validation evidence is available to evaluate test quality.
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
Before reviewing tests, confirm:
|
|
14
|
+
- The test files, diff, branch, or artifact set in scope can be identified and read.
|
|
15
|
+
- The code under test can be inspected.
|
|
16
|
+
- Initial test validation has passed, or the current validation result is available.
|
|
17
|
+
- Relevant project test conventions, commands, and expected behavior can be inspected.
|
|
18
|
+
|
|
19
|
+
If the scope is unclear, ask the smallest clarifying question before reviewing.
|
|
20
|
+
|
|
21
|
+
## Safety Constraints
|
|
22
|
+
|
|
23
|
+
- Do not edit, create, delete, stage, or commit files.
|
|
24
|
+
- Do not add, remove, or refactor tests during test review.
|
|
25
|
+
- Do not change production code or test expectations.
|
|
26
|
+
- Do not invent coverage claims that are not supported by inspected tests, code, or validation output.
|
|
27
|
+
|
|
28
|
+
## Stop Conditions
|
|
29
|
+
|
|
30
|
+
Stop and report the review as blocked when a prerequisite remains unavailable after minimal clarification, or when the requested action violates Safety Constraints.
|
|
31
|
+
|
|
32
|
+
## Procedure
|
|
33
|
+
|
|
34
|
+
1. Confirm scoped tests have current passing validation evidence when available.
|
|
35
|
+
2. Identify edge cases and regression scenarios not covered during initial test creation.
|
|
36
|
+
3. Recommend missing test cases for edge scenarios, error paths, and boundary conditions.
|
|
37
|
+
4. Identify readability and maintainability improvements while preserving existing behavior.
|
|
38
|
+
5. Evaluate overall test coverage and identify any remaining gaps.
|
|
39
|
+
|
|
40
|
+
Evaluate tests on:
|
|
41
|
+
- correctness: the test verifies the behavior it claims to protect
|
|
42
|
+
- maintainability: setup, naming, assertions, and fixtures are clear and localized
|
|
43
|
+
- simplicity and duplication risk: repeated setup, helpers, or cases are flagged only when they obscure behavior, increase maintenance risk, or create behavior-drift risk
|
|
44
|
+
- flakiness risk: timing, ordering, external services, randomness, filesystem, network, or environment coupling
|
|
45
|
+
- convention alignment: file placement, naming, structure, and project test patterns
|
|
46
|
+
|
|
47
|
+
## Verification
|
|
48
|
+
|
|
49
|
+
Before emitting the review, verify:
|
|
50
|
+
- Each finding is tied to a specific test, assertion, setup pattern, or missing behavior.
|
|
51
|
+
- Findings distinguish confirmed defects from risks and open questions.
|
|
52
|
+
- Recommended additions describe the scenario and expected assertion, not implementation steps.
|
|
53
|
+
- Remaining coverage gaps are explicit and not presented as completed work.
|
|
54
|
+
|
|
55
|
+
## Output Contract
|
|
56
|
+
|
|
57
|
+
Emit:
|
|
58
|
+
|
|
59
|
+
`Skill: test-review - output below`
|
|
60
|
+
|
|
61
|
+
Then include:
|
|
62
|
+
|
|
63
|
+
| Field | Content |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| Status | `completed`, `skipped`, or `blocked` |
|
|
66
|
+
| Scope | Test files, diff, branch, or artifact set reviewed |
|
|
67
|
+
| Sources Read | Tests, code under test, docs, conventions, or validation evidence inspected |
|
|
68
|
+
| Initial Test Status | Passing, failing, unavailable, or not applicable |
|
|
69
|
+
| Findings | Prioritized findings for correctness, maintainability, flakiness, and convention alignment |
|
|
70
|
+
| Recommended Additions | Missing edge cases, regression scenarios, or assertions, or `none` |
|
|
71
|
+
| Assumptions | Inferences used, or `none` |
|
|
72
|
+
| Blockers | Missing scope, unreadable context, unavailable validation, or `none` |
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: test-writer
|
|
3
|
-
description: Writes tests before production code changes (TDD red phase). Use when establishing the test contract for a new feature or bug fix.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Scope
|
|
7
|
-
|
|
8
|
-
- Implement the TDD red phase by writing failing tests that express the desired behavior before any production code is changed.
|
|
9
|
-
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
Before writing tests, confirm:
|
|
13
|
-
- The user requested or approved TDD red-phase test creation.
|
|
14
|
-
- The desired behavior, bug reproduction, or acceptance criteria are clear enough to express as tests.
|
|
15
|
-
- Production code for the behavior has not already been changed in this task.
|
|
16
|
-
- Relevant test framework, existing test patterns, commands, and code under test can be inspected.
|
|
17
|
-
- Tests can be added 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 edit production code during test writing.
|
|
24
|
-
- Do not change existing passing tests, fixtures, snapshots, or expectations unless required to express the approved new behavior.
|
|
25
|
-
- Do not make tests fail through invalid setup, syntax errors, missing imports, timing assumptions, or intentionally broken assertions.
|
|
26
|
-
- Do not invent requirements, edge cases, permissions, defaults, or user-facing behavior not supported by user input or repository evidence.
|
|
27
|
-
- Do not overwrite unrelated user changes.
|
|
28
|
-
|
|
29
|
-
## Stop Conditions
|
|
30
|
-
|
|
31
|
-
- Stop and report test writing as blocked when the expected behavior cannot be stated as observable assertions.
|
|
32
|
-
- Stop and report blocked when required test context, fixtures, commands, or code under test cannot be read.
|
|
33
|
-
- Stop and report blocked when the test runner cannot execute because of configuration, dependency, environment, or credential issues.
|
|
34
|
-
- Stop and report blocked when production code has already been changed and the work is no longer a TDD red phase.
|
|
35
|
-
- Stop and report blocked when creating the tests would require changing production code, product decisions, schemas, external services, or unrelated tests.
|
|
36
|
-
|
|
37
|
-
## Procedure
|
|
38
|
-
|
|
39
|
-
1. Review available requirements, acceptance criteria, bug reproduction, or discovery notes.
|
|
40
|
-
2. Identify expected behaviors and edge cases to cover.
|
|
41
|
-
3. Create test cases that express the desired behavior.
|
|
42
|
-
4. Run tests to confirm they fail initially (red phase confirmed).
|
|
43
|
-
5. Investigate any passing new tests and classify them as already-covered behavior or incomplete red-phase evidence.
|
|
44
|
-
6. Document failing tests as the implementation contract.
|
|
45
|
-
|
|
46
|
-
When multiple test scopes or assertion styles are plausible, choose the one that matches existing project test patterns and the smallest observable behavior contract. If multiple scopes are equally plausible and would test different behavior, stop and ask for clarification.
|
|
47
|
-
|
|
48
|
-
## Verification
|
|
49
|
-
|
|
50
|
-
Before reporting completion, verify:
|
|
51
|
-
- Each new test maps to a stated requirement, acceptance criterion, or bug reproduction.
|
|
52
|
-
- The failure reason demonstrates missing behavior rather than broken test setup.
|
|
53
|
-
- Existing unrelated tests were not changed or invalidated without explanation.
|
|
54
|
-
- Any passing new test is explained as already-covered behavior or incomplete red-phase evidence.
|
|
55
|
-
|
|
56
|
-
## Output Contract
|
|
57
|
-
|
|
58
|
-
Emit:
|
|
59
|
-
|
|
60
|
-
`Skill: test-writer - output below`
|
|
61
|
-
|
|
62
|
-
Then include:
|
|
63
|
-
|
|
64
|
-
| Field | Content |
|
|
65
|
-
| --- | --- |
|
|
66
|
-
| Status | `completed`, `skipped`, or `blocked` |
|
|
67
|
-
| Scope | Feature, bug, behavior, or contract covered |
|
|
68
|
-
| Test Files | Created or modified test files, or `none` |
|
|
69
|
-
| Sources Read | Requirements, code, tests, docs, or commands inspected |
|
|
70
|
-
| Red Phase Contract | Failing test cases and the behavior each asserts |
|
|
71
|
-
| Red Phase Evidence | Test command run and failure reason |
|
|
72
|
-
| Assumptions | Inferences used, or `none` |
|
|
73
|
-
| Coverage Gaps | Known missing cases, or `none` |
|
|
74
|
-
| Blockers | Missing context, unavailable runner, or non-red-phase state, or `none` |
|
|
75
|
-
|
|
76
|
-
Use `completed` only when newly written tests fail for the intended unmet behavior, not setup or syntax errors.
|
|
77
|
-
|
|
78
|
-
Use `blocked` when approved test cases cannot be red-confirmed; list red-confirmed cases in `Red Phase Evidence` and blocked cases in `Coverage Gaps` and `Blockers`.
|
|
1
|
+
---
|
|
2
|
+
name: test-writer
|
|
3
|
+
description: Writes tests before production code changes (TDD red phase). Use when establishing the test contract for a new feature or bug fix.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
|
|
8
|
+
- Implement the TDD red phase by writing failing tests that express the desired behavior before any production code is changed.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Before writing tests, confirm:
|
|
13
|
+
- The user requested or approved TDD red-phase test creation.
|
|
14
|
+
- The desired behavior, bug reproduction, or acceptance criteria are clear enough to express as tests.
|
|
15
|
+
- Production code for the behavior has not already been changed in this task.
|
|
16
|
+
- Relevant test framework, existing test patterns, commands, and code under test can be inspected.
|
|
17
|
+
- Tests can be added 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 edit production code during test writing.
|
|
24
|
+
- Do not change existing passing tests, fixtures, snapshots, or expectations unless required to express the approved new behavior.
|
|
25
|
+
- Do not make tests fail through invalid setup, syntax errors, missing imports, timing assumptions, or intentionally broken assertions.
|
|
26
|
+
- Do not invent requirements, edge cases, permissions, defaults, or user-facing behavior not supported by user input or repository evidence.
|
|
27
|
+
- Do not overwrite unrelated user changes.
|
|
28
|
+
|
|
29
|
+
## Stop Conditions
|
|
30
|
+
|
|
31
|
+
- Stop and report test writing as blocked when the expected behavior cannot be stated as observable assertions.
|
|
32
|
+
- Stop and report blocked when required test context, fixtures, commands, or code under test cannot be read.
|
|
33
|
+
- Stop and report blocked when the test runner cannot execute because of configuration, dependency, environment, or credential issues.
|
|
34
|
+
- Stop and report blocked when production code has already been changed and the work is no longer a TDD red phase.
|
|
35
|
+
- Stop and report blocked when creating the tests would require changing production code, product decisions, schemas, external services, or unrelated tests.
|
|
36
|
+
|
|
37
|
+
## Procedure
|
|
38
|
+
|
|
39
|
+
1. Review available requirements, acceptance criteria, bug reproduction, or discovery notes.
|
|
40
|
+
2. Identify expected behaviors and edge cases to cover.
|
|
41
|
+
3. Create test cases that express the desired behavior.
|
|
42
|
+
4. Run tests to confirm they fail initially (red phase confirmed).
|
|
43
|
+
5. Investigate any passing new tests and classify them as already-covered behavior or incomplete red-phase evidence.
|
|
44
|
+
6. Document failing tests as the implementation contract.
|
|
45
|
+
|
|
46
|
+
When multiple test scopes or assertion styles are plausible, choose the one that matches existing project test patterns and the smallest observable behavior contract. If multiple scopes are equally plausible and would test different behavior, stop and ask for clarification.
|
|
47
|
+
|
|
48
|
+
## Verification
|
|
49
|
+
|
|
50
|
+
Before reporting completion, verify:
|
|
51
|
+
- Each new test maps to a stated requirement, acceptance criterion, or bug reproduction.
|
|
52
|
+
- The failure reason demonstrates missing behavior rather than broken test setup.
|
|
53
|
+
- Existing unrelated tests were not changed or invalidated without explanation.
|
|
54
|
+
- Any passing new test is explained as already-covered behavior or incomplete red-phase evidence.
|
|
55
|
+
|
|
56
|
+
## Output Contract
|
|
57
|
+
|
|
58
|
+
Emit:
|
|
59
|
+
|
|
60
|
+
`Skill: test-writer - output below`
|
|
61
|
+
|
|
62
|
+
Then include:
|
|
63
|
+
|
|
64
|
+
| Field | Content |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| Status | `completed`, `skipped`, or `blocked` |
|
|
67
|
+
| Scope | Feature, bug, behavior, or contract covered |
|
|
68
|
+
| Test Files | Created or modified test files, or `none` |
|
|
69
|
+
| Sources Read | Requirements, code, tests, docs, or commands inspected |
|
|
70
|
+
| Red Phase Contract | Failing test cases and the behavior each asserts |
|
|
71
|
+
| Red Phase Evidence | Test command run and failure reason |
|
|
72
|
+
| Assumptions | Inferences used, or `none` |
|
|
73
|
+
| Coverage Gaps | Known missing cases, or `none` |
|
|
74
|
+
| Blockers | Missing context, unavailable runner, or non-red-phase state, or `none` |
|
|
75
|
+
|
|
76
|
+
Use `completed` only when newly written tests fail for the intended unmet behavior, not setup or syntax errors.
|
|
77
|
+
|
|
78
|
+
Use `blocked` when approved test cases cannot be red-confirmed; list red-confirmed cases in `Red Phase Evidence` and blocked cases in `Coverage Gaps` and `Blockers`.
|
|
@@ -1,154 +1,154 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: work-with-git
|
|
3
|
-
description: Handles all git operations for a task — branch creation, diff, staging, commit, and push. Do not commit or push unless the user explicitly asks.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Scope
|
|
7
|
-
|
|
8
|
-
- Perform git operations for a task: inspect state, create branches, stage files, commit, push, and report.
|
|
9
|
-
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
Before running git operations, confirm:
|
|
13
|
-
- Requires the Git CLI: <https://git-scm.com/docs/git>.
|
|
14
|
-
- Git is available; verify with `git --version`. If unavailable, stop and ask the user to install Git or provide another environment.
|
|
15
|
-
- The current directory is inside a git worktree.
|
|
16
|
-
- The current branch or detached-HEAD state is known.
|
|
17
|
-
- `git status --short` has been inspected.
|
|
18
|
-
- The requested operation is clear: inspect, branch, stage, commit, push, or another named git action.
|
|
19
|
-
- Any operation that can change repository state has explicit user approval when required by this skill.
|
|
20
|
-
|
|
21
|
-
If the repository, branch state, or requested operation is unclear, stop and ask for the missing input.
|
|
22
|
-
|
|
23
|
-
## Safety Constraints
|
|
24
|
-
|
|
25
|
-
- Do NOT commit unless the user explicitly asks for a commit.
|
|
26
|
-
- Do NOT push unless the user explicitly asks for a push.
|
|
27
|
-
- Do NOT switch branches or pull when uncommitted changes exist without checking with the user first.
|
|
28
|
-
- Do NOT force-push or rewrite history without explicit user permission.
|
|
29
|
-
- Treat direct pushes to `main` as requiring explicit user approval.
|
|
30
|
-
- Do not use broad staging commands such as `git add -A` or `git add .` unless the user explicitly approved staging every changed file.
|
|
31
|
-
- Do not discard, overwrite, stash, reset, clean, or restore user changes without explicit approval.
|
|
32
|
-
- Do not create, delete, rewrite, or move tags unless the user explicitly requested that exact tag operation.
|
|
33
|
-
- Do not run merge, rebase, pull, or branch switch operations with uncommitted changes unless the user explicitly approved the risk.
|
|
34
|
-
- Do not use `--force`; if force push is explicitly approved, prefer `--force-with-lease` and report the exact remote and branch.
|
|
35
|
-
|
|
36
|
-
## Stop Conditions
|
|
37
|
-
|
|
38
|
-
Stop and ask before proceeding when:
|
|
39
|
-
- The repo is not a git worktree.
|
|
40
|
-
- HEAD is detached and the user requested commit, branch, pull, merge, rebase, or push.
|
|
41
|
-
- The base branch cannot be determined.
|
|
42
|
-
- The staging scope is unclear or includes unrelated files.
|
|
43
|
-
- A commit is requested but no relevant staged or stageable task changes exist.
|
|
44
|
-
- A push is requested but the target remote, branch, or upstream is unclear.
|
|
45
|
-
|
|
46
|
-
## Procedure
|
|
47
|
-
|
|
48
|
-
1. Do not assume the correct base branch. Run `git status --short` and `git branch --show-current` first.
|
|
49
|
-
2. Run `git status` to review all modified and untracked files.
|
|
50
|
-
3. Run `git diff` to confirm the changes match what was planned.
|
|
51
|
-
4. Stage only files relevant to the current task — never use `git add -A` blindly.
|
|
52
|
-
5. Perform one consequential git operation at a time, then inspect state before the next operation. Do not chain staging, committing, and pushing into a single unchecked command sequence.
|
|
53
|
-
|
|
54
|
-
### Branch Creation
|
|
55
|
-
|
|
56
|
-
When branch creation is requested, use the task classification already stated by the caller when available. If branch choice depends on task classification and classification is absent, ask for the missing input instead of classifying the task inside this skill.
|
|
57
|
-
|
|
58
|
-
#### 1. Check For Uncommitted Changes
|
|
59
|
-
|
|
60
|
-
Run `git status --porcelain`. If any uncommitted changes exist, stop immediately and ask:
|
|
61
|
-
|
|
62
|
-
> There are uncommitted changes on `<current-branch>`. Commit, stash, or abort before continuing?
|
|
63
|
-
|
|
64
|
-
Do not proceed until the user resolves this.
|
|
65
|
-
|
|
66
|
-
#### 2. Determine Whether A Branch Is Needed
|
|
67
|
-
|
|
68
|
-
| Current branch | Task | Action |
|
|
69
|
-
| --- | --- | --- |
|
|
70
|
-
| `main` or `master` | Trivial | Skip |
|
|
71
|
-
| `main` or `master` | Non-trivial | Create silently |
|
|
72
|
-
| Feature branch | Trivial | Skip |
|
|
73
|
-
| Feature branch | Related to current branch | Skip — continue on current branch |
|
|
74
|
-
| Feature branch | Unrelated, non-trivial | Ask before creating |
|
|
75
|
-
| Any | User explicitly requested | Create silently |
|
|
76
|
-
|
|
77
|
-
#### 3. Create The Branch
|
|
78
|
-
|
|
79
|
-
Detect the default remote branch first when a remote is available:
|
|
80
|
-
```bash
|
|
81
|
-
git fetch origin
|
|
82
|
-
git remote show origin | grep "HEAD branch"
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Then create from it:
|
|
86
|
-
```bash
|
|
87
|
-
git checkout -b <branch-name> origin/<default-branch>
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
If no remote or default remote branch is available, ask the user which base ref to use instead of treating local-only branch creation as blocked.
|
|
91
|
-
|
|
92
|
-
State the outcome before proceeding:
|
|
93
|
-
- **Skipped**: `<reason>`
|
|
94
|
-
- **Created**: `<branch-name>` from `origin/<default-branch>` or approved local base ref
|
|
95
|
-
- **Blocked**: uncommitted changes — waiting for user resolution
|
|
96
|
-
|
|
97
|
-
### Commit Rules
|
|
98
|
-
|
|
99
|
-
When the user explicitly asks for a commit:
|
|
100
|
-
- Write a commit message that explains *why* the change was made, not just what changed.
|
|
101
|
-
- Commit only staged files relevant to the current task.
|
|
102
|
-
|
|
103
|
-
## Branch Naming
|
|
104
|
-
|
|
105
|
-
New branches must use one of these prefixes:
|
|
106
|
-
|
|
107
|
-
| Prefix | Purpose |
|
|
108
|
-
| --- | --- |
|
|
109
|
-
| `feature/<name>` | New features |
|
|
110
|
-
| `fix/<name>` | Bug corrections |
|
|
111
|
-
| `refactor/<name>` | Behavior-preserving restructuring |
|
|
112
|
-
| `chore/<name>` | Maintenance, config, or tooling |
|
|
113
|
-
| `docs/<name>` | Documentation updates |
|
|
114
|
-
|
|
115
|
-
Name format: `<prefix><slugified-task-description>`
|
|
116
|
-
|
|
117
|
-
Slugify: lowercase; spaces and special characters replaced with hyphens; no leading or trailing hyphens.
|
|
118
|
-
|
|
119
|
-
## Error Handling
|
|
120
|
-
|
|
121
|
-
When any git command fails (push rejected, merge conflict, remote error, authentication error):
|
|
122
|
-
- Stop immediately.
|
|
123
|
-
- Report the exact error message to the user.
|
|
124
|
-
- Do not attempt recovery — resolution requires explicit user instruction.
|
|
125
|
-
|
|
126
|
-
## Verification
|
|
127
|
-
|
|
128
|
-
Before reporting completion, verify:
|
|
129
|
-
- After staging, `git diff --cached --name-only` contains only task-relevant files.
|
|
130
|
-
- After committing, `git status --short` and the new commit hash were inspected.
|
|
131
|
-
- After pushing, the pushed remote and branch are known.
|
|
132
|
-
- Any skipped or blocked operation is reported with the reason.
|
|
133
|
-
|
|
134
|
-
## Output Contract
|
|
135
|
-
|
|
136
|
-
Emit:
|
|
137
|
-
|
|
138
|
-
`Skill: work-with-git - output below`
|
|
139
|
-
|
|
140
|
-
Then include:
|
|
141
|
-
|
|
142
|
-
| Field | Content |
|
|
143
|
-
| --- | --- |
|
|
144
|
-
| Status | `completed`, `skipped`, or `blocked` |
|
|
145
|
-
| Operation | Git action requested and performed |
|
|
146
|
-
| Branch State | Current branch or detached HEAD |
|
|
147
|
-
| Working Tree | Clean, dirty, or blocked summary |
|
|
148
|
-
| Staged Files | Files staged, or `none` |
|
|
149
|
-
| Commit | Commit hash and message, or `none` |
|
|
150
|
-
| Push | Remote/branch pushed, or `none` |
|
|
151
|
-
| Assumptions | Inferences used, or `none` |
|
|
152
|
-
| Blockers / Errors | Git error, missing approval, unclear scope, or `none` |
|
|
153
|
-
|
|
154
|
-
If no commit or push occurred, state that explicitly.
|
|
1
|
+
---
|
|
2
|
+
name: work-with-git
|
|
3
|
+
description: Handles all git operations for a task — branch creation, diff, staging, commit, and push. Do not commit or push unless the user explicitly asks.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
|
|
8
|
+
- Perform git operations for a task: inspect state, create branches, stage files, commit, push, and report.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Before running git operations, confirm:
|
|
13
|
+
- Requires the Git CLI: <https://git-scm.com/docs/git>.
|
|
14
|
+
- Git is available; verify with `git --version`. If unavailable, stop and ask the user to install Git or provide another environment.
|
|
15
|
+
- The current directory is inside a git worktree.
|
|
16
|
+
- The current branch or detached-HEAD state is known.
|
|
17
|
+
- `git status --short` has been inspected.
|
|
18
|
+
- The requested operation is clear: inspect, branch, stage, commit, push, or another named git action.
|
|
19
|
+
- Any operation that can change repository state has explicit user approval when required by this skill.
|
|
20
|
+
|
|
21
|
+
If the repository, branch state, or requested operation is unclear, stop and ask for the missing input.
|
|
22
|
+
|
|
23
|
+
## Safety Constraints
|
|
24
|
+
|
|
25
|
+
- Do NOT commit unless the user explicitly asks for a commit.
|
|
26
|
+
- Do NOT push unless the user explicitly asks for a push.
|
|
27
|
+
- Do NOT switch branches or pull when uncommitted changes exist without checking with the user first.
|
|
28
|
+
- Do NOT force-push or rewrite history without explicit user permission.
|
|
29
|
+
- Treat direct pushes to `main` as requiring explicit user approval.
|
|
30
|
+
- Do not use broad staging commands such as `git add -A` or `git add .` unless the user explicitly approved staging every changed file.
|
|
31
|
+
- Do not discard, overwrite, stash, reset, clean, or restore user changes without explicit approval.
|
|
32
|
+
- Do not create, delete, rewrite, or move tags unless the user explicitly requested that exact tag operation.
|
|
33
|
+
- Do not run merge, rebase, pull, or branch switch operations with uncommitted changes unless the user explicitly approved the risk.
|
|
34
|
+
- Do not use `--force`; if force push is explicitly approved, prefer `--force-with-lease` and report the exact remote and branch.
|
|
35
|
+
|
|
36
|
+
## Stop Conditions
|
|
37
|
+
|
|
38
|
+
Stop and ask before proceeding when:
|
|
39
|
+
- The repo is not a git worktree.
|
|
40
|
+
- HEAD is detached and the user requested commit, branch, pull, merge, rebase, or push.
|
|
41
|
+
- The base branch cannot be determined.
|
|
42
|
+
- The staging scope is unclear or includes unrelated files.
|
|
43
|
+
- A commit is requested but no relevant staged or stageable task changes exist.
|
|
44
|
+
- A push is requested but the target remote, branch, or upstream is unclear.
|
|
45
|
+
|
|
46
|
+
## Procedure
|
|
47
|
+
|
|
48
|
+
1. Do not assume the correct base branch. Run `git status --short` and `git branch --show-current` first.
|
|
49
|
+
2. Run `git status` to review all modified and untracked files.
|
|
50
|
+
3. Run `git diff` to confirm the changes match what was planned.
|
|
51
|
+
4. Stage only files relevant to the current task — never use `git add -A` blindly.
|
|
52
|
+
5. Perform one consequential git operation at a time, then inspect state before the next operation. Do not chain staging, committing, and pushing into a single unchecked command sequence.
|
|
53
|
+
|
|
54
|
+
### Branch Creation
|
|
55
|
+
|
|
56
|
+
When branch creation is requested, use the task classification already stated by the caller when available. If branch choice depends on task classification and classification is absent, ask for the missing input instead of classifying the task inside this skill.
|
|
57
|
+
|
|
58
|
+
#### 1. Check For Uncommitted Changes
|
|
59
|
+
|
|
60
|
+
Run `git status --porcelain`. If any uncommitted changes exist, stop immediately and ask:
|
|
61
|
+
|
|
62
|
+
> There are uncommitted changes on `<current-branch>`. Commit, stash, or abort before continuing?
|
|
63
|
+
|
|
64
|
+
Do not proceed until the user resolves this.
|
|
65
|
+
|
|
66
|
+
#### 2. Determine Whether A Branch Is Needed
|
|
67
|
+
|
|
68
|
+
| Current branch | Task | Action |
|
|
69
|
+
| --- | --- | --- |
|
|
70
|
+
| `main` or `master` | Trivial | Skip |
|
|
71
|
+
| `main` or `master` | Non-trivial | Create silently |
|
|
72
|
+
| Feature branch | Trivial | Skip |
|
|
73
|
+
| Feature branch | Related to current branch | Skip — continue on current branch |
|
|
74
|
+
| Feature branch | Unrelated, non-trivial | Ask before creating |
|
|
75
|
+
| Any | User explicitly requested | Create silently |
|
|
76
|
+
|
|
77
|
+
#### 3. Create The Branch
|
|
78
|
+
|
|
79
|
+
Detect the default remote branch first when a remote is available:
|
|
80
|
+
```bash
|
|
81
|
+
git fetch origin
|
|
82
|
+
git remote show origin | grep "HEAD branch"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Then create from it:
|
|
86
|
+
```bash
|
|
87
|
+
git checkout -b <branch-name> origin/<default-branch>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
If no remote or default remote branch is available, ask the user which base ref to use instead of treating local-only branch creation as blocked.
|
|
91
|
+
|
|
92
|
+
State the outcome before proceeding:
|
|
93
|
+
- **Skipped**: `<reason>`
|
|
94
|
+
- **Created**: `<branch-name>` from `origin/<default-branch>` or approved local base ref
|
|
95
|
+
- **Blocked**: uncommitted changes — waiting for user resolution
|
|
96
|
+
|
|
97
|
+
### Commit Rules
|
|
98
|
+
|
|
99
|
+
When the user explicitly asks for a commit:
|
|
100
|
+
- Write a commit message that explains *why* the change was made, not just what changed.
|
|
101
|
+
- Commit only staged files relevant to the current task.
|
|
102
|
+
|
|
103
|
+
## Branch Naming
|
|
104
|
+
|
|
105
|
+
New branches must use one of these prefixes:
|
|
106
|
+
|
|
107
|
+
| Prefix | Purpose |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| `feature/<name>` | New features |
|
|
110
|
+
| `fix/<name>` | Bug corrections |
|
|
111
|
+
| `refactor/<name>` | Behavior-preserving restructuring |
|
|
112
|
+
| `chore/<name>` | Maintenance, config, or tooling |
|
|
113
|
+
| `docs/<name>` | Documentation updates |
|
|
114
|
+
|
|
115
|
+
Name format: `<prefix><slugified-task-description>`
|
|
116
|
+
|
|
117
|
+
Slugify: lowercase; spaces and special characters replaced with hyphens; no leading or trailing hyphens.
|
|
118
|
+
|
|
119
|
+
## Error Handling
|
|
120
|
+
|
|
121
|
+
When any git command fails (push rejected, merge conflict, remote error, authentication error):
|
|
122
|
+
- Stop immediately.
|
|
123
|
+
- Report the exact error message to the user.
|
|
124
|
+
- Do not attempt recovery — resolution requires explicit user instruction.
|
|
125
|
+
|
|
126
|
+
## Verification
|
|
127
|
+
|
|
128
|
+
Before reporting completion, verify:
|
|
129
|
+
- After staging, `git diff --cached --name-only` contains only task-relevant files.
|
|
130
|
+
- After committing, `git status --short` and the new commit hash were inspected.
|
|
131
|
+
- After pushing, the pushed remote and branch are known.
|
|
132
|
+
- Any skipped or blocked operation is reported with the reason.
|
|
133
|
+
|
|
134
|
+
## Output Contract
|
|
135
|
+
|
|
136
|
+
Emit:
|
|
137
|
+
|
|
138
|
+
`Skill: work-with-git - output below`
|
|
139
|
+
|
|
140
|
+
Then include:
|
|
141
|
+
|
|
142
|
+
| Field | Content |
|
|
143
|
+
| --- | --- |
|
|
144
|
+
| Status | `completed`, `skipped`, or `blocked` |
|
|
145
|
+
| Operation | Git action requested and performed |
|
|
146
|
+
| Branch State | Current branch or detached HEAD |
|
|
147
|
+
| Working Tree | Clean, dirty, or blocked summary |
|
|
148
|
+
| Staged Files | Files staged, or `none` |
|
|
149
|
+
| Commit | Commit hash and message, or `none` |
|
|
150
|
+
| Push | Remote/branch pushed, or `none` |
|
|
151
|
+
| Assumptions | Inferences used, or `none` |
|
|
152
|
+
| Blockers / Errors | Git error, missing approval, unclear scope, or `none` |
|
|
153
|
+
|
|
154
|
+
If no commit or push occurred, state that explicitly.
|