agentleFS
aiFabricoComaiFabricoCom/fabrico-collections/.claude/skills/fabrico-building-lean-applications/SKILL.md

fabrico-building-lean-applications

Skill2 starsChanged 4 months agoMITView on GitHub

Builds cost-efficient, high-quality applications using a modular-monolith default, explicit service and dependency budgets, reusable golden paths, risk-based tests, and evidence-based scaling triggers. Use for every new application, material feature, architecture plan, deployment design, build-versus-buy decision, or cost and complexity review; prevents speculative microservices, Kubernetes, paid services, and premature infrastructure.

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 16 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    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:

    Start with a modular monolith, one repository, one deployable application image, one relational database, and the fewest operational …

    line 12
  2. Distinctive:

    Do not reduce cost by removing authorization, tenant isolation, validation, backups, restore tests, accessibility, or critical-path tests.

    line 14
  3. Very specific:

    Add a compact Cost and Quality Profile to the existing PRD or implementation plan.

    line 34
  4. Distinctive:

    Do not invent numerical business targets.

    line 44
  5. Distinctive:

    Default to a modular monolith organized by business capability, not technical-layer sprawl.

    line 48
  6. Distinctive:

    Keep one source tree and one build artifact.

    line 49
  7. Distinctive:

    Use a direct server-rendered or Inertia path for the product UI.

    line 50
  8. Distinctive:

    Start in one region. Use the simplest production topology that meets the declared recovery and availability targets.

    line 52
  9. Distinctive:

    Keep module calls in process.

    line 53
  10. Distinctive:

    Do not add Kubernetes, microservices, a second database engine, a message broker beyond the required queue, a search cluster, a vector …

    line 55
  11. Distinctive:

    Before adding a dependency or paid service, verify all of the following:

    line 59
  12. Distinctive:

    Prefer framework primitives and small libraries over overlapping platforms.

    line 67
  13. Distinctive:

    Verify current official documentation and pricing before committing to a versioned or paid dependency.

    line 69
  14. Distinctive:

    Start from the official framework starter and retain its CI, authentication, and supported conventions.

    line 73
  15. Distinctive:

    Always run formatting, static analysis, type checking, focused automated tests, and production builds for changed surfaces.

    line 84
  16. Distinctive:

    Prefer the cheapest test layer that catches the likely failure.

    line 96
  17. Distinctive:

    Remove unused services and abstractions when the evidence disappears.

    line 111

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

Building Lean Applications

Choose the least expensive architecture that satisfies the product's current quality, security, recovery, and growth requirements. Optimize total cost of ownership, not only the hosting invoice.

<economic-default>

Start with a modular monolith, one repository, one deployable application image, one relational database, and the fewest operational dependencies allowed by the required stack. Keep business modules explicit so they can be tested or extracted later without paying distributed-system costs now.

Do not reduce cost by removing authorization, tenant isolation, validation, backups, restore tests, accessibility, or critical-path tests. Reduce waste, duplication, idle infrastructure, unnecessary dependencies, and speculative generality.

</economic-default>

Lean Delivery Process

Track this checklist:

Progress:
- [ ] Define the cost and quality profile
- [ ] Choose the lowest viable architecture tier
- [ ] Apply service and dependency admission gates
- [ ] Deliver thin vertical slices using reusable foundations
- [ ] Run a risk-based quality gate
- [ ] Measure production behavior and record escalation triggers

1. Define the cost and quality profile

Add a compact Cost and Quality Profile to the existing PRD or implementation plan. Record:

  • product stage: prototype, mvp, growth, or regulated;
  • critical user journeys and the cost of failure;
  • expected users, request volume, data volume, and background workload;
  • data classification, tenant-isolation model, and compliance constraints;
  • availability target, tolerated data-loss window, and recovery-time target;
  • monthly infrastructure ceiling and maximum cost per paid operation when known;
  • team size, operational capacity, and explicitly approved paid services.

Do not invent numerical business targets. Mark unknowns and select the lowest reversible tier that is safe under the known constraints. Read references/cost-quality-ladder.md when choosing infrastructure, tenancy, testing, AI, search, or build-versus-buy tiers.

2. Choose the lowest viable architecture tier

  • Default to a modular monolith organized by business capability, not technical-layer sprawl.
  • Keep one source tree and one build artifact. Run web, worker, and scheduler as separate process roles from the same application image when required.
  • Use a direct server-rendered or Inertia path for the product UI. Add a separate public API only for an actual mobile, partner, external automation, or independently deployed client requirement.
  • Reuse the database, cache, queue, scheduler, mail, authorization, validation, rate limiting, and storage abstractions already supplied by the required framework.
  • Start in one region. Use the simplest production topology that meets the declared recovery and availability targets; a single-host Docker deployment is valid only when its failure and recovery profile are explicitly acceptable and restore-tested.
  • Keep module calls in process. Add a network boundary only when independent deployment, scaling, ownership, security, or failure isolation has measured value.

