engineering-intelligence 0.8.1 → 1.1.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 (60) hide show
  1. package/README.md +23 -2
  2. package/dist/adapters/index.d.ts.map +1 -1
  3. package/dist/adapters/index.js +55 -11
  4. package/dist/adapters/index.js.map +1 -1
  5. package/dist/cli/index.js +20 -2
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/installer/index.d.ts.map +1 -1
  8. package/dist/installer/index.js +2 -10
  9. package/dist/installer/index.js.map +1 -1
  10. package/dist/manifest/index.d.ts +1 -1
  11. package/dist/manifest/index.js +1 -1
  12. package/dist/templates.d.ts +4 -3
  13. package/dist/templates.d.ts.map +1 -1
  14. package/dist/templates.js +59 -1
  15. package/dist/templates.js.map +1 -1
  16. package/dist/validation/index.d.ts.map +1 -1
  17. package/dist/validation/index.js +4 -12
  18. package/dist/validation/index.js.map +1 -1
  19. package/dist/visualizer/index.d.ts.map +1 -1
  20. package/dist/visualizer/index.js +100 -5
  21. package/dist/visualizer/index.js.map +1 -1
  22. package/package.json +1 -1
  23. package/templates/canonical/agents/adversary.md +19 -0
  24. package/templates/canonical/agents/compliance-auditor.md +20 -0
  25. package/templates/canonical/agents/database-administrator.md +21 -0
  26. package/templates/canonical/agents/documentation-writer.md +19 -0
  27. package/templates/canonical/agents/engineering-orchestrator.md +49 -8
  28. package/templates/canonical/agents/performance-analyst.md +19 -0
  29. package/templates/canonical/agents/product-analyst.md +5 -1
  30. package/templates/canonical/agents/release-engineer.md +20 -0
  31. package/templates/canonical/agents/security-officer.md +21 -0
  32. package/templates/canonical/agents/site-reliability-engineer.md +19 -0
  33. package/templates/canonical/agents/system-architect.md +27 -0
  34. package/templates/canonical/agents/test-engineer.md +20 -0
  35. package/templates/canonical/rules/engineering-intelligence.md +45 -4
  36. package/templates/canonical/skills/aidlc-lifecycle-engine/SKILL.md +141 -0
  37. package/templates/canonical/skills/codebase-discovery-engine/SKILL.md +428 -0
  38. package/templates/canonical/skills/convention-detector/SKILL.md +199 -0
  39. package/templates/canonical/skills/debugging-engine/SKILL.md +189 -0
  40. package/templates/canonical/skills/engineering-intelligence-skill/SKILL.md +30 -1
  41. package/templates/canonical/skills/environmental-backpressure-engine/SKILL.md +50 -0
  42. package/templates/canonical/skills/git-intelligence-engine/SKILL.md +146 -0
  43. package/templates/canonical/skills/graph-engine/SKILL.md +30 -5
  44. package/templates/canonical/skills/greenfield-architect/SKILL.md +287 -0
  45. package/templates/canonical/skills/impact-analysis-engine/SKILL.md +12 -4
  46. package/templates/canonical/skills/incremental-sync-engine/SKILL.md +17 -0
  47. package/templates/canonical/skills/mcp-security-governor/SKILL.md +51 -0
  48. package/templates/canonical/skills/nfr-adr-governor/SKILL.md +83 -0
  49. package/templates/canonical/skills/ongoing-learning-engine/SKILL.md +175 -0
  50. package/templates/canonical/skills/operations-readiness-engine/SKILL.md +54 -0
  51. package/templates/canonical/skills/performance-analysis-engine/SKILL.md +156 -0
  52. package/templates/canonical/skills/pr-intelligence-engine/SKILL.md +127 -0
  53. package/templates/canonical/skills/requirement-scoper/SKILL.md +17 -3
  54. package/templates/canonical/skills/security-audit-engine/SKILL.md +165 -0
  55. package/templates/canonical/skills/staleness-detector/SKILL.md +185 -0
  56. package/templates/canonical/workflows/create-project.md +63 -0
  57. package/templates/canonical/workflows/discover-codebase.md +60 -0
  58. package/templates/canonical/workflows/engineering-intelligence.md +12 -8
  59. package/templates/canonical/workflows/initialize-engineering-intelligence.md +3 -1
  60. package/templates/canonical/workflows/scope-requirement.md +5 -4
