proagents 1.6.17 → 1.6.19

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 (185) hide show
  1. package/.claude/settings.local.json +169 -0
  2. package/.proagents/AGENTS.md +2 -0
  3. package/.proagents/AI_INSTRUCTIONS.md +13 -0
  4. package/.proagents/ANTIGRAVITY.md +2 -0
  5. package/.proagents/BOLT.md +2 -0
  6. package/.proagents/CHATGPT.md +2 -0
  7. package/.proagents/CLAUDE.md +2 -0
  8. package/.proagents/GEMINI.md +2 -0
  9. package/.proagents/GROQ.md +2 -0
  10. package/.proagents/KIRO.md +2 -0
  11. package/.proagents/LOVABLE.md +2 -0
  12. package/.proagents/PROAGENTS.md +2 -0
  13. package/.proagents/REPLIT.md +2 -0
  14. package/.proagents/prompts/00-project-setup.md +878 -0
  15. package/.proagents/prompts/04-planning.md +38 -0
  16. package/.proagents/prompts/12-rnd.md +957 -0
  17. package/.proagents/workflow-modes/entry-modes.md +27 -0
  18. package/.proagents/worklog/_context.template.md +47 -0
  19. package/COMMANDS.md +654 -0
  20. package/README.md +16 -24
  21. package/package.json +2 -7
  22. package/.proagents/ai-models/README.md +0 -141
  23. package/.proagents/ai-models/cost-management.md +0 -362
  24. package/.proagents/ai-models/fallbacks.md +0 -342
  25. package/.proagents/ai-models/model-config.md +0 -318
  26. package/.proagents/ai-models/task-routing.md +0 -503
  27. package/.proagents/ai-training/README.md +0 -155
  28. package/.proagents/ai-training/continuous-learning.md +0 -413
  29. package/.proagents/ai-training/domain-knowledge.md +0 -378
  30. package/.proagents/ai-training/pattern-learning.md +0 -455
  31. package/.proagents/ai-training/training-data.md +0 -337
  32. package/.proagents/ai-training/user-preferences.md +0 -346
  33. package/.proagents/approval-workflows/README.md +0 -146
  34. package/.proagents/approval-workflows/approval-config.md +0 -332
  35. package/.proagents/approval-workflows/approval-stages.md +0 -503
  36. package/.proagents/approval-workflows/emergency-bypass.md +0 -351
  37. package/.proagents/approval-workflows/examples.md +0 -859
  38. package/.proagents/approval-workflows/notifications.md +0 -320
  39. package/.proagents/compliance/README.md +0 -206
  40. package/.proagents/compliance/access-control.md +0 -310
  41. package/.proagents/compliance/audit-logging.md +0 -444
  42. package/.proagents/compliance/compliance-frameworks.md +0 -429
  43. package/.proagents/compliance/reports.md +0 -491
  44. package/.proagents/compliance/retention-policies.md +0 -454
  45. package/.proagents/config-versioning/README.md +0 -120
  46. package/.proagents/config-versioning/changelog.md +0 -300
  47. package/.proagents/config-versioning/rollback.md +0 -283
  48. package/.proagents/config-versioning/versioning.md +0 -330
  49. package/.proagents/contract-testing/README.md +0 -223
  50. package/.proagents/contract-testing/contract-testing.md +0 -614
  51. package/.proagents/contract-testing/pact-integration.md +0 -507
  52. package/.proagents/contract-testing/schema-validation.md +0 -565
  53. package/.proagents/dependency-management/README.md +0 -140
  54. package/.proagents/dependency-management/automation.md +0 -363
  55. package/.proagents/dependency-management/compatibility.md +0 -319
  56. package/.proagents/dependency-management/security-scanning.md +0 -413
  57. package/.proagents/dependency-management/update-policies.md +0 -374
  58. package/.proagents/disaster-recovery/README.md +0 -247
  59. package/.proagents/disaster-recovery/automation.md +0 -366
  60. package/.proagents/disaster-recovery/backup-recovery.md +0 -571
  61. package/.proagents/disaster-recovery/incident-response.md +0 -565
  62. package/.proagents/disaster-recovery/rollback-procedures.md +0 -499
  63. package/.proagents/disaster-recovery/runbooks.md +0 -603
  64. package/.proagents/disaster-recovery/scenarios.md +0 -892
  65. package/.proagents/disaster-recovery/testing.md +0 -438
  66. package/.proagents/environments/README.md +0 -244
  67. package/.proagents/environments/configuration.md +0 -437
  68. package/.proagents/environments/promotion.md +0 -434
  69. package/.proagents/environments/setup.md +0 -420
  70. package/.proagents/examples/README.md +0 -55
  71. package/.proagents/examples/backend-nodejs/README.md +0 -188
  72. package/.proagents/examples/backend-nodejs/complete-conversation.md +0 -601
  73. package/.proagents/examples/backend-nodejs/proagents.config.yaml +0 -415
  74. package/.proagents/examples/backend-nodejs/workflow-example.md +0 -909
  75. package/.proagents/examples/fullstack-nextjs/README.md +0 -155
  76. package/.proagents/examples/fullstack-nextjs/complete-conversation.md +0 -604
  77. package/.proagents/examples/fullstack-nextjs/proagents.config.yaml +0 -287
  78. package/.proagents/examples/fullstack-nextjs/workflow-example.md +0 -553
  79. package/.proagents/examples/mobile-react-native/README.md +0 -171
  80. package/.proagents/examples/mobile-react-native/complete-conversation.md +0 -825
  81. package/.proagents/examples/mobile-react-native/proagents.config.yaml +0 -330
  82. package/.proagents/examples/mobile-react-native/workflow-example.md +0 -723
  83. package/.proagents/examples/web-frontend-react/README.md +0 -125
  84. package/.proagents/examples/web-frontend-react/complete-conversation.md +0 -556
  85. package/.proagents/examples/web-frontend-react/proagents.config.yaml +0 -183
  86. package/.proagents/examples/web-frontend-react/workflow-example.md +0 -603
  87. package/.proagents/existing-projects/README.md +0 -65
  88. package/.proagents/existing-projects/challenges.md +0 -861
  89. package/.proagents/existing-projects/coexistence-mode.md +0 -483
  90. package/.proagents/existing-projects/compatibility-assessment.md +0 -541
  91. package/.proagents/existing-projects/gradual-adoption.md +0 -515
  92. package/.proagents/existing-projects/migration-strategies.md +0 -788
  93. package/.proagents/existing-projects/pattern-reconciliation.md +0 -489
  94. package/.proagents/existing-projects/team-onboarding.md +0 -617
  95. package/.proagents/existing-projects/technical-debt-handling.md +0 -644
  96. package/.proagents/feature-flags/README.md +0 -263
  97. package/.proagents/feature-flags/ab-testing.md +0 -413
  98. package/.proagents/feature-flags/configuration.md +0 -420
  99. package/.proagents/feature-flags/kill-switches.md +0 -444
  100. package/.proagents/feature-flags/rollout-strategies.md +0 -392
  101. package/.proagents/history.log +0 -12
  102. package/.proagents/i18n/README.md +0 -133
  103. package/.proagents/i18n/extraction.md +0 -433
  104. package/.proagents/i18n/tms-integration.md +0 -332
  105. package/.proagents/i18n/translation-workflow.md +0 -413
  106. package/.proagents/i18n/validation.md +0 -355
  107. package/.proagents/logging/README.md +0 -276
  108. package/.proagents/logging/aggregation.md +0 -475
  109. package/.proagents/logging/log-levels.md +0 -376
  110. package/.proagents/logging/sensitive-data.md +0 -423
  111. package/.proagents/logging/structured-logging.md +0 -406
  112. package/.proagents/metrics/README.md +0 -69
  113. package/.proagents/metrics/code-quality-kpis.md +0 -461
  114. package/.proagents/metrics/deployment-metrics.md +0 -517
  115. package/.proagents/metrics/developer-productivity.md +0 -368
  116. package/.proagents/metrics/learning-effectiveness.md +0 -478
  117. package/.proagents/migrations/README.md +0 -77
  118. package/.proagents/migrations/from-claude-projects.md +0 -313
  119. package/.proagents/migrations/from-cursor-rules.md +0 -345
  120. package/.proagents/migrations/from-custom-workflows.md +0 -410
  121. package/.proagents/monitoring/README.md +0 -308
  122. package/.proagents/monitoring/alerting.md +0 -449
  123. package/.proagents/monitoring/dashboards.md +0 -454
  124. package/.proagents/monitoring/health-checks.md +0 -436
  125. package/.proagents/monitoring/metrics.md +0 -434
  126. package/.proagents/multi-project/README.md +0 -170
  127. package/.proagents/multi-project/coordinated-deploy.md +0 -510
  128. package/.proagents/multi-project/cross-project-deps.md +0 -395
  129. package/.proagents/multi-project/unified-changelog.md +0 -477
  130. package/.proagents/multi-project/walkthroughs/monorepo-setup.md +0 -787
  131. package/.proagents/multi-project/workspace-config.md +0 -408
  132. package/.proagents/notifications/README.md +0 -151
  133. package/.proagents/notifications/channels.md +0 -457
  134. package/.proagents/notifications/preferences.md +0 -415
  135. package/.proagents/notifications/routing.md +0 -449
  136. package/.proagents/notifications/scheduling.md +0 -425
  137. package/.proagents/notifications/templates.md +0 -446
  138. package/.proagents/offline-mode/README.md +0 -145
  139. package/.proagents/offline-mode/caching.md +0 -344
  140. package/.proagents/offline-mode/offline-operations.md +0 -312
  141. package/.proagents/offline-mode/queue-specifications.md +0 -679
  142. package/.proagents/offline-mode/sync.md +0 -475
  143. package/.proagents/parallel-features/README.md +0 -85
  144. package/.proagents/parallel-features/conflict-detection.md +0 -226
  145. package/.proagents/parallel-features/dependency-management.md +0 -392
  146. package/.proagents/parallel-features/merge-coordination.md +0 -506
  147. package/.proagents/parallel-features/tracking-system.md +0 -416
  148. package/.proagents/performance/README.md +0 -59
  149. package/.proagents/performance/bundle-analysis.md +0 -375
  150. package/.proagents/performance/load-testing.md +0 -563
  151. package/.proagents/performance/runtime-metrics.md +0 -489
  152. package/.proagents/performance/web-vitals.md +0 -425
  153. package/.proagents/plugins/README.md +0 -139
  154. package/.proagents/plugins/creating-plugins.md +0 -504
  155. package/.proagents/plugins/plugin-api.md +0 -467
  156. package/.proagents/plugins/plugin-registry.md +0 -276
  157. package/.proagents/reporting/README.md +0 -158
  158. package/.proagents/reporting/dashboards.md +0 -366
  159. package/.proagents/reporting/exports.md +0 -524
  160. package/.proagents/reporting/quality-metrics.md +0 -385
  161. package/.proagents/reporting/templates/README.md +0 -56
  162. package/.proagents/reporting/templates/dashboard-config.json +0 -187
  163. package/.proagents/reporting/templates/metrics-queries.md +0 -427
  164. package/.proagents/reporting/templates/react-dashboard.tsx +0 -544
  165. package/.proagents/reporting/templates/widgets.md +0 -451
  166. package/.proagents/reporting/velocity-metrics.md +0 -340
  167. package/.proagents/reverse-engineering/README.md +0 -151
  168. package/.proagents/reverse-engineering/architecture-extraction.md +0 -325
  169. package/.proagents/reverse-engineering/code-analysis.md +0 -377
  170. package/.proagents/reverse-engineering/dependency-mapping.md +0 -567
  171. package/.proagents/reverse-engineering/diagram-generation.md +0 -586
  172. package/.proagents/reverse-engineering/documentation-generation.md +0 -468
  173. package/.proagents/reverse-engineering/pattern-detection.md +0 -569
  174. package/.proagents/reverse-engineering/quality-assessment.md +0 -733
  175. package/.proagents/secrets/README.md +0 -278
  176. package/.proagents/secrets/access-control.md +0 -443
  177. package/.proagents/secrets/rotation.md +0 -403
  178. package/.proagents/secrets/scanning.md +0 -487
  179. package/.proagents/secrets/storage.md +0 -394
  180. package/.proagents/webhooks/README.md +0 -126
  181. package/.proagents/webhooks/endpoints.md +0 -298
  182. package/.proagents/webhooks/events.md +0 -316
  183. package/.proagents/webhooks/payloads.md +0 -325
  184. package/.proagents/webhooks/reliability.md +0 -363
  185. package/.proagents/webhooks/security.md +0 -380
