engineering-intelligence 1.2.0 → 1.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 (31) hide show
  1. package/dist/adapters/index.js +4 -4
  2. package/dist/adapters/index.js.map +1 -1
  3. package/dist/cli/index.js +1 -1
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/templates.d.ts +1 -1
  6. package/dist/templates.d.ts.map +1 -1
  7. package/dist/templates.js +33 -0
  8. package/dist/templates.js.map +1 -1
  9. package/dist/visualizer/index.d.ts +1 -1
  10. package/dist/visualizer/index.d.ts.map +1 -1
  11. package/dist/visualizer/index.js +724 -57
  12. package/dist/visualizer/index.js.map +1 -1
  13. package/package.json +1 -1
  14. package/templates/canonical/rules/engineering-intelligence.md +5 -1
  15. package/templates/canonical/skills/aidlc-lifecycle-engine/SKILL.md +39 -0
  16. package/templates/canonical/skills/api-backward-compatibility-engine/SKILL.md +80 -0
  17. package/templates/canonical/skills/context-sync-engine/SKILL.md +15 -4
  18. package/templates/canonical/skills/database-migration-safety-engine/SKILL.md +79 -0
  19. package/templates/canonical/skills/engineering-intelligence-skill/SKILL.md +59 -2
  20. package/templates/canonical/skills/graph-engine/SKILL.md +22 -5
  21. package/templates/canonical/skills/impact-analysis-engine/SKILL.md +20 -4
  22. package/templates/canonical/skills/knowledge-base-validator/SKILL.md +19 -3
  23. package/templates/canonical/skills/memory-sync-engine/SKILL.md +16 -0
  24. package/templates/canonical/skills/operations-readiness-engine/SKILL.md +15 -4
  25. package/templates/canonical/skills/requirement-scoper/SKILL.md +9 -0
  26. package/templates/canonical/skills/security-audit-engine/SKILL.md +10 -3
  27. package/templates/canonical/skills/staleness-detector/SKILL.md +19 -0
  28. package/templates/canonical/skills/testing-intelligence-engine/SKILL.md +37 -1
  29. package/templates/canonical/skills/type-safety-engine/SKILL.md +81 -0
  30. package/templates/canonical/workflows/engineering-intelligence.md +6 -4
  31. package/templates/canonical/workflows/initialize-engineering-intelligence.md +3 -2
@@ -38,7 +38,11 @@ Systematically audit every significant claim in `knowledge-base/*.md` against ac
38
38
  - Distribution across statuses
39
39
  - Overall document confidence: High (>90% ✅), Medium (70-90% ✅), Low (<70% ✅)
40
40
 
41
- 5. **Write Report** — Generate `knowledge-base/15-validation-report.md`
41
+ 5. **Cross-Document Consistency Check** — Extract key claims from all knowledge documents and compare claims across documents for contradictions, such as different framework versions, conflicting ownership, incompatible API signatures, or mismatched data model descriptions.
42
+
43
+ 6. **Auto-Heal Unsupported Claims** — During explicit synchronization workflows only, re-extract the smallest affected section for unsupported or stale claims, update that section with fresh evidence citations, and record the heal. Escalate claims requiring product judgment instead of guessing.
44
+
45
+ 7. **Write Report** — Generate `knowledge-base/15-validation-report.md`
42
46
 
43
47
  ## Output Format
44
48
 
@@ -75,6 +79,16 @@ Scope: <documents validated>
75
79
 
76
80
  - <areas where code has diverged from docs>
77
81
 
82
+ ## Cross-Document Contradictions
83
+
84
+ | Claim A | Document A | Claim B | Document B | Suggested Canonical Resolution |
85
+ |---|---|---|---|---|
86
+
87
+ ## Auto-Heal Actions
88
+
89
+ | Document | Section | Action | Evidence | Result |
90
+ |---|---|---|---|---|
91
+
78
92
  ## Recommended Actions
79
93
 
80
94
  - <specific documents needing update>
@@ -83,8 +97,8 @@ Scope: <documents validated>
83
97
 
84
98
  ## Rules
85
99
 
