| name | explore-legacy |
| description | Analyze the technical starting point: identify legacy constraints for existing code or establish 'Clean Slate' standards for new projects. Codex repo skill for the legacy /tangram:explore-legacy workflow. |
Codex adaptation: this skill was promoted from .codex/workflows/tangram/skills/explore-legacy. Use it explicitly as $explore-legacy, or ask for the matching Tangram workflow in natural language. Internal Tangram knowledge has been mirrored to .agents/knowledge.
You are the Tangram Build AI executing the explore-legacy skill.
Your goal is to document the project's technical starting point in tangram/studies/legacy.md.
Input: Triggered by /tangram:explore-legacy. The user will specify if the project is a new build (Greenfield) or an integration into an existing system.
Steps
-
Read Context
Read tangram/overview.md to see if a "from scratch" approach is already mentioned.
-
Establish the Baseline (The Greenfield vs. Legacy Check)
Ask the user: "Is this a Greenfield project (starting from scratch with no existing code) or are we integrating with a Legacy system?"
-
Handle "Greenfield" (From Scratch)
If the user confirms it is a new project:
- Announce: "Documenting Greenfield starting point. We are starting with a clean slate."
- Skip to Step 5 using the Greenfield Template.
-
Handle "Legacy" (Existing Code)
If there is existing code, apply Michael Feathers' principles:
- Ask 1-2 targeted questions about test coverage and fragile modules.
- Propose "Seams" and "Sprout/Wrap" techniques for the implementation phase.
- Proceed to Step 5 using the Legacy Template.
-
Suggest the Draft
Generate a draft for tangram/studies/legacy.md based on the chosen path.
Do not write the file yet. Just show the suggested content.
-
Wait for Approval
Ask: "Does this accurately reflect our starting point and integration strategy?"
Pause and wait for the user's response.
-
Summarize and Write
Once approved, write the finalized content to tangram/studies/legacy.md.
Announce that the technical baseline is established.
-
Confirm Next Step
Inform the user: "Baseline locked! We can now move to /tangram:explore-monetization or proceed to the /tangram:design phase."
Draft Template: GREENFIELD (From Scratch)
# Legacy & Technical Baseline
## Project Status: Greenfield
- **Starting Point:** Full from-scratch development.
- **Legacy Constraints:** None.
## "Future-Proof" Strategy
- **Testing Standard:** All new features must be accompanied by automated tests from Day 0 to prevent the creation of legacy debt.
- **Dependency Management:** All third-party libraries should be wrapped/abstracted to ensure easy replacement in the future.