Skip to content

Commit 15a843c

Browse files
first commit
0 parents  commit 15a843c

39 files changed

Lines changed: 4438 additions & 0 deletions

.capabilities/capabilitykit.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
schema_version: 0.1
2+
project:
3+
name: capabilitykit
4+
description: Capabilities as code for AI-native software teams.
5+
repository: https://github.com/FocusedObjective/capabilitykit
6+
source:
7+
include:
8+
- "**/*.capability.yaml"
9+
exclude:
10+
- "dist/**"
11+
validation:
12+
require_acceptance: true
13+
require_verification: true
14+
allow_verification_gaps: true
15+
require_implementation_references_for_status:
16+
- implemented
17+
- verified
18+
output:
19+
path: .capabilities/dist/capabilities.json
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
id: core.compile-capabilities
2+
title: Compile capabilities
3+
status: implemented
4+
area: core
5+
summary: Compile capability YAML files into normalized JSON with validation and verification summary data.
6+
intent: Provide a machine-readable capability map that tools and agents can consume consistently.
7+
inputs:
8+
- .capabilities/**/*.capability.yaml
9+
outputs:
10+
- .capabilities/dist/capabilities.json
11+
depends_on:
12+
- core.define-capability
13+
- core.validate-capabilities
14+
acceptance:
15+
- Writes normalized JSON to the configured output path.
16+
- Includes project metadata and all parsed capabilities.
17+
- Includes dependency graph information.
18+
- Includes validation results and verification summary.
19+
verification:
20+
automated:
21+
- id: compile-tests
22+
description: Unit tests verify compiled output shape.
23+
command: npm test
24+
- id: dogfood-compile
25+
description: The CLI compiles CapabilityKit's own capability map.
26+
command: npm run capabilitykit -- compile
27+
manual:
28+
- Inspect .capabilities/dist/capabilities.json after compile and confirm the graph is readable.
29+
implementation:
30+
references:
31+
- packages/core/src/compileCapabilities.ts
32+
- packages/cli/src/index.ts
33+
agent_guidance:
34+
build_notes:
35+
- Include validation output in the compiled artifact so downstream tools can detect risk.
36+
avoid:
37+
- Do not emit partial JSON without surfacing validation failures.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
id: core.define-capability
2+
title: Define capability format
3+
status: implemented
4+
area: core
5+
summary: Define the YAML schema and TypeScript types for repo-native capability specs.
6+
intent: Give humans and AI coding agents a shared source of intent, scope, acceptance criteria, and verification expectations.
7+
inputs:
8+
- .capabilities/**/*.capability.yaml
9+
outputs:
10+
- TypeScript schema
11+
- parsed capability objects
12+
depends_on: []
13+
acceptance:
14+
- Capability files require id, title, status, area, summary, intent, and acceptance criteria.
15+
- Verification checks can include automated commands, manual review guidance, and known gaps.
16+
- Implementation references can point from capability specs to source files.
17+
verification:
18+
automated:
19+
- id: parser-tests
20+
description: Unit tests cover valid and invalid capability parsing.
21+
command: npm test
22+
manual:
23+
- Review the example capability file in the README for clarity.
24+
implementation:
25+
references:
26+
- packages/core/src/schema.ts
27+
- packages/core/src/types.ts
28+
- packages/core/src/parseCapability.ts
29+
agent_guidance:
30+
build_notes:
31+
- Keep the MVP format small and deterministic.
32+
- Update this spec whenever the schema changes.
33+
avoid:
34+
- Do not make cloud services required for schema validation.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
id: core.detect-verification-gaps
2+
title: Detect verification gaps
3+
status: implemented
4+
area: core
5+
summary: Identify missing or weak verification information in capability specs.
6+
intent: Reduce the human bottleneck by making review needs explicit before maintainers inspect code manually.
7+
inputs:
8+
- parsed capability objects
9+
outputs:
10+
- verification gap list
11+
depends_on:
12+
- core.define-capability
13+
acceptance:
14+
- Reports capabilities with no automated checks.
15+
- Reports capabilities with no manual review guidance.
16+
- Reports implemented or verified capabilities without implementation references.
17+
- Reports declared verification gaps from capability files.
18+
verification:
19+
automated:
20+
- id: verification-gap-tests
21+
description: Unit tests cover deterministic verification gap detection.
22+
command: npm test
23+
manual:
24+
- Review validation output and confirm gaps explain what a human still needs to check.
25+
implementation:
26+
references:
27+
- packages/core/src/validateCapabilities.ts
28+
agent_guidance:
29+
build_notes:
30+
- Prefer specific gap messages tied to capability IDs.
31+
avoid:
32+
- Do not use AI inference for MVP verification gap detection.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
id: core.initialize-project
2+
title: Initialize capability project
3+
status: implemented
4+
area: core
5+
summary: Create a starter .capabilities folder with config and an example capability.
6+
intent: Help teams adopt capabilities as code with a small, understandable first step.
7+
inputs:
8+
- current working directory
9+
outputs:
10+
- .capabilities/capabilitykit.yaml
11+
- .capabilities/example.capability.yaml
12+
depends_on:
13+
- core.define-capability
14+
acceptance:
15+
- Creates the root capability config file.
16+
- Creates a starter capability file.
17+
- Refuses to overwrite existing files unless force is requested.
18+
- Prints practical next steps.
19+
verification:
20+
automated:
21+
- id: cli-build
22+
description: The CLI builds successfully.
23+
command: npm run build
24+
manual:
25+
- Run capabilitykit init in a temporary folder and confirm starter files are valid.
26+
implementation:
27+
references:
28+
- packages/cli/src/index.ts
29+
agent_guidance:
30+
build_notes:
31+
- Generated files should pass capabilitykit validate.
32+
avoid:
33+
- Do not overwrite user capability files by default.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
id: core.validate-capabilities
2+
title: Validate capability files
3+
status: implemented
4+
area: core
5+
summary: Validate schema correctness, duplicate IDs, broken dependencies, and verification gaps.
6+
intent: Make changes safer by giving humans and agents a repeatable check before review.
7+
inputs:
8+
- .capabilities/**/*.capability.yaml
9+
outputs:
10+
- validation report
11+
- verification gap list
12+
depends_on:
13+
- core.define-capability
14+
acceptance:
15+
- Reports YAML and schema errors with file paths.
16+
- Detects duplicate capability IDs.
17+
- Detects broken depends_on references.
18+
- Reports missing automated checks, missing manual review guidance, and missing implementation references.
19+
verification:
20+
automated:
21+
- id: validation-tests
22+
description: Unit tests cover duplicate IDs, broken dependencies, and verification gaps.
23+
command: npm test
24+
- id: dogfood-validate
25+
description: The CLI validates CapabilityKit's own capability map.
26+
command: npm run capabilitykit -- validate
27+
manual:
28+
- Confirm validation output is actionable enough to reduce manual review guesswork.
29+
implementation:
30+
references:
31+
- packages/core/src/validateCapabilities.ts
32+
- packages/core/src/loadCapabilities.ts
33+
- packages/cli/src/index.ts
34+
agent_guidance:
35+
build_notes:
36+
- Treat verification gaps as warnings by default.
37+
- Keep validation deterministic in the MVP.
38+
avoid:
39+
- Do not silently ignore malformed capability files.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
id: developer-experience.cli-workflow
2+
title: CLI workflow
3+
status: implemented
4+
area: developer-experience
5+
summary: Provide CLI commands for init, create, validate, compile, and inspect.
6+
intent: Make capability management fast enough to stay close to normal development workflows.
7+
inputs:
8+
- terminal commands
9+
- capability files
10+
outputs:
11+
- created capability files
12+
- validation reports
13+
- compiled JSON
14+
depends_on:
15+
- core.initialize-project
16+
- core.validate-capabilities
17+
- core.compile-capabilities
18+
acceptance:
19+
- Supports init, create, validate, compile, and inspect commands.
20+
- Returns a non-zero exit code for validation failures.
21+
- Prints verification gaps in validation and inspect output.
22+
verification:
23+
automated:
24+
- id: cli-build
25+
description: TypeScript build verifies CLI entrypoint imports.
26+
command: npm run build
27+
manual:
28+
- Run each CLI command against the dogfooded capability map before release.
29+
implementation:
30+
references:
31+
- packages/cli/src/index.ts
32+
agent_guidance:
33+
build_notes:
34+
- Keep command output concise and script-friendly.
35+
avoid:
36+
- Do not hide verification gaps behind verbose flags.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
id: developer-experience.example-project
2+
title: Example project
3+
status: implemented
4+
area: developer-experience
5+
summary: Provide a small example app capability map for users to inspect.
6+
intent: Show how product capabilities can be grouped by area and connected with dependencies.
7+
inputs:
8+
- examples/basic-app/.capabilities
9+
outputs:
10+
- example capability files
11+
depends_on:
12+
- core.define-capability
13+
acceptance:
14+
- Includes account and checkout capability areas.
15+
- Example files include verification sections.
16+
- Example files are valid against the MVP schema.
17+
verification:
18+
automated:
19+
- id: parser-tests
20+
description: Unit tests load example capability shapes.
21+
command: npm test
22+
manual:
23+
- Read the example files and confirm they are understandable without extra docs.
24+
implementation:
25+
references:
26+
- examples/basic-app/.capabilities/capabilitykit.yaml
27+
- examples/basic-app/.capabilities/account/login.capability.yaml
28+
agent_guidance:
29+
build_notes:
30+
- Keep examples realistic but compact.
31+
avoid:
32+
- Do not add app code that distracts from capability files.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
id: developer-experience.vscode-extension
2+
title: VS Code extension readiness
3+
status: planned
4+
area: developer-experience
5+
summary: Keep the package structure ready for a future VS Code extension without implementing it in the MVP.
6+
intent: Preserve a path toward editor diagnostics, navigation, and capability tree views.
7+
inputs:
8+
- compiled capabilities JSON
9+
outputs:
10+
- future editor integration points
11+
depends_on:
12+
- core.compile-capabilities
13+
acceptance:
14+
- MVP does not include VS Code extension code.
15+
- Compiled JSON contains enough path and graph data for a future extension.
16+
verification:
17+
automated:
18+
- id: compile-tests
19+
description: Compile tests cover path and graph data needed by future tools.
20+
command: npm test
21+
manual:
22+
- Review compiled JSON and confirm it contains capability paths and dependencies.
23+
implementation:
24+
references: []
25+
agent_guidance:
26+
build_notes:
27+
- Design output data to be editor-friendly.
28+
avoid:
29+
- Do not implement extension UI during the MVP.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
id: docs.capability-format
2+
title: Capability format documentation
3+
status: implemented
4+
area: docs
5+
summary: Document the capability YAML fields and verification gap model.
6+
intent: Help developers write useful specs without treating CapabilityKit as heavyweight process.
7+
inputs:
8+
- README.md
9+
- .capabilities/**/*.capability.yaml
10+
outputs:
11+
- documented capability format
12+
depends_on:
13+
- core.define-capability
14+
acceptance:
15+
- README explains what a capability is.
16+
- README includes an example capability file.
17+
- README explains verification gaps.
18+
verification:
19+
automated:
20+
- id: dogfood-validate
21+
description: The docs capability is validated as part of the project capability map.
22+
command: npm run capabilitykit -- validate
23+
manual:
24+
- Read README from a new user's perspective and confirm the format is clear.
25+
implementation:
26+
references:
27+
- README.md
28+
agent_guidance:
29+
build_notes:
30+
- Use practical developer language.
31+
avoid:
32+
- Avoid UML, enterprise architecture, and governance-heavy framing.

0 commit comments

Comments
 (0)