Adds the repository-stewardship Python package (src/stewardship) with: - JSON Schemas (Draft 2020-12) for RepositoryContract, KnowledgeBase, CatalogIndex, ContextBundle, BootstrapPlan, AdoptionAssessment/Plan/Report, user config and the repoctl-result envelope. - Safe YAML I/O, path confinement, deterministic clock and canonical-JSON hashing. - validate: schema, ID uniqueness, path safety, KDB references, freshness, secret-shaped fields, shell-string detection, and Markdown frontmatter/fence/link checks. - discover/CatalogIndex with deterministic sorting and duplicate-name detection. - describe (contract-only) and context (intent-scoped ContextBundle with budgeted materialization and --strict truncation). - init: plan-then-apply bootstrap with SHA-256 plan-hash approval, no fake domain artifacts, bundled Claude skills. - adopt: assess/plan/apply/verify overlay workflow per docs/adoption-runbook.md, preserving legacy content roots and KDB, with baseline-hash re-check and rollback. - argparse-based `repoctl` CLI with human/yaml/json output and spec exit codes. - pytest suite (39 tests) covering positive/negative fixtures, discovery, context, bootstrap and adoption (including LXD- and Antivirus-shaped legacy layouts). Managed with uv (.venv), ruff clean, mypy --strict clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
apiVersion: stewardship.corsus.ru/v1alpha1
|
|
kind: RepositoryContract
|
|
metadata:
|
|
name: infra-lxd
|
|
title: LXD infrastructure
|
|
owners:
|
|
- infrastructure
|
|
spec:
|
|
summary: Desired state and operations for managed LXD containers
|
|
repository:
|
|
type: infrastructure-config
|
|
lifecycle: production
|
|
namespace: Infra
|
|
agent:
|
|
primary: CLAUDE.md
|
|
portable: AGENTS.md
|
|
knowledge:
|
|
entrypoint: kdb/kdb.yaml
|
|
contentRoots:
|
|
- id: profiles-source
|
|
role: profiles
|
|
path: profiles-source
|
|
kind: directory
|
|
authority: source
|
|
writePolicy: managed
|
|
selector: "**/*.yaml"
|
|
- id: profiles-observed
|
|
role: observed
|
|
path: profiles
|
|
kind: directory
|
|
authority: mirror
|
|
writePolicy: generated
|
|
selector: "**/*.yaml"
|
|
provides:
|
|
- id: container
|
|
capability: compute.lxd-container
|
|
summary: Managed LXD system container
|
|
operations:
|
|
- id: container.inspect
|
|
title: Inspect containers
|
|
intents:
|
|
- container.inspect
|
|
- container.deploy
|
|
phase: inspect
|
|
effect: read-only
|
|
risk: low
|