@@ -0,0 +1,175 @@
1
+ ---
2
+ name: ongoing-learning-engine
3
+ description: Handles post-initialization continuous learning by detecting uncertainty, logging learning events, triggering targeted re-discovery, updating memory with newly learned patterns, tracking knowledge freshness scores, and enforcing staleness detection rules.
4
+ version: 3.0.0
5
+ ---
6
+
7
+ # Ongoing Learning Engine
8
+
9
+ Continuously maintain and improve the AI's understanding of a codebase after initial discovery. This engine activates whenever the AI encounters areas it does not understand, when code changes invalidate existing knowledge, or when knowledge freshness degrades below acceptable thresholds.
10
+
11
+ This capability does not modify product code.
12
+
13
+ ## Inputs
14
+
15
+ - Current task context (what the AI is trying to do when uncertainty is encountered)
16
+ - Repository root path
17
+ - Existing knowledge base, memory, and context documents
18
+ - Optional: specific module or area to re-learn
19
+ - Optional: trigger event (uncertainty, staleness, explicit request)
20
+
21
+ ## Trigger Conditions
22
+
23
+ The ongoing learning engine activates under these conditions:
24
+
25
+ | Trigger | Condition | Action |
26
+ |---|---|---|
27
+ | **Uncertainty encountered** | AI cannot confidently answer a question about the codebase | Log uncertainty event, initiate targeted re-discovery |
28
+ | **Staleness threshold** | Knowledge freshness score drops below 60 for a module | Trigger incremental re-scan of the stale module |
29
+ | **Code change detected** | Files in a module changed since last knowledge update | Queue module for freshness re-evaluation |
30
+ | **Explicit request** | User asks to re-learn or refresh understanding of an area | Full re-discovery of specified scope |
31
+ | **Convention drift** | Detected patterns deviate from documented conventions | Log drift event, update conventions |
32
+ | **New dependency** | A new package/dependency is added to the project | Scan and document the new dependency |
33
+
34
+ ## Procedure
35
+
36
+ 1. **Detect uncertainty** — Monitor for these uncertainty signals during any task:
37
+ - Unable to locate a file or module referenced in knowledge base
38
+ - Code structure does not match documented architecture
39
+ - An import path or API endpoint has changed
40
+ - A function signature or behavior differs from documentation
41
+ - A convention violation is found in new code (drift vs intentional change)
42
+ - Business logic encountered that has no corresponding documentation
43
+
44
+ 2. **Log uncertainty event** — Write to `.engineering-intelligence/events/uncertainty-log.md`:
45
+
46
+ ```markdown
47
+ ## <timestamp> — Uncertainty Event
48
+
49
+ - **Trigger**: <what the AI was doing>
50
+ - **Area**: <module/file/concept>
51
+ - **Type**: missing | outdated | contradictory | ambiguous
52
+ - **Severity**: low | medium | high | critical
53
+ - **Description**: <what is uncertain and why>
54
+ - **Current knowledge**: <what the existing docs say>
55
+ - **Observed reality**: <what the code actually shows>
56
+ - **Resolution**: pending | resolved | deferred
57
+ ```
58
+
59
+ 3. **Classify the uncertainty** — Determine the appropriate response:
60
+
61
+ | Type | Description | Response |
62
+ |---|---|---|
63
+ | **Missing** | No documentation exists for this area | Trigger targeted re-discovery |
64
+ | **Outdated** | Documentation exists but is stale | Trigger incremental sync of affected documents |
65
+ | **Contradictory** | Documentation contradicts code evidence | Flag for human review, update with code-as-truth |
66
+ | **Ambiguous** | Multiple interpretations are plausible | Log both interpretations, ask for clarification |
67
+
68
+ 4. **Execute targeted re-discovery** — For the specific area of uncertainty:
69
+ - Re-scan only the affected module/directory (not the full repository)
70
+ - Compare new findings against existing documentation
71
+ - Identify what changed and what is new
72
+ - Use `codebase-discovery-engine` scanning techniques but scoped to the specific area
73
+
74
+ 5. **Update knowledge** — Apply changes to the appropriate knowledge documents:
75
+ - Update knowledge base documents with corrected information
76
+ - Add `Last updated:` timestamp to modified sections
77
+ - Preserve evidence citations — update with new file paths/line numbers
78
+ - Record the update in the uncertainty log as `resolved`
79
+
80
+ 6. **Durability check** — Before writing any new pattern or fact to memory, apply these filters:
81
+ - **Will this still be relevant after 5+ more changes?** If no → do not store in memory
82
+ - **Is this a project-wide pattern or a local implementation detail?** If local → do not store in memory
83
+ - **Does this duplicate existing memory?** If yes → merge rather than add
84
+ - **Is this a transient state or a durable decision?** If transient → log in events, not memory
85
+
86
+ 7. **Track knowledge freshness** — Maintain freshness scores per module:
87
+
88
+ ```markdown
89
+ ## Knowledge Freshness Tracker
90
+
91
+ | Module | Last Scanned | Last Code Change | Freshness Score | Status |
92
+ |---|---|---|---|---|
93
+ | auth/ | 2024-01-15 | 2024-01-20 | 45 | 🔴 Stale |
94
+ | api/ | 2024-01-18 | 2024-01-18 | 95 | 🟢 Fresh |
95
+ | ... | ... | ... | ... | ... |
96
+ ```
97
+
98
+ **Freshness score calculation:**
99
+ - Start at 100 when a module is scanned
100
+ - Subtract 5 points per day since last scan if code has changed
101
+ - Subtract 2 points per day since last scan if code has NOT changed (knowledge can still drift)
102
+ - Subtract 10 points per file changed in module since last scan
103
+ - Floor at 0, cap at 100
104
+
105
+ 8. **Staleness detection** — Apply these rules continuously:
106
+
107
+ | Rule | Threshold | Action |
108
+ |---|---|---|
109
+ | Module freshness < 60 | Score drops below 60 | Queue for targeted re-discovery |
110
+ | Module freshness < 30 | Score drops below 30 | Flag as critical, prioritize re-discovery |
111
+ | No scan in 30 days | 30 days elapsed | Flag for freshness check regardless of score |
112
+ | >10 files changed since scan | File change count | Trigger immediate re-scan |
113
+ | Architecture document stale | Any architecture doc with freshness < 50 | Trigger full architecture re-assessment |
114
+
115
+ 9. **Generate learning summary** — Periodically (or on request) produce a learning summary:
116
+
117
+ ```markdown
118
+ ## Learning Summary — <date range>
119
+
120
+ ### Uncertainty Events
121
+ - Total events: <N>
122
+ - Resolved: <N>
123
+ - Pending: <N>
124
+ - Deferred: <N>
125
+
126
+ ### Knowledge Updates
127
+ - Documents updated: <list>
128
+ - Memory entries added: <N>
129
+ - Memory entries revised: <N>
130
+ - Memory entries retired: <N>
131
+
132
+ ### Freshness Overview
133
+ - Modules scanned: <N>
134
+ - Average freshness: <score>
135
+ - Stale modules (< 60): <list>
136
+ - Critical modules (< 30): <list>
137
+
138
+ ### Patterns Learned
139
+ - <new patterns discovered this period>
140
+
141
+ ### Open Questions
142
+ - <questions that need human input>
143
+ ```
144
+
145
+ ## Output Files
146
+
147
+ | File | Purpose |
148
+ |---|---|
149
+ | `.engineering-intelligence/events/uncertainty-log.md` | Append-only log of all uncertainty events |
150
+ | `.engineering-intelligence/reports/FRESHNESS-report.md` | Current freshness scores per module (shared with `staleness-detector`) |
151
+ | Updated knowledge base documents | Corrected or expanded knowledge |
152
+ | Updated memory documents | New durable patterns and decisions |
153
+
154
+ ## Quality Gates
155
+
156
+ - [ ] Every uncertainty event is logged before any re-discovery begins
157
+ - [ ] Uncertainty events include type, severity, and description
158
+ - [ ] Targeted re-discovery scopes to the affected module only (not full repo)
159
+ - [ ] Durability check is applied before any memory write
160
+ - [ ] Knowledge freshness scores are calculated using the defined formula
161
+ - [ ] Staleness thresholds trigger appropriate actions
162
+ - [ ] Updated documents preserve evidence citation format
163
+ - [ ] Learning summary is accurate and reflects actual events
164
+ - [ ] No transient implementation details are stored in memory
165
+ - [ ] Contradictory findings are flagged for human review (not silently resolved)
166
+
167
+ ## Cross-References
168
+
169
+ - Depends on: `codebase-discovery-engine` (for targeted re-discovery techniques)
170
+ - Uses: `staleness-detector` (for freshness scoring), `incremental-sync-engine` (for knowledge updates)
171
+ - Consumed by: `engineering-intelligence-skill`, `engineering-orchestrator`
172
+ - Feeds into: `.engineering-intelligence/events/uncertainty-log.md`, all knowledge base documents
173
+ - Related: `convention-detector` (for convention drift detection)
174
+
175
+ This capability does not modify product code.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: operations-readiness-engine
3
+ description: Produces deployment, observability, rollback, and runbook readiness artifacts for production-bound AI-DLC changes.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Operations Readiness Engine
8
+
9
+ Use this skill when a change affects deployment, infrastructure, runtime behavior, SLOs, data migrations, incident response, or production monitoring.
10
+
11
+ ## Procedure
12
+
13
+ 1. Identify deployment target, environment variables, infrastructure files, CI/CD gates, and runtime services.
14
+ 2. Define release strategy: normal deploy, canary, blue/green, feature flag, or manual rollout.
15
+ 3. Define rollback plan and data recovery constraints.
16
+ 4. Define observability: metrics, traces, logs, dashboards, alerts, and ownership.
17
+ 5. Confirm production readiness with objective gates.
18
+
19
+ ## Outputs
20
+
21
+ Write `.engineering-intelligence/aidlc/operations/operations-readiness.md`:
22
+
23
+ ```markdown
24
+ # Operations Readiness
25
+
26
+ ## Deployment Scope
27
+ - <services, packages, infrastructure>
28
+
29
+ ## Release Strategy
30
+ - Strategy: <normal|canary|blue-green|feature-flag|manual>
31
+ - Human approvals required: <yes/no and why>
32
+
33
+ ## Observability
34
+ | Signal | Source | Threshold | Owner | Runbook |
35
+ |---|---|---|---|---|
36
+
37
+ ## Rollback
38
+ - Code rollback:
39
+ - Data rollback:
40
+ - Configuration rollback:
41
+
42
+ ## Readiness Gates
43
+ - [ ] Build passes
44
+ - [ ] Tests pass
45
+ - [ ] Migrations are backward compatible or downtime is approved
46
+ - [ ] Alerts/runbooks exist for changed failure modes
47
+ - [ ] Secrets and environment variables are documented securely
48
+ ```
49
+
50
+ ## Rules
51
+
52
+ - Never execute production deployment without explicit user approval.
53
+ - Mark unknown production constraints in `open-questions.md`.
54
+ - For database changes, require backward-compatible migration planning unless downtime is approved.
@@ -0,0 +1,156 @@
1
+ ---
2
+ name: performance-analysis-engine
3
+ description: Identifies performance issues through static analysis of database query patterns, frontend bundle size, render performance, API response patterns, and caching opportunities. Use during initialization, before releases, or when performance-sensitive changes are detected.
4
+ version: 3.0.0
5
+ ---
6
+
7
+ # Performance Analysis Engine
8
+
9
+ Identify performance risks and optimization opportunities through evidence-based static analysis of code patterns, queries, bundles, and caching strategies.
10
+
11
+ ## Inputs
12
+
13
+ - Repository root path
14
+ - Mode: `full` (comprehensive analysis) or `targeted` (specific area or post-change)
15
+ - Optional: scope constraints (specific modules, change diff)
16
+ - Optional: previous assessment (`knowledge-base/21-performance-assessment.md`) for delta comparison
17
+
18
+ ## Procedure
19
+
20
+ 1. **Database Query Pattern Analysis** — Scan data access layers for:
21
+
22
+ | Pattern | Risk | Detection Method |
23
+ |---|---|---|
24
+ | N+1 queries | High | Loop containing query calls, ORM eager/lazy loading misuse |
25
+ | Missing indexes | Medium | Queries filtering/sorting on non-indexed columns |
26
+ | Unbounded queries | High | SELECT without LIMIT, missing pagination |
27
+ | Full table scans | Medium | Queries without WHERE clauses on large tables |
28
+ | Unnecessary joins | Low | Joins fetching unused columns |
29
+ | Missing connection pooling | Medium | New connection per request pattern |
30
+
31
+ Cross-reference with schema definitions and ORM configuration.
32
+
33
+ 2. **Bundle Size Analysis** (frontend projects) — Assess:
34
+
35
+ | Check | Description |
36
+ |---|---|
37
+ | Bundle composition | Identify largest dependencies by size contribution |
38
+ | Tree-shaking gaps | Imports that prevent effective tree-shaking |
39
+ | Code splitting | Missing dynamic imports for route-level splitting |
40
+ | Duplicate dependencies | Same library bundled at multiple versions |
41
+ | Dead code | Exported modules never imported elsewhere |
42
+ | Asset optimization | Uncompressed images, unminified resources |
43
+
44
+ Read build configuration (webpack, vite, esbuild, etc.) to understand current optimization setup.
45
+
46
+ 3. **Render Performance Patterns** (frontend projects) — Identify:
47
+
48
+ | Pattern | Risk | Detection Method |
49
+ |---|---|---|
50
+ | Unnecessary re-renders | High | Components without memoization receiving stable props |
51
+ | Missing `useMemo`/`useCallback` | Medium | Expensive computations in render path |
52
+ | Large component trees | Medium | Deeply nested components without virtualization |
53
+ | Layout thrashing | High | DOM reads interleaved with writes |
54
+ | Missing virtualization | High | Lists rendering >100 items without windowing |
55
+ | Unoptimized images | Medium | Missing lazy loading, no responsive sizes |
56
+
57
+ 4. **API Response Time Patterns** — Analyze:
58
+
59
+ | Check | Description |
60
+ |---|---|
61
+ | Waterfall requests | Sequential API calls that could be parallelized |
62
+ | Over-fetching | Endpoints returning significantly more data than consumed |
63
+ | Under-fetching | Multiple requests needed where one could suffice |
64
+ | Missing pagination | List endpoints without page size limits |
65
+ | Synchronous heavy operations | Long-running tasks blocking request handlers |
66
+ | Missing timeouts | External API calls without timeout configuration |
67
+
68
+ 5. **Caching Opportunities** — Identify:
69
+
70
+ | Opportunity | Evidence |
71
+ |---|---|
72
+ | Repeated identical queries | Same query executed multiple times per request |
73
+ | Static data fetched dynamically | Configuration or reference data loaded on every request |
74
+ | Missing HTTP cache headers | Responses for stable resources without Cache-Control |
75
+ | Computation-heavy endpoints | Endpoints with expensive but deterministic calculations |
76
+ | Missing CDN utilization | Static assets served from application server |
77
+ | Session/user-level caching | Per-user data re-fetched on every request |
78
+
79
+ Review existing caching infrastructure (Redis, Memcached, in-memory, HTTP) and identify gaps.
80
+
81
+ 6. **Generate Assessment** — Write findings to `knowledge-base/21-performance-assessment.md`.
82
+
83
+ ## Output Format
84
+
85
+ Write `knowledge-base/21-performance-assessment.md`:
86
+
87
+ ```markdown
88
+ # Performance Assessment
89
+
90
+ ## Meta
91
+ - Generated: <ISO timestamp>
92
+ - Mode: full | targeted
93
+ - Scope: <what was examined>
94
+ - Overall risk: low | medium | high | critical
95
+
96
+ ## Database Query Patterns
97
+ | Issue | Location | Risk | Recommendation |
98
+ |---|---|---|---|
99
+ | N+1 query | src/users/service.ts:45 | High | Add eager loading for user.posts |
100
+
101
+ ## Bundle Analysis
102
+ | Metric | Value | Status |
103
+ |---|---|---|
104
+ | Total bundle size | 1.2 MB | concern |
105
+ | Largest dependency | moment.js (320 KB) | Replace with date-fns |
106
+
107
+ ## Render Performance
108
+ | Issue | Component | Risk | Recommendation |
109
+ |---|---|---|---|
110
+ | Missing memoization | UserList | Medium | Wrap with React.memo |
111
+
112
+ ## API Patterns
113
+ | Issue | Endpoint | Risk | Recommendation |
114
+ |---|---|---|---|
115
+ | Waterfall requests | /dashboard | High | Parallelize data fetching |
116
+
117
+ ## Caching Opportunities
118
+ | Opportunity | Location | Impact |
119
+ |---|---|---|
120
+ | Static config fetched per request | src/config/loader.ts | High |
121
+
122
+ ## Recommendations
123
+ 1. <prioritized optimization actions with estimated impact>
124
+
125
+ ## Evidence
126
+ - <file path citations for all findings>
127
+
128
+ ---
129
+ *This performance assessment did not modify product code.*
130
+ ```
131
+
132
+ ## Rules
133
+
134
+ - Every finding must cite a specific file path and line number or code pattern
135
+ - Risk assessment must consider actual usage patterns, not theoretical worst cases
136
+ - Bundle analysis findings must reference build configuration evidence
137
+ - Do not recommend premature optimization — prioritize by measured or evidenced impact
138
+ - This capability is analytical only — it must not modify product code
139
+
140
+ ## Quality Gates
141
+
142
+ - [ ] All findings cite specific file paths or code patterns
143
+ - [ ] Database query issues distinguish between ORM-generated and raw queries
144
+ - [ ] Bundle analysis references build configuration
145
+ - [ ] Render performance findings are framework-aware (React, Vue, Angular, etc.)
146
+ - [ ] Caching recommendations consider existing infrastructure
147
+ - [ ] Recommendations are prioritized by estimated impact
148
+ - [ ] Report ends with the "did not modify product code" statement
149
+
150
+ ## Cross-References
151
+
152
+ - Depends on: `deep-project-knowledge-extractor` (project structure and technology understanding)
153
+ - Used by: `engineering-intelligence-skill`, `impact-analysis-engine` (performance risk scoring)
154
+ - Updates: `knowledge-base/21-performance-assessment.md`
155
+
156
+ This capability is analytical only. It must not modify product code.
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: pr-intelligence-engine
3
+ description: Generates intelligent PR descriptions, reviewer suggestions, impact summaries, and split recommendations from change records and git intelligence. Use before submitting or reviewing pull requests.
4
+ version: 3.0.0
5
+ ---
6
+
7
+ # PR Intelligence Engine
8
+
9
+ Produce evidence-backed PR artifacts that accelerate review cycles and improve change quality.
10
+
11
+ ## Inputs
12
+
13
+ - Change records from `.changes/CHG-XXX-*.md`
14
+ - Git diff or commit range for the PR
15
+ - Ownership mapping from `git-intelligence-engine` (`.engineering-intelligence/reports/GIT-intelligence.md`)
16
+ - Impact report from `impact-analysis-engine` (when available)
17
+ - Architecture decisions from `knowledge-base/`
18
+
19
+ ## Procedure
20
+
21
+ 1. **Analyze Change Scope** — Parse the diff or commit range to determine:
22
+ - Files modified, added, deleted
23
+ - Total lines changed (additions + deletions)
24
+ - Modules touched (distinct top-level directories or packages)
25
+ - Change classification (feature, bugfix, refactor, infrastructure, docs)
26
+
27
+ 2. **Generate PR Description** — From change records and diff, produce:
28
+
29
+ ```markdown
30
+ ## What
31
+ <concise summary of what changed and why>
32
+
33
+ ## Why
34
+ <link to change record CHG-XXX, issue/ticket if available>
35
+
36
+ ## How
37
+ <technical approach summary — key design decisions>
38
+
39
+ ## Impact
40
+ <blast radius summary from impact analysis>
41
+
42
+ ## Testing
43
+ <tests added/modified, validation performed>
44
+
45
+ ## Migration / Rollback
46
+ <if applicable — schema changes, feature flags, rollback steps>
47
+ ```
48
+
49
+ 3. **Suggest Reviewers** — Using ownership mapping from `git-intelligence-engine`:
50
+
51
+ | Priority | Criteria |
52
+ |---|---|
53
+ | Required | Primary owner of any modified module |
54
+ | Recommended | Secondary owner with recent activity in modified files |
55
+ | Optional | Contributors to change-coupled files not in the diff |
56
+ | Domain expert | Owner of upstream/downstream modules from impact analysis |
57
+
58
+ Flag when no active owner exists for a modified module (orphaned module risk).
59
+
60
+ 4. **Generate Impact Summary** — Produce a reviewer-focused impact digest:
61
+ - Risk level (from impact report or assessed from diff)
62
+ - Breaking changes (API contracts, schema migrations)
63
+ - Cross-service effects (if any)
64
+ - Intelligence artifacts that will need sync after merge
65
+
66
+ 5. **Evaluate PR Size and Suggest Split** — If the PR exceeds thresholds:
67
+
68
+ | Metric | Threshold | Action |
69
+ |---|---|---|
70
+ | Total lines changed | >500 | Suggest split |
71
+ | Modules touched | >3 | Suggest split |
72
+ | Mixed concerns | Feature + refactor | Suggest split |
73
+ | Schema + code | Migration + logic | Suggest split |
74
+
75
+ When suggesting split, propose concrete split boundaries:
76
+ - Group by module or concern
77
+ - Identify which changes can land independently
78
+ - Suggest merge order if dependencies exist between splits
79
+
80
+ 6. **Check Architecture Compliance** — Compare changes against:
81
+ - `knowledge-base/05-architecture-decisions.md` (ADRs)
82
+ - `knowledge-base/06-conventions-and-standards.md`
83
+ - Module boundary rules from `dependency-graph.json`
84
+
85
+ Flag violations with evidence:
86
+
87
+ | Violation Type | Example |
88
+ |---|---|
89
+ | Dependency direction | Service A importing from Service B's internals |
90
+ | Convention breach | Naming pattern, file structure deviation |
91
+ | ADR contradiction | Change conflicts with recorded architecture decision |
92
+ | Missing ADR | Architectural change without corresponding decision record |
93
+
94
+ ## Output Format
95
+
96
+ Generate the following artifacts (do not write to the repository — present to the user):
97
+
98
+ - **PR description** — Markdown ready to paste into PR body
99
+ - **Reviewer suggestions** — Ranked list with rationale
100
+ - **Impact summary** — Reviewer-focused digest
101
+ - **Split recommendations** — Only if thresholds are exceeded
102
+ - **Architecture flags** — Only if violations are detected
103
+
104
+ ## Rules
105
+
106
+ - PR descriptions must reference change records (CHG-XXX) when available
107
+ - Reviewer suggestions must cite ownership evidence, not guess from file paths
108
+ - Never suppress architecture violations — always surface them
109
+ - Split suggestions must include concrete boundaries, not vague advice
110
+ - This capability is analytical only — it must not modify product code
111
+
112
+ ## Quality Gates
113
+
114
+ - [ ] PR description covers what, why, how, impact, and testing
115
+ - [ ] Reviewer suggestions cite ownership data with evidence
116
+ - [ ] Impact summary includes risk level and blast radius
117
+ - [ ] Split recommendations (if any) propose concrete boundaries
118
+ - [ ] Architecture violations cite specific ADRs or conventions breached
119
+ - [ ] All claims reference change records, diffs, or intelligence artifacts
120
+
121
+ ## Cross-References
122
+
123
+ - Depends on: `git-intelligence-engine` (ownership mapping), `impact-analysis-engine` (impact reports), `change-detection-engine` (change records)
124
+ - Used by: `engineering-intelligence-skill`
125
+ - Consumed by: `engineering-change-review`
126
+
127
+ This capability is analytical only. It must not modify product code.
@@ -24,13 +24,14 @@ Act as a detailed Business Analyst and Technical Architect persona. Analyze the
24
24
 