Do not add Kubernetes, microservices, a second database engine, a message broker beyond the required queue, a search cluster, a vector database, a data warehouse, a paid feature-flag service, or multi-region infrastructure without an escalation record.

3. Apply admission gates

Before adding a dependency or paid service, verify all of the following:

  1. An acceptance criterion or measured bottleneck requires its capability.
  2. The existing stack cannot meet the requirement at lower total cost.
  3. The package or service has a compatible license, supported versions, acceptable security posture, and an exit path.
  4. Ownership, failure behavior, observability, data handling, and recurring cost are understood.
  5. The saved delivery and operational effort is greater than integration, migration, and lock-in cost.

Prefer framework primitives and small libraries over overlapping platforms. Pin direct dependencies and avoid packages that duplicate existing Laravel, Vue, shadcn-vue, MySQL, or Redis capabilities.

Verify current official documentation and pricing before committing to a versioned or paid dependency. Do not repeat stale prices inside code or architecture policy.

4. Reuse without building an internal framework

  • Start from the official framework starter and retain its CI, authentication, and supported conventions.
  • Maintain one versioned golden-path template for infrastructure, CI, authentication, tenant context, error handling, and test setup.
  • Distribute stable shadcn-vue compositions through a private registry. Keep domain-specific columns, fields, policies, and workflows in the application.
  • Extract a shared abstraction after the same shape is proven across real applications. Do not generalize a one-off requirement.
  • Automate deterministic repetition with generators or skill scripts. Keep judgment, naming, and domain mapping in the model or application team.
  • Make generated output ordinary owned code. Avoid a runtime meta-framework for standard CRUD screens.

Deliver one thin vertical slice at a time: migration, model, policy, validation, application operation, UI, and focused tests. Finish a slice before opening another cross-cutting subsystem.

5. Spend the quality budget where failure is expensive

Always run formatting, static analysis, type checking, focused automated tests, and production builds for changed surfaces. Match additional tests to risk:

ChangeMinimum high-value verification
Pure calculation or invariantFast unit tests, including boundaries
CRUD or HTTP workflowLaravel feature tests for success, validation, and authorization
Tenant-owned dataNegative cross-tenant read and write tests
Transaction, queue, webhook, or retryIntegration tests for rollback, idempotency, and failure behavior
Complex Vue stateFocused component test
Critical user journeyOne narrow Playwright golden-path test
Paid AI capabilityMocked default tests plus a small versioned evaluation set

Prefer the cheapest test layer that catches the likely failure. Do not chase a universal coverage percentage, duplicate the same assertion at every layer, or make CI depend on paid APIs. Run MySQL and Redis integration tests where their real behavior matters.

6. Measure before escalating

Measure business outcomes and the constraints that drive architecture: successful-task cost, p95 latency, error rate, query count and duration, payload size, queue lag, memory, storage growth, tenant consumption, restore time, and developer lead time.

Require every escalation to state:

  • the measured threshold and observation window;
  • evidence that the current tier fails a requirement;
  • the smallest next tier and expected improvement;
  • new recurring and operational cost;
  • rollback or exit path;
  • owner and review date.

Remove unused services and abstractions when the evidence disappears. Architecture is allowed to become simpler.

Verification Gate

Validation:
- [ ] Cost and Quality Profile exists and contains no invented targets
- [ ] Architecture is a modular monolith unless an escalation record justifies otherwise
- [ ] Every paid service and non-trivial dependency passed the admission gate
- [ ] The solution reuses the golden path without introducing a generic internal framework
- [ ] Critical security, tenancy, backup, recovery, and accessibility controls remain intact
- [ ] Tests are concentrated on business risk and do not require paid APIs by default
- [ ] Production metrics can prove or reject each documented scaling trigger
- [ ] Total cost includes development, operations, infrastructure, usage, and exit cost

Connected Skills

  • fabrico-architecture-designing - for module boundaries and evidence-based evolution
  • fabrico-building-admin-dashboards - for the required Laravel admin foundation
  • fabrico-building-admin-resources - for cheap, repeatable CRUD forms and tables
  • fabrico-preparing-applications-for-ai - for AI quality and cost per successful task
  • fabrico-preparing-applications-for-saas - for pooled tenancy and tenant-aware cost controls
  • fabrico-implementing-ci-cd - for fast, proportional delivery gates
  • fabrico-optimizing-cloud-cost - for provider-specific infrastructure cost analysis

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.