翻訳待ち:Se-harness – portable, tool-agnostic AI coding harness generator
AI サービスが一時的に利用できないため、復旧後に翻訳を補完します。ソース概要:Notifications You must be signed in to change notification settings Fork 0 Star 2 BranchesTags Open more actions menu Folders and files NameName Last commit message Last commit date Latest commit History 93 Commits 93 C…
AI サービスが一時的に利用できないため、復旧後に翻訳を補完します。
Notifications You must be signed in to change notification settings Fork 0 Star 2 BranchesTags Open more actions menu Folders and files NameName Last commit message Last commit date Latest commit History 93 Commits 93 Commits .claude .claude .github .github .seh .seh assets assets dist dist scripts scripts src src test test .gitignore .gitignore CONTRIBUTING.md CONTRIBUTING.md LICENSE LICENSE README.md README.md package-lock.json package-lock.json package.json package.json seh.lock seh.lock tsconfig.json tsconfig.json tsup.config.ts tsup.config.ts vitest.config.ts vitest.config.ts Repository files navigation Portable, tool-agnostic AI coding harness generator. One source of truth, AGENTS.md as the entrypoint, no vendor lock-in. Table of Contents Quick Start Why seh Layers The two shapes of AGENTS.md Commands Harness Packages Skills Memory Agent skill directories Installation Try it (sandboxed demo) Development Quick Start curl -fsSL https://raw.githubusercontent.com/manuuuel/seh/main/scripts/install.sh | sh # Once per machine: unified global ruleset + agent symlinks seh init --global --agents claude,codex --yes # Per project: detect stack, scaffold AGENTS.md + .seh/ cd your-project seh init --tech typescript --yes # Regenerate generated files after editing .seh/ sources seh sync This gives you a ~/.seh/AGENTS.md global ruleset symlinked into your agents' config paths, plus a project AGENTS.md (and CLAUDE.md, GEMINI.md, …) that every supported agent reads automatically. Why seh seh produces the context files that AI coding agents (Claude Code, Codex, Gemini, Pi, OpenCode, Copilot, …) read: a single global ruleset on your machine plus a per-project index of focused, technology-specific guideline modules. Skills from a harness package are distributed to every agent that supports them. Edit one source of truth, run seh sync, and every tool-specific file regenerates in lockstep — no more copy-pasting the same rules into CLAUDE.md, GEMINI.md, and .github/copilot-instructions.md separately. Layers Layer Location What it is L0 — Core bundled in the CLI The authored source content (global sections + per-technology catalog). Fallback when no package is active. L1 — Global ~/.seh/ A single unified AGENTS.md with your cross-cutting rules. Authored once per machine; optional agent symlinks. Not copied into repos. L2 — Project /AGENTS.md + .seh/ A thin index linking project + per-technology modules. Committed to the repo. Package / A versioned git repo of global rules, stack modules, templates, and skills. Takes precedence over L0/L1 when active. Resolution order for any file: package → ~/.seh/ → seh bundled core. Global rules apply everywhere; project layers extend — never contradict them. Generated files must NOT be hand-edited. Edit the .seh/ sources and run seh sync to regenerate. The two shapes of AGENTS.md Global (~/.seh/AGENTS.md) is one self-contained file — every guardrail inlined in a single document, led by a forced Craftsmanship principle (keep it small and sharp, write elegant code, seek the most minimal better-working design, introduce no slop). Tools that auto-load a global instructions file get the whole ruleset directly. Project (/.seh/AGENTS.md) is the canonical file — a short directive preamble plus a progressive index (linked table of contents) pointing at focused modules under .seh/, loaded on demand: .seh/project.md — mission, constraints, out-of-scope (read-first) .seh/domain/*.md — architecture, glossary .seh/stack/.md — per-technology best practices Tool-specific files (AGENTS.md, CLAUDE.md, GEMINI.md, .github/copilot-instructions.md, etc.) are generated symlinks to .seh/AGENTS.md, gitignored, and regenerated by seh sync. Commands 1. Global setup (once per machine) seh init --global # interactive: choose which agents to symlink seh init --global --agents claude,codex --yes # non-interactive Creates: ~/.seh/AGENTS.md — the unified global ruleset (Craftsmanship first, then security, quality gates, testing, commits, branching, dependencies, error handling, observability, data & privacy, documentation, refactoring, workflow, session startup, reporting, boundaries, code principles). ~/.seh/config.json — which agents are symlinked. Optionally wire agents to auto-load it (see seh link). 2. Project setup cd your-project seh init # detects technologies, interactive multi-select seh init --tech typescript,python --yes # non-interactive (≥1 required) Creates: AGENTS.md — the project index (links to the modules below) .seh/project.md, .seh/domain/architecture.md, .seh/domain/glossary.md .seh/stack/.md for each selected technology seh.lock — records the selected technologies (commit it) Supported technologies: javascript, typescript, python, go, c, rust, java. No generic fallback — pick at least one. Then fill in .seh/project.md and .seh/domain/* and re-sync. 3. Sync — regenerate from sources seh sync Rewrites the project AGENTS.md index and .seh/stack/* from seh.lock. Idempotent (no change on re-run with unchanged sources). 4. Check — detect drift seh check Exit 0 if the generated files match the sources; exit 1 (with a message) if AGENTS.md or a stack module is stale or missing. Suitable for pre-commit/CI. 5. Link — manage agent symlinks seh link --add claude # symlink ~/.claude/CLAUDE.md -> ~/.seh/AGENTS.md seh link --remove claude # remove it AGENTS.md stays the single source of truth; symlinks are pure pointers, so there is no per-agent content to drift. Supported agents: claude, codex, pi, gemini, opencode, copilot, agents The agents target manages the cross-agent interoperability path (~/.agents/, .agents/) used as an alias by Gemini CLI, Pi, Copilot, and others. Global targets Agent Target claude ~/.claude/CLAUDE.md codex ~/.codex/AGENTS.md pi ~/.pi/agent/AGENTS.md gemini ~/.gemini/GEMINI.md opencode ~/.config/opencode/AGENTS.md copilot ~/.copilot/copilot-instructions.md agents ~/.agents/AGENTS.md Project targets Agent Target Canonical claude CLAUDE.md .seh/AGENTS.md codex AGENTS.md .seh/AGENTS.md pi AGENTS.md .seh/AGENTS.md gemini GEMINI.md .seh/AGENTS.md opencode AGENTS.md .seh/AGENTS.md copilot .github/copilot-instructions.md .seh/AGENTS.md agents .agents/AGENTS.md .seh/AGENTS.md Harness Packages A harness package is a plain directory the user versions with git, carries between machines, and shares with teammates. seh scaffolds and reads it; git is fully external and never wrapped. my-harness/ ├── harness.json — package metadata (name, version, modelTag) ├── CHANGELOG.md — harness decisions and reasoning (human-authored) ├── global/ │ ├── AGENTS.md — global ruleset (replaces ~/.seh/AGENTS.md) │ └── config.json — agent symlink config ├── templates/ │ ├── stack/ — per-technology structural patterns │ └── project/ — full project scaffolds ├── projects/ — per-repo overlays matched by repo name └── skills/ — skills to distribute (vendored or referenced) ├── brainstorming/ — vendored skill (committed to package repo) └── caveman/ — referenced skill (fetched on install) Package commands seh package init [path] Scaffolds a new harness package at path (default: ./my-harness). Creates the full directory structure, copies bundled stack modules as a starting point, writes harness.json and an empty CHANGELOG.md. seh package init ~/my-harness cd ~/my-harness && git init && git add . && git commit -m "init harness" seh package use Points seh at an existing package. Writes packagePath into ~/.seh/config.json. git clone [email protected]:you/my-harness.git ~/my-harness seh package use ~/my-harness seh package status Shows the currently active package path, name/version from harness.json, and whether each expected directory exists. seh package install Installs artifacts from the active package onto the host machine. seh package install --harness # write ~/.seh/AGENTS.md + agent symlinks seh package install --skills # symlink skills into ~/.seh/skills/ + agent dirs seh package install --all # both of the above seh package install --all --agents claude,gemini # non-interactive agent selection Flag Action --harness Writes ~/.seh/AGENTS.md from package/global/AGENTS.md; updates agent symlinks --skills Fetches referenced skills, symlinks package/skills// → ~/.seh/skills// → agent skill dirs --all Both of the above --agents Comma-separated agents to receive skill symlinks (prompts interactively if omitted) --force Overwrite existing files New machine workflow: git clone [email protected]:you/my-harness.git ~/my-harness seh package use ~/my-harness seh package install --all Skills Skills (reusable SKILL.md-based capability packages) are a first-class layer in the harness package. seh distributes them from the package to every agent that supports a skill directory. Skill layer model /skills// ← source (vendored or referenced) ↓ symlink ~/.seh/skills// ← stable intermediate on this machine ↓ symlinks ~/.claude/skills// ← Claude Code ~/.codex/skills// ← Codex CLI ~/.gemini/skills// ← Gemini CLI ~/.config/opencode/skills// ← OpenCode ~/.pi/agent/skills// ← Pi ~/.copilot/skills// ← GitHub Copilot ~/.agents/skills// ← cross-agent interoperability path ~/.seh/skills/ is the stable intermediate: if the package moves, agent symlinks remain intact until re-pointed. Skill commands seh skills add [--vendor | --reference] [--ref ] [routing flag] Adds a skill from a GitHub URL to the active package. seh skills add https://github.com/JuliusBrussee/caveman --reference seh skills add github:you/my-skill --vendor --ref v1.2 --vendor: clones files into /skills// (committed to git) --reference: records the URL in harness.json only; appends skills// to .gitignore; files are fetched at install time Prompts for type if neither flag is given Infers skill name from the repo name Routing flags tell agents when to invoke the skill. Exactly one may be used: Flag When agent invokes --always [label] Every response --when When the described scenario matches --optional Agent decides based on context seh skills add github:you/caveman --vendor --always "every response" seh skills add github:you/systematic-debugging --vendor --when "bug / test failure / unexpected behavior" seh skills add github:you/xlsx --vendor --optional Routing is stored in harness.json and rendered into a ## Skills section in both the project AGENTS.md (by seh sync) and the global ~/.seh/AGENTS.md (by seh package install --harness), so agents always know which skills to invoke and when. seh skills update [name] Re-fetches referenced skill(s) from their source. No arguments updates all referenced skills. Errors if the named skill is vendored. seh skills list Shows skills in the active package with their routing mode: ✓ brainstorming [vendor] always: before any implementation ✓ systematic-debugging [vendor] when: bug / test failure ✗ caveman [reference] https://github.com/JuliusBrussee/caveman (ref: main) ✓ xlsx [vendor] optional ✓ = files present on disk, ✗ = reference not yet fetched (run seh package install --skills to fetch). harness.json skills metadata { "name": "my-harness", "version": "1.0.0", "skills": { "brainstorming": { "type": "vendor", "invoke": { "mode": "always", "label": "before any implementation" } }, "systematic-debugging": { "type": "vendor", "invoke": { "mode": "when", "condition": "bug / test failure / unexpected behavior" } }, "caveman": { "type": "reference", "source": "https://github.com/JuliusBrussee/caveman", "ref": "main", "invoke": { "mode": "always", "label": "every response" } }, "xlsx": { "type": "vendor", "invoke": { "mode": "optional" } } } } Skill routing in AGENTS.md The same ## Skills section is appended to the project .seh/AGENTS.md (by seh sync) and to the global ~/.seh/AGENTS.md (by seh packag [truncated for AI cost control]