engineering-intelligence 0.2.0 → 0.4.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 (44) hide show
  1. package/README.md +5 -1
  2. package/dist/adapters/index.js +3 -3
  3. package/dist/adapters/index.js.map +1 -1
  4. package/dist/cli/index.js +24 -3
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/templates.d.ts +1 -1
  7. package/dist/templates.js +2 -2
  8. package/dist/templates.js.map +1 -1
  9. package/dist/validation/index.js +1 -1
  10. package/dist/validation/index.js.map +1 -1
  11. package/dist/visualizer/index.d.ts +2 -0
  12. package/dist/visualizer/index.d.ts.map +1 -0
  13. package/dist/visualizer/index.js +599 -0
  14. package/dist/visualizer/index.js.map +1 -0
  15. package/package.json +3 -3
  16. package/templates/canonical/agents/change-agent.md +58 -1
  17. package/templates/canonical/agents/engineering-orchestrator.md +69 -3
  18. package/templates/canonical/agents/knowledge-agent.md +59 -2
  19. package/templates/canonical/agents/quality-agent.md +59 -2
  20. package/templates/canonical/rules/engineering-intelligence.md +42 -13
  21. package/templates/canonical/skills/architecture-review-engine/SKILL.md +112 -3
  22. package/templates/canonical/skills/change-detection-engine/SKILL.md +82 -7
  23. package/templates/canonical/skills/change-history-engine/SKILL.md +125 -5
  24. package/templates/canonical/skills/context-sync-engine/SKILL.md +116 -9
  25. package/templates/canonical/skills/deep-project-knowledge-extractor/SKILL.md +171 -5
  26. package/templates/canonical/skills/engineering-change-review/SKILL.md +145 -9
  27. package/templates/canonical/skills/engineering-intelligence-skill/SKILL.md +168 -0
  28. package/templates/canonical/skills/graph-engine/SKILL.md +134 -14
  29. package/templates/canonical/skills/impact-analysis-engine/SKILL.md +125 -11
  30. package/templates/canonical/skills/incremental-sync-engine/SKILL.md +75 -10
  31. package/templates/canonical/skills/initialize-intelligence-skill/SKILL.md +130 -0
  32. package/templates/canonical/skills/knowledge-base-validator/SKILL.md +92 -7
  33. package/templates/canonical/skills/knowledge-sync-engine/SKILL.md +77 -8
  34. package/templates/canonical/skills/memory-sync-engine/SKILL.md +70 -8
  35. package/templates/canonical/skills/refactoring-planner/SKILL.md +143 -2
  36. package/templates/canonical/skills/testing-intelligence-engine/SKILL.md +119 -3
  37. package/templates/canonical/workflows/analyze-impact.md +25 -3
  38. package/templates/canonical/workflows/engineering-intelligence.md +20 -3
  39. package/templates/canonical/workflows/initialize-engineering-intelligence.md +30 -3
  40. package/templates/canonical/workflows/map-architecture.md +17 -6
  41. package/templates/canonical/workflows/review-engineering-change.md +26 -2
  42. package/templates/canonical/workflows/sync-engineering-intelligence.md +20 -2
  43. package/templates/canonical/skills/engineering-intelligence/SKILL.md +0 -21
  44. package/templates/canonical/skills/initialize-engineering-intelligence/SKILL.md +0 -32
@@ -1,13 +1,133 @@
1
1
  ---
2
2
  name: change-history-engine
3
3
  description: Records validated engineering work, impacted systems, tests, synchronized documentation, and outstanding risks. Use after initialization and completed engineering changes.
4
+ version: 3.0.0
4
5
  ---
5
6
 
6
- # Change History
7
+ # Change History Engine
7
8
 
8
- Store change records in `.changes/`.
9
+ Create structured, traceable change records that document what was done, why, what was tested, and what remains.
9
10
 
10
- - Initialization creates `CHG-000-initialization.md`.
11
- - Subsequent changes create the next numbered `CHG-XXX-<summary>.md`.
11
+ ## Inputs
12
12
 
13
- Include request summary, files or systems affected, related `IMP-*` and `REV-*` reports when present, implementation summary, tests and validation performed, updated graph/intelligence artifacts, and unresolved risk or follow-up.
13
+ - Completed implementation details
14
+ - Impact report reference
15
+ - Test results
16
+ - List of synchronized intelligence artifacts
17
+ - Unresolved risks or follow-ups
18
+
19
+ ## Change Record Format
20
+
21
+ Store change records in `.changes/`:
22
+
23
+ - Initialization creates `CHG-000-initialization.md`
24
+ - Subsequent changes create the next numbered `CHG-XXX-<summary>.md`
25
+
26
+ ### Numbering Convention
27
+
28
+ - `CHG-000` — Reserved for initialization
29
+ - `CHG-001` through `CHG-999` — Sequential, zero-padded
30
+ - Find the highest existing CHG number and increment by 1
31
+
32
+ ### Record Template
33
+
34
+ ```markdown
35
+ # CHG-XXX: <concise summary>
36
+
37
+ ## Meta
38
+ - Date: <ISO timestamp>
39
+ - Type: feature | bugfix | update | refactor | architecture | infrastructure | security
40
+ - Risk: low | medium | high | critical
41
+ - Author: <who requested the change>
42
+
43
+ ## Request
44
+ <Original user request, verbatim or paraphrased>
45
+
46
+ ## Implementation Summary
47
+ <What was changed, in 2-5 sentences>
48
+
49
+ ## Files Changed
50
+ | File | Action | Description |
51
+ |---|---|---|
52
+ | src/auth/middleware.ts | Modified | Added rate limiting check |
53
+ | src/auth/rate-limiter.ts | Created | New rate limiting service |
54
+ | test/auth/rate-limiter.test.ts | Created | Rate limiter unit tests |
55
+
56
+ ## Related Reports
57
+ - Impact: IMP-XXX-<slug>.md
58
+ - Review: REV-XXX-<slug>.md (if applicable)
59
+
60
+ ## Tests & Validation
61
+ | Test | Command | Result |
62
+ |---|---|---|
63
+ | Unit tests | npm test | 42 passed, 0 failed |
64
+ | Type check | npx tsc --noEmit | Clean |
65
+ | Lint | npm run lint | Clean |
66
+
67
+ ## Synchronized Artifacts
68
+ | Artifact | Change |
69
+ |---|---|
70
+ | knowledge-base/04-api-documentation.md | Updated rate limiting section |
71
+ | .engineering-intelligence/graph/runtime-graph.json | Added rate-limiter node |
72
+ | .engineering-intelligence/context/module-map.md | Added rate-limiter entry |
73
+
74
+ ## Unresolved Risks
75
+ - <any remaining concerns, follow-ups, or known limitations>
76
+
77
+ ## Rollback
78
+ - <how to revert this change if needed>
79
+ ```
80
+
81
+ ### Initialization Record (`CHG-000-initialization.md`)
82
+
83
+ ```markdown
84
+ # CHG-000: Project Intelligence Initialization
85
+
86
+ ## Meta
87
+ - Date: <ISO timestamp>
88
+ - Type: initialization
89
+
90
+ ## Summary
91
+ Initial engineering intelligence generated for <project name>.
92
+
93
+ ## Generated Artifacts
94
+ | Category | Count | Path |
95
+ |---|---|---|
96
+ | Knowledge Base | 16 documents | knowledge-base/ |
97
+ | Memory | 5 documents | .engineering-intelligence/memory/ |
98
+ | Context | 6 maps | .engineering-intelligence/context/ |
99
+ | Events | 5 guides | .engineering-intelligence/events/ |
100
+ | Graphs | 4 JSON + 1 map | .engineering-intelligence/graph/ |
101
+
102
+ ## Confidence Assessment
103
+ - High confidence areas: <list>
104
+ - Low confidence areas: <list>
105
+ - Needs human review: <list>
106
+
107
+ ## Next Steps
108
+ - Review and verify knowledge-base accuracy
109
+ - Confirm architecture decisions in memory
110
+ - Validate graph completeness
111
+ ```
112
+
113
+ ## Rules
114
+
115
+ - Every completed engineering change must have a change record
116
+ - Records are append-only — never delete or modify past records
117
+ - Reference related impact and review reports by their IMP/REV identifiers
118
+ - Be honest about test results — record failures and skipped tests
119
+ - Include rollback guidance for medium+ risk changes
120
+
121
+ ## Quality Gates
122
+
123
+ - [ ] Record number is sequential (no gaps, no duplicates)
124
+ - [ ] All sections are filled (use "N/A" rather than omitting)
125
+ - [ ] Related reports are correctly referenced
126
+ - [ ] Test results reflect actual execution (not assumed)
127
+ - [ ] Files changed list is complete
128
+
129
+ ## Cross-References
130
+
131
+ - Used by: `engineering-intelligence-skill` (step 7), `initialize-intelligence-skill` (step 9)
132
+ - Depends on: `impact-analysis-engine` (for report references)
133
+ - Related: `engineering-change-review` (may trigger a review report)
@@ -1,19 +1,126 @@
1
1
  ---
