Source profileQuality 91/100Review permissions

tikalk/adlc-team-skills/skills/architect/architect-init/SKILL.md

architect-init

Reverse-engineer architecture from an existing codebase to create ADRs documenting discovered decisions. Use when bootstrapping architecture documentation for brownfield projects.

Source repository stars
97
Declared platforms
0
Static risk flags
3
Last source update
2026-08-05
Source checked
2026-08-05

Decision brief

What it does—and where it fits

Reverse-engineer architecture from an existing codebase to create ADRs documenting discovered decisions.

Best for

  • Brownfield projects: Existing code without architecture docs
  • Legacy modernization: Understanding current state before changes
  • Team onboarding: Quickly documenting implicit decisions

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/tikalk/adlc-team-skills --skill "skills/architect/architect-init"
Safe inspection promptEditorial

Inspect the Agent Skill "architect-init" from https://github.com/tikalk/adlc-team-skills/blob/a6ea2fd3d9cf46c5cba9ff384e1099ce62481b8b/skills/architect/architect-init/SKILL.md at commit a6ea2fd3d9cf46c5cba9ff384e1099ce62481b8b. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Process

    You MUST consider the user input before proceeding (if not empty).

    "Django monolith with PostgreSQL, React frontend, AWS deployment""Node.js microservices with MongoDB and RabbitMQ""Legacy Java application, focus on understanding data layer"
  2. 02

    Phase 0: Sub-System Detection (Brownfield)

    Objective: Identify sub-systems from existing code structure automatically

    TRUST your AI analysis over the script outputALWAYS execute Step 4 with your identified sub-systemsNEVER default to monolithic analysis when you've identified sub-systems through ANY method
  3. 03

    Phase 1: Codebase Analysis

    Objective: Discover what technologies and patterns are in use

    Run Setup Script:Execute scripts/bash/setup-architect.sh to initialize architecture filesScript scans codebase and outputs structured findings
  4. 04

    Phase 2: Pattern Recognition

    Objective: Identify architectural patterns from code structure

    Objective: Identify architectural patterns from code structureArchitecture Style DetectionCode Organization Detection
  5. 05

    Phase 3: Documentation Deduplication

    Objective: Scan existing docs to avoid repeating documented information

    AGENTS.md - Project context, overview{TEAMAIDIRECTIVES}/AGENTS.md - Team-wide agent usage instructions (if configured)README.md - Tech stack, project description

Permission review

Static risk signals and limitations

Reads files

low · line 51

The documentation asks the agent to read local files, directories, or repositories.

Empty input: Scan entire codebase and infer architecture

Runs scripts

medium · line 267

The documentation asks the agent to run terminal commands or scripts.

**Run Setup Script**:

Reads files

low · line 451

The documentation asks the agent to read local files, directories, or repositories.

Scan codebase for quality requirement indicators:

Writes files

medium · line 581

The documentation asks the agent to create, modify, or delete local files.

*Objective**: Write discovered ADRs to file (NO AD.md creation)

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars97SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
tikalk/adlc-team-skills
Skill path
skills/architect/architect-init/SKILL.md
Commit
a6ea2fd3d9cf46c5cba9ff384e1099ce62481b8b
License
MIT
Collected
2026-08-05
Default branch
main
View the original SKILL.md

architect-init

What this skill does

Reverse-engineer architecture from an existing codebase (brownfield) to create Architecture Decision Records (ADRs) documenting discovered decisions, then validate the findings by running /architect-clarify manually.

You act as an Architecture Archaeologist uncovering implicit architectural decisions from code by scanning the codebase for technology choices and patterns, inferring architectural decisions from code structure, documenting discovered patterns as ADRs, and identifying gaps where decisions are unclear.

Output:

  1. ADRs documenting inferred architectural decisions in {REPO_ROOT}/.adlc/drafts/adr/ADR-{NNN}.md (individual file format)
  2. Auto-generated index at {REPO_ROOT}/.adlc/drafts/adr/adr.md
  3. Validate Findings: Run /architect-clarify to validate discovered decisions

Key Difference from /architect-specify:

  • /architect-init (this skill) = Discovers what's already implemented in code
  • /architect-specify = Explores new possibilities for greenfield projects

This skill focuses on current state analysis - what IS, not what SHOULD BE.

When to use

  • Brownfield projects: Existing code without architecture docs
  • Legacy modernization: Understanding current state before changes
  • Team onboarding: Quickly documenting implicit decisions
  • Technical debt assessment: Identifying undocumented patterns

