publish
Publish a private guideline to a configured write-scope repo.
What this skill does
# Publish a Guideline
## Overview
Publish one or more private guidelines from `.evolve/entities/guideline/`
into a configured **write-scope** repo. The entity is stamped with
`visibility: public`, `owner`, `published_at`, and `source`, moved into
the local clone of the write repo, and committed / pushed to the remote.
The same local clone is also what `/evolve-lite:sync` pulls from — so you
and anyone else publishing to the same repo stay in sync.
## Workflow
### Step 1: Require a write-scope repo
Read `evolve.config.yaml`. If no entry has `scope: write`, tell the user:
> "You need at least one write-scope repo to publish to. Run /evolve-lite:subscribe with --scope write to set one up, then come back."
Then stop.
If `identity.user` is missing, ask for it and add it to the config.
### Step 2: First-time setup
Ensure `.evolve/` is gitignored at the project root:
```bash
grep -qxF '.evolve/' .gitignore 2>/dev/null || echo '.evolve/' >> .gitignore
```
### Step 3: Pick the target write-scope repo
Filter `repos:` to entries with `scope: write` (Step 1 already aborted if
there were zero, so at least one exists here).
- Exactly one entry → use it as default.
- Multiple entries → show a numbered list with `notes` and ask which to publish to.
Let `{repo}` be the chosen repo name and `{branch}` its configured branch (default `main`).
### Step 4: List and select entities
List files in `.evolve/entities/guideline/` and ask the user which to publish.
### Step 5: Run publish script
For each selected file, run:
```bash
python3 ${CLAUDE_PLUGIN_ROOT}/skills/evolve-lite/publish/scripts/publish.py \
--entity "{filename}" \
--repo "{repo}" \
--user "{identity.user}"
```
### Step 6: Commit and push
Build `{names}` as a comma-joined list of selected filenames, and
`{guideline_paths}` as a space-joined list of the corresponding
`guideline/{filename}` paths inside the clone (the files the publish
script just wrote).
```bash
git -C ".evolve/entities/subscribed/{repo}" add -- {guideline_paths}
git -C ".evolve/entities/subscribed/{repo}" commit -m "[evolve] publish: {names}"
git -C ".evolve/entities/subscribed/{repo}" push origin "{branch}"
```
On push success, continue to Step 7.
### Step 6a: Recover from non-fast-forward rejection
If the push fails and stderr mentions `rejected` / `non-fast-forward`
/ `fetch first`, another writer pushed to `{branch}` in between.
Rebase the local commit and push once more:
```bash
git -C ".evolve/entities/subscribed/{repo}" fetch origin "{branch}"
git -C ".evolve/entities/subscribed/{repo}" rebase "origin/{branch}"
```
- Rebase clean → retry `git push origin "{branch}"` once, then Step 7.
- Rebase conflicted → attempt to resolve, then hand off for user
review. Do not `git rebase --continue` or `git push` without an
explicit user confirmation.
1. `git -C ".evolve/entities/subscribed/{repo}" status --porcelain`
lists the conflicted paths. If any are `UD`, `DU`, or binary,
skip to the abort step — those aren't safe to auto-resolve.
2. For each `UU`/`AA` file, read the conflict markers. During a
rebase, `<<<<<<< HEAD` is the **remote's** version and the
section under the commit sha is the **publish change** being
replayed (opposite of a regular merge). Write an
intent-preserving resolution; don't `git add` yet.
3. Show the user the diff (`git -C ".evolve/entities/subscribed/{repo}" diff HEAD -- {file}`) per
resolved file with a one-line strategy summary, and ask whether
to **continue** (stage + `rebase --continue` + push) or **abort**
(roll back for manual resolution).
4. On **continue**:
```bash
git -C ".evolve/entities/subscribed/{repo}" add {resolved-files}
git -C ".evolve/entities/subscribed/{repo}" rebase --continue
git -C ".evolve/entities/subscribed/{repo}" push origin "{branch}"
```
Then Step 7. If `rebase --continue` surfaces a new conflict, loop
from step 1.
5. On **abort** — user declined, conflict isn't safely resolvable,
or the proposed merge feels unsafe:
```bash
git -C ".evolve/entities/subscribed/{repo}" rebase --abort
```
The local publish commit is preserved at
`.evolve/entities/subscribed/{repo}` but not on the remote. Tell
the user to either (a) resolve manually in that directory
(`git fetch origin {branch} && git rebase origin/{branch}`, fix
conflicts, `git add` + `git rebase --continue`, `git push origin
{branch}`) or (b) re-run `/evolve-lite:publish` with a different
filename if the conflict is a shared name.
If the push fails for any other reason (auth, network, missing remote
ref), surface git's error and stop — rebase will not help.
### Step 7: Confirm
Tell the user what was published and to which repo.
## Notes
- Published entities are **moved** from `.evolve/entities/guideline/` into
the write-scope clone at `.evolve/entities/subscribed/{repo}/guideline/`,
with `visibility: public`, `owner: {user}`, `published_at`, and `source`
stamped in frontmatter
- The original private entity is deleted after successful publication
- All publish actions are logged to `.evolve/audit.log`
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.