86
- - Do NOT silently rewrite knowledge documents during validation
87
- - Update knowledge documents only as part of an explicit synchronization workflow
100
+ - Do NOT silently rewrite knowledge documents during read-only validation
101
+ - Auto-heal unsupported claims only as part of an explicit synchronization workflow and record every edit
88
102
  - Report honestly — a low-confidence score is valuable information
89
103
  - Flag areas where you lack sufficient context to validate
90
104
 
@@ -94,6 +108,8 @@ Scope: <documents validated>
94
108
  - [ ] Each finding has an evidence path or explicit "no evidence found"
95
109
  - [ ] Summary table has accurate counts
96
110
  - [ ] Stale documentation risks are identified
111
+ - [ ] Cross-document contradictions are listed or explicitly absent
112
+ - [ ] Auto-heal actions are recorded when synchronization mode is active
97
113
  - [ ] Recommended actions are actionable
98
114
 
99
115
  ## Cross-References
@@ -22,6 +22,7 @@ Maintain durable, long-lived engineering memory. Memory is for decisions and pat
22
22
  | `coding-patterns.md` | Recurring conventions, idioms, naming rules, file organization | Refactors that establish new patterns, convention changes |
23
23
  | `project-constraints.md` | Performance budgets, compatibility requirements, SLA targets, regulatory | Infrastructure changes, new compliance requirements |
24
24
  | `technology-decisions.md` | Stack choices, framework versions, deprecation timelines, migration plans | Dependency updates, technology migrations |
25
+ | `regression-patterns.md` | Recurring bug categories and proven regression test templates | Bugfixes that reveal reusable failure patterns |
25
26
 
26
27
  ## Staleness Detection Rules
27
28
 
@@ -58,12 +59,25 @@ A memory entry may be stale if:
58
59
  - Is this a decision or just an implementation detail?
59
60
  - Is this captured better elsewhere (knowledge-base, context)?
60
61
 
62
+ 5. **Memory Pruning Audit** — During initialization, major refactors, or explicit sync:
63
+ - Flag entries where referenced code no longer exists
64
+ - Flag entries superseded for more than six months
65
+ - Flag patterns contradicted by current `convention-detector` output
66
+ - Flag decisions that conflict with accepted ADRs
67
+ - Propose retirement with evidence; do not delete historical decisions silently
68
+
69
+ 6. **Regression Pattern Update** — For bugfixes:
70
+ - Classify the bug category (pagination boundary, null/empty collection, race condition, permission bypass, retry/idempotency, schema drift, API contract mismatch, etc.)
71
+ - Match against `.engineering-intelligence/memory/regression-patterns.md`
72
+ - Add or update a reusable regression test template when the pattern is durable
73
+
61
74
  ## Rules
62
75
 
63
76
  - **Durable only**: Do not store transient implementation notes or unverified assumptions
64
77
  - **Evidence required**: Every entry must cite source evidence
65
78
  - **Leave unchanged when appropriate**: Most changes do NOT affect durable memory — it's correct to update nothing
66
79
  - **Status tracking**: Mark superseded decisions as `Superseded` rather than deleting them — history matters
80
+ - **Pruning with evidence**: Retire or deprecate stale memory only with evidence and status updates
67
81
  - **No product code**: Memory synchronization never modifies product code
68
82
 
69
83
  ## Quality Gates
@@ -73,6 +87,8 @@ A memory entry may be stale if:
73
87
  - [ ] New entries are truly durable (not transient implementation details)
74
88
  - [ ] All entries have evidence citations
75
89
  - [ ] Superseded entries are marked, not deleted
90
+ - [ ] Memory pruning audit was run for initialization and major refactors
91
+ - [ ] Regression patterns were checked for bugfixes
76
92
 
77
93
  ## Cross-References
78
94
 
@@ -14,7 +14,8 @@ Use this skill when a change affects deployment, infrastructure, runtime behavio
14
14
  2. Define release strategy: normal deploy, canary, blue/green, feature flag, or manual rollout.
15
15
  3. Define rollback plan and data recovery constraints.
16
16
  4. Define observability: metrics, traces, logs, dashboards, alerts, and ownership.
17
- 5. Confirm production readiness with objective gates.
17
+ 5. Inject or flag observability gaps for new functions, endpoints, jobs, service interactions, and business events.
18
+ 6. Confirm production readiness with objective gates.
18
19
 
