Add .kiro config: steering, agents, hooks; remove AGENTS.override.md

Commit
e32945a920c288af030dec7c59e919d331e24ea5
Author
Claude Sonnet 4 <agent@anthropic.com>
Author date
Committer
Claude Sonnet 4 <agent@anthropic.com>
Committer date
Changed files
.kiro/agents/test-runner.md
index 00000000..8f8e8727 000000..100644
@@ -0,0 +1,41 @@
1 Added: # Test Runner Agent
2 Added:
3 Added: ## Role
4 Added: You are the test runner agent for the ogit project. Your
5 Added: responsibility is to run the full test suite after a commit is made,
6 Added: report results clearly, and help diagnose any failures.
7 Added:
8 Added: ## Behavior
9 Added:
10 Added: 1. Run the test suite using `opam exec -- dune test`
11 Added: 2. Parse and summarize the output:
12 Added: - If all tests pass, report a short success summary with the number
13 Added: of tests run.
14 Added: - If any tests fail, report which tests failed, their error output,
15 Added: and suggest likely causes.
16 Added: 3. Always report the result back to the main agent concisely.
17 Added:
18 Added: ## Output Format
19 Added:
20 Added: Report results in this format:
21 Added:
22 Added: ```
23 Added: TEST REPORT
24 Added: ===========
25 Added: Status: PASS | FAIL
26 Added: Tests run: <count>
27 Added: Failures: <list of failed test names, if any>
28 Added: Duration: <time if available>
29 Added:
30 Added: Details (on failure):
31 Added: - <test_name>: <brief error description>
32 Added: ```
33 Added:
34 Added: ## Tools Available
35 Added: - execute_bash: to run `opam exec -- dune test` and inspect output
36 Added: - read_file: to inspect test source files if diagnosing failures
37 Added:
38 Added: ## Constraints
39 Added: - Do NOT modify any source or test files.
40 Added: - Do NOT commit or push anything.
41 Added: - Only read and run commands. Report findings back to the calling agent.
.kiro/hooks/dune-fmt-pre-commit.json
index 00000000..85dd6704 000000..100644
@@ -0,0 +1,14 @@
1 Added: {
2 Added: "version": "v1",
3 Added: "hooks": [
4 Added: {
5 Added: "name": "Run dune fmt before commits",
6 Added: "trigger": "PreToolUse",
7 Added: "matcher": "execute_bash",
8 Added: "action": {
9 Added: "type": "agent",
10 Added: "prompt": "Before running any git commit command, always run `opam exec -- dune fmt` first and stage any resulting changes."
11 Added: }
12 Added: }
13 Added: ]
14 Added: }
.kiro/hooks/run-tests-after-commit.json
index 00000000..1b435ec2 000000..100644
@@ -0,0 +1,16 @@
1 Added: {
2 Added: "version": "v1",
3 Added: "hooks": [
4 Added: {
5 Added: "name": "Run tests after git commit",
6 Added: "trigger": "PostToolUse",
7 Added: "description": "Detects git commit commands and instructs the main agent to invoke the test-runner agent to run and report the test suite.",
8 Added: "matcher": "execute_bash",
9 Added: "action": {
10 Added: "type": "command",
11 Added: "command": "#!/bin/bash\n# Read the tool input from stdin to check if it was a git commit command\nINPUT=$(cat)\nCOMMAND=$(echo \"$INPUT\" | grep -o '\"command\":\"[^\"]*\"' | head -1 | sed 's/\"command\":\"//;s/\"$//')\nif echo \"$COMMAND\" | grep -qE 'git\\s+commit'; then\n echo \"GIT_COMMIT_DETECTED: Tests should be run. Invoke the test-runner agent (defined in .kiro/agents/test-runner.md) to run 'opam exec -- dune test' and report the results.\"\nfi",
12 Added: "timeout": 10
13 Added: }
14 Added: }
15 Added: ]
16 Added: }
.kiro/steering/agents.md
index 00000000..e70317bb 000000..100644
@@ -0,0 +1,66 @@
1 Added: # Agent Guidance
2 Added:
3 Added: Author: Marius Peter
4 Added: Date: 2026-07-09
5 Added:
6 Added: ## Normative Language
7 Added:
8 Added: - **SHALL**: mandatory.
9 Added: - **SHOULD**: expected unless there is a documented reason not to.
10 Added: - **MAY**: optional.
11 Added: - **MUST NOT**: prohibited.
12 Added:
13 Added: ## Context
14 Added:
15 Added: ### Scope
16 Added:
17 Added: - The project SHALL implement a lightweight, mobile-friendly alternative to the cgit software.
18 Added:
19 Added: ## Architecture
20 Added:
21 Added: ### Opam switch
22 Added:
23 Added: - The project SHALL rely on a project-local opam switch found at `./_opam/`.
24 Added:
25 Added: ### Build system
26 Added:
27 Added: - The project SHALL use the Dune build system.
28 Added:
29 Added: ## Repository Map
30 Added:
31 Added: - `README.org` — describes the overall architecture.
32 Added: - `bin/` — contains the main ogit executable target.
33 Added: - `lib/` — contains libraries used by ogit.
34 Added: - `test/` — contains tests.
35 Added:
36 Added: ## Code
37 Added:
38 Added: The public code repo is hosted at <https://git.mlnp.fr/ogit>.
39 Added:
40 Added: ### Versions
41 Added:
42 Added: - The project SHALL target OCaml 5.2.1.
43 Added:
44 Added: ### Format
45 Added:
46 Added: - The project code SHALL be formatted using the `.ocamlformat` config file located at the project root.
47 Added: - Before committing code, agents SHALL run `dune fmt` and ensure that it completes successfully.
48 Added:
49 Added: ### Version control system
50 Added:
51 Added: - The project SHALL use Git as its version control system.
52 Added: - Commits created by an AI agent SHALL indicate so in the commit fields:
53 Added: - `user.name` — concatenate agent model name, and intelligence or reasoning level.
54 Added: - `user.email` — fictitious e-mail address identifying the agent's parent company.
55 Added: - A commit SHALL be created after every set of modifications brought to the code.
56 Added: - In case of adjustments being requested to code that was just committed, the latest commit SHALL be amended, rather than a new commit being created.
57 Added:
58 Added: ## Documentation
59 Added:
60 Added: - This repository SHALL use Org Mode for project documentation. New project docs SHALL use `.org` files.
61 Added: - Architecture docs SHALL be updated when MQTT topics, payload schema, host roles, or data flow change.
62 Added:
63 Added: ## Testing
64 Added:
65 Added: - Modifications to the code SHALL be followed by running regression tests.
66 Added: - When attempting to compile this project, agents SHALL use a non-default Dream server listening port, so that agent test builds won't clash with an existing Dream server.
.kiro/steering/test-runner.md
index 00000000..4984a8ff 000000..100644
@@ -0,0 +1,16 @@
1 Added: ---
2 Added: inclusion: auto
3 Added: ---
4 Added:
5 Added: # Test Runner Agent Integration
6 Added:
7 Added: When you receive a `GIT_COMMIT_DETECTED` message from the post-commit
8 Added: hook, you must:
9 Added:
10 Added: 1. Delegate to the **test-runner** agent defined in `.kiro/agents/test-runner.md` using `orchestrate_subagent` with the `general-task-execution` role.
11 Added: 2. The sub-agent's prompt should instruct it to:
12 Added: - Run `opam exec -- dune test` in the workspace root
13 Added: - Report results in the TEST REPORT format defined in the agent file
14 Added: 3. Relay the test report back to the user concisely.
15 Added:
16 Added: If tests fail, offer to help diagnose and fix the failures before continuing with other work.
AGENTS.override.md
index 1e14092e..00000000 100644..000000
@@ -1,3 +0,0 @@
1 Removed: # AGENTS.override.md
2 Removed:
3 Removed: Use the AGENTS.org file.