feat: initialize AI agent harness
This commit is contained in:
57
README.md
Normal file
57
README.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# KRI Agent Harness
|
||||
|
||||
This repository composes deterministic, self-contained `AGENTS.md` and paired `CLAUDE.md` files for repositories under the KRI development workspace.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Windows PowerShell 5.1 or newer
|
||||
- Node.js 20 or newer
|
||||
|
||||
The committed `dist` bundle contains runtime dependencies. `npm install` is needed only when changing or rebuilding the harness source.
|
||||
|
||||
## Commands
|
||||
|
||||
Run commands from this repository root:
|
||||
|
||||
```powershell
|
||||
.\scripts\agent-harness.cmd list
|
||||
.\scripts\agent-harness.cmd plan --project kri-contact-front
|
||||
.\scripts\agent-harness.cmd plan --contract kri-common
|
||||
.\scripts\agent-harness.cmd verify --project kri-contact-front
|
||||
.\scripts\agent-harness.cmd verify --contract kri-common
|
||||
.\scripts\agent-harness.cmd compose --project kri-contact-front
|
||||
.\scripts\agent-harness.cmd compose --contract kri-common
|
||||
.\scripts\agent-harness.cmd register --project kri-contact-front --path _KriContact/contact-front
|
||||
```
|
||||
|
||||
The `.cmd` launcher invokes the PowerShell wrapper with a process-scoped execution-policy bypass. It does not change the user or machine execution policy. When local scripts are already allowed, `scripts\agent-harness.ps1` may be called directly.
|
||||
|
||||
`plan`, `verify`, and `list` are read-only. `compose` writes only generated `AGENTS.md` and `CLAUDE.md`. `register` writes only `workspace.local.yml`. No command performs Git, database, deployment, or network operations.
|
||||
|
||||
Use `--contract <contract-id>` to select the registered provider first and then only registered consumers of that contract, ordered by project ID. Use `--all` only when every registered project is intentionally in scope. `--project`, `--contract`, and `--all` are mutually exclusive.
|
||||
|
||||
## Workspace Files
|
||||
|
||||
- `workspace.yml` contains shared relative project registrations and is committed.
|
||||
- `workspace.local.yml` contains machine-local registrations and is ignored by Git.
|
||||
- `workspace.local.example.yml` documents the local format.
|
||||
- Project paths are relative to `workspace_root` and may not escape it.
|
||||
|
||||
## Repository Inputs
|
||||
|
||||
Each managed repository owns:
|
||||
|
||||
- `.agent/profile.yml`
|
||||
- `.agent/project.md`
|
||||
- `.agent/consumer.md` when it provides a shared contract
|
||||
|
||||
Edit source inputs, run `plan`, obtain the required approval, then run `compose`. Use `verify` to detect stale generated output.
|
||||
|
||||
## Development
|
||||
|
||||
On Windows PowerShell, use `npm.cmd` because the `npm.ps1` shim may be blocked by execution policy:
|
||||
|
||||
```powershell
|
||||
npm.cmd install
|
||||
npm.cmd run verify
|
||||
```
|
||||
Reference in New Issue
Block a user