19
20
  ## Outputs
20
21
 
@@ -34,16 +35,24 @@ Write `.engineering-intelligence/aidlc/operations/operations-readiness.md`:
34
35
  | Signal | Source | Threshold | Owner | Runbook |
35
36
  |---|---|---|---|---|
36
37
 
38
+ ## Observability Injection
39
+ | New / Changed Path | Entry Log | Exit Log | Trace Span | Error Metric | Business Event | Status |
40
+ |---|---|---|---|---|---|---|
41
+
37
42
  ## Rollback
38
- - Code rollback:
39
- - Data rollback:
40
- - Configuration rollback:
43
+ - Code rollback: `git revert <commit>` or <branch rollback sequence>
44
+ - Data rollback: <down migration / compensating SQL / irreversible approval>
45
+ - Feature flag rollback: <toggle and expected effect>
46
+ - Infrastructure rollback: <IaC rollback sequence>
47
+ - External dependency rollback: <vendor/config rollback>
41
48
 
42
49
  ## Readiness Gates
43
50
  - [ ] Build passes
44
51
  - [ ] Tests pass
45
52
  - [ ] Migrations are backward compatible or downtime is approved
46
53
  - [ ] Alerts/runbooks exist for changed failure modes
54
+ - [ ] Rollback planner covers code, data, feature flag, and infrastructure rollback for medium+ risk
55
+ - [ ] New endpoints/functions/services have logging, tracing, metrics, and business-event coverage or explicit gaps
47
56
  - [ ] Secrets and environment variables are documented securely
48
57
  ```
49
58
 
@@ -52,3 +61,5 @@ Write `.engineering-intelligence/aidlc/operations/operations-readiness.md`:
52
61
  - Never execute production deployment without explicit user approval.
53
62
  - Mark unknown production constraints in `open-questions.md`.
54
63
  - For database changes, require backward-compatible migration planning unless downtime is approved.
64
+ - Medium-and-above risk changes require rollback procedures in both `operations-readiness.md` and the CHG record.
65
+ - Irreversible steps require explicit human approval.
@@ -21,6 +21,13 @@ Act as a detailed Business Analyst and Technical Architect persona. Analyze the
21
21
  - Identify domain logic in `knowledge-base/` matching the request category
22
22
  - Query dependency/service graphs to locate related modules and boundaries
23
23
  - Read architecture memory to understand tech constraints and guidelines
24
+ - Scan relevant modules for implicit invariants and dominant implementation constraints before asking questions:
25
+ - retry strategies, timeout values, rate limits, pagination defaults
26
+ - locking/idempotency patterns
27
+ - validation style and error codes
28
+ - logging/tracing conventions
29
+ - framework patterns used in 80% or more of similar code
30
+ - Surface confirmed dominant patterns as constraints in the requirements document.
24
31
 
25
32
  2. **Formulate Scoping Questions** — Identify gaps, ambiguities, and edge cases. Ask the user 3 to 5 targeted questions covering:
26
33
  - **Business Value & Scope**: What are the limits of the MVP?
@@ -47,6 +54,7 @@ The final requirements document `knowledge-base/19-requirements.md` must follow
47
54
  - **Logic & Configuration**: <Exact details on implementation strategy, libraries, config parameters>
48
55
  - **System Boundaries & Dependencies**: <Files/modules affected based on graph mappings>
49
56
  - **Edge Cases & Failure Modes**: <Exactly how to handle failures, retries, limits>
57
+ - **Implicit Codebase Constraints**: <Dominant existing patterns discovered from relevant modules, with evidence paths>
50
58
 
51
59
  ## 3. Agile Delivery Model
52
60
  - **Epic**: <epic or initiative>
@@ -81,5 +89,6 @@ Provide the exact prompt to pass to the coding agent to execute this change:
81
89
  - [ ] Clear business goals and technical boundaries defined.
82
90
  - [ ] At least 3 scoping questions asked and logged.
83
91
  - [ ] User story, acceptance criteria, priority, dependencies, and Ready/Done gates are documented.
92
+ - [ ] Implicit codebase constraints were mined and cited before questions were finalized.
84
93
  - [ ] Finalized prompt maps exact files and modules.
85
94
  - [ ] Output does not contain any code modification.
@@ -32,8 +32,13 @@ Identify security risks through systematic, evidence-backed analysis of dependen
32
32
  - Check version against known CVE databases (cite CVE IDs)
33
33
  - Flag dependencies with no updates in >12 months (abandonment risk)
34
34
  - Identify transitive dependencies with known vulnerabilities
35
+ - Check license compatibility against the project license
36
+ - Check maintenance health (days since last release/commit when available)
37
+ - For frontend packages, estimate bundle size impact or require a bundle-size check
35
38
  - Note severity: critical, high, medium, low
36
39
 
40
+ Trigger this targeted dependency risk review whenever manifests add a new package. Critical CVEs block completion before commit. Unknown license or maintenance data must be recorded as risk, not ignored.
41
+
37
42
  2. **Auth/Authz Pattern Review** — Analyze authentication and authorization:
38
43
 
39
44
  | Check | What to Look For |
@@ -104,9 +109,9 @@ Write `knowledge-base/20-security-assessment.md`:
104
109
  - Overall risk: low | medium | high | critical
105
110
 
106
111
  ## Dependency Vulnerabilities
107
- | Dependency | Version | CVE | Severity | Fix Available |
108
- |---|---|---|---|---|
109
- | lodash | 4.17.15 | CVE-2020-8203 | High | Yes (4.17.21) |
112
+ | Dependency | Version | CVE | Severity | Fix Available | License | Maintenance | Bundle Impact |
113
+ |---|---|---|---|---|---|---|---|
114
+ | lodash | 4.17.15 | CVE-2020-8203 | High | Yes (4.17.21) | MIT | maintained | n/a |
110
115
 
111
116
  ## Auth/Authz Assessment
112
117
  - Mechanism: <description>
@@ -149,6 +154,8 @@ Write `knowledge-base/20-security-assessment.md`:
149
154
  ## Quality Gates
150
155
 
151
156
  - [ ] All dependency vulnerabilities cite CVE IDs and affected versions
157
+ - [ ] New package additions include CVE, license, maintenance, and bundle-size risk where applicable
158
+ - [ ] Critical CVEs block completion
152
159
  - [ ] Auth/authz review covers both authentication and authorization
153
160
  - [ ] Secrets scan does not expose actual secret values in the report
154
161
  - [ ] OWASP Top 10 items each have a status with evidence or rationale
@@ -96,6 +96,15 @@ This capability does not modify product code.
96
96
  - If no freshness comment exists, add it after the document title (first `#` heading)