2
2
  name: context-sync-engine
3
3
  description: Maintains compact AI navigation context when modules, services, dependencies, runtime paths, or risk areas change. Use after significant implementation changes.
4
+ version: 3.0.0
4
5
  ---
5
6
 
6
7
  # Context Synchronization
7
8
 
8
- Maintain `.engineering-intelligence/context/`:
9
+ Maintain concise, navigational context maps optimized for AI agent use. Context maps help agents quickly find the right file, module, or service — not replace the knowledge base.
9
10
 
10
- - `module-map.md`
11
- - `service-map.md`
12
- - `runtime-map.md`
13
- - `critical-paths.md`
14
- - `dangerous-areas.md`
15
- - `dependency-map.md`
11
+ ## Inputs
16
12
 
17
- Keep context concise, navigational, and backed by current project paths.
13
+ - Impact report and graph updates
14
+ - Current `.engineering-intelligence/context/` documents
18
15
 
19
- Use the associated impact report and graph updates to revise only affected maps; do not regenerate unrelated navigation context.
16
+ ## Context Maps
17
+
18
+ Maintain these maps in `.engineering-intelligence/context/`:
19
+
20
+ ### `module-map.md` — Module Navigation
21
+
22
+ ```markdown
23
+ # Module Map
24
+
25
+ | Module | Path | Responsibility | Key Files |
26
+ |---|---|---|---|
27
+ | auth | src/auth/ | Authentication, JWT, RBAC | middleware.ts, jwt.ts |
28
+ | api | src/routes/ | REST endpoint handlers | users.ts, products.ts |
29
+ ```
30
+
31
+ ### `service-map.md` — Service Topology
32
+
33
+ ```markdown
34
+ # Service Map
35
+
36
+ | Service | Port | Protocol | Dependencies | Health Check |
37
+ |---|---|---|---|---|
38
+ | api-server | 3000 | HTTP | postgres, redis | /health |
39
+ | worker | — | — | rabbitmq, postgres | — |
40
+ ```
41
+
42
+ ### `runtime-map.md` — Request Flows
43
+
44
+ ```markdown
45
+ # Runtime Map
46
+
47
+ ## HTTP Request Flow
48
+ Entry → CORS → Auth → Rate Limit → Router → Handler → Response
49
+
50
+ ## Background Job Flow
51
+ Queue → Worker → Process → DB Write → Notify
52
+ ```
53
+
54
+ ### `critical-paths.md` — Revenue & Safety Critical Flows
55
+
56
+ ```markdown
57
+ # Critical Paths
58
+
59
+ | Flow | Entry Point | Risk | Last Verified |
60
+ |---|---|---|---|
61
+ | Payment processing | POST /api/checkout | High | CHG-005 |
62
+ | User registration | POST /api/auth/register | Medium | CHG-003 |
63
+ ```
64
+
65
+ ### `dangerous-areas.md` — Fragile & Risky Code
66
+
67
+ ```markdown
68
+ # Dangerous Areas
69
+
70
+ | Area | Path | Risk | Reason |
71
+ |---|---|---|---|
72
+ | Legacy auth | src/auth/legacy.ts | High | No tests, race conditions |
73
+ | Payment retry | src/payments/retry.ts | High | Complex state machine |
74
+ ```
75
+
76
+ ### `dependency-map.md` — External Dependencies
77
+
78
+ ```markdown
79
+ # Dependency Map
80
+
81
+ | Dependency | Version | Consumers | Risk |
82
+ |---|---|---|---|
83
+ | express | 4.18.x | api-server | Low — stable |
84
+ | stripe | 12.x | payments module | Medium — breaking changes |
85
+ ```
86
+
87
+ ## Procedure
88
+
89
+ 1. **Check Impact** — Review the impact report and graph updates. Identify which context maps are affected.
90
+
91
+ 2. **Update Affected Maps** — For each affected map:
92
+ - Update specific entries, not the entire map
93
+ - Add new entries for new modules/services/paths
94
+ - Remove entries for deleted modules/services
95
+ - Update paths and descriptions for renamed elements
96
+
97
+ 3. **Preserve Conciseness** — Each map should be:
98
+ - Under 150 lines
99
+ - Table-formatted where possible
100
+ - Navigational (paths and quick descriptions), not explanatory
101
+ - Optimized for AI agent context windows
102
+
103
+ 4. **Verify Accuracy** — Cross-check updated maps against:
104
+ - Current `.engineering-intelligence/graph/` data
105
+ - Actual file system paths (do they still exist?)
106
+
107
+ ## Rules
108
+
109
+ - Keep context concise and navigational — not a knowledge-base duplicate
110
+ - Use tables over prose wherever possible
111
+ - Update only affected maps from the impact report
112
+ - Do not regenerate unrelated context
113
+ - Maps must reflect actual file system state (no phantom paths)
114
+
115
+ ## Quality Gates
116
+
117
+ - [ ] Each map is under 150 lines
118
+ - [ ] Updated entries reference real, existing paths
119
+ - [ ] Only impact-affected maps were modified
120
+ - [ ] Table format used where appropriate
121
+
122
+ ## Cross-References
123
+
124
+ - Depends on: `impact-analysis-engine` (identifies affected maps), `graph-engine` (provides topology data)
125
+ - Used by: `incremental-sync-engine`, `engineering-intelligence-skill`
126
+ - Consumed by: All agents (for navigation)
@@ -1,16 +1,182 @@
1
1
  ---
