From legacy-investigation
Systematically investigate Service/UseCase/Model specifications and organize them in Service specification summary format. Combines investigative discovery with detailed specification documentation. Deploy scouts (Explore agents) for rapid initial investigation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/legacy-investigation:current-specThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> This is a generic skill from [CLysis](https://github.com/t-hasuike/CLysis).
This is a generic skill from CLysis. Terminology can be customized via
config/terminology.md.
Investigate the specification of the specified Service/UseCase/Model and organize it in a unified format. This skill combines rapid investigative discovery (scout mode) with comprehensive detailed specification documentation.
$ARGUMENTS
Context check: Review CLAUDE.md to understand project overview, repository structure, and tech stack
Domain knowledge check: Check domain knowledge files under knowledge/domain/ to understand knowledge related to the investigation target
Target file identification: Identify file paths using Serena's find_symbol
Symbol overview retrieval: Get method list using get_symbols_overview
Dependency investigation: Identify callers/callees using find_referencing_symbols
Detailed reading: Read only important method bodies using find_symbol
Survival check: Verify the investigation target is still actively used
| Check Item | Method | Criteria |
|---|---|---|
| Caller existence | Serena find_referencing_symbols | At least 1 reference must exist. If 0, record as "dead code candidate" |
| Last commit date | git log -1 --format=%ci [file_path] | If >1 year since last update, record as "low activity". Record fact only — do not propose deletion |
| Runtime usage | Check route definitions, cron schedules, queue registrations | May be used at runtime even without static references |
Note: Dead code candidate / low activity judgments are factual records only. Do not propose deletion or refactoring (state-comprehension phase rule).
Diff check: If the same class exists in multiple repositories, check differences
# [Service/UseCase Name] Specification Summary
**File Path**: `app/Services/xxx/xxxService.php`
**Repository**: [Target repository (each repository if multiple)]
**Last Investigation Date**: YYYY-MM-DD
---
## 1. Role (Responsibility)
[Explain the responsibility of this Service/UseCase in 1-2 sentences]
**Callers**:
- [Controller/UseCase name]: [Purpose]
- [Batch name]: [Purpose]
---
## 2. Key Feature List
| Method Name | Description | Visibility | Line Numbers |
|-------------|-------------|------------|--------------|
| `methodA()` | ... | public | 45-67 |
| `methodB()` | ... | private | 70-85 |
> **Checkpoint**: After completing the key feature list, report progress to the leader and confirm the investigation scope before proceeding to dependency and side-effect analysis.
### Key Method Details
#### methodA()
- **Description**: ...
- **Parameters**: `$param1` (type), `$param2` (type)
- **Return value**: type
- **Processing flow**:
1. ...
2. ...
---
## 3. Dependent Classes/Modules
### Internal Dependencies (same repository)
| Type | Class Name | Purpose | File Path |
|------|-----------|---------|-----------|
| Model | xxx | ... | app/xxx.php |
| Enum | xxx | ... | app/Enums/xxx.php |
### External Dependencies (other repositories / external services)
| Type | Name | Purpose |
|------|------|---------|
| API | xxx | ... |
| DB | xxx table | ... |
---
## 4. Notable Items (Legacy Code / Technical Debt)
### Hardcoded Locations
| Line Number | Content | Impact | Improvement Proposal |
|-------------|---------|--------|---------------------|
| 25-30 | Category array | Requires modification when adding new categories | Dynamic retrieval from DB/Enum |
### Technical Debt
| Item | Details | Priority |
|------|---------|----------|
| typo | Typo in `ClassName` | Medium |
| duplication | Processing duplication between xxx and yyy | Low |
### Cross-Repository Differences
| Item | Repository A | Repository B | Response Policy |
|------|-------------|-------------|-----------------|
| xxx | Present | Absent | No action needed |
---
## Change History
| Date | Description |
|------|-------------|
| YYYY-MM-DD | Initial version |
Upon investigation completion, verify the following:
filename:line_number format| Type | Description | Required/Optional | Example |
|---|---|---|---|
| Target class | Service/UseCase/Model name | Required | OrderService, CreateOrderUseCase |
| Repository | Target repository specification | Optional | backend, frontend |
| Type | Format | Destination |
|---|---|---|
| Service specification summary | Detailed Markdown (method list, dependencies, business rules) | stdout (report to leader) |
/change-impact -- Impact analysis with specification understandingProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub t-hasuike/clysis --plugin legacy-investigation