Skip to content

Commit 9d84898

Browse files
authored
Merge pull request #2978 from adobe/copilot/add-cross-references-instructions
Cross-reference refactor, test, and document skills from implement; add refactor guidance to test and review
2 parents 1a44241 + 0def515 commit 9d84898

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.claude/skills/implement/SKILL.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@ description: Implement features, fix bugs, or refactor code. Use when asked to a
55

66
# Implementation Skill — S3Mock
77

8-
Read `AGENTS.md` (root + relevant module) before making changes — especially DO/DON'T, code style, and architecture sections.
8+
> **Before making any changes**: Read `AGENTS.md` (root + relevant module). These files are the authoritative source for architecture, conventions, and guardrails — they must be read, not skipped.
9+
10+
## Skill Workflow
11+
12+
A complete feature implementation requires these skills — run them in sequence:
13+
14+
1. **`refactor` skill** — if nearby existing code, tests, or configuration would benefit from cleanup *before* adding new code, do it first rather than working around it
15+
2. **`implement` skill** (this skill) — write the production code
16+
3. **`test` skill** — add/update unit and integration tests (`*Test.kt`, `*IT.kt`)
17+
4. **`document` skill** — update `CHANGELOG.md`, `README.md`, and `AGENTS.md` where applicable
18+
19+
> **Prefer refactoring over workarounds**: if you find yourself adding complexity to work around existing code, stop and invoke the `refactor` skill to clean it up first.
920
1021
## Implementation Flow for New S3 Operations
1122

@@ -18,12 +29,12 @@ Follow **DTO → Store → Service → Controller** (see AGENTS.md Architecture)
1829

1930
## Checklist
2031

21-
- [ ] Read root + module `AGENTS.md`
32+
- [ ] Read root + module `AGENTS.md` (required before any other step)
2233
- [ ] Identify the S3 API operation ([AWS docs](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html))
2334
- [ ] Review existing similar implementations
2435
- [ ] Run `./mvnw ktlint:format` then `./mvnw clean install`
25-
- [ ] Add/update unit tests (`*Test.kt`) and integration tests (`*IT.kt`)
26-
- [ ] Update `CHANGELOG.md` and operations table in `README.md` if applicable
36+
- [ ] Invoke the **`test` skill** to add/update unit and integration tests
37+
- [ ] Invoke the **`document` skill** to update `CHANGELOG.md`, `README.md`, and `AGENTS.md`
2738

2839
## Troubleshooting
2940

.claude/skills/review/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ See **[docs/KOTLIN.md](../../../docs/KOTLIN.md)** for the full list of idioms an
4848
Structure feedback as:
4949

5050
- **Must fix** — blocks merge (correctness issues, convention violations, missing tests)
51-
- **Should fix** — strongly recommended (idiom improvements, missing docs)
51+
- **Should fix** — strongly recommended (idiom improvements, missing docs); suggest invoking the **`refactor` skill** for purely readability/style improvements rather than asking the author to add more code
5252
- **Nit** — optional style suggestions
5353

5454
For each finding, reference the specific AGENTS.md rule or AWS API doc where applicable.

.claude/skills/test/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Read **[docs/TESTING.md](../../../docs/TESTING.md)**, **[docs/KOTLIN.md](../../.
1919
## Checklist
2020

2121
- [ ] Read `docs/TESTING.md` and root + module `AGENTS.md`
22+
- [ ] If existing tests have structural problems (poor naming, shared state, weak assertions), invoke the **`refactor` skill** to fix them rather than working around them
2223
- [ ] Tests pass locally
2324
- [ ] Both success and failure cases covered
2425
- [ ] Tests are independent (no shared state, UUID bucket names)

0 commit comments

Comments
 (0)