2
2
  name: deep-project-knowledge-extractor
3
3
  description: Analyzes an existing software repository and produces evidence-based architecture, runtime, API, infrastructure, risk, and onboarding documentation. Use when creating or refreshing the project knowledge base.
4
+ version: 3.0.0
4
5
  ---
5
6
 
6
7
  # Deep Project Knowledge Extractor
7
8
 
8
- Inspect package/workspace manifests, source entrypoints, dependency boundaries, routes, schemas, middleware, tests, CI and infrastructure. Generate the structured documents in `knowledge-base/`.
9
+ Produce comprehensive, evidence-backed project documentation by systematic repository analysis. Every material claim must cite a source file path. Silence is never acceptable use `**Not detected**` for absent features.
9
10
 
10
- Every material statement must be supported by repository evidence. Cite relevant paths in the documents. State `Not detected` or `Unclear from repository evidence` where appropriate.
11
+ ## Inputs
11
12
 
12
- Required documents:
13
+ - Repository root path
14
+ - Optional: scope constraints (specific package, service, or directory)
13
15
 
14
- - `00-project-overview.md` through `14-glossary.md`
16
+ ## Discovery Checklist
15
17
 
16
- Cover repository structure, architecture, runtime flow, APIs, persistence, authentication, frontend, backend, infrastructure, integrations, complex areas, technical debt, onboarding, and glossary.
18
+ Scan the repository systematically for each category:
19
+
20
+ | Category | What to Look For |
21
+ |---|---|
22
+ | **Package Management** | `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`, `pom.xml`, workspace configs |
23
+ | **Build System** | `Makefile`, `webpack.config.*`, `vite.config.*`, `tsconfig.json`, `build.gradle` |
24
+ | **Entrypoints** | `main.*`, `index.*`, `app.*`, `server.*`, bin scripts |
25
+ | **Routing** | Express/Koa/Fastify routes, Next.js pages/app dirs, API gateways |
26
+ | **Database** | Migration dirs, schema files, ORM configs, seed scripts |
27
+ | **Auth** | Passport/Auth0/JWT configs, middleware, RBAC definitions |
28
+ | **CI/CD** | `.github/workflows/`, `.gitlab-ci.yml`, `Jenkinsfile`, `Dockerfile` |
29
+ | **Infrastructure** | `docker-compose.yml`, `terraform/`, `k8s/`, `serverless.yml` |
30
+ | **Tests** | `test/`, `__tests__/`, `spec/`, `*.test.*`, `*.spec.*`, test configs |
31
+ | **Environment** | `.env.example`, `.env.sample`, env validation schemas |
32
+ | **Documentation** | `README.md`, `docs/`, `CHANGELOG.md`, `CONTRIBUTING.md` |
33
+
34
+ ## Output Specification
35
+
36
+ Generate each document in `knowledge-base/` with this structure:
37
+
38
+ ```markdown
39
+ # <Document Title>
40
+
41
+ <One-paragraph executive summary>
42
+
43
+ ## <Section>
44
+
45
+ <Content with inline evidence citations>
46
+
47
+ (evidence: path/to/file:L42-L58)
48
+
49
+ ## Unknowns & Uncertainties
50
+
51
+ - <what is unclear and why>
52
+ ```
53
+
54
+ ### Required Documents
55
+
56
+ #### `00-project-overview.md`
57
+ - Project name, description, primary purpose
58
+ - Technology stack (languages, frameworks, major libraries)
59
+ - Repository type (monorepo, polyrepo, single-package)
60
+ - High-level architecture summary (1 paragraph)
61
+ - Key entry points and how to run the project
62
+
63
+ #### `01-repository-structure.md`
64
+ - Annotated directory tree (top 2-3 levels)
65
+ - Package/workspace boundaries
66
+ - Build output directories
67
+ - Generated vs authored code distinction
68
+
69
+ #### `02-architecture.md`
70
+ - Architectural pattern (monolith, microservices, serverless, modular monolith)
71
+ - Layer definitions (presentation, business, data, infrastructure)
72
+ - Module/package boundaries and their responsibilities
73
+ - Communication patterns (HTTP, gRPC, events, queues)
74
+ - Dependency direction rules
75
+
76
+ #### `03-runtime-flow.md`
77
+ - Application startup sequence
78
+ - Request lifecycle (from entry to response)
79
+ - Background job / worker flows
80
+ - Shutdown / graceful termination
81
+ - Async processing patterns
82
+
83
+ #### `04-api-documentation.md`
84
+ - REST endpoints: method, path, auth, request/response shapes
85
+ - GraphQL schemas and resolvers
86
+ - WebSocket channels
87
+ - RPC interfaces
88
+ - API versioning strategy
89
+
90
+ #### `05-database.md`
91
+ - Database engine(s) and connection configuration
92
+ - Schema overview (tables/collections, key relationships)
93
+ - Migration strategy and tooling
94
+ - Caching layers (Redis, Memcached, in-memory)
95
+ - Data access patterns (repository, active record, query builder)
96
+
97
+ #### `06-authentication.md`
98
+ - Auth provider and strategy (JWT, session, OAuth, SAML)
99
+ - Login/registration flows
100
+ - Token lifecycle and refresh
101
+ - Role/permission model (RBAC, ABAC)
102
+ - Protected route/middleware patterns
103
+
104
+ #### `07-frontend.md`
105
+ - UI framework and version
106
+ - Routing strategy (client-side, SSR, SSG)
107
+ - State management approach
108
+ - Component architecture and patterns
109
+ - Styling approach (CSS modules, Tailwind, styled-components)
110
+ - Build and bundling pipeline
111
+
112
+ #### `08-backend.md`
113
+ - Server framework and version
114
+ - Middleware stack (ordered list)
115
+ - Service/controller pattern
116
+ - Error handling strategy
117
+ - Logging and observability
118
+
119
+ #### `09-infrastructure.md`
120
+ - Hosting/cloud provider
121
+ - Container orchestration
122
+ - CI/CD pipeline stages
123
+ - Environment management (dev, staging, prod)
124
+ - Secrets management
125
+ - Monitoring and alerting
126
+
127
+ #### `10-integrations.md`
128
+ - Third-party API integrations
129
+ - Payment processors, email services, SMS
130
+ - Analytics and tracking
131
+ - External data sources
132
+ - Webhook consumers/producers
133
+
134
+ #### `11-complex-areas.md`
135
+ - High cyclomatic complexity modules
136
+ - Business logic with many edge cases
137
+ - Code with subtle race conditions or timing dependencies
138
+ - Areas with heavy tech debt affecting reliability
139
+
140
+ #### `12-technical-debt.md`
141
+ - Deprecated patterns still in use
142
+ - Missing test coverage in critical paths
143
+ - Known performance bottlenecks
144
+ - Planned but incomplete migrations
145
+ - Security improvements needed
146
+
147
+ #### `13-onboarding.md`
148
+ - Prerequisites (tools, accounts, access)
149
+ - Setup steps (clone, install, configure, run)
150
+ - Development workflow (branch, test, PR)
151
+ - Common tasks and commands
152
+ - Troubleshooting common issues
153
+
154
+ #### `14-glossary.md`
155
+ - Domain-specific terms with definitions
156
+ - Abbreviations and acronyms
157
+ - Naming conventions used in the codebase
158
+
159
+ #### `15-validation-report.md`
160
+ - Generated by `knowledge-base-validator` after extraction
161
+
162
+ ## Evidence Rules
163
+
164
+ 1. Every architectural claim must cite at least one source file
165
+ 2. Use the format: `(evidence: relative/path/to/file:L<line>)` or `(evidence: relative/path/to/file)`
166
+ 3. When evidence is indirect (inferred from patterns), use: `(inferred from: path/to/file)`
167
+ 4. When no evidence exists: `**Not detected** — no relevant configuration or code found`
168
+ 5. When evidence is ambiguous: `**Unclear from evidence** — [explanation of ambiguity]`
169
+
170
+ ## Quality Gates
171
+
172
+ - [ ] All 16 documents generated (00 through 15)
173
+ - [ ] Every document has an executive summary paragraph
174
+ - [ ] Every material claim has an evidence citation
175
+ - [ ] Absent features use `**Not detected**` — not silence
176
+ - [ ] Ambiguous areas use `**Unclear from evidence**`
177
+ - [ ] No invented implementation details
178
+
179
+ ## Cross-References
180
+
181
+ - Used by: `initialize-intelligence-skill`
182
+ - Feeds into: `knowledge-base-validator`, all sync engines
@@ -1,18 +1,154 @@
1
1
  ---
