haac-aikit 0.1.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,119 +1,228 @@
1
1
  # haac-aikit
2
2
 
3
- **The batteries-included AI-agentic-coding kit.**
4
- One command drops a complete, opinionated, cross-tool setup into any repo — rules, skills, slash commands, subagents, safety hooks, MCP stub, and CI templates.
3
+ [![npm version](https://img.shields.io/npm/v/haac-aikit.svg)](https://www.npmjs.com/package/haac-aikit)
4
+ [![GitHub](https://img.shields.io/badge/github-Hamad--Center%2Fhaac--aikit-blue?logo=github)](https://github.com/Hamad-Center/haac-aikit)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
5
6
 
6
- Works with: Claude Code · Cursor · GitHub Copilot · Windsurf · Aider · Gemini CLI · OpenAI Codex CLI
7
+ A CLI that drops a working AI-coding setup into any repo rules, skills, safety hooks, subagents, MCP stub, CI templates — and then helps you figure out which of those rules are actually doing anything.
7
8
 
8
- ---
9
+ Works with Claude Code, Cursor, GitHub Copilot, Windsurf, Aider, Gemini CLI, and OpenAI Codex CLI.
9
10
 
10
11
  ## Quickstart
11
12
 
12
13
  ```bash
13
- # Run in any repo directory
14
14
  npx haac-aikit
15
-
16
- # Or install globally
17
- npm i -g haac-aikit
18
- aikit
19
15
  ```
20
16
 
21
- The interactive wizard takes under 30 seconds and leaves behind a `.aikitrc.json` you can commit.
17
+ The wizard takes about 30 seconds and writes a `.aikitrc.json` you can commit. Re-run later with `aikit sync`.
22
18
 
23
- ### Headless (CI-friendly)
19
+ For CI or scripts:
24
20
 
25
21
  ```bash
26
22
  npx haac-aikit --yes --tools=claude,cursor,copilot --preset=standard
27
23
  ```
28
24
 
29
- ---
25
+ ## Why this exists
26
+
27
+ Every AI tool now wants its own rules file: CLAUDE.md, `.cursor/rules/`, `copilot-instructions.md`, AGENTS.md. They all do roughly the same thing — tell the model how your team writes code — but you end up maintaining four copies, none of which you can tell are working.
28
+
29
+ You write 30 rules and pray. The kit you cloned last quarter ships a CLAUDE.md with rules about Python even though you write Go. You never delete the dead ones because you can't tell they're dead.
30
+
31
+ haac-aikit gives you the curated baseline like other kits do (skills, hooks, agents, etc.), and on top of that it adds three things no other kit ships:
32
+
33
+ 1. **Observability** — telemetry hooks log which rules are loaded and violated, so `aikit doctor --rules` can tell you which to keep, strengthen, or delete.
34
+ 2. **Dialect translation** — Cursor's MDC, Claude's emphasis tokens, Aider's imperative phrasing all want different things. Same canonical AGENTS.md, reformatted per tool.
35
+ 3. **`aikit learn`** — mines your team's PR review comments for repeated corrections and proposes them as new rules.
36
+
37
+ ## What changes after you install it
38
+
39
+ **Right after `aikit init`:**
40
+
41
+ - One `AGENTS.md` becomes the source of truth for every AI tool you use. You stop maintaining four copies of the same rules.
42
+ - Force-pushing to `main`, committing secrets, reading `.env*` / `.ssh/` / `.aws/` files, `rm -rf` outside the project, and about a dozen other footguns are blocked at the hook level. They don't depend on the AI cooperating — the hook fires before the tool call.
43
+ - 18 process skills (TDD, brainstorming, debugging, etc.) sit in `.claude/skills/` and load on demand. Always-on cost is roughly 100 tokens per skill, so your context window stays clean.
44
+ - Per-PR safety: a `gitleaks` workflow ships in `.github/workflows/` so secrets caught at commit time don't slip through code review either.
45
+
46
+ **After a week or two of use:**
47
+
48
+ - `aikit doctor --rules` shows you which rules fire often, which fire and get violated, and which never come up. You delete the dead ones, strengthen the disputed ones, and stop guessing.
49
+ - The `.aikit/events.jsonl` log accumulates a real record of every rule load and pattern violation — local, gitignored, never uploaded. If you opt into the LLM judge it also includes per-turn cited / violated verdicts.
50
+
51
+ **After a month:**
52
+
53
+ - `aikit learn --limit=30` mines your merged PRs for repeated review comments and proposes new rules. Patterns like "we always validate at the boundary" or "use named exports here" that used to live only in code review get codified without anyone hand-typing them.
54
+ - The optional GitHub Actions workflow posts a sticky PR comment with a rule-adherence score, so regressions across releases are visible at PR-review time.
55
+
56
+ **What you don't get locked into:**
57
+
58
+ - AGENTS.md is portable — Cursor, Copilot, Codex, Aider, and Gemini all read it. Switching tools doesn't mean rewriting your rules.
59
+ - The catalog (skills, hooks, agents) is just markdown and shell scripts under `.claude/`. Take it and walk away whenever — haac-aikit never reaches back into your repo and there's no SaaS to cancel.
60
+ - All telemetry is local. The opt-in LLM judge calls the Anthropic API only with your own key, only on `Stop` events, and you can pull the env var anytime.
30
61
 
31
- ## What gets installed
62
+ ## What you get
63
+
64
+ ### Minimal scope
32
65
 
33
- ### Scope: minimal
34
66
  | File | Purpose |
35
67
  |---|---|
36
- | `AGENTS.md` | Single source of truthproject rules, conventions, gotchas |
37
- | `CLAUDE.md` | 8-line shim: `@AGENTS.md` + Claude-specific overrides region |
38
- | `.cursor/rules/000-base.mdc` | Always-on Cursor rule pointing at AGENTS.md |
39
- | `.github/copilot-instructions.md` | Copilot pointer |
40
- | `GEMINI.md`, `CONVENTIONS.md`, `.windsurf/rules/project.md` | Per-tool shims |
41
- | `.mcp.json` | MCP stub with filesystem + memory + fetch (3 safe defaults) |
42
- | `.claude/settings.json` | Hardened permissions deny list for secrets + destructive commands |
43
- | `.aikitrc.json` | Versioned config for reproducible re-runs |
44
-
45
- ### Scope: standard (default) — adds
46
- - **18 curated skills** (10 Tier-1 always-on + 8 Tier-2 default) — process skills, not stack-specific
47
- - **8 subagents** — orchestrator, planner, researcher, implementer, reviewer, tester, security-auditor, devops
48
- - **Safety hooks** — block dangerous bash, force-push to main, secret commits, sensitive file access
49
- - **Quality hooks** — format on save, session context primer, pre-compaction state preservation
50
- - **CI workflows** — secret scanning (gitleaks), standard CI, `@claude` PR responder
51
-
52
- ### Scope: everything — adds
53
- - Domain-specialist agents (frontend, backend, mobile) based on your project shape
54
- - Dev container, plugin wrapper, OTel exporter config, auto-sync CI workflow
55
-
56
- ---
68
+ | `AGENTS.md` | The canonical project rulesyour edits outside the BEGIN/END markers are never touched |
69
+ | `CLAUDE.md` | Five-line shim that imports `@AGENTS.md` plus a Claude-only override block |
70
+ | `.cursor/rules/000-base.mdc` | Cursor MDC, dialect-translated from AGENTS.md (not a generic shim) |
71
+ | `.github/copilot-instructions.md`, `GEMINI.md`, `CONVENTIONS.md`, `.windsurf/rules/project.md` | Per-tool shims |
72
+ | `.mcp.json` | MCP stub with filesystem, memory, fetch — three servers, ~1k tokens of tool defs |
73
+ | `.claude/settings.json` | Hardened permissions: deny list for secrets and destructive commands |
74
+ | `.aikitrc.json` | Versioned config so re-runs are deterministic |
57
75
 
58
- ## Commands
76
+ ### Standard scope (default) adds
77
+
78
+ - 18 process skills, organised into Tier 1 (always-on) and Tier 2 (opt-in). Skill bodies only load when triggered, so the at-rest cost is roughly 100 tokens each.
79
+ - 8 subagents: orchestrator, planner, researcher, implementer, reviewer, tester, security-auditor, devops.
80
+ - Safety hooks that block dangerous bash, force-push to main, secret commits, and reads of sensitive files.
81
+ - Observability hooks (see below).
82
+ - A starter `.claude/aikit-rules.json` with regex patterns for common things like no `console.log`, no default exports, no `any`.
83
+ - `docs/claude-md-reference.md` — a 2026 reference doc on Anthropic's memory features for your team.
84
+ - `.claude/rules/example.md` — a starter path-scoped rule that only loads when matching files are read.
85
+ - CI workflows: gitleaks, standard CI, optional `@claude` PR responder, optional rule-adherence PR comment.
86
+
87
+ ### Everything scope adds
88
+
89
+ Dev container, OTel exporter, plugin wrapper, auto-sync CI, and shape-specific agents (frontend / backend / mobile, picked based on the project shape you select in the wizard).
90
+
91
+ ## Rule observability
92
+
93
+ After a few Claude Code sessions:
59
94
 
60
95
  ```
61
- aikit Interactive wizard
62
- aikit sync Re-generate from .aikitrc.json (idempotent)
63
- aikit update Pull latest templates, show diff, prompt
64
- aikit diff Show drift between current state and fresh generation
65
- aikit add <item> Add a single skill, command, agent, or hook
66
- aikit list Show installed items + catalog availability
67
- aikit doctor Sanity-check: schema, triggers, broken links
96
+ $ aikit doctor --rules
97
+
98
+ Hot rules (working as intended)
99
+ commit.conventional-commits 47 loads
100
+ security.no-sensitive-files 12 loads
101
+
102
+ Disputed rules (>30% violation rate)
103
+ code-style.no-console-log — 47 loads, 18 pattern violations
104
+ Frequently violated. Strengthen with IMPORTANT/YOU MUST or move to a hook.
105
+
106
+ Dead rules (never observed)
107
+ legacy.bounded-contexts
108
+ Never loaded, cited, or violated. Consider removing or rephrasing.
68
109
  ```
69
110
 
70
- Every prompt has a `--flag` equivalent for headless use.
111
+ This comes from three small hooks shipped at standard scope:
71
112
 
72
- ---
113
+ - **`log-rule-event.sh`** runs on `InstructionsLoaded`. It scans loaded files for `<!-- id: code-style.no-any -->` markers and writes one event per rule per session.
114
+ - **`check-pattern-violations.sh`** runs on `PostToolUse` for Edit/Write. It reads `.claude/aikit-rules.json` and flags any pattern matches in the file Claude just wrote.
115
+ - **`judge-rule-compliance.sh`** runs on `Stop`. It's opt-in. If you set `AIKIT_JUDGE=1` and `ANTHROPIC_API_KEY`, it asks Claude Haiku to verdict whether each loaded rule was cited or violated this turn (~$0.001/turn). Without both env vars it returns immediately and does nothing.
73
116
 
74
- ## Update safety BEGIN/END markers
117
+ All three hooks append to `.aikit/events.jsonl`, which `sync` adds to `.gitignore`. Nothing leaves your machine unless you opt in to the judge.
75
118
 
76
- haac-aikit uses idempotent markers to manage only the content it owns:
119
+ `aikit report` formats the same data as Markdown (PR-comment ready) or JSON (`--format=json`, for CI). Without judge data, the adherence score is `null` with `basis: "no-evidence"` rather than a fake number derived from load counts.
120
+
121
+ ### Adding observability to your own rules
122
+
123
+ In any rule file, add a stable HTML-comment ID:
124
+
125
+ ```markdown
126
+ - <!-- id: code-style.no-any emphasis=high paths=src/**/*.ts --> Use `unknown` and type guards, not `any`.
127
+ ```
128
+
129
+ The `id` is required for telemetry. `emphasis` and `paths` are optional metadata read by the dialect translators. HTML comments cost zero context tokens — Claude strips them before injection — so this is free observability.
130
+
131
+ ## Dialect translation
132
+
133
+ Other multi-tool kits copy the same content into every per-tool file. haac-aikit reformats per dialect.
134
+
135
+ For Cursor that means: `.cursor/rules/000-base.mdc` gets proper MDC frontmatter, **bold** emphasis on rules tagged `emphasis=high`, and a paths hint surfaced inline. Rule IDs are preserved so the observability hooks see them load alongside AGENTS.md.
136
+
137
+ Claude, Aider, Copilot, and Gemini translators are the next thing on the roadmap.
138
+
139
+ ## Learn from your PR history
140
+
141
+ ```
142
+ $ aikit learn --limit=30
143
+ ```
144
+
145
+ Pulls the last 30 merged PRs via `gh`, scans review and issue comments for correction phrases ("we always", "don't here", "actually let's", "nit:"), tokenises them, clusters by Jaccard similarity, and prints proposals in a paste-ready block:
146
+
147
+ ```
148
+ <!-- BEGIN:learned -->
149
+ ## Learned conventions
150
+ - <!-- id: learned.use-named-exports --> we always use named exports here, not default
151
+ - <!-- id: learned.validate-input-boundary --> please validate inputs at the API boundary
152
+ <!-- END:learned -->
153
+ ```
154
+
155
+ Review the suggestions, paste the keepers into AGENTS.md. The similarity threshold is intentionally permissive — false positives are easy to reject, missed signal is harder to recover. There are no ML dependencies; it's regex, a stopword list, and a five-line stemmer.
156
+
157
+ ## Update safety
158
+
159
+ haac-aikit owns content between BEGIN/END markers. Everything outside is yours.
77
160
 
78
161
  ```markdown
79
162
  # My Project
80
163
 
81
- My hand-written project notes — never touched by haac-aikit.
164
+ My own notes — never touched by aikit.
82
165
 
83
166
  <!-- BEGIN:haac-aikit -->
84
- ...managed content...
167
+ managed content
85
168
  <!-- END:haac-aikit -->
86
169
 
87
170
  More of my notes — also never touched.
88
171
  ```
89
172
 
90
- `aikit sync` regenerates only the region between the markers. Everything outside is yours.
173
+ `aikit sync` is idempotent: running it twice produces the same files. `aikit diff` shows what would change. `aikit update` shows the diff and prompts before writing.
91
174
 
92
- ---
175
+ The marker engine handles four dialects automatically (`.md` → `<!-- ... -->`, `.yml` → `# `, `.json` → `// `, shell → `# `). If a downstream user removes a marker by accident, the hook refuses to silently re-append — it errors out so you can investigate.
93
176
 
94
- ## Token efficiency
177
+ ## Commands
95
178
 
96
- haac-aikit is built on the evidence from four research passes:
179
+ ```
180
+ aikit interactive wizard
181
+ aikit sync regenerate from .aikitrc.json (idempotent)
182
+ aikit update pull latest templates, show diff, prompt
183
+ aikit diff show drift between current state and a fresh generation
184
+ aikit add <item> add a single skill, command, agent, or hook
185
+ aikit list show installed items + catalog availability
186
+ aikit doctor schema, triggers, broken-link checks
187
+ aikit doctor --rules rule observability buckets
188
+ aikit report Markdown adherence summary
189
+ aikit report --format=json same data, structured for CI
190
+ aikit learn --limit=30 propose rules from your PR review history
191
+ ```
192
+
193
+ Most prompts have a `--flag` equivalent for headless use.
97
194
 
98
- - **~100 tokens per skill** at rest (metadata only — body loads only when triggered)
99
- - **≤200 lines** AGENTS.md enforced in CI
100
- - **Zero LLM-generated dumps** — every shipped artifact is human-curated (ETH Zurich 2026 found LLM dumps add cost, don't improve success rate)
101
- - **3 MCP servers by default** — filesystem + memory + fetch only (5 servers = ~77K tokens of tool defs)
195
+ ## Design choices, in case they help you decide
102
196
 
103
- ---
197
+ - **Skills are ~100 tokens at rest.** Bodies load only when the skill is triggered. A kit with 30 always-on skill bodies eats your context window before you've started.
198
+ - **AGENTS.md is canonical, CLAUDE.md is a 5-line shim that imports it.** One source of truth across all tools.
199
+ - **Three MCP servers by default.** Five servers can be ~77K tokens of tool definitions. Most projects don't need a search engine *and* a database *and* a filesystem in every conversation.
200
+ - **Marker-protected templates.** This was the first thing I broke in my own setup before adding the marker engine. Your edits outside the markers survive every `sync`.
201
+ - **No LLM-generated content in the catalog.** Every shipped skill / hook / agent is human-curated. ETH Zurich's 2026 study on LLM-augmented context found dumps add cost without improving success rate.
104
202
 
105
- ## Why haac-aikit vs. the alternatives?
203
+ ## How haac-aikit compares
106
204
 
107
205
  | | haac-aikit | rulesync | ruler | claudekit |
108
206
  |---|---|---|---|---|
109
- | Content included | ✅ 18 skills + 11 agents + hooks | Config manager only | Config manager only | Claude-only |
110
- | Cross-tool | 7 tools | | | |
111
- | Open Skills standard | ✅ agentskills.io | | | |
112
- | Config file backed | `.aikitrc.json` | | | |
113
- | Idempotent markers | | | ❌ (`.bak` backups) | |
207
+ | Includes content (skills, agents, hooks) | yes | no — config manager only | no config manager only | Claude-only |
208
+ | Cross-tool | 7 tools | yes | yes | no |
209
+ | Open Skills standard (agentskills.io) | yes | no | no | no |
210
+ | Config file backed | `.aikitrc.json` | no | no | no |
211
+ | Idempotent BEGIN/END markers | yes | no | `.bak` backups | no |
212
+ | Rule observability | yes | no | no | no |
213
+ | Dialect translation | yes | no | no | no |
214
+ | Learn from PR history | yes | no | no | no |
215
+
216
+ ## Status
217
+
218
+ This is 0.4.0. The strategy plan reserves 1.0 until at least three external teams have used the observability loop on real PRs — until then, expect breaking changes between minor versions. The Cursor dialect translator is the only one shipping in 0.4.0; Claude, Aider, Copilot, and Gemini translators are next.
219
+
220
+ ## Contributing
221
+
222
+ Issues and PRs welcome at [github.com/Hamad-Center/haac-aikit](https://github.com/Hamad-Center/haac-aikit).
114
223
 
115
- ---
224
+ I'm looking for **three teams** to try the observability loop on a real codebase. Your feedback shapes 1.0. Comment on [issue #1](https://github.com/Hamad-Center/haac-aikit/issues/1) if you're up for it.
116
225
 
117
- ## License & attributions
226
+ ## License
118
227
 
119
- MIT. See [ATTRIBUTIONS.md](ATTRIBUTIONS.md) for adapted sources.
228
+ MIT. See [ATTRIBUTIONS.md](ATTRIBUTIONS.md) for the list of adapted sources.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: backend
3
3
  description: Backend specialist. Handles API design, database schemas, authentication, background jobs, and service integrations. Use for tasks requiring deep knowledge of server-side patterns, data consistency, or distributed systems trade-offs.
4
- model: claude-sonnet-4-5
4
+ model: claude-sonnet-4-6
5
5
  tools:
6
6
  - Read
7
7
  - Edit
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: devops
3
3
  description: Handles CI/CD pipelines, Dockerfiles, deployment configuration, infrastructure-as-code, and release automation. Use when the task involves build systems, containers, GitHub Actions, or cloud deployment.
4
- model: claude-sonnet-4-5
4
+ model: claude-sonnet-4-6
5
5
  tools:
6
6
  - Read
7
7
  - Edit
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: frontend
3
3
  description: Frontend specialist. Handles React/Vue/Svelte components, CSS, accessibility, performance, and UI testing. Use for tasks that require deep knowledge of browser APIs, component architecture, or UI/UX constraints.
4
- model: claude-sonnet-4-5
4
+ model: claude-sonnet-4-6
5
5
  tools:
6
6
  - Read
7
7
  - Edit
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: implementer
3
3
  description: Executes implementation plans. Writes and edits code, following the plan step by step with verification after each step. The workhorse agent — use for any concrete coding task once a plan exists.
4
- model: claude-sonnet-4-5
4
+ model: claude-sonnet-4-6
5
5
  tools:
6
6
  - Read
7
7
  - Edit
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: mobile
3
3
  description: Mobile specialist for React Native or Flutter. Handles platform-specific behaviour, offline support, push notifications, and app store requirements. Use for tasks with iOS/Android-specific constraints.
4
- model: claude-sonnet-4-5
4
+ model: claude-sonnet-4-6
5
5
  tools:
6
6
  - Read
7
7
  - Edit
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: orchestrator
3
3
  description: Decomposes complex tasks into sub-tasks and dispatches specialist agents. Pure coordinator — never writes implementation code directly. Use when a task spans multiple concerns or could benefit from parallel execution.
4
- model: claude-sonnet-4-5
4
+ model: claude-sonnet-4-6
5
5
  tools:
6
6
  - Agent
7
7
  - Read
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: planner
3
3
  description: Writes detailed, sequenced implementation plans. Analyses the codebase to understand existing patterns, then produces a bite-sized plan an implementer can execute without further clarification. Use before any multi-step implementation.
4
- model: claude-opus-4-5
4
+ model: claude-opus-4-7
5
5
  tools:
6
6
  - Read
7
7
  - Grep
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: researcher
3
3
  description: Read-only codebase and web exploration. Maps architecture, traces execution paths, answers questions about how things work. Never edits files. Use when you need to understand before acting.
4
- model: claude-sonnet-4-5
4
+ model: claude-sonnet-4-6
5
5
  tools:
6
6
  - Read
7
7
  - Grep
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: reviewer
3
3
  description: Reviews code for bugs, logic errors, security vulnerabilities, and convention violations. Confidence-based — only reports findings with ≥80% confidence. Use after implementation is complete and tests pass.
4
- model: claude-opus-4-5
4
+ model: claude-opus-4-7
5
5
  tools:
6
6
  - Read
7
7
  - Grep
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: security-auditor
3
3
  description: OWASP-aligned security sweep and secrets scan. Checks for injection vulnerabilities, broken auth, sensitive data exposure, access control gaps, and hardcoded credentials. Use before any PR that touches auth, API endpoints, or file/env handling.
4
- model: claude-opus-4-5
4
+ model: claude-opus-4-7
5
5
  tools:
6
6
  - Read
7
7
  - Grep
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: tester
3
3
  description: Writes and runs tests. Identifies coverage gaps, writes missing tests, and reports test results. Use after implementation to verify correctness and catch regressions before merge.
4
- model: claude-sonnet-4-5
4
+ model: claude-sonnet-4-6
5
5
  tools:
6
6
  - Read
7
7
  - Edit
@@ -0,0 +1,55 @@
1
+ name: aikit rule observability
2
+
3
+ # Posts (or updates) a sticky PR comment with the aikit rule-adherence report.
4
+ # Requires .aikit/events.jsonl to be present in the PR branch (or downloadable
5
+ # from a previous job artifact). Customise the "Fetch telemetry" step to suit
6
+ # how your team aggregates events across runs.
7
+
8
+ on:
9
+ pull_request:
10
+ branches: [main]
11
+
12
+ permissions:
13
+ contents: read
14
+ pull-requests: write
15
+
16
+ jobs:
17
+ rule-report:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - uses: actions/setup-node@v4
23
+ with:
24
+ node-version: "20"
25
+
26
+ - name: Install haac-aikit
27
+ run: npm install -g haac-aikit
28
+
29
+ # CUSTOMISE: point this at wherever your team stores rolled-up telemetry.
30
+ # Examples: download an artifact, restore from cache, pull from S3.
31
+ - name: Fetch telemetry
32
+ run: |
33
+ mkdir -p .aikit
34
+ if [ -f .aikit/events.jsonl ]; then
35
+ echo "Using committed telemetry."
36
+ else
37
+ echo "No telemetry found — report will say 'no_telemetry'."
38
+ touch .aikit/events.jsonl
39
+ fi
40
+
41
+ - name: Generate rule-adherence report
42
+ id: report
43
+ run: |
44
+ aikit report --format=markdown > /tmp/aikit-report.md
45
+ {
46
+ echo 'report<<HAAC_EOF'
47
+ cat /tmp/aikit-report.md
48
+ echo HAAC_EOF
49
+ } >> "$GITHUB_OUTPUT"
50
+
51
+ - name: Post or update sticky PR comment
52
+ uses: marocchino/sticky-pull-request-comment@v2
53
+ with:
54
+ header: aikit-rule-observability
55
+ message: ${{ steps.report.outputs.report }}