25
25
  2. **Formulate Scoping Questions** — Identify gaps, ambiguities, and edge cases. Ask the user 3 to 5 targeted questions covering:
26
26
  - **Business Value & Scope**: What are the limits of the MVP?
27
+ - **Agile Story Shape**: What user role, user goal, priority, dependencies, and release expectation apply?
27
28
  - **Technical Strategy**: Which specific database, caching, or third-party integrations are expected?
28
29
  - **Edge Cases**: How should errors, rate limits, or validation failures be handled?
29
30
  - **UI/UX (if applicable)**: What configuration or user feedback is expected?
30
31
 
31
32
  3. **Iterate with User** — Wait for user responses. Adjust assumptions based on their answers.
32
33
 
33
- 4. **Generate Final Requirement Prompt** — Once requirements are clear, output a comprehensive requirements document to `knowledge-base/19-requirements.md` and formulate the finalized prompt for the development agent.
34
+ 4. **Generate Final Requirement Prompt** — Once requirements are clear, output a comprehensive requirements document to `knowledge-base/19-requirements.md`, update Agile artifacts under `.engineering-intelligence/aidlc/agile/`, and formulate the finalized prompt for the development agent.
34
35
 
35
36
  ## Output Format
36
37
 
@@ -47,10 +48,21 @@ The final requirements document `knowledge-base/19-requirements.md` must follow
47
48
  - **System Boundaries & Dependencies**: <Files/modules affected based on graph mappings>
