Skip to content

feat(init): add --template with a Gittensor (SN74) starter pack - #131

Merged
plind-junior merged 4 commits into
testfrom
feat/init-templates
May 28, 2026
Merged

feat(init): add --template with a Gittensor (SN74) starter pack#131
plind-junior merged 4 commits into
testfrom
feat/init-templates

Conversation

@plind-junior

Copy link
Copy Markdown
Member

Summary

Generalizes vouch init's seeding into a small in-code template registry and ships gittensor as the first non-default template, so a fresh KB inside a Gittensor repo has retrievable, cited context on day one instead of starting empty.

vouch init [--path P] [--template starter|gittensor]

What changed

  • --template flag on vouch init (default starter). The default path and its output are unchanged.

  • gittensor template seeds a small, cited, already-approved pack about SN74 contribution scoring — 1 source, 1 entity, 4 claims:

    • rewards TAO for PRs merged into whitelisted repos
    • validators verify GitHub ownership via a fine-grained PAT
    • scored by code quality + repo allocation + language factors
    • sybil-resistant via GitHub verification + merged-PR requirement

    Each claim cites the seeded Gittensor SN74 source and links the gittensor-sn74 entity.

  • Registry, not a one-off: TEMPLATES maps name → seed function, so future packs (research-notes, codebase-audit, …) plug in the same way. available_templates() drives help + error messages.

  • Unknown --template → clean Error: unknown template 'x' (available: gittensor, starter).

Why this shape

It complements gittensory rather than cloning it. Gittensory is the live-data decision layer (scores, queues, collisions); this pack is static, cited domain facts — vouch's lane (durable reviewed memory). No live Gittensor data is fetched.

Design notes

  • Approved-direct seeding, matching the existing seed_starter_kb — bootstrap content, not the review queue.
  • Idempotent: stable ids / content hashes mean re-running init creates nothing new.
  • In-code templates only — no templates/<name>/ files and no dependency on vouch ingest.

Tests

tests/test_templates.py (test-first):

  • registry: available_templates() lists both
  • seed_gittensor_kb: creates source + entity + 4 cited, entity-linked claims; second call is a no-op (idempotent)
  • CLI: init --template gittensor seeds the pack + prints the summary; --template bogus → clean error
  • Existing starter / init tests untouched and still green.

Verification

  • Full suite (non-embeddings): green
  • mypy src: clean
  • ruff: clean
  • Smoke: vouch init --template gittensor → "Seeded gittensor template: 6 artifact(s)"; vouch search "how are contributions scored" returns the cited SN74 claim

Not included

  • Other templates (registry makes them a one-liner to add later)
  • --template on commands other than init
  • Live Gittensor signals (intentionally — that's Gittensory's domain)

Design spec: docs/superpowers/specs/2026-05-27-init-templates-design.md

generalize init seeding into a named-template registry and ship a gittensor
(SN74) starter pack as the first non-default template. complements gittensory
rather than cloning its live-data signals.
generalize init seeding into a small in-code template registry. default
'starter' is unchanged; new 'gittensor' template seeds a cited, approved
pack (1 source, 1 entity, 4 claims) about SN74 contribution scoring so a
fresh kb in a gittensor repo has retrievable context immediately. unknown
--template gives a clean error listing available packs.

complements gittensory's live-data signals rather than cloning them.
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a097639c-adbb-45e4-8d42-60a81721dd50

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/init-templates

Comment @coderabbitai help to get the list of available commands and usage tips.

@plind-junior
plind-junior merged commit 731ca51 into test May 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant