amazingteam 3.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 (164) hide show
  1. package/.ai-team/agents/architect.md +144 -0
  2. package/.ai-team/agents/ci-analyst.md +188 -0
  3. package/.ai-team/agents/developer.md +176 -0
  4. package/.ai-team/agents/planner.md +355 -0
  5. package/.ai-team/agents/qa.md +189 -0
  6. package/.ai-team/agents/reviewer.md +211 -0
  7. package/.ai-team/agents/triage.md +146 -0
  8. package/.ai-team/commands/ci-analyze.md +116 -0
  9. package/.ai-team/commands/design.md +100 -0
  10. package/.ai-team/commands/implement.md +108 -0
  11. package/.ai-team/commands/release-check.md +142 -0
  12. package/.ai-team/commands/review.md +142 -0
  13. package/.ai-team/commands/test.md +115 -0
  14. package/.ai-team/commands/triage.md +138 -0
  15. package/.ai-team/memory/architect/architecture_notes.md +67 -0
  16. package/.ai-team/memory/architect/design_rationale.md +113 -0
  17. package/.ai-team/memory/architect/module_map.md +84 -0
  18. package/.ai-team/memory/ci-analyst/failure_patterns.md +102 -0
  19. package/.ai-team/memory/ci-analyst/runbook_references.md +87 -0
  20. package/.ai-team/memory/developer/bug_investigation.md +102 -0
  21. package/.ai-team/memory/developer/build_issues.md +115 -0
  22. package/.ai-team/memory/developer/implementation_notes.md +83 -0
  23. package/.ai-team/memory/failures/failure_library.md +103 -0
  24. package/.ai-team/memory/planner/decomposition_notes.md +82 -0
  25. package/.ai-team/memory/planner/flow_rules.md +86 -0
  26. package/.ai-team/memory/planner/github_issue_patterns.md +229 -0
  27. package/.ai-team/memory/qa/regression_cases.md +101 -0
  28. package/.ai-team/memory/qa/test_strategy.md +138 -0
  29. package/.ai-team/memory/qa/validation_notes.md +110 -0
  30. package/.ai-team/memory/reviewer/quality_rules.md +105 -0
  31. package/.ai-team/memory/reviewer/recurring_risks.md +109 -0
  32. package/.ai-team/memory/reviewer/review_notes.md +124 -0
  33. package/.ai-team/memory/triage/classification_heuristics.md +82 -0
  34. package/.ai-team/memory/triage/debug_notes.md +87 -0
  35. package/.ai-team/opencode.template.jsonc +216 -0
  36. package/.ai-team/skills/bugfix-playbook/skill.md +174 -0
  37. package/.ai-team/skills/ci-failure-analysis/skill.md +176 -0
  38. package/.ai-team/skills/issue-triage/skill.md +163 -0
  39. package/.ai-team/skills/regression-checklist/skill.md +176 -0
  40. package/.ai-team/skills/release-readiness-check/skill.md +216 -0
  41. package/.ai-team/skills/repo-architecture-reader/skill.md +139 -0
  42. package/.ai-team/skills/safe-refactor-checklist/skill.md +215 -0
  43. package/.ai-team/skills/task-breakdown-and-dispatch/skill.md +151 -0
  44. package/.ai-team/skills/test-first-feature-dev/skill.md +205 -0
  45. package/.ai-team/workflows/ci.yml +81 -0
  46. package/.ai-team/workflows/nightly-ai-maintenance.yml +129 -0
  47. package/.ai-team/workflows/opencode.yml +33 -0
  48. package/.ai-team/workflows/pr-check.yml +41 -0
  49. package/.foundation/foundation.lock +38 -0
  50. package/.foundation/local-overrides.md +97 -0
  51. package/.foundation/upgrade-history.md +38 -0
  52. package/.opencode/agents/architect.md +38 -0
  53. package/.opencode/agents/ci-analyst.md +38 -0
  54. package/.opencode/agents/developer.md +43 -0
  55. package/.opencode/agents/planner.md +47 -0
  56. package/.opencode/agents/qa.md +34 -0
  57. package/.opencode/agents/reviewer.md +38 -0
  58. package/.opencode/agents/triage.md +37 -0
  59. package/.opencode/commands/auto.md +264 -0
  60. package/.opencode/commands/breakdown-issue.md +94 -0
  61. package/.opencode/commands/ci-analyze.md +15 -0
  62. package/.opencode/commands/close-parent-task.md +122 -0
  63. package/.opencode/commands/design.md +15 -0
  64. package/.opencode/commands/dispatch-next.md +102 -0
  65. package/.opencode/commands/implement.md +16 -0
  66. package/.opencode/commands/release-check.md +16 -0
  67. package/.opencode/commands/resume.md +88 -0
  68. package/.opencode/commands/review.md +15 -0
  69. package/.opencode/commands/show-blockers.md +97 -0
  70. package/.opencode/commands/summarize-parent.md +121 -0
  71. package/.opencode/commands/test.md +15 -0
  72. package/.opencode/commands/triage.md +109 -0
  73. package/.opencode/skills/bugfix-playbook/SKILL.md +81 -0
  74. package/.opencode/skills/ci-failure-analysis/SKILL.md +94 -0
  75. package/.opencode/skills/issue-triage/SKILL.md +80 -0
  76. package/.opencode/skills/regression-checklist/SKILL.md +81 -0
  77. package/.opencode/skills/release-readiness-check/SKILL.md +81 -0
  78. package/.opencode/skills/repo-architecture-reader/SKILL.md +65 -0
  79. package/.opencode/skills/safe-refactor-checklist/SKILL.md +76 -0
  80. package/.opencode/skills/task-breakdown-and-dispatch/SKILL.md +255 -0
  81. package/.opencode/skills/test-first-feature-dev/SKILL.md +78 -0
  82. package/AGENTS.md +879 -0
  83. package/CHANGELOG.md +261 -0
  84. package/LICENSE +21 -0
  85. package/README.md +1215 -0
  86. package/VERSION +1 -0
  87. package/action/__tests__/downloader.test.js +251 -0
  88. package/action/__tests__/merger.test.js +156 -0
  89. package/action/__tests__/path-resolver.test.js +199 -0
  90. package/action/__tests__/validator.test.js +310 -0
  91. package/action/action.yml +61 -0
  92. package/action/index.js +223 -0
  93. package/action/lib/downloader.js +344 -0
  94. package/action/lib/merger.js +170 -0
  95. package/action/lib/path-resolver.js +176 -0
  96. package/action/lib/setup.js +286 -0
  97. package/action/lib/validator.js +324 -0
  98. package/cli/__tests__/cli.test.js +270 -0
  99. package/cli/amazingteam.cjs +225 -0
  100. package/cli/commands/check-update.cjs +159 -0
  101. package/cli/commands/init.cjs +412 -0
  102. package/cli/commands/local.cjs +264 -0
  103. package/cli/commands/migrate.cjs +316 -0
  104. package/cli/commands/status.cjs +241 -0
  105. package/cli/commands/upgrade.cjs +213 -0
  106. package/cli/commands/validate.cjs +259 -0
  107. package/cli/commands/version.cjs +59 -0
  108. package/cli/sync.cjs +237 -0
  109. package/dist/index.js +35 -0
  110. package/docs/architecture/overview.md +138 -0
  111. package/docs/blocker_resolution_design.md +372 -0
  112. package/docs/bootstrap-model.md +356 -0
  113. package/docs/config-reference.md +458 -0
  114. package/docs/how-to-use.md +178 -0
  115. package/docs/migration-to-v3.md +355 -0
  116. package/docs/overlay-guide.md +156 -0
  117. package/docs/patterns/README.md +67 -0
  118. package/docs/quick-start-v3.md +330 -0
  119. package/docs/releases/README.md +64 -0
  120. package/docs/runbooks/ci/README.md +62 -0
  121. package/docs/runbooks/ci/build-debug.md +120 -0
  122. package/docs/runbooks/ci/flaky-tests.md +127 -0
  123. package/docs/runbooks/getting-started.md +81 -0
  124. package/docs/upgrade-policy.md +188 -0
  125. package/docs/versioning.md +199 -0
  126. package/overlays/README.md +30 -0
  127. package/overlays/ai-agent-product/.ai-team/skills/llm-integration/skill.md +99 -0
  128. package/overlays/ai-agent-product/docs/ai-agent-architecture.md +68 -0
  129. package/overlays/ai-agent-product/overlay.yaml +26 -0
  130. package/overlays/cpp-qt-desktop/.ai-team/skills/qt-signals-slots/skill.md +60 -0
  131. package/overlays/cpp-qt-desktop/docs/qt-conventions.md +64 -0
  132. package/overlays/cpp-qt-desktop/overlay.yaml +22 -0
  133. package/overlays/python-backend/.ai-team/skills/python-testing/skill.md +90 -0
  134. package/overlays/python-backend/docs/python-style.md +78 -0
  135. package/overlays/python-backend/overlay.yaml +22 -0
  136. package/overlays/web-fullstack/.ai-team/skills/frontend-testing/skill.md +70 -0
  137. package/overlays/web-fullstack/docs/frontend-conventions.md +68 -0
  138. package/overlays/web-fullstack/overlay.yaml +26 -0
  139. package/package.json +84 -0
  140. package/presets/default.yaml +161 -0
  141. package/presets/go.yaml +43 -0
  142. package/presets/python.yaml +43 -0
  143. package/presets/typescript.yaml +40 -0
  144. package/schemas/config.schema.json +239 -0
  145. package/scripts/diff_foundation_vs_project.sh +134 -0
  146. package/scripts/generate_docs.sh +200 -0
  147. package/scripts/init_project.sh +455 -0
  148. package/scripts/plan_upgrade.sh +268 -0
  149. package/scripts/upgrade_foundation.sh +365 -0
  150. package/scripts/validate-foundation.cjs +278 -0
  151. package/scripts/validate_foundation.sh +192 -0
  152. package/scripts/validate_project_setup.sh +171 -0
  153. package/tasks/README.md +94 -0
  154. package/tasks/_template/analysis.md +76 -0
  155. package/tasks/_template/design.md +121 -0
  156. package/tasks/_template/implementation.md +121 -0
  157. package/tasks/_template/release.md +119 -0
  158. package/tasks/_template/review.md +131 -0
  159. package/tasks/_template/subtasks/task.yaml +24 -0
  160. package/tasks/_template/task.yaml +75 -0
  161. package/tasks/_template/validation.md +128 -0
  162. package/templates/amazingteam.yml +81 -0
  163. package/templates/gitignore +14 -0
  164. package/templates/opencode.jsonc +216 -0
