Three scripts that let multiple AI agents share a single Linux account
while maintaining per-identity attribution for all git operations:
- bw-git-credential.sh: git credential helper that sources Gitea tokens
from Bitwarden based on the repo's user.email config. Handles both
push (reads repo config) and clone (reads AGENT_CLONE_AS env var).
- agent-profile.sh: sourceable context switcher. Sets git author/
committer identity, registers tea login from BW, exports AGENT_NAME.
- clone-as.sh: clone wrapper that authenticates with the agent's BW
token, sets per-repo identity, strips token from remote URL.
No SSH key juggling, no tokens on disk, no multiple Linux accounts.
All credential material stays in Bitwarden.
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
Replaces the --env-file ~/.creds/*.env pattern with Bitwarden-sourced
credentials. Each agent identity stores its own API keys in a BW
collection; bw-run.sh fetches them at runtime and passes to CLI
containers via a temp env file (cleaned up on exit).
Usage: bw-run.sh <agent> <service> <image> [args...]
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
The primary value is the knowledge layer (markdown files that any agent
reads — Crush, OpenWebUI, Hermes, Conduit on iPhone). CLI tooling
(scripts, git hooks) is optional, for projects that use git/docker.
Changes:
- Remove Makefile entirely. All commands are now direct script invocations
(bash scripts/check-rules.sh, bash scripts/setup-hooks.sh, etc.)
- Add scripts/test.sh stub (replaces make test)
- check-rules.sh: test-suite check now calls scripts/test.sh, not make test
- Rewrite README as three-layer architecture: knowledge → git hooks → docker
- Update all docs (AGENTS.md, BASELINE-PROMPT.md, ADOPTING.md, PATTERNS.md,
STATUS.md) to remove every make reference
The framework now works for:
- CLI/harness users (git hooks + scripts + AGENTS.md)
- Non-CLI users (BASELINE-PROMPT.md loaded into any agent's system prompt)
💘 Generated with Crush
Assisted-by: Crush via Crush <crush@charm.land>
Apply answers to questions-v1.md (Q1–Q5):
- Q4: Remove crush.json and hooks/ entirely. All enforcement is now portable
via git hooks (pre-commit/pre-push) + check-rules.sh + AGENTS.md prose.
Works under Crush, OpenWebUI, Hermes, or any agent framework.
- Q5: Remove docs/JOURNAL.md. Redmine is the system of record for work;
Discourse for docs. JOURNAL.md was a stopgap.
- Q3: Add mandatory Discourse pointer-header check to check-rules.sh. Any
non-exempt tracked .md without a Discourse URL FAILs. All projects, no
exceptions.
- Q2: Reference real CLI container invocation paths
(KNEL-AIMiddleware/{redmine,discourse}-cli/) in AGENTS.md instead of the
missing bin/ shortcuts.
- Q1: Note tea + docker login are preconfigured on TSYS workstations.
Also: make test default is now no-op pass so the template self-validates;
make validate now passes clean on the repo itself (17 PASS / 0 FAIL).
💘 Generated with Crush
Assisted-by: Crush via Crush <crush@charm.land>
Extract patterns from 18 projects across two machines (12 local infra +
6 remote personal/business via ssh survey). Ship a reusable Gitea template
with AGENTS.md, 5 Crush PreToolUse hooks, git pre-commit/pre-push, a
generalized rules engine, shared bash library, Makefile, lifecycle scripts,
and gardening loop. Includes the canonical BASELINE-PROMPT.md (13 sections)
and PATTERNS.md (standardization scorecard).
The repo self-applies: it passes its own shellcheck (zero info-level),
make fast, and all check-rules.sh checks.
💘 Generated with Crush
Assisted-by: Crush via Crush <crush@charm.land>