Skip to content

feat(scaffold-core): knowledge/ module — per-pattern threats and decisions data #214

@stackbilt-admin

Description

@stackbilt-admin

Part of #212.

Scope

Extract the embedded knowledge base from stackbilt-web/src/lib/scaffold-core.ts into packages/scaffold-core/src/knowledge/. This is pure data — no logic, no functions, no deps.

Files to create

File Source Content
threats.ts patternSpecificThreats, domainThreats Per-pattern threat register entries + domain threat sets (PHI, PCI, PII, telephony)
decisions.ts adrContextByPattern, adrDecisionByPattern Per-pattern ADR context paragraphs and decision bullet lists
index.ts Re-exports getKnowledge(pattern) → PatternKnowledge

Key invariant

knowledge/ has zero inbound deps within the package. It is a data layer only. Could theoretically be JSON — kept as TypeScript for type safety.

Tests

Structural completeness test: every pattern defined in classify/patterns.ts must have a corresponding entry in both threats.ts and decisions.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions