aios-core 4.1.0 → 4.2.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 (145) hide show
  1. package/.aios-core/.session/current-session.json +14 -0
  2. package/.aios-core/core/registry/registry-schema.json +166 -166
  3. package/.aios-core/core/registry/service-registry.json +6585 -6585
  4. package/.aios-core/data/entity-registry.yaml +208 -8
  5. package/.aios-core/data/registry-update-log.jsonl +165 -0
  6. package/.aios-core/development/scripts/approval-workflow.js +642 -642
  7. package/.aios-core/development/scripts/backup-manager.js +606 -606
  8. package/.aios-core/development/scripts/branch-manager.js +389 -389
  9. package/.aios-core/development/scripts/code-quality-improver.js +1311 -1311
  10. package/.aios-core/development/scripts/commit-message-generator.js +849 -849
  11. package/.aios-core/development/scripts/conflict-resolver.js +674 -674
  12. package/.aios-core/development/scripts/dependency-analyzer.js +637 -637
  13. package/.aios-core/development/scripts/diff-generator.js +351 -351
  14. package/.aios-core/development/scripts/elicitation-engine.js +384 -384
  15. package/.aios-core/development/scripts/elicitation-session-manager.js +299 -299
  16. package/.aios-core/development/scripts/git-wrapper.js +461 -461
  17. package/.aios-core/development/scripts/manifest-preview.js +244 -244
  18. package/.aios-core/development/scripts/metrics-tracker.js +775 -775
  19. package/.aios-core/development/scripts/modification-validator.js +554 -554
  20. package/.aios-core/development/scripts/pattern-learner.js +1224 -1224
  21. package/.aios-core/development/scripts/performance-analyzer.js +757 -757
  22. package/.aios-core/development/scripts/refactoring-suggester.js +1138 -1138
  23. package/.aios-core/development/scripts/rollback-handler.js +530 -530
  24. package/.aios-core/development/scripts/security-checker.js +358 -358
  25. package/.aios-core/development/scripts/template-engine.js +239 -239
  26. package/.aios-core/development/scripts/template-validator.js +278 -278
  27. package/.aios-core/development/scripts/test-generator.js +843 -843
  28. package/.aios-core/development/scripts/transaction-manager.js +589 -589
  29. package/.aios-core/development/scripts/usage-tracker.js +673 -673
  30. package/.aios-core/development/scripts/validate-filenames.js +226 -226
  31. package/.aios-core/development/scripts/version-tracker.js +526 -526
  32. package/.aios-core/development/scripts/yaml-validator.js +396 -396
  33. package/.aios-core/development/tasks/validate-next-story.md +99 -2
  34. package/.aios-core/development/templates/service-template/README.md.hbs +158 -158
  35. package/.aios-core/development/templates/service-template/__tests__/index.test.ts.hbs +237 -237
  36. package/.aios-core/development/templates/service-template/client.ts.hbs +403 -403
  37. package/.aios-core/development/templates/service-template/errors.ts.hbs +182 -182
  38. package/.aios-core/development/templates/service-template/index.ts.hbs +120 -120
  39. package/.aios-core/development/templates/service-template/package.json.hbs +87 -87
  40. package/.aios-core/development/templates/service-template/types.ts.hbs +145 -145
  41. package/.aios-core/development/templates/squad-template/LICENSE +21 -21
  42. package/.aios-core/docs/SHARD-TRANSLATION-GUIDE.md +335 -0
  43. package/.aios-core/docs/component-creation-guide.md +458 -0
  44. package/.aios-core/docs/session-update-pattern.md +307 -0
  45. package/.aios-core/docs/standards/AIOS-FRAMEWORK-MASTER.md +1963 -0
  46. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-SUMMARY.md +1190 -0
  47. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1.md +439 -0
  48. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO.md +5398 -0
  49. package/.aios-core/docs/standards/V3-ARCHITECTURAL-DECISIONS.md +523 -0
  50. package/.aios-core/docs/template-syntax.md +267 -0
  51. package/.aios-core/docs/troubleshooting-guide.md +625 -0
  52. package/.aios-core/infrastructure/templates/aios-sync.yaml.template +193 -193
  53. package/.aios-core/infrastructure/templates/coderabbit.yaml.template +279 -279
  54. package/.aios-core/infrastructure/templates/github-workflows/ci.yml.template +169 -169
  55. package/.aios-core/infrastructure/templates/github-workflows/pr-automation.yml.template +330 -330
  56. package/.aios-core/infrastructure/templates/github-workflows/release.yml.template +196 -196
  57. package/.aios-core/infrastructure/templates/gitignore/gitignore-aios-base.tmpl +63 -63
  58. package/.aios-core/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +18 -18
  59. package/.aios-core/infrastructure/templates/gitignore/gitignore-node.tmpl +85 -85
  60. package/.aios-core/infrastructure/templates/gitignore/gitignore-python.tmpl +145 -145
  61. package/.aios-core/infrastructure/tests/utilities-audit-results.json +501 -0
  62. package/.aios-core/install-manifest.yaml +101 -101
  63. package/.aios-core/local-config.yaml.template +70 -70
  64. package/.aios-core/manifests/agents.csv +29 -0
  65. package/.aios-core/manifests/schema/manifest-schema.json +190 -190
  66. package/.aios-core/manifests/tasks.csv +198 -0
  67. package/.aios-core/manifests/workers.csv +204 -0
  68. package/.aios-core/monitor/hooks/lib/__init__.py +1 -1
  69. package/.aios-core/monitor/hooks/lib/enrich.py +58 -58
  70. package/.aios-core/monitor/hooks/lib/send_event.py +47 -47
  71. package/.aios-core/monitor/hooks/notification.py +29 -29
  72. package/.aios-core/monitor/hooks/post_tool_use.py +45 -45
  73. package/.aios-core/monitor/hooks/pre_compact.py +29 -29
  74. package/.aios-core/monitor/hooks/pre_tool_use.py +40 -40
  75. package/.aios-core/monitor/hooks/stop.py +29 -29
  76. package/.aios-core/monitor/hooks/subagent_stop.py +29 -29
  77. package/.aios-core/monitor/hooks/user_prompt_submit.py +38 -38
  78. package/.aios-core/product/templates/adr.hbs +125 -125
  79. package/.aios-core/product/templates/component-react-tmpl.tsx +98 -98
  80. package/.aios-core/product/templates/dbdr.hbs +241 -241
  81. package/.aios-core/product/templates/engine/schemas/adr.schema.json +102 -102
  82. package/.aios-core/product/templates/engine/schemas/dbdr.schema.json +205 -205
  83. package/.aios-core/product/templates/engine/schemas/epic.schema.json +175 -175
  84. package/.aios-core/product/templates/engine/schemas/pmdr.schema.json +175 -175
  85. package/.aios-core/product/templates/engine/schemas/prd-v2.schema.json +300 -300
  86. package/.aios-core/product/templates/engine/schemas/prd.schema.json +152 -152
  87. package/.aios-core/product/templates/engine/schemas/story.schema.json +222 -222
  88. package/.aios-core/product/templates/engine/schemas/task.schema.json +154 -154
  89. package/.aios-core/product/templates/epic.hbs +212 -212
  90. package/.aios-core/product/templates/eslintrc-security.json +32 -32
  91. package/.aios-core/product/templates/github-actions-cd.yml +212 -212
  92. package/.aios-core/product/templates/github-actions-ci.yml +172 -172
  93. package/.aios-core/product/templates/pmdr.hbs +186 -186
  94. package/.aios-core/product/templates/prd-v2.0.hbs +216 -216
  95. package/.aios-core/product/templates/prd.hbs +201 -201
  96. package/.aios-core/product/templates/shock-report-tmpl.html +502 -502
  97. package/.aios-core/product/templates/story.hbs +263 -263
  98. package/.aios-core/product/templates/task.hbs +170 -170
  99. package/.aios-core/product/templates/tmpl-comment-on-examples.sql +158 -158
  100. package/.aios-core/product/templates/tmpl-migration-script.sql +91 -91
  101. package/.aios-core/product/templates/tmpl-rls-granular-policies.sql +104 -104
  102. package/.aios-core/product/templates/tmpl-rls-kiss-policy.sql +10 -10
  103. package/.aios-core/product/templates/tmpl-rls-roles.sql +135 -135
  104. package/.aios-core/product/templates/tmpl-rls-simple.sql +77 -77
  105. package/.aios-core/product/templates/tmpl-rls-tenant.sql +152 -152
  106. package/.aios-core/product/templates/tmpl-rollback-script.sql +77 -77
  107. package/.aios-core/product/templates/tmpl-seed-data.sql +140 -140
  108. package/.aios-core/product/templates/tmpl-smoke-test.sql +16 -16
  109. package/.aios-core/product/templates/tmpl-staging-copy-merge.sql +139 -139
  110. package/.aios-core/product/templates/tmpl-stored-proc.sql +140 -140
  111. package/.aios-core/product/templates/tmpl-trigger.sql +152 -152
  112. package/.aios-core/product/templates/tmpl-view-materialized.sql +133 -133
  113. package/.aios-core/product/templates/tmpl-view.sql +177 -177
  114. package/.aios-core/product/templates/token-exports-css-tmpl.css +240 -240
  115. package/.aios-core/quality/schemas/quality-metrics.schema.json +233 -233
  116. package/.aios-core/scripts/migrate-framework-docs.sh +300 -300
  117. package/.aios-core/scripts/pm.sh +0 -0
  118. package/.claude/hooks/enforce-architecture-first.py +196 -196
  119. package/.claude/hooks/mind-clone-governance.py +192 -192
  120. package/.claude/hooks/read-protection.py +151 -151
  121. package/.claude/hooks/slug-validation.py +176 -176
  122. package/.claude/hooks/sql-governance.py +182 -182
  123. package/.claude/hooks/write-path-validation.py +194 -194
  124. package/.claude/rules/agent-authority.md +105 -0
  125. package/.claude/rules/coderabbit-integration.md +93 -0
  126. package/.claude/rules/ids-principles.md +112 -0
  127. package/.claude/rules/story-lifecycle.md +139 -0
  128. package/.claude/rules/workflow-execution.md +150 -0
  129. package/LICENSE +48 -48
  130. package/bin/aios-minimal.js +0 -0
  131. package/bin/aios.js +0 -0
  132. package/package.json +1 -1
  133. package/packages/aios-install/bin/aios-install.js +0 -0
  134. package/packages/aios-install/bin/edmcp.js +0 -0
  135. package/packages/aios-pro-cli/bin/aios-pro.js +0 -0
  136. package/packages/installer/src/wizard/pro-setup.js +433 -49
  137. package/scripts/check-markdown-links.py +352 -352
  138. package/scripts/code-intel-health-check.js +343 -0
  139. package/scripts/dashboard-parallel-dev.sh +0 -0
  140. package/scripts/dashboard-parallel-phase3.sh +0 -0
  141. package/scripts/dashboard-parallel-phase4.sh +0 -0
  142. package/scripts/glue/README.md +355 -0
  143. package/scripts/glue/compose-agent-prompt.cjs +362 -0
  144. package/scripts/install-monitor-hooks.sh +0 -0
  145. package/.aios-core/lib/build.json +0 -1
