oh-my-codex-cli 0.1.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/.agent/skills/agent-kb/HOW_TO_USE.md +428 -0
- package/.agent/skills/agent-kb/README.md +46 -0
- package/.agent/skills/agent-kb/SKILL.md +128 -0
- package/.agent/skills/agent-kb/references/intelligent-analysis-explained.md +333 -0
- package/.agent/skills/agent-kb/references/query-optimization.md +225 -0
- package/.agent/skills/aireview/SKILL.md +704 -0
- package/.agent/skills/analyze/SKILL.md +81 -0
- package/.agent/skills/architect-planner/HOW_TO_USE.md +238 -0
- package/.agent/skills/architect-planner/README.md +41 -0
- package/.agent/skills/architect-planner/SKILL.md +539 -0
- package/.agent/skills/auto-mbti/SKILL.md +291 -0
- package/.agent/skills/autopilot/SKILL.md +222 -0
- package/.agent/skills/backend-patterns/SKILL.md +602 -0
- package/.agent/skills/bdd-generator/README.md +78 -0
- package/.agent/skills/bdd-generator/SKILL.md +436 -0
- package/.agent/skills/brainstorming/HOW_TO_USE.md +289 -0
- package/.agent/skills/brainstorming/README.md +41 -0
- package/.agent/skills/brainstorming/SKILL.md +165 -0
- package/.agent/skills/build-fix/SKILL.md +190 -0
- package/.agent/skills/cancel/SKILL.md +658 -0
- package/.agent/skills/checkpoint/SKILL.md +94 -0
- package/.agent/skills/code-review/SKILL.md +273 -0
- package/.agent/skills/coding-standards/SKILL.md +535 -0
- package/.agent/skills/conductor/SKILL.md +128 -0
- package/.agent/skills/conductor/commands/conductor/implement.toml +358 -0
- package/.agent/skills/conductor/commands/conductor/newTrack.toml +142 -0
- package/.agent/skills/conductor/commands/conductor/revert.toml +123 -0
- package/.agent/skills/conductor/commands/conductor/setup.toml +429 -0
- package/.agent/skills/conductor/commands/conductor/status.toml +57 -0
- package/.agent/skills/conductor/scripts/install.sh +89 -0
- package/.agent/skills/conductor/templates/code_styleguides/csharp.md +115 -0
- package/.agent/skills/conductor/templates/code_styleguides/dart.md +238 -0
- package/.agent/skills/conductor/templates/code_styleguides/general.md +23 -0
- package/.agent/skills/conductor/templates/code_styleguides/go.md +48 -0
- package/.agent/skills/conductor/templates/code_styleguides/html-css.md +49 -0
- package/.agent/skills/conductor/templates/code_styleguides/javascript.md +51 -0
- package/.agent/skills/conductor/templates/code_styleguides/python.md +37 -0
- package/.agent/skills/conductor/templates/code_styleguides/typescript.md +43 -0
- package/.agent/skills/conductor/templates/rules/README.md +23 -0
- package/.agent/skills/conductor/templates/rules/agents.md +49 -0
- package/.agent/skills/conductor/templates/rules/coding-style.md +70 -0
- package/.agent/skills/conductor/templates/rules/dev.md +20 -0
- package/.agent/skills/conductor/templates/rules/git-workflow.md +45 -0
- package/.agent/skills/conductor/templates/rules/hooks.md +6 -0
- package/.agent/skills/conductor/templates/rules/patterns.md +55 -0
- package/.agent/skills/conductor/templates/rules/performance.md +47 -0
- package/.agent/skills/conductor/templates/rules/research.md +26 -0
- package/.agent/skills/conductor/templates/rules/review.md +22 -0
- package/.agent/skills/conductor/templates/rules/security.md +36 -0
- package/.agent/skills/conductor/templates/rules/testing.md +30 -0
- package/.agent/skills/conductor/templates/workflow.md +333 -0
- package/.agent/skills/consensus/HOW_TO_USE.md +191 -0
- package/.agent/skills/consensus/README.md +41 -0
- package/.agent/skills/consensus/SKILL.md +317 -0
- package/.agent/skills/content-research-writer/SKILL.md +537 -0
- package/.agent/skills/debug-analysis/SKILL.md +331 -0
- package/.agent/skills/deepinit/SKILL.md +347 -0
- package/.agent/skills/deepsearch/SKILL.md +56 -0
- package/.agent/skills/doctor/SKILL.md +158 -0
- package/.agent/skills/drawio/EXAMPLES.md +382 -0
- package/.agent/skills/drawio/QUICK_START.md +237 -0
- package/.agent/skills/drawio/README.md +315 -0
- package/.agent/skills/drawio/SETUP_GUIDE.md +254 -0
- package/.agent/skills/drawio/SKILL.md +1176 -0
- package/.agent/skills/e2e/SKILL.md +396 -0
- package/.agent/skills/ecomode/SKILL.md +160 -0
- package/.agent/skills/electron-driver/SKILL.md +144 -0
- package/.agent/skills/electron-driver/scripts/driver-template.js +71 -0
- package/.agent/skills/eval/SKILL.md +140 -0
- package/.agent/skills/eval-harness/SKILL.md +242 -0
- package/.agent/skills/evolve/SKILL.md +213 -0
- package/.agent/skills/frontend-design/SKILL.md +42 -0
- package/.agent/skills/frontend-patterns/SKILL.md +646 -0
- package/.agent/skills/frontend-ui-ux/SKILL.md +70 -0
- package/.agent/skills/git-master/SKILL.md +75 -0
- package/.agent/skills/help/SKILL.md +89 -0
- package/.agent/skills/iterative-retrieval/SKILL.md +217 -0
- package/.agent/skills/local-skills-setup/SKILL.md +483 -0
- package/.agent/skills/log-analyzer/SKILL.md +187 -0
- package/.agent/skills/mcp-setup/SKILL.md +226 -0
- package/.agent/skills/multi-model-research/HOW_TO_USE.md +614 -0
- package/.agent/skills/multi-model-research/README.md +233 -0
- package/.agent/skills/multi-model-research/SKILL.md +541 -0
- package/.agent/skills/multi-model-research/references/troubleshooting.md +415 -0
- package/.agent/skills/note/SKILL.md +80 -0
- package/.agent/skills/omc-setup/SKILL.md +219 -0
- package/.agent/skills/orchestrate/SKILL.md +620 -0
- package/.agent/skills/patent-workflow/IMPLEMENTATION_SUMMARY.md +500 -0
- package/.agent/skills/patent-workflow/README.md +455 -0
- package/.agent/skills/patent-workflow/SKILL.md +1036 -0
- package/.agent/skills/patent-workflow/tools/irr_checker.py +260 -0
- package/.agent/skills/patent-workflow/tools/sample_terminology.json +49 -0
- package/.agent/skills/patent-workflow/tools/term_checker.py +355 -0
- package/.agent/skills/pattern-recognition/SKILL.md +792 -0
- package/.agent/skills/pipeline/SKILL.md +448 -0
- package/.agent/skills/plan/SKILL.md +309 -0
- package/.agent/skills/planning-methodology/SKILL.md +370 -0
- package/.agent/skills/planning-with-files/SKILL.md +210 -0
- package/.agent/skills/planning-with-files/examples.md +202 -0
- package/.agent/skills/planning-with-files/reference.md +218 -0
- package/.agent/skills/planning-with-files/scripts/check-complete.ps1 +42 -0
- package/.agent/skills/planning-with-files/scripts/check-complete.sh +44 -0
- package/.agent/skills/planning-with-files/scripts/init-session.ps1 +120 -0
- package/.agent/skills/planning-with-files/scripts/init-session.sh +120 -0
- package/.agent/skills/planning-with-files/scripts/session-catchup.py +208 -0
- package/.agent/skills/planning-with-files/templates/findings.md +95 -0
- package/.agent/skills/planning-with-files/templates/progress.md +114 -0
- package/.agent/skills/planning-with-files/templates/task_plan.md +132 -0
- package/.agent/skills/project-analyze/CLAUDE.md +18 -0
- package/.agent/skills/project-analyze/HOW_TO_USE.md +145 -0
- package/.agent/skills/project-analyze/README.md +42 -0
- package/.agent/skills/project-analyze/SKILL.md +289 -0
- package/.agent/skills/project-analyze/SKILL.md.backup +287 -0
- package/.agent/skills/project-analyze/SKILL.md.backup_20260105_093646 +287 -0
- package/.agent/skills/project-analyze/assets/analysis-report-template.md +433 -0
- package/.agent/skills/project-analyze/references/analysis-patterns.md +422 -0
- package/.agent/skills/project-analyze/references/projectmind-explained.md +535 -0
- package/.agent/skills/project-session-manager/SKILL.md +428 -0
- package/.agent/skills/project-session-manager/lib/config.sh +86 -0
- package/.agent/skills/project-session-manager/lib/parse.sh +121 -0
- package/.agent/skills/project-session-manager/lib/session.sh +132 -0
- package/.agent/skills/project-session-manager/lib/tmux.sh +103 -0
- package/.agent/skills/project-session-manager/lib/worktree.sh +171 -0
- package/.agent/skills/project-session-manager/psm.sh +629 -0
- package/.agent/skills/project-session-manager/templates/feature.md +56 -0
- package/.agent/skills/project-session-manager/templates/issue-fix.md +57 -0
- package/.agent/skills/project-session-manager/templates/pr-review.md +65 -0
- package/.agent/skills/project-session-manager/templates/projects.json +19 -0
- package/.agent/skills/quality-check/HOW_TO_USE.md +171 -0
- package/.agent/skills/quality-check/README.md +50 -0
- package/.agent/skills/quality-check/SKILL.md +240 -0
- package/.agent/skills/quality-check/SKILL.md.backup +238 -0
- package/.agent/skills/quality-check/SKILL.md.backup_20260105_093646 +238 -0
- package/.agent/skills/quality-check/assets/quality-report-template.md +437 -0
- package/.agent/skills/quality-check/references/refactoring-patterns.md +550 -0
- package/.agent/skills/quality-check/references/scoring-criteria.md +454 -0
- package/.agent/skills/quality-validation/SKILL.md +519 -0
- package/.agent/skills/quality-validation/SKILL.md.backup +573 -0
- package/.agent/skills/quality-validation/SKILL.md.backup_20260105_093646 +573 -0
- package/.agent/skills/ralph/SKILL.md +236 -0
- package/.agent/skills/ralph-init/SKILL.md +78 -0
- package/.agent/skills/ralplan/SKILL.md +58 -0
- package/.agent/skills/refactor-clean/SKILL.md +49 -0
- package/.agent/skills/release/SKILL.md +84 -0
- package/.agent/skills/research/SKILL.md +526 -0
- package/.agent/skills/research-methodology/SKILL.md +268 -0
- package/.agent/skills/review/SKILL.md +53 -0
- package/.agent/skills/security-review/SKILL.md +509 -0
- package/.agent/skills/security-review/cloud-infrastructure-security.md +361 -0
- package/.agent/skills/setup-pm/SKILL.md +102 -0
- package/.agent/skills/skill/SKILL.md +424 -0
- package/.agent/skills/skill-create/SKILL.md +209 -0
- package/.agent/skills/skill-debugger/HOW_TO_USE.md +244 -0
- package/.agent/skills/skill-debugger/README.md +44 -0
- package/.agent/skills/skill-debugger/SKILL.md +326 -0
- package/.agent/skills/skill-debugger/diagnostic_checklist.md +115 -0
- package/.agent/skills/skill-development/SKILL.md +661 -0
- package/.agent/skills/skill-development/references/skill-creator-original.md +209 -0
- package/.agent/skills/skill-doc-generator/README.md +37 -0
- package/.agent/skills/skill-doc-generator/SKILL.md +331 -0
- package/.agent/skills/skill-quality-analyzer/HOW_TO_USE.md +243 -0
- package/.agent/skills/skill-quality-analyzer/README.md +61 -0
- package/.agent/skills/skill-quality-analyzer/SKILL.md +247 -0
- package/.agent/skills/skill-quality-analyzer/analyzer.py +209 -0
- package/.agent/skills/skill-quality-analyzer/expected_output.json +81 -0
- package/.agent/skills/skill-quality-analyzer/sample_input.json +9 -0
- package/.agent/skills/skill-tester/README.md +46 -0
- package/.agent/skills/skill-tester/SKILL.md +345 -0
- package/.agent/skills/start-dev/SKILL.md +701 -0
- package/.agent/skills/swarm/SKILL.md +691 -0
- package/.agent/skills/task-kb-lookup/SKILL.md +211 -0
- package/.agent/skills/task-kb-record/SKILL.md +417 -0
- package/.agent/skills/tdd/SKILL.md +446 -0
- package/.agent/skills/tdd-generator/DEMO.md +516 -0
- package/.agent/skills/tdd-generator/README.md +89 -0
- package/.agent/skills/tdd-generator/SKILL.md +278 -0
- package/.agent/skills/tdd-workflow/SKILL.md +424 -0
- package/.agent/skills/test-coverage/SKILL.md +48 -0
- package/.agent/skills/thinkdeep/HOW_TO_USE.md +183 -0
- package/.agent/skills/thinkdeep/README.md +41 -0
- package/.agent/skills/thinkdeep/SKILL.md +343 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +228 -0
- package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/prompts.csv +24 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/skills/ui-ux-pro-max/data/styles.csv +59 -0
- package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/skills/ui-ux-pro-max/scripts/core.py +236 -0
- package/.agent/skills/ui-ux-pro-max/scripts/search.py +61 -0
- package/.agent/skills/ultrapilot/SKILL.md +647 -0
- package/.agent/skills/ultraqa/SKILL.md +152 -0
- package/.agent/skills/ultrawork/SKILL.md +123 -0
- package/.agent/skills/update-codemaps/SKILL.md +38 -0
- package/.agent/skills/update-docs/SKILL.md +52 -0
- package/.agent/skills/verification-loop/SKILL.md +140 -0
- package/.agent/skills/verify/SKILL.md +80 -0
- package/.agent/skills/writer-memory/SKILL.md +459 -0
- package/.agent/skills/writer-memory/lib/character-tracker.ts +338 -0
- package/.agent/skills/writer-memory/lib/memory-manager.ts +804 -0
- package/.agent/skills/writer-memory/lib/relationship-graph.ts +400 -0
- package/.agent/skills/writer-memory/lib/scene-organizer.ts +544 -0
- package/.agent/skills/writer-memory/lib/synopsis-builder.ts +339 -0
- package/.agent/skills/writer-memory/templates/synopsis-template.md +46 -0
- package/.governance/skill-lint.allowlist +4 -0
- package/.governance/skill-llm.allowlist +4 -0
- package/AGENTS.md +59 -0
- package/LICENSE +21 -0
- package/README.md +169 -0
- package/README.zh.md +145 -0
- package/bin/omcodex.js +8 -0
- package/commands/conductor/implement.toml +358 -0
- package/commands/conductor/newTrack.toml +142 -0
- package/commands/conductor/revert.toml +123 -0
- package/commands/conductor/setup.toml +429 -0
- package/commands/conductor/status.toml +57 -0
- package/docs/ALIGNMENT.md +40 -0
- package/docs/CODEX.md +133 -0
- package/docs/NOTIFY.md +81 -0
- package/docs/SKILL_GOVERNANCE.md +72 -0
- package/docs/SKILL_GOVERNANCE_FRAMEWORK.md +182 -0
- package/docs/SKILL_GOVERNANCE_FRAMEWORK.zh.md +170 -0
- package/package.json +50 -0
- package/prompts/architect.md +105 -0
- package/prompts/executor.md +134 -0
- package/prompts/planner.md +113 -0
- package/scripts/check-skill-governance.sh +84 -0
- package/scripts/check-skill-llm-governance.js +302 -0
- package/scripts/eval-skills.js +217 -0
- package/scripts/generate-catalog-docs.js +95 -0
- package/scripts/generate-codex-mcp-config.sh +22 -0
- package/scripts/install-codex-force.sh +5 -0
- package/scripts/install-codex-incremental.sh +5 -0
- package/scripts/install-codex.sh +79 -0
- package/scripts/notify-dispatch.js +15 -0
- package/scripts/setup-package-manager.js +137 -0
- package/src/catalog/generated/public-catalog.json +547 -0
- package/src/catalog/manifest.json +542 -0
- package/src/catalog/reader.js +43 -0
- package/src/catalog/schema.js +79 -0
- package/src/cli/doctor.js +62 -0
- package/src/cli/index.js +85 -0
- package/src/cli/notify.js +127 -0
- package/src/cli/route.js +43 -0
- package/src/cli/setup.js +155 -0
- package/src/cli/team.js +125 -0
- package/src/config/generator.js +119 -0
- package/src/mcp/memory-server.js +241 -0
- package/src/mcp/state-server.js +112 -0
- package/src/mcp/trace-server.js +168 -0
- package/src/notify/dispatch.js +74 -0
- package/src/notify/extensibility/dispatcher.js +113 -0
- package/src/notify/extensibility/events.js +15 -0
- package/src/notify/extensibility/loader.js +54 -0
- package/src/router/skill-router.js +90 -0
- package/src/team/auto-advance.js +72 -0
- package/src/team/orchestrator.js +82 -0
- package/src/team/state-store.js +33 -0
- package/src/utils/paths.js +33 -0
- package/templates/AGENTS.md +15 -0
- package/templates/catalog-manifest.json +542 -0
- package/templates/code_styleguides/csharp.md +115 -0
- package/templates/code_styleguides/dart.md +238 -0
- package/templates/code_styleguides/general.md +23 -0
- package/templates/code_styleguides/go.md +48 -0
- package/templates/code_styleguides/html-css.md +49 -0
- package/templates/code_styleguides/javascript.md +51 -0
- package/templates/code_styleguides/python.md +37 -0
- package/templates/code_styleguides/typescript.md +43 -0
- package/templates/rules/README.md +23 -0
- package/templates/rules/agents.md +49 -0
- package/templates/rules/coding-style.md +70 -0
- package/templates/rules/dev.md +20 -0
- package/templates/rules/git-workflow.md +45 -0
- package/templates/rules/notify.md +6 -0
- package/templates/rules/patterns.md +55 -0
- package/templates/rules/performance.md +47 -0
- package/templates/rules/research.md +26 -0
- package/templates/rules/review.md +22 -0
- package/templates/rules/security.md +36 -0
- package/templates/rules/testing.md +30 -0
- package/templates/workflow.md +333 -0
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
# Project Analysis Patterns
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Common patterns and approaches for analyzing different types of projects using ProjectMind knowledge graph system.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Pattern 1: Monolithic Web Application Analysis
|
|
10
|
+
|
|
11
|
+
**When**: Analyzing traditional web applications (Rails, Django, Express)
|
|
12
|
+
|
|
13
|
+
### Discovery Strategy
|
|
14
|
+
|
|
15
|
+
1. **Entry Points**
|
|
16
|
+
- `package.json` / `Gemfile` / `requirements.txt` - dependencies
|
|
17
|
+
- `server.js` / `app.py` / `config/routes.rb` - routing structure
|
|
18
|
+
- `README.md` - project overview and setup
|
|
19
|
+
|
|
20
|
+
2. **Architecture Understanding**
|
|
21
|
+
- Controllers/Views/Models (MVC pattern)
|
|
22
|
+
- Middleware stack
|
|
23
|
+
- Database schema and migrations
|
|
24
|
+
- Asset pipeline
|
|
25
|
+
|
|
26
|
+
3. **Dependency Mapping**
|
|
27
|
+
- External dependencies (npm, pip, gems)
|
|
28
|
+
- Internal module dependencies
|
|
29
|
+
- Database relationships
|
|
30
|
+
- API endpoints
|
|
31
|
+
|
|
32
|
+
### Key Questions to Answer
|
|
33
|
+
|
|
34
|
+
- What's the request/response flow?
|
|
35
|
+
- How is authentication/authorization handled?
|
|
36
|
+
- What's the data model structure?
|
|
37
|
+
- How are background jobs processed?
|
|
38
|
+
- What's the deployment strategy?
|
|
39
|
+
|
|
40
|
+
### Analysis Output
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
## Architecture: Monolithic MVC Web Application
|
|
44
|
+
|
|
45
|
+
**Stack**: [Framework + Database + Frontend]
|
|
46
|
+
**Entry Points**:
|
|
47
|
+
- Main server: `server.js:15`
|
|
48
|
+
- Routes: `routes/index.js`
|
|
49
|
+
- Database: `models/` (20 models)
|
|
50
|
+
|
|
51
|
+
**Key Components**:
|
|
52
|
+
- Authentication: Passport.js (JWT)
|
|
53
|
+
- Database: PostgreSQL + Sequelize ORM
|
|
54
|
+
- Frontend: React SPA (separate build)
|
|
55
|
+
- Background Jobs: Bull + Redis
|
|
56
|
+
|
|
57
|
+
**Complexity Indicators**:
|
|
58
|
+
- Controllers: 45 files
|
|
59
|
+
- Models: 20 entities
|
|
60
|
+
- Routes: 120 endpoints
|
|
61
|
+
- Migrations: 85 files
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Pattern 2: Microservices Architecture Analysis
|
|
67
|
+
|
|
68
|
+
**When**: Analyzing distributed service architectures
|
|
69
|
+
|
|
70
|
+
### Discovery Strategy
|
|
71
|
+
|
|
72
|
+
1. **Service Inventory**
|
|
73
|
+
- List all service directories
|
|
74
|
+
- Identify service boundaries
|
|
75
|
+
- Map inter-service dependencies
|
|
76
|
+
|
|
77
|
+
2. **Communication Patterns**
|
|
78
|
+
- REST APIs (OpenAPI specs)
|
|
79
|
+
- Message queues (RabbitMQ, Kafka)
|
|
80
|
+
- gRPC definitions
|
|
81
|
+
- Event bus patterns
|
|
82
|
+
|
|
83
|
+
3. **Infrastructure**
|
|
84
|
+
- Docker/Kubernetes configs
|
|
85
|
+
- Service mesh (Istio, Linkerd)
|
|
86
|
+
- API gateway
|
|
87
|
+
- Service discovery
|
|
88
|
+
|
|
89
|
+
### Key Questions to Answer
|
|
90
|
+
|
|
91
|
+
- How many services are there?
|
|
92
|
+
- What's the service dependency graph?
|
|
93
|
+
- How do services communicate?
|
|
94
|
+
- What's the data ownership model?
|
|
95
|
+
- How is failure handled (circuit breakers)?
|
|
96
|
+
|
|
97
|
+
### Analysis Output
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
## Architecture: Microservices (Event-Driven)
|
|
101
|
+
|
|
102
|
+
**Services**: 12 independent services
|
|
103
|
+
**Communication**:
|
|
104
|
+
- Sync: REST APIs (Express + Swagger)
|
|
105
|
+
- Async: RabbitMQ message bus
|
|
106
|
+
- API Gateway: Kong
|
|
107
|
+
|
|
108
|
+
**Service Map**:
|
|
109
|
+
- `user-service` → `auth-service`, `notification-service`
|
|
110
|
+
- `order-service` → `payment-service`, `inventory-service`
|
|
111
|
+
- `notification-service` → External: SendGrid, Twilio
|
|
112
|
+
|
|
113
|
+
**Key Patterns**:
|
|
114
|
+
- Event Sourcing: `order-service`, `inventory-service`
|
|
115
|
+
- CQRS: `reporting-service`
|
|
116
|
+
- Circuit Breaker: All external HTTP calls
|
|
117
|
+
- Saga Pattern: Order fulfillment workflow
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Pattern 3: Frontend SPA Analysis
|
|
123
|
+
|
|
124
|
+
**When**: Analyzing React, Vue, Angular applications
|
|
125
|
+
|
|
126
|
+
### Discovery Strategy
|
|
127
|
+
|
|
128
|
+
1. **Build Configuration**
|
|
129
|
+
- Webpack/Vite/Parcel config
|
|
130
|
+
- Environment variables
|
|
131
|
+
- Build scripts
|
|
132
|
+
|
|
133
|
+
2. **Component Structure**
|
|
134
|
+
- Component hierarchy
|
|
135
|
+
- State management (Redux, MobX, Vuex)
|
|
136
|
+
- Routing structure
|
|
137
|
+
- API integration patterns
|
|
138
|
+
|
|
139
|
+
3. **Dependencies**
|
|
140
|
+
- Core framework version
|
|
141
|
+
- UI library (Material-UI, Ant Design)
|
|
142
|
+
- Form handling
|
|
143
|
+
- Data fetching (React Query, SWR)
|
|
144
|
+
|
|
145
|
+
### Key Questions to Answer
|
|
146
|
+
|
|
147
|
+
- What's the component organization strategy?
|
|
148
|
+
- How is global state managed?
|
|
149
|
+
- What's the routing structure?
|
|
150
|
+
- How are API calls handled?
|
|
151
|
+
- What's the build/deployment pipeline?
|
|
152
|
+
|
|
153
|
+
### Analysis Output
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
## Architecture: React SPA with TypeScript
|
|
157
|
+
|
|
158
|
+
**Build**: Vite + TypeScript
|
|
159
|
+
**State Management**: Redux Toolkit + RTK Query
|
|
160
|
+
**Routing**: React Router v6 (20 routes)
|
|
161
|
+
**UI Framework**: Material-UI v5
|
|
162
|
+
|
|
163
|
+
**Component Structure**:
|
|
164
|
+
- Pages: 15 components (`src/pages/`)
|
|
165
|
+
- Shared: 40 components (`src/components/`)
|
|
166
|
+
- Hooks: 12 custom hooks (`src/hooks/`)
|
|
167
|
+
- Context: 3 contexts (Theme, Auth, Notifications)
|
|
168
|
+
|
|
169
|
+
**Key Patterns**:
|
|
170
|
+
- Compound Components: Form builders
|
|
171
|
+
- Render Props: Data fetching wrappers
|
|
172
|
+
- HOCs: Authentication guards
|
|
173
|
+
- Custom Hooks: API calls, form handling
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Pattern 4: Library/SDK Analysis
|
|
179
|
+
|
|
180
|
+
**When**: Analyzing reusable libraries and SDKs
|
|
181
|
+
|
|
182
|
+
### Discovery Strategy
|
|
183
|
+
|
|
184
|
+
1. **Public API Surface**
|
|
185
|
+
- Exported functions/classes
|
|
186
|
+
- TypeScript definitions
|
|
187
|
+
- API documentation
|
|
188
|
+
|
|
189
|
+
2. **Internal Structure**
|
|
190
|
+
- Core vs utilities
|
|
191
|
+
- Internal dependencies
|
|
192
|
+
- Extension points
|
|
193
|
+
|
|
194
|
+
3. **Build and Distribution**
|
|
195
|
+
- Build pipeline (Rollup, TSC)
|
|
196
|
+
- Package formats (CJS, ESM, UMD)
|
|
197
|
+
- Browser vs Node.js support
|
|
198
|
+
|
|
199
|
+
### Key Questions to Answer
|
|
200
|
+
|
|
201
|
+
- What's the public API?
|
|
202
|
+
- What are the extension points?
|
|
203
|
+
- How is the library tested?
|
|
204
|
+
- What are the size/performance characteristics?
|
|
205
|
+
- What are the peer dependencies?
|
|
206
|
+
|
|
207
|
+
### Analysis Output
|
|
208
|
+
|
|
209
|
+
```markdown
|
|
210
|
+
## Architecture: Utility Library (Tree-shakeable ESM)
|
|
211
|
+
|
|
212
|
+
**Public API**: 45 functions across 6 categories
|
|
213
|
+
**Build**: Rollup + TypeScript
|
|
214
|
+
**Output**: ESM + CJS + UMD (5.2KB gzipped)
|
|
215
|
+
|
|
216
|
+
**API Categories**:
|
|
217
|
+
- Array utils: 12 functions
|
|
218
|
+
- Object utils: 10 functions
|
|
219
|
+
- String utils: 8 functions
|
|
220
|
+
- Date utils: 7 functions
|
|
221
|
+
- Function utils: 5 functions
|
|
222
|
+
- Async utils: 3 functions
|
|
223
|
+
|
|
224
|
+
**Key Characteristics**:
|
|
225
|
+
- Zero dependencies
|
|
226
|
+
- Tree-shakeable
|
|
227
|
+
- TypeScript native
|
|
228
|
+
- 100% test coverage (Jest)
|
|
229
|
+
- Browser + Node.js compatible
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Pattern 5: Monorepo Analysis
|
|
235
|
+
|
|
236
|
+
**When**: Analyzing projects with multiple packages
|
|
237
|
+
|
|
238
|
+
### Discovery Strategy
|
|
239
|
+
|
|
240
|
+
1. **Workspace Structure**
|
|
241
|
+
- Package manager (npm workspaces, Yarn, pnpm, Lerna)
|
|
242
|
+
- Package organization
|
|
243
|
+
- Shared dependencies
|
|
244
|
+
|
|
245
|
+
2. **Inter-Package Dependencies**
|
|
246
|
+
- Internal package dependencies
|
|
247
|
+
- Shared configurations
|
|
248
|
+
- Build orchestration
|
|
249
|
+
|
|
250
|
+
3. **Tooling**
|
|
251
|
+
- Build pipeline (Nx, Turborepo)
|
|
252
|
+
- Testing strategy
|
|
253
|
+
- CI/CD setup
|
|
254
|
+
|
|
255
|
+
### Key Questions to Answer
|
|
256
|
+
|
|
257
|
+
- How many packages are there?
|
|
258
|
+
- What's the dependency graph?
|
|
259
|
+
- How are packages built and published?
|
|
260
|
+
- What's shared vs package-specific?
|
|
261
|
+
- How is versioning handled?
|
|
262
|
+
|
|
263
|
+
### Analysis Output
|
|
264
|
+
|
|
265
|
+
```markdown
|
|
266
|
+
## Architecture: Monorepo (pnpm workspaces)
|
|
267
|
+
|
|
268
|
+
**Packages**: 8 packages
|
|
269
|
+
**Structure**:
|
|
270
|
+
- `packages/core` - Core library
|
|
271
|
+
- `packages/react` - React bindings
|
|
272
|
+
- `packages/vue` - Vue bindings
|
|
273
|
+
- `packages/cli` - Command-line tool
|
|
274
|
+
- `apps/docs` - Documentation site
|
|
275
|
+
- `apps/playground` - Interactive playground
|
|
276
|
+
|
|
277
|
+
**Dependency Graph**:
|
|
278
|
+
- `@mylib/react` → `@mylib/core`
|
|
279
|
+
- `@mylib/vue` → `@mylib/core`
|
|
280
|
+
- `@mylib/cli` → `@mylib/core`
|
|
281
|
+
- `docs` → `@mylib/react`, `@mylib/vue`
|
|
282
|
+
|
|
283
|
+
**Build Orchestration**: Turborepo (3x faster builds)
|
|
284
|
+
**Shared Configs**: ESLint, TypeScript, Prettier
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Pattern 6: Legacy Codebase Analysis
|
|
290
|
+
|
|
291
|
+
**When**: Analyzing old or undocumented projects
|
|
292
|
+
|
|
293
|
+
### Discovery Strategy (Forensic Approach)
|
|
294
|
+
|
|
295
|
+
1. **Historical Analysis**
|
|
296
|
+
- Git history (commit patterns, authors)
|
|
297
|
+
- Last modification dates
|
|
298
|
+
- Dead code detection
|
|
299
|
+
|
|
300
|
+
2. **Runtime Behavior**
|
|
301
|
+
- Entry points and call graphs
|
|
302
|
+
- Actual vs declared dependencies
|
|
303
|
+
- Runtime errors and logs
|
|
304
|
+
|
|
305
|
+
3. **Refactoring Opportunities**
|
|
306
|
+
- Code complexity metrics
|
|
307
|
+
- Duplication detection
|
|
308
|
+
- Outdated dependencies
|
|
309
|
+
|
|
310
|
+
### Key Questions to Answer
|
|
311
|
+
|
|
312
|
+
- What parts are actively maintained?
|
|
313
|
+
- What can be safely deleted?
|
|
314
|
+
- What dependencies are outdated?
|
|
315
|
+
- What's the test coverage?
|
|
316
|
+
- What are the biggest refactoring opportunities?
|
|
317
|
+
|
|
318
|
+
### Analysis Output
|
|
319
|
+
|
|
320
|
+
```markdown
|
|
321
|
+
## Architecture: Legacy Codebase (Needs Modernization)
|
|
322
|
+
|
|
323
|
+
**Age**: 7 years (first commit: 2018-03-15)
|
|
324
|
+
**Last Updated**: 3 months ago (partial)
|
|
325
|
+
**Technical Debt**: High
|
|
326
|
+
|
|
327
|
+
**Health Metrics**:
|
|
328
|
+
- Active Files: 340 / 890 (38%)
|
|
329
|
+
- Dead Code: ~550 files (62%)
|
|
330
|
+
- Outdated Dependencies: 45 / 67 (67%)
|
|
331
|
+
- Test Coverage: 23%
|
|
332
|
+
|
|
333
|
+
**Refactoring Priorities**:
|
|
334
|
+
1. Remove dead code (estimated 60% size reduction)
|
|
335
|
+
2. Update critical dependencies (12 security vulnerabilities)
|
|
336
|
+
3. Add tests for core business logic
|
|
337
|
+
4. Extract API layer (currently mixed with UI)
|
|
338
|
+
|
|
339
|
+
**Risk Assessment**:
|
|
340
|
+
- High: No tests for payment processing
|
|
341
|
+
- Medium: Outdated authentication library
|
|
342
|
+
- Low: UI framework version (still supported)
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Common Analysis Metrics
|
|
348
|
+
|
|
349
|
+
### Codebase Size
|
|
350
|
+
- Total files
|
|
351
|
+
- Lines of code
|
|
352
|
+
- File type distribution
|
|
353
|
+
|
|
354
|
+
### Complexity
|
|
355
|
+
- Average cyclomatic complexity
|
|
356
|
+
- Deepest nesting level
|
|
357
|
+
- Longest functions/files
|
|
358
|
+
|
|
359
|
+
### Dependencies
|
|
360
|
+
- Direct dependencies count
|
|
361
|
+
- Transitive dependencies count
|
|
362
|
+
- Dependency tree depth
|
|
363
|
+
- Outdated dependencies
|
|
364
|
+
|
|
365
|
+
### Maintainability
|
|
366
|
+
- Test coverage percentage
|
|
367
|
+
- Documentation coverage
|
|
368
|
+
- Code duplication percentage
|
|
369
|
+
- Technical debt ratio
|
|
370
|
+
|
|
371
|
+
### Activity
|
|
372
|
+
- Commit frequency
|
|
373
|
+
- Contributors count
|
|
374
|
+
- Last modification dates
|
|
375
|
+
- Hotspot files (most changed)
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## Analysis Workflow Template
|
|
380
|
+
|
|
381
|
+
```markdown
|
|
382
|
+
# Project Analysis Workflow
|
|
383
|
+
|
|
384
|
+
## Phase 1: Discovery (5-10 minutes)
|
|
385
|
+
1. Read README.md and package.json
|
|
386
|
+
2. Identify project type and stack
|
|
387
|
+
3. Locate entry points
|
|
388
|
+
4. Map directory structure
|
|
389
|
+
|
|
390
|
+
## Phase 2: Deep Dive (15-20 minutes)
|
|
391
|
+
1. Analyze architecture pattern
|
|
392
|
+
2. Map dependencies (internal + external)
|
|
393
|
+
3. Identify key components
|
|
394
|
+
4. Understand data flow
|
|
395
|
+
|
|
396
|
+
## Phase 3: Assessment (5-10 minutes)
|
|
397
|
+
1. Calculate complexity metrics
|
|
398
|
+
2. Identify technical debt
|
|
399
|
+
3. Find refactoring opportunities
|
|
400
|
+
4. Document findings
|
|
401
|
+
|
|
402
|
+
## Phase 4: Reporting (10 minutes)
|
|
403
|
+
1. Summarize architecture
|
|
404
|
+
2. Highlight key insights
|
|
405
|
+
3. Provide recommendations
|
|
406
|
+
4. Create visual dependency graph
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
**Total Time**: 35-50 minutes for comprehensive analysis
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## Quick Reference: Analysis by Project Type
|
|
414
|
+
|
|
415
|
+
| Project Type | Entry Point | Key Files | Analysis Focus |
|
|
416
|
+
|--------------|-------------|-----------|----------------|
|
|
417
|
+
| Express API | `server.js`, `app.js` | `routes/`, `controllers/` | Endpoints, middleware |
|
|
418
|
+
| React SPA | `index.tsx`, `App.tsx` | `components/`, `pages/` | Component structure, state |
|
|
419
|
+
| Library | `index.ts`, `package.json` | `src/`, `dist/` | Public API, build output |
|
|
420
|
+
| Monorepo | `package.json`, `pnpm-workspace.yaml` | `packages/`, `apps/` | Inter-package deps |
|
|
421
|
+
| Microservices | `docker-compose.yml` | Service directories | Service boundaries |
|
|
422
|
+
| CLI Tool | `bin/` scripts | `commands/` | Command structure |
|