Files

4.2 KiB
Raw Permalink Blame History

Capability Boundary — Dimension Table & Output Template

Used by Phase A1.8 (standalone) and Phase B1.8 (pipeline). Read this file when executing the Capability Boundary Definition phase. The 13-dimension table defines WHAT to analyze; the output template defines HOW to record it.

Artifact Dimensions

Every capability MUST be analyzed across ALL of these dimensions. A dimension with no artifacts is explicitly marked "N/A — none required" (not silently skipped):

# Dimension What to list Why it matters
1 Source code files Every .ts/.tsx/.js file in the feature scope The obvious one — but not the only one
2 Type definitions / interfaces Shared types, branded types, schemas (Zod/Schema.Class) Types are consumed across files; missing types break compilation silently
3 Database schema / migrations Table definitions, column additions, migration SQL Data layer changes are invisible in code diffs but block runtime
4 Configuration entries Config keys, settings entries, default values Missing config = silent runtime failures
5 Environment variables Env vars read by the feature, VITE_* vars Missing env vars = undefined behavior at runtime
6 CLI flags / commands CLI commands, flags, option definitions CLI surface changes are easily forgotten
7 Theme / style files CSS files, theme JSON, tailwind config, token files Styling is per-component and easily orphaned
8 Route definitions New routes, modified redirects, route guards Routes are defined in a central file far from the feature code
9 Provider / context hierarchy New providers, insertion points in provider tree, context keys Provider ordering bugs are silent and hard to debug
10 Build config changes vite.config, tsconfig, webpack, tailwind.config Build config gates whether the feature compiles/bundles
11 Package.json dependencies New npm deps, version changes, workspace dep additions Missing deps = import errors at runtime
12 Test files Unit tests, integration tests, test fixtures, test helpers Tests are the fidelity contract — missing tests = unverified behavior
13 Shared package changes Changes to SDK, UI, core packages that the feature depends on Cross-package deps are the #1 source of incomplete ports

Output Template

Publish to wiki page port-{name}/source-analysis/capability-boundary (standalone) or port-{name}/source-analysis/12-capability-boundary (pipeline) via wiki 读写 API(见 TERMINOLOGY.

## Capability Boundary: {feature name}

### Dimension 1 — Source Code Files
| Source File | Target Location | Status | Notes |
| ----------- | --------------- | ------ | ----- |
| src/context/tabs.tsx | src/context/tabs.tsx | ☐ | New file |
| ... | ... | ... | ... |

### Dimension 2 — Type Definitions / Interfaces
| Source Type | Target Location | Status | Notes |
| ----------- | --------------- | ------ | ----- |
| Tab interface | src/context/tabs.tsx | ☐ | Co-located |
| ... | ... | ... | ... |

### Dimension 3 — Database Schema / Migrations
| Source Schema | Target Migration | Status | Notes |
| ------------- | ---------------- | ------ | ----- |
| N/A — none required | — | ⏭ | Feature uses in-memory state only |

### Dimension 4 — Configuration Entries
| Source Config Key | Target Config Key | Status | Notes |
| ----------------- | ----------------- | ------ | ----- |
| tabs.enabled | tabs.enabled | ☐ | New setting |
| ... | ... | ... | ... |

### Dimension 5 — Environment Variables
| Source Env Var | Target Env Var | Status | Notes |
| -------------- | -------------- | ------ | ----- |
| VITE_TABS_LIMIT | VITE_TABS_LIMIT | ☐ | New |
| N/A | — | ⏭ | No env vars required |

(... repeat for all 13 dimensions ...)

### Completeness Cross-Check
| Cross-Check | Result |
| ----------- | ------ |
| Every A1 Source Function Inventory item appears in D1 or D2? | ✅ / ❌ |
| Every A1.7 Structural Diff gap has a capability boundary entry? | ✅ / ❌ |
| All 13 dimensions filled in? | ✅ / ❌ |
| All ☐ items have deferral + reactivation path or are pre-implementation? | ✅ / ❌ |