2
2
  name: engineering-change-review
3
- description: Reviews changed implementation, tests, impact analysis, graph consistency, and synchronized project intelligence without applying fixes. Use after engineering changes or before completion.
3
+ description: Reviews engineering changes for correctness, test coverage, architecture alignment, graph consistency, and documentation accuracy. Use after implementation to validate quality before completion.
4
+ version: 3.0.0
4
5
  ---
5
6
 
6
7
  # Engineering Change Review
7
8
 
8
- Review changed code and tests against the request, impact report, validation evidence, graph artifacts, and synchronized intelligence.
9
+ Review completed engineering work for correctness, completeness, and alignment with project standards. Produce a structured review report with severity-ordered findings.
9
10
 
10
- Write `.engineering-intelligence/reports/REV-XXX-<slug>.md` with:
11
+ ## Inputs
11
12
 
12
- - findings first, ordered by severity
13
- - code and evidence paths
14
- - regression, validation, graph-staleness, and documentation-staleness risks
15
- - test gaps and unresolved questions
16
- - a short reviewed-change summary only after findings
13
+ - Implementation diff or changed scope
14
+ - Impact report (`.engineering-intelligence/reports/IMP-XXX-*.md`)
15
+ - Test and validation evidence
16
+ - Updated graph and intelligence artifacts
17
17
 