@@ -0,0 +1,81 @@
1
+ # Getting Started
2
+
3
+ ## Prerequisites
4
+
5
+ - Node.js 20+
6
+ - npm or yarn
7
+ - Git
8
+ - GitHub account
9
+
10
+ ## Installation
11
+
12
+ 1. Clone the repository:
13
+ ```bash
14
+ git clone https://github.com/your-org/amazingteam.git
15
+ cd amazingteam
16
+ ```
17
+
18
+ 2. Install dependencies:
19
+ ```bash
20
+ npm install
21
+ ```
22
+
23
+ 3. Set up environment:
24
+ ```bash
25
+ cp .env.example .env
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ ### Creating an Issue
31
+
32
+ 1. Go to Issues → New Issue
33
+ 2. Select a template (Feature, Bug, Tech Task)
34
+ 3. Fill in the required fields
35
+ 4. The AI team will automatically analyze the issue
36
+
37
+ ### Triggering AI Work
38
+
39
+ Comment on an issue:
40
+ ```
41
+ /opencode use architect to analyze this issue
42
+ ```
43
+
44
+ Available commands:
45
+ - `/design` - Analyze and design
46
+ - `/implement` - Implement changes
47
+ - `/test` - Run tests
48
+ - `/review` - Review code
49
+
50
+ ### Workflow
51
+
52
+ 1. Create an issue with the template
53
+ 2. AI Architect analyzes and designs
54
+ 3. AI Developer implements
55
+ 4. AI QA validates
56
+ 5. AI Reviewer reviews
57
+ 6. Human approves and merges
58
+
59
+ ## Development
60
+
61
+ ### Running Tests
62
+
63
+ ```bash
64
+ npm test
65
+ ```
66
+
67
+ ### Linting
68
+
69
+ ```bash
70
+ npm run lint
71
+ ```
72
+
73
+ ### Building
74
+
75
+ ```bash
76
+ npm run build
77
+ ```
78
+
79
+ ## Configuration
80
+
81
+ See `.opencode/opencode.jsonc` for AI configuration.
@@ -0,0 +1,188 @@
1
+ # Upgrade Policy
2
+
3
+ This document defines the upgrade policy for AI Team Foundation.
4
+
5
+ ## Versioning
6
+
7
+ AI Team Foundation follows [Semantic Versioning](https://semver.org/):
8
+
9
+ - **MAJOR** version: Breaking changes requiring migration
10
+ - **MINOR** version: New features, backward compatible
11
+ - **PATCH** version: Bug fixes, backward compatible
12
+
13
+ ## Upgrade Types
14
+
15
+ ### Automatic Upgrades
16
+
17
+ The following changes can be applied automatically:
18
+
19
+ | Change Type | Class | Example |
20
+ |-------------|-------|---------|
21
+ | New agent added | B | Adding `ci-analyst.md` |
22
+ | New skill added | B | Adding `regression-checklist` |
23
+ | New command added | B | Adding `/release-check` |
24
+ | New memory directory | A | Adding `.ai-team/memory/triage/` |
25
+ | New documentation zone | A | Adding `docs/patterns/` |
26
+ | Task template additions | A | Adding `release.md` template |
27
+ | Bug fixes to templates | B | Fixing typos in agent prompts |
28
+
29
+ ### Review-Required Upgrades
30
+
31
+ The following changes require review before applying:
32
+
33
+ | Change Type | Class | Action |
34
+ |-------------|-------|--------|
35
+ | Agent prompt changes | B | Generate diff, review, then apply |
36
+ | Skill procedure changes | B | Generate diff, review, then apply |
37
+ | Command workflow changes | B | Generate diff, review, then apply |
38
+ | Workflow file changes | B | Generate diff, review, then apply |
39
+ | AGENTS.md updates | B | Generate diff, review, then apply |
40
+
41
+ ### Manual-Approval Upgrades
42
+
43
+ The following changes require explicit human approval:
44
+
45
+ | Change Type | Class | Action |
46
+ |-------------|-------|--------|
47
+ | Architecture document changes | C | Manual review and approval |
48
+ | Decision record changes | C | Manual review and approval |
49
+ | Governance policy changes | C | Manual review and approval |
50
+ | Breaking changes | Special | Migration guide required |
51
+
52
+ ## Upgrade Process
53
+
54
+ ### Step 1: Plan
55
+
56
+ ```bash
57
+ ./scripts/plan_upgrade.sh /path/to/project
58
+ ```
59
+
60
+ This generates an upgrade plan showing:
61
+ - Missing files
62
+ - Outdated files
63
+ - Protected files
64
+ - Risk assessment
65
+
66
+ ### Step 2: Review
67
+
68
+ Review the generated upgrade plan at:
69
+ ```
70
+ /path/to/project/.foundation/upgrade-plan.md
71
+ ```
72
+
73
+ Key questions:
74
+ - Are there protected files affected?
75
+ - Are there local customizations that might be overwritten?
76
+ - Is this a breaking change?
77
+
78
+ ### Step 3: Apply
79
+
80
+ ```bash
81
+ # Safe upgrade (skips protected files)
82
+ ./scripts/upgrade_foundation.sh /path/to/project
83
+
84
+ # Force upgrade (use with caution)
85
+ ./scripts/upgrade_foundation.sh --force /path/to/project
86
+
87
+ # Dry run (preview changes)
88
+ ./scripts/upgrade_foundation.sh --dry-run /path/to/project
89
+ ```
90
+
91
+ ### Step 4: Validate
92
+
93
+ ```bash
94
+ ./scripts/validate_project_setup.sh /path/to/project
95
+ ```
96
+
97
+ ### Step 5: Test
98
+
99
+ Run the project's test suite to verify everything works.
100
+
101
+ ### Step 6: Commit
102
+
103
+ ```bash
104
+ git add .
105
+ git commit -m "chore: upgrade ai-team-foundation to v2.0.0"
106
+ ```
107
+
108
+ ## Protected Paths
109
+
110
+ The following paths are protected and will never be automatically modified:
111
+
112
+ - `docs/architecture/` - Project architecture documentation
113
+ - `docs/decisions/` - Architecture decision records (ADRs)
114
+ - Any files listed in `.foundation/local-overrides.md`
115
+
116
+ ## Local Overrides
117
+
118
+ Projects can specify local customizations that should be preserved:
119
+
120
+ ```markdown
121
+ # .foundation/local-overrides.md
122
+
123
+ ## Custom AGENTS.md Additions
124
+ - Added custom build commands section
125
+ - Added project-specific naming conventions
126
+
127
+ ## Custom Workflows
128
+ - Modified ci.yml to add integration tests
129
+ - Added custom deployment workflow
130
+
131
+ ## Custom Skills
132
+ - Added project-specific skill: database-migration
133
+ ```
134
+
135
+ ## Breaking Changes
136
+
137
+ When a new version contains breaking changes:
138
+
139
+ 1. The CHANGELOG.md will have a "Breaking Changes" section
140
+ 2. A migration guide will be provided
141
+ 3. The upgrade script will require `--force` flag
142
+ 4. Manual review is mandatory
143
+
144
+ ### Breaking Change Examples
145
+
146
+ - Agent interface changes (new required fields)
147
+ - Command signature changes
148
+ - Memory structure reorganization
149
+ - Required configuration changes
150
+
151
+ ## Rollback
152
+
153
+ If an upgrade causes issues:
154
+
155
+ 1. Restore from backup:
156
+ ```bash
157
+ cp -r .foundation/backup-TIMESTAMP/.ai-team ./
158
+ ```
159
+
160
+ 2. Revert the commit:
161
+ ```bash
162
+ git revert HEAD
163
+ ```
164
+
165
+ 3. Report the issue for investigation
166
+
167
+ ## Version Support
168
+
169
+ | Version | Status | Support Ends |
170
+ |---------|--------|--------------|
171
+ | 2.x | Current | - |
172
+ | 1.x | Maintenance | 2024-12-31 |
173
+
174
+ ## Upgrade Frequency
175
+
176
+ Recommended upgrade frequency:
177
+
178
+ - **Critical security fixes**: Immediately
179
+ - **Bug fixes**: Within 1 week
180
+ - **Minor features**: Within 1 month
181
+ - **Major versions**: After thorough review
182
+
183
+ ## Questions?
184
+
185
+ For questions about upgrades:
186
+ 1. Check CHANGELOG.md for details
187
+ 2. Review the upgrade plan
188
+ 3. Create an issue with `[UPGRADE]` label
@@ -0,0 +1,199 @@
1
+ # Versioning Policy
2
+
3
+ This document describes how AI Team Foundation handles versioning and upgrades.
4
+
5
+ ## Version Format
6
+
7
+ AI Team Foundation uses [Semantic Versioning](https://semver.org/) with the format `MAJOR.MINOR.PATCH`:
8
+
9
+ - **MAJOR**: Breaking changes that require manual intervention
10
+ - **MINOR**: New features, backward compatible
11
+ - **PATCH**: Bug fixes, backward compatible
12
+
13
+ ## Version Increment Rules
14
+
15
+ ### Conservative Update Policy
16
+
17
+ **Do NOT rush version increments.** Accumulate changes before releasing.
18
+
19
+ | Change Type | Increment | Min Changes Required | Wait Period |
20
+ |-------------|-----------|---------------------|-------------|
21
+ | Bug fix | PATCH | 3+ fixes OR 1 critical fix | As needed |
22
+ | New feature | MINOR | 2+ features OR 1 major feature | Monthly |
23
+ | Breaking change | MAJOR | Only when unavoidable | Yearly |
24
+
25
+ ### Release Cadence
26
+
27
+ | Type | Frequency | Example |
28
+ |------|-----------|---------|
29
+ | **PATCH** | As needed (bug fixes) | v2.2.0 → v2.2.1 |
30
+ | **MINOR** | Monthly or when significant features accumulated | v2.2.0 → v2.3.0 |
31
+ | **MAJOR** | Yearly or when breaking changes required | v2.x.x → v3.0.0 |
32
+
33
+ ### Stability Rules
34
+
35
+ 1. **Batch Changes**: Group related changes into a single release
36
+ - Good: Multiple bug fixes → one PATCH release
37
+ - Good: Multiple new features → one MINOR release
38
+ - Bad: Every small change → new version
39
+
40
+ 2. **Stability Period**: After a MAJOR release, wait at least 2 weeks before the next MINOR release.
41
+
42
+ 3. **No Premature Releases**: Don't release for every small change.
43
+
44
+ ### Exceptions
45
+
46
+ The version policy may be overridden in these cases:
47
+
48
+ 1. **Security Fix**: Immediate PATCH release regardless of threshold
49
+ 2. **Critical Bug**: Immediate PATCH release for breaking issues
50
+ 3. **User Request**: If users explicitly request a release
51
+
52
+ ## Version Files
53
+
54
+ ### VERSION
55
+
56
+ Single-line file containing the current version:
57
+
58
+ ```
59
+ 2.0.0
60
+ ```
61
+
62
+ ### CHANGELOG.md
63
+
64
+ Documents all changes in each release:
65
+
66
+ - New features
67
+ - Changed files
68
+ - Deprecated elements
69
+ - Breaking changes
70
+ - Migration notes
71
+
72
+ ## Upgrade Paths
73
+
74
+ ### Patch Upgrades (2.0.0 → 2.0.1)
75
+
76
+ **Risk Level**: Low
77
+
78
+ - Bug fixes only
79
+ - No structural changes
80
+ - Safe to apply automatically
81
+
82
+ **Action**: Run `upgrade_foundation.sh --auto`
83
+
84
+ ### Minor Upgrades (2.0.0 → 2.1.0)
85
+
86
+ **Risk Level**: Medium
87
+
88
+ - New features added
89
+ - New files may be created
90
+ - Existing files may receive additions
91
+
92
+ **Action**:
93
+ 1. Run `plan_upgrade.sh` to see changes
94
+ 2. Review the upgrade plan
95
+ 3. Run `upgrade_foundation.sh`
96
+
97
+ ### Major Upgrades (2.0.0 → 3.0.0)
98
+
99
+ **Risk Level**: High
100
+
101
+ - Breaking changes possible
102
+ - Manual migration may be required
103
+ - Structure changes possible
104
+
105
+ **Action**:
106
+ 1. Read CHANGELOG.md migration notes
107
+ 2. Run `diff_foundation_vs_project.sh`
108
+ 3. Manually resolve conflicts
109
+ 4. Run `upgrade_foundation.sh --careful`
110
+ 5. Test thoroughly
111
+
112
+ ## Foundation Lock File
113
+
114
+ Each downstream project has `.foundation/foundation.lock`:
115
+
116
+ ```yaml
117
+ foundation_repo: ai-team-foundation
118
+ foundation_version: 2.0.0
119
+ overlay: python-backend
120
+ initialized_at: 2026-03-14
121
+ last_upgrade_at: 2026-03-20
122
+ upgrade_policy: controlled
123
+ ```
124
+
125
+ This file tracks:
126
+ - Which foundation version the project was initialized from
127
+ - Which overlay was applied
128
+ - When upgrades were last applied
129
+
130
+ ## Upgrade History
131
+
132
+ Each downstream project has `.foundation/upgrade-history.md`:
133
+
134
+ ```markdown
135
+ ## Upgrade 2026-03-20
136
+
137
+ - **From**: 2.0.0
138
+ - **To**: 2.1.0
139
+ - **Type**: Minor
140
+ - **Files Added**: 3
141
+ - **Files Modified**: 2
142
+ - **Files Skipped**: 1 (protected)
143
+ - **Conflicts**: 0
144
+ - **Manual Decisions**: None
145
+ ```
146
+
147
+ ## Checking for Updates
148
+
149
+ ```bash
150
+ # Check current version
151
+ cat VERSION
152
+
153
+ # Check your project's foundation version
154
+ cat .foundation/foundation.lock
155
+
156
+ # Compare versions
157
+ ./scripts/plan_upgrade.sh
158
+ ```
159
+
160
+ ## Breaking Change Policy
161
+
162
+ When a breaking change is introduced:
163
+
164
+ 1. **Announce in CHANGELOG.md** with migration instructions
165
+ 2. **Provide migration script** if applicable
166
+ 3. **Support previous version** for one major release cycle
167
+ 4. **Document in upgrade notes** specific actions required
168
+
169
+ ## Overlay Compatibility
170
+
171
+ Each overlay specifies compatible foundation versions:
172
+
173
+ ```yaml
174
+ # overlays/python-backend/overlay.yaml
175
+ compatible_foundation_versions:
176
+ - "2.0.0"
177
+ - "2.1.0"
178
+ ```
179
+
180
+ Before applying an upgrade, validate overlay compatibility:
181
+
182
+ ```bash
183
+ ./scripts/validate_project_setup.sh
184
+ ```
185
+
186
+ ## Version Lifecycle
187
+
188
+ | Version Stage | Description | Support Level |
189
+ |--------------|-------------|---------------|
190
+ | Current | Latest release | Full support |
191
+ | Previous | Prior major | Security fixes |
192
+ | Deprecated | EOL versions | No support |
193
+
194
+ ## Deprecation Policy
195
+
196
+ 1. **Announce deprecation** 3 months in advance
197
+ 2. **Document migration path**
198
+ 3. **Provide deprecation warnings** in upgrade scripts
199
+ 4. **Remove in next major version**
@@ -0,0 +1,30 @@
1
+ # Overlays
2
+
3
+ This directory contains technology-specific overlays for AI Team Foundation.
4
+
5
+ ## What is an Overlay?
6
+
7
+ An overlay customizes the base foundation for a specific technology stack or use case. When initializing a new project, you can select an overlay to apply technology-specific configurations.
8
+
9
+ ## Available Overlays
10
+
11
+ | Directory | Description |
12
+ |-----------|-------------|
13
+ | `cpp-qt-desktop/` | C++ Qt desktop application |
14
+ | `python-backend/` | Python backend service |
15
+ | `web-fullstack/` | Full-stack web application |
16
+ | `ai-agent-product/` | AI agent product |
17
+
18
+ ## Usage
19
+
20
+ ```bash
21
+ # List available overlays
22
+ ls -la
23
+
24
+ # Use an overlay during initialization
25
+ ../scripts/init_project.sh -o python-backend my-project
26
+ ```
27
+
28
+ ## Creating an Overlay
29
+
30
+ See [docs/overlay-guide.md](../docs/overlay-guide.md) for details on creating new overlays.
@@ -0,0 +1,99 @@
1
+ # LLM Integration Skill
2
+
3
+ ## Purpose
4
+
5
+ Guide for integrating Large Language Models into applications.
6
+
7
+ ## Framework Choice
8
+
9
+ - **LangChain**: Full-featured LLM framework
10
+ - **LlamaIndex**: RAG-focused
11
+ - **Direct API**: OpenAI/Anthropic SDKs
12
+
13
+ ## Basic Integration
14
+
15
+ ```python
16
+ from langchain_openai import ChatOpenAI
17
+ from langchain.schema import HumanMessage, SystemMessage
18
+
19
+ llm = ChatOpenAI(model="gpt-4", temperature=0.7)
20
+
21
+ response = llm.invoke([
22
+ SystemMessage(content="You are a helpful assistant."),
23
+ HumanMessage(content="Hello!")
24
+ ])
25
+ ```
26
+
27
+ ## Prompt Engineering
28
+
29
+ ### System Prompts
30
+
31
+ ```python
32
+ SYSTEM_PROMPT = """You are an expert code reviewer.
33
+ Analyze code for:
34
+ - Security vulnerabilities
35
+ - Performance issues
36
+ - Best practice violations
37
+
38
+ Respond in JSON format."""
39
+ ```
40
+
41
+ ### Few-Shot Examples
42
+
43
+ ```python
44
+ examples = [
45
+ {"input": "def add(a, b): return a + b",
46
+ "output": "Valid: Simple addition function"},
47
+ {"input": "eval(user_input)",
48
+ "output": "Critical: Code injection risk"},
49
+ ]
50
+ ```
51
+
52
+ ## RAG Patterns
53
+
54
+ ### Vector Store Integration
55
+
56
+ ```python
57
+ from langchain.vectorstores import Chroma
58
+ from langchain.embeddings import OpenAIEmbeddings
59
+
60
+ embeddings = OpenAIEmbeddings()
61
+ vectorstore = Chroma.from_documents(documents, embeddings)
62
+
63
+ results = vectorstore.similarity_search(query, k=4)
64
+ ```
65
+
66
+ ### Retrieval Chain
67
+
68
+ ```python
69
+ from langchain.chains import RetrievalQA
70
+
71
+ qa_chain = RetrievalQA.from_chain_type(
72
+ llm=llm,
73
+ retriever=vectorstore.as_retriever(),
74
+ return_source_documents=True
75
+ )
76
+ ```
77
+
78
+ ## Cost Optimization
79
+
80
+ 1. Use smaller models for simple tasks
81
+ 2. Implement caching for repeated queries
82
+ 3. Batch requests when possible
83
+ 4. Monitor token usage
84
+
85
+ ## Error Handling
86
+
87
+ ```python
88
+ from openai import RateLimitError, APIError
89
+
90
+ try:
91
+ response = llm.invoke(messages)
92
+ except RateLimitError:
93
+ # Implement backoff retry
94
+ time.sleep(60)
95
+ response = llm.invoke(messages)
96
+ except APIError as e:
97
+ logger.error(f"API Error: {e}")
98
+ raise
99
+ ```
@@ -0,0 +1,68 @@
1
+ # AI Agent Architecture
2
+
3
+ ## Overview
4
+
5
+ This document describes the architecture for AI agent products.
6
+
7
+ ## Core Components
8
+
9
+ ```
10
+ ┌─────────────────────────────────────────────┐
11
+ │ API Layer │
12
+ │ (FastAPI / Next.js) │
13
+ └─────────────────┬───────────────────────────┘
14
+
15
+ ┌─────────────────▼───────────────────────────┐
16
+ │ Agent Layer │
17
+ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
18
+ │ │ Agent 1 │ │ Agent 2 │ │ Agent 3 │ │
19
+ │ └────┬────┘ └────┬────┘ └────┬────┘ │
20
+ └───────┼──────────┼──────────┼──────────────┘
21
+ │ │ │
22
+ ┌───────▼──────────▼──────────▼──────────────┐
23
+ │ LLM Provider │
24
+ │ (OpenAI / Anthropic) │
25
+ └─────────────────────────────────────────────┘
26
+ ```
27
+
28
+ ## Agent Types
29
+
30
+ | Agent | Purpose | Model |
31
+ |-------|---------|-------|
32
+ | Orchestrator | Route requests | GPT-4 |
33
+ | Researcher | Gather information | GPT-4 |
34
+ | Coder | Write/modify code | GPT-4 |
35
+ | Reviewer | Quality checks | GPT-3.5 |
36
+
37
+ ## Memory Architecture
38
+
39
+ ### Short-term Memory
40
+ - Conversation context
41
+ - Current task state
42
+ - Working variables
43
+
44
+ ### Long-term Memory
45
+ - Vector database (Chroma/Pinecone)
46
+ - User preferences
47
+ - Historical decisions
48
+
49
+ ## RAG Pipeline
50
+
51
+ ```python
52
+ # Retrieval-Augmented Generation flow
53
+ query -> embedding -> vector_search -> context
54
+ context + query -> LLM -> response
55
+ ```
56
+
57
+ ## Deployment
58
+
59
+ - Container: Docker
60
+ - Orchestration: Kubernetes
61
+ - Monitoring: LangSmith / custom
62
+
63
+ ## Security Considerations
64
+
65
+ 1. Never log API keys or user data
66
+ 2. Sanitize inputs before embedding
67
+ 3. Rate limit API endpoints
68
+ 4. Audit agent actions
@@ -0,0 +1,26 @@
1
+ name: ai-agent-product
2
+ description: AI agent product configuration
3
+ version: 1.0.0
4
+ compatible_foundation_versions:
5
+ - "2.0.0"
6
+
7
+ overrides:
8
+ - .ai-team/agents/developer.md
9
+ - .ai-team/agents/architect.md
10
+ - .github/workflows/ci.yml
11
+
12
+ additions:
13
+ - .ai-team/skills/llm-integration/
14
+ - .ai-team/skills/prompt-engineering/
15
+ - .ai-team/skills/rag-patterns/
16
+ - docs/ai-agent-architecture.md
17
+
18
+ language: python
19
+ framework: langchain
20
+ package_manager: poetry
21
+
22
+ environment:
23
+ python_version: "3.11"
24
+ llm_framework: langchain
25
+ vector_db: chromadb
26
+ embedding_model: openai