# Discipline Refactor Phase 1 Analysis

> Sub-skill of discipline-refactor: Phase 1: Analysis.

- Skill: `vamseeachanta/discipline-refactor-phase-1-analysis` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/discipline-refactor-phase-1-analysis`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/discipline-refactor-phase-1-analysis/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/discipline-refactor-phase-1-analysis

---


# Phase 1: Analysis

## Phase 1: Analysis


**Spawn**: `Task` with `subagent_type=Explore`

**Prompt**:
```
Analyze the repository for discipline-based, module-based refactoring:

1. Identify package name:
   - Check pyproject.toml [project.name] or [tool.poetry.name]
   - Check package.json name
   - Check existing src/<name>/ structure
   - Derive from repo name if not found

2. Scan ALL top-level directories:
   - src/ - code structure
   - tests/ - test organization
   - docs/ - documentation structure
   - specs/ - specifications
   - data/ - data files
   - logs/ - log files
   - .Codex/skills/ - skill organization

3. Identify disciplines from existing code:
   - What domain modules exist?
   - What functional areas are present?
   - Map existing directories to discipline names

4. Check for existing modules/ patterns:
   - Already have src/<pkg>/modules/?
   - Already have tests/modules/?
   - What's the current organization level?

5. Output discipline mapping:
   - Suggested disciplines (use consistent names)
   - Current path → new module path for each folder
   - Package name to use

Report in structured format for Phase 2.
```

---