When NOT to use

  • Greenfield projects: Use /architect-specify for new projects
  • Architecture exists: If AD.md exists, use /architect-clarify to refine
  • Feature-level: Feature architecture (if Spec Kit extension is also installed)

Process

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Examples of User Input:

  • "Django monolith with PostgreSQL, React frontend, AWS deployment"
  • "Node.js microservices with MongoDB and RabbitMQ"
  • "Legacy Java application, focus on understanding data layer"
  • Empty input: Scan entire codebase and infer architecture

When users provide context, use it to focus the reverse-engineering effort.

Flags

  • --adr-heuristic HEURISTIC: ADR generation strategy

    • surprising (default): Skip obvious ecosystem defaults, document only surprising/risky decisions
    • all: Document all discovered decisions
    • minimal: Only high-risk decisions
  • --no-decompose: Disable automatic sub-system detection from code structure (default: auto-detect if multiple modules detected)

Role & Context

You are acting as an Architecture Archaeologist uncovering implicit architectural decisions from code. Your role involves:

  • Scanning codebase for technology choices and patterns
  • Inferring architectural decisions from code structure
  • Documenting discovered patterns as ADRs
  • Identifying gaps where decisions are unclear

Brownfield vs Greenfield

ScenarioCommandInputOutput
Brownfield (existing code)/architect-initCodebase scanInferred ADRs
Greenfield (new project)/architect-specifyPRD/requirementsDiscussed ADRs

Rozanski & Woods Alignment

When discovering ADRs from brownfield code, map findings to R&W viewpoints:

Discovery AreaPrimary ViewpointWhat to Look For
Service structureFunctionalComponent boundaries, responsibilities
Database schemasInformationData entities, relationships
Process/thread codeConcurrencyRuntime units, coordination
Directory structureDevelopmentModule organization, dependencies
Deployment configsDeploymentInfrastructure, environments
Monitoring/alertingOperationalOperations support

Functional-as-Cornerstone for Brownfield: Even in brownfield discovery, the Functional structure is foundational:

  1. Discover Functional first: Identify components, services, modules
  2. Map other discoveries: Relate data, deployment, operations to functional elements
  3. Document dependencies: Note which ADRs affect the Functional view

Priority order for ADR discovery:

  1. Architecture Style ADRs (monolith/microservices) → Functional cornerstone
  2. Component/Service ADRs → Functional view
  3. Database/Data ADRs → Information view
  4. Infrastructure ADRs → Deployment view
  5. Communication/Async ADRs → Concurrency view
  6. Development/CI ADRs → Development view
  7. Operations ADRs → Operational view

Outline

  1. Sub-System Detection (Phase 0): Identify sub-systems from code structure (auto-detect)
  2. Codebase Scan: Analyze project structure and detect technologies (per sub-system if decomposed)
  3. Documentation Deduplication: Scan existing docs (README, AGENTS.md, {TEAM_AI_DIRECTIVES}/AGENTS.md if configured, etc.) to avoid repeating
  4. Pattern Detection: Identify architectural patterns in use
  5. ADR Generation: Create ADRs for discovered decisions (marked "Discovered"), organized by sub-system
  6. Gap Analysis: Identify areas where decisions are unclear
  7. Output: Write ADRs to {REPO_ROOT}/.adlc/drafts/adr/ADR-{NNN}.md (NO AD.md creation)
    • After writing all ADRs, the setup script auto-generates adr.md index
  8. Validate Findings: Run /architect-clarify to validate brownfield findings

Execution Steps

Phase 0: Sub-System Detection (Brownfield)

Objective: Identify sub-systems from existing code structure automatically

When: This phase runs automatically when the codebase is detected as having multiple distinct modules/packages. Use --no-decompose to skip.

Detection Source Reconciliation (CRITICAL): The setup script may report "No distinct sub-systems detected from directory structure" while your AI analysis identifies sub-systems through code patterns (import relationships, technology boundaries, domain logic). When this occurs:

  • TRUST your AI analysis over the script output
  • ALWAYS execute Step 4 with your identified sub-systems
  • NEVER default to monolithic analysis when you've identified sub-systems through ANY method
  • The threshold logic applies to ALL detected sub-systems, regardless of detection source
Step 1: Directory Structure Analysis

Analyze the codebase for distinct sub-systems based on directory structure:

