aios-core 4.2.13 → 4.2.15

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 (95) hide show
  1. package/.aios-core/core/code-intel/helpers/dev-helper.js +206 -0
  2. package/.aios-core/core/registry/registry-schema.json +166 -166
  3. package/.aios-core/core/synapse/diagnostics/collectors/hook-collector.js +3 -3
  4. package/.aios-core/data/entity-registry.yaml +27 -0
  5. package/.aios-core/development/scripts/approval-workflow.js +642 -642
  6. package/.aios-core/development/scripts/backup-manager.js +606 -606
  7. package/.aios-core/development/scripts/branch-manager.js +389 -389
  8. package/.aios-core/development/scripts/code-quality-improver.js +1311 -1311
  9. package/.aios-core/development/scripts/commit-message-generator.js +849 -849
  10. package/.aios-core/development/scripts/conflict-resolver.js +674 -674
  11. package/.aios-core/development/scripts/dependency-analyzer.js +637 -637
  12. package/.aios-core/development/scripts/diff-generator.js +351 -351
  13. package/.aios-core/development/scripts/elicitation-engine.js +384 -384
  14. package/.aios-core/development/scripts/elicitation-session-manager.js +299 -299
  15. package/.aios-core/development/scripts/git-wrapper.js +461 -461
  16. package/.aios-core/development/scripts/manifest-preview.js +244 -244
  17. package/.aios-core/development/scripts/metrics-tracker.js +775 -775
  18. package/.aios-core/development/scripts/modification-validator.js +554 -554
  19. package/.aios-core/development/scripts/pattern-learner.js +1224 -1224
  20. package/.aios-core/development/scripts/performance-analyzer.js +757 -757
  21. package/.aios-core/development/scripts/refactoring-suggester.js +1138 -1138
  22. package/.aios-core/development/scripts/rollback-handler.js +530 -530
  23. package/.aios-core/development/scripts/security-checker.js +358 -358
  24. package/.aios-core/development/scripts/template-engine.js +239 -239
  25. package/.aios-core/development/scripts/template-validator.js +278 -278
  26. package/.aios-core/development/scripts/test-generator.js +843 -843
  27. package/.aios-core/development/scripts/transaction-manager.js +589 -589
  28. package/.aios-core/development/scripts/usage-tracker.js +673 -673
  29. package/.aios-core/development/scripts/validate-filenames.js +226 -226
  30. package/.aios-core/development/scripts/version-tracker.js +526 -526
  31. package/.aios-core/development/scripts/yaml-validator.js +396 -396
  32. package/.aios-core/development/tasks/build-autonomous.md +10 -4
  33. package/.aios-core/development/tasks/create-service.md +23 -0
  34. package/.aios-core/development/tasks/dev-develop-story.md +12 -6
  35. package/.aios-core/development/tasks/dev-suggest-refactoring.md +7 -1
  36. package/.aios-core/development/tasks/publish-npm.md +3 -3
  37. package/.aios-core/hooks/unified/README.md +1 -1
  38. package/.aios-core/install-manifest.yaml +65 -61
  39. package/.aios-core/manifests/schema/manifest-schema.json +190 -190
  40. package/.aios-core/product/templates/component-react-tmpl.tsx +98 -98
  41. package/.aios-core/product/templates/engine/schemas/adr.schema.json +102 -102
  42. package/.aios-core/product/templates/engine/schemas/dbdr.schema.json +205 -205
  43. package/.aios-core/product/templates/engine/schemas/epic.schema.json +175 -175
  44. package/.aios-core/product/templates/engine/schemas/pmdr.schema.json +175 -175
  45. package/.aios-core/product/templates/engine/schemas/prd-v2.schema.json +300 -300
  46. package/.aios-core/product/templates/engine/schemas/prd.schema.json +152 -152
  47. package/.aios-core/product/templates/engine/schemas/story.schema.json +222 -222
  48. package/.aios-core/product/templates/engine/schemas/task.schema.json +154 -154
  49. package/.aios-core/product/templates/eslintrc-security.json +32 -32
  50. package/.aios-core/product/templates/github-actions-cd.yml +212 -212
  51. package/.aios-core/product/templates/github-actions-ci.yml +172 -172
  52. package/.aios-core/product/templates/shock-report-tmpl.html +502 -502
  53. package/.aios-core/product/templates/token-exports-css-tmpl.css +240 -240
  54. package/.aios-core/quality/schemas/quality-metrics.schema.json +233 -233
  55. package/.aios-core/scripts/migrate-framework-docs.sh +300 -300
  56. package/README.en.md +747 -0
  57. package/README.md +4 -2
  58. package/bin/aios.js +7 -4
  59. package/package.json +1 -1
  60. package/packages/aios-pro-cli/src/recover.js +1 -1
  61. package/packages/installer/src/wizard/ide-config-generator.js +6 -6
  62. package/packages/installer/src/wizard/pro-setup.js +3 -3
  63. package/pro/license/degradation.js +220 -220
  64. package/pro/license/errors.js +450 -450
  65. package/pro/license/feature-gate.js +354 -354
  66. package/pro/license/index.js +181 -181
  67. package/pro/license/license-cache.js +523 -523
  68. package/pro/license/license-crypto.js +303 -303
  69. package/scripts/package-synapse.js +5 -5
  70. package/scripts/validate-package-completeness.js +3 -3
  71. package/.aios-core/.session/current-session.json +0 -14
  72. package/.aios-core/data/registry-update-log.jsonl +0 -191
  73. package/.aios-core/docs/SHARD-TRANSLATION-GUIDE.md +0 -335
  74. package/.aios-core/docs/component-creation-guide.md +0 -458
  75. package/.aios-core/docs/session-update-pattern.md +0 -307
  76. package/.aios-core/docs/standards/AIOS-FRAMEWORK-MASTER.md +0 -1963
  77. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-SUMMARY.md +0 -1190
  78. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1.md +0 -439
  79. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO.md +0 -5398
  80. package/.aios-core/docs/standards/V3-ARCHITECTURAL-DECISIONS.md +0 -523
  81. package/.aios-core/docs/template-syntax.md +0 -267
  82. package/.aios-core/docs/troubleshooting-guide.md +0 -625
  83. package/.aios-core/infrastructure/tests/utilities-audit-results.json +0 -501
  84. package/.aios-core/manifests/agents.csv +0 -29
  85. package/.aios-core/manifests/tasks.csv +0 -198
  86. package/.aios-core/manifests/workers.csv +0 -204
  87. package/.claude/rules/agent-authority.md +0 -105
  88. package/.claude/rules/coderabbit-integration.md +0 -93
  89. package/.claude/rules/ids-principles.md +0 -112
  90. package/.claude/rules/story-lifecycle.md +0 -139
  91. package/.claude/rules/workflow-execution.md +0 -150
  92. package/scripts/glue/README.md +0 -355
  93. package/scripts/glue/compose-agent-prompt.cjs +0 -362
  94. /package/.claude/hooks/{precompact-session-digest.js → precompact-session-digest.cjs} +0 -0
  95. /package/.claude/hooks/{synapse-engine.js → synapse-engine.cjs} +0 -0
