darkmatter/skills

darkmatter-gitops-conventions

Safe-change playbook for the darkmatter/gitops repo — validation before commit (kubeconform with CI-identical flags, yq for YAML manifests, jq for SOPS JSON, git diff --check), sha-pinned images, KSOPS/SOPS secret editing rules, rollback via revert, and how…

Voir la source
Document Skill original

Rendu depuis le dépôt source en conservant titres, exemples, code, tableaux, liens et images.

Darkmatter gitops conventions

darkmatter/gitops is the single source of truth for the k3s cluster: ArgoCD app-of-apps, Helm values, KSOPS secrets, network policies, cloudflared routes. A change is real only when it's committed here — everything else is drift.

The prime rule

Never mutate the cluster imperatively. No kubectl apply/edit/patch, no helm upgrade, no imperative restarts. If a live object disagrees with the repo, the repo wins and the object is the bug.

  • Reload a deployment: bump its pod-template config-rev annotation in the

manifest and commit — not kubectl rollout restart.

  • Force ArgoCD to reconcile now: set the

arc.darkmatter.io/reconcile-at: "<current UTC timestamp>" annotation in the manifest.

  • Roll back: git revert the offending commit and push. ArgoCD converges.

Never "fix forward" live.

Validate before every commit

Run all three; CI runs them and a red main is worse than a slow commit:

bash
kubeconform -strict -ignore-missing-schemas -summary <changed manifests>
yq eval '.' <changed file> > /dev/null        # syntax parse
git diff --check                              # whitespace damage

For ArgoCD apps/*.yaml whose Helm values live in a block scalar, validate the embedded YAML too:

bash
yq eval '.spec.sources[0].helm.values | from_yaml' apps/<app>.yaml > /dev/null

Assertion scripts must not paper over failures: no || true; use set +e plus explicit PIPESTATUS[0] capture when a pipeline's exit code matters.

Images

Pin by full-commit tag (sha-<40-hex>) or digest — never latest, never a branch tag. Bumping an image = a one-line diff that names the commit it ships in the message. ArgoCD picks it up on sync (~3 min); a changed sandbox/pod spec hash churns dependent warm pools automatically.

Secrets (KSOPS/SOPS)

  • Secrets live encrypted in-repo as JSON (*.sops.json), rendered by KSOPS.

See ADR-0011. Do not add new *.sops.yaml / .env.sops. Convert existing YAML SOPS files when touched. Kubernetes Secret JSON is valid for the API.

  • Editing: decrypt to a 0600 temp file, edit, re-encrypt, then verify

structurally (jq empty on the decrypted form) and by diffing key NAMES only — never print values. Clean up the temp file. Plain non-secret manifests stay YAML; keep using yq for those.

  • Reference secrets by name everywhere else; an inline secret value in any

manifest or log is an incident.

  • Agent/runtime secrets follow the hardened flow (Centaur vault + console

PUTs), not git — this repo carries infra secrets only.

ArgoCD expectations

  • Sync cadence ~3 min; check the app in ArgoCD rather than re-pushing.
  • Stale sync retries: remove the /operation field from the Application and

hard-refresh.

  • Critical resources that must survive pruning carry IgnoreExtraneous /

Prune=false annotations — respect existing ones when editing nearby.

Tasks

Track follow-ups in beads (bd create), not TODO comments. Reproducibility is the bar: the cluster must be rebuildable from this repo alone.

du même dépôt

Autres Skills

Tous les Skills
darkmatter
Communauté

alchemy

Configure, develop, deploy, review, and troubleshoot Alchemy v2 infrastructure for Darkmatter TypeScript/Effect apps. Triggers for alchemy.run.ts, alchemy dev, public preview URLs, webhook testing, Cloudflare/AWS providers, stages, profiles, state stores, bindings, CI deploys, or examples from alchemy-run/alchemy-effect. Prefer Alchemy for new org deploys. Do NOT trigger for unrelated blockchain Alchemy APIs unless the user explicitly means alchemy.run.

installations
2
GitHub Stars
0
Mis à jour
26 sept.
darkmatter
Communauté

codebase-cleanup

Multi-pass refactor / code-quality cleanup designed to be dispatched as 8 specialist subagents (one per cleanup concern), each running a research → critical-assessment → high-confidence-implementation cycle. Triggers on "clean up the codebase", "tech-debt pass", "refactor for quality", "find dead code", "remove AI slop", or any explicit request for a comprehensive quality sweep. Do NOT trigger for narrow targeted fixes ("remove this one function") or for net-new feature work.

installations
2
GitHub Stars
0
Mis à jour
26 sept.
darkmatter
Communauté

darkmatter-design-system

Default design system — darkmatter's dark-first, terminal-inspired design system , built on Tailwind CSS v4, React 19, and Radix UI. Use this as the default design system when working in an app that does not already have an established design system or guidelines. Use it for dashboards, trading/monitoring consoles, forms, tables, settings, navigation, or any screen that should look and feel like darkmatter's brand. This is the canonical source for darkmatter components, tokens (the OKLCH --n- ra

installations
2
GitHub Stars
0
Mis à jour
26 sept.
darkmatter
Communauté

darkmatter-repo-setup

- Use when setting up a new repo, onboarding an existing repo to darkmatter standards, running a compliance check, or when the user says "set up this repo", "bring repo up to standards", "apply template", or "audit repo". Checks and installs the org TypeScript toolchain (Bun catalog, Effect 4, effect-agent, effect-orpc, Postgres-first data, tsgo, oxlint/oxfmt, Vitest, vite-plus, React 19, shadcn), Nix flake-parts devshell, ops/ surface, CI pipeline, and AGENTS.md conventions.

installations
2
GitHub Stars
0
Mis à jour
26 sept.