openspec-context-loading
Enhancing AI coding assistants through open Spec-driven development (Spec-driven development for AI coding assistants), adopting the Claude Code Skills approach, compatible with various CLI and IDE AI coding assistants that support AGENTS.md.
4 stars1 forksUpdated Nov 28, 2025
npx skills add https://github.com/forztf/open-skilled-sdd --skill openspec-context-loadingSKILL.md
Specification Context Loading
Discovers and loads project specifications, active changes, and requirements to provide context.
Quick Start
Context loading helps answer:
- What specs exist in this project?
- What changes are currently active?
- What requirements are defined?
- What capabilities does the system have?
- Where is a specific feature specified?
Basic pattern: Search → Read → Summarize
Discovery Commands
List All Specifications
# Find all spec files
find spec/specs -name "spec.md" -type f
# Find all capability directories
find spec/specs -mindepth 1 -maxdepth 1 -type d
# Show spec tree
tree spec/specs/ # if tree is installed
# or
ls -R spec/specs/
Output format:
spec/specs/
├── authentication/
│ └── spec.md
├── billing/
│ └── spec.md
└── notifications/
└── spec.md
List Active Changes
# Show all active changes
find spec/changes -maxdepth 1 -type d -not -path "spec/changes" -not -path "*/archive" | sort
# Show with modification dates
find spec/changes -maxdepth 1 -type d -not -path "spec/changes" -not -path "*/archive" -exec ls -ld {} \;
# Count active changes
find spec/changes -maxdepth 1 -type d -not -path "spec/changes" -not -path "*/archive" | wc -l
List Archived Changes
# Show all archived changes
ls -1 spec/archive/
# Show with dates
ls -la spec/archive/
# Find recently archived (last 7 days)
find spec/archive/ -maxdepth 1 -type d -mtime -7
Search for Requirements
# Find all requirements
grep -r "### Requirement:" spec/specs/
# Find requirements in specific capability
grep "### Requirement:" spec/specs/authentication/spec.md
# List unique requirement names
grep -h "### Requirement:" spec/specs/**/*.md | sed 's/### Requirement: //' | sort
Search for Scenarios
# Find all scenarios
grep -r "#### Scenario:" spec/specs/
# Count scenarios per spec
for spec in spec/specs/**/spec.md; do
count=$(grep -c "#### Scenario:" "$spec")
echo "$spec: $count scenarios"
done
Search by Keyword
# Find specs mentioning "authentication"
grep -r -i "authentication" spec/specs/
# Find requirements about "password"
grep -B 1 -A 5 -i "password" spec/specs/**/*.md | grep -A 5 "### Requirement:"
# Find scenarios about "error"
grep -B 1 -A 10 -i "error" spec/specs/**/*.md | grep -A 10 "#### Scenario:"
Common Queries
Query 1: "What specs exist?"
# List all capabilities
find spec/specs -mindepth 1 -maxdepth 1 -type d -exec basename {} \;
# Count requirements per capability
for cap in spec/specs/*/; do
name=$(basename "$cap")
count=$(grep -c "### Requirement:" "$cap/spec.md" 2>/dev/null || echo "0")
echo "$name: $count requirements"
done
Response format:
## Existing Specifications
The project has specifications for the following capabilities:
- **authentication**: 8 requirements
- **billing**: 12 requirements
- **notifications**: 5 requirements
Total: 3 capabilities, 25 requirements
Query 2: "What changes are active?"
# List with proposal summaries
for change in spec/changes/*/; do
if [ "$change" != "spec/changes/archive/" ]; then
id=$(basename "$change")
echo "=== $id ==="
head -n 20 "$change/proposal.md" | grep -A 3 "## Why"
fi
done
Response format:
## Active Changes
Currently active changes:
### add-user-auth
**Why**: Users need secure authentication...
### update-billing-api
**Why**: Payment processing requires v2 API...
Total: 2 active changes
Query 3: "Show me the authentication spec"
# Read full spec
cat spec/specs/authentication/spec.md
# Or show summary
echo "Requirements:"
grep "### Requirement:" spec/specs/authentication/spec.md
echo "\nScenarios:"
grep "#### Scenario:" spec/specs/authentication/spec.md
Response format:
## Authentication Specification
(Include full content of spec.md)
Summary:
- 8 requirements
- 16 scenarios
- Last modified: [date from git log]
Query 4: "Find specs about password"
# Search for keyword
grep -r -i "password" spec/specs/ -A 5
# Show which specs mention it
grep -r -i "password" spec/specs/ -l
Response format:
## Specs Mentioning "Password"
Found in:
- spec/specs/authentication/spec.md (3 requirements)
- spec/specs/security/spec.md (1 requirement)
Relevant requirements:
### Requirement: Password Validation
### Requirement: Password Reset
### Requirement: Password Strength
Query 5: "What's in change X?"
# Show full change context
CHANGE_ID="add-user-auth"
echo "=== Proposal ==="
cat spec/changes/$CHANGE_ID/proposal.md
echo "\n=== Tasks ==="
cat spec/changes/$CHANGE_ID/tasks.md
echo "\n=== Spec Deltas ==="
find spec/changes/$CHANGE_ID/specs -name "*.md" -exec echo "File: {}" \; -exec cat {} \;
Dashboard View
Create a comprehensive project overview:
#!/bin/bash
# Project specifi
...
Repository
forztf/open-skilled-sddParent repository
Repository Stats
Stars4
Forks1