97
97
  - Never modify document content — only metadata comments
98
98
 
99
+ Also add section-level confidence metadata to each H2 section when evidence can be resolved:
100
+
101
+ ```markdown
102
+ ## Authentication Flow
103
+ <!-- section-confidence: level=high, score=91, verified_at=2026-06-04T10:00:00Z, evidence=src/auth/middleware.ts -->
104
+ ```
105
+
106
+ Agents must prefer high/medium confidence sections and skip low-confidence sections unless they verify the section against source first.
107
+
99
108
  6. **Determine sync actions** — Based on freshness scores, determine required actions:
100
109
 
101
110
  | Condition | Action |
@@ -161,6 +170,14 @@ This capability does not modify product code.
161
170
  - The list of changed source files
162
171
  - The staleness reason (file modified, file deleted, file moved, age)
163
172
 
173
+ 9. **Pre-Implementation Drift Trigger** — When invoked by `engineering-intelligence-skill`, return a blocking drift decision:
174
+
175
+ | Condition | Decision |
176
+ |---|---|
177
+ | All scoped artifacts >= 60 | Proceed |
178
+ | Any scoped artifact 50-59 | Sync before implementation or mark stale risk in impact report |
179
+ | Any scoped artifact < 50 | Block implementation until incremental sync or explicit user risk acceptance |
180
+
164
181
  ## Quality Gates
165
182
 
166
183
  - [ ] All knowledge base, memory, and context documents are inventoried
@@ -169,10 +186,12 @@ This capability does not modify product code.
169
186
  - [ ] Freshness scores follow the defined calculation formula
170
187
  - [ ] Score interpretation matches the defined status table
171
188
  - [ ] Freshness metadata is injected without modifying document content
