Project Phase
ASecuritySets and applies the project's lifecycle phase (explore, prototype, stabilize, production, maintenance, sunset) so the agent works the way that phase needs: no over-engineering while prototyping, tech-debt tracking in production, minimal regression-safe diffs in maintenance. Use this skill whenever the user wants to set up, check or change the project phase, mode or stage; says things like \"we're just prototyping\", \"it's a quick POC\", \"this is live now\", \"maintenance only\", \"stop ove...
- 3 stars
- 0 votes
- 0 copies
- 2 views
- Added November 21, 2026
Works with
Security analysis
100/100Pro scans all 3 files and shows the line behind each finding
npx -y skills add SRGSSR/agent-skills --skill project-phase --agent claude-codeAre you the author of Project Phase?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/srgssr-project-phase)---
name: project-phase
description: "Sets and applies the project's lifecycle phase (explore, prototype, stabilize, production, maintenance, sunset) so the agent works the way that phase needs: no over-engineering while prototyping, tech-debt tracking in production, minimal regression-safe diffs in maintenance. Use this skill whenever the user wants to set up, check or change the project phase, mode or stage; says things like \"we're just prototyping\", \"it's a quick POC\", \"this is live now\", \"maintenance only\", \"stop over-engineering\", \"don't touch anything else\"; asks whether the project is ready for production; or wants to review tech debt or shortcuts; or wants to turn it on or off for a project (`/project-phase on`, `off`, \"disable project-phase here\") or types `/project-phase help`. Also use it when a project-phase block exists and it is unclear how the phase applies or the phase seems wrong, and before a code change in a repo with no project-phase block or off marker when the user's global instructions contain `project-phase: ask`."
license: MIT
argument-hint: "[setup | on | off | help]"
metadata:
version: "0.6.3"
---
# Project Phase
The right way to write code depends on where a project is in its life. A prototype needs speed and zero ceremony. A live product needs tests, compatibility and an eye on tech debt. A system in maintenance needs the smallest possible diff. AI agents tend to apply "large project best practices" everywhere: full scaffolding on day one, early generalization, improvement suggestions nobody asked for. Or the opposite: casual sweeping edits in code that must not regress.
This skill makes the phase explicit and gives the agent a behavior contract for it.
Commands:
- `/project-phase`: the [status](#status).
- `/project-phase setup`: set it up, or review the choices of a project already set up. See [Setup](#setup-first-use-in-a-project).
- `/project-phase on`, `/project-phase off`: turn it on or off for this project. See [On / off](#on--off).
- `/project-phase help`: this list, with the current phase (or off, or not set up) from the block in `AGENTS.md`. Read only the block; run nothing else.
Everything else works in words: change the phase ("this is live now"), review the debt, add an area override or a custom rule.
## How it works
Two pieces, both plain Markdown in the repo, readable by any agent or human:
1. **Contract block** - about 15 lines between `<!-- project-phase:start -->` and `<!-- project-phase:end -->` in `AGENTS.md` (and loaded from `CLAUDE.md`). Agent tools load these files on every task, so the phase shapes all work even when this skill is not loaded. This is the part that matters day to day, which is why it must stay short.
2. **State files** in `.ai/`:
- `phase.md` - phase set, current phase, area overrides, custom rules, history.
- `debt.md` - one-line register of deliberate shortcuts and tech debt.
This skill manages those files: setup, status, phase changes, debt reviews, turning it on or off, and interpreting the phase in unclear cases.
## On / off
The user can turn the skill off for one project, with `/project-phase off`, or by asking in words, and turn it back on with `/project-phase on`.
**Off** means `AGENTS.md` contains the one-line marker `<!-- project-phase:off -->` instead of the contract block. The marker exists so that this skill does not add the block back on its own. While it is there:
- Don't run setup, don't write the block, don't write `.ai/phase.md` or `.ai/debt.md` unprompted.
- Do what the user explicitly asks this time (a status, a debt review, a phase change in `phase.md`), without turning the skill back on. Mention once, in one line, that project-phase is off here and `/project-phase on` re-enables it.
**To turn it off:**
1. Replace the contract block, from `<!-- project-phase:start -->` to `<!-- project-phase:end -->` inclusive, with `<!-- project-phase:off -->`. If there is no block, add the marker near the top of `AGENTS.md` (create the file if missing).
2. The block is rebuilt from `.ai/phase.md` on `on`, so hand edits to it would be lost. If the block has bullets that are not in the phase contract nor in `phase.md`, move them to `## Custom rules` in `phase.md` first and say so.
3. Leave the rest of `.ai/` and any `@AGENTS.md` line in `CLAUDE.md` as they are.
4. Report in one line: off for this project, state kept in `.ai/`, `/project-phase on` restores it.
**To turn it on:**
- If the block is already there, say so and show the status.
- If the marker is there and `.ai/phase.md` exists, replace the marker with the contract block rebuilt from `phase.md` as in setup step 4 (current phase and its since-date, area overrides, custom rules, footer), and make sure `CLAUDE.md` imports `AGENTS.md`. Report the phase in one line, and in one more line any signal that it no longer fits.
- If there is no `.ai/phase.md`, remove the marker and run setup.
## Principles that hold in every phase
- **The phase sets defaults, not prohibitions.** An explicit request from the user wins for that task. Do it without lecturing. If the user keeps overriding the contract in the same direction, the phase is probably wrong: say so once.
- **Some things are never relaxed:** no secrets in code, commits or logs; no destructive operations (data, history, infrastructure) without confirmation; honest reporting of what is untested or incomplete. Speed is never a reason to hide a known risk.
- **The contract wins over generic coding-style instructions.** Global rules or style skills (minimalism, "always add tests", ...) apply within the phase; where they conflict with the contract, follow the contract, because it is the team's choice for this project. Explicit requests from the user still win for that task.
- **Never change the phase on your own.** When you are not sure the phase is right, ask (see [When the phase is not certain](#when-the-phase-is-not-certain)); a change happens only when the user decides it.
- **Process cost follows the phase.** In explore and prototype, even this skill's bookkeeping stays minimal: one-line debt entries, no reports.
- **Talk in the user's language.** This skill is written in English, but reports, questions and the final message go in the language the user writes in. Files (`AGENTS.md` blocks, `.ai/`) keep the language they already use; new ones are in English.
## When the phase is not certain
The phase is certain only when it is recorded and consistent: the contract block in `AGENTS.md` matches `.ai/phase.md`. Signals in the repo (age, CI, tags, deploy files) never make it certain on their own. Ask the user, in one question with your best guess and the reason, in three cases:
- **Not recorded:** no block, no off marker, no `.ai/phase.md`, and the user's global instructions contain `project-phase: ask`. Ask before the first code change. On an answer, run [Setup](#setup-first-use-in-a-project) with that phase (the set from the global instructions, or `standard`), propose project-specific rules in the report instead of a second question, then continue with the original request. If the user does not want phases here, add the off marker (see [On / off](#on--off)). Without `project-phase: ask`, don't set up on your own.
- **Inconsistent:** the block and `phase.md` disagree, or the phase is not in the set. Ask which one holds, then rebuild the block from `phase.md` as in setup step 4.
- **Signals against the recorded phase:** the user mentions real users in a prototype, the repo gained deploy files and release tags, only fixes arrive in production for months (more in [references/transitions.md](references/transitions.md#drift-signals)). First read the history in `phase.md`: if a line already confirms the phase for the same reason, don't ask again. Otherwise ask whether the phase still fits. If the user keeps it, add a history line, for example `- 2026-11-03: confirmed prototype (asked: deploy files present; still a demo for the pilot team)`. If the user wants to change it, follow [Changing phase](#changing-phase).
If the user doesn't answer or says "later", record nothing. Continue under the recorded phase, or, if there is none, under the phase the signals suggest, and say so in one line ("Assuming production: release tags and CI"). Ask at most once per session. When you cannot ask (non-interactive runs), put the question in the final message.
## Phases
| Phase | Optimizes for | Agent stance in one line |
|---|---|---|
| `explore` | Answering a question | Disposable code, the output is the learning |
| `prototype` | Validating the idea fast | Simplest thing that works, no unsolicited advice |
| `stabilize` | Getting safe for real users | Structural work expected: tests, CI, config, error handling |
| `production` | Shipping without breaking | Follow patterns, test new code, occasional structural suggestions, track debt |
| `maintenance` | Zero regressions | Smallest diff, touch nothing else, note issues instead of fixing them |
| `sunset` | Winding down safely | Only critical fixes and migration support |
Full behavior per phase, the contract blocks to copy, and typical mistakes: [references/phases.md](references/phases.md).
### Phase sets (presets)
Not every team needs six phases. The set is chosen at setup and stored in `phase.md`:
- `simple`: prototype → production → maintenance
- `standard` (default): prototype → stabilize → production → maintenance
- `full`: explore → prototype → stabilize → production → maintenance → sunset
- `custom`: any subset of the catalog, plus optional project-defined phases
If the user's global instructions name a default set (for example `project-phase set: simple`), use it without asking. With `simple`, there is no stabilize phase, so its checklist runs as part of the prototype → production transition.
## Workflows
### Setup (first use in a project)
1. **Check for existing state.** If `AGENTS.md` has the `<!-- project-phase:off -->` marker, follow [On / off](#on--off): set up only if the user explicitly asks, and then remove the marker. If `.ai/phase.md` or a contract block exists, show status instead of starting over; on an explicit `/project-phase setup`, review instead (below).
2. **Read the signals** cheaply: top-level listing, README, `git log --oneline | head -20`, commit count and age, CI config, tests, deploy files, version and tags, CHANGELOG. The signal table is in [references/transitions.md](references/transitions.md#detecting-the-phase). Do not read the source tree for this.
3. **Propose, then ask.** Recommend a phase set and a current phase with two or three lines of reasoning, and ask the user to confirm. Signals only suggest: the phase reflects what the team wants to optimize now, not just repo age. A new repo can be production on day one (a rewrite of a live service); an old one can be back in prototype for a new direction. If parts of the repo clearly differ (an experiments folder, a frozen legacy module), propose area overrides.
Also propose up to three **project-specific rules** that the generic contract cannot know but the signals reveal, especially where a mistake would be costly. For example: migrations that already ran must never be edited; old mobile app versions keep calling the API, so responses only grow; a folder is generated and must not be edited by hand. Only rules grounded in what you read, one line each. Generic best practices don't belong here.
4. **Write the files:**
- `.ai/phase.md` from the template below, with the accepted project-specific rules under `## Custom rules`.
- The contract block for the chosen phase, copied from `references/phases.md`, with the date filled in and the accepted project-specific rules added as bullets just above the footer, into `AGENTS.md`. Create `AGENTS.md` if missing; otherwise insert the block near the top, leaving existing content untouched.
- Claude Code reads `AGENTS.md` only when there is no `CLAUDE.md`. So if `CLAUDE.md` exists and does not already import it, add a line `@AGENTS.md` near the top. Never duplicate the block in both files.
- Do not create `.ai/debt.md` yet. It is created on first entry.
- Add the line `.ai/debt.md merge=union` to `.gitattributes` (create the file if missing) unless it is already there: when two branches add debt items, git keeps both instead of reporting a conflict.
5. **Report** in two or three lines: phase, set, files touched.
**Review (`/project-phase setup` on a project already set up).** Show the current set, phase, area overrides and custom rules in a few lines, read the signals as in step 2, and propose only what they suggest changing: a phase change (run it as in [Changing phase](#changing-phase)), another set, an override, a rule. Change only what the user confirms, rebuild the block from `phase.md` as in step 4, and add a history line. Before rebuilding, move bullets of the block that are neither in the phase contract nor in `phase.md` to `## Custom rules` in `phase.md`, and say so: the rebuild would drop them. Add what step 4 finds missing, without asking: the `.gitattributes` line and the `@AGENTS.md` import in `CLAUDE.md`. Never rewrite the history or touch `.ai/debt.md` here. If nothing needs to change, say so in one line.
### Status
Answer from the contract block and `phase.md`: current phase and since when, what it means in practice (three bullets), area overrides, open debt count, and any signals that the phase may no longer fit.
### Changing phase
1. Confirm the target phase with the user, unless they already stated it clearly.
2. Run the transition checklist from [references/transitions.md](references/transitions.md#transition-checklists). Present it as a short prioritized list (must now / should soon / later) and ask what to do now. Some transitions generate real work (prototype → stabilize); others are mostly a change of stance (production → maintenance). Do not start the work without agreement.
The plan must outlive the session, because a transition like stabilize takes weeks: add each gap the checklist found as an open item in `.ai/debt.md` (skip those already there), with its priority (`must`, `soon`, `later`). If the user changes the priorities, update the lines. If the `work-journal` block names a task list, larger items also become tasks that link the debt item.
3. Update `phase.md` (current phase, history line with date and reason) and replace the contract block with the one for the new phase, after moving its hand-written bullets to `phase.md` as in the setup review.
4. If the `work-journal` skill is in use, log the change in the journal.
### Debt review
Read `.ai/debt.md`, group items by area and impact, and propose what to fix, accept or drop, fitted to the phase. In prototype, only blockers for the next milestone matter. In stabilize, everything must be resolved or consciously accepted. In production, propose the two or three items with best impact per effort. In maintenance, only items that threaten stability. After the user decides, mark accepted items with the reason, and delete the lines of fixed or dropped items.
### When unsure how the phase applies
Load [references/phases.md](references/phases.md) and use the behavior table for the current phase. If the request falls between two readings, choose the one more conservative for the codebase in production and maintenance, and the one cheaper in effort in explore and prototype. In one line, state the assumption you made.
## Area overrides
Parts of a repo can live in a different phase: `experiments/` in explore while the product is in production, a legacy module in maintenance while the rest evolves. Overrides live in `phase.md` and are listed in the contract block with the one-line stance of each phase (taken from the table above), for example:
```
Area overrides (apply the phase of the files you change; strictest wins if a change spans areas):
- `legacy/billing/` → maintenance: smallest diff, touch nothing else, regression test.
- `experiments/` → explore: disposable code, the output is the learning.
```
## Custom rules and phases
Teams can tune a phase without forking the skill. Project-specific rules go under `## Custom rules` in `phase.md` and are appended to the contract block as extra bullets: keep them few, because the block is loaded on every task. A fully custom phase is defined in `phase.md` under `## Custom phase: <name>` with the same shape as the built-in contracts (goal line plus at most 8 bullets); copy it into the block like any other phase.
## Templates
### `.ai/phase.md`
```markdown
# Project phase
Phase set: standard (prototype → stabilize → production → maintenance)
Current: prototype (since 2026-10-02)
## Area overrides
<!-- `path/` → phase: reason -->
## Custom rules
<!-- Optional bullets appended to the contract block. Keep them few. -->
## History
- 2026-10-02: set to prototype (setup). New repo, validating the idea with two pilot users.
```
### `.ai/debt.md`
```markdown
# Tech debt and shortcuts
<!-- One line per item, newest first. Status: open | accepted. Delete the line when fixed (git keeps it). -->
- [open] 2026-10-02 · `src/auth/` · Auth stubbed: any email logs in. Fix before real users.
- [accepted] 2026-09-28 · `src/report.js` · Report built in memory: fine up to 10k rows, the expected maximum.
```
One line per item: date, area, what and why it matters. In prototype, log only deliberate shortcuts that would hurt later (stubbed auth, no input validation, in-memory storage, hardcoded credentials placeholder), not every hardcoded value. During a phase transition, a priority goes after the date: `- [open] 2026-11-03 · must · src/auth/ · ...`.
Fixed items are deleted instead of marked: the file stays short, and with `merge=union` two branches changing the status of the same line would otherwise leave both versions. Accepted items stay, because they record a decision.
Inline markers next to the code (`TODO`, `FIXME`, or a team's own marker for deliberate shortcuts) are fine. A shortcut that matters for the whole project also gets a line here, so it is found at the next transition or debt review.
Files in this skill
- SKILL.md
- references/phases.md
- references/transitions.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.