specialist-agent 2.0.0 → 2.5.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 (94) hide show
  1. package/README.md +17 -7
  2. package/agents/api.md +374 -93
  3. package/agents/architect.md +553 -0
  4. package/agents/data.md +108 -0
  5. package/agents/deps.md +323 -167
  6. package/agents/devops.md +12 -0
  7. package/agents/docs.md +381 -134
  8. package/agents/executor.md +117 -0
  9. package/agents/finance.md +85 -0
  10. package/agents/i18n.md +512 -117
  11. package/agents/perf.md +287 -109
  12. package/agents/refactor.md +380 -92
  13. package/agents/ripple-lite.md +106 -0
  14. package/agents/ripple.md +162 -0
  15. package/agents/security.md +65 -0
  16. package/agents/tdd.md +11 -3
  17. package/cli/index.mjs +40 -29
  18. package/hooks/native/auto-dispatch.mjs +6 -0
  19. package/hooks/native/settings-template.json +4 -4
  20. package/package.json +15 -2
  21. package/packs/angular/ARCHITECTURE.md +814 -0
  22. package/packs/angular/CLAUDE.md +105 -0
  23. package/packs/angular/agents/builder.md +157 -0
  24. package/packs/angular/agents/doctor.md +241 -0
  25. package/packs/angular/agents/migrator.md +195 -0
  26. package/packs/angular/agents/reviewer.md +263 -0
  27. package/packs/angular/agents-lite/builder.md +65 -0
  28. package/packs/angular/agents-lite/doctor.md +64 -0
  29. package/packs/angular/agents-lite/migrator.md +75 -0
  30. package/packs/angular/agents-lite/reviewer.md +69 -0
  31. package/packs/angular/skills/dev-create-component/SKILL.md +56 -0
  32. package/packs/angular/skills/dev-create-injectable/SKILL.md +60 -0
  33. package/packs/angular/skills/dev-create-module/SKILL.md +49 -0
  34. package/packs/angular/skills/dev-create-service/SKILL.md +34 -0
  35. package/packs/angular/skills/dev-create-test/SKILL.md +78 -0
  36. package/packs/angular/skills/dev-generate-types/SKILL.md +37 -0
  37. package/packs/angular/skills/docs-onboard/SKILL.md +42 -0
  38. package/packs/angular/skills/migration-migrate-component/SKILL.md +42 -0
  39. package/packs/angular/skills/migration-migrate-module/SKILL.md +25 -0
  40. package/packs/angular/skills/review-check-architecture/SKILL.md +67 -0
  41. package/packs/angular/skills/review-fix-violations/SKILL.md +43 -0
  42. package/packs/angular/skills/review-review/SKILL.md +42 -0
  43. package/packs/astro/ARCHITECTURE.md +718 -0
  44. package/packs/astro/CLAUDE.md +106 -0
  45. package/packs/astro/agents/builder.md +192 -0
  46. package/packs/astro/agents/doctor.md +254 -0
  47. package/packs/astro/agents/migrator.md +209 -0
  48. package/packs/astro/agents/reviewer.md +263 -0
  49. package/packs/astro/agents-lite/builder.md +71 -0
  50. package/packs/astro/agents-lite/doctor.md +66 -0
  51. package/packs/astro/agents-lite/migrator.md +71 -0
  52. package/packs/astro/agents-lite/reviewer.md +70 -0
  53. package/packs/astro/skills/dev-create-component/SKILL.md +50 -0
  54. package/packs/astro/skills/dev-create-island/SKILL.md +63 -0
  55. package/packs/astro/skills/dev-create-module/SKILL.md +49 -0
  56. package/packs/astro/skills/dev-create-service/SKILL.md +34 -0
  57. package/packs/astro/skills/dev-create-test/SKILL.md +76 -0
  58. package/packs/astro/skills/dev-generate-types/SKILL.md +37 -0
  59. package/packs/astro/skills/docs-onboard/SKILL.md +51 -0
  60. package/packs/astro/skills/migration-migrate-component/SKILL.md +48 -0
  61. package/packs/astro/skills/migration-migrate-module/SKILL.md +25 -0
  62. package/packs/astro/skills/review-check-architecture/SKILL.md +72 -0
  63. package/packs/astro/skills/review-fix-violations/SKILL.md +43 -0
  64. package/packs/astro/skills/review-review/SKILL.md +44 -0
  65. package/packs/nuxt/ARCHITECTURE.md +831 -0
  66. package/packs/nuxt/CLAUDE.md +111 -0
  67. package/packs/nuxt/agents/builder.md +165 -0
  68. package/packs/nuxt/agents/doctor.md +252 -0
  69. package/packs/nuxt/agents/migrator.md +203 -0
  70. package/packs/nuxt/agents/reviewer.md +275 -0
  71. package/packs/nuxt/agents-lite/builder.md +67 -0
  72. package/packs/nuxt/agents-lite/doctor.md +67 -0
  73. package/packs/nuxt/agents-lite/migrator.md +80 -0
  74. package/packs/nuxt/agents-lite/reviewer.md +71 -0
  75. package/packs/nuxt/skills/dev-create-component/SKILL.md +60 -0
  76. package/packs/nuxt/skills/dev-create-composable/SKILL.md +33 -0
  77. package/packs/nuxt/skills/dev-create-module/SKILL.md +49 -0
  78. package/packs/nuxt/skills/dev-create-service/SKILL.md +34 -0
  79. package/packs/nuxt/skills/dev-create-test/SKILL.md +61 -0
  80. package/packs/nuxt/skills/dev-generate-types/SKILL.md +37 -0
  81. package/packs/nuxt/skills/docs-onboard/SKILL.md +49 -0
  82. package/packs/nuxt/skills/migration-migrate-component/SKILL.md +48 -0
  83. package/packs/nuxt/skills/migration-migrate-module/SKILL.md +25 -0
  84. package/packs/nuxt/skills/review-check-architecture/SKILL.md +71 -0
  85. package/packs/nuxt/skills/review-fix-violations/SKILL.md +43 -0
  86. package/packs/nuxt/skills/review-review/SKILL.md +44 -0
  87. package/skills/checkpoint/SKILL.md +8 -0
  88. package/skills/codereview/SKILL.md +255 -0
  89. package/skills/commit/SKILL.md +150 -0
  90. package/skills/estimate/SKILL.md +9 -0
  91. package/skills/finish/SKILL.md +9 -0
  92. package/skills/health/SKILL.md +9 -0
  93. package/skills/lint/SKILL.md +126 -0
  94. package/skills/plan/SKILL.md +9 -0