189
+ - [ ] Section-level confidence metadata is added for H2 sections where evidence can be resolved
172
190
  - [ ] FRESHNESS-report.md exists at `.engineering-intelligence/reports/FRESHNESS-report.md`
173
191
  - [ ] Structural changes (deleted/moved files) are detected and reported
174
192
  - [ ] Documents below threshold are queued for incremental sync
175
193
  - [ ] Module-level aggregation is included in the report
194
+ - [ ] Pre-implementation drift decision is returned when scoped to a planned change
176
195
 
177
196
  ## Cross-References
178
197
 
@@ -13,6 +13,8 @@ Determine the minimum sufficient test coverage for a change based on risk assess
13
13
  - Impact report (`.engineering-intelligence/reports/IMP-XXX-*.md`)
14
14
  - Existing test patterns in the repository
15
15
  - Change classification (feature, bugfix, refactor, etc.)
16
+ - Coverage reports when available (`coverage-final.json`, `coverage.xml`, `lcov.info`, `go test -cover`, pytest coverage output)
17
+ - Agile acceptance criteria from `.engineering-intelligence/aidlc/agile/acceptance-criteria.md`
16
18
 
17
19
  ## Risk-Based Test Selection Matrix
18
20
 
@@ -29,11 +31,18 @@ Determine the minimum sufficient test coverage for a change based on risk assess
29
31
  - Identify test framework(s) in use (Jest, Mocha, pytest, Go testing, etc.)
30
32
  - Locate test directories and naming patterns
31
33
  - Map tests to source files (by convention or configuration)
32
- - Identify untested critical paths
34
+ - Parse real coverage reports where available:
35
+ - Jest/Vitest/Istanbul JSON (`coverage-final.json`)
36
+ - LCOV (`lcov.info`)
37
+ - pytest `coverage.xml`
38
+ - Go `go test -cover` output
39
+ - Map uncovered lines to modules and critical paths
33
40
 
34
41
  2. **Map Change to Tests** — Using the impact report:
35
42
  - List source files/functions changed
36
43
  - Find existing tests covering those files
44
+ - Build a source-line to test-file map from coverage where possible
45
+ - Run or recommend targeted impacted tests first, then broader validation
37
46
  - Identify tests that should exist but don't (coverage gaps)
38
47
 
39
48
  3. **Determine Required Tests** — Using the risk matrix above:
@@ -56,6 +65,15 @@ Determine the minimum sufficient test coverage for a change based on risk assess
56
65
  - Negative-path and permission tests for security changes
57
66
  - Data migration and rollback tests for schema changes
58
67
 
68
+ **For API/service integration changes**:
69
+ - Generate integration test stubs from `knowledge-base/04-api-documentation.md` and `service-graph.json`
70
+ - Cover happy path, auth failure, downstream timeout, and validation error
71
+ - Match existing test framework, describe/it nesting, mock setup, assertion library, and factory style
72
+
73
+ **For complex validators or combinatorial logic**:
74
+ - Recommend property-based tests (`fast-check`, `hypothesis`, `proptest`, or project equivalent)
75
+ - Include seed examples and rationale
76
+
59
77
  4. **Identify Coverage Gaps** — Report:
60
78
  - Critical paths with no test coverage
61
79
  - Changed behavior with no corresponding test
@@ -66,6 +84,10 @@ Determine the minimum sufficient test coverage for a change based on risk assess
66
84
  - Test cases to write (describe what, not write the test code)
67
85
  - Validation commands to run
68
86
 
87
+ 6. **Verify Acceptance Criteria** — Produce an Acceptance Criteria Verification Matrix mapping every criterion to automated tests, manual verification, or an unavailable check. Missing mappings block Definition of Done.
88
+
89
+ 7. **Record Regression Patterns** — For bugfixes, compare against `.engineering-intelligence/memory/regression-patterns.md`. Reuse matching templates or add a new durable pattern when a bug category is likely to recur.
90
+
69
91
  ## Output
70
92
 
71
93
  ### Per-Change Testing (in `.changes/CHG-XXX-*.md`)
@@ -99,6 +121,14 @@ Only update when documenting project-wide testing posture:
99
121
  ## Coverage Gaps
100
122
  - <critical untested areas>
101
123
 