18
- This review capability may write its report. It must not modify product code or auto-fix findings.
18
+ ## Review Dimensions
19
+
20
+ ### 1. Implementation Correctness
21
+
22
+ | Check | What to Verify |
23
+ |---|---|
24
+ | Request fulfillment | Does the implementation address the original request? |
25
+ | Logic correctness | Are algorithms and business logic correct? |
26
+ | Edge cases | Are boundary conditions handled? |
27
+ | Error handling | Are errors caught, logged, and reported appropriately? |
28
+ | Resource management | Are connections, files, and memory properly managed? |
29
+ | Concurrency safety | Are shared resources properly synchronized? |
30
+
31
+ ### 2. Test Coverage
32
+
33
+ | Check | What to Verify |
34
+ |---|---|
35
+ | Happy path | Is the expected behavior tested? |
36
+ | Error path | Are error scenarios tested? |
37
+ | Regression | Does a test prevent the original issue from recurring (bugfix)? |
38
+ | Boundary | Are edge cases and limits tested? |
39
+ | Execution | Were tests actually run? (Not just written) |
40
+ | Results | Did all tests pass? Are failures explained? |
41
+
42
+ ### 3. Architecture Alignment
43
+
44
+ | Check | What to Verify |
45
+ |---|---|
46
+ | Boundary respect | Does the change respect module/service boundaries? |
47
+ | Pattern compliance | Does it follow established patterns from memory? |
48
+ | Dependency direction | Are dependencies flowing in the correct direction? |
49
+ | Abstraction level | Is the code at the appropriate abstraction level? |
50
+
51
+ ### 4. Graph Consistency
52
+
53
+ | Check | What to Verify |
54
+ |---|---|
55
+ | Node updates | Are new modules/services reflected in graphs? |
56
+ | Edge updates | Are new dependencies/relationships reflected? |
57
+ | Stale entries | Were removed elements cleaned from graphs? |
58
+ | Map alignment | Does architecture-map.md reflect JSON graph changes? |
59
+
60
+ ### 5. Documentation Accuracy
61
+
62
+ | Check | What to Verify |
63
+ |---|---|
64
+ | Knowledge sync | Were affected knowledge docs updated? |
65
+ | Memory sync | Were durable decisions captured if needed? |
66
+ | Context sync | Were navigation maps updated? |
67
+ | Change record | Does the CHG record accurately reflect the work? |
68
+ | Impact report | Was the impact report referenced correctly? |
69
+
70
+ ## Finding Severity Scale
71
+
72
+ | Severity | Symbol | Meaning | Action Required |
73
+ |---|---|---|---|
74
+ | Blocker | 🔴 | Breaks functionality or introduces security risk | Must fix before completion |
75
+ | Major | 🟠 | Significant issue but not immediately breaking | Should fix before completion |
76
+ | Minor | 🟡 | Code quality or style issue | Fix when convenient |
77
+ | Suggestion | 🔵 | Optional improvement | Consider for future |
78
+ | Positive | 🟢 | Good practice or improvement observed | No action needed |
79
+
80
+ ## Procedure
81
+
82
+ 1. **Read Context** — Load the impact report, implementation diff, and test results.
83
+ 2. **Review Each Dimension** — Walk through all five review dimensions above.
84
+ 3. **Score Findings** — Assign severity to each finding.
85
+ 4. **Check Intelligence** — Verify graph, knowledge, memory, and context were appropriately synced.
86
+ 5. **Write Report** — Generate the review report.
87
+
88
+ ## Output Format
89
+
90
+ Write `.engineering-intelligence/reports/REV-XXX-<slug>.md`:
91
+
92
+ ```markdown
93
+ # REV-XXX: <summary>
94
+
95
+ ## Meta
96
+ - Date: <ISO timestamp>
97
+ - Related: IMP-XXX, CHG-XXX
98
+ - Scope: <what was reviewed>
99
+
100
+ ## Summary
101
+ - Total findings: X
102
+ - 🔴 Blocker: Y | 🟠 Major: Z | 🟡 Minor: W | 🔵 Suggestion: V
103
+
104
+ ## Verdict
105
+ - [ ] ✅ Approved — No blocking issues
106
+ - [ ] ⚠️ Approved with findings — Non-blocking issues noted
107
+ - [ ] ❌ Changes required — Blocking issues must be addressed
108
+
109
+ ## Findings
110
+
111
+ ### 🔴 [Finding Title]
112
+ - **Dimension**: Implementation / Testing / Architecture / Graph / Documentation
113
+ - **Location**: <file:line or artifact path>
114
+ - **Description**: <what was found>
115
+ - **Evidence**: <code reference or comparison>
116
+ - **Recommendation**: <how to fix>
117
+
118
+ ### 🟢 [Positive Finding]
119
+ - **Description**: <good practice observed>
120
+
121
+ ## Test Gaps
122
+ - <untested areas that should be tested>
123
+
124
+ ## Intelligence Sync Status
125
+ | Artifact | Status | Notes |
126
+ |---|---|---|
127
+ | knowledge-base/ | ✅ Synced | API docs updated |
128
+ | graph/ | ⚠️ Partial | Missing new service node |
129
+
130
+ ## Stale Intelligence Risks
131
+ - <areas where docs may drift from code>
132
+ ```
133
+
134
+ ## Rules
135
+
136
+ - Review is read-only — do not apply fixes during a review-only workflow
137
+ - Be honest about gaps and risks — sugar-coating helps nobody
138
+ - Include positive findings alongside issues — balanced review
139
+ - All findings must cite specific evidence (file paths, code references)
140
+ - If tests were not actually run, flag it as a major finding
141
+
142
+ ## Quality Gates
143
+
144
+ - [ ] All five review dimensions were evaluated
145
+ - [ ] Each finding has severity, location, and evidence
146
+ - [ ] Test execution was verified (not assumed)
147
+ - [ ] Intelligence sync status was checked
148
+ - [ ] Report includes verdict (approved/changes required)
149
+
150
+ ## Cross-References
151
+
152
+ - Depends on: `change-detection-engine` (identifies what to review)
153
+ - Used by: `engineering-intelligence-skill` (high-risk review gate), `review-engineering-change` workflow
154
+ - Reads: Impact reports, change records, graph artifacts