@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.
Files changed (212) hide show
  1. package/README.md +105 -116
  2. package/architect-run.sh +431 -0
  3. package/assets/banner-v3.html +561 -0
  4. package/dist/agent-generator/context-enricher.d.ts +58 -0
  5. package/dist/agent-generator/context-enricher.d.ts.map +1 -0
  6. package/dist/agent-generator/context-enricher.js +613 -0
  7. package/dist/agent-generator/context-enricher.js.map +1 -0
  8. package/dist/agent-generator/domain-inferrer.d.ts +52 -0
  9. package/dist/agent-generator/domain-inferrer.d.ts.map +1 -0
  10. package/dist/agent-generator/domain-inferrer.js +585 -0
  11. package/dist/agent-generator/domain-inferrer.js.map +1 -0
  12. package/dist/agent-generator/framework-detector.d.ts +40 -0
  13. package/dist/agent-generator/framework-detector.d.ts.map +1 -0
  14. package/dist/agent-generator/framework-detector.js +611 -0
  15. package/dist/agent-generator/framework-detector.js.map +1 -0
  16. package/dist/agent-generator/index.d.ts +47 -0
  17. package/dist/agent-generator/index.d.ts.map +1 -0
  18. package/dist/agent-generator/index.js +545 -0
  19. package/dist/agent-generator/index.js.map +1 -0
  20. package/dist/agent-generator/stack-detector.d.ts +14 -0
  21. package/dist/agent-generator/stack-detector.d.ts.map +1 -0
  22. package/dist/agent-generator/stack-detector.js +124 -0
  23. package/dist/agent-generator/stack-detector.js.map +1 -0
  24. package/dist/agent-generator/templates/core/agents.d.ts +17 -0
  25. package/dist/agent-generator/templates/core/agents.d.ts.map +1 -0
  26. package/dist/agent-generator/templates/core/agents.js +1256 -0
  27. package/dist/agent-generator/templates/core/agents.js.map +1 -0
  28. package/dist/agent-generator/templates/core/architecture-rules.d.ts +7 -0
  29. package/dist/agent-generator/templates/core/architecture-rules.d.ts.map +1 -0
  30. package/dist/agent-generator/templates/core/architecture-rules.js +274 -0
  31. package/dist/agent-generator/templates/core/architecture-rules.js.map +1 -0
  32. package/dist/agent-generator/templates/core/general-rules.d.ts +8 -0
  33. package/dist/agent-generator/templates/core/general-rules.d.ts.map +1 -0
  34. package/dist/agent-generator/templates/core/general-rules.js +301 -0
  35. package/dist/agent-generator/templates/core/general-rules.js.map +1 -0
  36. package/dist/agent-generator/templates/core/hooks-generator.d.ts +21 -0
  37. package/dist/agent-generator/templates/core/hooks-generator.d.ts.map +1 -0
  38. package/dist/agent-generator/templates/core/hooks-generator.js +233 -0
  39. package/dist/agent-generator/templates/core/hooks-generator.js.map +1 -0
  40. package/dist/agent-generator/templates/core/index-md.d.ts +7 -0
  41. package/dist/agent-generator/templates/core/index-md.d.ts.map +1 -0
  42. package/dist/agent-generator/templates/core/index-md.js +246 -0
  43. package/dist/agent-generator/templates/core/index-md.js.map +1 -0
  44. package/dist/agent-generator/templates/core/orchestrator.d.ts +8 -0
  45. package/dist/agent-generator/templates/core/orchestrator.d.ts.map +1 -0
  46. package/dist/agent-generator/templates/core/orchestrator.js +422 -0
  47. package/dist/agent-generator/templates/core/orchestrator.js.map +1 -0
  48. package/dist/agent-generator/templates/core/preflight.d.ts +8 -0
  49. package/dist/agent-generator/templates/core/preflight.d.ts.map +1 -0
  50. package/dist/agent-generator/templates/core/preflight.js +213 -0
  51. package/dist/agent-generator/templates/core/preflight.js.map +1 -0
  52. package/dist/agent-generator/templates/core/quality-gates.d.ts +11 -0
  53. package/dist/agent-generator/templates/core/quality-gates.d.ts.map +1 -0
  54. package/dist/agent-generator/templates/core/quality-gates.js +254 -0
  55. package/dist/agent-generator/templates/core/quality-gates.js.map +1 -0
  56. package/dist/agent-generator/templates/core/security-rules.d.ts +7 -0
  57. package/dist/agent-generator/templates/core/security-rules.d.ts.map +1 -0
  58. package/dist/agent-generator/templates/core/security-rules.js +528 -0
  59. package/dist/agent-generator/templates/core/security-rules.js.map +1 -0
  60. package/dist/agent-generator/templates/core/skills-generator.d.ts +19 -0
  61. package/dist/agent-generator/templates/core/skills-generator.d.ts.map +1 -0
  62. package/dist/agent-generator/templates/core/skills-generator.js +546 -0
  63. package/dist/agent-generator/templates/core/skills-generator.js.map +1 -0
  64. package/dist/agent-generator/templates/core/workflow-fix-bug.d.ts +7 -0
  65. package/dist/agent-generator/templates/core/workflow-fix-bug.d.ts.map +1 -0
  66. package/dist/agent-generator/templates/core/workflow-fix-bug.js +237 -0
  67. package/dist/agent-generator/templates/core/workflow-fix-bug.js.map +1 -0
  68. package/dist/agent-generator/templates/core/workflow-new-feature.d.ts +8 -0
  69. package/dist/agent-generator/templates/core/workflow-new-feature.d.ts.map +1 -0
  70. package/dist/agent-generator/templates/core/workflow-new-feature.js +321 -0
  71. package/dist/agent-generator/templates/core/workflow-new-feature.js.map +1 -0
  72. package/dist/agent-generator/templates/core/workflow-review.d.ts +7 -0
  73. package/dist/agent-generator/templates/core/workflow-review.d.ts.map +1 -0
  74. package/dist/agent-generator/templates/core/workflow-review.js +104 -0
  75. package/dist/agent-generator/templates/core/workflow-review.js.map +1 -0
  76. package/dist/agent-generator/templates/domain/index.d.ts +22 -0
  77. package/dist/agent-generator/templates/domain/index.d.ts.map +1 -0
  78. package/dist/agent-generator/templates/domain/index.js +1176 -0
  79. package/dist/agent-generator/templates/domain/index.js.map +1 -0
  80. package/dist/agent-generator/templates/stack/index.d.ts +8 -0
  81. package/dist/agent-generator/templates/stack/index.d.ts.map +1 -0
  82. package/dist/agent-generator/templates/stack/index.js +695 -0
  83. package/dist/agent-generator/templates/stack/index.js.map +1 -0
  84. package/dist/agent-generator/templates/template-helpers.d.ts +75 -0
  85. package/dist/agent-generator/templates/template-helpers.d.ts.map +1 -0
  86. package/dist/agent-generator/templates/template-helpers.js +726 -0
  87. package/dist/agent-generator/templates/template-helpers.js.map +1 -0
  88. package/dist/agent-generator/types.d.ts +196 -0
  89. package/dist/agent-generator/types.d.ts.map +1 -0
  90. package/dist/agent-generator/types.js +27 -0
  91. package/dist/agent-generator/types.js.map +1 -0
  92. package/dist/analyzer.d.ts +5 -0
  93. package/dist/analyzer.d.ts.map +1 -1
  94. package/dist/analyzer.js +46 -5
  95. package/dist/analyzer.js.map +1 -1
  96. package/dist/analyzers/forecast.d.ts +85 -0
  97. package/dist/analyzers/forecast.d.ts.map +1 -0
  98. package/dist/analyzers/forecast.js +337 -0
  99. package/dist/analyzers/forecast.js.map +1 -0
  100. package/dist/analyzers/git-cache.d.ts +7 -0
  101. package/dist/analyzers/git-cache.d.ts.map +1 -0
  102. package/dist/analyzers/git-cache.js +41 -0
  103. package/dist/analyzers/git-cache.js.map +1 -0
  104. package/dist/analyzers/git-history.d.ts +113 -0
  105. package/dist/analyzers/git-history.d.ts.map +1 -0
  106. package/dist/analyzers/git-history.js +333 -0
  107. package/dist/analyzers/git-history.js.map +1 -0
  108. package/dist/analyzers/index.d.ts +10 -0
  109. package/dist/analyzers/index.d.ts.map +1 -0
  110. package/dist/analyzers/index.js +7 -0
  111. package/dist/analyzers/index.js.map +1 -0
  112. package/dist/analyzers/temporal-scorer.d.ts +72 -0
  113. package/dist/analyzers/temporal-scorer.d.ts.map +1 -0
  114. package/dist/analyzers/temporal-scorer.js +140 -0
  115. package/dist/analyzers/temporal-scorer.js.map +1 -0
  116. package/dist/anti-patterns.d.ts +7 -0
  117. package/dist/anti-patterns.d.ts.map +1 -1
  118. package/dist/anti-patterns.js +25 -6
  119. package/dist/anti-patterns.js.map +1 -1
  120. package/dist/cli.d.ts +2 -3
  121. package/dist/cli.d.ts.map +1 -1
  122. package/dist/cli.js +275 -113
  123. package/dist/cli.js.map +1 -1
  124. package/dist/config.d.ts +6 -0
  125. package/dist/config.d.ts.map +1 -1
  126. package/dist/config.js +48 -11
  127. package/dist/config.js.map +1 -1
  128. package/dist/html-reporter.d.ts +3 -1
  129. package/dist/html-reporter.d.ts.map +1 -1
  130. package/dist/html-reporter.js +248 -12
  131. package/dist/html-reporter.js.map +1 -1
  132. package/dist/index.d.ts +16 -3
  133. package/dist/index.d.ts.map +1 -1
  134. package/dist/index.js +63 -4
  135. package/dist/index.js.map +1 -1
  136. package/dist/project-summarizer.d.ts +38 -0
  137. package/dist/project-summarizer.d.ts.map +1 -0
  138. package/dist/project-summarizer.js +463 -0
  139. package/dist/project-summarizer.js.map +1 -0
  140. package/dist/refactor-reporter.js +1 -1
  141. package/dist/scanner.d.ts +8 -2
  142. package/dist/scanner.d.ts.map +1 -1
  143. package/dist/scanner.js +153 -113
  144. package/dist/scanner.js.map +1 -1
  145. package/dist/scorer.d.ts.map +1 -1
  146. package/dist/scorer.js +24 -11
  147. package/dist/scorer.js.map +1 -1
  148. package/dist/types.d.ts +29 -0
  149. package/dist/types.d.ts.map +1 -1
  150. package/package.json +12 -3
  151. package/src/agent-generator/context-enricher.ts +672 -0
  152. package/src/agent-generator/domain-inferrer.ts +635 -0
  153. package/src/agent-generator/framework-detector.ts +669 -0
  154. package/src/agent-generator/index.ts +634 -0
  155. package/src/agent-generator/stack-detector.ts +115 -0
  156. package/src/agent-generator/templates/core/agents.ts +1296 -0
  157. package/src/agent-generator/templates/core/architecture-rules.ts +287 -0
  158. package/src/agent-generator/templates/core/general-rules.ts +306 -0
  159. package/src/agent-generator/templates/core/hooks-generator.ts +242 -0
  160. package/src/agent-generator/templates/core/index-md.ts +260 -0
  161. package/src/agent-generator/templates/core/orchestrator.ts +459 -0
  162. package/src/agent-generator/templates/core/preflight.ts +215 -0
  163. package/src/agent-generator/templates/core/quality-gates.ts +256 -0
  164. package/src/agent-generator/templates/core/security-rules.ts +543 -0
  165. package/src/agent-generator/templates/core/skills-generator.ts +585 -0
  166. package/src/agent-generator/templates/core/workflow-fix-bug.ts +239 -0
  167. package/src/agent-generator/templates/core/workflow-new-feature.ts +323 -0
  168. package/src/agent-generator/templates/core/workflow-review.ts +106 -0
  169. package/src/agent-generator/templates/domain/index.ts +1201 -0
  170. package/src/agent-generator/templates/stack/index.ts +705 -0
  171. package/src/agent-generator/templates/template-helpers.ts +776 -0
  172. package/src/agent-generator/types.ts +232 -0
  173. package/src/analyzer.ts +51 -5
  174. package/src/analyzers/forecast.ts +496 -0
  175. package/src/analyzers/git-cache.ts +52 -0
  176. package/src/analyzers/git-history.ts +488 -0
  177. package/src/analyzers/index.ts +33 -0
  178. package/src/analyzers/temporal-scorer.ts +227 -0
  179. package/src/anti-patterns.ts +29 -6
  180. package/src/cli.ts +316 -117
  181. package/src/config.ts +52 -11
  182. package/src/html-reporter.ts +263 -13
  183. package/src/index.ts +93 -10
  184. package/src/project-summarizer.ts +521 -0
  185. package/src/refactor-reporter.ts +1 -1
  186. package/src/scanner.ts +136 -90
  187. package/src/scorer.ts +26 -11
  188. package/src/types.ts +27 -0
  189. package/tests/agent-generator.test.ts +427 -0
  190. package/tests/analyzers-integration.test.ts +174 -0
  191. package/tests/architect-adapter-enrichment.test.ts +9 -0
  192. package/tests/context-enricher.test.ts +971 -0
  193. package/tests/fixtures/monorepo/package.json +6 -0
  194. package/tests/fixtures/monorepo/packages/app/package.json +12 -0
  195. package/tests/fixtures/monorepo/packages/app/src/index.ts +6 -0
  196. package/tests/fixtures/monorepo/packages/core/package.json +7 -0
  197. package/tests/fixtures/monorepo/packages/core/src/index.ts +7 -0
  198. package/tests/forecast.test.ts +509 -0
  199. package/tests/framework-detector.test.ts +1172 -0
  200. package/tests/git-history.test.ts +254 -0
  201. package/tests/monorepo-scan.test.ts +170 -0
  202. package/tests/scanner.test.ts +7 -8
  203. package/tests/scorer.test.ts +594 -0
  204. package/tests/stack-detector.test.ts +241 -0
  205. package/tests/template-generation.test.ts +706 -0
  206. package/tests/template-helpers.test.ts +1152 -0
  207. package/tests/temporal-scorer.test.ts +307 -0
  208. package/dist/agent-generator.d.ts +0 -106
  209. package/dist/agent-generator.d.ts.map +0 -1
  210. package/dist/agent-generator.js +0 -1398
  211. package/dist/agent-generator.js.map +0 -1
  212. 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
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
6
6
  [![Node.js](https://img.shields.io/badge/Node.js-18+-339933.svg)](https://nodejs.org/)
7
7
  [![npm](https://img.shields.io/npm/v/@girardelli/architect)](https://www.npmjs.com/package/@girardelli/architect)
8
+ [![Tests](https://img.shields.io/badge/Tests-337%20passing-22c55e.svg)]()
8
9
  [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](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 v2.1
13
+ ## What's New in v3.1
13
14
 
14
- - 🔧 **Unified `analyze` command** — Architecture analysis + refactoring plan + agent system suggestions in one report
15
- - 🤖 **AI Agent System Generator** — Suggests agents, rules, guards, workflows, and skills based on detected stack
16
- - 🧠 **Skills from [skills.sh](https://skills.sh)** Stack-specific skill recommendations with install commands
17
- - 🎯 **Interactive UI** — Toggle cards with Select All/None, dynamic command builder, and copy-to-clipboard
18
- - 📊 **Refactoring Plan** — Tier-based refactoring steps with score impact predictions
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
- ## CLI Commands
36
+ ### Architecture Analysis
67
37
 
68
- ### `architect analyze [path]`
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
- ```bash
72
- # Full analysis with HTML report (default)
73
- architect analyze ./src
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
- # Custom output path
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
- # JSON or Markdown output
79
- architect analyze ./src --format json --output report.json
80
- architect analyze ./src --format markdown --output report.md
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
- ### `architect refactor [path]`
84
- Generate a standalone refactoring plan.
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 refactor ./src --output refactor-plan.html
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 configuration files
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
- ### `architect diagram [path]`
102
- Generate architecture diagram in Mermaid format.
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
- ## Output Example
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:json": "architect analyze ./src --format json --output docs/report.json"
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, no files created)
218
+ // Agent suggestions (dry-run)
213
219
  const agents = architect.suggestAgents('./');
214
220
 
215
- // Generate unified HTML report
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.