Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Design & UI

levelup-publish

Compile accepted Context Directive Records (CDRs) into team-ai-directives artifacts and create a draft PR. Builds context modules, evals goldensets, and/or skills based on CDR context types.

tikalk · AI review on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add tikalk/adlc-team-skills --skill levelup-publish

About this skill


name: levelup-publish description: Compile accepted Context Directive Records (CDRs) into team-ai-directives artifacts and create a draft PR. Builds context modules, evals goldensets, and/or skills based on CDR context types. disable-model-invocation: true

levelup-publish

What this skill does

Compile accepted CDRs into actual artifacts in the team-ai-directives team AI directives and create a draft PR.

It is the implementation phase of the CDR lifecycle:

  • Validate accepted CDRs against the signal gate
  • Detect cross-CDR conflicts before publishing
  • Generate context module files (rules, personas, examples, constitution)
  • Generate eval goldenset files (goldset.md + goldset.json) for eval-type CDRs
  • Generate skill artifacts (SKILL.md + .skills-entry.json)
  • Update .skills.json manifest
  • Update CDR.md index in team-ai-directives
  • Create a branch, commit, and open a draft PR

This skill does not run until CDRs have been accepted via /levelup-clarify.

When to use

  • After /levelup-clarify: Accepted CDRs need to be published
  • Single skill build: Use --skill <name|CDR-id> to build one skill
  • Context modules only: Use --context-only to skip skill generation

When NOT to use

  • No accepted CDRs: Run /levelup-clarify first
  • Uncommitted changes in team-ai-directives: Clean working tree first
  • Discovering patterns: Use /levelup-init or /levelup-specify
  • Reviewing CDRs: Use /levelup-clarify

Process

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Examples of User Input:

  • "--ready" — Create ready PR instead of draft
  • "--skip-skills" — Don't include skill CDRs
  • "--context-only" — Only build context modules
  • "--skill CDR-005" — Build only the skill from CDR-005
  • "CDR-001 CDR-003" — Only implement specific CDRs
  • Empty input: Implement all accepted CDRs as draft PR

Flags

  • --ready: Create ready PR instead of draft
  • --skip-skills: Skip skill-type CDRs
  • --context-only: Build only context modules (skip all skills)
  • --skill <name|CDR-id>: Build only one skill from a specific accepted skill CDR

Role & Context

You are acting as a Context Publisher — moving accepted CDRs from local drafts to team-ai-directives.

Your role involves:

  • Validating that CDRs are accepted and ready
  • Creating context module files from CDR content
  • Creating skill artifacts from skill-type CDRs
  • Managing Git operations (branch, commit, push, PR)

Outline

  1. Environment Setup (Phase 0): Resolve paths and list accepted CDRs
  2. Prerequisites Check (Phase 1): Ensure team-ai-directives is configured and clean
  3. Signal Gate Validation (Phase 2): Filter CDRs without concrete evidence
  4. Cross-CDR Conflict Check (Phase 3): Detect duplicate targets and rule conflicts
  5. Branch Preparation (Phase 4): Create branch in team-ai-directives
  6. Context Module Generation (Phase 5): Build rules/personas/examples/constitution
  7. Eval Goldenset Generation (Phase 6): Build goldset.md + goldset.json for eval CDRs
  8. Skill Generation (Phase 7): Build SKILL.md + .skills-entry.json
  9. log.md Update (Phase 8): Append OKF §9 entries to per-dir log.md
  10. AGENTS.md Check (Phase 9): Create if missing
  11. Commit and PR (Phase 10): Publish changes
  12. Summary (Phase 11): Report results

Execution Steps

Phase 0: Environment Setup

Run:

scripts/bash/setup-levelup-publish.sh

Parse JSON for REPO_ROOT, TEAM_AI_DIRECTIVES, CDR_DRAFTS_DIR, ACCEPTED_CDRS, TD_CONFIGURED, TD_IS_GIT, TD_CLEAN.

If the setup script is unavailable or fails, resolve manually:

  1. REPO_ROOT — walk up from cwd to find .adlc/, or git rev-parse --show-toplevel, or use pwd.
  2. TEAM_AI_DIRECTIVES — TEAM_AI_DIRECTIVES env var, then .adlc/init-options.json → team_ai_directives, then REPO_ROOT/team-ai-directives.
  3. CDR_DRAFTS_DIR — REPO_ROOT/.adlc/drafts/cdr
  4. ACCEPTED_CDRS — grep -l '^### Status: \*\*Accepted\*\*' CDR_DRAFTS_DIR/CDR-*.md and extract IDs.
  5. TD_IS_GIT — git -C "$TEAM_AI_DIRECTIVES" rev-parse --is-inside-work-tree (exit 0 = true).
  6. TD_CLEAN — git -C "$TEAM_AI_DIRECTIVES" status --porcelain (empty = clean).

If TD_IS_GIT is false, Phase 10 (branch/commit/PR) cannot run. Offer to git init the team AI directives or write files directly without git.

Phase 1: Prerequisites Check

Verify Team Directives configured:

Team AI directives repository not configured.
Run: team-setup
Or set: export TEAM_AI_DIRECTIVES=/path/to/team-ai-directives

Check Working Tree:

If TD_CLEAN is false:

team-ai-directives has uncommitted changes.
Please commit or stash changes before running /levelup-publish.

Check Accepted CDRs:

If ACCEPTED_CDRS is empty:

No accepted CDRs found.
Run /levelup-clarify to accept CDRs first.

Phase 2: Signal Gate Validation

For each accepted CDR, evaluate it against these four criteria:

  1. Team-wide applicability: Does this pattern apply to multiple projects/teams, or is it specific to one project? If the CDR's context or evidence only references a single project's internals with no generalizable lesson → SKIP (reason: "project-specific").

  2. Evidence quality: Does the CDR reference concrete file paths, commit SHAs, or test cases? If the evidence section is empty or vague ("various files", "general practice") → SKIP (reason: "no evidence").

  3. Uniqueness: Does this duplicate an existing directive in team-ai-directives? Check context_modules/rules/, context_modules/examples/, and CDR.md for overlapping content. If it overlaps → SKIP (reason: "duplicate").

  4. High value: Is this a genuinely useful pattern, or a nice-to-have minor convenience? If the CDR explicitly states "low value" or "minor convenience", or the pattern is trivial (e.g., "u

Read the complete source ↗