sdg-agents 1.0.5
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/LICENSE +15 -0
- package/README.md +161 -0
- package/package.json +88 -0
- package/src/assets/dev-guides/agent-deep-flow.md +139 -0
- package/src/assets/dev-guides/prompt-tracks/00-lite-mode/01-project-scope-and-mvp.md +45 -0
- package/src/assets/dev-guides/prompt-tracks/00-lite-mode/02-stack-and-data-model.md +56 -0
- package/src/assets/dev-guides/prompt-tracks/00-lite-mode/03-external-integrations.md +44 -0
- package/src/assets/dev-guides/prompt-tracks/00-lite-mode/04-launch-checklist.md +26 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/01-project-vision.md +77 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/02-problem-definition.md +63 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/03-success-metrics.md +48 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/05-engineering-culture-and-silos.md +41 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/06-foundation-approval.md +57 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/01-setup/01-tech-stack.md +62 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/01-setup/02-local-environment.md +50 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/01-setup/03-version-control-and-tracking.md +65 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/01-setup/04-hello-world-validation.md +37 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/01-setup/05-setup-approval.md +61 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/01-folder-structure.md +49 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/02-design-patterns.md +59 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/03-apis-and-communication.md +55 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/04-security-and-access.md +63 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/05-security-audit.md +64 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/06-design-system-ux.md +72 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/07-ai-strategy.md +72 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/08-observability.md +65 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/09-technical-documentation.md +64 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/10-infrastructure-and-costs.md +40 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/11-data-privacy-compliance.md +41 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/12-performance-and-scale.md +46 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/13-disaster-recovery.md +39 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/14-architecture-approval.md +81 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/03-delivery/01-ci-cd-pipeline.md +49 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/03-delivery/02-quality-standards.md +46 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/03-delivery/03-delivery-approval.md +58 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/00-feature-template.md +30 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/01-context-and-scope.md +46 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/02-business-rules.md +39 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/03-architecture-and-design.md +50 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/04-testing-strategy.md +48 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/05-implementation-plan.md +45 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/06-feature-approval.md +46 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/05-evolution/01-rfcs-and-changes.md +63 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/05-evolution/02-incident-postmortems.md +64 -0
- package/src/assets/dev-guides/prompt-tracks/01-new-evolution/05-evolution/03-adr-template.md +66 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/00-foundation/01-legacy-vision.md +73 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/00-foundation/02-foundation-approval.md +53 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/01-analysis/01-tech-debt-inventory.md +55 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/01-analysis/02-security-audit.md +63 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/01-analysis/03-regression-baseline.md +49 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/01-analysis/04-analysis-approval.md +65 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/02-strategy/01-modernization-approach.md +60 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/02-strategy/02-versioning-and-coexistence.md +57 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/02-strategy/03-new-demands-triage.md +41 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/02-strategy/04-strategy-approval.md +56 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/03-refactor/01-cleanup-backlog.md +45 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/03-refactor/02-refactor-approval.md +53 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/04-migration/01-migration-roadmap.md +47 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/04-migration/02-data-sync-strategy.md +56 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/04-migration/03-migration-approval.md +55 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/05-sunset/01-decommission-plan.md +47 -0
- package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/05-sunset/02-sunset-approval.md +60 -0
- package/src/assets/dev-guides/prompt-tracks/README.md +144 -0
- package/src/assets/dev-guides/software-development-lifecycle-sdlc.md +147 -0
- package/src/assets/dev-guides/spec-driven-dev-guide.md +81 -0
- package/src/assets/dev-guides/ui-prompt-guide.md +181 -0
- package/src/assets/img/sdg-agents-icon-dark.svg +55 -0
- package/src/assets/img/sdg-agents-icon-light.svg +55 -0
- package/src/assets/img/sdg-agents-menu-v1.png +0 -0
- package/src/assets/img/sdg-icon.svg +110 -0
- package/src/assets/instructions/commands/sdg-docs.md +69 -0
- package/src/assets/instructions/commands/sdg-feat.md +45 -0
- package/src/assets/instructions/commands/sdg-fix.md +41 -0
- package/src/assets/instructions/commands/sdg-land.md +128 -0
- package/src/assets/instructions/competencies/backend.md +353 -0
- package/src/assets/instructions/competencies/frontend.md +439 -0
- package/src/assets/instructions/core/agent-roles.md +104 -0
- package/src/assets/instructions/core/api-design.md +65 -0
- package/src/assets/instructions/core/ci-cd.md +144 -0
- package/src/assets/instructions/core/cloud.md +63 -0
- package/src/assets/instructions/core/code-style.md +144 -0
- package/src/assets/instructions/core/containers.md +115 -0
- package/src/assets/instructions/core/data-access.md +119 -0
- package/src/assets/instructions/core/engineering-standards.md +502 -0
- package/src/assets/instructions/core/naming.md +136 -0
- package/src/assets/instructions/core/observability.md +73 -0
- package/src/assets/instructions/core/security-pipeline.md +209 -0
- package/src/assets/instructions/core/security.md +45 -0
- package/src/assets/instructions/core/sql-style.md +138 -0
- package/src/assets/instructions/core/staff-dna.md +72 -0
- package/src/assets/instructions/core/testing-principles.md +212 -0
- package/src/assets/instructions/core/ui/architecture.md +171 -0
- package/src/assets/instructions/core/ui/design-thinking.md +319 -0
- package/src/assets/instructions/core/ui/presets.md +200 -0
- package/src/assets/instructions/core/ui/standards.md +144 -0
- package/src/assets/instructions/core/writing-soul.md +82 -0
- package/src/assets/instructions/flavors/legacy/principles.md +64 -0
- package/src/assets/instructions/flavors/lite/principles.md +39 -0
- package/src/assets/instructions/flavors/mvc/principles.md +124 -0
- package/src/assets/instructions/flavors/vertical-slice/principles.md +178 -0
- package/src/assets/instructions/idioms/csharp/patterns.md +367 -0
- package/src/assets/instructions/idioms/flutter/patterns.md +97 -0
- package/src/assets/instructions/idioms/go/patterns.md +193 -0
- package/src/assets/instructions/idioms/java/patterns.md +233 -0
- package/src/assets/instructions/idioms/javascript/patterns.md +223 -0
- package/src/assets/instructions/idioms/kotlin/patterns.md +94 -0
- package/src/assets/instructions/idioms/python/patterns.md +185 -0
- package/src/assets/instructions/idioms/rust/patterns.md +189 -0
- package/src/assets/instructions/idioms/scripts/patterns.md +81 -0
- package/src/assets/instructions/idioms/sql/patterns.md +109 -0
- package/src/assets/instructions/idioms/swift/patterns.md +97 -0
- package/src/assets/instructions/idioms/typescript/patterns.md +304 -0
- package/src/assets/instructions/idioms/vbnet/patterns.md +96 -0
- package/src/assets/instructions/idioms/vbnet-legacy/patterns.md +104 -0
- package/src/assets/instructions/templates/workflow.md +244 -0
- package/src/assets/instructions/workflows/governance.md +162 -0
- package/src/engine/bin/add-idiom.mjs +186 -0
- package/src/engine/bin/index.mjs +226 -0
- package/src/engine/config/stack-display.mjs +75 -0
- package/src/engine/config/stack-versions.mjs +76 -0
- package/src/engine/lib/cli-parser.mjs +80 -0
- package/src/engine/lib/display-utils.mjs +20 -0
- package/src/engine/lib/fs-utils.mjs +99 -0
- package/src/engine/lib/instruction-assembler.mjs +487 -0
- package/src/engine/lib/manifest-utils.mjs +128 -0
- package/src/engine/lib/prompt-utils.mjs +137 -0
- package/src/engine/lib/result-utils.mjs +14 -0
- package/src/engine/lib/ruleset-injector.mjs +183 -0
- package/src/engine/lib/ui-utils.mjs +216 -0
- package/src/engine/lib/wizard.mjs +472 -0
package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/02-problem-definition.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# 02 - Problem Definition
|
|
2
|
+
|
|
3
|
+
## The Current Problem
|
|
4
|
+
|
|
5
|
+
- What is broken or inefficient today?
|
|
6
|
+
- What is the primary pain point for the user or the business?
|
|
7
|
+
|
|
8
|
+
## Risks and Compliance
|
|
9
|
+
|
|
10
|
+
- Are there sensitive data (LGPD/GDPR)?
|
|
11
|
+
- What are the security risks (leakage, unauthorized access)?
|
|
12
|
+
- Are there any legal or industry compliance requirements?
|
|
13
|
+
|
|
14
|
+
## Why solve it now?
|
|
15
|
+
|
|
16
|
+
- What is the cost of not solving this problem?
|
|
17
|
+
- What opportunities are we missing?
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Learn by Examples
|
|
22
|
+
|
|
23
|
+
### ❌ Bad Example
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
# 02 - Problem Definition
|
|
27
|
+
|
|
28
|
+
## The Current Problem
|
|
29
|
+
|
|
30
|
+
The system is slow and users are complaining about constant crashes.
|
|
31
|
+
|
|
32
|
+
## Risks and Compliance
|
|
33
|
+
|
|
34
|
+
We haven't identified any risks yet.
|
|
35
|
+
|
|
36
|
+
## Why solve it now?
|
|
37
|
+
|
|
38
|
+
So that users don't get angry.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> **Rationale**: Ignores security and compliance risks, treating them as "non-existent" due to lack of analysis.
|
|
42
|
+
|
|
43
|
+
### ✅ Good Example
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
# 02 - Problem Definition
|
|
47
|
+
|
|
48
|
+
## The Current Problem
|
|
49
|
+
|
|
50
|
+
The cash closing process takes 40 minutes daily in 80% of stores, causing frustration and financial errors.
|
|
51
|
+
|
|
52
|
+
## Risks and Compliance
|
|
53
|
+
|
|
54
|
+
- **Data**: Tax ID (CPF) and purchase data of 1M customers (LGPD).
|
|
55
|
+
- **Risk**: Payment gateway API keys exposed in the code.
|
|
56
|
+
- **Compliance**: PCI-DSS audit required for the new flow.
|
|
57
|
+
|
|
58
|
+
## Why solve it now?
|
|
59
|
+
|
|
60
|
+
The annual operational cost is $2.5M. Additionally, an LGPD fine for a data leak could exceed $50M.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
> **Rationale**: Defines clear security risks, legally protected data, and financial impacts of compliance.
|
package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/03-success-metrics.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# 03 - Success Metrics
|
|
2
|
+
|
|
3
|
+
## KPIs (Indicators)
|
|
4
|
+
|
|
5
|
+
- Which metric will be moved (e.g., response time, conversion rate)?
|
|
6
|
+
- What is the current baseline and what is the target?
|
|
7
|
+
|
|
8
|
+
## Success Checklist
|
|
9
|
+
|
|
10
|
+
- [ ] Feature X running in production.
|
|
11
|
+
- [ ] Automated tests with 80%+ coverage.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Learn by Examples
|
|
16
|
+
|
|
17
|
+
### ❌ Bad Example
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
# 03 - Success Metrics
|
|
21
|
+
|
|
22
|
+
## KPIs
|
|
23
|
+
|
|
24
|
+
The system must be very fast and easy to use.
|
|
25
|
+
|
|
26
|
+
## Success Checklist
|
|
27
|
+
|
|
28
|
+
- [ ] Everything ready.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Rationale**: How do you test "easy"? Without numbers, success is a subjective opinion.
|
|
32
|
+
|
|
33
|
+
### ✅ Good Example
|
|
34
|
+
|
|
35
|
+
```markdown
|
|
36
|
+
# 03 - Success Metrics
|
|
37
|
+
|
|
38
|
+
## KPIs
|
|
39
|
+
|
|
40
|
+
Increase the checkout completion rate from 65% to 90% in the first 3 months after launch.
|
|
41
|
+
|
|
42
|
+
## Success Checklist
|
|
43
|
+
|
|
44
|
+
- [x] Response < 500ms P95 across all APIs.
|
|
45
|
+
- [x] 100% of business flows covered by integration tests.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
> **Rationale**: Provides a target number (90%), a baseline value (65%), a timeframe (3 months), and clear technical criteria.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# 05 - Engineering Culture & Code Hostage (Anti-Silos)
|
|
2
|
+
|
|
3
|
+
Knowledge silos destroy the productivity and scalability of a technical team. "Hero Culture" _(Single Point of Failure / Bus Factor = 1)_ — where only one developer knows how to handle the payment system or the deployment — is an unacceptable operational risk at the Staff Engineering level.
|
|
4
|
+
|
|
5
|
+
## Code Ownership Principles
|
|
6
|
+
|
|
7
|
+
- The code belongs to the organization, not to the person who wrote it. No one is the absolute "owner" of a service.
|
|
8
|
+
- The code must be written in such a way that a newly hired Mid-level Developer can understand and maintain it without having to call the original author in the middle of the night.
|
|
9
|
+
|
|
10
|
+
## Practical Anti-Code-Hostage Measures
|
|
11
|
+
|
|
12
|
+
- **Mandatory Code Review:** No one pushes code directly to the `Main` branch (exception for regulated _hotfixes_). Mandatory `Approve` from at least 1 developer who was NOT the author of the task.
|
|
13
|
+
- **Domain Rotation (Pairing):** If the Squad is going to do a major refactoring of module X, the Senior Dev who masters the subject MUST pair (Pair Programming) with another developer, focusing on knowledge dilution.
|
|
14
|
+
- **Systemic Permissions:** Master access to the Production Database or the AWS Deployment key is never in the hands of one and only one person. Systemic "Hostage-taking" is not allowed. (Use Vaults or IAM Roles).
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Learn by Examples
|
|
19
|
+
|
|
20
|
+
### ❌ Bad Example
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
# Culture
|
|
24
|
+
|
|
25
|
+
- Pedro handles the Sales table because he knows it. We don't even touch it.
|
|
26
|
+
- If the database freezes, call him on his cell in the middle of the night.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
> **Rationale**: Chronic Hero Culture. The project stops running during Pedro's vacation or becomes a hostage if he leaves the company. Furthermore, Pedro himself becomes overwhelmed (technical burnout).
|
|
30
|
+
|
|
31
|
+
### ✅ Good Example
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
# Technical Culture and Continuity
|
|
35
|
+
|
|
36
|
+
- Every new API related to `Billing` must have mandatory pairing of 1 Senior Dev + 1 Mid-level Dev.
|
|
37
|
+
- **Bus Factor Check:** At the end of each quarter (Quarter), the Tech Lead ensures that at least 3 devs from the Chapter are comfortable performing a Manual Deploy of the Critical module in Production.
|
|
38
|
+
- CI/CD automatically blocks _Pull Requests_ of any `.config` file if the reviewer is not from another squad (Cross-review to avoid configuration silos).
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> **Rationale**: We transform the "goodwill" to teach into a Management Metric (Quarterly Bus Factor) and an automatic technical restriction in the CI/CD. No one takes the codebase hostage, and the team sleeps in peace.
|
package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/06-foundation-approval.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# 06 - Foundation Approval
|
|
2
|
+
|
|
3
|
+
## Artifacts Checklist
|
|
4
|
+
|
|
5
|
+
- [ ] 01-project-vision.md (Complete)
|
|
6
|
+
- [ ] 02-problem-definition.md (Complete)
|
|
7
|
+
- [ ] 03-success-metrics.md (Complete)
|
|
8
|
+
- [ ] 05-engineering-culture-and-silos.md (Complete)
|
|
9
|
+
|
|
10
|
+
## Stakeholder Approval
|
|
11
|
+
|
|
12
|
+
- **Project Manager**: [Signature/Date]
|
|
13
|
+
- **Lead Architect**: [Signature/Date]
|
|
14
|
+
|
|
15
|
+
## Definition of Readiness (Ready for Setup)
|
|
16
|
+
|
|
17
|
+
- [ ] Budget approved for the first 3 months.
|
|
18
|
+
- [ ] Core team allocated.
|
|
19
|
+
- [ ] Stakeholders agree on success metrics.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Learn by Examples
|
|
24
|
+
|
|
25
|
+
### ❌ Bad Example
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# 04 - Approval: Foundation
|
|
29
|
+
|
|
30
|
+
## Artifacts Checklist
|
|
31
|
+
|
|
32
|
+
- [x] Filled.
|
|
33
|
+
|
|
34
|
+
## Definition of Readiness
|
|
35
|
+
|
|
36
|
+
- [x] Everything ok.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
> **Rationale**: Checkboxes filled without evidence or names of responsible parties.
|
|
40
|
+
|
|
41
|
+
### ✅ Good Example
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
# 06 - Approval: Foundation
|
|
45
|
+
|
|
46
|
+
## Stakeholder Approval
|
|
47
|
+
|
|
48
|
+
- **Manager**: John Doe (Approved on 2026-05-10)
|
|
49
|
+
- **Architect**: Jane Smith (Approved on 2026-05-12)
|
|
50
|
+
|
|
51
|
+
## Definition of Readiness
|
|
52
|
+
|
|
53
|
+
- [x] AWS budget of $5k/month approved by the board.
|
|
54
|
+
- [x] Project vision reflects the real problem of the stores.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
> **Rationale**: Real names, dates, and confirmation of concrete facts (Budget approval).
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# 01 - Tech Stack
|
|
2
|
+
|
|
3
|
+
## Chosen Technologies
|
|
4
|
+
|
|
5
|
+
- **Language**: [e.g., Go, TS, C#]
|
|
6
|
+
- **Framework**: [e.g., FastAPI, React, Gin]
|
|
7
|
+
- **Database**: [e.g., PostgreSQL, Redis]
|
|
8
|
+
|
|
9
|
+
## Choice Rationale
|
|
10
|
+
|
|
11
|
+
- Why did we choose these technologies over others?
|
|
12
|
+
- What are the pros and cons?
|
|
13
|
+
|
|
14
|
+
## Version Management (LTS) and Dependencies
|
|
15
|
+
|
|
16
|
+
- Are the chosen frameworks and runtimes Long Term Support (LTS) versions?
|
|
17
|
+
- What is the strategy for continuous updates and vulnerability mitigation (e.g., Dependabot, Renovate)?
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Learn by Examples
|
|
22
|
+
|
|
23
|
+
### ❌ Bad Example
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
# 01 - Tech Stack
|
|
27
|
+
|
|
28
|
+
## Chosen Technologies
|
|
29
|
+
|
|
30
|
+
Python and MySQL.
|
|
31
|
+
|
|
32
|
+
## Choice Rationale
|
|
33
|
+
|
|
34
|
+
Because it's what the team knows how to use and it's popular.
|
|
35
|
+
|
|
36
|
+
## Version Management (LTS)
|
|
37
|
+
|
|
38
|
+
We'll use the newest version or whatever works.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> **Rationale**: Popularity does not justify critical architecture decisions. Where is the trade-off?
|
|
42
|
+
|
|
43
|
+
### ✅ Good Example
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
# 01 - Tech Stack
|
|
47
|
+
|
|
48
|
+
## Chosen Technologies
|
|
49
|
+
|
|
50
|
+
Go 1.21, PostgreSQL 15, Redis 7.
|
|
51
|
+
|
|
52
|
+
## Choice Rationale
|
|
53
|
+
|
|
54
|
+
Go was chosen for its concurrency performance (Goroutines) required for processing 5k RPS, and PostgreSQL for ACID consistency in critical financial transactions.
|
|
55
|
+
|
|
56
|
+
## Version Management (LTS)
|
|
57
|
+
|
|
58
|
+
- **Runtimes**: Only even versions of Node.js (e.g., v20) and Go in its supported versions.
|
|
59
|
+
- **Automated Updates**: Dependabot configured via `.github/dependabot.yml` for weekly automatic patch updates.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
> **Rationale**: Justifies the choice based on non-functional requirements (concurrency and consistency).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# 02 - Local Environment
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
|
|
5
|
+
- What does the developer need to have installed (e.g., Docker, Taskfile, Make)?
|
|
6
|
+
- Minimum version of the tools.
|
|
7
|
+
|
|
8
|
+
## How to Run
|
|
9
|
+
|
|
10
|
+
1. [ ] Clone the repo.
|
|
11
|
+
2. [ ] Install dependencies.
|
|
12
|
+
3. [ ] Start the containers.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Learn by Examples
|
|
17
|
+
|
|
18
|
+
### ❌ Bad Example
|
|
19
|
+
|
|
20
|
+
```markdown
|
|
21
|
+
# 02 - Local Environment
|
|
22
|
+
|
|
23
|
+
## Prerequisites
|
|
24
|
+
|
|
25
|
+
Docker and Python.
|
|
26
|
+
|
|
27
|
+
## How to Run
|
|
28
|
+
|
|
29
|
+
Run docker-compose up.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
> **Rationale**: What if Docker Compose fails? Where are the necessary environment variables (.env)?
|
|
33
|
+
|
|
34
|
+
### ✅ Good Example
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
# 02 - Local Environment
|
|
38
|
+
|
|
39
|
+
## Prerequisites
|
|
40
|
+
|
|
41
|
+
Docker 24+, Python 3.11, Make 4.3+.
|
|
42
|
+
|
|
43
|
+
## How to Run
|
|
44
|
+
|
|
45
|
+
1. Copy .env.example to .env.
|
|
46
|
+
2. Run `make setup` to download images and run migrations.
|
|
47
|
+
3. Test access at `localhost:8080/health`.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
> **Rationale**: Provides minimum versions, clear initial configuration steps (.env), and a final verification test.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# 03 - Version Control and Management
|
|
2
|
+
|
|
3
|
+
## Branch Strategy (Versioning)
|
|
4
|
+
|
|
5
|
+
- What standard flow will be adopted (GitHub Flow, GitFlow, Trunk-Based)?
|
|
6
|
+
- What are the naming rules for creating new branches?
|
|
7
|
+
|
|
8
|
+
## Commit Standard
|
|
9
|
+
|
|
10
|
+
- Will the project adopt _Conventional Commits_?
|
|
11
|
+
- Will there be passive protection (**Developer review**) or active protection (Husky/Commitlint before push)?
|
|
12
|
+
|
|
13
|
+
## Traceability and Task Management
|
|
14
|
+
|
|
15
|
+
- What is the official tracking tool (Jira, Linear, Azure DevOps)?
|
|
16
|
+
- How does the PR (Pull Request) link to the business task described in the specification?
|
|
17
|
+
- What is the status transition rule for cards when the code is merged?
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Learn by Examples
|
|
22
|
+
|
|
23
|
+
### ❌ Bad Example
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
# 03 - Version Control and Management
|
|
27
|
+
|
|
28
|
+
## Branch Strategy
|
|
29
|
+
|
|
30
|
+
We'll use basic Git. Create a branch with the functionality and then throw it into master.
|
|
31
|
+
|
|
32
|
+
## Commit Standard
|
|
33
|
+
|
|
34
|
+
Write something understandable, e.g., "uploading login screen fixes" and "wip".
|
|
35
|
+
|
|
36
|
+
## Traceability
|
|
37
|
+
|
|
38
|
+
When the task is finished, notify management on Slack and move the Trello card to Done.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> **Rationale**: Total lack of governance and traceability. In a short time, the repository will have severe integration conflicts, impossibility of generating automatic _Changelogs_, and management will not know which code in production belongs to which specification.
|
|
42
|
+
|
|
43
|
+
### ✅ Good Example
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
# 03 - Version Control and Management
|
|
47
|
+
|
|
48
|
+
## Branch Strategy (Versioning)
|
|
49
|
+
|
|
50
|
+
- **Flow**: GitHub Flow (Simplified Trunk-Based).
|
|
51
|
+
- **Naming**: Mandatory to follow the pattern and the spec ID (e.g., `feat/AUTH-102-implement-oauth`, `fix/AUTH-105-token-timeout`).
|
|
52
|
+
|
|
53
|
+
## Commit Standard
|
|
54
|
+
|
|
55
|
+
- **Standard**: Strict compliance with _Conventional Commits_ (`feat:`, `fix:`, `chore:`, `refactor:`).
|
|
56
|
+
- **Guarantee**: Use of `Husky` + `Commitlint` blocking non-standard commits via _pre-commit_.
|
|
57
|
+
|
|
58
|
+
## Traceability and Task Management
|
|
59
|
+
|
|
60
|
+
- **Tracking**: Linear (Issue Tracker).
|
|
61
|
+
- **Linking**: Every PR must contain the tracking ID in the title (e.g., "[AUTH-102] Implement OAuth via Google").
|
|
62
|
+
- **Workflow**: GitHub integration with Linear moves tickets to `In Review` when the PR is opened and to `Done` upon _Merge_.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
> **Rationale**: Creates a perfect audit trail (_End-to-End_). Every line of code changed is linked to a business decision and PR approval. Furthermore, semantic releases can be published 100% automatically by the CI/CD based on _Conventional Commits_.
|
package/src/assets/dev-guides/prompt-tracks/01-new-evolution/01-setup/04-hello-world-validation.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# 04 - Hello World Validation
|
|
2
|
+
|
|
3
|
+
## What Was Validated?
|
|
4
|
+
|
|
5
|
+
- [ ] The app is running.
|
|
6
|
+
- [ ] The first endpoint has been exposed.
|
|
7
|
+
- [ ] The first test is passing.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Learn by Examples
|
|
12
|
+
|
|
13
|
+
### ❌ Bad Example
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
# 04 - Hello World Validation
|
|
17
|
+
|
|
18
|
+
## What Was Validated?
|
|
19
|
+
|
|
20
|
+
Everything is fine, the app started locally.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
> **Rationale**: How do you prove success? Where is the healthcheck log?
|
|
24
|
+
|
|
25
|
+
### ✅ Good Example
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# 04 - Hello World Validation
|
|
29
|
+
|
|
30
|
+
## What Was Validated?
|
|
31
|
+
|
|
32
|
+
- [x] 200 OK response on the `/health` endpoint.
|
|
33
|
+
- [x] Startup log displays "Server listening on port 8080".
|
|
34
|
+
- [x] The `npm test` command successfully executed the first basic test.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
> **Rationale**: Provides concrete and traceable evidence of successful initialization.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# 05 - Setup Approval
|
|
2
|
+
|
|
3
|
+
## Artifacts Checklist
|
|
4
|
+
|
|
5
|
+
- [ ] 01-tech-stack.md (Complete)
|
|
6
|
+
- [ ] 02-local-environment.md (Complete)
|
|
7
|
+
- [ ] 03-version-control-and-tracking.md (Defined)
|
|
8
|
+
- [ ] 04-hello-world-validation.md (Passed)
|
|
9
|
+
|
|
10
|
+
## Technical Approval
|
|
11
|
+
|
|
12
|
+
- **Lead Developer**: [Signature/Date]
|
|
13
|
+
- **QA Engineer**: [Signature/Date]
|
|
14
|
+
|
|
15
|
+
## Definition of Readiness (Ready for Architecture)
|
|
16
|
+
|
|
17
|
+
- [ ] Local environment running in less than 10 minutes.
|
|
18
|
+
- [ ] Base pipeline is configured (Hello World in Staging).
|
|
19
|
+
- [ ] Team agrees with the Chosen Stack.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Learn by Examples
|
|
24
|
+
|
|
25
|
+
### ❌ Bad Example
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# 05 - Setup Approval
|
|
29
|
+
|
|
30
|
+
## Checklist
|
|
31
|
+
|
|
32
|
+
- [x] Tech Stack done (Python).
|
|
33
|
+
|
|
34
|
+
## Definition of Readiness
|
|
35
|
+
|
|
36
|
+
- [x] The app runs.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
> **Rationale**: How do you prove that the app "runs"? Where is the Hello World log? And the version control strategy?
|
|
40
|
+
|
|
41
|
+
### ✅ Good Example
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
# 05 - Setup Approval
|
|
45
|
+
|
|
46
|
+
## Checklist
|
|
47
|
+
|
|
48
|
+
- [x] 01-tech-stack.md (Approved: Go 1.21 + Redis)
|
|
49
|
+
- [x] 03-version-control-and-tracking.md (Approved: GitHub Flow + Linear)
|
|
50
|
+
- [x] 04-hello-world-validation.md (Passed: Healthcheck 200 OK)
|
|
51
|
+
|
|
52
|
+
## Technical Approval
|
|
53
|
+
|
|
54
|
+
- **Leader**: Robert Snow (2026-05-15)
|
|
55
|
+
|
|
56
|
+
## Definition of Readiness
|
|
57
|
+
|
|
58
|
+
- [x] `make setup` ran without errors on 3 different machines.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
> **Rationale**: Technical details and multi-machine validation (overcoming "it works on my machine").
|
package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/01-folder-structure.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# 01 - Folder Structure
|
|
2
|
+
|
|
3
|
+
## Repository Layout
|
|
4
|
+
|
|
5
|
+
- Why organize it this way?
|
|
6
|
+
- Where does everything go?
|
|
7
|
+
|
|
8
|
+
## Main Folders
|
|
9
|
+
|
|
10
|
+
- `/cmd`: Entrypoints.
|
|
11
|
+
- `/internal`: Private application code.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Learn by Examples
|
|
16
|
+
|
|
17
|
+
### ❌ Bad Example
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
# 01 - Folder Structure
|
|
21
|
+
|
|
22
|
+
## Repository Layout
|
|
23
|
+
|
|
24
|
+
Let's put everything in the root to make it easier to find.
|
|
25
|
+
|
|
26
|
+
## Main Folders
|
|
27
|
+
|
|
28
|
+
- `/src`: All code goes here.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Rationale**: "Everything in the root" fails miserably in projects that scale. A generic `/src` doesn't separate responsibilities.
|
|
32
|
+
|
|
33
|
+
### ✅ Good Example
|
|
34
|
+
|
|
35
|
+
```markdown
|
|
36
|
+
# 01 - Folder Structure
|
|
37
|
+
|
|
38
|
+
## Repository Layout
|
|
39
|
+
|
|
40
|
+
We've adopted the `Standard Go Project Layout` to separate entrypoints from internal logic.
|
|
41
|
+
|
|
42
|
+
## Main Folders
|
|
43
|
+
|
|
44
|
+
- `/cmd`: Application binaries.
|
|
45
|
+
- `/internal/domain`: Entities and business logic.
|
|
46
|
+
- `/internal/infra`: DB implementation and API clients.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
> **Rationale**: Follows industry standards (Go Standard Layout) and explicitly separates domain from infrastructure.
|
package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/02-design-patterns.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# 02 - Architectural Styles and Design Patterns
|
|
2
|
+
|
|
3
|
+
## Architectural Style (Macro)
|
|
4
|
+
|
|
5
|
+
- **Chosen Approach**: [e.g., Modular Monolith, Microservices, Serverless]
|
|
6
|
+
- **Justification**: Why did we choose this approach? If microservices, why not start with a modular monolith?
|
|
7
|
+
|
|
8
|
+
## Code Design Patterns (Micro)
|
|
9
|
+
|
|
10
|
+
- **Software Architecture**: [e.g., Clean Arch, Hexagonal, Vertical Slices]
|
|
11
|
+
- **Domain Modeling**: [e.g., DDD, Rich Domain Models, Result Pattern]
|
|
12
|
+
|
|
13
|
+
## Implementation Patterns
|
|
14
|
+
|
|
15
|
+
- **Flow Control and Errors**: How do we handle errors? (e.g., `Envelope Pattern`, `if err != nil`)
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Learn by Examples
|
|
20
|
+
|
|
21
|
+
### ❌ Bad Example
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
# 02 - Architectural Styles and Design Patterns
|
|
25
|
+
|
|
26
|
+
## Architectural Style (Macro)
|
|
27
|
+
|
|
28
|
+
We will use microservices to scale better in the future.
|
|
29
|
+
|
|
30
|
+
## Chosen Patterns
|
|
31
|
+
|
|
32
|
+
We will use programming best practices.
|
|
33
|
+
|
|
34
|
+
## Implementation Patterns
|
|
35
|
+
|
|
36
|
+
The code will be clean and commented.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
> **Rationale**: Justifying "microservices" based on future scale is speculative (Premature Optimization). "Best practices" and "clean" are vague and subjective.
|
|
40
|
+
|
|
41
|
+
### ✅ Good Example
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
# 02 - Architectural Styles and Design Patterns
|
|
45
|
+
|
|
46
|
+
## Architectural Style (Macro)
|
|
47
|
+
|
|
48
|
+
**Modular Monolith**. We will start bundled to reduce network costs and DevOps complexity, separating contexts via strict internal packages.
|
|
49
|
+
|
|
50
|
+
## Chosen Patterns
|
|
51
|
+
|
|
52
|
+
Hexagonal Architecture with Vertical Slices for modules. Business logic via Result Pattern.
|
|
53
|
+
|
|
54
|
+
## Implementation Patterns
|
|
55
|
+
|
|
56
|
+
Errors will be handled via the Envelope Pattern (Result<T>), avoiding pure exceptions for business flow control.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
> **Rationale**: Explicitly addresses the macro trade-off (Modular Monolith vs Microservices) and defines specific, testable code choices.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# 03 - Integrations, APIs, and Communication
|
|
2
|
+
|
|
3
|
+
## Contracts and Interfaces (Synchronous)
|
|
4
|
+
|
|
5
|
+
- **External APIs**: [e.g., REST for Web, GraphQL for Mobile/Complex UIs]
|
|
6
|
+
- **Internal Communication (Service-to-Service)**: [e.g., gRPC via Protobuf, isolated REST calls]
|
|
7
|
+
|
|
8
|
+
## Entry Gates and Routing
|
|
9
|
+
|
|
10
|
+
- **API Gateways / BFF**: [e.g., AWS API Gateway for Rate Limiting and Central Auth, BFF for aggregating mobile payload]
|
|
11
|
+
|
|
12
|
+
## Asynchronous and Event-Driven
|
|
13
|
+
|
|
14
|
+
- **Message Brokers**: [e.g., RabbitMQ, AWS SQS, Apache Kafka]
|
|
15
|
+
- **Asynchronous Use Cases**: Which flows shouldn't block the user's main request? (e.g., sending emails, processing payments). Detail the _Publishers_ and _Subscribers_.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Learn by Examples
|
|
20
|
+
|
|
21
|
+
### ❌ Bad Example
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
# 03 - Integrations, APIs, and Communication
|
|
25
|
+
|
|
26
|
+
## Contracts and Interfaces (Synchronous)
|
|
27
|
+
|
|
28
|
+
Our API will be REST and services will talk via HTTP.
|
|
29
|
+
|
|
30
|
+
## Asynchronous and Event-Driven
|
|
31
|
+
|
|
32
|
+
We will use RabbitMQ for heavy background tasks.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
> **Rationale**: It doesn't specify why temporal failures in HTTP are acceptable for internal services, nor details the technological reasoning for RabbitMQ. It completely ignores Gateway layer concepts.
|
|
36
|
+
|
|
37
|
+
### ✅ Good Example
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# 03 - Integrations, APIs, and Communication
|
|
41
|
+
|
|
42
|
+
## Contracts and Interfaces (Synchronous)
|
|
43
|
+
|
|
44
|
+
Public exposure via **GraphQL** (using BFF for mobile payload limitation). Internal Service-to-Service communication via **gRPC** ensuring strong typing and low latency.
|
|
45
|
+
|
|
46
|
+
## Entry Gates and Routing
|
|
47
|
+
|
|
48
|
+
All external traffic passes through an **API Gateway** responsible for TLS termination, Rate Limiting, and JWT token validation (Auth offloading).
|
|
49
|
+
|
|
50
|
+
## Asynchronous and Event-Driven
|
|
51
|
+
|
|
52
|
+
The checkout finalization string will emit an "OrderCreated" event via **RabbitMQ**. The Notification service will act as a subscriber to dispatch emails without blocking the user's HTTP response (temporal decoupling).
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
> **Rationale**: Defines objective protocol choices based on client profile (GraphQL vs gRPC), protects the core domain using API Gateways, and applies Event-Driven Architecture (EDA) for secondary background flows.
|