package/agents/finance.md CHANGED
@@ -123,6 +123,91 @@ Read `docs/ARCHITECTURE.md` if it exists, then scan the project for existing fin
123
123
  - Large datasets should use pagination or streaming
124
124
  - Audit trail: log who generated what report and when
125
125
 
126
+ ## Advanced Financial Patterns
127
+
128
+ ### Double-Entry Bookkeeping
129
+ Use when the project requires formal accounting, audit trails, or compliance (SOX, PCI). For simple payment integrations (e.g., Stripe checkout), a transaction log is sufficient — don't over-engineer.
130
+
131
+ When applicable, every financial transaction records TWO entries: a debit and a credit that always balance.
132
+
133
+ **Account Types:**
134
+
135
+ | Type | Debit Increases | Credit Increases |
136
+ |------|----------------|-----------------|
137
+ | **Assets** (cash, receivables) | Yes | No |
138
+ | **Liabilities** (payables, loans) | No | Yes |
139
+ | **Equity** (owner's capital) | No | Yes |
140
+ | **Revenue** (sales, fees) | No | Yes |
141
+ | **Expenses** (costs, fees paid) | Yes | No |
142
+
143
+ **Journal Entry Example:**
144
+ ```text
145
+ Date: 2024-01-15
146
+ Description: Customer payment received
147
+
148
+ Account Debit Credit
149
+ Cash (Asset) $100.00
150
+ Revenue (Income) $100.00
151
+ ─────────────────────────────────────
152
+ Total $100.00 $100.00 ← MUST balance
153
+ ```
154
+
155
+ **Implementation Rules:**
156
+ - Every transaction creates TWO ledger entries (debit + credit)
157
+ - Sum of all debits MUST equal sum of all credits (trial balance)
158
+ - Ledger entries are IMMUTABLE — corrections are new entries, not modifications
159
+ - Use integer arithmetic (cents) — never floating point
160
+
161
+ ### Event Sourcing for Financial Audit Trail
162
+ Store every financial state change as an immutable event for complete auditability.
163
+
164
+ ```typescript
165
+ // Financial events — immutable, append-only
166
+ type FinancialEvent =
167
+ | { type: 'InvoiceIssued'; invoiceId: string; amount: number; currency: string; issuedAt: Date }
168
+ | { type: 'PaymentReceived'; invoiceId: string; amount: number; method: string; receivedAt: Date }
169
+ | { type: 'RefundProcessed'; invoiceId: string; amount: number; reason: string; processedAt: Date }
170
+ | { type: 'ChargebackReceived'; invoiceId: string; amount: number; receivedAt: Date }
171
+ ```
172
+
173
+ **Benefits:**
174
+ - Complete audit trail (SOX, PCI compliance)
175
+ - Reconstruct account state at any point in time
176
+ - Debug discrepancies by replaying events
177
+ - Generate reports from any historical period
178
+
179
+ **Rules:**
180
+ - Events are NEVER deleted or modified
181
+ - Include all financial data in the event payload (don't rely on external lookups)
182
+ - Version events for schema evolution
183
+ - Snapshot balances periodically for performance
184
+
185
+ ### Saga Pattern for Distributed Payments
186
+ Coordinate multi-step payment flows with compensating actions for each step.
187
+
188
+ ```text
189
+ Payment Saga:
190
+ 1. AuthorizePayment → success → 2. ReserveInventory → success → 3. CapturePayment → success → 4. FulfillOrder
191
+ ↓ fail ↓ fail ↓ fail
192
+ [Saga complete: failed] VoidAuthorization ReleaseInventory + VoidAuthorization
193
+ ```
194
+
195
+ **Key rules:**
196
+ - Every step has a compensating action (void, refund, release)
197
+ - Compensating actions MUST be idempotent (safe to retry)
198
+ - Set timeout for each step (don't wait forever for payment processor)
199
+ - Log all saga transitions for debugging and compliance
200
+ - Use idempotency keys for all external payment calls
201
+
202
+ **Common payment saga steps:**
203
+ 1. **Authorize** → reserve funds on customer's card
204
+ 2. **Reserve** → hold inventory for the order
205
+ 3. **Capture** → charge the authorized amount
206
+ 4. **Fulfill** → ship/deliver the order
207
+ 5. **Settle** → reconcile with payment processor
208
+
209
+ If ANY step fails, compensate all previously completed steps in reverse order.
210
+
126
211
  ## General Rules
127
212
  - Framework-agnostic — works with any stack
128
213
  - Reads ARCHITECTURE.md if present and follows existing conventions