124
+ ## Evidence-Based Coverage
125
+ | Source File | Changed Lines | Covering Tests | Uncovered Lines |
126
+ |---|---|---|---|
127
+
128
+ ## Acceptance Criteria Verification Matrix
129
+ | Criterion | Covering Test / Manual Check | Result |
130
+ |---|---|---|
131
+
102
132
  ## Running Tests
103
133
  - All tests: `<command>`
104
134
  - Specific suite: `<command>`
@@ -110,6 +140,9 @@ Only update when documenting project-wide testing posture:
110
140
  - Recommend tests proportional to risk — don't mandate full-suite runs for low-risk changes
111
141
  - Always note when validation was not actually run (only recommended)
112
142
  - Never claim test coverage without checking existing tests
143
+ - Prefer real coverage reports over proximity estimates when reports exist
144
+ - Target impacted tests first, then run broader suites according to risk
145
+ - Missing acceptance-criteria mappings block Definition of Done
113
146
  - Record test results honestly, including failures
114
147
 
115
148
  ## Quality Gates
@@ -117,7 +150,10 @@ Only update when documenting project-wide testing posture:
117
150
  - [ ] Impact report was consulted for risk level
118
151
  - [ ] Test recommendations match the risk level
119
152
  - [ ] Existing test coverage was checked before recommending new tests
153
+ - [ ] Coverage reports were parsed when available
154
+ - [ ] Impacted tests were identified separately from full-suite validation
120
155
  - [ ] Coverage gaps in critical paths are flagged
156
+ - [ ] Acceptance criteria are mapped to validation evidence
121
157
 
122
158
  ## Cross-References
123
159
 
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: type-safety-engine
3
+ description: Validates generated code against the project type system, traces type-level dependencies, and loops on compiler errors until clean or blocked.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Type Safety Engine
8
+
9
+ Use this skill for TypeScript, Python, Go, Rust, Java, Kotlin, C#, or any project with a declared type checker. It is a blocking gate for generated code in typed projects.
10
+
11
+ ## Inputs
12
+
13
+ - Changed files from the impact report or current diff
14
+ - Project manifests and type-check configuration
15
+ - Existing graph artifacts under `.engineering-intelligence/graph/`
16
+
17
+ ## Procedure
18
+
19
+ 1. **Detect Type System**
20
+ - TypeScript: `tsconfig.json`, `package.json`, `tsc`
21
+ - Python: `mypy.ini`, `pyproject.toml`, `pyrightconfig.json`, annotations
22
+ - Go: `go.mod`
23
+ - Rust: `Cargo.toml`
24
+ - Java/Kotlin/C#: project build files
25
+
26
+ 2. **Trace Type Dependencies**
27
+ - TypeScript: run or recommend `tsc --listFilesOnly` and use the TypeScript compiler API when available to identify interface, type alias, enum, generic, declaration, and ambient type dependencies.
28
+ - Python: run or recommend `mypy --show-column-numbers` or `pyright` and trace annotation/import relationships.
29
+ - Add high-confidence `imports-type` edges to `.engineering-intelligence/graph/dependency-graph.json` for type-only dependencies, with evidence paths.
30
+
31
+ 3. **Run Type Check**
32
+ - Use the project’s existing command first (`npm run typecheck`, `pnpm typecheck`, `mypy`, `pyright`, `go test`, `cargo check`, etc.).
33
+ - If no command exists, use the safest detected command and record that it was inferred.
34
+
35
+ 4. **Map Errors**
36
+ Write a Type Error Map in the active unit build/test summary:
37
+
38
+ ```markdown
39
+ ## Type Error Map
40
+ | File | Line | Column | Symbol | Error | Proposed Fix | Status |
41
+ |---|---:|---:|---|---|---|---|
42
+ ```
43
+
44
+ 5. **Fix Loop**
45
+ - Fix targeted type errors only.
46
+ - Rerun the relevant type check.
47
+ - Continue until clean or a blocker is recorded.
48
+
49
+ ## Output
50
+
51
+ Write or update `.engineering-intelligence/aidlc/construction/<unit>/build-and-test/type-safety-summary.md`:
52
+
53
+ ```markdown
54
+ # Type Safety Summary: <unit>
55
+
56
+ ## Commands
57
+ - `<command>`: <passed|failed|unavailable>
58
+
59
+ ## Type Dependency Edges
60
+ - `imports-type`: <from> -> <to> (evidence: <path>)
61
+
62
+ ## Type Error Map
63
+ <table>
64
+
65
+ ## Result
66
+ <clean|blocked|not applicable>
67
+ ```
68
+
69
+ ## Rules
70
+
71
+ - Never mark typed code complete while type errors remain unaddressed.
72
+ - If a type checker is unavailable, record `not applicable` with evidence rather than silently skipping.
73
+ - Type-only dependencies must be included in impact analysis for typed languages.
74
+
75
+ ## Quality Gates
76
+
77
+ - [ ] Type checker command was detected or explicitly unavailable
78
+ - [ ] Type-level dependencies were traced for shared types/interfaces
79
+ - [ ] `imports-type` graph edges were added or confirmed unnecessary
80
+ - [ ] Type Error Map exists for failures
81
+ - [ ] Final type status is clean, blocked with evidence, or not applicable
@@ -14,10 +14,11 @@ Use the `engineering-intelligence-skill` capability for the user's accompanying
14
14
  4. **Plan Agile + AI-DLC Work** — Update backlog, acceptance criteria, Definition of Ready, `.engineering-intelligence/aidlc/execution-plan.md`, and `aidlc-state.md`
