agentleFS
srinidhis05srinidhis05/agentura/skills/incubator/spec-analyzer/SKILL.md

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…

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
  1. Distinctive:

    Gate: All prototype elements mapped to backend + mobile components.

    line 58
  2. Distinctive:

    Gate: All ambiguities surfaced with classifications.

    line 75
  3. Distinctive:

    NEVER fetch the Lovable URL — treat it as metadata only.

    line 207
  4. Distinctive:

    NEVER invent features not present in the prototype or description.

    line 208
  5. Distinctive:

    ALWAYS surface at least one blocking question — if you have zero questions, you missed something.

    line 209
  6. Very specific:

    ALWAYS include pit_name (underscored) and pit_name_hyphenated — downstream agents need both naming conventions.

    line 210
  7. Distinctive:

    Keep the spec actionable — every endpoint, screen, and model must have enough detail for an agent to implement without guessing.

    line 211
  8. Distinctive:

    Use Java types for backend fields (BigDecimal, String, Instant, LocalDate) and Kotlin types for mobile fields.

    line 213

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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):

  1. Endpoints — REST APIs needed. Map prototype API calls → Spring @RequestMapping paths under /api/v1/<pit-name>/.
  2. Data model — MongoDB @Document classes. Map prototype entities → documents with proper field types.
  3. Business logic — Service layer operations. Map prototype interactions → service methods.
  4. External integrations — Any third-party APIs the feature needs.

Mobile (mobile-app feature):

  1. Screens — Compose screens needed. Map prototype pages → @Composable functions.
  2. Navigation — Screen flow. Map prototype routing → Compose Navigation destinations.
  3. Data layer — API service + repository + models. Map prototype data → Kotlin data classes + Retrofit endpoints.
  4. State management — ViewModels needed. Map prototype state → StateFlow holders.
  5. 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 answer
  • assumption — 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) and pit_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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.