package/README.md CHANGED
@@ -4,8 +4,9 @@
4
4
 
5
5
  A portable, universal development workflow framework that works with **any AI platform** (Claude, ChatGPT, Gemini, Cursor, Copilot, etc.) and enables **multi-AI collaboration** on the same project.
6
6
 
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
7
  [![npm version](https://img.shields.io/npm/v/proagents.svg)](https://www.npmjs.com/package/proagents)
8
+ [![npm downloads](https://img.shields.io/npm/dm/proagents.svg)](https://www.npmjs.com/package/proagents)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
10
 
10
11
  ---
11
12
 
@@ -80,36 +81,25 @@ Next: pa:test
80
81
 
81
82
  ## Features
82
83
 
83
- ### Multi-AI Collaboration & Cross-AI Continuity
84
+ ### Multi-AI Collaboration
84
85
 
85
86
  Multiple AIs can work on the same project with full context sharing:
86
87
 
87
88
  | Feature | Description |
88
89
  |---------|-------------|
89
- | **Auto Context Loading** | AI automatically loads context on first command |
90
- | **Auto Change Logging** | Every code change logged automatically |
91
- | **Feature Changelogs** | Per-feature change history |
92
- | **Module Changelogs** | Per-module change history |
93
- | **Conflict Detection** | Warns if files modified by other AI |
94
- | **Activity Log** | Track what each AI does with model name |
95
- | **Smart Context Summary** | Auto-generated 5-line summary at top of context |
96
- | **Context Changed Alert** | Warns if another AI worked since your last session |
97
- | **Test Status Tracking** | Auto-updates test status after every test run |
98
- | **Feature Progress** | Auto-calculates progress from tasks |
99
- | **AI Performance Stats** | Tracks sessions, tasks, reverts per AI platform |
100
- | **Quick Undo (pa:undo-last)** | Revert last AI's entire session changes |
101
- | **Auto-Archive Old Logs** | Automatically archives logs older than 7 days |
90
+ | **Auto Context Loading** | AI loads project context automatically on first command |
91
+ | **Auto Change Logging** | Every code change logged with AI model name |
92
+ | **Conflict Detection** | Warns if files were modified by another AI |
93
+ | **Feature Changelogs** | Per-feature and per-module change history |
94
+ | **Quick Undo** | `pa:undo-last` reverts last AI's entire session |
95
+ | **Activity Tracking** | Track what each AI does with timestamps |
96
+ | **Handoff Notes** | `pa:handoff` creates notes for next AI session |
97
+ | **Test Status Sync** | Auto-updates test status after every test run |
98
+ | **Progress Tracking** | Auto-calculates feature progress from tasks |
102
99
 
103
100
  ```bash
104
- # Just start working - context loads automatically!
105
101
  pa:feature "add login" # AI auto-loads context, then works
106
- pa:fix "bug in auth" # AI auto-loads context, then fixes
107
-
108
- # No manual pa:sync needed - it's automatic
109
- # No manual pa:session-end needed - changes logged automatically
110
-
111
- # Undo another AI's work if needed
112
- pa:undo-last # Revert last AI's entire session
102
+ pa:undo-last # Revert last AI's changes if needed
113
103
  ```
114
104
 
115
105
  ### AI Learning & Feedback
@@ -174,6 +164,8 @@ Type these in any AI assistant (Claude, ChatGPT, Gemini, Cursor, etc.):
174
164
  |---------|-------------|
175
165
  | `pa:feature "name"` | Start new feature workflow (all phases) |
176
166
  | `pa:fix "description"` | Quick bug fix mode |
167
+ | `pa:project-setup` | Interactive project setup wizard |
168
+ | `pa:rnd` | Research & Development workflow |
177
169
  | `pa:status` | Show current progress |
178
170
  | `pa:sync` | Load project context (usually auto) |
179
171
  | `pa:test` | Run tests |
@@ -183,7 +175,7 @@ Type these in any AI assistant (Claude, ChatGPT, Gemini, Cursor, etc.):
183
175
  | `pa:undo-last` | Revert last AI's changes |
184
176
  | `pa:handoff` | Create notes for another AI |
185
177
 
186
- **Quick aliases:** `pa:f` (feature), `pa:s` (status), `pa:t` (test), `pa:h` (help)
178
+ **Quick aliases:** `pa:f` (feature), `pa:s` (status), `pa:t` (test), `pa:h` (help), `pa:setup` (project-setup), `pa:research` (rnd)
187
179
 
188
180
  📖 **Want more?** See [COMMANDS.md](COMMANDS.md) for 100+ AI commands (debugging, testing, refactoring, code generation, sprints...)
189
181
 
package/package.json CHANGED
@@ -1,21 +1,16 @@
1
1
  {
2
2
  "name": "proagents",
3
- "version": "1.6.17",
3
+ "version": "1.6.19",
4
4
  "description": "AI-agnostic development workflow framework that automates the full software development lifecycle",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "bin": {
8
- "proagents": "./bin/proagents.js"
8
+ "proagents": "bin/proagents.js"
9
9
  },
10
10
  "scripts": {
11
11
  "test": "echo \"No tests yet\" && exit 0",
12
12
  "lint": "echo \"No linting configured\" && exit 0"
13
13
  },
14
- "files": [
15
- "bin/",
16
- "lib/",
17
- ".proagents/"
18
- ],
19
14
  "keywords": [
20
15
  "ai",
21
16
  "workflow",
@@ -1,141 +0,0 @@
1
- # AI Model Selection & Management
2
-
3
- Configure and manage AI models for different tasks.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- ProAgents is AI-agnostic and supports multiple AI providers. Configure which models to use for different tasks to optimize cost, speed, and quality.
10
-
11
- ```
12
- ┌─────────────────────────────────────────────────────────────┐
13
- │ AI Model Architecture │
14
- ├─────────────────────────────────────────────────────────────┤
15
- │ │
16
- │ Task ──► Model Router ──► Selected Model ──► Response │
17
- │ │ │
18
- │ ├── Task Type Detection │
19
- │ ├── Cost Optimization │
20
- │ ├── Fallback Handling │
21
- │ └── Rate Limiting │
22
- │ │
23
- │ Supported Providers: │
24
- │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
25
- │ │ Claude │ │ OpenAI │ │ Gemini │ │ Others │ │
26
- │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
27
- │ │
28
- └─────────────────────────────────────────────────────────────┘
29
- ```
30
-
31
- ---
32
-
33
- ## Quick Start
34
-
35
- ### Configure Default Model
36
-
37
- ```yaml
38
- # proagents.config.yaml
39
-
40
- ai:
41
- default_provider: "anthropic"
42
- default_model: "claude-3-sonnet"
43
- ```
44
-
45
- ### Use Different Models
46
-
47
- ```bash
48
- # Use specific model for a task
49
- proagents analyze --model claude-3-opus
50
-
51
- # Use fast model for quick tasks
52
- proagents quick "Fix typo" --model claude-3-haiku
53
- ```
54
-
55
- ---
56
-
57
- ## Supported Providers
58
-
59
- | Provider | Models | Best For |
60
- |----------|--------|----------|
61
- | **Anthropic** | Claude 3 Opus, Sonnet, Haiku | Code analysis, planning |
62
- | **OpenAI** | GPT-4, GPT-4 Turbo, GPT-3.5 | General tasks, docs |
63
- | **Google** | Gemini Pro, Gemini Ultra | Research, analysis |
64
- | **Cohere** | Command, Command Light | Summarization |
65
- | **Local** | Ollama, LM Studio | Privacy, offline |
66
-
67
- ---
68
-
69
- ## Documentation Files
70
-
71
- | File | Description |
72
- |------|-------------|
73
- | [model-config.md](./model-config.md) | Model configuration |
74
- | [task-routing.md](./task-routing.md) | Task-based model selection |
75
- | [cost-management.md](./cost-management.md) | Cost optimization |
76
- | [fallbacks.md](./fallbacks.md) | Fallback strategies |
77
-
78
- ---
79
-
80
- ## Configuration
81
-
82
- ```yaml
83
- # proagents.config.yaml
84
-
85
- ai:
86
- # Default settings
87
- default_provider: "anthropic"
88
- default_model: "claude-3-sonnet"
89
-
90
- # Provider configurations
91
- providers:
92
- anthropic:
93
- api_key: "${ANTHROPIC_API_KEY}"
94
- models:
95
- - claude-3-opus
96
- - claude-3-sonnet
97
- - claude-3-haiku
98
-
99
- openai:
100
- api_key: "${OPENAI_API_KEY}"
101
- models:
102
- - gpt-4-turbo
103
- - gpt-4
104
- - gpt-3.5-turbo
105
-
106
- google:
107
- api_key: "${GOOGLE_API_KEY}"
108
- models:
109
- - gemini-pro
110
- - gemini-ultra
111
-
112
- # Task-specific models
113
- task_routing:
114
- code_analysis: "claude-3-opus"
115
- code_generation: "claude-3-sonnet"
116
- quick_tasks: "claude-3-haiku"
117
- documentation: "gpt-4"
118
-
119
- # Cost management
120
- cost:
121
- daily_limit: 50.00
122
- alert_threshold: 40.00
123
- fallback_on_limit: true
124
-
125
- # Fallback chain
126
- fallback:
127
- primary: "claude-3-sonnet"
128
- secondary: "gpt-4"
129
- tertiary: "gemini-pro"
130
- ```
131
-
132
- ---
133
-
134
- ## Commands
135
-
136
- | Command | Description |
137
- |---------|-------------|
138
- | `proagents ai status` | Show AI configuration status |
139
- | `proagents ai models` | List available models |
140
- | `proagents ai usage` | Show usage and costs |
141
- | `proagents ai test` | Test model connectivity |
@@ -1,362 +0,0 @@
1
- # Cost Management
2
-
3
- Manage and optimize AI model costs.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- Track and control AI usage costs to stay within budget.
10
-
11
- ```
12
- ┌─────────────────────────────────────────────────────────────┐
13
- │ Cost Management │
14
- ├─────────────────────────────────────────────────────────────┤
15
- │ │
16
- │ Usage Tracking ──► Cost Calculation ──► Budget Control │
17
- │ │ │ │ │
18
- │ ▼ ▼ ▼ │
19
- │ Token Counting Rate Application Alerts/Limits │
20
- │ Request Logging Provider Totals Fallback Logic │
21
- │ │
22
- └─────────────────────────────────────────────────────────────┘
23
- ```
24
-
25
- ---
26
-
27
- ## Cost Configuration
28
-
29
- ### Budget Limits
30
-
31
- ```yaml
32
- ai:
33
- cost:
34
- # Daily spending limit
35
- daily_limit: 50.00
36
-
37
- # Weekly limit
38
- weekly_limit: 250.00
39
-
40
- # Monthly limit
41
- monthly_limit: 1000.00
42
-
43
- # Alert thresholds (percentage of limit)
44
- alerts:
45
- - threshold: 50
46
- action: "notify"
47
- - threshold: 80
48
- action: "notify"
49
- - threshold: 100
50
- action: "block_or_fallback"
51
-
52
- # On limit reached
53
- on_limit:
54
- action: "fallback" # or "block"
55
- fallback_model: "claude-3-haiku"
56
- ```
57
-
58
- ### Per-Team Budgets
59
-
60
- ```yaml
61
- ai:
62
- cost:
63
- team_budgets:
64
- frontend:
65
- daily: 20.00
66
- monthly: 400.00
67
-
68
- backend:
69
- daily: 25.00
70
- monthly: 500.00
71
-
72
- mobile:
73
- daily: 15.00
74
- monthly: 300.00
75
- ```
76
-
77
- ---
78
-
79
- ## Pricing Reference
80
-
81
- ### Claude Models (Anthropic)
82
-
83
- | Model | Input (/1M tokens) | Output (/1M tokens) |
84
- |-------|-------------------|---------------------|
85
- | Opus | $15.00 | $75.00 |
86
- | Sonnet | $3.00 | $15.00 |
87
- | Haiku | $0.25 | $1.25 |
88
-
89
- ### GPT Models (OpenAI)
90
-
91
- | Model | Input (/1M tokens) | Output (/1M tokens) |
92
- |-------|-------------------|---------------------|
93
- | GPT-4 Turbo | $10.00 | $30.00 |
94
- | GPT-4 | $30.00 | $60.00 |
95
- | GPT-3.5 | $0.50 | $1.50 |
96
-
97
- ### Gemini Models (Google)
98
-
99
- | Model | Input (/1M tokens) | Output (/1M tokens) |
100
- |-------|-------------------|---------------------|
101
- | Gemini Pro | $0.50 | $1.50 |
102
- | Gemini Ultra | $7.00 | $21.00 |
103
-
104
- ---
105
-
106
- ## Usage Tracking
107
-
108
- ### View Current Usage
109
-
110
- ```bash
111
- # Show today's usage
112
- proagents ai usage
113
-
114
- # Show weekly usage
115
- proagents ai usage --period week
116
-
117
- # Show by project
118
- proagents ai usage --by project
119
-
120
- # Show by model
121
- proagents ai usage --by model
122
- ```
123
-
124
- ### Usage Dashboard
125
-
126
- ```
127
- ┌─────────────────────────────────────────────────────────────┐
128
- │ AI Usage - January 2024 │
129
- ├─────────────────────────────────────────────────────────────┤
130
- │ │
131
- │ Today's Spend: $12.45 / $50.00 │
132
- │ ████████████░░░░░░░░░░░░░░ 25% │
133
- │ │
134
- │ This Month: $234.56 / $1000.00 │
135
- │ ████████░░░░░░░░░░░░░░░░░░ 23% │
136
- │ │
137
- │ By Model: │
138
- │ ├── claude-3-sonnet: $156.78 (67%) │
139
- │ ├── claude-3-opus: $45.23 (19%) │
140
- │ ├── claude-3-haiku: $18.90 (8%) │
141
- │ └── gpt-4: $13.65 (6%) │
142
- │ │
143
- │ By Task: │
144
- │ ├── Code Analysis: $89.45 │
145
- │ ├── Code Generation: $78.34 │
146
- │ ├── Documentation: $34.56 │
147
- │ └── Quick Tasks: $32.21 │
148
- │ │
149
- │ Tokens Used: │
150
- │ ├── Input: 2.3M tokens │
151
- │ └── Output: 890K tokens │
152
- │ │
153
- └─────────────────────────────────────────────────────────────┘
154
- ```
155
-
156
- ---
157
-
158
- ## Cost Optimization
159
-
160
- ### Smart Model Selection
161
-
162
- ```yaml
163
- ai:
164
- optimization:
165
- # Use cheaper models for simple tasks
166
- auto_downgrade:
167
- enabled: true
168
- rules:
169
- - task_type: "simple"
170
- prefer: "haiku"
171
- - task_type: "medium"
172
- prefer: "sonnet"
173
- - task_type: "complex"
174
- prefer: "opus"
175
-
176
- # Estimate before execution
177
- estimate_first: true
178
- confirm_expensive: true # Confirm if > $1
179
- ```
180
-
181
- ### Caching
182
-
183
- ```yaml
184
- ai:
185
- caching:
186
- enabled: true
187
- ttl: "24h"
188
-
189
- # Cache identical requests
190
- request_cache: true
191
-
192
- # Cache code analysis
193
- analysis_cache: true
194
- analysis_ttl: "7d"
195
- ```
196
-
197
- ### Token Optimization
198
-
199
- ```yaml
200
- ai:
201
- optimization:
202
- # Compress context when possible
203
- compress_context: true
204
-
205
- # Truncate long files
206
- max_file_tokens: 10000
207
-
208
- # Summarize instead of full context
209
- use_summaries: true
210
- ```
211
-
212
- ---
213
-
214
- ## Cost Alerts
215
-
216
- ### Configuration
217
-
218
- ```yaml
219
- ai:
220
- alerts:
221
- cost:
222
- - name: "Daily 50%"
223
- condition: "daily_spend >= daily_limit * 0.5"
224
- channels: ["slack"]
225
-
226
- - name: "Daily 80%"
227
- condition: "daily_spend >= daily_limit * 0.8"
228
- channels: ["slack", "email"]
229
-
230
- - name: "Daily Limit"
231
- condition: "daily_spend >= daily_limit"
232
- channels: ["slack", "email", "sms"]
233
- action: "fallback_to_cheaper"
234
-
235
- - name: "Monthly 90%"
236
- condition: "monthly_spend >= monthly_limit * 0.9"
237
- channels: ["email"]
238
- action: "notify_admin"
239
- ```
240
-
241
- ### Alert Example
242
-
243
- ```
244
- 🔔 AI Cost Alert
245
-
246
- Daily spend has reached 80% of limit.
247
-
248
- Current: $40.12 / $50.00
249
- Remaining: $9.88
250
-
251
- Top Consumers:
252
- • Code analysis: $18.45
253
- • Feature implementation: $12.34
254
-
255
- Recommendation: Consider using Haiku for remaining tasks today.
256
-
257
- [View Details] [Adjust Limit]
258
- ```
259
-
260
- ---
261
-
262
- ## Cost Reports
263
-
264
- ### Generate Report
265
-
266
- ```bash
267
- # Monthly cost report
268
- proagents ai report --period month
269
-
270
- # Export to CSV
271
- proagents ai report --format csv --output costs.csv
272
- ```
273
-
274
- ### Report Contents
275
-
276
- ```markdown
277
- # AI Cost Report - January 2024
278
-
279
- ## Summary
280
- - Total Spend: $845.67
281
- - Budget: $1000.00
282
- - Remaining: $154.33
283
-
284
- ## By Provider
285
- | Provider | Spend | % of Total |
286
- |----------|-------|------------|
287
- | Anthropic | $678.45 | 80% |
288
- | OpenAI | $134.22 | 16% |
289
- | Google | $33.00 | 4% |
290
-
291
- ## By Model
292
- | Model | Requests | Tokens | Cost |
293
- |-------|----------|--------|------|
294
- | claude-3-sonnet | 1,234 | 4.5M | $456.78 |
295
- | claude-3-opus | 89 | 890K | $178.90 |
296
- | claude-3-haiku | 567 | 1.2M | $42.77 |
297
-
298
- ## By Team
299
- | Team | Spend | Budget | Status |
300
- |------|-------|--------|--------|
301
- | Frontend | $312.45 | $400 | ✅ |
302
- | Backend | $398.22 | $500 | ✅ |
303
- | Mobile | $135.00 | $300 | ✅ |
304
-
305
- ## Trends
306
- - Daily average: $28.19
307
- - Peak day: Jan 15 ($67.89)
308
- - Lowest day: Jan 1 ($3.45)
309
-
310
- ## Recommendations
311
- 1. Consider caching repeated analysis requests
312
- 2. Use Haiku for config/quick changes
313
- 3. Team Backend approaching limit - review usage
314
- ```
315
-
316
- ---
317
-
318
- ## Budget Actions
319
-
320
- ### On Budget Exceeded
321
-
322
- ```yaml
323
- ai:
324
- cost:
325
- on_limit_exceeded:
326
- # Options: block, fallback, notify_only, emergency_only
327
- action: "fallback"
328
-
329
- fallback_chain:
330
- - "claude-3-haiku"
331
- - "gpt-3.5-turbo"
332
-
333
- emergency_override:
334
- enabled: true
335
- requires: "admin_approval"
336
- max_additional: 20.00
337
- ```
338
-
339
- ### Manual Controls
340
-
341
- ```bash
342
- # Pause AI usage
343
- proagents ai pause
344
-
345
- # Resume AI usage
346
- proagents ai resume
347
-
348
- # Emergency override (with approval)
349
- proagents ai override --reason "Critical production fix"
350
- ```
351
-
352
- ---
353
-
354
- ## Best Practices
355
-
356
- 1. **Set Conservative Limits**: Start low, increase as needed
357
- 2. **Enable Alerts Early**: Get notified at 50%
358
- 3. **Use Right-Sized Models**: Don't use Opus for simple tasks
359
- 4. **Enable Caching**: Avoid duplicate requests
360
- 5. **Review Weekly**: Check usage patterns
361
- 6. **Optimize Prompts**: Reduce token usage
362
- 7. **Train Team**: Make team aware of costs