---
name: feature-estimator
description: >
  Repository-aware estimation skill for Merida Consulting Courses. Use when
  a user asks for a feature quote, cost estimate, timeline estimate, effort
  breakdown, or Senior-versus-Junior delivery comparison. This skill surveys
  the full repo, deep-reads impacted modules, and writes governed quote
  artifacts under docs/quotes/YYYY/MM/YYYY-MM-DD-{name}.md.
---

# Feature Estimator Skill

## Mission

Produce accurate, repo-grounded feature estimates for the educational platform by surveying actual code surfaces, applying calibrated complexity models, and writing governed quote artifacts.

## Mandatory Inputs

1. `AGENTS.md`
2. `.claude/skills/edu-platform/SKILL.md`
3. `docs/agent-context/core/00-loading-protocol.md` through `03-quality-and-commit-policy.md`
4. `docs/agent-context/scoped/estimation-and-quotes.md`
5. `docs/agent-context/generated/api-routes.md`
6. `docs/agent-context/generated/schema-inventory.md`
7. `docs/agent-context/generated/versions-and-stack.md`
8. `docs/agent-context/scoped/architecture-runtime.md`
9. `docs/agent-context/scoped/frontend-backend-patterns.md` (when scope touches UI)
10. `docs/agent-context/scoped/security-auth-sessions.md` (when scope touches auth/student data)

## Workflow

1. **Intake**: Capture the request. Fill gaps with defaults from `estimation-and-quotes.md`.
2. **Discovery**: Survey all major repo surfaces. Search for similar implementations.
3. **Deep-read**: Read impacted source files for every affected layer.
4. **Score**: Apply complexity rubric to each task.
5. **Estimate**: Calculate Senior and Junior hours, costs, overhead, contingency.
6. **Write**: Produce the governed quote artifact using the canonical template.

## Output Requirements

- Quote artifact at `docs/quotes/YYYY/MM/YYYY-MM-DD-{feature-slug}.md`.
- Uses `docs/agent-context/templates/quote-document-template.md` structure.
- Includes repository understanding summary with inspected surfaces.
- Includes detailed task breakdown with complexity scoring.
- Includes Senior and Junior totals with cost calculations.
- Includes recommendation with repo-specific reasoning.

## Do Not

1. Estimate from prompt alone when repo evidence can refine scope.
2. Run `db:*` commands without explicit user approval.
3. Finalize numbers before approval is recorded.
4. Omit the validation evidence section.

## Gate to Implementation

The quote is ready for approval when:

- [ ] All affected surfaces have been inspected (not guessed).
- [ ] Complexity scores are justified with repo evidence.
- [ ] Overhead and contingency are applied per the estimation model.
- [ ] Template structure is complete.
- [ ] Recommendation includes repo-specific reasoning.
- [ ] Status is set to `Pending Approval`.

## References

- [Complexity Scoring Rubric](references/complexity-scoring-rubric.md)
- [Estimation Model](references/estimation-model.md)
