Borrowing it
Nothing to install: this file belongs to nczz/kiro-discord-bot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/nczz/kiro-discord-bot/main/.kiro/steering/project.mdgit clone --depth 1 https://github.com/nczz/kiro-discord-botWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/nczz/kiro-discord-bot/project)<a href="https://agentmods.dev/instructions/nczz/kiro-discord-bot/project"><img src="https://agentmods.dev/badge/instructions/nczz/kiro-discord-bot/project/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/nczz/kiro-discord-bot/project"><img src="https://agentmods.dev/badge/instructions/nczz/kiro-discord-bot/project.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.04620 | $0.04620 |
| Opus 5.5 | $0.01848 | $0.01848 |
| Sonnet 5.5 | $0.00924 | $0.00924 |
| Haiku 4.5 | $0.00462 | $0.00462 |
Grade A, and why
project-contract scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
kiro-discord-bot — Project Contract
AGENTS.md at the repository root is the cross-agent entrypoint. This Kiro steering file is the deeper project contract for architecture, recurring rules, and verification details. If AGENTS.md, .kiro/steering/*, and docs disagree, stop and resolve the source-of-truth drift before implementation.
Build & Run
- Build:
go build -o kiro-discord-bot . - Build MCP server:
go build -o mcp-discord ./cmd/mcp-discord/ - Test:
go test ./... - Single package test:
go test ./acp/ - Release preflight:
scripts/release-preflight.sh - Local ACP smoke:
RUN_ACP_SMOKE=1 KIRO_CLI=$(which kiro-cli) scripts/release-preflight.sh - Run:
systemctl start kiro-discord-bot(systemd, recommended) orexport $(grep -v '^#' .env | xargs) && ./kiro-discord-bot(manual) - Config: bot settings from
.env, seeconfig.goloadConfig(); Discord MCP-only settings are read incmd/mcp-discord/ - Diagnostics:
/doctoror!doctorcheckskiro-cli, default cwd, cwd allowlist, data dir writeability, and ACP preflight
Architecture Boundaries
main.go → loadConfig + bot.Start + signal wait
config.go → .env → Config struct (mustEnv / envOr / envInt / envBool)
bot/ → Discord gateway, slash commands, message routing
handler.go → message + slash command dispatch (不放業務邏輯)
handler_cron.go→ /cron Modal, /cron-list Button, /remind
notifier.go → shared botNotifier (Notify+IsSilent) embedded by all adapters
health_adapter → heartbeat.HealthDeps bridge
cron_adapter → heartbeat.CronDeps bridge
thread_cleanup_adapter → heartbeat.ThreadCleanupDeps bridge
channel_cleanup_adapter → heartbeat.ChannelCleanupDeps bridge
channel/ → per-channel lifecycle
manager.go → session + worker + agent 生命週期管理中樞、cwd allowlist enforcement
worker.go → job queue goroutine, thread-based execution
session.go → SessionStore JSON persistence
logger.go → JSONL conversation log
acp/ → kiro-cli ACP child process (JSON-RPC over stdio)
agent.go → spawn, handshake (session/new or session/load), ask, cancel, stop, set_model, set_mode
jsonrpc.go → ndjson transport
ringbuf.go → thread-safe ring buffer for stderr capture
protocol.go → ACP constants, capability structs, PromptContent (protocol version 1)
heartbeat/ → background task loop
health.go → agent liveness check + auto-restart
gateway.go → Discord Gateway heartbeat ACK watchdog + reconnect/escalate
cleanup.go → expired attachment removal
cron.go → cron scheduler + temp agent execution
cron_store.go → cron job JSON persistence
schedule.go → natural language → cron/time parser
thread_cleanup.go → idle thread agent eviction
channel_cleanup.go → idle channel agent eviction
cmd/mcp-discord/ → optional pure Discord REST MCP server + direct formatting/file/mention guards
scripts/ → repeatable local release/preflight checks
docs/release.md → release and deployment safety checklist
.github/ → CI preflight workflow for push/PR checks
.kiro/steering/360-review-handoff.md → evidence-first review, fix, verification, and handoff loop
.kiro/steering/review-examples.md → concrete examples of rigorous review and reuse discipline
.kiro/steering/decision-failure-patterns.md → architecture decisions, non-goals, recurring failures, regression expectations
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +1 lines · +112 tokens per session 837b7af1af3f
- 1mo ago Changed · +37 tokens per session b25a549250a1
- 1mo ago Changed · +1 lines · +19 tokens per session f59ff5812836
- 1mo ago First seen · 150 lines · 4,452 tokens per session scan A 10f6803261d3
project-contract is an instructions file published in the GitHub repository nczz/kiro-discord-bot (44 stars, last pushed 16d ago), licensed MIT. It adds 4,620 tokens to every session, about $0.0185 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.