원클릭으로
contribute-warehouse
Guided warehouse contribution flow with lint gate, intent triage, dedup scan, cohesion split, and atomic push
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guided warehouse contribution flow with lint gate, intent triage, dedup scan, cohesion split, and atomic push
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Systematically capture decisions, lessons, and facts into the warehouse knowledge base with optional context wiring
Scaffold new Beacon skills in the warehouse with LLM-driven content generation and pending-based wiring
| name | contribute-warehouse |
| description | Guided warehouse contribution flow with lint gate, intent triage, dedup scan, cohesion split, and atomic push |
| license | MIT |
| compatibility | opencode |
| requires | {"contexts":[]} |
Commit and push warehouse working-tree changes through a safe, intent-aware
flow. This skill wraps abc warehouse contribute with conversational
pre-flight: a strict lint gate, file-level intent triage, semantic dedup scan
(for knowledge/ files), cohesion split into logical commits, and exactly one
atomic git push at the end.
Design note: This skill never calls
git add,git commit, orgit pushdirectly. All git operations are delegated toabc warehouse contribute(per commit group) andpush_warehouse.py(exactly once at the end). The skill's job is the conversational layer above those primitives.
abc warehouse contribute/contribute-warehouse
This skill requires a connected warehouse. Verify at the start:
uv run ${SKILL_DIR}/scripts/resolve_warehouse.py
If this command fails with Error: no warehouse connected. Run 'abc warehouse connect <path>' first.,
stop immediately and surface the error to the user. Do not continue.
Capture the warehouse root path:
WAREHOUSE_ROOT=$(uv run ${SKILL_DIR}/scripts/resolve_warehouse.py)
If the command exits non-zero, surface the stderr output to the user and stop.
Run the warehouse linter against the full working tree:
abc warehouse lint "$WAREHOUSE_ROOT"
This is a hard gate. If lint reports any error — even for files outside the user's intended contribution scope — abort before committing and surface the lint output verbatim.
Tell the user:
Warehouse lint failed. Resolve the following issues before contributing:
<lint output>
Suggested recovery:
- Run `abc warehouse lint --fix "$WAREHOUSE_ROOT"` for fixable malformed cross-artifact-relative links; it rewrites them to canonical form, preserves anchors, is idempotent, and is safe to run again. It does NOT fix warehouse-escape or missing-target findings — those stay manual.
- Fix the failing files and re-run /contribute-warehouse
- Or move the failing edits to a separate branch and re-run on a clean tree
- As a last resort, you (the user) may discard the changes with
`git -C "$WAREHOUSE_ROOT" checkout -- <failing-file>` — the skill itself
will NEVER run this; destructive recovery stays with you
Do NOT stash, do NOT skip lint, do NOT proceed on a lint failure.
Run the summarizer to build a structured view of what has changed:
uv run ${SKILL_DIR}/scripts/summarize_changes.py --warehouse "$WAREHOUSE_ROOT"
The summarizer enumerates every dirty path in the warehouse working tree
(PER-202) — no .agentic-beacon/config.toml lookup, no beacon.yaml filter,
no project-context dependency. The skill works from any CWD, including a brand
new warehouse with no projects connected yet.
Parse the JSON output. Each entry in tracked_paths contains:
path — warehouse-relative pathgit_status — porcelain code (e.g. M, A, ??)diff_stat — one-line diff summarylast_commit_age_days — days since last commit, or nullwarehouse_area — top-level area (contexts, knowledge, skills, agents, or other)If the JSON output is empty ({"tracked_paths": []}), tell the user there is
nothing to contribute and stop cleanly.
Present the dirty warehouse paths to the user and ask them to classify each as:
Example presentation:
Dirty warehouse paths (3 files):
1. contexts/python-standards.md [M — 12 insertions, 3 deletions]
2. knowledge/python/lessons/type-hints.md [A — new file]
3. skills/code-review/SKILL.md [M — 2 insertions]
Which files do you want to contribute now?
(Reply with numbers, e.g. "1 2", or "all", or "none")
Leave-for-later files are noted in the final summary but are not touched.
For each included file under knowledge/**:
<topic>/<kind>/ parent directory (e.g. knowledge/python/lessons/)<sibling> — compare and merge or rename before contributing."Files outside knowledge/ (contexts, skills, agents) are not scanned for dedup.
Examine the included file set and determine whether it represents a single cohesive change or multiple independent changes.
Single cohesive change (e.g. one new lesson + its supporting context update): → One commit.
Multiple independent changes (e.g. a Python standards update AND a CI lesson unrelated to it): → Propose a split. Present the groups to the user:
The included files span 2 independent changes. Proposed split:
Commit 1: Python standards update
- contexts/python-standards.md
- knowledge/python/lessons/type-hints.md
Commit 2: CI workflow improvement
- knowledge/cicd/lessons/deploy-via-git.md
Confirm this split? (yes / edit)
The user may accept the proposed split or adjust the groupings.
For each commit group, extract the per-path git_status codes from the
summarize_changes.py output, then call:
uv run ${SKILL_DIR}/scripts/draft_commit_message.py \
--paths <space-separated warehouse-relative paths in this group> \
--git-statuses <per-path status codes in the same order as --paths> \
--subject "<LLM-drafted one-line subject>"
Example — two paths with known statuses:
uv run ${SKILL_DIR}/scripts/draft_commit_message.py \
--paths skills/foo/SKILL.md skills/bar/SKILL.md \
--git-statuses " M" "A " \
--subject "fix bar invocation example"
The --git-statuses argument takes one code per path (two-character porcelain
format, e.g. " M" for working-tree modified, "A " for staged new file).
Without --git-statuses, skills and agents paths default to feat regardless
of whether they are new or modified — always pass the statuses when available.
The script derives the <type> and <scope> deterministically from the paths
and statuses. You supply the <subject> based on the diff content and the
user's intent.
Present the drafted message(s) to the user for confirmation or editing before proceeding.
For each confirmed commit group (in order), pass the group's paths explicitly
using the --paths flag so only those files are committed:
abc warehouse contribute -m "<type>(<scope>): <subject>" \
--paths <path1> --paths <path2> ...
Important: Do NOT pass --push here. All commits land locally first.
Using --paths ensures only the files in this group are staged and committed —
files classified as leave-for-later remain untouched in the working tree.
If abc warehouse contribute exits non-zero, surface the error and stop.
After all commits land successfully:
uv run ${SKILL_DIR}/scripts/push_warehouse.py --warehouse "$WAREHOUSE_ROOT"
Success (exit 0): Report the committed SHAs and confirm the push.
Failure (exit non-zero):
git -C <warehouse> push origin <branch>Push failed. Your commits are safe locally. When network is restored, run:
git -C "$WAREHOUSE_ROOT" push origin <branch>
After the flow completes, report:
Contribution summary:
Committed:
<sha1> — <type>(<scope>): <subject>
<sha2> — <type>(<scope>): <subject>
Push status: [pushed | failed — recovery command above]
Left for later:
- <path> (reason: user deferred)
User: /contribute-warehouse
Agent:
/home/user/my-warehouseabc warehouse lint → clean, proceedscontexts/python-standards.mdknowledge/ files → skips dedup scandocs(contexts): add loguru section to python standardsabc warehouse contribute -m "docs(contexts): add loguru section to python standards" --paths contexts/python-standards.mdpush_warehouse.py → push succeedsa1b2c3d — docs(contexts): add loguru section. Pushed."User: /contribute-warehouse
Agent:
/home/user/my-warehousecontexts/python-standards.md, knowledge/python/lessons/type-hints.md, knowledge/cicd/lessons/deploy-via-git.mdknowledge/python/lessons/type-hints.md — no overlaps with siblings; knowledge/cicd/lessons/deploy-via-git.md — no overlapsdocs(python-standards): add type hints lesson and docs(cicd): add deploy-via-git lessonabc warehouse contribute -m "docs(python-standards): add type hints lesson" --paths contexts/python-standards.md --paths knowledge/python/lessons/type-hints.md
then abc warehouse contribute -m "docs(cicd): add deploy-via-git lesson" --paths knowledge/cicd/lessons/deploy-via-git.mdpush_warehouse.py once → successUser: /contribute-warehouse
Agent:
abc warehouse lint returns non-zero — skill broken-skill/SKILL.md has no frontmatterskills/broken-skill/SKILL.md before contributing."User: /contribute-warehouse
Agent:
1–8. Normal flow; all commits land locally
9. push_warehouse.py fails (no network)
10. Reports:
```
Push failed (no network). Your 2 commits are safe locally.
When network is restored, run:
git -C /home/user/my-warehouse push origin main
```
resolve_warehouse.py — STOP if exits non-zeroabc warehouse lint <warehouse> — STOP and surface errors if non-zero; suggest --fix for fixable categoriessummarize_changes.py — STOP if no dirty warehouse pathsknowledge/ files — flag overlaps before proceedingdraft_commit_message.py (pass --git-statuses) — confirm with userabc warehouse contribute -m "<msg>" --paths <p1> --paths <p2> ... per group — NO --push flagpush_warehouse.py --warehouse <path> exactly once| Script | Purpose | Dependencies |
|---|---|---|
resolve_warehouse.py | Resolve warehouse path from .agentic-beacon/config.toml | stdlib only |
summarize_changes.py | Build structured JSON view of every dirty warehouse path | pyyaml (PEP 723) |
draft_commit_message.py | Derive deterministic Conventional Commits message | stdlib only |
push_warehouse.py | Atomic push with recovery-command output on failure | stdlib only |
record-knowledge — Capture decisions and lessons into the warehouse knowledge baserecord-skill — Scaffold new Beacon skills in the warehouseSkill Version: 1.0.0 Last Updated: 2026-05-17