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.
- package/README.md +23 -2
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +55 -11
- package/dist/adapters/index.js.map +1 -1
- package/dist/cli/index.js +20 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +2 -10
- package/dist/installer/index.js.map +1 -1
- package/dist/manifest/index.d.ts +1 -1
- package/dist/manifest/index.js +1 -1
- package/dist/templates.d.ts +4 -3
- package/dist/templates.d.ts.map +1 -1
- package/dist/templates.js +59 -1
- package/dist/templates.js.map +1 -1
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +4 -12
- package/dist/validation/index.js.map +1 -1
- package/dist/visualizer/index.d.ts.map +1 -1
- package/dist/visualizer/index.js +100 -5
- package/dist/visualizer/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/canonical/agents/adversary.md +19 -0
- package/templates/canonical/agents/compliance-auditor.md +20 -0
- package/templates/canonical/agents/database-administrator.md +21 -0
- package/templates/canonical/agents/documentation-writer.md +19 -0
- package/templates/canonical/agents/engineering-orchestrator.md +49 -8
- package/templates/canonical/agents/performance-analyst.md +19 -0
- package/templates/canonical/agents/product-analyst.md +5 -1
- package/templates/canonical/agents/release-engineer.md +20 -0
- package/templates/canonical/agents/security-officer.md +21 -0
- package/templates/canonical/agents/site-reliability-engineer.md +19 -0
- package/templates/canonical/agents/system-architect.md +27 -0
- package/templates/canonical/agents/test-engineer.md +20 -0
- package/templates/canonical/rules/engineering-intelligence.md +45 -4
- package/templates/canonical/skills/aidlc-lifecycle-engine/SKILL.md +141 -0
- package/templates/canonical/skills/codebase-discovery-engine/SKILL.md +428 -0
- package/templates/canonical/skills/convention-detector/SKILL.md +199 -0
- package/templates/canonical/skills/debugging-engine/SKILL.md +189 -0
- package/templates/canonical/skills/engineering-intelligence-skill/SKILL.md +30 -1
- package/templates/canonical/skills/environmental-backpressure-engine/SKILL.md +50 -0
- package/templates/canonical/skills/git-intelligence-engine/SKILL.md +146 -0
- package/templates/canonical/skills/graph-engine/SKILL.md +30 -5
- package/templates/canonical/skills/greenfield-architect/SKILL.md +287 -0
- package/templates/canonical/skills/impact-analysis-engine/SKILL.md +12 -4
- package/templates/canonical/skills/incremental-sync-engine/SKILL.md +17 -0
- package/templates/canonical/skills/mcp-security-governor/SKILL.md +51 -0
- package/templates/canonical/skills/nfr-adr-governor/SKILL.md +83 -0
- package/templates/canonical/skills/ongoing-learning-engine/SKILL.md +175 -0
- package/templates/canonical/skills/operations-readiness-engine/SKILL.md +54 -0
- package/templates/canonical/skills/performance-analysis-engine/SKILL.md +156 -0
- package/templates/canonical/skills/pr-intelligence-engine/SKILL.md +127 -0
- package/templates/canonical/skills/requirement-scoper/SKILL.md +17 -3
- package/templates/canonical/skills/security-audit-engine/SKILL.md +165 -0
- package/templates/canonical/skills/staleness-detector/SKILL.md +185 -0
- package/templates/canonical/workflows/create-project.md +63 -0
- package/templates/canonical/workflows/discover-codebase.md +60 -0
- package/templates/canonical/workflows/engineering-intelligence.md +12 -8
- package/templates/canonical/workflows/initialize-engineering-intelligence.md +3 -1
- package/templates/canonical/workflows/scope-requirement.md +5 -4
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-audit-engine
|
|
3
|
+
description: Performs evidence-based security audits covering dependency vulnerabilities, auth/authz patterns, secrets detection, OWASP Top 10 compliance, and input validation. Use during initialization, before releases, or when security-sensitive changes are detected.
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Security Audit Engine
|
|
8
|
+
|
|
9
|
+
Identify security risks through systematic, evidence-backed analysis of dependencies, authentication patterns, secrets hygiene, and input handling.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- Repository root path
|
|
14
|
+
- Mode: `full` (comprehensive audit) or `targeted` (specific area or post-change)
|
|
15
|
+
- Optional: scope constraints (specific modules, change diff)
|
|
16
|
+
- Optional: previous assessment (`knowledge-base/20-security-assessment.md`) for delta comparison
|
|
17
|
+
|
|
18
|
+
## Procedure
|
|
19
|
+
|
|
20
|
+
1. **Dependency Vulnerability Scanning** — Parse lock files and manifests:
|
|
21
|
+
|
|
22
|
+
| File | Ecosystem |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `package-lock.json` / `yarn.lock` / `pnpm-lock.yaml` | npm |
|
|
25
|
+
| `Pipfile.lock` / `requirements.txt` | Python |
|
|
26
|
+
| `Cargo.lock` | Rust |
|
|
27
|
+
| `go.sum` | Go |
|
|
28
|
+
| `Gemfile.lock` | Ruby |
|
|
29
|
+
| `composer.lock` | PHP |
|
|
30
|
+
|
|
31
|
+
For each dependency:
|
|
32
|
+
- Check version against known CVE databases (cite CVE IDs)
|
|
33
|
+
- Flag dependencies with no updates in >12 months (abandonment risk)
|
|
34
|
+
- Identify transitive dependencies with known vulnerabilities
|
|
35
|
+
- Note severity: critical, high, medium, low
|
|
36
|
+
|
|
37
|
+
2. **Auth/Authz Pattern Review** — Analyze authentication and authorization:
|
|
38
|
+
|
|
39
|
+
| Check | What to Look For |
|
|
40
|
+
|---|---|
|
|
41
|
+
| Auth mechanism | JWT, session, OAuth, API keys — identify which is used |
|
|
42
|
+
| Token handling | Storage (cookies, localStorage), expiration, refresh flow |
|
|
43
|
+
| Password handling | Hashing algorithm, salt usage, strength validation |
|
|
44
|
+
| Permission model | RBAC, ABAC, ACL — identify and assess |
|
|
45
|
+
| Route protection | Unprotected endpoints that should require auth |
|
|
46
|
+
| Privilege escalation | Missing authorization checks on sensitive operations |
|
|
47
|
+
| Session management | Fixation prevention, timeout, invalidation |
|
|
48
|
+
|
|
49
|
+
3. **Secrets Detection** — Scan for exposed credentials:
|
|
50
|
+
|
|
51
|
+
| Pattern | Risk |
|
|
52
|
+
|---|---|
|
|
53
|
+
| Hardcoded API keys / tokens | Critical |
|
|
54
|
+
| Database connection strings with passwords | Critical |
|
|
55
|
+
| Private keys committed to repository | Critical |
|
|
56
|
+
| `.env` files without `.gitignore` coverage | High |
|
|
57
|
+
| Secrets in CI/CD configuration | High |
|
|
58
|
+
| Default/test credentials in non-test code | Medium |
|
|
59
|
+
| Comments containing sensitive URLs or tokens | Medium |
|
|
60
|
+
|
|
61
|
+
Check `.gitignore` for adequate secret file exclusions.
|
|
62
|
+
|
|
63
|
+
4. **OWASP Top 10 Checklist** — Assess against current OWASP Top 10:
|
|
64
|
+
|
|
65
|
+
| # | Category | Assessment |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| A01 | Broken Access Control | Check route guards, CORS, directory traversal |
|
|
68
|
+
| A02 | Cryptographic Failures | Check TLS, hashing, encryption at rest |
|
|
69
|
+
| A03 | Injection | Check SQL, NoSQL, OS command, LDAP injection |
|
|
70
|
+
| A04 | Insecure Design | Check business logic flaws, missing rate limits |
|
|
71
|
+
| A05 | Security Misconfiguration | Check default configs, verbose errors, headers |
|
|
72
|
+
| A06 | Vulnerable Components | Cross-ref with dependency scan results |
|
|
73
|
+
| A07 | Auth Failures | Cross-ref with auth/authz review |
|
|
74
|
+
| A08 | Data Integrity Failures | Check deserialization, CI/CD pipeline integrity |
|
|
75
|
+
| A09 | Logging Failures | Check audit logging, sensitive data in logs |
|
|
76
|
+
| A10 | SSRF | Check URL handling, outbound request validation |
|
|
77
|
+
|
|
78
|
+
Rate each as: `pass`, `concern`, `fail`, or `not-applicable`.
|
|
79
|
+
|
|
80
|
+
5. **Input Validation Pattern Review** — Assess input handling:
|
|
81
|
+
|
|
82
|
+
| Check | Description |
|
|
83
|
+
|---|---|
|
|
84
|
+
| Schema validation | Are API inputs validated against schemas? |
|
|
85
|
+
| Sanitization | Is user input sanitized before use? |
|
|
86
|
+
| File upload | Are uploads validated (type, size, content)? |
|
|
87
|
+
| Query parameters | Are query params validated and typed? |
|
|
88
|
+
| Output encoding | Is output encoded to prevent XSS? |
|
|
89
|
+
| Rate limiting | Are endpoints rate-limited? |
|
|
90
|
+
|
|
91
|
+
6. **Generate Assessment** — Write findings to `knowledge-base/20-security-assessment.md`.
|
|
92
|
+
|
|
93
|
+
## Output Format
|
|
94
|
+
|
|
95
|
+
Write `knowledge-base/20-security-assessment.md`:
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
# Security Assessment
|
|
99
|
+
|
|
100
|
+
## Meta
|
|
101
|
+
- Generated: <ISO timestamp>
|
|
102
|
+
- Mode: full | targeted
|
|
103
|
+
- Scope: <what was examined>
|
|
104
|
+
- Overall risk: low | medium | high | critical
|
|
105
|
+
|
|
106
|
+
## Dependency Vulnerabilities
|
|
107
|
+
| Dependency | Version | CVE | Severity | Fix Available |
|
|
108
|
+
|---|---|---|---|---|
|
|
109
|
+
| lodash | 4.17.15 | CVE-2020-8203 | High | Yes (4.17.21) |
|
|
110
|
+
|
|
111
|
+
## Auth/Authz Assessment
|
|
112
|
+
- Mechanism: <description>
|
|
113
|
+
- Findings: <issues found>
|
|
114
|
+
- Risk: <level>
|
|
115
|
+
|
|
116
|
+
## Secrets Scan
|
|
117
|
+
| Finding | File | Risk | Remediation |
|
|
118
|
+
|---|---|---|---|
|
|
119
|
+
| Hardcoded API key | src/config.ts:42 | Critical | Move to env variable |
|
|
120
|
+
|
|
121
|
+
## OWASP Top 10
|
|
122
|
+
| # | Category | Status | Evidence |
|
|
123
|
+
|---|---|---|---|
|
|
124
|
+
| A01 | Broken Access Control | concern | <finding> |
|
|
125
|
+
|
|
126
|
+
## Input Validation
|
|
127
|
+
| Area | Status | Evidence |
|
|
128
|
+
|---|---|---|
|
|
129
|
+
| API schema validation | pass | Uses Zod on all endpoints |
|
|
130
|
+
|
|
131
|
+
## Recommendations
|
|
132
|
+
1. <prioritized remediation actions>
|
|
133
|
+
|
|
134
|
+
## Evidence
|
|
135
|
+
- <file path citations for all findings>
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
*This security assessment did not modify product code.*
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Rules
|
|
142
|
+
|
|
143
|
+
- Never assume a vulnerability exists without evidence — cite file paths and line numbers
|
|
144
|
+
- Flag severity honestly — do not inflate or suppress findings
|
|
145
|
+
- Secrets detection must not log or expose the actual secret values in reports
|
|
146
|
+
- Mark `not-applicable` for OWASP categories genuinely irrelevant to the project
|
|
147
|
+
- This capability is analytical only — it must not modify product code
|
|
148
|
+
|
|
149
|
+
## Quality Gates
|
|
150
|
+
|
|
151
|
+
- [ ] All dependency vulnerabilities cite CVE IDs and affected versions
|
|
152
|
+
- [ ] Auth/authz review covers both authentication and authorization
|
|
153
|
+
- [ ] Secrets scan does not expose actual secret values in the report
|
|
154
|
+
- [ ] OWASP Top 10 items each have a status with evidence or rationale
|
|
155
|
+
- [ ] Input validation assessment covers API boundaries
|
|
156
|
+
- [ ] Recommendations are prioritized by severity
|
|
157
|
+
- [ ] Report ends with the "did not modify product code" statement
|
|
158
|
+
|
|
159
|
+
## Cross-References
|
|
160
|
+
|
|
161
|
+
- Depends on: `deep-project-knowledge-extractor` (project structure understanding)
|
|
162
|
+
- Used by: `engineering-intelligence-skill`, `impact-analysis-engine` (security risk scoring)
|
|
163
|
+
- Updates: `knowledge-base/20-security-assessment.md`
|
|
164
|
+
|
|
165
|
+
This capability is analytical only. It must not modify product code.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: staleness-detector
|
|
3
|
+
description: Compares knowledge-base document timestamps against related source file modification times, scores each document 0-100 for freshness, triggers incremental sync when freshness drops below threshold, and adds freshness metadata to document headers.
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Staleness Detector
|
|
8
|
+
|
|
9
|
+
Monitor the freshness of all engineering intelligence documents by comparing their last-updated timestamps against the modification times of the source files they describe. Produce a freshness report and trigger incremental sync for stale documents.
|
|
10
|
+
|
|
11
|
+
This capability does not modify product code.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
|
|
15
|
+
- Repository root path
|
|
16
|
+
- Knowledge base directory (`knowledge-base/`)
|
|
17
|
+
- Memory directory (`.engineering-intelligence/memory/`)
|
|
18
|
+
- Context directory (`.engineering-intelligence/context/`)
|
|
19
|
+
- Optional: specific document or module to check
|
|
20
|
+
- Optional: custom freshness threshold (default: 60)
|
|
21
|
+
|
|
22
|
+
## Procedure
|
|
23
|
+
|
|
24
|
+
1. **Inventory knowledge documents** — Enumerate all documents in:
|
|
25
|
+
- `knowledge-base/*.md` (00 through 16)
|
|
26
|
+
- `.engineering-intelligence/memory/*.md`
|
|
27
|
+
- `.engineering-intelligence/context/*.md`
|
|
28
|
+
- `.engineering-intelligence/graph/*.json`
|
|
29
|
+
|
|
30
|
+
For each document, extract:
|
|
31
|
+
- Document path
|
|
32
|
+
- Last modified timestamp (from filesystem or frontmatter `last_updated` field)
|
|
33
|
+
- Evidence citations within the document (file paths referenced)
|
|
34
|
+
|
|
35
|
+
2. **Extract evidence dependencies** — For each knowledge document, parse all evidence citations to build a dependency map:
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
## Document Dependencies
|
|
39
|
+
|
|
40
|
+
| Document | Depends On (Source Files) |
|
|
41
|
+
|---|---|
|
|
42
|
+
| `02-architecture.md` | `src/app/`, `src/server/`, `next.config.mjs` |
|
|
43
|
+
| `05-database.md` | `prisma/schema.prisma`, `src/db/`, `migrations/` |
|
|
44
|
+
| `06-authentication.md` | `src/auth/`, `auth.config.ts`, `middleware.ts` |
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
3. **Check source file modification times** — For each source file referenced by a knowledge document:
|
|
48
|
+
- Get the file's last modification time via `git log -1 --format=%cI -- <path>` (preferred) or filesystem mtime
|
|
49
|
+
- Compare against the knowledge document's last-updated timestamp
|
|
50
|
+
- Track files that no longer exist (deleted or moved)
|
|
51
|
+
|
|
52
|
+
4. **Calculate freshness score** — Score each document 0–100 using this formula:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
base_score = 100
|
|
56
|
+
|
|
57
|
+
For each referenced source file:
|
|
58
|
+
days_since_doc_update = (now - document_last_updated).days
|
|
59
|
+
days_since_file_change = (now - file_last_modified).days
|
|
60
|
+
|
|
61
|
+
if file was modified AFTER document was last updated:
|
|
62
|
+
staleness_penalty = min(30, (file_modified - doc_updated).days * 3)
|
|
63
|
+
base_score -= staleness_penalty
|
|
64
|
+
|
|
65
|
+
if file no longer exists:
|
|
66
|
+
base_score -= 25 (major structural change)
|
|
67
|
+
|
|
68
|
+
if file was renamed/moved (detected via git):
|
|
69
|
+
base_score -= 15 (references are broken)
|
|
70
|
+
|
|
71
|
+
age_penalty = min(20, days_since_doc_update * 0.5)
|
|
72
|
+
base_score -= age_penalty
|
|
73
|
+
|
|
74
|
+
freshness_score = max(0, base_score)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Score interpretation:**
|
|
78
|
+
|
|
79
|
+
| Score | Status | Meaning |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| 80–100 | 🟢 Fresh | Document is current and reliable |
|
|
82
|
+
| 60–79 | 🟡 Aging | Document may have minor inaccuracies |
|
|
83
|
+
| 40–59 | 🟠 Stale | Document likely has outdated information |
|
|
84
|
+
| 20–39 | 🔴 Very Stale | Document is unreliable, needs re-generation |
|
|
85
|
+
| 0–19 | ⛔ Obsolete | Document may be misleading, urgent refresh needed |
|
|
86
|
+
|
|
87
|
+
5. **Add freshness metadata** — Inject or update a frontmatter block at the top of each knowledge document:
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
<!-- freshness: score=75, status=aging, last_checked=2024-01-20T14:30:00Z -->
|
|
91
|
+
<!-- stale_sources: src/auth/middleware.ts (modified 5 days after doc update) -->
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Rules for metadata injection:
|
|
95
|
+
- If a `<!-- freshness: -->` comment already exists, update it in place
|
|
96
|
+
- If no freshness comment exists, add it after the document title (first `#` heading)
|
|
97
|
+
- Never modify document content — only metadata comments
|
|
98
|
+
|
|
99
|
+
6. **Determine sync actions** — Based on freshness scores, determine required actions:
|
|
100
|
+
|
|
101
|
+
| Condition | Action |
|
|
102
|
+
|---|---|
|
|
103
|
+
| Score < threshold (default 60) | Queue for incremental sync via `incremental-sync-engine` |
|
|
104
|
+
| Score < 30 | Flag as critical in report, recommend full re-generation |
|
|
105
|
+
| Referenced file deleted | Flag structural change, recommend manual review |
|
|
106
|
+
| Referenced file moved | Update evidence citations, re-verify claims |
|
|
107
|
+
| Multiple documents stale for same module | Recommend module-level re-discovery |
|
|
108
|
+
|
|
109
|
+
7. **Generate FRESHNESS-report.md** — Write to `.engineering-intelligence/reports/FRESHNESS-report.md`:
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
# Freshness Report
|
|
113
|
+
|
|
114
|
+
Generated: <timestamp>
|
|
115
|
+
Threshold: <score>
|
|
116
|
+
Documents scanned: <N>
|
|
117
|
+
|
|
118
|
+
## Summary
|
|
119
|
+
|
|
120
|
+
| Status | Count | Percentage |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| 🟢 Fresh (80-100) | <N> | <N%> |
|
|
123
|
+
| 🟡 Aging (60-79) | <N> | <N%> |
|
|
124
|
+
| 🟠 Stale (40-59) | <N> | <N%> |
|
|
125
|
+
| 🔴 Very Stale (20-39) | <N> | <N%> |
|
|
126
|
+
| ⛔ Obsolete (0-19) | <N> | <N%> |
|
|
127
|
+
|
|
128
|
+
## Document Scores
|
|
129
|
+
|
|
130
|
+
| Document | Score | Status | Stale Sources | Last Updated | Action Needed |
|
|
131
|
+
|---|---|---|---|---|---|
|
|
132
|
+
| `02-architecture.md` | 45 | 🟠 Stale | `src/app/layout.tsx` (+3d) | 2024-01-10 | Incremental sync |
|
|
133
|
+
| `05-database.md` | 90 | 🟢 Fresh | — | 2024-01-18 | None |
|
|
134
|
+
| ... | ... | ... | ... | ... | ... |
|
|
135
|
+
|
|
136
|
+
## Structural Changes
|
|
137
|
+
|
|
138
|
+
| Type | File | Affected Documents |
|
|
139
|
+
|---|---|---|
|
|
140
|
+
| Deleted | `src/old-auth/handler.ts` | `06-authentication.md` |
|
|
141
|
+
| Moved | `src/utils.ts` → `src/lib/utils.ts` | `01-repository-structure.md` |
|
|
142
|
+
|
|
143
|
+
## Recommended Actions
|
|
144
|
+
|
|
145
|
+
1. **Critical** — Re-generate: <list of documents with score < 30>
|
|
146
|
+
2. **High** — Incremental sync: <list of documents with score < 60>
|
|
147
|
+
3. **Medium** — Review: <list of documents with score 60-79>
|
|
148
|
+
4. **Structural** — Manual review needed: <list of deleted/moved file impacts>
|
|
149
|
+
|
|
150
|
+
## Module-Level Freshness
|
|
151
|
+
|
|
152
|
+
| Module | Avg Document Score | Documents Below Threshold |
|
|
153
|
+
|---|---|---|
|
|
154
|
+
| auth | 42 | `06-authentication.md`, `context/critical-paths.md` |
|
|
155
|
+
| api | 88 | — |
|
|
156
|
+
| ... | ... | ... |
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
8. **Trigger incremental sync** — For documents below the threshold, invoke `incremental-sync-engine` with:
|
|
160
|
+
- The specific document to update
|
|
161
|
+
- The list of changed source files
|
|
162
|
+
- The staleness reason (file modified, file deleted, file moved, age)
|
|
163
|
+
|
|
164
|
+
## Quality Gates
|
|
165
|
+
|
|
166
|
+
- [ ] All knowledge base, memory, and context documents are inventoried
|
|
167
|
+
- [ ] Evidence citations are parsed from every document
|
|
168
|
+
- [ ] Source file modification times are checked against document timestamps
|
|
169
|
+
- [ ] Freshness scores follow the defined calculation formula
|
|
170
|
+
- [ ] Score interpretation matches the defined status table
|
|
171
|
+
- [ ] Freshness metadata is injected without modifying document content
|
|
172
|
+
- [ ] FRESHNESS-report.md exists at `.engineering-intelligence/reports/FRESHNESS-report.md`
|
|
173
|
+
- [ ] Structural changes (deleted/moved files) are detected and reported
|
|
174
|
+
- [ ] Documents below threshold are queued for incremental sync
|
|
175
|
+
- [ ] Module-level aggregation is included in the report
|
|
176
|
+
|
|
177
|
+
## Cross-References
|
|
178
|
+
|
|
179
|
+
- Used by: `ongoing-learning-engine` (for freshness monitoring)
|
|
180
|
+
- Uses: `incremental-sync-engine` (to refresh stale documents)
|
|
181
|
+
- Consumed by: `engineering-intelligence-skill`, `engineering-orchestrator`
|
|
182
|
+
- Feeds into: `.engineering-intelligence/reports/FRESHNESS-report.md`
|
|
183
|
+
- Related: `knowledge-base-validator` (validates content accuracy; staleness-detector validates currency)
|
|
184
|
+
|
|
185
|
+
This capability does not modify product code.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create a new project from scratch with full AIDLC — from architectural interview through scaffolding, intelligence initialization, and convention detection.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Create Project
|
|
6
|
+
|
|
7
|
+
Chain `greenfield-architect` → scaffold → `initialize-intelligence-skill` → `convention-detector` to produce a fully instrumented project with engineering intelligence from day one.
|
|
8
|
+
|
|
9
|
+
## Input
|
|
10
|
+
|
|
11
|
+
A description of the project to create: purpose, domain, technology preferences, and constraints. If insufficient context is provided, the architectural interview in step 1 will gather it.
|
|
12
|
+
|
|
13
|
+
## Output
|
|
14
|
+
|
|
15
|
+
A complete, scaffolded project with:
|
|
16
|
+
|
|
17
|
+
| Category | Content |
|
|
18
|
+
|---|---|
|
|
19
|
+
| Project scaffold | Directory structure, configuration, dependencies, build system |
|
|
20
|
+
| Knowledge Base | `knowledge-base/` — initialized project intelligence |
|
|
21
|
+
| Memory | `.engineering-intelligence/memory/` — initial decisions and patterns |
|
|
22
|
+
| Context | `.engineering-intelligence/context/` — AI navigation maps |
|
|
23
|
+
| Graphs | `.engineering-intelligence/graph/` — initial architecture graphs |
|
|
24
|
+
| Conventions | `knowledge-base/06-conventions-and-standards.md` — detected and configured conventions |
|
|
25
|
+
| Change Record | `.changes/CHG-000-initialization.md` — project creation record |
|
|
26
|
+
|
|
27
|
+
## Execution Steps
|
|
28
|
+
|
|
29
|
+
1. **Architectural Interview** — Invoke `greenfield-architect` to conduct a structured interview:
|
|
30
|
+
- Gather requirements: domain, scale, team size, deployment targets
|
|
31
|
+
- Explore technology choices: language, framework, database, infrastructure
|
|
32
|
+
- Define architecture: monolith vs microservices, API style, data patterns
|
|
33
|
+
- Record decisions as ADRs in `knowledge-base/05-architecture-decisions.md`
|
|
34
|
+
- Produce a project blueprint before proceeding
|
|
35
|
+
|
|
36
|
+
2. **Scaffold Project** — Based on the architectural blueprint:
|
|
37
|
+
- Create directory structure following chosen conventions
|
|
38
|
+
- Initialize package manifests and dependency management
|
|
39
|
+
- Configure build system, linting, and formatting
|
|
40
|
+
- Set up test infrastructure
|
|
41
|
+
- Create initial CI/CD pipeline configuration
|
|
42
|
+
- Add README, LICENSE, and contributing guidelines
|
|
43
|
+
- Initialize git repository with initial commit
|
|
44
|
+
|
|
45
|
+
3. **Initialize Intelligence** — Invoke `initialize-intelligence-skill`:
|
|
46
|
+
- Generate knowledge-base documents from the scaffolded project
|
|
47
|
+
- Build initial architecture graphs
|
|
48
|
+
- Create AI context and navigation maps
|
|
49
|
+
- Write initialization change record (CHG-000)
|
|
50
|
+
|
|
51
|
+
4. **Detect Conventions** — Invoke `convention-detector`:
|
|
52
|
+
- Codify the conventions established during scaffolding
|
|
53
|
+
- Document naming patterns, file organization, and code style
|
|
54
|
+
- Record testing conventions and patterns
|
|
55
|
+
- Update `knowledge-base/06-conventions-and-standards.md`
|
|
56
|
+
|
|
57
|
+
## Rules
|
|
58
|
+
|
|
59
|
+
- Complete the architectural interview before scaffolding — do not assume technology choices
|
|
60
|
+
- Every architectural decision must be recorded as an ADR
|
|
61
|
+
- The scaffold must be functional — buildable and testable from the start
|
|
62
|
+
- Intelligence initialization must produce evidence-backed artifacts, not templates
|
|
63
|
+
- This workflow creates a new project and modifies the scaffolded project code
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Autonomously discover and understand an existing codebase through systematic analysis, interactive clarification, and finalized intelligence artifacts — without modifying product code.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Discover Codebase
|
|
6
|
+
|
|
7
|
+
Use `codebase-discovery-engine` to build a complete understanding of an existing project, then present findings, resolve ambiguities through clarification, and finalize the intelligence baseline.
|
|
8
|
+
|
|
9
|
+
## Input
|
|
10
|
+
|
|
11
|
+
An existing repository to analyze. If the repository path is ambiguous, ask for clarification.
|
|
12
|
+
|
|
13
|
+
## Output
|
|
14
|
+
|
|
15
|
+
Finalized codebase understanding captured in intelligence artifacts:
|
|
16
|
+
|
|
17
|
+
| Category | Path | Content |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| Knowledge Base | `knowledge-base/` | Evidence-backed project documentation |
|
|
20
|
+
| Graphs | `.engineering-intelligence/graph/` | Architecture graphs and maps |
|
|
21
|
+
| Context | `.engineering-intelligence/context/` | AI navigation maps |
|
|
22
|
+
| Discovery Report | `.engineering-intelligence/reports/DISCOVERY-*.md` | Findings summary with confidence levels |
|
|
23
|
+
|
|
24
|
+
## Execution Steps
|
|
25
|
+
|
|
26
|
+
1. **Discover** — Invoke `codebase-discovery-engine` to scan the repository:
|
|
27
|
+
- Technology stack, frameworks, and runtimes
|
|
28
|
+
- Project structure and module organization
|
|
29
|
+
- API surfaces, database schemas, and integrations
|
|
30
|
+
- Build systems, CI/CD pipelines, and deployment targets
|
|
31
|
+
- Test infrastructure and coverage
|
|
32
|
+
- Authentication and authorization patterns
|
|
33
|
+
|
|
34
|
+
2. **Present Findings** — Surface the discovery results to the user:
|
|
35
|
+
- Summarize what was found with confidence levels
|
|
36
|
+
- Highlight areas of uncertainty or ambiguity
|
|
37
|
+
- Call out architectural patterns and notable design decisions
|
|
38
|
+
- Identify gaps where information could not be determined from code alone
|
|
39
|
+
|
|
40
|
+
3. **Ask Clarifications** — For areas with low confidence or ambiguity:
|
|
41
|
+
- Ask targeted questions about unclear architectural decisions
|
|
42
|
+
- Confirm assumptions about deployment topology
|
|
43
|
+
- Verify business domain understanding
|
|
44
|
+
- Clarify team conventions not evident from code
|
|
45
|
+
|
|
46
|
+
4. **Finalize Understanding** — Incorporate clarifications and produce final artifacts:
|
|
47
|
+
- Update knowledge-base documents with confirmed information
|
|
48
|
+
- Mark remaining unknowns explicitly
|
|
49
|
+
- Generate architecture graphs via `graph-engine`
|
|
50
|
+
- Write discovery report with confidence assessment
|
|
51
|
+
|
|
52
|
+
## Rules
|
|
53
|
+
|
|
54
|
+
- Begin with automated analysis — ask questions only for genuine ambiguity
|
|
55
|
+
- Every claim must cite evidence from the repository
|
|
56
|
+
- Do not fabricate details — mark uncertainty clearly
|
|
57
|
+
- Present findings before asking clarifications (show work first)
|
|
58
|
+
- This workflow does not modify product code
|
|
59
|
+
|
|
60
|
+
This workflow does not modify product code. It writes only intelligence artifacts.
|
|
@@ -4,18 +4,20 @@ description: Implement an engineering request with impact analysis, tests, valid
|
|
|
4
4
|
|
|
5
5
|
# Engineering Intelligence
|
|
6
6
|
|
|
7
|
-
Use the `engineering-intelligence-skill` capability for the user's accompanying request.
|
|
7
|
+
Use the `engineering-intelligence-skill` capability for the user's accompanying request. For non-trivial work, use `aidlc-lifecycle-engine` inside this workflow to merge Agile delivery with AI-DLC durable state.
|
|
8
8
|
|
|
9
9
|
## Pipeline
|
|
10
10
|
|
|
11
11
|
1. **Read Intelligence** — Consult `knowledge-base/`, `.engineering-intelligence/memory/`, `.engineering-intelligence/context/`, `.engineering-intelligence/graph/`
|
|
12
|
-
2. **
|
|
13
|
-
3. **
|
|
14
|
-
4. **
|
|
15
|
-
5. **
|
|
16
|
-
6. **
|
|
17
|
-
7. **
|
|
18
|
-
8. **
|
|
12
|
+
2. **Select Delivery Mode** — Choose standard Agile, adversarial, TDD, design-first, or hypothesis debugging based on risk
|
|
13
|
+
3. **Write Impact Report** — Create `.engineering-intelligence/reports/IMP-XXX-<summary>.md` before any code edit
|
|
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
|
+
5. **Implement** — Make the requested code changes following established patterns
|
|
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
|
|
19
21
|
|
|
20
22
|
## Completion Report
|
|
21
23
|
|
|
@@ -25,4 +27,6 @@ Finish with:
|
|
|
25
27
|
- Affected systems and services
|
|
26
28
|
- Synchronized intelligence artifacts
|
|
27
29
|
- Related reports (IMP-XXX, REV-XXX)
|
|
30
|
+
- Agile artifacts updated (backlog, stories, acceptance criteria, Definition of Done)
|
|
28
31
|
- Unresolved risks or follow-ups
|
|
32
|
+
- AI-DLC breadcrumb (`AI-DLC: <phase> -> <stage> -> <status>`)
|
|
@@ -19,6 +19,7 @@ Analyzes this repository thoroughly without changing product code. Produces a co
|
|
|
19
19
|
| Context | `.engineering-intelligence/context/` | 6 compact navigation maps |
|
|
20
20
|
| Events | `.engineering-intelligence/events/` | 5 change-event guidance documents |
|
|
21
21
|
| Graphs | `.engineering-intelligence/graph/` | 4 JSON graphs + architecture-map.md |
|
|
22
|
+
| AI-DLC + Agile | `.engineering-intelligence/aidlc/` | Lifecycle state, audit, discovery placeholders, open questions, Agile backlog/sprint/DoR/DoD, cross-unit discovery log |
|
|
22
23
|
| History | `.changes/CHG-000-initialization.md` | Initialization record |
|
|
23
24
|
|
|
24
25
|
## Execution Steps
|
|
@@ -29,7 +30,8 @@ Analyzes this repository thoroughly without changing product code. Produces a co
|
|
|
29
30
|
4. **Generate Memory** — Extract durable decisions and patterns
|
|
30
31
|
5. **Generate Context** — Create concise AI navigation maps
|
|
31
32
|
6. **Build Graphs** — Generate evidence-backed architecture graphs
|
|
32
|
-
7. **
|
|
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
35
|
|
|
34
36
|
## Important
|
|
35
37
|
|
|
@@ -8,17 +8,18 @@ Use the `requirement-scoper` capability to interactively scope and document a us
|
|
|
8
8
|
|
|
9
9
|
## Pipeline
|
|
10
10
|
|
|
11
|
-
1. **Read Context** — Read `knowledge-base/`, `.engineering-intelligence/memory/`, and `.engineering-intelligence/graph/` mapping files.
|
|
12
|
-
2. **Draft Questions** — Generate 3 to 5 targeted business/tech questions clarifying the requirements.
|
|
11
|
+
1. **Read Context** — Read `knowledge-base/`, `.engineering-intelligence/aidlc/`, `.engineering-intelligence/memory/`, and `.engineering-intelligence/graph/` mapping files.
|
|
12
|
+
2. **Draft Questions** — Generate 3 to 5 targeted business/tech questions clarifying the requirements, user story, acceptance criteria, dependencies, and Definition of Ready.
|
|
13
13
|
3. **Iterate** — Prompt the user for answers in the chat pane.
|
|
14
|
-
4. **Document Scoping** — Create or update `knowledge-base/19-requirements.md` with goals,
|
|
15
|
-
5. **Finalize Prompt** — Output the exact `/engineering-intelligence` command required to build the
|
|
14
|
+
4. **Document Scoping** — Create or update `knowledge-base/19-requirements.md` and `.engineering-intelligence/aidlc/agile/` artifacts with goals, user stories, acceptance criteria, edge cases, dependencies, and the Q&A log.
|
|
15
|
+
5. **Finalize Prompt** — Output the exact `/engineering-intelligence` command required to build the ready story.
|
|
16
16
|
|
|
17
17
|
## Completion Report
|
|
18
18
|
|
|
19
19
|
Finish with:
|
|
20
20
|
- Summary of scoped requirements
|
|
21
21
|
- Location of the requirements document (`knowledge-base/19-requirements.md`)
|
|
22
|
+
- Agile artifacts updated under `.engineering-intelligence/aidlc/agile/`
|
|
22
23
|
- The exact implementation command prompt
|
|
23
24
|
|
|
24
25
|
**Contract**: This workflow does not modify product code.
|