@girardelli/architect 2.2.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -116
- package/architect-run.sh +431 -0
- package/assets/banner-v3.html +561 -0
- package/dist/agent-generator/context-enricher.d.ts +58 -0
- package/dist/agent-generator/context-enricher.d.ts.map +1 -0
- package/dist/agent-generator/context-enricher.js +613 -0
- package/dist/agent-generator/context-enricher.js.map +1 -0
- package/dist/agent-generator/domain-inferrer.d.ts +52 -0
- package/dist/agent-generator/domain-inferrer.d.ts.map +1 -0
- package/dist/agent-generator/domain-inferrer.js +585 -0
- package/dist/agent-generator/domain-inferrer.js.map +1 -0
- package/dist/agent-generator/framework-detector.d.ts +40 -0
- package/dist/agent-generator/framework-detector.d.ts.map +1 -0
- package/dist/agent-generator/framework-detector.js +611 -0
- package/dist/agent-generator/framework-detector.js.map +1 -0
- package/dist/agent-generator/index.d.ts +47 -0
- package/dist/agent-generator/index.d.ts.map +1 -0
- package/dist/agent-generator/index.js +545 -0
- package/dist/agent-generator/index.js.map +1 -0
- package/dist/agent-generator/stack-detector.d.ts +14 -0
- package/dist/agent-generator/stack-detector.d.ts.map +1 -0
- package/dist/agent-generator/stack-detector.js +124 -0
- package/dist/agent-generator/stack-detector.js.map +1 -0
- package/dist/agent-generator/templates/core/agents.d.ts +17 -0
- package/dist/agent-generator/templates/core/agents.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/agents.js +1256 -0
- package/dist/agent-generator/templates/core/agents.js.map +1 -0
- package/dist/agent-generator/templates/core/architecture-rules.d.ts +7 -0
- package/dist/agent-generator/templates/core/architecture-rules.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/architecture-rules.js +274 -0
- package/dist/agent-generator/templates/core/architecture-rules.js.map +1 -0
- package/dist/agent-generator/templates/core/general-rules.d.ts +8 -0
- package/dist/agent-generator/templates/core/general-rules.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/general-rules.js +301 -0
- package/dist/agent-generator/templates/core/general-rules.js.map +1 -0
- package/dist/agent-generator/templates/core/hooks-generator.d.ts +21 -0
- package/dist/agent-generator/templates/core/hooks-generator.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/hooks-generator.js +233 -0
- package/dist/agent-generator/templates/core/hooks-generator.js.map +1 -0
- package/dist/agent-generator/templates/core/index-md.d.ts +7 -0
- package/dist/agent-generator/templates/core/index-md.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/index-md.js +246 -0
- package/dist/agent-generator/templates/core/index-md.js.map +1 -0
- package/dist/agent-generator/templates/core/orchestrator.d.ts +8 -0
- package/dist/agent-generator/templates/core/orchestrator.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/orchestrator.js +422 -0
- package/dist/agent-generator/templates/core/orchestrator.js.map +1 -0
- package/dist/agent-generator/templates/core/preflight.d.ts +8 -0
- package/dist/agent-generator/templates/core/preflight.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/preflight.js +213 -0
- package/dist/agent-generator/templates/core/preflight.js.map +1 -0
- package/dist/agent-generator/templates/core/quality-gates.d.ts +11 -0
- package/dist/agent-generator/templates/core/quality-gates.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/quality-gates.js +254 -0
- package/dist/agent-generator/templates/core/quality-gates.js.map +1 -0
- package/dist/agent-generator/templates/core/security-rules.d.ts +7 -0
- package/dist/agent-generator/templates/core/security-rules.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/security-rules.js +528 -0
- package/dist/agent-generator/templates/core/security-rules.js.map +1 -0
- package/dist/agent-generator/templates/core/skills-generator.d.ts +19 -0
- package/dist/agent-generator/templates/core/skills-generator.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/skills-generator.js +546 -0
- package/dist/agent-generator/templates/core/skills-generator.js.map +1 -0
- package/dist/agent-generator/templates/core/workflow-fix-bug.d.ts +7 -0
- package/dist/agent-generator/templates/core/workflow-fix-bug.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/workflow-fix-bug.js +237 -0
- package/dist/agent-generator/templates/core/workflow-fix-bug.js.map +1 -0
- package/dist/agent-generator/templates/core/workflow-new-feature.d.ts +8 -0
- package/dist/agent-generator/templates/core/workflow-new-feature.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/workflow-new-feature.js +321 -0
- package/dist/agent-generator/templates/core/workflow-new-feature.js.map +1 -0
- package/dist/agent-generator/templates/core/workflow-review.d.ts +7 -0
- package/dist/agent-generator/templates/core/workflow-review.d.ts.map +1 -0
- package/dist/agent-generator/templates/core/workflow-review.js +104 -0
- package/dist/agent-generator/templates/core/workflow-review.js.map +1 -0
- package/dist/agent-generator/templates/domain/index.d.ts +22 -0
- package/dist/agent-generator/templates/domain/index.d.ts.map +1 -0
- package/dist/agent-generator/templates/domain/index.js +1176 -0
- package/dist/agent-generator/templates/domain/index.js.map +1 -0
- package/dist/agent-generator/templates/stack/index.d.ts +8 -0
- package/dist/agent-generator/templates/stack/index.d.ts.map +1 -0
- package/dist/agent-generator/templates/stack/index.js +695 -0
- package/dist/agent-generator/templates/stack/index.js.map +1 -0
- package/dist/agent-generator/templates/template-helpers.d.ts +75 -0
- package/dist/agent-generator/templates/template-helpers.d.ts.map +1 -0
- package/dist/agent-generator/templates/template-helpers.js +726 -0
- package/dist/agent-generator/templates/template-helpers.js.map +1 -0
- package/dist/agent-generator/types.d.ts +196 -0
- package/dist/agent-generator/types.d.ts.map +1 -0
- package/dist/agent-generator/types.js +27 -0
- package/dist/agent-generator/types.js.map +1 -0
- package/dist/analyzer.d.ts +5 -0
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +46 -5
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzers/forecast.d.ts +85 -0
- package/dist/analyzers/forecast.d.ts.map +1 -0
- package/dist/analyzers/forecast.js +337 -0
- package/dist/analyzers/forecast.js.map +1 -0
- package/dist/analyzers/git-cache.d.ts +7 -0
- package/dist/analyzers/git-cache.d.ts.map +1 -0
- package/dist/analyzers/git-cache.js +41 -0
- package/dist/analyzers/git-cache.js.map +1 -0
- package/dist/analyzers/git-history.d.ts +113 -0
- package/dist/analyzers/git-history.d.ts.map +1 -0
- package/dist/analyzers/git-history.js +333 -0
- package/dist/analyzers/git-history.js.map +1 -0
- package/dist/analyzers/index.d.ts +10 -0
- package/dist/analyzers/index.d.ts.map +1 -0
- package/dist/analyzers/index.js +7 -0
- package/dist/analyzers/index.js.map +1 -0
- package/dist/analyzers/temporal-scorer.d.ts +72 -0
- package/dist/analyzers/temporal-scorer.d.ts.map +1 -0
- package/dist/analyzers/temporal-scorer.js +140 -0
- package/dist/analyzers/temporal-scorer.js.map +1 -0
- package/dist/anti-patterns.d.ts +7 -0
- package/dist/anti-patterns.d.ts.map +1 -1
- package/dist/anti-patterns.js +25 -6
- package/dist/anti-patterns.js.map +1 -1
- package/dist/cli.d.ts +2 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +275 -113
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +48 -11
- package/dist/config.js.map +1 -1
- package/dist/html-reporter.d.ts +3 -1
- package/dist/html-reporter.d.ts.map +1 -1
- package/dist/html-reporter.js +248 -12
- package/dist/html-reporter.js.map +1 -1
- package/dist/index.d.ts +16 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +63 -4
- package/dist/index.js.map +1 -1
- package/dist/project-summarizer.d.ts +38 -0
- package/dist/project-summarizer.d.ts.map +1 -0
- package/dist/project-summarizer.js +463 -0
- package/dist/project-summarizer.js.map +1 -0
- package/dist/refactor-reporter.js +1 -1
- package/dist/scanner.d.ts +8 -2
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +153 -113
- package/dist/scanner.js.map +1 -1
- package/dist/scorer.d.ts.map +1 -1
- package/dist/scorer.js +24 -11
- package/dist/scorer.js.map +1 -1
- package/dist/types.d.ts +29 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -3
- package/src/agent-generator/context-enricher.ts +672 -0
- package/src/agent-generator/domain-inferrer.ts +635 -0
- package/src/agent-generator/framework-detector.ts +669 -0
- package/src/agent-generator/index.ts +634 -0
- package/src/agent-generator/stack-detector.ts +115 -0
- package/src/agent-generator/templates/core/agents.ts +1296 -0
- package/src/agent-generator/templates/core/architecture-rules.ts +287 -0
- package/src/agent-generator/templates/core/general-rules.ts +306 -0
- package/src/agent-generator/templates/core/hooks-generator.ts +242 -0
- package/src/agent-generator/templates/core/index-md.ts +260 -0
- package/src/agent-generator/templates/core/orchestrator.ts +459 -0
- package/src/agent-generator/templates/core/preflight.ts +215 -0
- package/src/agent-generator/templates/core/quality-gates.ts +256 -0
- package/src/agent-generator/templates/core/security-rules.ts +543 -0
- package/src/agent-generator/templates/core/skills-generator.ts +585 -0
- package/src/agent-generator/templates/core/workflow-fix-bug.ts +239 -0
- package/src/agent-generator/templates/core/workflow-new-feature.ts +323 -0
- package/src/agent-generator/templates/core/workflow-review.ts +106 -0
- package/src/agent-generator/templates/domain/index.ts +1201 -0
- package/src/agent-generator/templates/stack/index.ts +705 -0
- package/src/agent-generator/templates/template-helpers.ts +776 -0
- package/src/agent-generator/types.ts +232 -0
- package/src/analyzer.ts +51 -5
- package/src/analyzers/forecast.ts +496 -0
- package/src/analyzers/git-cache.ts +52 -0
- package/src/analyzers/git-history.ts +488 -0
- package/src/analyzers/index.ts +33 -0
- package/src/analyzers/temporal-scorer.ts +227 -0
- package/src/anti-patterns.ts +29 -6
- package/src/cli.ts +316 -117
- package/src/config.ts +52 -11
- package/src/html-reporter.ts +263 -13
- package/src/index.ts +93 -10
- package/src/project-summarizer.ts +521 -0
- package/src/refactor-reporter.ts +1 -1
- package/src/scanner.ts +136 -90
- package/src/scorer.ts +26 -11
- package/src/types.ts +27 -0
- package/tests/agent-generator.test.ts +427 -0
- package/tests/analyzers-integration.test.ts +174 -0
- package/tests/architect-adapter-enrichment.test.ts +9 -0
- package/tests/context-enricher.test.ts +971 -0
- package/tests/fixtures/monorepo/package.json +6 -0
- package/tests/fixtures/monorepo/packages/app/package.json +12 -0
- package/tests/fixtures/monorepo/packages/app/src/index.ts +6 -0
- package/tests/fixtures/monorepo/packages/core/package.json +7 -0
- package/tests/fixtures/monorepo/packages/core/src/index.ts +7 -0
- package/tests/forecast.test.ts +509 -0
- package/tests/framework-detector.test.ts +1172 -0
- package/tests/git-history.test.ts +254 -0
- package/tests/monorepo-scan.test.ts +170 -0
- package/tests/scanner.test.ts +7 -8
- package/tests/scorer.test.ts +594 -0
- package/tests/stack-detector.test.ts +241 -0
- package/tests/template-generation.test.ts +706 -0
- package/tests/template-helpers.test.ts +1152 -0
- package/tests/temporal-scorer.test.ts +307 -0
- package/dist/agent-generator.d.ts +0 -106
- package/dist/agent-generator.d.ts.map +0 -1
- package/dist/agent-generator.js +0 -1398
- package/dist/agent-generator.js.map +0 -1
- package/src/agent-generator.ts +0 -1526
package/README.md
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
# Architect
|
|
2
2
|
|
|
3
|
-
**AI-powered architecture analysis, refactoring, and agent system generator**
|
|
3
|
+
**AI-powered architecture analysis, refactoring, and context-aware agent system generator**
|
|
4
4
|
|
|
5
5
|
[](https://www.typescriptlang.org/)
|
|
6
6
|
[](https://nodejs.org/)
|
|
7
7
|
[](https://www.npmjs.com/package/@girardelli/architect)
|
|
8
|
+
[]()
|
|
8
9
|
[](LICENSE)
|
|
9
10
|
|
|
10
|
-
Understand your codebase architecture in seconds. Detect anti-patterns, get refactoring plans, and generate AI agent configurations — all from a single command.
|
|
11
|
+
Understand your codebase architecture in seconds. Detect anti-patterns, get refactoring plans, and generate **context-aware AI agent configurations** that actually understand your stack, domain, and toolchain — all from a single command.
|
|
11
12
|
|
|
12
|
-
## What's New in
|
|
13
|
+
## What's New in v3.1
|
|
13
14
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
15
|
+
- **Context-Aware Agent Generation** — Agents are no longer generic. Templates adapt to your detected stack (Python/FastAPI generates pytest examples, not Jest; Go generates `go test`, not `npm test`)
|
|
16
|
+
- **Framework Detection Engine** — 61 frameworks across 10+ ecosystems detected from dependency files (package.json, pyproject.toml, requirements.txt, pubspec.yaml, go.mod, Cargo.toml, pom.xml, Gemfile, composer.json)
|
|
17
|
+
- **Domain Inference** — Detects business domain (fintech, healthtech, e-commerce, tax, HR, etc.) from project metadata, README, and code structure. Generates domain-specific BDD scenarios, threat models, and compliance requirements (LGPD, PCI-DSS, HIPAA, SOX)
|
|
18
|
+
- **Stack-Aware Templates** — C4 Level 4 code blocks, TDD test examples, ADR decisions, quality gates, and forbidden actions all adapt to the detected language and framework
|
|
19
|
+
- **Skills Generator** — Detects architectural patterns in your codebase (adapters, factories, extractors, repositories) and generates `skills/PROJECT-PATTERNS.md`
|
|
20
|
+
- **Enriched Context** — Module extraction, endpoint detection, toolchain commands, project structure analysis, and critical path identification feed into every generated template
|
|
21
|
+
- **Premium HTML Report** — Dark-themed responsive report with interactive D3.js dependency graph, health radar, bubble charts, and collapsible refactoring steps
|
|
19
22
|
|
|
20
23
|
## Quick Start
|
|
21
24
|
|
|
@@ -28,81 +31,92 @@ npm install -g @girardelli/architect
|
|
|
28
31
|
architect analyze ./src
|
|
29
32
|
```
|
|
30
33
|
|
|
31
|
-
## Features
|
|
32
|
-
|
|
33
|
-
### 📊 Architecture Analysis
|
|
34
|
-
- **Quality Score** — 0-100 score with weighted breakdown (Modularity, Coupling, Cohesion, Layering)
|
|
35
|
-
- **Anti-Pattern Detection** — God Class, Circular Dependencies, Leaky Abstractions, Feature Envy, Shotgun Surgery
|
|
36
|
-
- **Layer Detection** — Automatically identifies API, Service, Data, UI, and Infrastructure layers
|
|
37
|
-
- **Dependency Graph** — Interactive D3.js force-directed graph visualization
|
|
38
|
-
- **Framework Detection** — NestJS, React, Angular, Vue, Next.js, Express, Django, Flask, Spring Boot, and more
|
|
39
|
-
- **Multi-Language** — TypeScript, JavaScript, Python, Java, Go, Ruby, PHP, Rust, SQL
|
|
40
|
-
|
|
41
|
-
### 🔧 Refactoring Plan
|
|
42
|
-
- **Tier 1 (Quick Wins)** — Low-risk improvements for immediate impact
|
|
43
|
-
- **Tier 2 (Strategic)** — Larger refactoring with architecture-level benefits
|
|
44
|
-
- **Score Impact** — Before/after predictions for each refactoring step
|
|
45
|
-
- **File Operations** — CREATE, MOVE, MODIFY, DELETE with detailed descriptions
|
|
46
|
-
|
|
47
|
-
### 🤖 AI Agent System
|
|
48
|
-
- **Stack Detection** — Identifies languages, frameworks, backend/frontend/mobile/database
|
|
49
|
-
- **Agent Suggestions** — Orchestrator, Backend Developer, Frontend Developer, Database Engineer, Security Auditor, QA, Tech Debt Controller
|
|
50
|
-
- **Rules & Guards** — Architecture rules, security rules, preflight checks, quality gates
|
|
51
|
-
- **Workflows** — Development, bug-fix, code review workflows
|
|
52
|
-
- **Skills** — [skills.sh](https://skills.sh) recommendations mapped to your stack (TDD, debugging, security, performance, etc.)
|
|
53
|
-
- **Audit Mode** — If `.agent/` exists, audits and suggests improvements
|
|
54
|
-
- **Interactive UI** — Toggle cards for selecting which items to generate
|
|
55
|
-
- **Command Builder** — Dynamic CLI command updates based on selection
|
|
56
|
-
|
|
57
|
-
### 📄 Premium HTML Report
|
|
58
|
-
- Dark-themed responsive design with Inter font
|
|
59
|
-
- Animated score gauge with gradient
|
|
60
|
-
- Interactive D3.js dependency graph
|
|
61
|
-
- Bubble chart for anti-pattern severity
|
|
62
|
-
- Collapsible refactoring steps with code previews
|
|
63
|
-
- Toggle cards for agent system selection
|
|
64
|
-
- Single self-contained HTML file (no external dependencies)
|
|
34
|
+
## Core Features
|
|
65
35
|
|
|
66
|
-
|
|
36
|
+
### Architecture Analysis
|
|
67
37
|
|
|
68
|
-
|
|
69
|
-
**The unified command** — runs architecture analysis, refactoring plan, and agent suggestions.
|
|
38
|
+
Architect scans your codebase and produces a quality score (0-100) with weighted breakdown across four dimensions: Modularity, Coupling, Cohesion, and Layering. It detects anti-patterns (God Class, Circular Dependencies, Leaky Abstractions, Feature Envy, Shotgun Surgery) with severity levels and specific file locations, and automatically identifies architectural layers (API, Service, Data, UI, Infrastructure).
|
|
70
39
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
40
|
+
The analysis supports TypeScript, JavaScript, Python, Java, Kotlin, Go, Ruby, PHP, Rust, Dart, and SQL. Framework detection covers 61 frameworks across all major ecosystems — from NestJS and React to FastAPI, Spring Boot, Flutter, Gin, Actix Web, and Rails.
|
|
41
|
+
|
|
42
|
+
### Refactoring Plan
|
|
74
43
|
|
|
75
|
-
|
|
76
|
-
architect analyze ./src --output docs/report.html
|
|
44
|
+
Each analysis produces a tiered refactoring plan with score impact predictions. Tier 1 contains quick wins (low-risk, immediate impact), Tier 2 covers strategic refactoring with architecture-level benefits. Every step includes before/after score predictions and specific file operations (CREATE, MOVE, MODIFY, DELETE).
|
|
77
45
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
46
|
+
### Context-Aware Agent System
|
|
47
|
+
|
|
48
|
+
This is what sets Architect apart. The `.agent/` directory it generates isn't a generic template — it's deeply customized to your project.
|
|
49
|
+
|
|
50
|
+
**What gets generated (20+ files):**
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
.agent/
|
|
54
|
+
├── INDEX.md # Project overview with badges and links
|
|
55
|
+
├── agents/
|
|
56
|
+
│ ├── AGENT-ORCHESTRATOR.md # 5-phase protocol, dispatch table, quality gates
|
|
57
|
+
│ ├── {STACK}-BACKEND-DEVELOPER.md # Stack-specific backend agent
|
|
58
|
+
│ ├── {FRAMEWORK}-FRONTEND-DEVELOPER.md
|
|
59
|
+
│ ├── FLUTTER-UI-DEVELOPER.md # (if mobile detected)
|
|
60
|
+
│ ├── DATABASE-ENGINEER.md # (if database detected)
|
|
61
|
+
│ ├── SECURITY-AUDITOR.md # STRIDE threats, compliance, integrations
|
|
62
|
+
│ ├── QA-TEST-ENGINEER.md # Coverage tracking, test scenarios
|
|
63
|
+
│ └── TECH-DEBT-CONTROLLER.md # Score targets, anti-pattern tracking
|
|
64
|
+
├── rules/
|
|
65
|
+
│ ├── 00-general.md # Golden rules, naming, forbidden actions (stack-aware)
|
|
66
|
+
│ ├── 01-architecture.md # Anti-pattern prevention, module structure
|
|
67
|
+
│ ├── 02-security.md # OWASP, secrets, input validation
|
|
68
|
+
│ └── {stack}-rules.md # Stack-specific rules (Python, TypeScript, etc.)
|
|
69
|
+
├── guards/
|
|
70
|
+
│ ├── PREFLIGHT.md # Pre-action checklist with detected toolchain
|
|
71
|
+
│ ├── QUALITY-GATES.md # Build/test/coverage/score gates
|
|
72
|
+
│ └── CODE-REVIEW-CHECKLIST.md # Domain-specific review items
|
|
73
|
+
├── workflows/
|
|
74
|
+
│ ├── new-feature.md # Feature development workflow
|
|
75
|
+
│ ├── fix-bug.md # Bug fix workflow
|
|
76
|
+
│ └── review.md # Code review workflow
|
|
77
|
+
├── templates/
|
|
78
|
+
│ ├── C4.md # Architecture template (framework-aware Level 4)
|
|
79
|
+
│ ├── BDD.md # BDD scenarios (domain-aware)
|
|
80
|
+
│ ├── TDD.md # TDD examples (pytest/junit/go_test/jest per stack)
|
|
81
|
+
│ ├── ADR.md # Decision records (stack-aware context)
|
|
82
|
+
│ └── THREAT-MODEL.md # STRIDE model (domain-specific threats)
|
|
83
|
+
└── skills/
|
|
84
|
+
└── PROJECT-PATTERNS.md # Detected patterns (adapters, factories, etc.)
|
|
81
85
|
```
|
|
82
86
|
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
**What makes it context-aware:**
|
|
88
|
+
|
|
89
|
+
A Python/FastAPI project gets pytest examples in TDD, `class ABC` interfaces in C4, SQLAlchemy references in ADR, `type: ignore` in forbidden actions, and `pytest` in quality gates. A TypeScript/NestJS project gets Jest, `interface`, TypeORM/Prisma, `@ts-ignore`, and `npm run build`. A Go project gets `go test`, `type ... interface`, GORM, `interface{}` warnings, and `go build`. The same command produces fundamentally different output based on what it detects.
|
|
90
|
+
|
|
91
|
+
**Domain inference feeds into every template.** A fintech project gets PCI-DSS compliance gates, fraud-prevention BDD scenarios, and encryption-focused threat models. A healthtech project gets HIPAA checks and patient data protection rules. Domain confidence is boosted by reading pyproject.toml descriptions, README keywords, and project names.
|
|
92
|
+
|
|
93
|
+
## CLI Commands
|
|
94
|
+
|
|
95
|
+
### `architect analyze [path]`
|
|
96
|
+
The unified command — architecture analysis, refactoring plan, and agent suggestions in one report.
|
|
85
97
|
|
|
86
98
|
```bash
|
|
87
|
-
architect
|
|
99
|
+
architect analyze ./src # HTML report (default)
|
|
100
|
+
architect analyze ./src --output docs/report.html # Custom path
|
|
101
|
+
architect analyze ./src --format json # JSON output
|
|
102
|
+
architect analyze ./src --format markdown # Markdown output
|
|
88
103
|
```
|
|
89
104
|
|
|
90
105
|
### `architect agents [path]`
|
|
91
106
|
Generate or audit the `.agent/` directory for AI coding assistants.
|
|
92
107
|
|
|
93
108
|
```bash
|
|
94
|
-
# Generate agent
|
|
95
|
-
architect agents ./
|
|
96
|
-
|
|
97
|
-
# With specific selections
|
|
98
|
-
architect agents ./ --agents ORCHESTRATOR,QA-TEST-ENGINEER --rules 00-general,01-architecture
|
|
109
|
+
architect agents ./ # Generate full .agent/
|
|
110
|
+
architect agents ./ --agents ORCHESTRATOR,QA # Specific agents only
|
|
99
111
|
```
|
|
100
112
|
|
|
101
|
-
|
|
102
|
-
|
|
113
|
+
If `.agent/` already exists, Architect audits it and only generates missing files.
|
|
114
|
+
|
|
115
|
+
### `architect refactor [path]`
|
|
116
|
+
Generate a standalone refactoring plan.
|
|
103
117
|
|
|
104
118
|
### `architect score [path]`
|
|
105
|
-
Calculate architecture quality score.
|
|
119
|
+
Calculate architecture quality score (quick mode).
|
|
106
120
|
|
|
107
121
|
### `architect anti-patterns [path]`
|
|
108
122
|
Detect anti-patterns with severity levels.
|
|
@@ -110,32 +124,8 @@ Detect anti-patterns with severity levels.
|
|
|
110
124
|
### `architect layers [path]`
|
|
111
125
|
Analyze layer structure and distribution.
|
|
112
126
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
🏗️ Architect — Architecture Analysis
|
|
117
|
-
📂 Path: /path/to/project/src
|
|
118
|
-
📋 Command: analyze
|
|
119
|
-
📄 Format: html
|
|
120
|
-
|
|
121
|
-
✅ HTML report saved to: architect-report.html
|
|
122
|
-
📊 Score: 82/100
|
|
123
|
-
⚠️ Anti-patterns: 1
|
|
124
|
-
🔧 Refactoring steps: 2
|
|
125
|
-
🤖 Suggested agents: 6
|
|
126
|
-
|
|
127
|
-
═══════════════════════════════════════
|
|
128
|
-
SCORE: 82/100
|
|
129
|
-
═══════════════════════════════════════
|
|
130
|
-
├─ Modularity: 95
|
|
131
|
-
├─ Coupling: 50
|
|
132
|
-
├─ Cohesion: 95
|
|
133
|
-
└─ Layering: 85
|
|
134
|
-
|
|
135
|
-
📁 Files: 12 | 📝 Lines: 1,521
|
|
136
|
-
⚠️ Anti-patterns: 1
|
|
137
|
-
🤖 Agents: 6 suggested | No .agent/ found
|
|
138
|
-
```
|
|
127
|
+
### `architect diagram [path]`
|
|
128
|
+
Generate architecture diagram in Mermaid format.
|
|
139
129
|
|
|
140
130
|
## Configuration
|
|
141
131
|
|
|
@@ -143,7 +133,7 @@ Create `.architect.json` in your project root:
|
|
|
143
133
|
|
|
144
134
|
```json
|
|
145
135
|
{
|
|
146
|
-
"ignore": ["node_modules", "dist", ".git", "coverage"],
|
|
136
|
+
"ignore": ["node_modules", "dist", ".git", "coverage", "__pycache__", ".venv"],
|
|
147
137
|
"frameworks": { "detect": true },
|
|
148
138
|
"antiPatterns": {
|
|
149
139
|
"godClass": { "linesThreshold": 500, "methodsThreshold": 10 },
|
|
@@ -158,6 +148,22 @@ Create `.architect.json` in your project root:
|
|
|
158
148
|
}
|
|
159
149
|
```
|
|
160
150
|
|
|
151
|
+
## Supported Frameworks (61)
|
|
152
|
+
|
|
153
|
+
| Ecosystem | Frameworks |
|
|
154
|
+
|-----------|-----------|
|
|
155
|
+
| **Node.js/TypeScript** | NestJS, Express, Fastify, Koa, Hapi, Next.js, Nuxt |
|
|
156
|
+
| **Python** | FastAPI, Django, Flask, Starlette, Sanic, Litestar, aiohttp, Tornado, DRF |
|
|
157
|
+
| **Java/Kotlin** | Spring Boot, Quarkus, Micronaut, Ktor |
|
|
158
|
+
| **Go** | Gin, Echo, Fiber, Chi, Gorilla Mux |
|
|
159
|
+
| **Rust** | Actix Web, Axum, Rocket |
|
|
160
|
+
| **Ruby** | Ruby on Rails, Sinatra |
|
|
161
|
+
| **PHP** | Laravel, Symfony, Slim |
|
|
162
|
+
| **Dart/Flutter** | Flutter, Shelf, Dart Frog |
|
|
163
|
+
| **ORM/Database** | TypeORM, Prisma, Sequelize, Mongoose, Knex, Drizzle, SQLAlchemy, SQLModel, Tortoise ORM, Peewee |
|
|
164
|
+
| **Testing** | Jest, Vitest, Mocha, pytest, unittest, Hypothesis, RSpec |
|
|
165
|
+
| **Tooling** | ESLint, Prettier, Biome, Ruff, Black, Flake8, Pylint, mypy |
|
|
166
|
+
|
|
161
167
|
## CI/CD Integration
|
|
162
168
|
|
|
163
169
|
### GitHub Actions
|
|
@@ -191,7 +197,7 @@ npm install -D @girardelli/architect
|
|
|
191
197
|
{
|
|
192
198
|
"scripts": {
|
|
193
199
|
"architect": "architect analyze ./src --output docs/architect-report.html",
|
|
194
|
-
"architect:
|
|
200
|
+
"architect:score": "architect score ./src"
|
|
195
201
|
}
|
|
196
202
|
}
|
|
197
203
|
```
|
|
@@ -209,41 +215,28 @@ const report = await architect.analyze('./src');
|
|
|
209
215
|
// Refactoring plan
|
|
210
216
|
const plan = architect.refactor(report, './src');
|
|
211
217
|
|
|
212
|
-
// Agent suggestions (dry-run
|
|
218
|
+
// Agent suggestions (dry-run)
|
|
213
219
|
const agents = architect.suggestAgents('./');
|
|
214
220
|
|
|
215
|
-
// Generate
|
|
221
|
+
// Generate HTML report
|
|
216
222
|
const htmlGenerator = new HtmlReportGenerator();
|
|
217
223
|
const html = htmlGenerator.generateHtml(report, plan, agents);
|
|
218
224
|
```
|
|
219
225
|
|
|
220
|
-
## Supported Frameworks
|
|
221
|
-
|
|
222
|
-
| Framework | Detection Method |
|
|
223
|
-
|-----------|-----------------|
|
|
224
|
-
| NestJS | `@nestjs/core` in dependencies |
|
|
225
|
-
| React | `react` in dependencies |
|
|
226
|
-
| Angular | `@angular/core` in dependencies |
|
|
227
|
-
| Vue.js | `vue` in dependencies |
|
|
228
|
-
| Next.js | `next` in dependencies |
|
|
229
|
-
| Express.js | `express` in dependencies |
|
|
230
|
-
| TypeORM | `typeorm` in dependencies |
|
|
231
|
-
| Prisma | `@prisma/client` in dependencies |
|
|
232
|
-
| Spring Boot | `spring-boot` in pom.xml |
|
|
233
|
-
| Django | `django` in requirements.txt |
|
|
234
|
-
| Flask | `flask` in requirements.txt |
|
|
235
|
-
| Flutter | `flutter` in pubspec.yaml |
|
|
236
|
-
|
|
237
226
|
## Development
|
|
238
227
|
|
|
239
228
|
```bash
|
|
240
229
|
npm install
|
|
241
230
|
npm run build # Compile TypeScript
|
|
242
231
|
npm run dev # Watch mode
|
|
243
|
-
npm test # Run tests
|
|
232
|
+
npm test # Run tests (337 tests, 9 suites)
|
|
244
233
|
npm run lint # ESLint
|
|
245
234
|
```
|
|
246
235
|
|
|
236
|
+
## Roadmap
|
|
237
|
+
|
|
238
|
+
- **v4.0** — Agent Runtime: orchestrated execution with I/O contracts, pipeline engine, and human approval gates
|
|
239
|
+
|
|
247
240
|
## Author
|
|
248
241
|
|
|
249
242
|
**Camilo Girardelli**
|
|
@@ -262,7 +255,3 @@ Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for gui
|
|
|
262
255
|
MIT License - Copyright (c) 2026 Camilo Girardelli / Girardelli Tecnologia
|
|
263
256
|
|
|
264
257
|
See [LICENSE](LICENSE) for details.
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
**Architect** — Architecture analysis, refactoring plans, and AI agent generation for every developer.
|