Creating Architectures

Golden Path can analyze any existing codebase and turn it into a reusable architecture package — complete with skills, templates, and configurable options. Point it at a reference repo, and it extracts the structural patterns into a package that any developer can use to scaffold new projects.

How it works

The process follows a plan-then-create workflow:

  1. Analyzeplan_architecture reads your codebase and returns a decomposition guide, plan template, and discovery questions
  2. Plan — The AI fills in the architecture plan: what goes into create-solution, what becomes add-on skills, what's configurable
  3. Review — You review the plan and adjust scope, skills, and templates
  4. Createcreate_architecture registers the package, then create_skill creates each skill with real templates extracted from the repo

The result is a full architecture package with a create-solution skill that scaffolds new projects, add-on skills for optional capabilities, and implement-feature for repeatable feature work.


PLAN

Step 1: Analyze the repo

Point the AI at an existing codebase and ask it to plan an architecture package. The AI will:

  • Read the folder structure, entry points, and config files
  • Identify layer boundaries, naming patterns, and key dependencies
  • Decide what belongs in create-solution vs. add-on skills
  • Write a detailed plan to docs/ARCHITECTURE_PLAN.md

The plan includes a "What Was Found in the Repo" section that documents every observation — so you can verify the AI understood your codebase correctly.

Example prompt

Analyze the current repo and call plan_architecture
to plan an architecture package.
Use the name "dotnet-clean-architecture" for the architecture.

What happens

1. AI reads the codebase (project files, source code, configs)
2. Calls plan_architecture to get decomposition guide
3. Fills in the architecture plan template
4. Saves docs/ARCHITECTURE_PLAN.md
5. Asks: "Shall I create the architecture and skills now?"

REVIEW

Step 2: Review the plan

The generated ARCHITECTURE_PLAN.md contains:

  • Metadata — Name, slug, tech stack, best-for description
  • What Was Found — Repo type, frameworks, dependencies, layer boundaries, naming patterns
  • create-solution Scope — What the base scaffold generates, configurable args, always-present dependencies
  • Add-on Skills — Optional capabilities with explicit prerequisites
  • Implementation Skills — plan-feature and implement-feature outlines
  • Decomposition Checklist — Verification that the plan is sound

Key things to check:

  • Is the create-solution scope right? (Should build/compile on its own)
  • Are the right things excluded as add-on skills?
  • Do the configurable args make sense?
  • Are skill dependencies correct?

Plan structure

## create-solution Scope

### Configurable Args
| Arg | Type | Default |
|-----|------|---------|
| ProjectName | string | — |
| PackageManager | enum | npm |

### Base Project Structure
src/
├── app/         → Application shell
├── components/  → Shared UI
├── lib/         → Pre-configured libraries
└── features/    → (empty, added via implement-feature)

## Add-on Skills
| Skill | Depends on |
|-------|-----------|
| add-authentication | create-solution |
| add-authorization | add-authentication |

CREATE

Step 3: Create the package

Once you approve the plan, the AI executes:

  1. create_architecture — Registers the architecture with name, slug, description, tech stack
  2. create_skill × N — Creates each skill with phases, templates, and args

Templates are extracted from the actual repo files — with hardcoded names replaced by {Variables}. The AI reads the real source code and generates templates that capture the structural patterns.

After creation, all skills are immediately available as MCP tools. No server restart needed.

Example prompt

Yes, create the architecture and all skills now.

What the AI executes

create_architecture(
  name="Bulletproof React",
  slug="bulletproof-react",
  tech_stack="React, TypeScript, Vite, TanStack Query",
  best_for="Feature-based React SPAs with..."
)

create_skill(
  architecture="bulletproof-react",
  skill_name="create-solution",
  title="New Solution",
  phases=[...],
  templates=[...extracted from repo...]
)

create_skill(
  architecture="bulletproof-react",
  skill_name="add-authentication",
  ...
)

The decomposition model

The key insight behind plan_architecture is that not everything in a repo belongs in the base scaffold. The AI applies a structured decomposition:

create-solution scope

The minimum a developer needs before writing their first feature. It must:

  • Build/compile on its own without any add-on skills
  • Contain only structural code, not business logic
  • Include architecture enforcement (lint rules, dependency checks)

Add-on skills

Optional capabilities that some projects need but not all:

  • Authentication — Not every app needs login flows
  • Observability — Some teams have existing monitoring
  • API mocking — Some teams prefer real dev backends

Each add-on has explicit prerequisites and can be described in one sentence.

Implementation skills

Repeatable patterns for day-to-day work:

  • plan-feature — Gather requirements, plan the implementation
  • implement-feature — Generate feature code following the architecture's patterns

What makes a good architecture package

Do:

  • Start from a real, working reference repo
  • Keep create-solution minimal — it should compile with zero features
  • Make naming configurable where teams disagree (layer names, project names)
  • Include architecture tests / lint rules that enforce the patterns
  • Write add-on skills for anything that's optional in production

Don't:

  • Copy business logic into templates
  • Put everything in create-solution — if it's optional, it's an add-on
  • Create skills with more than 7 configurable args
  • Skip prerequisites on add-on skills

Good scope split

create-solution:
  ✓ Project structure + DI + base config
  ✓ Shared UI components (needed by features)
  ✓ ESLint architecture rules
  ✗ Authentication (not universal)
  ✗ API mocking (team preference)
  ✗ Storybook (optional tooling)

add-authentication:
  prerequisites: create-solution
  adds: auth library, login/register, protected routes

add-msw-mocking:
  prerequisites: create-solution
  adds: MSW setup, mock DB, test utilities

Supported tech stacks

plan_architecture works with any tech stack. It reads the actual project files to understand the structure:

StackConfig files readExample
.NET.csproj, Directory.Build.props, appsettings.jsonClean Architecture, Modular Monolith
React / Next.jspackage.json, tsconfig.json, vite.config.tsBulletproof React
Gogo.mod, go.sum, project layoutHexagonal Go
Pythonpyproject.toml, requirements.txtFastAPI Clean
Javapom.xml, build.gradleSpring Boot DDD

Was this page helpful?