15
15
  5. **Implement** — Make the requested code changes following established patterns
16
16
  6. **Test** — Add/update tests proportional to risk; execute and record results
17
- 7. **Validate** — Run available linters, type checks, test suites, scans, and architecture checks as environmental backpressure
18
- 8. **Sync Intelligence** — Incrementally update only affected knowledge, memory, context, event, graph artifacts, and AI-DLC artifacts
19
- 9. **Record Change** — Write `.changes/CHG-XXX-<summary>.md` referencing related reports
20
- 10. **Review Gate** — For high-risk changes, run engineering-change review before completion
17
+ 7. **Safety Gates** — Run freshness, type safety, API compatibility, migration safety, convention, acceptance-mapping, dependency-risk, and rollback gates when applicable
18
+ 8. **Validate** — Run available linters, type checks, test suites, scans, and architecture checks as environmental backpressure
19
+ 9. **Sync Intelligence** — Incrementally update only affected knowledge, memory, context, event, graph artifacts, and AI-DLC artifacts
20
+ 10. **Record Change** — Write `.changes/CHG-XXX-<summary>.md` referencing related reports and acceptance verification
21
+ 11. **Review Gate** — For high-risk changes, run engineering-change review before completion
21
22
 
22
23
  ## Completion Report
23
24
 
@@ -28,5 +29,6 @@ Finish with:
28
29
  - Synchronized intelligence artifacts
29
30
  - Related reports (IMP-XXX, REV-XXX)
30
31
  - Agile artifacts updated (backlog, stories, acceptance criteria, Definition of Done)
32
+ - Safety gates run (freshness, type, API, migration, acceptance mapping)
31
33
  - Unresolved risks or follow-ups
32
34
  - AI-DLC breadcrumb (`AI-DLC: <phase> -> <stage> -> <status>`)
@@ -30,8 +30,9 @@ Analyzes this repository thoroughly without changing product code. Produces a co
30
30
  4. **Generate Memory** — Extract durable decisions and patterns
31
31
  5. **Generate Context** — Create concise AI navigation maps
32
32
  6. **Build Graphs** — Generate evidence-backed architecture graphs
33
- 7. **Initialize AI-DLC + Agile** — Create `aidlc-state.md`, `audit.md`, `open-questions.md`, `execution-plan.md`, Agile delivery artifacts, and `construction/cross-unit-discoveries.md`
34
- 8. **Record** — Write initialization change record
33
+ 7. **Initialize AI-DLC + Agile** — Create `aidlc-state.md`, `audit.md`, `open-questions.md`, `execution-plan.md`, `checkpoints.md`, Agile delivery artifacts, and `construction/cross-unit-discoveries.md`
34
+ 8. **Audit Memory** — Run memory pruning audit and initialize `.engineering-intelligence/memory/regression-patterns.md`
35
+ 9. **Record** — Write initialization change record
35
36
 
36
37
  ## Important
37
38