change-publish
Promote accepted Change Decision Records (ChDRs) from drafts to project memory at .adlc/memory/chdr/, write OKF-style frontmatter, and regenerate the boot-facing .adlc/memory/chdr.md index that team-boot injects at session start. Use after /change-clarify has accepted ChDRs.
Install
npx skills add https://github.com/tikalk/adlc-team-skills/tree/main/skills/change/change-publish
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install tikalk-adlc-team-skills@llmmart
git clone https://github.com/tikalk/adlc-team-skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole tikalk/adlc-team-skills collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
change-publish
What this skill does
Compile accepted ChDRs into the project's memory layer at {REPO_ROOT}/.adlc/memory/chdr/:
- Validate accepted ChDRs (status + provenance on Decision claims)
- Write each promoted ChDR to
.adlc/memory/chdr/ChDR-{NNN}.mdwith OKF-style frontmatter - Regenerate
{REPO_ROOT}/.adlc/memory/chdr.md— the boot-facing index thatteam-bootinjects into the session-start context (same convention aspdr.md/adr.md) - Mark source drafts
### Status: **Published**
Unlike /team-learn (which opens a PR against team-ai-directives), change-publish writes project-local memory — ChDRs describe this repo's evolution and fail the team-wide signal gate. No PR is created; the user commits via their normal flow.
This skill does not run until ChDRs have been accepted via /change-clarify.
When to use
- After
/change-clarify: accepted ChDRs need promotion to memory - After re-running
/change-init: new accepted ChDRs to add to the memory index
When NOT to use
- No accepted ChDRs: run
/change-clarifyfirst - Discovering ChDRs: use
/change-init - Reviewing ChDRs: use
/change-clarify
Process
User Input
$ARGUMENTS
Examples:
"ChDR-001 ChDR-003"— promote only specific ChDRs- Empty input: promote all accepted ChDRs
Role & Context
You are acting as a Memory Publisher — moving accepted ChDRs from local drafts to durable project memory. Your role:
- Validate provenance one more time (the poisoning circuit breaker — a promoted unprovenanced decision poisons every future session via team-boot)
- Write promoted records with frontmatter that
team-bootcan index - Regenerate the
chdr.mdindex so the next session start sees the new decisions
Outline
- Environment Setup (Phase 0): resolve paths, list accepted ChDRs
- Prerequisites Check (Phase 1): ensure accepted ChDRs exist
- Provenance Validation (Phase 2): re-verify every Decision claim has SHA/URL
- Duplicate Check (Phase 3): skip ChDRs already in memory with same issue key
- Memory Record Generation (Phase 4): write
.adlc/memory/chdr/ChDR-{NNN}.md - Index Regeneration (Phase 5): rebuild
.adlc/memory/chdr.md(boot-facing) - Draft Status Update (Phase 6): mark promoted drafts
Published - Summary (Phase 7): report results
Execution Steps
Phase 0: Environment Setup
Run:
scripts/bash/setup-change-publish.sh
Parse JSON for REPO_ROOT, CHDR_DRAFTS_DIR, MEMORY_DIR, MEMORY_INDEX, ACCEPTED_CHDRS.
If the setup script is unavailable or fails, resolve manually:
REPO_ROOT— walk up to.adlc/, orgit rev-parse --show-toplevel.CHDR_DRAFTS_DIR—REPO_ROOT/.adlc/drafts/chdrMEMORY_DIR—REPO_ROOT/.adlc/memory/chdrMEMORY_INDEX—REPO_ROOT/.adlc/memory/chdr.md(same level aspdr.md/adr.md)ACCEPTED_CHDRS—grep -l '^### Status: \*\*Accepted\*\*' CHDR_DRAFTS_DIR/ChDR-*.md
Phase 1: Prerequisites Check
If ACCEPTED_CHDRS is empty:
No accepted ChDRs found.
Run /change-clarify to accept ChDRs first.
Phase 2: Provenance Validation
For each accepted ChDR, re-verify: every non-trivial sentence in ### Decision references a SHA (\b[0-9a-f]{7,40}\b) or URL (https?://). Skip ChDRs that fail provenance — they cannot be promoted (poisoning risk):
## Provenance Validation
**Passing**: N | **Skipped**: M
### Skipped ChDRs
| ChDR | Reason |
|---|---|
| ChDR-XXX | Decision claim lacks SHA/URL provenance |
Skipped ChDRs remain Accepted in drafts for the user to fix.
Phase 3: Duplicate Check
For each passing ChDR, check if a memory record already exists with the same ### Issue Links key. If so, skip (or offer to merge) — do not create duplicates.
Phase 4: Memory Record Generation
For each accepted ChDR, write {MEMORY_DIR}/ChDR-{NNN}.md:
---
type: ChDR
title: {title from heading}
description: {descriptor from draft}
resource: ./.adlc/memory/chdr/ChDR-{NNN}.md
tags: [chdr]
generated:
by: agent:change-publish
at: {today}T00:00:00Z
id: ChDR-{NNN}
created: {date from draft}
verified:
- by: agent:change-publish
at: {today}T00:00:00Z
status: stable
stale_after: 365d
sources:
- id: {sha}
resource: git:{sha}
title: {commit subject}
- id: {issue-key}
resource: {issue-url}
title: {issue title}
---
# {Title}
{Content from draft — Context, Decision, Consequences, Evidence verbatim}
## Source
Promoted from: .adlc/drafts/chdr/ChDR-{NNN}.md
Phase 5: Index Regeneration (boot-facing)
This is the integration point with team-boot. Regenerate {MEMORY_INDEX} ({REPO_ROOT}/.adlc/memory/chdr.md) by listing all ChDR-*.md files in {MEMORY_DIR} and building a markdown table whose rows start with | ChDR- (the awk filter team-boot uses):
# Change Decision Records (Memory)
## ChDR Index
| ID | Title | Status | Date | Issues | Commits | Descriptor |
|----|-------|--------|------|--------|---------|------------|
| ChDR-001 | Why payments retries are capped at 3 | stable | 2026-08-16 | PROJ-123 | abc1234 | Consult before changing retry config |
**Stats**: N entries | Last Updated: YYYY-MM-DD
team-boot's boot.sh/boot.ps1 reads this file and emits a ## ChDR Index section + CHDR_COUNT into the session-start context, alongside the PDR/ADR indexes.
Phase 6: Draft Status Update
For each promoted ChDR, update the draft file's status to ### Status: **Published** and add:
### Promotion
- **Date**: [YYYY-MM-DD]
- **Memory path**: .adlc/memory/chdr/ChDR-{NNN}.md
Phase 7: Summary
## Change-Publish Summary
**ChDRs Promoted**: N
**ChDRs Skipped (provenance)**: M
**ChDRs Skipped (duplicate)**: K
### Artifacts
| Type | Count |
|---|---|
| Memory records (.adlc/memory/chdr/) | N |
| Boot index (.adlc/memory/chdr.md) | 1 (regenerated) |
### Next Steps
The next session start (`team-boot`) will inject the ChDR index into context.
Commit `.adlc/memory/chdr/` and `.adlc/memory/chdr.md` via your normal flow.
Key Rules
Provenance Before Promotion
- A promoted unprovenanced Decision poisons every future session (team-boot injects it)
- Re-validate provenance at publish time, not just at clarify
Project-Local, Not Team-Wide
- ChDRs publish to
.adlc/memory/, not team-ai-directives - No PR created — user commits via normal flow
- ChDRs fail the team-learn "team-wide applicability" signal gate by design
Index Format Must Match team-boot
- Rows MUST start with
| ChDR-(the awk/regex filter in boot.sh/boot.ps1) - File MUST be at
.adlc/memory/chdr.md(same level aspdr.md/adr.md)
Workflow Guidance & Transitions
After /change-publish
/change-init → /change-clarify → /change-publish
↓
[team-boot] → injects .adlc/memory/chdr.md index at next session start
↓
[Agent consults ChDRs on demand when touching affected code]
Re-run /change-init periodically to mine new history; new accepted ChDRs are added to memory and the index is regenerated.
Next Steps
Commit the memory directory. The next session automatically sees the ChDR index via team-boot.
Verification
- All accepted ChDRs with provenance promoted to
.adlc/memory/chdr/ChDR-*.md. .adlc/memory/chdr.mdindex regenerated with rows starting| ChDR-.- Promoted drafts marked
### Status: **Published**. - No unprovenanced ChDRs were promoted.
- No duplicate issue keys in memory.
Context
$ARGUMENTS
Files (adlc-team-skills)
-
scripts
-
bash
-
setup-change-publish.sh 1.8 KB
#!/usr/bin/env bash # setup-change-publish.sh — Setup for change-publish (self-contained) set -euo pipefail resolve_project_root() { local dir dir="$(pwd)" while [[ "$dir" != "/" ]]; do if [[ -d "${dir}/.adlc" ]]; then echo "$dir" return fi dir="$(dirname "$dir")" done git rev-parse --show-toplevel 2>/dev/null || pwd } PROJECT_ROOT=$(resolve_project_root) CHDR_DRAFTS_DIR="${PROJECT_ROOT}/.adlc/drafts/chdr" MEMORY_DIR="${PROJECT_ROOT}/.adlc/memory/chdr" MEMORY_INDEX="${PROJECT_ROOT}/.adlc/memory/chdr.md" mkdir -p "$MEMORY_DIR" 2>/dev/null || true # Accepted ChDR ids (filenames) in drafts ACCEPTED_CHDRS=$( { grep -l '^### Status: \*\*Accepted\*\*' "$CHDR_DRAFTS_DIR"/ChDR-*.md 2>/dev/null || true; } | xargs -r -n1 basename 2>/dev/null | tr '\n' ' ' | sed 's/ *$//') ACCEPTED_COUNT=$( { grep -l '^### Status: \*\*Accepted\*\*' "$CHDR_DRAFTS_DIR"/ChDR-*.md 2>/dev/null || true; } | wc -l | tr -d ' ') PUBLISHED_COUNT=$( { grep -l '^### Status: \*\*Published\*\*' "$CHDR_DRAFTS_DIR"/ChDR-*.md 2>/dev/null || true; } | wc -l | tr -d ' ') MEMORY_COUNT=$( { ls -1 "$MEMORY_DIR"/ChDR-*.md 2>/dev/null || true; } | wc -l | tr -d ' ') MEMORY_INDEX_EXISTS=$([[ -f "$MEMORY_INDEX" ]] && echo "true" || echo "false") python3 - "$PROJECT_ROOT" "$CHDR_DRAFTS_DIR" "$MEMORY_DIR" "$MEMORY_INDEX" "$ACCEPTED_CHDRS" "$ACCEPTED_COUNT" "$PUBLISHED_COUNT" "$MEMORY_COUNT" "$MEMORY_INDEX_EXISTS" << 'PY' import json, sys accepted = sys.argv[5].split() if sys.argv[5].strip() else [] print(json.dumps({ "REPO_ROOT": sys.argv[1], "CHDR_DRAFTS_DIR": sys.argv[2], "MEMORY_DIR": sys.argv[3], "MEMORY_INDEX": sys.argv[4], "ACCEPTED_CHDRS": accepted, "ACCEPTED_COUNT": int(sys.argv[6]), "PUBLISHED_COUNT": int(sys.argv[7]), "MEMORY_COUNT": int(sys.argv[8]), "MEMORY_INDEX_EXISTS": sys.argv[9] == "true" })) PY
-
-
powershell
-
setup-change-publish.ps1 1.7 KB · in bundle
-
-
-
SKILL.md 7.7 KB
--- name: change-publish description: Use when accepted ChDRs are ready for promotion from drafts to project memory at .adlc/memory/chdr/ and the boot-facing chdr.md index needs regenerating. disable-model-invocation: true --- # change-publish ## What this skill does Compile **accepted ChDRs** into the project's memory layer at `{REPO_ROOT}/.adlc/memory/chdr/`: - Validate accepted ChDRs (status + provenance on Decision claims) - Write each promoted ChDR to `.adlc/memory/chdr/ChDR-{NNN}.md` with OKF-style frontmatter - Regenerate `{REPO_ROOT}/.adlc/memory/chdr.md` — the **boot-facing index** that `team-boot` injects into the session-start context (same convention as `pdr.md`/`adr.md`) - Mark source drafts `### Status: **Published**` Unlike `/team-learn` (which opens a PR against team-ai-directives), `change-publish` writes **project-local memory** — ChDRs describe this repo's evolution and fail the team-wide signal gate. No PR is created; the user commits via their normal flow. **This skill does not run until ChDRs have been accepted via `/change-clarify`.** ## When to use - **After `/change-clarify`**: accepted ChDRs need promotion to memory - **After re-running `/change-init`**: new accepted ChDRs to add to the memory index ### When NOT to use - **No accepted ChDRs**: run `/change-clarify` first - **Discovering ChDRs**: use `/change-init` - **Reviewing ChDRs**: use `/change-clarify` ## Process ### User Input ```text $ARGUMENTS ``` **Examples**: - `"ChDR-001 ChDR-003"` — promote only specific ChDRs - Empty input: promote all accepted ChDRs ### Role & Context You are acting as a **Memory Publisher** — moving accepted ChDRs from local drafts to durable project memory. Your role: - Validate provenance one more time (the poisoning circuit breaker — a promoted unprovenanced decision poisons every future session via team-boot) - Write promoted records with frontmatter that `team-boot` can index - Regenerate the `chdr.md` index so the next session start sees the new decisions ### Outline 1. **Environment Setup** (Phase 0): resolve paths, list accepted ChDRs 2. **Prerequisites Check** (Phase 1): ensure accepted ChDRs exist 3. **Provenance Validation** (Phase 2): re-verify every Decision claim has SHA/URL 4. **Duplicate Check** (Phase 3): skip ChDRs already in memory with same issue key 5. **Memory Record Generation** (Phase 4): write `.adlc/memory/chdr/ChDR-{NNN}.md` 6. **Index Regeneration** (Phase 5): rebuild `.adlc/memory/chdr.md` (boot-facing) 7. **Draft Status Update** (Phase 6): mark promoted drafts `Published` 8. **Summary** (Phase 7): report results ### Execution Steps #### Phase 0: Environment Setup Run: ```bash scripts/bash/setup-change-publish.sh ``` Parse JSON for `REPO_ROOT`, `CHDR_DRAFTS_DIR`, `MEMORY_DIR`, `MEMORY_INDEX`, `ACCEPTED_CHDRS`. **If the setup script is unavailable or fails**, resolve manually: 1. `REPO_ROOT` — walk up to `.adlc/`, or `git rev-parse --show-toplevel`. 2. `CHDR_DRAFTS_DIR` — `REPO_ROOT/.adlc/drafts/chdr` 3. `MEMORY_DIR` — `REPO_ROOT/.adlc/memory/chdr` 4. `MEMORY_INDEX` — `REPO_ROOT/.adlc/memory/chdr.md` (same level as `pdr.md`/`adr.md`) 5. `ACCEPTED_CHDRS` — `grep -l '^### Status: \*\*Accepted\*\*' CHDR_DRAFTS_DIR/ChDR-*.md` #### Phase 1: Prerequisites Check If `ACCEPTED_CHDRS` is empty: ```text No accepted ChDRs found. Run /change-clarify to accept ChDRs first. ``` #### Phase 2: Provenance Validation For each accepted ChDR, re-verify: every non-trivial sentence in `### Decision` references a SHA (`\b[0-9a-f]{7,40}\b`) or URL (`https?://`). Skip ChDRs that fail provenance — they cannot be promoted (poisoning risk): ```markdown ## Provenance Validation **Passing**: N | **Skipped**: M ### Skipped ChDRs | ChDR | Reason | |---|---| | ChDR-XXX | Decision claim lacks SHA/URL provenance | ``` Skipped ChDRs remain `Accepted` in drafts for the user to fix. #### Phase 3: Duplicate Check For each passing ChDR, check if a memory record already exists with the same `### Issue Links` key. If so, skip (or offer to merge) — do not create duplicates. #### Phase 4: Memory Record Generation For each accepted ChDR, write `{MEMORY_DIR}/ChDR-{NNN}.md`: ```markdown --- type: ChDR title: {title from heading} description: {descriptor from draft} resource: ./.adlc/memory/chdr/ChDR-{NNN}.md tags: [chdr] generated: by: agent:change-publish at: {today}T00:00:00Z id: ChDR-{NNN} created: {date from draft} verified: - by: agent:change-publish at: {today}T00:00:00Z status: stable stale_after: 365d sources: - id: {sha} resource: git:{sha} title: {commit subject} - id: {issue-key} resource: {issue-url} title: {issue title} --- # {Title} {Content from draft — Context, Decision, Consequences, Evidence verbatim} ## Source Promoted from: .adlc/drafts/chdr/ChDR-{NNN}.md ``` #### Phase 5: Index Regeneration (boot-facing) **This is the integration point with `team-boot`.** Regenerate `{MEMORY_INDEX}` (`{REPO_ROOT}/.adlc/memory/chdr.md`) by listing all `ChDR-*.md` files in `{MEMORY_DIR}` and building a markdown table whose rows start with `| ChDR-` (the awk filter `team-boot` uses): ```markdown # Change Decision Records (Memory) ## ChDR Index | ID | Title | Status | Date | Issues | Commits | Descriptor | |----|-------|--------|------|--------|---------|------------| | ChDR-001 | Why payments retries are capped at 3 | stable | 2026-08-16 | PROJ-123 | abc1234 | Consult before changing retry config | **Stats**: N entries | Last Updated: YYYY-MM-DD ``` `team-boot`'s `boot.sh`/`boot.ps1` reads this file and emits a `## ChDR Index` section + `CHDR_COUNT` into the session-start context, alongside the PDR/ADR indexes. #### Phase 6: Draft Status Update For each promoted ChDR, update the draft file's status to `### Status: **Published**` and add: ```markdown ### Promotion - **Date**: [YYYY-MM-DD] - **Memory path**: .adlc/memory/chdr/ChDR-{NNN}.md ``` #### Phase 7: Summary ```markdown ## Change-Publish Summary **ChDRs Promoted**: N **ChDRs Skipped (provenance)**: M **ChDRs Skipped (duplicate)**: K ### Artifacts | Type | Count | |---|---| | Memory records (.adlc/memory/chdr/) | N | | Boot index (.adlc/memory/chdr.md) | 1 (regenerated) | ### Next Steps The next session start (`team-boot`) will inject the ChDR index into context. Commit `.adlc/memory/chdr/` and `.adlc/memory/chdr.md` via your normal flow. ``` ### Key Rules #### Provenance Before Promotion - A promoted unprovenanced Decision poisons every future session (team-boot injects it) - Re-validate provenance at publish time, not just at clarify #### Project-Local, Not Team-Wide - ChDRs publish to `.adlc/memory/`, not team-ai-directives - No PR created — user commits via normal flow - ChDRs fail the team-learn "team-wide applicability" signal gate by design #### Index Format Must Match team-boot - Rows MUST start with `| ChDR-` (the awk/regex filter in boot.sh/boot.ps1) - File MUST be at `.adlc/memory/chdr.md` (same level as `pdr.md`/`adr.md`) ### Workflow Guidance & Transitions #### After `/change-publish` ```text /change-init → /change-clarify → /change-publish ↓ [team-boot] → injects .adlc/memory/chdr.md index at next session start ↓ [Agent consults ChDRs on demand when touching affected code] ``` Re-run `/change-init` periodically to mine new history; new accepted ChDRs are added to memory and the index is regenerated. ## Next Steps Commit the memory directory. The next session automatically sees the ChDR index via `team-boot`. ## Verification - All accepted ChDRs with provenance promoted to `.adlc/memory/chdr/ChDR-*.md`. - `.adlc/memory/chdr.md` index regenerated with rows starting `| ChDR-`. - Promoted drafts marked `### Status: **Published**`. - No unprovenanced ChDRs were promoted. - No duplicate issue keys in memory. ## Context $ARGUMENTS
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.