aios-core 4.2.5 → 4.2.7
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.
- package/.aios-core/core/code-intel/code-intel-client.js +280 -0
- package/.aios-core/core/code-intel/code-intel-enricher.js +159 -0
- package/.aios-core/core/code-intel/index.js +137 -0
- package/.aios-core/core/code-intel/providers/code-graph-provider.js +201 -0
- package/.aios-core/core/code-intel/providers/provider-interface.js +108 -0
- package/.aios-core/core/orchestration/context-manager.js +333 -5
- package/.aios-core/core/orchestration/dashboard-integration.js +17 -1
- package/.aios-core/core/orchestration/execution-profile-resolver.js +107 -0
- package/.aios-core/core/orchestration/index.js +3 -0
- package/.aios-core/core/orchestration/skill-dispatcher.js +2 -0
- package/.aios-core/core/orchestration/subagent-prompt-builder.js +2 -0
- package/.aios-core/core/orchestration/workflow-orchestrator.js +113 -5
- package/.aios-core/data/entity-registry.yaml +44 -22
- package/.aios-core/development/agents/ux-design-expert.md +1 -1
- package/.aios-core/development/checklists/brownfield-compatibility-checklist.md +114 -0
- package/.aios-core/development/scripts/workflow-state-manager.js +128 -1
- package/.aios-core/development/tasks/next.md +36 -5
- package/.aios-core/hooks/ids-post-commit.js +29 -1
- package/.aios-core/hooks/ids-pre-push.js +29 -1
- package/.aios-core/infrastructure/contracts/compatibility/aios-4.0.4.yaml +44 -0
- package/.aios-core/infrastructure/scripts/validate-parity.js +238 -2
- package/.aios-core/install-manifest.yaml +63 -27
- package/.aios-core/product/templates/brownfield-risk-report-tmpl.yaml +277 -0
- package/.aios-core/workflow-intelligence/engine/suggestion-engine.js +114 -5
- package/LICENSE +13 -1
- package/README.md +39 -9
- package/package.json +8 -6
- package/packages/installer/src/wizard/ide-config-generator.js +0 -117
- package/packages/installer/src/wizard/index.js +2 -118
- package/packages/installer/src/wizard/pro-setup.js +58 -12
- package/pro/license/license-api.js +9 -9
- package/scripts/semantic-lint.js +190 -0
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
# - SHA256 hashes for change detection
|
|
8
8
|
# - File types for categorization
|
|
9
9
|
#
|
|
10
|
-
version: 4.2.
|
|
11
|
-
generated_at: "2026-02-
|
|
10
|
+
version: 4.2.7
|
|
11
|
+
generated_at: "2026-02-16T14:10:16.018Z"
|
|
12
12
|
generator: scripts/generate-install-manifest.js
|
|
13
|
-
file_count:
|
|
13
|
+
file_count: 1004
|
|
14
14
|
files:
|
|
15
15
|
- path: cli/commands/config/index.js
|
|
16
16
|
hash: sha256:ebcad2ce3807eda29dcddff76d7a95ddc9b7fa160df21fd608f94b802237e862
|
|
@@ -180,6 +180,26 @@ files:
|
|
|
180
180
|
hash: sha256:c1266389772b3fcf3e4c91df085bd38dc0b01d0a5f98bdf977d134972ccaf49b
|
|
181
181
|
type: config
|
|
182
182
|
size: 9392
|
|
183
|
+
- path: core/code-intel/code-intel-client.js
|
|
184
|
+
hash: sha256:bd88497c8c8f312e95f746121e627c088e93d27af093d411f0521712bd17ba94
|
|
185
|
+
type: core
|
|
186
|
+
size: 7541
|
|
187
|
+
- path: core/code-intel/code-intel-enricher.js
|
|
188
|
+
hash: sha256:0bea0c1953a21621afbb4c9755e782842940cf54cdc88a4318dd7242f1fb02a8
|
|
189
|
+
type: core
|
|
190
|
+
size: 4320
|
|
191
|
+
- path: core/code-intel/index.js
|
|
192
|
+
hash: sha256:ca8c54c2decbf64183d890ab42dc8ca2deafa675d4433492cb6ce423a284ad4d
|
|
193
|
+
type: core
|
|
194
|
+
size: 3802
|
|
195
|
+
- path: core/code-intel/providers/code-graph-provider.js
|
|
196
|
+
hash: sha256:0c5ffd7b3faf82453ed1cb77f52ef10a3e67d3a1b2e2df5aac89a4fb2ac6583b
|
|
197
|
+
type: core
|
|
198
|
+
size: 6335
|
|
199
|
+
- path: core/code-intel/providers/provider-interface.js
|
|
200
|
+
hash: sha256:7d16aa715155e9c077720a6bffc7e9e5411b65f821b6b4e5e909f226796e7acb
|
|
201
|
+
type: core
|
|
202
|
+
size: 3079
|
|
183
203
|
- path: core/config/config-cache.js
|
|
184
204
|
hash: sha256:527a788cbe650aa6b13d1101ebc16419489bfef20b2ee93042f6eb6a51e898e9
|
|
185
205
|
type: core
|
|
@@ -641,13 +661,13 @@ files:
|
|
|
641
661
|
type: core
|
|
642
662
|
size: 10845
|
|
643
663
|
- path: core/orchestration/context-manager.js
|
|
644
|
-
hash: sha256:
|
|
664
|
+
hash: sha256:0dd03e84d0a2ea06165825c5eb7154531337ef98275918119ccd03769af576c3
|
|
645
665
|
type: core
|
|
646
|
-
size:
|
|
666
|
+
size: 16842
|
|
647
667
|
- path: core/orchestration/dashboard-integration.js
|
|
648
|
-
hash: sha256:
|
|
668
|
+
hash: sha256:fc96589a18302ac91036a52a8f4da2f9a1ba8e3f9dc45a4bacb8a279fc6db39d
|
|
649
669
|
type: core
|
|
650
|
-
size:
|
|
670
|
+
size: 15116
|
|
651
671
|
- path: core/orchestration/data-lifecycle-manager.js
|
|
652
672
|
hash: sha256:0d5df61805502204c0a467ae9900c940f869743ee332fa19839c9f9cacfe824d
|
|
653
673
|
type: core
|
|
@@ -656,6 +676,10 @@ files:
|
|
|
656
676
|
hash: sha256:4f342f7fc05f404de2b899358f86143106737b56d6c486c98e988a67d420078b
|
|
657
677
|
type: core
|
|
658
678
|
size: 12310
|
|
679
|
+
- path: core/orchestration/execution-profile-resolver.js
|
|
680
|
+
hash: sha256:bb35f1c16c47c9306128c5f3e6c90df3ed91f9358576ea97a59007b74f5e9927
|
|
681
|
+
type: core
|
|
682
|
+
size: 2696
|
|
659
683
|
- path: core/orchestration/executor-assignment.js
|
|
660
684
|
hash: sha256:d022d8bc01432958857894bc424e48e42d21287f44fe2e0cacfbdf03b412d33f
|
|
661
685
|
type: core
|
|
@@ -697,9 +721,9 @@ files:
|
|
|
697
721
|
type: core
|
|
698
722
|
size: 35270
|
|
699
723
|
- path: core/orchestration/index.js
|
|
700
|
-
hash: sha256:
|
|
724
|
+
hash: sha256:1d1b5471585647512327e7d5836ad826442b4c9bd588f82729fa455b41fa28b9
|
|
701
725
|
type: core
|
|
702
|
-
size:
|
|
726
|
+
size: 8835
|
|
703
727
|
- path: core/orchestration/lock-manager.js
|
|
704
728
|
hash: sha256:7764b9e79444e75577931a561444f1bf950d893004abc39fa8c2476f632bb481
|
|
705
729
|
type: core
|
|
@@ -725,13 +749,13 @@ files:
|
|
|
725
749
|
type: core
|
|
726
750
|
size: 24732
|
|
727
751
|
- path: core/orchestration/skill-dispatcher.js
|
|
728
|
-
hash: sha256:
|
|
752
|
+
hash: sha256:4a54fec3a3338431d1d9634ebf06f3983d06903570c45d67d0ac15d25c95eb05
|
|
729
753
|
type: core
|
|
730
|
-
size:
|
|
754
|
+
size: 10490
|
|
731
755
|
- path: core/orchestration/subagent-prompt-builder.js
|
|
732
|
-
hash: sha256:
|
|
756
|
+
hash: sha256:967cc17e019ae030148b276b6fdc6a698ae5f42a05f20e80484cb87ea81ed7af
|
|
733
757
|
type: core
|
|
734
|
-
size:
|
|
758
|
+
size: 11395
|
|
735
759
|
- path: core/orchestration/surface-checker.js
|
|
736
760
|
hash: sha256:92e9d5bea78c3db4940c39f79e537821b36451cd524d69e6b738272aa63c08b6
|
|
737
761
|
type: core
|
|
@@ -753,9 +777,9 @@ files:
|
|
|
753
777
|
type: core
|
|
754
778
|
size: 36350
|
|
755
779
|
- path: core/orchestration/workflow-orchestrator.js
|
|
756
|
-
hash: sha256:
|
|
780
|
+
hash: sha256:5d3f14d5f12742ce87c3ae8745f82f4ac9f3df3d1889cf16bfc13743130963f9
|
|
757
781
|
type: core
|
|
758
|
-
size:
|
|
782
|
+
size: 30727
|
|
759
783
|
- path: core/permissions/__tests__/permission-mode.test.js
|
|
760
784
|
hash: sha256:87df5f29666a599fb0fec917e0360ae6fa9dd90512f0816ae62fa453dbab7fbb
|
|
761
785
|
type: core
|
|
@@ -1013,9 +1037,9 @@ files:
|
|
|
1013
1037
|
type: data
|
|
1014
1038
|
size: 34251
|
|
1015
1039
|
- path: data/entity-registry.yaml
|
|
1016
|
-
hash: sha256:
|
|
1040
|
+
hash: sha256:7b9bb3a5354107f9ec29105b5948d5c538e2a3b19d49fa42e2e785e4a767c38b
|
|
1017
1041
|
type: data
|
|
1018
|
-
size:
|
|
1042
|
+
size: 289966
|
|
1019
1043
|
- path: data/learned-patterns.yaml
|
|
1020
1044
|
hash: sha256:24ac0b160615583a0ff783d3da8af80b7f94191575d6db2054ec8e10a3f945dc
|
|
1021
1045
|
type: data
|
|
@@ -1105,13 +1129,17 @@ files:
|
|
|
1105
1129
|
type: agent
|
|
1106
1130
|
size: 12076
|
|
1107
1131
|
- path: development/agents/ux-design-expert.md
|
|
1108
|
-
hash: sha256:
|
|
1132
|
+
hash: sha256:ae3f98570fa6cbd714ecd0aa2f44c7db005f0469b5bd04191d8da3b133bc65f1
|
|
1109
1133
|
type: agent
|
|
1110
|
-
size:
|
|
1134
|
+
size: 18377
|
|
1111
1135
|
- path: development/checklists/agent-quality-gate.md
|
|
1112
1136
|
hash: sha256:04d1bf12dd4b0b3d10de04c1825efab742e6475087d3ac9d5c86ca7ff8ec9057
|
|
1113
1137
|
type: checklist
|
|
1114
1138
|
size: 16148
|
|
1139
|
+
- path: development/checklists/brownfield-compatibility-checklist.md
|
|
1140
|
+
hash: sha256:d07b1f9e2fcb78f62188ef05a6e6f75a94821b6bb297ea67f2e782e260d27f49
|
|
1141
|
+
type: checklist
|
|
1142
|
+
size: 3335
|
|
1115
1143
|
- path: development/checklists/self-critique-checklist.md
|
|
1116
1144
|
hash: sha256:869fbc8fbc333ac8eea4eca3ea4ab9ca79917fa5e53735b70d634c85ac6420c8
|
|
1117
1145
|
type: checklist
|
|
@@ -1397,9 +1425,9 @@ files:
|
|
|
1397
1425
|
type: script
|
|
1398
1426
|
size: 9847
|
|
1399
1427
|
- path: development/scripts/workflow-state-manager.js
|
|
1400
|
-
hash: sha256:
|
|
1428
|
+
hash: sha256:f3573ec1ebd022d31422bf8dcd48df5891f698ab5a9489031bd56e0893087109
|
|
1401
1429
|
type: script
|
|
1402
|
-
size:
|
|
1430
|
+
size: 20129
|
|
1403
1431
|
- path: development/scripts/workflow-validator.js
|
|
1404
1432
|
hash: sha256:cb1c698f39984f128918e8a3a4e5aed254ca445c57b9f99fa183ef14abc0f0dc
|
|
1405
1433
|
type: script
|
|
@@ -1849,9 +1877,9 @@ files:
|
|
|
1849
1877
|
type: task
|
|
1850
1878
|
size: 13356
|
|
1851
1879
|
- path: development/tasks/next.md
|
|
1852
|
-
hash: sha256:
|
|
1880
|
+
hash: sha256:d9c84f8892367cd8e1bd453dd08876d051bcc368ca9eacf5d2babb26235427fb
|
|
1853
1881
|
type: task
|
|
1854
|
-
size:
|
|
1882
|
+
size: 7641
|
|
1855
1883
|
- path: development/tasks/orchestrate-resume.md
|
|
1856
1884
|
hash: sha256:5da88a904fc9e77d7428344fb83e55f6f4a3cae4f9d21d77092d1c67664c3d86
|
|
1857
1885
|
type: task
|
|
@@ -2452,6 +2480,10 @@ files:
|
|
|
2452
2480
|
hash: sha256:e46e4b86e48e22a6f0b7ccb91e7e901bfc779479d4ebc7e776fca6dd4de5b30b
|
|
2453
2481
|
type: code
|
|
2454
2482
|
size: 753
|
|
2483
|
+
- path: infrastructure/contracts/compatibility/aios-4.0.4.yaml
|
|
2484
|
+
hash: sha256:e8bea648df5d62a22a979b9d70e3987690db4e19a1ed3beec11d232746297136
|
|
2485
|
+
type: infrastructure
|
|
2486
|
+
size: 1074
|
|
2455
2487
|
- path: infrastructure/index.js
|
|
2456
2488
|
hash: sha256:8e05caec57188938d6f348444ad3abce2c06b53bdb46993fb2e8ff81c27fca4c
|
|
2457
2489
|
type: infrastructure
|
|
@@ -2969,9 +3001,9 @@ files:
|
|
|
2969
3001
|
type: script
|
|
2970
3002
|
size: 6692
|
|
2971
3003
|
- path: infrastructure/scripts/validate-parity.js
|
|
2972
|
-
hash: sha256:
|
|
3004
|
+
hash: sha256:527948d4a35a85c2f558b261f4b0a921d0482cab979e7dffe988b6fa11b7b2a1
|
|
2973
3005
|
type: script
|
|
2974
|
-
size:
|
|
3006
|
+
size: 12683
|
|
2975
3007
|
- path: infrastructure/scripts/validate-paths.js
|
|
2976
3008
|
hash: sha256:4360d0735ec2c717a97c1670855c5423cf5172005a93c4698b5305ccec48bc2e
|
|
2977
3009
|
type: script
|
|
@@ -3344,6 +3376,10 @@ files:
|
|
|
3344
3376
|
hash: sha256:bc1852d15e3a383c7519e5976094de3055c494fdd467acd83137700c900c4c61
|
|
3345
3377
|
type: template
|
|
3346
3378
|
size: 14755
|
|
3379
|
+
- path: product/templates/brownfield-risk-report-tmpl.yaml
|
|
3380
|
+
hash: sha256:173adec3131f0924bc7d64c10f54386bb85dcadc14e6ff3fb9bb2f8172caf162
|
|
3381
|
+
type: template
|
|
3382
|
+
size: 12211
|
|
3347
3383
|
- path: product/templates/changelog-template.md
|
|
3348
3384
|
hash: sha256:af44d857c9bf8808e89419d1d859557c3c827de143be3c0f36f2a053c9ee9197
|
|
3349
3385
|
type: template
|
|
@@ -3941,9 +3977,9 @@ files:
|
|
|
3941
3977
|
type: workflow-intelligence
|
|
3942
3978
|
size: 8436
|
|
3943
3979
|
- path: workflow-intelligence/engine/suggestion-engine.js
|
|
3944
|
-
hash: sha256:
|
|
3980
|
+
hash: sha256:7e07146e644edc39c5337bfc2f5eee621c39446be40cf303cdf418de97111796
|
|
3945
3981
|
type: workflow-intelligence
|
|
3946
|
-
size:
|
|
3982
|
+
size: 23441
|
|
3947
3983
|
- path: workflow-intelligence/engine/wave-analyzer.js
|
|
3948
3984
|
hash: sha256:0d017b70213584a11cad354d54d442be977b183353e6a5e31cc1de4291d0afb9
|
|
3949
3985
|
type: workflow-intelligence
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
# Brownfield Risk Report Template
|
|
2
|
+
# Story AIOS-DIFF-4.3.2: Template de relatório de risco por fase
|
|
3
|
+
|
|
4
|
+
template:
|
|
5
|
+
id: brownfield-risk-report
|
|
6
|
+
name: Brownfield Migration Risk Report
|
|
7
|
+
version: "1.0"
|
|
8
|
+
type: product
|
|
9
|
+
description: >
|
|
10
|
+
Template for generating risk assessment reports during brownfield
|
|
11
|
+
migration phases. Used by @analyst to create executive-level reports.
|
|
12
|
+
|
|
13
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
14
|
+
# REPORT STRUCTURE
|
|
15
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
16
|
+
|
|
17
|
+
sections:
|
|
18
|
+
|
|
19
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
20
|
+
# EXECUTIVE SUMMARY
|
|
21
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
22
|
+
|
|
23
|
+
executive_summary:
|
|
24
|
+
title: "Executive Summary"
|
|
25
|
+
content: |
|
|
26
|
+
## 📊 Risk Assessment Summary
|
|
27
|
+
|
|
28
|
+
**Project:** {{project_name}}
|
|
29
|
+
**Phase:** {{current_phase}}
|
|
30
|
+
**Date:** {{report_date}}
|
|
31
|
+
**Assessor:** @analyst
|
|
32
|
+
|
|
33
|
+
### Overall Risk Level: {{overall_risk_level}}
|
|
34
|
+
|
|
35
|
+
| Metric | Value |
|
|
36
|
+
|--------|-------|
|
|
37
|
+
| Critical Risks | {{critical_count}} |
|
|
38
|
+
| High Risks | {{high_count}} |
|
|
39
|
+
| Medium Risks | {{medium_count}} |
|
|
40
|
+
| Low Risks | {{low_count}} |
|
|
41
|
+
| Mitigated | {{mitigated_count}} |
|
|
42
|
+
|
|
43
|
+
### Key Findings
|
|
44
|
+
{{key_findings}}
|
|
45
|
+
|
|
46
|
+
### Recommended Action
|
|
47
|
+
{{recommended_action}}
|
|
48
|
+
|
|
49
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
50
|
+
# PHASE-SPECIFIC RISKS
|
|
51
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
52
|
+
|
|
53
|
+
phase_risks:
|
|
54
|
+
title: "Phase-Specific Risk Analysis"
|
|
55
|
+
phases:
|
|
56
|
+
|
|
57
|
+
discovery:
|
|
58
|
+
name: "Discovery Phase"
|
|
59
|
+
description: "Initial codebase analysis and documentation"
|
|
60
|
+
typical_risks:
|
|
61
|
+
- id: DISC-001
|
|
62
|
+
name: "Incomplete Documentation"
|
|
63
|
+
description: "Existing system poorly documented, discovery may miss critical components"
|
|
64
|
+
probability: medium
|
|
65
|
+
impact: high
|
|
66
|
+
mitigation: "Cross-reference with running system, interview stakeholders"
|
|
67
|
+
- id: DISC-002
|
|
68
|
+
name: "Hidden Dependencies"
|
|
69
|
+
description: "Undocumented external services or databases"
|
|
70
|
+
probability: medium
|
|
71
|
+
impact: critical
|
|
72
|
+
mitigation: "Network traffic analysis, env var audit"
|
|
73
|
+
- id: DISC-003
|
|
74
|
+
name: "Time Underestimation"
|
|
75
|
+
description: "Discovery takes longer than 4-8h estimate"
|
|
76
|
+
probability: low
|
|
77
|
+
impact: medium
|
|
78
|
+
mitigation: "Checkpoint after each sub-phase, adjust timeline"
|
|
79
|
+
|
|
80
|
+
planning:
|
|
81
|
+
name: "Planning Phase"
|
|
82
|
+
description: "PRD and architecture design"
|
|
83
|
+
typical_risks:
|
|
84
|
+
- id: PLAN-001
|
|
85
|
+
name: "Scope Creep"
|
|
86
|
+
description: "Technical debt resolution expands beyond initial estimate"
|
|
87
|
+
probability: high
|
|
88
|
+
impact: medium
|
|
89
|
+
mitigation: "Fixed scope per phase, explicit out-of-scope list"
|
|
90
|
+
- id: PLAN-002
|
|
91
|
+
name: "Architecture Mismatch"
|
|
92
|
+
description: "Proposed architecture conflicts with existing constraints"
|
|
93
|
+
probability: medium
|
|
94
|
+
impact: high
|
|
95
|
+
mitigation: "Validate with existing code, incremental changes only"
|
|
96
|
+
- id: PLAN-003
|
|
97
|
+
name: "Stakeholder Misalignment"
|
|
98
|
+
description: "Business priorities differ from technical recommendations"
|
|
99
|
+
probability: medium
|
|
100
|
+
impact: high
|
|
101
|
+
mitigation: "Executive report before implementation, explicit tradeoffs"
|
|
102
|
+
|
|
103
|
+
migration:
|
|
104
|
+
name: "Migration Phase"
|
|
105
|
+
description: "Implementation of changes"
|
|
106
|
+
typical_risks:
|
|
107
|
+
- id: MIG-001
|
|
108
|
+
name: "Breaking Changes"
|
|
109
|
+
description: "New code breaks existing functionality"
|
|
110
|
+
probability: medium
|
|
111
|
+
impact: critical
|
|
112
|
+
mitigation: "Feature flags, comprehensive test coverage before changes"
|
|
113
|
+
- id: MIG-002
|
|
114
|
+
name: "Data Loss"
|
|
115
|
+
description: "Database migration causes data corruption or loss"
|
|
116
|
+
probability: low
|
|
117
|
+
impact: critical
|
|
118
|
+
mitigation: "Backup before migration, dry-run on staging, rollback script ready"
|
|
119
|
+
- id: MIG-003
|
|
120
|
+
name: "Downtime"
|
|
121
|
+
description: "Migration requires extended system downtime"
|
|
122
|
+
probability: medium
|
|
123
|
+
impact: high
|
|
124
|
+
mitigation: "Zero-downtime migration strategy, maintenance window planning"
|
|
125
|
+
|
|
126
|
+
rollout:
|
|
127
|
+
name: "Rollout Phase"
|
|
128
|
+
description: "Progressive deployment"
|
|
129
|
+
typical_risks:
|
|
130
|
+
- id: ROLL-001
|
|
131
|
+
name: "Performance Degradation"
|
|
132
|
+
description: "New code slower than existing implementation"
|
|
133
|
+
probability: medium
|
|
134
|
+
impact: high
|
|
135
|
+
mitigation: "Load testing before rollout, monitoring during rollout"
|
|
136
|
+
- id: ROLL-002
|
|
137
|
+
name: "User Disruption"
|
|
138
|
+
description: "Changed UX confuses existing users"
|
|
139
|
+
probability: medium
|
|
140
|
+
impact: medium
|
|
141
|
+
mitigation: "Gradual rollout (10% → 50% → 100%), feedback collection"
|
|
142
|
+
- id: ROLL-003
|
|
143
|
+
name: "Rollback Failure"
|
|
144
|
+
description: "Unable to revert to previous state"
|
|
145
|
+
probability: low
|
|
146
|
+
impact: critical
|
|
147
|
+
mitigation: "Test rollback before production rollout, checkpoint commits"
|
|
148
|
+
|
|
149
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
150
|
+
# RISK MATRIX
|
|
151
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
152
|
+
|
|
153
|
+
risk_matrix:
|
|
154
|
+
title: "Risk Assessment Matrix"
|
|
155
|
+
content: |
|
|
156
|
+
## Risk Classification
|
|
157
|
+
|
|
158
|
+
| Probability / Impact | Low | Medium | High | Critical |
|
|
159
|
+
|----------------------|-----|--------|------|----------|
|
|
160
|
+
| **High** | Medium | High | Critical | Critical |
|
|
161
|
+
| **Medium** | Low | Medium | High | Critical |
|
|
162
|
+
| **Low** | Low | Low | Medium | High |
|
|
163
|
+
|
|
164
|
+
### Risk Levels
|
|
165
|
+
|
|
166
|
+
- **Critical**: Immediate action required, blocks progress
|
|
167
|
+
- **High**: Must be mitigated before proceeding to next phase
|
|
168
|
+
- **Medium**: Should be addressed, can proceed with monitoring
|
|
169
|
+
- **Low**: Acceptable, document and monitor
|
|
170
|
+
|
|
171
|
+
### Current Phase Risks
|
|
172
|
+
|
|
173
|
+
| ID | Risk | Probability | Impact | Level | Status |
|
|
174
|
+
|----|------|-------------|--------|-------|--------|
|
|
175
|
+
{{risk_table}}
|
|
176
|
+
|
|
177
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
178
|
+
# MITIGATION PLAN
|
|
179
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
180
|
+
|
|
181
|
+
mitigation_plan:
|
|
182
|
+
title: "Mitigation Plan"
|
|
183
|
+
content: |
|
|
184
|
+
## Mitigation Strategies
|
|
185
|
+
|
|
186
|
+
### Critical & High Risks
|
|
187
|
+
|
|
188
|
+
{{critical_mitigations}}
|
|
189
|
+
|
|
190
|
+
### Medium Risks
|
|
191
|
+
|
|
192
|
+
{{medium_mitigations}}
|
|
193
|
+
|
|
194
|
+
### Monitoring Plan
|
|
195
|
+
|
|
196
|
+
| Risk ID | Metric to Watch | Threshold | Action if Exceeded |
|
|
197
|
+
|---------|-----------------|-----------|-------------------|
|
|
198
|
+
{{monitoring_table}}
|
|
199
|
+
|
|
200
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
201
|
+
# ROLLBACK STRATEGY
|
|
202
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
203
|
+
|
|
204
|
+
rollback_strategy:
|
|
205
|
+
title: "Rollback Strategy"
|
|
206
|
+
content: |
|
|
207
|
+
## Rollback Checkpoints
|
|
208
|
+
|
|
209
|
+
### Phase Checkpoints
|
|
210
|
+
|
|
211
|
+
| Phase | Checkpoint | Rollback Command | Recovery Time |
|
|
212
|
+
|-------|------------|------------------|---------------|
|
|
213
|
+
| Discovery | Pre-analysis | N/A (read-only) | N/A |
|
|
214
|
+
| Planning | Pre-PRD | `git checkout {{pre_planning_commit}}` | < 1 min |
|
|
215
|
+
| Migration | Pre-migration | `git checkout {{pre_migration_commit}}` | < 5 min |
|
|
216
|
+
| Rollout | Pre-rollout | `git checkout {{pre_rollout_commit}}` | < 5 min |
|
|
217
|
+
|
|
218
|
+
### Database Rollback
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# If database migration was applied:
|
|
222
|
+
npm run db:rollback -- --to={{last_good_migration}}
|
|
223
|
+
|
|
224
|
+
# If data was modified:
|
|
225
|
+
# Restore from backup taken at {{backup_timestamp}}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Rollback Triggers
|
|
229
|
+
|
|
230
|
+
Automatic rollback if:
|
|
231
|
+
- [ ] Error rate exceeds 5% for 5 minutes
|
|
232
|
+
- [ ] Response time increases >200% from baseline
|
|
233
|
+
- [ ] Critical functionality fails health check
|
|
234
|
+
|
|
235
|
+
Manual rollback decision by:
|
|
236
|
+
- [ ] Tech lead approval for partial rollback
|
|
237
|
+
- [ ] CTO approval for full rollback
|
|
238
|
+
|
|
239
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
240
|
+
# SIGN-OFF
|
|
241
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
242
|
+
|
|
243
|
+
sign_off:
|
|
244
|
+
title: "Sign-Off"
|
|
245
|
+
content: |
|
|
246
|
+
## Phase Approval
|
|
247
|
+
|
|
248
|
+
| Role | Name | Approval | Date |
|
|
249
|
+
|------|------|----------|------|
|
|
250
|
+
| Technical Lead | | [ ] Approved | |
|
|
251
|
+
| Product Owner | | [ ] Approved | |
|
|
252
|
+
| QA Lead | | [ ] Approved | |
|
|
253
|
+
|
|
254
|
+
### Conditions for Proceeding
|
|
255
|
+
|
|
256
|
+
- [ ] All critical risks mitigated
|
|
257
|
+
- [ ] All high risks have mitigation plan
|
|
258
|
+
- [ ] Rollback tested and verified
|
|
259
|
+
- [ ] Stakeholders notified
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
**Report Generated By:** @analyst
|
|
264
|
+
**Template Version:** 1.0
|
|
265
|
+
**Story:** AIOS-DIFF-4.3.2
|
|
266
|
+
|
|
267
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
268
|
+
# USAGE
|
|
269
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
270
|
+
|
|
271
|
+
usage:
|
|
272
|
+
command: "@analyst → *create-doc brownfield-risk-report"
|
|
273
|
+
output: "docs/reports/BROWNFIELD-RISK-REPORT-{{phase}}.md"
|
|
274
|
+
triggers:
|
|
275
|
+
- Before each brownfield phase transition
|
|
276
|
+
- When new risks are identified
|
|
277
|
+
- Before stakeholder review meetings
|
|
@@ -22,6 +22,7 @@ const path = require('path');
|
|
|
22
22
|
let wis = null;
|
|
23
23
|
let SessionContextLoader = null;
|
|
24
24
|
let learning = null;
|
|
25
|
+
let WorkflowStateManager = null;
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* Default cache TTL for suggestions (5 minutes)
|
|
@@ -93,6 +94,15 @@ class SuggestionEngine {
|
|
|
93
94
|
learning = null;
|
|
94
95
|
}
|
|
95
96
|
}
|
|
97
|
+
|
|
98
|
+
if (!WorkflowStateManager) {
|
|
99
|
+
try {
|
|
100
|
+
({ WorkflowStateManager } = require('../../development/scripts/workflow-state-manager'));
|
|
101
|
+
} catch (error) {
|
|
102
|
+
console.warn('[SuggestionEngine] Failed to load WorkflowStateManager:', error.message);
|
|
103
|
+
WorkflowStateManager = null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
96
106
|
}
|
|
97
107
|
|
|
98
108
|
/**
|
|
@@ -154,11 +164,12 @@ class SuggestionEngine {
|
|
|
154
164
|
*/
|
|
155
165
|
async suggestNext(context) {
|
|
156
166
|
this._loadDependencies();
|
|
167
|
+
const runtimeNext = this._getRuntimeNextRecommendation(context);
|
|
157
168
|
|
|
158
169
|
// Check cache first
|
|
159
170
|
const cacheKey = this._generateCacheKey(context);
|
|
160
171
|
if (this._isCacheValid(cacheKey)) {
|
|
161
|
-
return this.suggestionCache;
|
|
172
|
+
return this._withRuntimeRecommendation(this.suggestionCache, runtimeNext);
|
|
162
173
|
}
|
|
163
174
|
|
|
164
175
|
// Default result for when WIS is not available
|
|
@@ -172,7 +183,7 @@ class SuggestionEngine {
|
|
|
172
183
|
};
|
|
173
184
|
|
|
174
185
|
if (!wis) {
|
|
175
|
-
return defaultResult;
|
|
186
|
+
return this._withRuntimeRecommendation(defaultResult, runtimeNext);
|
|
176
187
|
}
|
|
177
188
|
|
|
178
189
|
try {
|
|
@@ -180,10 +191,10 @@ class SuggestionEngine {
|
|
|
180
191
|
const suggestions = wis.getSuggestions(context);
|
|
181
192
|
|
|
182
193
|
if (!suggestions || suggestions.length === 0) {
|
|
183
|
-
return {
|
|
194
|
+
return this._withRuntimeRecommendation({
|
|
184
195
|
...defaultResult,
|
|
185
196
|
message: 'No matching workflow found for current context',
|
|
186
|
-
};
|
|
197
|
+
}, runtimeNext);
|
|
187
198
|
}
|
|
188
199
|
|
|
189
200
|
// Get workflow match info
|
|
@@ -222,7 +233,7 @@ class SuggestionEngine {
|
|
|
222
233
|
: 0;
|
|
223
234
|
|
|
224
235
|
// Build result
|
|
225
|
-
|
|
236
|
+
let result = {
|
|
226
237
|
workflow: match?.name || suggestions[0]?.workflow || null,
|
|
227
238
|
currentState: suggestions[0]?.state || null,
|
|
228
239
|
confidence: Math.round(finalAvgConfidence * 100) / 100,
|
|
@@ -231,6 +242,8 @@ class SuggestionEngine {
|
|
|
231
242
|
message: null,
|
|
232
243
|
};
|
|
233
244
|
|
|
245
|
+
result = this._withRuntimeRecommendation(result, runtimeNext);
|
|
246
|
+
|
|
234
247
|
// Cache the result
|
|
235
248
|
this._cacheResult(cacheKey, result);
|
|
236
249
|
|
|
@@ -244,6 +257,102 @@ class SuggestionEngine {
|
|
|
244
257
|
}
|
|
245
258
|
}
|
|
246
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Build runtime execution signals for deterministic next-action recommendation
|
|
262
|
+
* @param {Object} context - Current session context
|
|
263
|
+
* @returns {Object} Normalized runtime signals
|
|
264
|
+
* @private
|
|
265
|
+
*/
|
|
266
|
+
_buildRuntimeSignals(context = {}) {
|
|
267
|
+
const projectState = context.projectState || {};
|
|
268
|
+
const hasUncommitted =
|
|
269
|
+
typeof projectState.hasUncommittedChanges === 'boolean'
|
|
270
|
+
? projectState.hasUncommittedChanges
|
|
271
|
+
: false;
|
|
272
|
+
|
|
273
|
+
const baseSignals = {
|
|
274
|
+
story_status:
|
|
275
|
+
projectState.story_status || projectState.storyStatus || (projectState.activeStory ? 'in_progress' : 'unknown'),
|
|
276
|
+
qa_status: projectState.qa_status || projectState.qaStatus || 'unknown',
|
|
277
|
+
ci_status:
|
|
278
|
+
projectState.ci_status ||
|
|
279
|
+
projectState.ciStatus ||
|
|
280
|
+
(projectState.failingTests ? 'failed' : 'unknown'),
|
|
281
|
+
has_uncommitted_changes: hasUncommitted,
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
return {
|
|
285
|
+
...baseSignals,
|
|
286
|
+
...(context.executionSignals || {}),
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Get deterministic runtime-first recommendation if signals are available
|
|
292
|
+
* @param {Object} context - Current session context
|
|
293
|
+
* @returns {Object|null} Runtime recommendation or null
|
|
294
|
+
* @private
|
|
295
|
+
*/
|
|
296
|
+
_getRuntimeNextRecommendation(context = {}) {
|
|
297
|
+
if (!WorkflowStateManager) {
|
|
298
|
+
return null;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
try {
|
|
302
|
+
const manager = new WorkflowStateManager();
|
|
303
|
+
const runtimeSignals = this._buildRuntimeSignals(context);
|
|
304
|
+
const recommendation = manager.getNextActionRecommendation(runtimeSignals, {
|
|
305
|
+
story: context.storyPath || '',
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
if (!recommendation || recommendation.state === 'unknown') {
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return recommendation;
|
|
313
|
+
} catch (_error) {
|
|
314
|
+
return null;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Merge runtime-first deterministic recommendation into suggestion result.
|
|
320
|
+
* @param {Object} result - Suggestion result
|
|
321
|
+
* @param {Object|null} runtimeNext - Runtime recommendation
|
|
322
|
+
* @returns {Object} Enhanced result
|
|
323
|
+
* @private
|
|
324
|
+
*/
|
|
325
|
+
_withRuntimeRecommendation(result, runtimeNext) {
|
|
326
|
+
if (!result || !runtimeNext) {
|
|
327
|
+
return result;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
const runtimeSuggestion = {
|
|
331
|
+
command: runtimeNext.command,
|
|
332
|
+
args: '',
|
|
333
|
+
description: runtimeNext.rationale,
|
|
334
|
+
confidence: runtimeNext.confidence,
|
|
335
|
+
priority: 0,
|
|
336
|
+
source: 'runtime_first',
|
|
337
|
+
agent: runtimeNext.agent,
|
|
338
|
+
executionState: runtimeNext.state,
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
const existing = Array.isArray(result.suggestions) ? result.suggestions : [];
|
|
342
|
+
const normalizedRuntimeCommand = String(runtimeSuggestion.command || '').trim().toLowerCase();
|
|
343
|
+
const deduped = existing.filter(
|
|
344
|
+
(s) => String((s.command || '') + (s.args ? ` ${s.args}` : '')).trim().toLowerCase() !== normalizedRuntimeCommand,
|
|
345
|
+
);
|
|
346
|
+
|
|
347
|
+
return {
|
|
348
|
+
...result,
|
|
349
|
+
suggestions: [runtimeSuggestion, ...deduped],
|
|
350
|
+
confidence: Math.max(result.confidence || 0, runtimeNext.confidence || 0),
|
|
351
|
+
isUncertain: false,
|
|
352
|
+
runtimeState: runtimeNext.state,
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
|
|
247
356
|
/**
|
|
248
357
|
* Detect current active agent from environment or session
|
|
249
358
|
* @returns {string} Agent ID
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2025
|
|
3
|
+
Copyright (c) 2025 BMad Code, LLC (BMad Method - original work)
|
|
4
|
+
Copyright (c) 2025 SynkraAI Inc. (AIOS Framework - derivative work)
|
|
5
|
+
|
|
6
|
+
This project was originally derived from the BMad Method
|
|
7
|
+
(https://github.com/bmad-code-org/BMAD-METHOD), created by Brian Madison.
|
|
8
|
+
Synkra AIOS is NOT affiliated with, endorsed by, or sanctioned by the
|
|
9
|
+
BMad Method or BMad Code, LLC.
|
|
4
10
|
|
|
5
11
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
12
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -19,3 +25,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
25
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
26
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
27
|
SOFTWARE.
|
|
28
|
+
|
|
29
|
+
TRADEMARK NOTICE:
|
|
30
|
+
BMad, BMad Method, and BMad Core are trademarks of BMad Code, LLC.
|
|
31
|
+
These trademarks are NOT licensed under the MIT License. See the BMad Method
|
|
32
|
+
TRADEMARK.md (https://github.com/bmad-code-org/BMAD-METHOD/blob/main/TRADEMARK.md)
|
|
33
|
+
for detailed guidelines on trademark usage.
|