PatternLikely Sub-System
src/auth/Authentication sub-system
src/users/User management sub-system
services/payment/Payment sub-system
modules/inventory/Inventory sub-system
apps/api/, apps/web/Monorepo with separate apps
lib/core/, lib/shared/Shared libraries (not a sub-system)
Step 2: Package/Module Detection

Detect sub-systems from package/module structures:

PatternDetection MethodSub-System Evidence
Node.js workspacespackage.json workspacesMultiple packages = multiple sub-systems
Python namespaces__init__.py hierarchyMultiple top-level packages
Go modulesgo.mod + directoriesMultiple directories under cmd/
Maven/Gradlepom.xml modulesMultiple modules in multi-module project
Docker servicesdocker-compose servicesEach service = sub-system
Step 3: Database Schema Analysis

If database is accessible, detect sub-systems from schema:

PatternEvidence
Table prefixesauth_, user_, payment_ tables = separate domains
PostgreSQL schemasauth., payments. schema separation
Separate databasesMultiple databases in docker-compose
Step 4: Sub-System Proposal (Interactive) - MANDATORY if sub-systems identified

Present detected sub-systems to user for confirmation:

## Detected Sub-Systems

I've identified the following sub-systems from your codebase:

| # | Sub-System | Detection Method | Evidence |
|---|------------|-----------------|----------|
| 1 | **auth** | Directory + Module | src/auth/, auth/ package |
| 2 | **users** | Directory | src/users/, services/user/ |
| 3 | **payments** | Directory + Docker | services/payment/, payment service in docker-compose |
| 4 | **inventory** | Directory | src/inventory/, modules/stock/ |

### Questions for Confirmation:

1. **Are these sub-systems correct?** [Y/n]
2. **Should any sub-systems be merged?** (e.g., auth + users → identity)
3. **Should any sub-systems be split?** (e.g., payments → billing + subscriptions)
4. **Any missing sub-systems?** (e.g., analytics, reporting)

**Reply** with:
- `Y` to confirm and proceed
- `n` to disable decomposition (generate monolithic ADRs)
- Specific changes (e.g., "merge 1+2", "split 3", "add Notifications")

CRITICAL: If you have identified ANY sub-systems through ANY method (script detection, AI analysis of code patterns, or user input), you MUST execute this step.

  • Do NOT proceed to Phase 1 as "monolithic" if sub-systems exist
  • Do NOT ignore sub-systems detected through AI analysis just because the script reported "none detected"
  • You MUST get user confirmation when 4+ sub-systems are identified

Failure to follow this step invalidates the entire ADR discovery process.

Step 5: Decomposition Decision

Based on user response:

ResponseAction
Y / EnterProceed with detected sub-systems
nSkip decomposition, generate monolithic ADRs
ModificationsAdjust sub-systems, then proceed
Empty/DefaultAuto-proceed if ≤3 sub-systems, ask if >3

Threshold Logic Enforcement (MANDATORY - applies to ALL detected sub-systems, regardless of source):

Sub-System CountRequired ActionCan Skip User Confirmation?
0Proceed as monolithic (no decomposition)Yes
1-3Show summary, auto-approve allowedYes
4-6MUST show summary and ask user confirmationNO
>6MUST suggest grouping and MUST ask confirmationNO

Enforcement Rules:

  1. If you identified sub-systems through AI analysis but the script reported "none detected" → Apply threshold logic to YOUR identified sub-systems
  2. If threshold is 4+ → You MUST NOT proceed without user confirmation
  3. If you skip this logic → The ADR generation is invalid and may produce incorrect architecture
  4. Self-check before Phase 1: Did I present Step 4? Did I apply threshold logic? If 4+ sub-systems, did I get confirmation?
Step 6: Output

After confirmation, output structured sub-system data:

{
  "decomposition": "enabled",
  "subsystems": [
    {"id": "auth", "name": "Auth", "detection_method": "directory", "evidence": "src/auth/"},
    {"id": "users", "name": "Users", "detection_method": "directory", "evidence": "src/users/"},
    {"id": "payments", "name": "Payments", "detection_method": "docker", "evidence": "payment service in docker-compose"}
  ],
  "next_phase": "Codebase Analysis (per sub-system)"
}

If decomposition disabled:

{
  "decomposition": "disabled",
  "reason": "user_requested",
  "next_phase": "Codebase Analysis (monolithic)"
}

Phase 1: Codebase Analysis

