Skip to content

Commit 8e07682

Browse files
committed
fix(levelup): remove remaining .cdrs.json references
- Update specify.md to use .specify/memory/cdr.md - Update README.md with new CDR flow and status values - Update config-template.yml and extension.yml locations
1 parent 4deb916 commit 8e07682

5 files changed

Lines changed: 31 additions & 28 deletions

File tree

extensions/levelup/README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Scan your codebase for patterns that could become team-wide directives:
3737
/levelup.init
3838
```
3939

40-
This creates proposed entries in `{TEAM_DIRECTIVES}/.cdrs.json` with status "proposed".
40+
This creates proposed CDRs in `{PROJECT}/.specify/memory/cdr.md` with status "Discovered" or "Proposed".
4141

4242
### 2. Clarify and Accept CDRs
4343

@@ -71,22 +71,25 @@ This creates a draft PR with all accepted contributions.
7171

7272
## Context Directive Records (CDRs)
7373

74-
CDRs are tracked in `{TEAM_DIRECTIVES}/.cdrs.json` and define:
74+
CDRs are stored in markdown format:
75+
76+
- **Local**: `{PROJECT}/.specify/memory/cdr.md` - Working copy during discovery/clarification
77+
- **Approved**: `{TEAM_DIRECTIVES}/CDR.md` - Approved contributions tracked in team-ai-directives
78+
79+
CDRs define:
7580

7681
- **Target Module**: Where the contribution goes in team-ai-directives
7782
- **Context Type**: Rule, Persona, Example, or Skill
78-
- **Status**: discovered → proposed → accepted → active
79-
- **Evidence**: Links to code, commits, and discussions
83+
- **Status**: Discovered → Proposed → Accepted | Rejected
8084

8185
### CDR Status Values
8286

8387
| Status | Description |
8488
|--------|-------------|
85-
| **discovered** | Inferred from codebase during brownfield analysis |
86-
| **proposed** | Suggested for review, awaiting validation |
87-
| **accepted** | Approved for implementation |
88-
| **active** | Merged to team-ai-directives and ready for use |
89-
| **deprecated** | No longer recommended (kept for history) |
89+
| **Discovered** | Inferred from codebase during brownfield analysis |
90+
| **Proposed** | Suggested for review, awaiting validation |
91+
| **Accepted** | Approved for implementation |
92+
| **Rejected** | Not approved (reason documented in CDR) |
9093

9194
## Configuration
9295

@@ -105,8 +108,8 @@ Optional configuration in `.specify/extensions/levelup/levelup-config.yml`:
105108
```yaml
106109
cdr:
107110
heuristic: "surprising" # surprising | all | minimal
108-
# CDR manifest location (relative to team-ai-directives root)
109-
location: ".cdrs.json"
111+
# CDR file location (local project)
112+
location: ".specify/memory/cdr.md"
110113

111114
skills:
112115
drafts_location: ".specify/drafts/skills"

extensions/levelup/commands/init.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ Run `{SCRIPT}` to set up the infrastructure:
242242
- Creates skills drafts directory at `.specify/drafts/skills/`
243243
- Returns JSON with `TEAM_DIRECTIVES`, `REPO_ROOT`
244244

245-
The `.cdrs.json` file should already exist in team-ai-directives (created during init).
245+
The `.specify/memory/cdr.md` file will be created in the project directory.
246246

247247
### Phase 4: Load Existing Directives
248248

extensions/levelup/commands/specify.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ Extract **Context Directive Records (CDRs)** from the **current feature specific
3434
**Input**:
3535
- Current feature spec, plan, tasks (from `specs/{feature}/`)
3636
- Optional: `trace.md` if generated by `/levelup.trace` (enriches CDR extraction)
37-
- Existing modules from `{TEAM_DIRECTIVES}/.cdrs.json` (if any)
37+
- Existing CDRs from `{REPO_ROOT}/.specify/memory/cdr.md` (if any)
3838

3939
**Output**:
40-
- New proposed modules added to `{TEAM_DIRECTIVES}/.cdrs.json` with status "proposed"
41-
- Enriched existing modules with feature-specific evidence
40+
- New proposed CDRs added to `{REPO_ROOT}/.specify/memory/cdr.md` with status "Discovered" or "Proposed"
41+
- Enriched existing CDRs with feature-specific evidence
4242

4343
## Role & Context
4444

@@ -113,9 +113,9 @@ If artifacts are missing, note which are unavailable.
113113

114114
**Objective**: Load modules to refine
115115

116-
Read `{TEAM_DIRECTIVES}/.cdrs.json` and filter:
117-
- Status = "discovered" or "proposed"
118-
- Match user-specified module IDs if provided
116+
Read `{REPO_ROOT}/.specify/memory/cdr.md` and filter:
117+
- Status = "Discovered" or "Proposed"
118+
- Match user-specified CDR IDs if provided
119119

120120
### Phase 3: Enrich CDRs
121121

@@ -182,12 +182,12 @@ Append evidence to CDR:
182182
- [ ] No issues reported
183183
```
184184

185-
### Phase 4: Update Modules
185+
### Phase 4: Update CDRs
186186

187-
**Objective**: Write enriched modules to `.cdrs.json`
187+
**Objective**: Write enriched CDRs to `.specify/memory/cdr.md`
188188

189-
Update `{TEAM_DIRECTIVES}/.cdrs.json`:
190-
- Add evidence metadata to module entries
189+
Update `{REPO_ROOT}/.specify/memory/cdr.md`:
190+
- Add evidence metadata to CDR entries
191191
- Update enrichment timestamp
192192
- Add enrichment source reference
193193

@@ -231,11 +231,11 @@ Consider adding more context:
231231

232232
| File | Description |
233233
|------|-------------|
234-
| `{TEAM_DIRECTIVES}/.cdrs.json` | Enriched Context Directive Records |
234+
| `{REPO_ROOT}/.specify/memory/cdr.md` | Enriched Context Directive Records |
235235

236236
## Notes
237237

238-
- This command enriches modules, it doesn't change their status
238+
- This command enriches CDRs, it doesn't change their status
239239
- Status changes happen in `/levelup.clarify`
240240
- Works best with complete feature implementation
241241
- Can be run multiple times to add more evidence

extensions/levelup/config-template.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ cdr:
2020
# - minimal: Only high-value/novel patterns
2121
heuristic: "surprising"
2222

23-
# Location of CDR file (relative to team-ai-directives root)
24-
# The CDR manifest tracks context module contributions
25-
location: ".cdrs.json"
23+
# Location of CDR file (local project)
24+
# CDRs stored in markdown format
25+
location: ".specify/memory/cdr.md"
2626

2727
# Skills Settings
2828
skills:

extensions/levelup/extension.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ tags:
102102
defaults:
103103
cdr:
104104
heuristic: "surprising" # surprising | all | minimal
105-
location: ".cdrs.json"
105+
location: ".specify/memory/cdr.md"
106106
skills:
107107
drafts_location: ".specify/drafts/skills"
108108
team_directives:

0 commit comments

Comments
 (0)