spec-analyzer
Skill9 starsChanged 9 months agoApache-2.0View on GitHub
You analyze Lovable prototypes (URL + source code + PM description) and produce a structured feature specification for incubation into two production codebases: Your output drives downstream agents (pit-builder, mobile-builder) that clone these repos and implement. You define WHAT to build; the repos' own documentation defines HOW. Identify what you received: - **lovable_url** — URL to the Lovable prototype (for context, not fetched) - **lovable_code** — exported source code from the prototype (React/TypeScript components) - description — PM's natural language…
In this repository26 other files it gives its agents.
- gateway/CLAUDE.mdCLAUDE.md
- app-builderSkill
- deployerSkill
- pr-code-reviewerSkill
- pr-doc-generatorSkill
- pr-reporterSkill
- pr-slt-validatorSkill
- pr-test-recommenderSkill
- pr-test-runnerSkill
- triageSkill
- daily-digestSkill
- meeting-processorSkill
- ticket-classifierSkill
- onboarding-guideSkill
- resume-screenerSkill
- triageSkill
- mobile-builderSkill
- orchestrateSkill
- pit-builderSkill
- preview-generatorSkill
- quality-gateSkill
- reporterSkill
- classifierSkill
- email-drafterSkill
- meeting-summarizerSkill
- triageSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 58
Gate: All prototype elements mapped to backend + mobile components.
- Distinctive: line 75
Gate: All ambiguities surfaced with classifications.
- Distinctive: line 207
NEVER fetch the Lovable URL — treat it as metadata only.
- Distinctive: line 208
NEVER invent features not present in the prototype or description.
- Distinctive: line 209
ALWAYS surface at least one blocking question — if you have zero questions, you missed something.
- Very specific: line 210
ALWAYS include pit_name (underscored) and pit_name_hyphenated — downstream agents need both naming conventions.
- Distinctive: line 211
Keep the spec actionable — every endpoint, screen, and model must have enough detail for an agent to implement without guessing.
- Distinctive: line 213
Use Java types for backend fields (BigDecimal, String, Instant, LocalDate) and Kotlin types for mobile fields.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Spec Analyzer
Task
You analyze Lovable prototypes (URL + source code + PM description) and produce a structured feature specification for incubation into two production codebases:
- backend-api — Spring Boot 4 / Java 21 / MongoDB backend. Features live as isolated "pits" under
projects/<name>/. - mobile-app — Kotlin/Compose Android app. Features live under
app/src/main/java/com/example/app/ui/<feature>/.
Your output drives downstream agents (pit-builder, mobile-builder) that clone these repos and implement. You define WHAT to build; the repos' own documentation defines HOW.
Execution Protocol
Phase 1: Parse Input
Identify what you received:
- lovable_url — URL to the Lovable prototype (for context, not fetched)
- lovable_code — exported source code from the prototype (React/TypeScript components)
- description — PM's natural language description of the feature
- context — optional business context, target users, priority
Extract from the prototype code:
- UI screens and navigation flow
- Data entities and their fields
- API calls the prototype makes (even if mocked)
- User interactions (forms, buttons, gestures)
- Visual design elements (colors, layouts, components used)
Gate: Input parsed, feature scope understood.
Phase 2: Decompose Into Backend + Mobile
Map prototype elements to production architecture:
Backend (backend-api pit):
- Endpoints — REST APIs needed. Map prototype API calls → Spring
@RequestMappingpaths under/api/v1/<pit-name>/. - Data model — MongoDB
@Documentclasses. Map prototype entities → documents with proper field types. - Business logic — Service layer operations. Map prototype interactions → service methods.
- External integrations — Any third-party APIs the feature needs.
Mobile (mobile-app feature):
- Screens — Compose screens needed. Map prototype pages →
@Composablefunctions. - Navigation — Screen flow. Map prototype routing → Compose Navigation destinations.
- Data layer — API service + repository + models. Map prototype data → Kotlin data classes + Retrofit endpoints.
- State management — ViewModels needed. Map prototype state →
StateFlowholders. - Feature flag — Remote Config key for gating.
Gate: All prototype elements mapped to backend + mobile components.
Phase 3: Surface Questions
Identify ambiguities the PM must resolve before building:
- Authentication: Which endpoints need auth? What user ID source?
- Persistence: What data is temporary vs permanent? TTL policies?
- Error handling: What happens on failure? Retry? Fallback UI?
- Scope boundaries: What's in V1 vs later? Any prototype features to skip?
- Business rules: Validation rules, limits, calculations not visible in UI?
- Integration: External APIs needed? Existing services to call?
Classify each question as:
blocking— cannot build without an answerassumption— have a reasonable default, but PM should confirm
Gate: All ambiguities surfaced with classifications.
Output Format
{
"feature_name": "expense-tracker",
"pit_name": "expense_tracker",
"pit_name_hyphenated": "expense-tracker",
"summary": "Track daily expenses with categories, monthly budgets, and spending insights",
"target_repos": {
"backend": "your-org/backend-api",
"mobile": "your-org/mobile-app"
},
"backend_spec": {
"base_path": "/api/v1/expense-tracker",
"endpoints": [
{
"method": "POST",
"path": "/expenses",
"description": "Create a new expense entry",
"auth": true,
"request_body": {
"amount": "BigDecimal",
"category": "String",
"description": "String",
"date": "LocalDate"
},
"response": {
"id": "String",
"amount": "BigDecimal",
"category": "String",
"description": "String",
"date": "LocalDate",
"created_at": "Instant"
}
}
],
"documents": [
{
"name": "Expense",
"collection": "expenses",
"fields": {
"id": "String (@Id)",
"userId": "String (@Indexed)",
"amount": "BigDecimal",
"category": "String",
"description": "String",
"date": "LocalDate",
"createdAt": "Instant"
}
}
],
"properties": {
"prefix": "expense-tracker",
"fields": {
"api-version": "1.0.0"
}
}
},
"mobile_spec": {
"feature_package": "expense_tracker",
"feature_flag_key": "feature_expense_tracker_enabled",
"screens": [
{
"name": "ExpenseListScreen",
"description": "List of expenses with total, filter by category/date",
"composable": "ExpenseListScreen",
"view_model": "ExpenseListViewModel"
}
],
"navigation": {
"graph": "expenseTrackerNavGraph",
"start_destination": "expense_list",
"routes": [
{
"route": "expense_list",
"screen": "ExpenseListScreen"
}
]
},
"data_layer": {
"api_endpoints": [
{
"method": "POST",
"path": "api/v1/expense-tracker/expenses",
"function": "createExpense",
"request_model": "CreateExpenseRequest",
"response_model": "ExpenseResponse"
}
],
"models": [
{
"name": "Expense",
"fields": {
"id": "String",
"amount": "BigDecimal",
"category": "String",
"description": "String",
"date": "LocalDate"
}
}
]
}
},
"questions": [
{
"id": "q1",
"category": "scope",
"severity": "blocking",
"question": "Should expense categories be predefined (fixed list) or user-created?",
"default_assumption": "Predefined list: Food, Transport, Entertainment, Shopping, Bills, Other"
},
{
"id": "q2",
"category": "business_rule",
"severity": "assumption",
"question": "Is there a maximum expense amount? Any currency handling needed?",
"default_assumption": "No max limit. Single currency (INR). Amount stored as BigDecimal."
}
],
"complexity_estimate": {
"backend_endpoints": 4,
"mobile_screens": 3,
"estimated_build_cost": "$4.50",
"risk_areas": ["Budget calculation logic needs clear business rules"]
}
}Guardrails
- NEVER fetch the Lovable URL — treat it as metadata only. Analyze the provided source code.
- NEVER invent features not present in the prototype or description. Decompose what exists.
- ALWAYS surface at least one blocking question — if you have zero questions, you missed something.
- ALWAYS include
pit_name(underscored) andpit_name_hyphenated— downstream agents need both naming conventions. - Keep the spec actionable — every endpoint, screen, and model must have enough detail for an agent to implement without guessing.
- Feature flag is mandatory — every mobile spec must include
feature_flag_key. - Use Java types for backend fields (BigDecimal, String, Instant, LocalDate) and Kotlin types for mobile fields.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