48
49
  - **Edge Cases & Failure Modes**: <Exactly how to handle failures, retries, limits>
49
50
 
50
- ## 3. Iterated QA Log
51
+ ## 3. Agile Delivery Model
52
+ - **Epic**: <epic or initiative>
53
+ - **User Story**: As a <persona>, I want <capability>, so that <outcome>.
54
+ - **Priority**: <P0/P1/P2 or project convention>
55
+ - **Acceptance Criteria**:
56
+ - Given <context>, when <action>, then <observable result>.
57
+ - **Definition of Ready**:
58
+ - <ready gate status>
59
+ - **Definition of Done**:
60
+ - <done gate expectations>
61
+
62
+ ## 4. Iterated QA Log
51
63
  <Questions asked and answers received during scoping>
52
64
 
53
- ## 4. Finalized Implementation Prompt
65
+ ## 5. Finalized Implementation Prompt
54
66
  Provide the exact prompt to pass to the coding agent to execute this change:
55
67
  ```text
56
68
  /engineering-intelligence <Fully detailed requirements and file scope here>
@@ -62,10 +74,12 @@ Provide the exact prompt to pass to the coding agent to execute this change:
62
74
  - **Do not modify product code** — this skill is strictly for scoping and analysis.
63
75
  - Do not make assumptions on ambiguities; always ask clarifying questions.
64
76
  - Base questions and plans on project graph mappings and existing memory files.
77
+ - Keep Agile artifacts synchronized with the final requirement prompt.
65
78
 
66
79
  ## Quality Gates
67
80
 
68
81
  - [ ] Clear business goals and technical boundaries defined.
69
82
  - [ ] At least 3 scoping questions asked and logged.
83
+ - [ ] User story, acceptance criteria, priority, dependencies, and Ready/Done gates are documented.
70
84
  - [ ] Finalized prompt maps exact files and modules.
71
85
  - [ ] Output does not contain any code modification.