Extract `/ultra-cc-architect-local` and `/ultra-skill-author-local` plus all 7 supporting agents, the `cc-architect-catalog` skill (13 files), the `ngram-overlap.mjs` IP-hygiene script, and the skill-factory test fixtures from `ultraplan-local` v2.4.0 into a new `ultra-cc-architect` plugin v0.1.0. Why: ultraplan-local had drifted into containing two distinct domains — a universal planning pipeline (brief → research → plan → execute) and a Claude-Code-specific architecture phase. Keeping them together forced users to inherit an unfinished CC-feature catalog (~11 seeds) when they only wanted the planning pipeline, and locked the catalog and the pipeline into the same release cadence. The architect was already optional and decoupled at the code level — only one filesystem touchpoint remained (auto-discovery of `architecture/overview.md`), which already handles absence gracefully. Plugin manifests: - ultraplan-local: 2.4.0 → 3.0.0 (description + keywords updated) - ultra-cc-architect: new at 0.1.0 (pre-release; catalog is thin, Fase 2/3 of skill-factory unbuilt, decision-layer empty, fallback list still needed) What stays in ultraplan-local: brief/research/plan/execute commands, all 19 planning agents, security hooks, plan auto-discovery of `architecture/overview.md` (filesystem-level contract, not code-level). What moved (28 files via git mv, R100 — full history preserved): - 2 commands, 8 agents, 1 skill catalog (13 files), 2 scripts, 8 fixtures Documentation updates: plugin CLAUDE.md and README.md for both plugins, root README.md (added ultra-cc-architect section, updated ultraplan-local section), root CLAUDE.md (added ultra-cc-architect to repo-struktur), marketplace.json (registered ultra-cc-architect), ultraplan-local CHANGELOG.md (v3.0.0 entry with migration guidance). Test verification: ngram-overlap.test.mjs passes 23/23 from new location. Memory updated: feedback_no_architect_until_v3.md now points at the new plugin and reframes the threshold around catalog maturity rather than an ultraplan-local milestone. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
240 lines
7.7 KiB
Markdown
240 lines
7.7 KiB
Markdown
---
|
|
name: ultra-skill-author-local
|
|
description: Skill-factory Fase 1 — generate one cc-architect-catalog draft from a local source with IP-hygiene
|
|
argument-hint: "<source-file> [--fg | --quick]"
|
|
model: opus
|
|
allowed-tools: Agent, Read, Glob, Grep, Bash
|
|
---
|
|
|
|
# Ultra Skill Author Local v1.0
|
|
|
|
Manuell, én-skill-om-gangen-generator for `cc-architect-catalog`.
|
|
Konsumerer EN lokal kildefil (`.md` eller `.txt`), trekker ut konsept,
|
|
drafter SKILL.md-innhold med 9-felts frontmatter, og kjører IP-hygiene
|
|
mot kilden. Resultatet legges i `skills/cc-architect-catalog/.drafts/`
|
|
for manuell review og promotion (`mv` til katalog-rot).
|
|
|
|
Dette er Channel 2 av skill-factory-strategien:
|
|
manuell, ikke automatisk; én skill om gangen, ikke batch; lokal
|
|
kildefil, ikke URL eller remote.
|
|
|
|
```
|
|
Manual flow:
|
|
Pick a local source → /ultra-skill-author-local <source> → review .drafts/<slug>.md
|
|
→ if happy: mv .drafts/<slug>.md to catalog root
|
|
→ if rejected: pipeline deletes draft; pick another source or rewrite by hand
|
|
```
|
|
|
|
**Designprinsipp — én ansvarlig kjede.** Pipelinen er sekvensiell
|
|
(ikke parallell). Hvert steg konsumerer forrige stegs output.
|
|
`concept-extractor` bestemmer feature/layer; `skill-drafter` skriver
|
|
draft; `ip-hygiene-checker` skårer mot kilden og enten stempler scoren
|
|
i frontmatter eller sletter draftet.
|
|
|
|
## Phase 1 — Parse arguments
|
|
|
|
Parse `$ARGUMENTS`:
|
|
|
|
1. **Positional argument** (PÅKREVD) — sti til kildefil. Relativ sti
|
|
tolkes mot CWD.
|
|
2. **`--fg`** — foreground execution. Currently the only supported mode
|
|
in fase-1; flag accepted for consistency med pipeline-konvensjonen
|
|
(`--fg` finnes i alle `/ultra*-local`-kommandoer). Background-modus
|
|
er out-of-scope for fase-1 MVP.
|
|
3. **`--quick`** — hopp over Phase 4 (IP-hygiene) i orchestratoren.
|
|
Emit BIG WARNING: draftet får ikke ngram_overlap_score, og det er
|
|
IKKE klart for review. Brukes kun til å teste drafting-pipelinen i
|
|
isolasjon.
|
|
|
|
Hvis positional argument mangler, vis usage og stopp:
|
|
|
|
```
|
|
Usage: /ultra-skill-author-local <source-file> [--fg] [--quick]
|
|
|
|
A source file is required. The source must be a local .md or .txt file
|
|
on a Claude Code feature topic (hooks, subagents, skills, output-styles,
|
|
mcp, plan-mode, worktrees, background-agents).
|
|
|
|
Modes:
|
|
default Run the pipeline foreground (concept → draft → IP-hygiene)
|
|
--fg Same as default; flag accepted for consistency
|
|
--quick Skip IP-hygiene scoring (for testing the drafting pipeline)
|
|
|
|
Examples:
|
|
/ultra-skill-author-local ./docs/hooks-recipes.md
|
|
/ultra-skill-author-local ./docs/mcp-pattern-notes.md --fg
|
|
/ultra-skill-author-local ./docs/draft-source.md --quick
|
|
|
|
Pipeline position (skill-factory Channel 2):
|
|
curated local source → /ultra-skill-author-local
|
|
→ skills/cc-architect-catalog/.drafts/<slug>.md
|
|
→ manual review → mv to catalog root
|
|
```
|
|
|
|
Ikke fortsett forbi dette steget hvis kildefil mangler.
|
|
|
|
## Phase 2 — Validate source
|
|
|
|
Bash:
|
|
|
|
```bash
|
|
test -f "<source>" && echo "OK"
|
|
```
|
|
|
|
Hvis filen ikke finnes: stopp med tydelig feilmelding.
|
|
|
|
Sjekk extension:
|
|
|
|
```bash
|
|
case "<source>" in
|
|
*.md|*.txt) ;;
|
|
*) echo "Error: source must be .md or .txt"; exit 1 ;;
|
|
esac
|
|
```
|
|
|
|
Sjekk størrelse:
|
|
|
|
```bash
|
|
size=$(wc -c < "<source>")
|
|
if [ "$size" -gt 204800 ]; then
|
|
echo "Error: source > 200 KB (got $size bytes) — too large for fase-1 MVP"
|
|
exit 1
|
|
fi
|
|
```
|
|
|
|
200 KB-grensen kommer fra brief §Non-Goals (ingen multi-fil eller
|
|
mega-source-håndtering i fase 1).
|
|
|
|
Hvis quick-modus: emit BIG WARNING:
|
|
|
|
```
|
|
WARNING: --quick mode active.
|
|
The draft will NOT be scored against the source.
|
|
ngram_overlap_score will remain null.
|
|
DO NOT promote this draft to the catalog root without re-running
|
|
without --quick or scoring it manually.
|
|
```
|
|
|
|
## Phase 3 — Launch the orchestrator
|
|
|
|
Launch `skill-author-orchestrator` (model: opus) via the `Agent` tool
|
|
med denne prompten:
|
|
|
|
```
|
|
Source file: <absolute path to source>
|
|
Catalog root: ${CLAUDE_PLUGIN_ROOT}/skills/cc-architect-catalog/
|
|
Plugin root: ${CLAUDE_PLUGIN_ROOT}
|
|
Mode: <default | quick>
|
|
|
|
Run the full skill-author pipeline:
|
|
1. Validate source (you re-validate; trust nothing).
|
|
2. Launch concept-extractor (sonnet) with the source path. Parse JSON.
|
|
3. If out_of_scope: report and stop.
|
|
4. Launch skill-drafter (sonnet) with concept JSON + source path.
|
|
5. If too-technical-to-paraphrase: report and stop.
|
|
6. If mode != quick: launch ip-hygiene-checker (sonnet) with draft + source.
|
|
7. Emit completion summary with verdict, draft path, score, next-step.
|
|
```
|
|
|
|
Foreground execution (no `run_in_background`). Wait for the
|
|
orchestrator to complete before continuing.
|
|
|
|
## Phase 4 — Present summary to user
|
|
|
|
Når orchestratoren returnerer, presenter et kompakt sammendrag:
|
|
|
|
```
|
|
## Skill-Author Complete
|
|
|
|
Source: <source path>
|
|
Verdict: <accepted | needs-review | rejected | out-of-scope | skipped (--quick) | error>
|
|
Draft: <.drafts/<slug>.md | deleted | not-written>
|
|
Score: <ngram_overlap_score | n/a>
|
|
Longest: <longestRun shingle | n/a>
|
|
|
|
### Next step
|
|
<context-specific next step>
|
|
```
|
|
|
|
Next-step-tekstene matcher orchestratorens guidance:
|
|
|
|
- **accepted** →
|
|
```
|
|
Review the draft body. If you're happy:
|
|
mv skills/cc-architect-catalog/.drafts/<slug>.md \
|
|
skills/cc-architect-catalog/<slug>.md
|
|
```
|
|
- **needs-review** →
|
|
```
|
|
Score is in the gray zone (between accepted and rejected). Open the
|
|
draft, compare against the source, decide whether the overlap is
|
|
unavoidable (technical contract) or fixable (rephrase further).
|
|
```
|
|
- **rejected** →
|
|
```
|
|
Draft was deleted (containment too high or longest verbatim run too
|
|
long). Either rephrase the source by hand and re-run, or pick a
|
|
different source.
|
|
```
|
|
- **out-of-scope** →
|
|
```
|
|
Source did not map to a fase-1 supported cc_feature/layer combo.
|
|
Reason: <reason from concept-extractor>
|
|
Pick a source that explains how a CC feature works (reference layer)
|
|
or when to reach for it (pattern layer).
|
|
```
|
|
- **skipped (--quick)** →
|
|
```
|
|
Re-run WITHOUT --quick to score the draft before promotion.
|
|
```
|
|
- **error** →
|
|
```
|
|
See error above. Common causes: source unreadable, source too large,
|
|
drafter aborted on too-technical-to-paraphrase.
|
|
```
|
|
|
|
## Phase 5 — Stats
|
|
|
|
Append én linje til
|
|
`${CLAUDE_PLUGIN_DATA}/ultra-skill-author-local-stats.jsonl`:
|
|
|
|
```json
|
|
{
|
|
"ts": "<ISO-8601>",
|
|
"source": "<source path>",
|
|
"source_size_bytes": <N>,
|
|
"mode": "<default|quick>",
|
|
"verdict": "<accepted|needs-review|rejected|out-of-scope|skipped|error>",
|
|
"cc_feature": "<from concept-extractor or null>",
|
|
"layer": "<reference|pattern|null>",
|
|
"slug": "<computed slug or null>",
|
|
"draft_path": "<.drafts/<slug>.md | null>",
|
|
"ngram_overlap_score": <float | null>,
|
|
"longest_run": <int | null>,
|
|
"deleted": <true|false>
|
|
}
|
|
```
|
|
|
|
Hvis `${CLAUDE_PLUGIN_DATA}` ikke er satt eller ikke skrivbar, skip
|
|
stats silently.
|
|
|
|
## Hard rules
|
|
|
|
- **One source per invocation.** Brukeren passer én sti. Pipelinen
|
|
produserer én draft (eller null på out-of-scope/rejected/error).
|
|
- **No automation.** Ingen watcher, ingen batch, ingen retry. Brief
|
|
§Non-Goals er eksplisitt.
|
|
- **No catalog-root writes.** Drafts lever i `.drafts/` only.
|
|
Promotion er manuell `mv` av brukeren.
|
|
- **No source edits.** Kilden er read-only input.
|
|
- **No URL or remote input.** Kun lokale filstier i fase-1 MVP.
|
|
- **Foreground only in fase-1.** `--fg` aksepteres som no-op for
|
|
konvensjon; background-modus kommer i fase 2+.
|
|
- **Sonnet for sub-agents.** Opus kun for denne kommandoen og
|
|
orchestratoren.
|
|
- **Privacy.** Aldri logg kilde-innhold i stats eller summaries.
|
|
Verdikt, scorer og stier er nok.
|
|
- **Honesty.** Hvis pipelinen feiler, rapporter eksakt fase og grunn.
|
|
Ikke later som om det gikk bra.
|
|
- **--quick warning is mandatory.** Hopper du over IP-hygiene må
|
|
brukeren vite det tydelig — draftet er IKKE klart for promotion.
|