@@ -0,0 +1,112 @@
1
+ # IDS Principles — Detailed Rules
2
+
3
+ > Status: Planned (IDS epic is Draft — principles apply as aspirational guidance)
4
+
5
+ ## Decision Hierarchy: REUSE > ADAPT > CREATE
6
+
7
+ ### REUSE (Relevance >= 90%)
8
+ - Use existing artifact directly without modification
9
+ - Import/reference existing entity
10
+ - No justification needed beyond confirming match
11
+
12
+ ### ADAPT (Relevance 60-89%)
13
+ - Adaptability score >= 0.6
14
+ - Changes MUST NOT exceed 30% of original artifact
15
+ - Changes MUST NOT break existing consumers (check usedBy list)
16
+ - Document changes in artifact's change log
17
+ - Update registry relationships
18
+ - Impact analysis required
19
+
20
+ ### CREATE (No suitable match)
21
+ Required justification:
22
+ - `evaluated_patterns`: Existing entities you considered
23
+ - `rejection_reasons`: Why each was rejected (technical reasons)
24
+ - `new_capability`: What unique capability this provides
25
+ - Register in Entity Registry within 24 hours
26
+ - Establish relationships with existing entities
27
+ - Define adaptability constraints for future reuse
28
+
29
+ ## Verification Gates G1-G6
30
+
31
+ ### G1: Epic Creation (@pm)
32
+ - **Type:** Human-in-loop, Advisory
33
+ - **Trigger:** `*create-epic` workflow
34
+ - **Action:** Query registry for related entities, display potentially reusable artifacts
35
+ - **Latency:** < 24h (async)
36
+ - **Blocking:** No
37
+
38
+ ### G2: Story Creation (@sm)
39
+ - **Type:** Human-in-loop, Advisory
40
+ - **Trigger:** `*draft` workflow
41
+ - **Action:** Check existing tasks/templates matching story work
42
+ - **Latency:** < 24h (async)
43
+ - **Blocking:** No
44
+
45
+ ### G3: Story Validation (@po)
46
+ - **Type:** Human-in-loop, Soft Block
47
+ - **Trigger:** `*validate-story-draft` workflow
48
+ - **Action:** Verify referenced artifacts exist, detect potential duplication
49
+ - **Latency:** < 4h (async)
50
+ - **Blocking:** Soft (can override with reason)
51
+
52
+ ### G4: Dev Context (@dev)
53
+ - **Type:** Automated, Informational
54
+ - **Trigger:** Story assignment / `*develop` start
55
+ - **Action:** Display matching patterns as reminder
56
+ - **Latency:** < 2s
57
+ - **Blocking:** NO (logged only for metrics)
58
+
59
+ ### G5: QA Review (@qa)
60
+ - **Type:** Automated, Blocks Merge
61
+ - **Trigger:** PR/merge request
62
+ - **Action:** Check if new artifacts could have reused existing
63
+ - **Latency:** < 30s
64
+ - **Blocking:** YES if new entity without registry entry or justification
65
+
66
+ ### G6: CI/CD (@devops)
67
+ - **Type:** Automated, Blocks Merge
68
+ - **Trigger:** CI pipeline
69
+ - **Action:** Registry integrity check + sync
70
+ - **Latency:** < 60s
71
+ - **Blocking:** YES on CRITICAL, WARN on MEDIUM/LOW
72
+
73
+ ## Override Policy
74
+
75
+ **Command:** `--override-ids --override-reason "explanation"`
76
+
77
+ **Permitted when:**
78
+ - Time-critical fix requires immediate creation
79
+ - Adaptation would introduce unacceptable risk
80
+ - Existing artifact is deprecated/frozen
81
+
82
+ **Requirements:**
83
+ - Logged for audit trail
84
+ - Reviewed within 7 days
85
+ - Include override reason in gate verification log
86
+
87
+ ## Graceful Degradation
88
+
89
+ All gates implement circuit breaker:
90
+ - **Timeout:** 2s default
91
+ - **On timeout:** warn-and-proceed
92
+ - **On error:** log-and-proceed
93
+ - **Key principle:** Development NEVER blocked by IDS failures
94
+
95
+ ```yaml
96
+ circuit_breaker:
97
+ failure_threshold: 5
98
+ success_threshold: 3
99
+ reset_timeout_ms: 60000
100
+ ```
101
+
102
+ ## Article IV-A: Incremental Development (Constitution Amendment)
103
+
104
+ **Severity:** MUST
105
+
106
+ **Four Core Rules:**
107
+ 1. **Registry Consultation Required** — Query before creating
108
+ 2. **Decision Hierarchy** — REUSE > ADAPT > CREATE strictly
109
+ 3. **Adaptation Limits** — Changes < 30%, don't break consumers
110
+ 4. **Creation Requirements** — Full justification, register within 24h
111
+
112
+ **Reference:** `docs/stories/epics/epic-ids-incremental-development/`
@@ -0,0 +1,139 @@
1
+ # Story Lifecycle — Detailed Rules
2
+
3
+ ## Status Progression
4
+
5
+ ```
6
+ Draft → Ready → InProgress → InReview → Done
7
+ ```
8
+
9
+ | Status | Trigger | Agent | Action |
10
+ |--------|---------|-------|--------|
11
+ | Draft | @sm creates story | @sm | Story file created |
12
+ | Ready | @po validates (GO) | @po | **MUST update status field in story file from Draft → Ready** |
13
+ | InProgress | @dev starts implementation | @dev | Update status field |
14
+ | InReview | @dev completes, @qa reviews | @qa | Update status field |
15
+ | Done | @qa PASS, @devops pushes | @devops | Update status field |
16
+
17
+ **CRITICAL:** The `Draft → Ready` transition is the responsibility of @po during `*validate-story-draft`. When verdict is GO (including conditional GO after fixes are applied), @po MUST update the story's Status field to `Ready` and log the transition in the Change Log. A story left in `Draft` after a GO verdict is a process violation.
18
+
19
+ ## Phase 1: Create (@sm)
20
+
21
+ **Task:** `create-next-story.md`
22
+ **Inputs:** PRD sharded, epic context
23
+ **Output:** `{epicNum}.{storyNum}.story.md`
24
+
25
+ ## Phase 2: Validate (@po)
26
+
27
+ **Task:** `validate-next-story.md`
28
+
29
+ ### 10-Point Validation Checklist
30
+
31
+ 1. Clear and objective title
32
+ 2. Complete description (problem/need explained)
33
+ 3. Testable acceptance criteria (Given/When/Then preferred)
34
+ 4. Well-defined scope (IN and OUT clearly listed)
35
+ 5. Dependencies mapped (prerequisite stories/resources)
36
+ 6. Complexity estimate (points or T-shirt sizing)
37
+ 7. Business value (benefit to user/business clear)
38
+ 8. Risks documented (potential problems identified)
39
+ 9. Criteria of Done (clear definition of complete)
40
+ 10. Alignment with PRD/Epic (consistency with source docs)
41
+
42
+ **Decision:** GO (≥7/10) or NO-GO (<7/10 with required fixes)
43
+
44
+ ## Phase 3: Implement (@dev)
45
+
46
+ **Task:** `dev-develop-story.md`
47
+
48
+ ### Execution Modes
49
+
50
+ **YOLO (autonomous):**
51
+ - 0-1 prompts
52
+ - Decisions logged in `decision-log-{story-id}.md`
53
+ - Best for: simple, deterministic tasks
54
+
55
+ **Interactive (default):**
56
+ - 5-10 prompts with educational checkpoints
57
+ - Confirmations at key decision points
58
+ - Best for: learning, complex decisions
59
+
60
+ **Pre-Flight (plan-first):**
61
+ - All questions upfront (10-15 prompts)
62
+ - Generates execution plan
63
+ - Then zero-ambiguity execution
64
+ - Best for: ambiguous requirements, critical work
65
+
66
+ ### CodeRabbit Self-Healing in Dev Phase
67
+
68
+ ```
69
+ iteration = 0
70
+ while CRITICAL issues found AND iteration < 2:
71
+ auto-fix CRITICAL/HIGH
72
+ iteration++
73
+ if CRITICAL persist after 2 iterations:
74
+ HALT — manual intervention required
75
+ ```
76
+
77
+ ## Phase 4: QA Gate (@qa)
78
+
79
+ **Task:** `qa-gate.md`
80
+
81
+ ### 7 Quality Checks
82
+
83
+ 1. **Code review** — patterns, readability, maintainability
84
+ 2. **Unit tests** — adequate coverage, all passing
85
+ 3. **Acceptance criteria** — all met per story AC
86
+ 4. **No regressions** — existing functionality preserved
87
+ 5. **Performance** — within acceptable limits
88
+ 6. **Security** — OWASP basics verified
89
+ 7. **Documentation** — updated if necessary
90
+
91
+ ### Gate Decisions
92
+
93
+ | Decision | Score | Action |
94
+ |----------|-------|--------|
95
+ | PASS | All checks OK | Approve, proceed to @devops push |
96
+ | CONCERNS | Minor issues | Approve with observations documented |
97
+ | FAIL | HIGH/CRITICAL issues | Return to @dev with feedback |
98
+ | WAIVED | Issues accepted | Approve with waiver documented (rare) |
99
+
100
+ ### Gate File Structure
101
+
102
+ ```yaml
103
+ storyId: STORY-42
104
+ verdict: PASS | CONCERNS | FAIL | WAIVED
105
+ issues:
106
+ - severity: low | medium | high
107
+ category: code | tests | requirements | performance | security | docs
108
+ description: "..."
109
+ recommendation: "..."
110
+ ```
111
+
112
+ ## QA Loop (Iterative Review-Fix)
113
+
114
+ ```
115
+ @qa review → verdict → @dev fixes → re-review (max 5 iterations)
116
+ ```
117
+
118
+ **Commands:**
119
+ - `*qa-loop {storyId}` — Start full loop
120
+ - `*stop-qa-loop` — Pause and save state
121
+ - `*resume-qa-loop` — Resume from saved state
122
+ - `*escalate-qa-loop` — Force manual escalation
123
+
124
+ **Escalation triggers:**
125
+ - max_iterations_reached (default: 5)
126
+ - verdict_blocked
127
+ - fix_failure (after retries)
128
+ - manual_escalate (user command)
129
+
130
+ **Status:** Tracked in `qa/loop-status.json`
131
+
132
+ ## Story File Update Rules
133
+
134
+ | Section | Who Can Edit |
135
+ |---------|-------------|
136
+ | Title, Description, AC, Scope | @po only |
137
+ | File List, Dev Notes, checkboxes | @dev |
138
+ | QA Results | @qa only |
139
+ | Change Log | Any agent (append only) |
@@ -0,0 +1,150 @@
1
+ # Workflow Execution — Detailed Rules
2
+
3
+ ## Task-First Principle
4
+
5
+ **Workflows são compostos por tasks conectadas, não por agentes conectados.** Cada task define seus inputs, outputs, pre/post-conditions e execution modes. Os agentes listados abaixo são os **executores padrão** de cada task — mas a sequência, as regras e as dependências vêm das definições de tasks em `.aios-core/development/tasks/`.
6
+
7
+ Uma task validada é lei: deve ser executada conforme configurada, com todas as suas dependências respeitadas, independente de quem a executa (agent, worker, clone ou humano).
8
+
9
+ ---
10
+
11
+ ## 4 Primary Workflows
12
+
13
+ ### 1. Story Development Cycle (SDC) — PRIMARY
14
+
15
+ **Full 4-phase workflow for all development work.**
16
+
17
+ #### Phase 1: Create (@sm)
18
+ - **Task:** `create-next-story.md`
19
+ - **Inputs:** PRD sharded, epic context
20
+ - **Output:** `{epicNum}.{storyNum}.story.md`
21
+ - **Status:** Draft
22
+
23
+ #### Phase 2: Validate (@po)
24
+ - **Task:** `validate-next-story.md`
25
+ - **10-point checklist** (see `story-lifecycle.md`)
26
+ - **Decision:** GO (>=7) or NO-GO (required fixes listed)
27
+
28
+ #### Phase 3: Implement (@dev)
29
+ - **Task:** `dev-develop-story.md`
30
+ - **Modes:** Interactive / YOLO / Pre-Flight
31
+ - **CodeRabbit:** Self-healing max 2 iterations
32
+ - **Status:** Ready → InProgress
33
+
34
+ #### Phase 4: QA Gate (@qa)
35
+ - **Task:** `qa-gate.md`
36
+ - **7 quality checks** (see `story-lifecycle.md`)
37
+ - **Decision:** PASS / CONCERNS / FAIL / WAIVED
38
+ - **Status:** InProgress → InReview → Done
39
+
40
+ ---
41
+
42
+ ### 2. QA Loop — ITERATIVE REVIEW
43
+
44
+ **Automated review-fix cycle after initial QA gate.**
45
+
46
+ ```
47
+ @qa review → verdict → @dev fixes → re-review (max 5)
48
+ ```
49
+
50
+ **Commands:**
51
+ - `*qa-loop {storyId}` — Start loop
52
+ - `*qa-loop-review` — Resume from review
53
+ - `*qa-loop-fix` — Resume from fix
54
+ - `*stop-qa-loop` — Pause, save state
55
+ - `*resume-qa-loop` — Resume from state
56
+ - `*escalate-qa-loop` — Force escalation
57
+
58
+ **Config:**
59
+ - Max iterations: 5 (`autoClaude.qaLoop.maxIterations`)
60
+ - Status file: `qa/loop-status.json`
61
+
62
+ **Verdicts:**
63
+ - APPROVE → Complete, mark Done
64
+ - REJECT → @dev fixes, re-review
65
+ - BLOCKED → Escalate immediately
66
+
67
+ **Escalation triggers:**
68
+ - `max_iterations_reached`
69
+ - `verdict_blocked`
70
+ - `fix_failure`
71
+ - `manual_escalate`
72
+
73
+ ---
74
+
75
+ ### 3. Spec Pipeline — PRE-IMPLEMENTATION
76
+
77
+ **Transform informal requirements into executable spec.**
78
+
79
+ | Phase | Agent | Output | Skip If |
80
+ |-------|-------|--------|---------|
81
+ | 1. Gather | @pm | `requirements.json` | Never |
82
+ | 2. Assess | @architect | `complexity.json` | source=simple |
83
+ | 3. Research | @analyst | `research.json` | SIMPLE class |
84
+ | 4. Write Spec | @pm | `spec.md` | Never |
85
+ | 5. Critique | @qa | `critique.json` | Never |
86
+ | 6. Plan | @architect | `implementation.yaml` | If APPROVED |
87
+
88
+ **Complexity Classes:**
89
+
90
+ | Score | Class | Phases |
91
+ |-------|-------|--------|
92
+ | <= 8 | SIMPLE | gather → spec → critique (3) |
93
+ | 9-15 | STANDARD | All 6 phases |
94
+ | >= 16 | COMPLEX | 6 phases + revision cycle |
95
+
96
+ **5 Complexity Dimensions (scored 1-5):**
97
+ - **Scope:** Files affected
98
+ - **Integration:** External APIs
99
+ - **Infrastructure:** Changes needed
100
+ - **Knowledge:** Team familiarity
101
+ - **Risk:** Criticality level
102
+
103
+ **Critique Verdicts:**
104
+
105
+ | Verdict | Average Score | Next Step |
106
+ |---------|--------------|-----------|
107
+ | APPROVED | >= 4.0 | Plan (Phase 6) |
108
+ | NEEDS_REVISION | 3.0-3.9 | Revise (Phase 5b) |
109
+ | BLOCKED | < 3.0 | Escalate to @architect |
110
+
111
+ **Constitutional Gate (Article IV — No Invention):**
112
+ Every statement in spec.md MUST trace to FR-*, NFR-*, CON-*, or research finding. NO invented features.
113
+
114
+ ---
115
+
116
+ ### 4. Brownfield Discovery — LEGACY ASSESSMENT
117
+
118
+ **10-phase technical debt assessment for existing codebases.**
119
+
120
+ **Data Collection (Phases 1-3):**
121
+ - Phase 1: @architect → `system-architecture.md`
122
+ - Phase 2: @data-engineer → `SCHEMA.md` + `DB-AUDIT.md` (if DB exists)
123
+ - Phase 3: @ux-design-expert → `frontend-spec.md`
124
+
125
+ **Draft & Validation (Phases 4-7):**
126
+ - Phase 4: @architect → `technical-debt-DRAFT.md`
127
+ - Phase 5: @data-engineer → `db-specialist-review.md`
128
+ - Phase 6: @ux-design-expert → `ux-specialist-review.md`
129
+ - Phase 7: @qa → `qa-review.md` (QA Gate: APPROVED | NEEDS WORK)
130
+
131
+ **Finalization (Phases 8-10):**
132
+ - Phase 8: @architect → `technical-debt-assessment.md` (final)
133
+ - Phase 9: @analyst → `TECHNICAL-DEBT-REPORT.md` (executive)
134
+ - Phase 10: @pm → Epic + stories ready for development
135
+
136
+ **QA Gate (Phase 7):**
137
+ - **APPROVED:** All debits validated, no critical gaps, dependencies mapped
138
+ - **NEEDS WORK:** Gaps not addressed, return to Phase 4
139
+
140
+ ---
141
+
142
+ ## Workflow Selection Guide
143
+
144
+ | Situation | Workflow |
145
+ |-----------|---------|
146
+ | New story from epic | Story Development Cycle |
147
+ | QA found issues, need iteration | QA Loop |
148
+ | Complex feature needs spec | Spec Pipeline → then SDC |
149
+ | Joining existing project | Brownfield Discovery |
150
+ | Simple bug fix | SDC only (YOLO mode) |
package/LICENSE CHANGED
@@ -1,48 +1,48 @@
1
- Commons Clause License Condition v1.0
2
-
3
- The Software is provided to you by the Licensor under the License,
4
- as defined below, subject to the following condition.
5
-
6
- Without limiting other conditions in the License, the grant of rights
7
- under the License will not include, and the License does not grant to
8
- you, the right to Sell the Software.
9
-
10
- For purposes of the foregoing, "Sell" means practicing any or all of
11
- the rights granted to you under the License to provide to third parties,
12
- for a fee or other consideration (including without limitation fees for
13
- hosting or consulting/support services related to the Software), a
14
- product or service whose value derives, entirely or substantially, from
15
- the functionality of the Software.
16
-
17
- Any license notice or attribution required by the License must also
18
- include this Commons Clause License Condition notice.
19
-
20
- ---
21
-
22
- MIT License
23
-
24
- Copyright (c) 2025 SynkraAI Inc. - AIOS Framework
25
-
26
- Permission is hereby granted, free of charge, to any person obtaining a copy
27
- of this software and associated documentation files (the "Software"), to deal
28
- in the Software without restriction, including without limitation the rights
29
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30
- copies of the Software, and to permit persons to whom the Software is
31
- furnished to do so, subject to the following conditions:
32
-
33
- The above copyright notice and this permission notice shall be included in all
34
- copies or substantial portions of the Software.
35
-
36
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
42
- SOFTWARE.
43
-
44
- ---
45
-
46
- Software: Synkra AIOS (AI-Orchestrated System for Full Stack Development)
47
- License: MIT
48
- Licensor: SynkraAI Inc.
1
+ Commons Clause License Condition v1.0
2
+
3
+ The Software is provided to you by the Licensor under the License,
4
+ as defined below, subject to the following condition.
5
+
6
+ Without limiting other conditions in the License, the grant of rights
7
+ under the License will not include, and the License does not grant to
8
+ you, the right to Sell the Software.
9
+
10
+ For purposes of the foregoing, "Sell" means practicing any or all of
11
+ the rights granted to you under the License to provide to third parties,
12
+ for a fee or other consideration (including without limitation fees for
13
+ hosting or consulting/support services related to the Software), a
14
+ product or service whose value derives, entirely or substantially, from
15
+ the functionality of the Software.
16
+
17
+ Any license notice or attribution required by the License must also
18
+ include this Commons Clause License Condition notice.
19
+
20
+ ---
21
+
22
+ MIT License
23
+
24
+ Copyright (c) 2025 SynkraAI Inc. - AIOS Framework
25
+
26
+ Permission is hereby granted, free of charge, to any person obtaining a copy
27
+ of this software and associated documentation files (the "Software"), to deal
28
+ in the Software without restriction, including without limitation the rights
29
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30
+ copies of the Software, and to permit persons to whom the Software is
31
+ furnished to do so, subject to the following conditions:
32
+
33
+ The above copyright notice and this permission notice shall be included in all
34
+ copies or substantial portions of the Software.
35
+
36
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
42
+ SOFTWARE.
43
+
44
+ ---
45
+
46
+ Software: Synkra AIOS (AI-Orchestrated System for Full Stack Development)
47
+ License: MIT
48
+ Licensor: SynkraAI Inc.
File without changes
package/bin/aios.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aios-core",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "Synkra AIOS: AI-Orchestrated System for Full Stack Development - Core Framework",
5
5
  "bin": {
6
6
  "aios": "bin/aios.js",
File without changes
File without changes
File without changes