Objective: Discover what technologies and patterns are in use

Note: If sub-system decomposition is enabled (Phase 0), analyze each sub-system separately to provide focused insights.

  1. Run Setup Script:

    • Execute scripts/bash/setup-architect.sh to initialize architecture files
    • Script scans codebase and outputs structured findings
    • Pass --no-decompose if decomposition was disabled
    • If decomposed: Script outputs sub-system breakdown for targeted analysis
  2. Technology Detection (Per Sub-System):

    IndicatorTechnology CategoryFiles to Check
    package.jsonNode.js ecosystemDependencies, scripts
    requirements.txt / pyproject.tomlPython ecosystemDependencies
    pom.xml / build.gradleJVM ecosystemDependencies
    Cargo.tomlRustDependencies
    go.modGoDependencies
    DockerfileContainerizationBase images, stages
    docker-compose.ymlContainer orchestrationServices, networks
    *.tf / *.tfvarsTerraform/IaCInfrastructure
    kubernetes/*.yamlKubernetesDeployment configs
    .github/workflows/*GitHub ActionsCI/CD
  3. Framework Detection:

    PatternFrameworkEvidence
    from django importsDjangoPython web
    @SpringBootSpring BootJava web
    import expressExpress.jsNode.js web
    import { Component }React/Angular/VueFrontend
    from fastapiFastAPIPython API
  4. Database Detection:

    EvidenceDatabase Type
    PostgreSQL connection stringsPostgreSQL
    MongoDB/mongoose importsMongoDB
    Redis client importsRedis cache
    ORM migrationsRelational DB
    DynamoDB SDK usageAWS DynamoDB

Phase 2: Pattern Recognition

Objective: Identify architectural patterns from code structure

Architecture Style Detection
PatternEvidenceADR Topic
MonolithSingle deployable, shared databaseADR: System Architecture Style
MicroservicesMultiple services, service discoveryADR: System Architecture Style
Modular MonolithSingle deploy, module boundariesADR: System Architecture Style
Event-DrivenMessage queue usage, event handlersADR: Communication Pattern
ServerlessLambda functions, managed servicesADR: Deployment Model
Code Organization Detection
PatternEvidence
Layeredcontrollers/, services/, repositories/
Feature-Basedfeatures/, modules/ per domain
Clean Architecturedomain/, application/, infrastructure/
Hexagonalports/, adapters/
API Style Detection
PatternEvidence
RESTRoute decorators, HTTP verbs, resource URLs
GraphQLSchema files, resolvers, gql imports
gRPC.proto files, gRPC client/server setup
WebSocketSocket.io, WebSocket handlers

Phase 3: Documentation Deduplication

Objective: Scan existing docs to avoid repeating documented information

Scan for:

  • AGENTS.md - Project context, overview
  • {TEAM_AI_DIRECTIVES}/AGENTS.md - Team-wide agent usage instructions (if configured)
  • README.md - Tech stack, project description
  • CONTRIBUTING.md - Development guidelines
  • AD.md or docs/architecture.md - Existing architecture
  • LICENSE - Legal context

Deduplication Rules:

FindingAction
Tech stack in READMEReference README in ADR, don't duplicate
Architecture existsAuto-merge or offer update vs. create new
Guidelines in CONTRIBUTINGReference in Development View
Context in AGENTS.mdLink from Context View
Team directives AGENTS.mdReference for team-wide agent instructions

Process:

  1. Run scripts/bash/setup-architect.sh which calls scan_existing_docs()
  2. Parse findings from JSON output
  3. For each finding, determine: Skip ADR / Reference existing / Document new
  4. Report: "X decisions covered by existing docs, Y new ADRs created"

Phase 4: ADR Generation

Objective: Document discovered decisions as ADRs

For each discovered architectural decision:

  1. Identify the Decision:

    • What technology/pattern was chosen?
    • What alternatives were available when this was built?
    • What forces likely drove this decision?
  2. Create ADR Entry (MADR 3.0.0 — see templates/adr-template.md):

---
status: discovered  # inferred from codebase (brownfield)
date: YYYY-MM-DD
decision-makers: [Legacy/Inferred]
consulted: []
informed: []
sub-system: System
---

# {Discovered Decision}

## Context and Problem Statement
[Inferred problem statement based on code patterns]

**Evidence Found**:
* [File/pattern evidence 1]
* [File/pattern evidence 2]

## Decision Drivers
* {inferred driver 1}
* {inferred driver 2}

## Considered Options
* {Likely Alternative}
* {Discovered choice}

## Decision Outcome
Chosen option: "{Discovered choice}", because {inferred rationale from implementation}.

### Consequences
* Good, because {benefit visible in codebase}
* Bad, because {trade-off inherent to this choice}
* Bad, because {risk if this decision is not well understood}

### Confirmation
{How compliance can be confirmed in the codebase}

## Pros and Cons of the Options
### {Likely Alternative}
* Good, because {argument}
* Bad, because {argument}
← DO NOT fabricate rejection rationale - we don't know why it wasn't chosen

## More Information
**Confidence Level**: [HIGH/MEDIUM/LOW] - [Explanation of confidence in inference]
  1. ADR Categories to Generate (apply surprise-value heuristic):

    Skip if obvious (heuristic: surprising):

    • PostgreSQL for relational data → Covered by ecosystem default
    • React for SPA frontend → Standard framework choice
    • Docker for containerization → Conventional choice

    Document as ADRs:

    • ADR-001: System Architecture Style (monolith vs microservices)
    • ADR-002: Database Choice (only if non-obvious for context)
    • ADR-003: API Style (REST vs GraphQL vs gRPC)
    • ADR-004: Frontend Framework (only if unconventional)
    • ADR-005: Deployment Platform (serverless vs traditional)
    • ADR-006: CI/CD Approach (GitHub Actions vs Jenkins)
    • Additional: Any custom/in-house solutions, unusual patterns, risky choices

Phase 5: Quality Requirements Detection

Objective: Detect which R&W perspectives apply from codebase evidence

Scan codebase for quality requirement indicators:

EvidenceDetected Perspective
Health checks, circuit breakers, retry logicAvailability
Plugin systems, feature flags, extension pointsEvolution
GDPR/HIPAA comments, audit logging, consent trackingRegulation
ARIA attributes, screen reader supportAccessibility
i18n files, locale handling, translation keysInternationalization
Multi-region configs, geo-routing, CDN setupLocation
Extensive UI tests, UX research artifactsUsability
Resource constraints in README, limited CI runnersDevelopment Resource

Present detected perspectives for confirmation:

## Quality Requirements Detected

Based on codebase analysis, the following quality perspectives may apply:

| Perspective | Evidence Found | Include? |
|-------------|----------------|----------|
| Security | Always recommended | ✓ (default) |
| Performance | Always recommended | ✓ (default) |
| Availability | Circuit breakers found | [Y/N] |
| Evolution | Feature flags found | [Y/N] |
| Regulation | GDPR comments found | [Y/N] |
| Accessibility | Not detected | [Y/N] |
| Internationalization | i18n files found | [Y/N] |
| Location | Multi-region config | [Y/N] |
| Usability | UI tests found | [Y/N] |
| Development Resource | Not detected | [Y/N] |

Please confirm which perspectives to document.

Store selected perspectives in state for /architect-implement.

  1. Sub-System Organization (if Phase 0 decomposition enabled):

    Structure ADRs by sub-system in the output file:

    # Architecture Decision Records
    
    ## ADR Index
    
    | ID | Sub-System | Decision | Status | Date | Confidence |
    |----|------------|----------|--------|------|------------|
    | ADR-001 | System | Monolithic Architecture | Discovered | 2026-02-26 | HIGH |
    | ADR-002 | Auth | JWT Authentication | Discovered | 2026-02-26 | HIGH |
    | ADR-003 | Payments | Stripe Integration | Discovered | 2026-02-26 | MEDIUM |
    
    ---
    
    ## System-Level ADRs
    
    ### ADR-001: Monolithic Architecture
    [Full ADR content...]
    
    ---
    
    ## Auth Sub-System ADRs
    
    ### ADR-002: JWT Authentication
    [Full ADR content...]
    
    ---
    
    ## Payments Sub-System ADRs
    
    ### ADR-003: Stripe Integration
    [Full ADR content...]
    
    • Mark each ADR with its parent sub-system in the index
    • Add section headers for each sub-system
    • Document cross-cutting patterns (e.g., shared database) as System-Level

Phase 6: Gap Analysis

Objective: Identify areas where decisions are unclear

After scanning, report:

## Architecture Discovery Report

### Technologies Detected
| Category | Technology | Confidence | Evidence |
|----------|------------|------------|----------|
| Backend | Django 4.2 | HIGH | requirements.txt, app structure |
| Database | PostgreSQL | HIGH | connection strings, migrations |
| Frontend | React 18 | MEDIUM | package.json, JSX files |
| Cache | Redis | HIGH | redis imports, docker-compose |

### Documentation Deduplication
✓ README.md: Tech stack documented (lines 20-45)
  → Referenced in Context View, skipping tech stack ADRs
✓ CONTRIBUTING.md: Development workflow documented
  → Referenced in Development View 3.5

### ADRs Generated (Surprising/Risky decisions only)
| ID | Decision | Confidence | Why Documented |
|----|----------|------------|----------------|
| ADR-001 | Monolithic Django architecture | HIGH | Architecture style choice |
| ADR-002 | Custom JWT authentication | MEDIUM | Security risk, non-standard |
| ADR-003 | Microservices for small team | HIGH | Scale mismatch, surprising |

### Skipped (Covered by existing docs or obvious)
| Decision | Reason |
|----------|--------|
| PostgreSQL choice | Ecosystem default + README covers |
| React frontend | Standard framework + README covers |
| Docker containerization | Conventional choice |

### Unclear Areas (Need Human Input)
| Area | Question | Suggestion |
|------|----------|------------|
| Auth | OAuth2 or custom JWT? | Found JWT usage, need confirmation |
| Caching | Redis strategy unclear | Cache-aside pattern inferred |
| Scaling | Horizontal scaling setup? | No auto-scaling config found |

### Recommended Clarifications
1. Run `/architect-clarify` to refine ADRs with human input
2. Focus on [specific unclear area]
3. Consider documenting [undocumented pattern]

Phase 7: Output Generation

Objective: Write discovered ADRs to file (NO AD.md creation)

CRITICAL: ADR status MUST be "Discovered" when generated by this skill. NEVER set status to "Accepted" directly. The approval workflow is: init (Discovered) → clarify (review) → clarify Phase 5.5 (Accepted) → implement

If the user explicitly asks to accept ADRs during init, direct them to run /architect-clarify instead.

Before Writing - Check for Existing ADRs:

  1. Check if hybrid ADR directory exists: {REPO_ROOT}/.adlc/drafts/adr/
  2. If directory exists:
    • Read existing ADRs from individual files
    • DO NOT overwrite or delete existing ADRs
    • Write new discoveries as new ADR-{NNN}.md files
    • Report: "Found N existing ADRs, adding M new discoveries"
  3. If directory doesn't exist: The setup script will create it

Write ADRs:

  1. Create {REPO_ROOT}/.adlc/drafts/adr/ADR-{NNN}.md for each discovered ADR
  2. Mark ADRs as "Discovered (Inferred)" status ← USE THIS STATUS ONLY
  3. Use "Common Alternatives" section with neutral trade-offs (no "Rejected because")
  4. Note confidence level for each ADR
  5. Tag assumptions that need validation

DO NOT Create AD.md:

  • Architecture Description will be generated later via /architect-implement
  • Only AFTER ADRs are validated through clarification

Generate Summary:

  • Technologies discovered
  • ADRs created with confidence levels
  • Existing ADRs preserved (if any)
  • Gaps identified
  • Assumptions made (to be validated in clarify phase)

Phase 8: Validate with Clarify

Objective: Validate brownfield findings with user

After generating ADRs, run /architect-clarify with brownfield context to validate:

Questions Clarify Should Ask (Brownfield-Specific):

Question TypeExample
Current State Validity"I detected microservices in docker-compose.yml - is this still your current approach?"
Decision Rationale"PostgreSQL is used - was this chosen for specific requirements or inherited?"
Team Context"Based on git history, team appears small - are current architecture decisions appropriate?"
Technical Debt"Found custom authentication - are you considering migration to OAuth/OIDC?"
Migration Plans"Legacy patterns detected in X module - any plans to modernize?"
Deprecated Patterns"Monolithic deployment with hints of service separation - is microservices migration planned?"

Context Passed to Clarify:

{
  "source": "brownfield",
  "tech_stack_detected": ["detected technologies"],
  "inferred_decisions": ["list of ADRs with confidence levels"],
  "assumptions": ["things that need validation"],
  "files_analyzed": "count"
}

Run /architect-clarify to refine ADRs based on your input, then run /architect-implement to generate the full AD.md.

Key Rules

Evidence-Based Documentation

  • Only document what's found in code - don't invent decisions
  • Cite specific evidence for each ADR
  • Mark confidence levels honestly
  • Flag uncertainties explicitly

Confidence Levels

LevelCriteria
HIGHMultiple clear evidence sources, unambiguous choice
MEDIUMSome evidence, but could be interpreted differently
LOWLimited evidence, significant uncertainty

Non-Destructive

  • Don't overwrite existing ADRs without user approval
  • Merge intelligently with existing documentation
  • Preserve manual additions to architecture files

No Fabricated Rejection Rationale

  • NEVER invent "Rejected because" reasons for reverse-engineered ADRs
  • Use "Common Alternatives" with neutral "Trade-offs" framing instead
  • Only document alternatives that were likely considered
  • Be honest: "We don't know why X wasn't chosen" is acceptable

Interactive When Needed

  • For LOW confidence discoveries, ask user for confirmation
  • For contradictory evidence, present options
  • For gaps, suggest clarification questions

Sub-System Decomposition

  • Auto-detect from code: Analyze directory structure, packages, services automatically
  • Interactive confirmation: Always confirm sub-system breakdown with user
  • Balanced granularity: Aim for 3-7 sub-systems; avoid over-decomposition
  • Clear evidence: Cite specific directories/modules as evidence for each sub-system
  • Per-sub-system analysis: Run pattern detection per sub-system for focused ADRs
  • Cross-cutting patterns: Detect and document system-wide patterns separately
  • Use --no-decompose: Skip decomposition for simple/small codebases

Workflow Guidance & Transitions

After /architect-init

Required: Run /architect-clarify to validate brownfield findings.

After clarification completes:

  1. Review Validated ADRs: Check {REPO_ROOT}/.adlc/drafts/adr/adr.md for accuracy
  2. Approve ADRs: Run /architect-clarify Phase 5.5 to change status to "Accepted"
  3. Run /architect-implement: Generate full AD.md from Accepted ADRs

Complete Brownfield Flow

/architect-init "Node.js API, team of 2"
    ↓
[Scan codebase] → Detect technologies, patterns
    ↓
[Generate ADRs] → Write to {REPO_ROOT}/.adlc/drafts/adr/ADR-{NNN}.md (marked "Discovered")
    ↓
[Run /architect-clarify] → Ask to validate decisions
    ↓
[Clarify asks] → "Is microservices decision still valid?"
                 "Custom auth detected - considering OAuth?"
    ↓
[Approve ADRs] → Phase 5.5 to change status to "Accepted"
    ↓
[Run /architect-implement] → Generate AD.md from Accepted ADRs
    ↓
[Generate AD.md] → Full architecture description

Context

$ARGUMENTS

Next Steps

After init completes, run /architect-clarify to validate the discovered ADRs and approve them for implementation.

Verification

  • ADRs written to {REPO_ROOT}/.adlc/drafts/adr/ADR-{NNN}.md with status Discovered (Inferred).
  • Auto-generated adr.md index exists in {REPO_ROOT}/.adlc/drafts/adr/.
  • Gap analysis report identifies unclear areas and recommended clarifications.
  • Sub-system decomposition confirmed (or disabled) per threshold rules.
  • No existing ADRs were overwritten without explicit approval.

Alternatives

Compare before choosing

Computed 9732,671

K-Dense-AI/scientific-agent-skills

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

Computed 976

mgiovani/cc-arsenal

team-review

Multi-agent review team: architecture, security, performance, testing, style, docs/UX, plus an adversary that cross-examines the other 6, for security-sensitive, architectural, or large PRs (15+ files) where a single-agent pass risks missing cross-cutting issues. Use for auth/payments/PII changes, schema/pattern changes, compliance sign-off, or when asked to 'get the review team on this' / 'multi-agent review' / 'thorough review before merge'. For a standard PR or a quick pre-merge check, use /r

Computed 9532,671

K-Dense-AI/scientific-agent-skills

markdown-mermaid-writing

Comprehensive markdown and Mermaid diagram writing skill. Use when creating any scientific document, report, analysis, or visualization. Establishes text-based diagrams as the default documentation standard with full style guides (markdown + mermaid), 24 diagram type references, and 9 document templates.

Computed 9597

tikalk/adlc-team-skills

architect-implement

Generate a full Architecture Description (AD.md) from accepted ADRs using multi-agent DAG orchestration. Use when accepted ADRs exist and you need to produce or update unified architecture documentation.