@@ -1,355 +0,0 @@
1
- # Glue Script: Compose Agent Prompt
2
-
3
- Deterministic prompt composition for autonomous AIOS agents.
4
-
5
- ## Overview
6
-
7
- The glue script (`compose-agent-prompt.cjs`) composes complete prompts for autonomous agents by combining:
8
-
9
- 1. **Agent Persona** - From `.aios-core/development/agents/{id}.md`
10
- 2. **Task Workflow** - From Mission Router → `.aios-core/development/tasks/{file}.md`
11
- 3. **Extra Resources** - Checklists, templates specified in Mission Router
12
- 4. **Context** - Story files, accumulated context, etc.
13
- 5. **Execution Directive** - Mission-specific instructions
14
-
15
- ## Architecture
16
-
17
- ```
18
- Skill (orchestrator) → Calls glue script
19
-
20
- Glue Script → Deterministic composition (~240 lines)
21
- ↓ outputs 1500-2000 lines
22
- Task(general-purpose) → Agent receives COMPLETE prompt
23
-
24
- Autonomous Execution → No additional Reads needed
25
- ```
26
-
27
- **Benefits:**
28
- - Lead doesn't burn context with Reads per spawn
29
- - Agent receives everything upfront (fresh context)
30
- - Deterministic: same inputs → same output
31
- - Validatable and testable
32
-
33
- ## Installation
34
-
35
- ```bash
36
- # Already included in project
37
- # No additional dependencies needed
38
- ```
39
-
40
- ## Usage
41
-
42
- ### Basic Usage
43
-
44
- ```bash
45
- # Develop a story
46
- node scripts/glue/compose-agent-prompt.cjs \
47
- --agent dev \
48
- --mission develop-story \
49
- --context path/to/story.md
50
-
51
- # Validate a story
52
- node scripts/glue/compose-agent-prompt.cjs \
53
- --agent po \
54
- --mission validate-story \
55
- --context path/to/expanded.md
56
-
57
- # Review implementation
58
- node scripts/glue/compose-agent-prompt.cjs \
59
- --agent qa \
60
- --mission gate \
61
- --context path/to/story.md \
62
- --context path/to/impl-log.md
63
- ```
64
-
65
- ### Options
66
-
67
- | Option | Description | Example |
68
- |--------|-------------|---------|
69
- | `--agent <id>` | Agent ID (dev, qa, po, db-sage, etc.) | `--agent dev` |
70
- | `--mission <keyword>` | Mission from Agent's Router | `--mission develop-story` |
71
- | `--context <path>` | Context file (repeatable) | `--context story.md` |
72
- | `--squad <name>` | Explicit squad name for agent resolution | `--squad design` |
73
- | `--extra-instruction` | Additional instruction | `--extra-instruction "Focus on tests"` |
74
- | `--verbose` | Show debug info to stderr | `--verbose` |
75
- | `--list-missions` | List available missions | `--list-missions` |
76
-
77
- ### Multiple Contexts
78
-
79
- ```bash
80
- # Story + accumulated context
81
- node scripts/glue/compose-agent-prompt.cjs \
82
- --agent po \
83
- --mission validate \
84
- --context story.md \
85
- --context accumulated-context.md
86
-
87
- # Story + implementation log
88
- node scripts/glue/compose-agent-prompt.cjs \
89
- --agent qa \
90
- --mission gate \
91
- --context expanded.md \
92
- --context impl-log.md
93
- ```
94
-
95
- ### Mission Aliases
96
-
97
- Common shortcuts for mission keywords:
98
-
99
- | Alias | Resolves To |
100
- |-------|-------------|
101
- | `review` | `gate` |
102
- | `validate` | `validate-story` |
103
- | `expand` | `create-story` |
104
- | `develop` | `develop-story` |
105
- | `implement` | `develop-story` |
106
- | `backlog` | `backlog-review` |
107
- | `draft` | `create-story` |
108
-
109
- ### List Available Missions
110
-
111
- ```bash
112
- # List missions for QA agent
113
- node scripts/glue/compose-agent-prompt.cjs --agent qa --list-missions
114
-
115
- # List missions for PO agent
116
- node scripts/glue/compose-agent-prompt.cjs --agent po --list-missions
117
- ```
118
-
119
- ## Integration with Task Tool
120
-
121
- ```javascript
122
- // 1. Compose the prompt
123
- const prompt = await Bash(
124
- `node scripts/glue/compose-agent-prompt.cjs \
125
- --agent dev \
126
- --mission develop-story \
127
- --context ${storyPath}`
128
- );
129
-
130
- // 2. Spawn agent with complete prompt
131
- Task({
132
- subagent_type: "general-purpose",
133
- model: "opus", // or "sonnet" for mechanical tasks
134
- mode: "bypassPermissions",
135
- prompt: prompt.stdout
136
- });
137
- ```
138
-
139
- ## Execute-Epic Pipeline
140
-
141
- The glue script supports the full execute-epic pipeline:
142
-
143
- ### Phase 1: Backlog Review (PO)
144
- ```bash
145
- node scripts/glue/compose-agent-prompt.cjs \
146
- --agent po \
147
- --mission backlog-review \
148
- --context path/to/epic.md
149
- ```
150
-
151
- ### Phase 2: Development Cycle
152
-
153
- **2.1 Expand Story (SM)**
154
- ```bash
155
- node scripts/glue/compose-agent-prompt.cjs \
156
- --agent sm \
157
- --mission expand \
158
- --context path/to/epic.md \
159
- --extra-instruction "Extract story X"
160
- ```
161
-
162
- **2.2 Validate Story (PO)**
163
- ```bash
164
- node scripts/glue/compose-agent-prompt.cjs \
165
- --agent po \
166
- --mission validate \
167
- --context path/to/expanded.md
168
- ```
169
-
170
- **2.3 Implement (Dev)**
171
- ```bash
172
- node scripts/glue/compose-agent-prompt.cjs \
173
- --agent dev \
174
- --mission develop \
175
- --context path/to/expanded.md \
176
- --context path/to/accumulated-context.md
177
- ```
178
-
179
- **2.4 Review (QA)**
180
- ```bash
181
- node scripts/glue/compose-agent-prompt.cjs \
182
- --agent qa \
183
- --mission review \
184
- --context path/to/expanded.md \
185
- --context path/to/impl-log.md
186
- ```
187
-
188
- ### Phase 3: Retrospective (PO)
189
- ```bash
190
- node scripts/glue/compose-agent-prompt.cjs \
191
- --agent po \
192
- --mission retrospective \
193
- --context path/to/accumulated-context.md
194
- ```
195
-
196
- ## Agent Reference
197
-
198
- ### Agent Resolution Priority
199
-
200
- The glue script resolves agents in this order:
201
-
202
- 1. `.claude/agents/aios-{id}.md` (AIOS core agents)
203
- 2. `.claude/agents/{id}.md` (standalone agents like db-sage)
204
- 3. `squads/{squad}/agents/{id}.md` (squad-specific agents)
205
-
206
- ### AIOS Core Agents
207
-
208
- | Agent ID | Role | Common Missions |
209
- |----------|------|-----------------|
210
- | `dev` | Developer | `develop-story`, `apply-qa-fixes` |
211
- | `qa` | Quality Assurance | `gate`, `review-story`, `security-scan` |
212
- | `po` | Product Owner | `validate-story`, `backlog-review` |
213
- | `sm` | Scrum Master | `create-story`, `expand` |
214
- | `architect` | Architect | `analyze-impact`, `create-fullstack-arch` |
215
- | `devops` | DevOps | `commit`, `pre-push`, `create-pr` |
216
- | `analyst` | Analyst | `market-research`, `competitor-analysis` |
217
- | `data-engineer` | Data Engineer | `develop-story`, `migration`, `schema-audit` |
218
- | `ux` | UX Designer | `wireframe`, `audit`, `develop-story` |
219
- | `pm` | Product Manager | `create-prd`, `create-epic` |
220
-
221
- ### Specialized Squad Agents
222
-
223
- | Agent ID | Squad | Replaces | Common Missions |
224
- |----------|-------|----------|-----------------|
225
- | `db-sage` | db-sage | data-engineer (for DB) | `kiss`, `kiss-schema-check`, `setup` |
226
- | `brad-frost` | design | — | Uses internal `*command` system |
227
- | `design-chief` | design | — | Squad orchestration |
228
- | `cyber-chief` | cybersecurity | — | Security audits |
229
-
230
- **Note:** Squad agents may use different mission systems. Use `--list-missions` to check available missions for each agent.
231
-
232
- ### Squad Agent Usage
233
-
234
- ```bash
235
- # db-sage uses Mission Router
236
- node scripts/glue/compose-agent-prompt.cjs --agent db-sage --mission kiss
237
-
238
- # brad-frost uses internal command system (load persona only)
239
- node scripts/glue/compose-agent-prompt.cjs --agent brad-frost --mission audit \
240
- --extra-instruction "Execute *audit command from your configuration"
241
-
242
- # Explicit squad specification
243
- node scripts/glue/compose-agent-prompt.cjs --agent my-agent --squad my-squad --mission task
244
- ```
245
-
246
- ## Prompt Structure
247
-
248
- The output prompt has the following structure:
249
-
250
- ```markdown
251
- ## Agent Persona
252
-
253
- [Full agent definition from .aios-core/development/agents/{id}.md]
254
-
255
- ---
256
-
257
- ## Task Workflow: {mission}
258
-
259
- [Task workflow from .aios-core/development/tasks/{file}.md]
260
-
261
- ---
262
-
263
- ## Checklist: {resource}.md
264
-
265
- [Checklists specified in Mission Router]
266
-
267
- ---
268
-
269
- ## Context
270
-
271
- ### Context 1: {filename}
272
-
273
- [File content]
274
-
275
- ### Context 2: {filename}
276
-
277
- [File content]
278
-
279
- ---
280
-
281
- ## Execution Directive
282
-
283
- Execute the mission "{mission}" following the task workflow above.
284
- - Follow ALL steps in the task workflow exactly
285
- - Use Self-Critique checkpoints if defined in the workflow
286
- - Output artifacts as specified in the workflow
287
- - Mark success/failure clearly at the end
288
-
289
- **Additional Instruction:** {extra-instruction if provided}
290
- ```
291
-
292
- ## Verbose Mode
293
-
294
- Use `--verbose` to see debug information:
295
-
296
- ```bash
297
- node scripts/glue/compose-agent-prompt.cjs \
298
- --agent dev \
299
- --mission develop \
300
- --context story.md \
301
- --verbose
302
- ```
303
-
304
- Output (to stderr):
305
- ```
306
- [glue] Agent: dev, Mission: develop, Resolved: develop-story
307
- [glue] Task file: dev-develop-story.md
308
- [glue] Extra resources: story-dod-checklist.md, self-critique-checklist.md
309
- [glue] Loading context: story.md
310
-
311
- [glue] Prompt stats: 1773 lines, 60117 chars
312
- [glue] Sections: 6 (persona, task, 2 checklists, 1 contexts, directive)
313
- ```
314
-
315
- ## Troubleshooting
316
-
317
- ### Agent file not found
318
- ```
319
- Error: Agent file not found: .claude/agents/aios-foo.md
320
- ```
321
- Check that the agent ID is valid. Use one of: dev, qa, po, sm, architect, devops, analyst, data-engineer, ux, pm.
322
-
323
- ### Mission not found
324
- ```
325
- ## Mission: foo
326
- No router entry found. Execute mission based on agent expertise.
327
- ```
328
- Use `--list-missions` to see available missions for the agent.
329
-
330
- ### Context file not found
331
- ```
332
- ### Context 1
333
- File not found: /path/to/missing.md
334
- ```
335
- Verify the context file path is correct.
336
-
337
- ## Test Results
338
-
339
- Pipeline tested with MMOS epic stories:
340
-
341
- | Story | Phase | Agent | Duration | Result |
342
- |-------|-------|-------|----------|--------|
343
- | MMOS-001 | Develop | dev | 227s | ✅ COMPLETED (verified existing impl) |
344
- | MMOS-002 | Validate | po | 60s | ✅ APPROVED (impl exists) |
345
- | MMOS-002 | Review | qa | 345s | ✅ APPROVED (38/38 tests pass) |
346
-
347
- **Key Metrics:**
348
- - Prompt size: 1500-1850 lines per agent
349
- - Agent autonomy: 100% (no manual intervention)
350
- - Test pass rate: 100%
351
-
352
- ---
353
-
354
- *Created: 2026-02-06*
355
- *Version: 1.0.0*