← ClaudeAtlas

importlisted

Onboard a repository that already exists — Stage 0c. Surveys the code read-only for what it can actually evidence, then drafts requirements from that evidence, every one marked inferred and unconfirmed until a person confirms it. If the repo already holds a spec, the same evidence is drift rather than a draft, and it asks what to do instead of guessing. Use when adopting the lifecycle in an existing project, bringing a legacy repo under a spec, importing a codebase, checking a repo against its own spec, or asking what this repo already does.
gitayg/productizer · ★ 0 · AI & Automation · score 76
Install: claude install-skill gitayg/productizer
# Stage 0c — a repo that already exists !`set -e; T="${1:-}"; R="$(cd "${T:-.}" 2>/dev/null && pwd)" || { echo "no such path: $T"; exit 0; }; SPEC="$R/.claude/productizer/spec.md"; STATE="none"; N=0; if [ -e "$SPEC" ] && [ ! -r "$SPEC" ]; then STATE="unreadable"; elif [ -r "$SPEC" ]; then N="$(grep -cE '^- \*\*R[0-9]+\*\*' "$SPEC" || true)"; if [ "${N:-0}" -gt 0 ]; then STATE="live"; else STATE="scaffold"; fi; fi; echo "SPEC STATE: $STATE ($N requirement(s)) at .claude/productizer/spec.md"; echo; case "$STATE" in unreadable) echo "A spec file exists here and cannot be read. Whether this repo is already onboarded is UNKNOWN, and unknown is not permission - surveying is safe, but nothing may be written into a spec nobody could open. Fix the permissions, then re-run."; exit 0 ;; live) echo "This repo is ALREADY UNDER A SPEC. Read the survey below as DRIFT, not as a draft."; echo "The evidence is identical either way; what changes is what it is evidence OF." ;; scaffold) echo "A spec file exists but declares no requirements. Treating it as scaffolding. It was already here; this run did not create it." ;; none) echo "No spec here. This is a genuine import." ;; esac; echo; S="${CLAUDE_PLUGIN_ROOT}/skills/spec/scripts/import-survey.sh"; [ -r "$S" ] || S="$(git rev-parse --show-toplevel 2>/dev/null)/plugins/productizer/skills/spec/scripts/import-survey.sh"; if [ ! -r "$S" ]; then echo "import-survey.sh not found. No survey was run - which is not the same as a repo with nothing in it