Review, accept, reject, or defer Context Directive Records (CDRs) discovered by levelup-init or proposed by levelup-specify. Interactive one-CDR-at-a-time workflow.
npx skills add https://github.com/tikalk/adlc-team-skills --skill levelup-clarify
Review pending CDRs (status Discovered or Proposed) and decide their fate: Accepted, Rejected, or Deferred.
This is the quality gate for all contributions to team-ai-directives:
{REPO_ROOT}/.adlc/drafts/cdr/CDR-{NNN}.md{REPO_ROOT}/.adlc/drafts/cdr/cdr.md indexThis is an interactive command. Present exactly one CDR per interaction and wait for user input.
/levelup-init: Validate brownfield discoveries/levelup-specify: Review proposed feature learnings/team-repair found conflicts: Resolve conflict CDRs created by repair/team-repair for team AI directives maintenance$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Examples of User Input:
"CDR-001 CDR-003" — Focus on specific CDRs"rules" — Clarify only rule-type CDRs"all" — Clarify all pending CDRs--all: Clarify all pending CDRs (same as empty input)--type TYPE: Filter by context type (rules, personas, examples, skills, constitution, evals)--limit N: Limit to N clarifications per session (default: 5)--no-evals-gate: Disable the evals regression gate (default: gate is ON)You are acting as a Context Validator reviewing discovered patterns. Your role involves:
Each CDR should have:
cdr.mdRun setup script:
scripts/bash/setup-levelup-clarify.sh
Read all {REPO_ROOT}/.adlc/drafts/cdr/CDR-*.md files and filter:
### Status: Discovered or ### Status: Proposed### Status: Accepted, Rejected, DeprecatedIf the setup script is unavailable or fails, resolve manually:
REPO_ROOT — walk up from cwd to find .adlc/, or git rev-parse --show-toplevel.CDR_DRAFTS_DIR — REPO_ROOT/.adlc/drafts/cdrPENDING_COUNT — grep -l '^### Status: \*\*(Discovered|Proposed)\*\*' CDR_DRAFTS_DIR/CDR-*.md | wc -lIf user specified specific CDR IDs or types, filter accordingly.
If no pending CDRs:
No pending CDRs found.
Run /levelup-init or /levelup-specify to create CDRs first.
For each pending CDR, check required sections:
### Context### Decision### Evidence### Target ModuleSkip invalid CDRs and report:
## Skipped CDRs
| CDR | Issue | Action |
|---|---|---|
| CDR-XXX | Missing Evidence | Add evidence and re-run clarify |
Default: ON. Use --no-evals-gate to disable.
When reviewing an eval CDR or a directive CDR that has a paired eval, run the existing goldensets in team-ai-directives/evals/ to check if accepting this CDR would break existing directive compliance tests.
For eval CDRs: Validate eval quality:
For directive CDRs with paired evals: Run regression check:
{TEAM_AI_DIRECTIVES}/evals/Blocked (Evals)Blocked CDRs remain in pending status with a note:
### Clarification
- **Date**: [YYYY-MM-DD]
- **Action**: Blocked (Evals)
- **Reason**: Accepting this CDR would break N existing goldenset cases in evals/{directive-id}/
Report:
## Evals Regression Gate
| CDR | Gate Result | Details |
|---|---|---|
| CDR-001 | PASS | No existing goldensets in scope |
| CDR-002 | BLOCKED | 3 existing cases would fail with modified rule |
Generate a gap report:
## CDR Clarification Report
| CDR | Title | Gap Type | Severity |
|---|---|---|---|
| CDR-001 | [Title] | Missing scope | HIGH |
| CDR-002 | [Title] | Duplicate check | MEDIUM |
Gap types:
CRITICAL: Present exactly ONE CDR per interaction. Do NOT:
Session limit: Default 5 CDRs per session. User can say "done" to exit early.
For each CDR:
## CDR-{ID}: {Title}
**Context Type**: {type}
**Target Module**: {target}
**Current Status**: {status}
### Current Content
**Context**:
{context}
**Decision**:
{decision}
**Evidence**:
{evidence}
### Choose Action
| Option | Action |
|---|---|
| A | **Accept** — Approve for implementation |
| B | **Reject** — Decline with reason |
| C | **Defer** — Skip for now, keep pending |
| D | **Accept all remaining** — Accept this CDR and all pending CDRs without further review |
Reply with your choice (A/B/C/D).
Wait for user input before proceeding.
Update the CDR's status line from ### Status: Proposed (or Discovered) to ### Status: Accepted. Add clarification metadata:
### Clarification
- **Date**: [YYYY-MM-DD]
- **Action**: Accepted
- **Rationale**: [summary of discussion]
Update the current CDR as Accepted (same as Action A). Then iterate through all remaining pending CDRs, mark each as ### Status: Accepted, and add clarification metadata:
### Clarification
- **Date**: [YYYY-MM-DD]
- **Action**: Accepted (bulk)
- **Rationale**: Bulk-accepted with user approval during clarify session
Skip the per-CDR presentation for remaining CDRs. Proceed directly to Phase 6 (Regenerate Index) and Phase 7 (Summary).
Ask for reason:
### Decision: Reject
| Option | Reason |
|---|---|
| A | Project-specific |
| B | Duplicate of existing directive |
| C | Deprecated/outdated pattern |
| D | Low value |
Reply with your choice.
Update the CDR's status line to ### Status: Rejected with reason.
Keep status as-is. Add note:
### Clarification
- **Date**: [YYYY-MM-DD]
- **Action**: Deferred
- **Reason**: [need more context / waiting on team / low priority]
After EACH CDR interaction, immediately update the file. Do not batch at the end.
Regenerate {REPO_ROOT}/.adlc/drafts/cdr/cdr.md by listing all CDR-*.md files and building a markdown table. For each CDR, extract the single-line fields (### Target Module:, ### Context Type:, ### Status:, ### Date:, ### Descriptor:) and build the index table. See /levelup-specify Phase 5 for the full format.
## LevelUp Clarify Summary
**CDRs Reviewed**: N
**Accepted**: N
**Rejected**: N
**Deferred**: N
### Accepted (Ready for Implementation)
| CDR | Target Module | Type |
|---|---|---|
| CDR-001 | rules/python/error-handling | Rule |
### Rejected
| CDR | Reason |
|---|---|
| CDR-003 | Project-specific |
### Deferred
| CDR | Title |
|---|---|
| CDR-004 | [Title] |
### Next Steps
1. **Accepted**: Run `/levelup-publish`
2. **Deferred**: Will appear in next clarify session
3. **Remaining**: Run `/levelup-clarify` again to continue
--limit N if provided/levelup-clarifyIf any CDRs were Accepted, handoff to /levelup-publish:
{
"command": "clarify",
"accepted": ["CDR-001", "CDR-002"],
"rejected": ["CDR-003"],
"deferred": ["CDR-004"]
}
[Pending CDRs exist]
↓
/levelup-clarify
↓
[One CDR at a time] → Accept / Reject / Defer
↓
[Run /levelup-publish] → Compile accepted CDRs
After accepting CDRs, run /levelup-publish to compile them into a team-ai-directives PR.
cdr.md index regenerated./levelup-publish.$ARGUMENTS
Take tikalk/levelup-clarify from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.