feat(knowledge): land Engineering Knowledge Compiler (EKC) from 008
Give agents Engineering First Information before codegen: L0–L4 catalog, reuse/preflight (REUSE→ADAPT→CREATE), graph, and CLI surfaces so large repos stop reinventing existing capabilities. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2e425c3010
commit
56ab52356f
43 files changed
+8434
-19
No files matched your search
@@ -0,0 +1,22 @@
|
||||
---
|
||||
type: Decision
|
||||
id: ADR-022
|
||||
title: Cache is not persistence
|
||||
status: accepted
|
||||
applies_to:
|
||||
- config.resolve
|
||||
---
|
||||
|
||||
# Cache is not persistence
|
||||
|
||||
## Decision
|
||||
|
||||
Redis is only used for ephemeral cache.
|
||||
|
||||
## Reason
|
||||
|
||||
The application must remain correct when Redis is unavailable.
|
||||
|
||||
## Consequence
|
||||
|
||||
Do not introduce Redis as the source of truth.
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
type: AntiPattern
|
||||
id: AP-001
|
||||
title: Do not parse JWT manually
|
||||
status: stable
|
||||
---
|
||||
|
||||
# Do not parse JWT manually
|
||||
|
||||
Never decode JWT directly in application code.
|
||||
|
||||
Use the shared auth capability instead.
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
type: Constraint
|
||||
id: C-014
|
||||
title: Centralized config resolution
|
||||
status: stable
|
||||
applies_to:
|
||||
- config.resolve
|
||||
---
|
||||
|
||||
# Database and config access
|
||||
|
||||
All configuration resolution must go through `resolve_config`.
|
||||
|
||||
Direct ad-hoc config parsing in handlers is prohibited.
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
title: Resolve configuration
|
||||
capability: config.resolve
|
||||
status: stable
|
||||
---
|
||||
|
||||
Config resolution capability for Engineering Knowledge demos.
|
||||
|
||||
Use when: The caller needs the final normalized configuration.
|
||||
|
||||
Do not use when: Only raw configuration should be inspected.
|
||||
|
||||
# config
|
||||
|
||||
## resolve_config
|
||||
+ `path`
|
||||
|
||||
`defaults` =
|
||||
|
||||
| host | port |
|
||||
|------|------|
|
||||
| localhost | 8080 |
|
||||
|
||||
* defaults
|
||||
|
||||
## merge_config
|
||||
+ `base`
|
||||
+ `overlay`
|
||||
|
||||
Merge overlay keys onto base configuration map.
|
||||
|
||||
* overlay
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
type: Failure
|
||||
id: F-019
|
||||
title: Do not cache authorization by user only
|
||||
task: add_cache_layer
|
||||
status: resolved
|
||||
applies_to:
|
||||
- config.resolve
|
||||
---
|
||||
|
||||
# Do not cache authorization result
|
||||
|
||||
## Failed approach
|
||||
|
||||
Caching permission checks by user only.
|
||||
|
||||
## Failure
|
||||
|
||||
Permissions changed during role update.
|
||||
|
||||
## Correct approach
|
||||
|
||||
Cache by user_id, resource_id, and permission_version.
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
title: Normalize settings (near-duplicate)
|
||||
status: stable
|
||||
---
|
||||
|
||||
Near-duplicate of resolve_config for duplicate detection demos.
|
||||
|
||||
Use when: Caller wants normalized settings map.
|
||||
|
||||
# settings
|
||||
|
||||
## normalize_settings
|
||||
+ `path`
|
||||
|
||||
Normalize settings from a path with host/port defaults.
|
||||
|
||||
`defaults` =
|
||||
|
||||
| host | port |
|
||||
|------|------|
|
||||
| localhost | 8080 |
|
||||
|
||||
* defaults
|
||||
|
||||
## merge_settings
|
||||
+ `base`
|
||||
+ `overlay`
|
||||
|
||||
Merge overlay onto base settings — semantically close to merge_config.
|
||||
|
||||
* overlay
|
||||
Reference in new issue
Block a user