Skip to content

MARKDOWN SOURCE

Raw
# AGENTS.md

Guidance for AI coding agents working in this repository.

## Project

`any`: one command that installs the `silen-infra` agent skill into the current
repository. It is a single Zig 0.17.0 binary with no runtime dependencies.

The skill source of truth is `skills/silen-infra/SKILL.md`. It is embedded into
the binary at build time; edit the Markdown and rebuild, do not duplicate the
text in Zig.

## Libraries: Zig standard library only

- The only library you may use is the Zig standard library.
- Do not add packages, `build.zig.zon` dependencies, vendored code, or C code.
- If a task seems to need a library, implement the smallest version with `std`,
  or ask the user first.

## Environment: use mise

- Install the pinned tool with `mise install`.
- Run tasks with `mise run <task>`.
- Before finishing, run `mise run check` and report the result.

## Layout

- `src/main.zig`: process entry point, command dispatch, stdout helper.
- `src/cli.zig`: argument parsing and usage text.
- `src/install.zig`: create/append/check logic for the target file.
- `src/skill.zig`: embedded skill text, frontmatter stripping, markers.
- `skills/silen-infra/SKILL.md`: the skill payload installed by `any`.
- `build.zig`: embeds the skill and version into `build_options`.

## Behavior

- `any` with no arguments and `any skill` install the skill at
  `.opencode/skills/silen-infra/SKILL.md`.
- A missing file is created with the full skill (frontmatter included).
- An existing file that already contains the skill is left untouched.
- An existing different file gets the skill body appended under the
  `<!-- any:skill silen-infra -->` marker.
- `--force` replaces, `--check` verifies, `--print` writes to stdout, and
  `--path` changes the target.

Keep the install path and markers stable; other repositories and CI may rely on
them.

## Tests

- Unit tests live beside the code in `test` blocks.
- Prefer pure tests for parsing and content composition.
- `mise run test` builds and runs every test. It must pass with no allocator
  leaks.

AGENTS.md

Guidance for AI coding agents working in this repository.

Project

any: one command that installs the silen-infra agent skill into the current repository. It is a single Zig 0.17.0 binary with no runtime dependencies.

The skill source of truth is skills/silen-infra/SKILL.md. It is embedded into the binary at build time; edit the Markdown and rebuild, do not duplicate the text in Zig.

Libraries: Zig standard library only

  • The only library you may use is the Zig standard library.
  • Do not add packages, build.zig.zon dependencies, vendored code, or C code.
  • If a task seems to need a library, implement the smallest version with std, or ask the user first.

Environment: use mise

  • Install the pinned tool with mise install.
  • Run tasks with mise run <task>.
  • Before finishing, run mise run check and report the result.

Layout

  • src/main.zig: process entry point, command dispatch, stdout helper.
  • src/cli.zig: argument parsing and usage text.
  • src/install.zig: create/append/check logic for the target file.
  • src/skill.zig: embedded skill text, frontmatter stripping, markers.
  • skills/silen-infra/SKILL.md: the skill payload installed by any.
  • build.zig: embeds the skill and version into build_options.

Behavior

  • any with no arguments and any skill install the skill at .opencode/skills/silen-infra/SKILL.md.
  • A missing file is created with the full skill (frontmatter included).
  • An existing file that already contains the skill is left untouched.
  • An existing different file gets the skill body appended under the <!-- any:skill silen-infra --> marker.
  • --force replaces, --check verifies, --print writes to stdout, and --path changes the target.

Keep the install path and markers stable; other repositories and CI may rely on them.

Tests

  • Unit tests live beside the code in test blocks.
  • Prefer pure tests for parsing and content composition.
  • mise run test builds and runs every test. It must pass with no allocator leaks.