# Spec Analyzer

> A Claude skill from srinidhis05/agentura.

- **Type:** Skill
- **Install:** `agentstack add skill-srinidhis05-agentura-spec-analyzer`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [srinidhis05](https://agentstack.voostack.com/s/srinidhis05)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [srinidhis05](https://github.com/srinidhis05)
- **Source:** https://github.com/srinidhis05/agentura/tree/main/skills/incubator/spec-analyzer
- **Website:** https://agenturaai.tech

## Install

```sh
agentstack add skill-srinidhis05-agentura-spec-analyzer
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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//`.
- **mobile-app** — Kotlin/Compose Android app. Features live under `app/src/main/java/com/example/app/ui//`.

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//`.
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

```json
{
  "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.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [srinidhis05](https://github.com/srinidhis05)
- **Source:** [srinidhis05/agentura](https://github.com/srinidhis05/agentura)
- **License:** Apache-2.0
- **Homepage:** https://agenturaai.tech

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-srinidhis05-agentura-spec-analyzer
- Seller: https://agentstack.voostack.com/s/srinidhis05
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
