Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0d866b4
Refactor devcontainer setup: replace post-create script with minions …
thiamricko Sep 24, 2026
44c61b8
feat: migrate ModelRelay → 9Router (port 7352 stays)
thiamricko Sep 24, 2026
057e529
fix: run 9router-config.sh in start-ninerouter.sh to seed model catalog
thiamricko Sep 24, 2026
fc3e420
fix: simplify self-check model output — count only, no default combo
thiamricko Sep 24, 2026
a85a373
fix: self-check treats 4xx/5xx as unhealthy; probe 9router /v1/models…
thiamricko Sep 24, 2026
869b01a
fix: simplify self-check; treat 4xx/5xx as unhealthy; revert port-pol…
thiamricko Sep 24, 2026
649124f
feat: capture 9router-config.sh logs; always-collect boot logs artifact
thiamricko Sep 24, 2026
b04d75e
fix: move 9router-config.sh out of s6 init.d to /usr/local/bin
thiamricko Sep 24, 2026
ad7e1a4
fix: 9router-config cookie auth + disable while-true restart loop
thiamricko Sep 24, 2026
a48a258
fix: align 9Router config with hermes-codespace reference; enable con…
thiamricko Sep 24, 2026
d504db0
chore: retain failure logs for 7 days; enable 9Router --log flag
thiamricko Sep 24, 2026
3ca6f93
fix: create /config/.9router state dir before launch — fixes EACCES 500
thiamricko Sep 24, 2026
7a5f532
refactor: merge 9router-config.sh into start-ninerouter.sh
thiamricko Sep 24, 2026
ab63a68
fix: remove 9router-config.sh mv from Dockerfile (merged into start-n…
thiamricko Sep 24, 2026
4eca1d5
fix: PI branch @main + version bumps (Phase 2)
thiamricko Sep 24, 2026
e663d3d
Phase 3: add .agents/skills from minions (ci-lint-check, ci-log-captu…
thiamricko Sep 24, 2026
4ac7dd8
fix: self-check.sh grep context -A2 for model/provider config
thiamricko Sep 24, 2026
e6a291d
fix: update version numbers for Hermes, Ninerouter, Ollama, Code Serv…
thiamricko Sep 25, 2026
22e8d39
Update ownership command for hermes-agent directory
thiamricko Sep 25, 2026
9fe357a
Update docker-publish.yml
thiamricko Sep 25, 2026
3322bd0
docs: add AGENTS.md; fix self-check unset model/provider, hermes aux …
thiamricko Sep 25, 2026
2a711ec
docs: add git push auth pitfall + Git Auth section to AGENTS.md
thiamricko Sep 25, 2026
f22c012
ci: replace sleep 600 with port-ready polling; fix self-check model/p…
thiamricko Sep 26, 2026
d2d0523
Update CODE_SERVER_VERSION to 4.139.1
gitricko Sep 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 156 additions & 0 deletions .agents/skills/ci-lint-check/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
---
name: ci-lint-check
description: Run pre-commit CI lint validation locally before pushing to avoid GitHub Actions failures.
version: 0.1.0
author: gitricko, Hermes Agent
license: MIT
platforms: [linux]
metadata:
hermes:
tags: [ci, lint, pre-commit, github-actions, validation]
related_skills: [codespace-persistent-symlinks, memory-automation]
---

# CI Lint Check Skill

Run the full CI lint validation locally before committing or creating a PR. This mirrors the `lint-check` job in `.github/workflows/ci.yml` and catches all format/validation issues that would fail CI.

## When to Use

- **Before every commit** that touches `skills/**`, `wiki/**`, `mnemon/**`, `memories/**`, or `*.sh`
- **Before creating a PR** to ensure CI passes
- When CI fails and you need to debug locally

## Prerequisites

- `markdownlint-cli` (auto-installed by script)
- `python3` (for Mnemon seed validation)
- `bash` (for shell syntax checks)

## How to Run

```bash
# Quick one-liner (runs all checks):
bash skills/ci-lint-check/scripts/ci_lint_check.sh

# Or step by step:
bash skills/ci-lint-check/scripts/ci_lint_check.sh --markdown-only
bash skills/ci-lint-check/scripts/ci_lint_check.sh --skills-only
bash skills/ci-lint-check/scripts/ci_lint_check.sh --wiki-only
bash skills/ci-lint-check/scripts/ci_lint_check.sh --mnemon-only
bash skills/ci-lint-check/scripts/ci_lint_check.sh --shell-only
bash skills/ci-lint-check/scripts/ci_lint_check.sh --symlink-only
```

## What It Validates

| Check | Files | CI Job |
|-------|-------|--------|
| Markdown lint | `wiki/*.md`, `skills/*/SKILL.md`, `.hermes.md`, `README.md` | `lint-check` |
| SKILL.md structure | All skills in `skills/*/SKILL.md` | `lint-check` |
| Wiki INDEX.md consistency | Every `.md` in wiki/ referenced in INDEX.md | `lint-check` |
| Mnemon seed.json | `mnemon/seed.json` schema | `lint-check` |
| Root shell syntax | `*.sh` | `lint-check` |
| Skill shell syntax | `skills/*/scripts/*.sh` | `lint-check` |
| Symlink persistence | Tracked dirs + boot script symlink logic | `lint-check` |

## Procedure

### 1. Install dependencies (first run only)
```bash
npm install -g markdownlint-cli
```

### 2. Run full validation
```bash
bash skills/ci-lint-check/scripts/ci_lint_check.sh
```

### 3. Fix any reported issues
- Markdown lint: fix reported line/column issues
- SKILL.md: ensure YAML frontmatter with `name:` field
- Wiki: add missing articles to INDEX.md table
- Mnemon: `python3 mnemon/validate-seed.py mnemon/seed.json`
- Shell: `bash -n <script>` to see syntax errors
- Symlinks: ensure boot scripts create proper symlinks

### 4. Commit and push
```bash
git add -A
git commit -m "your message"
git push
```

## CI Behavior

| Changed Paths | CI Job | Duration |
|---------------|--------|----------|
| `skills/**` | `lint-check` | ~30s |
| `wiki/**` | `lint-check` | ~30s |
| `mnemon/**` | `lint-check` | ~30s |
| `memories/**` | `lint-check` | ~30s |
| `*.sh` | `lint-check` | ~30s |
| `.github/workflows/**`, `install.sh`, `boot.sh`, `self-check.sh` | `full-build` | ~15min |

**Only infrastructure changes trigger full-build.** Content changes (skills, wiki, mnemon, memories, shell scripts) run the fast lint-check only.

## Dev/Prod Parity Principle

**The local script IS the CI job.** The `lint-check` workflow step delegates entirely to `ci_lint_check.sh`:

```yaml
- name: Run local CI lint check script
run: |
npm install -g markdownlint-cli
bash skills/ci-lint-check/scripts/ci_lint_check.sh
```

This guarantees identical validation in both environments. Never duplicate validation logic in CI YAML — the skill script is the single source of truth.

## Pitfalls

- **Don't skip this** — CI will fail and you'll waste time debugging in GitHub Actions
- **Run from repo root** — paths are relative to `/workspaces/.minions`
- **markdownlint config** is embedded in the script (matches CI config)
- **Mnemon seed validation** requires the validator script to exist
- **Symlink check** validates boot script logic, not actual runtime symlinks
- **MD034 / no-bare-urls** — raw URLs in any `.md` fail lint with `error MD034/no-bare-urls Bare URL used`. Wrap them in angle brackets: `<https://example.com>` not `https://example.com`. This broke PR #3 (two bare URLs in a SKILL.md References block and a references/*.md). The markdownlint config here does NOT disable MD034, so every URL must be bracketed.

## Integration with Git Hooks (Optional)

Add to `.git/hooks/pre-commit`:
```bash
#!/bin/bash
bash skills/ci-lint-check/scripts/ci_lint_check.sh || exit 1
```

## References

- `.github/workflows/ci.yml` — source of truth for CI jobs
- `wiki/github-actions-testing-plan.md` — CI design doc
- `skills/codespace-persistent-symlinks/SKILL.md` — symlink architecture

## Known Limitations
- **Symlink check (7/7)** requires `boot.sh` to contain the skills/memories wiring patterns (Phases 16–18). Until then, run with `--shell-only` or `--skills-only` to skip.
- **Markdown lint (1/7)** requires `markdownlint-cli` (`npm install -g markdownlint-cli`). CI installs it automatically.

## Verification

```bash
# Should output "=== ALL CHECKS PASSED ==="
bash skills/ci-lint-check/scripts/ci_lint_check.sh
```

## For Future Agents

**MANDATORY**: Run this skill before ANY commit or PR that modifies:
- Skills (`skills/**`)
- Wiki (`wiki/**`)
- Mnemon (`mnemon/**`)
- Memories (`memories/**`)
- Devcontainer shell scripts (`*.sh`)

```bash
# One command before commit:
bash skills/ci-lint-check/scripts/ci_lint_check.sh
```
35 changes: 35 additions & 0 deletions .agents/skills/ci-lint-check/references/dev-prod-parity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Dev/Prod Parity Pattern for CI Lint Checks

## The Problem
Previously the same validation logic existed in two places:
1. **CI workflow** (`.github/workflows/devcontainer-ci.yml`) — 189 lines of inline bash
2. **Local script** (`.devcontainer/skills/ci-lint-check/scripts/ci_lint_check.sh`) — same logic

This caused drift risk and maintenance burden.

## The Solution
**Single source of truth**: The local script IS the lint check. CI simply calls it.

```yaml
# CI workflow (.github/workflows/devcontainer-ci.yml)
lint-check:
steps:
- uses: actions/checkout@v4
- run: |
npm install -g markdownlint-cli
bash .devcontainer/skills/ci-lint-check/scripts/ci_lint_check.sh
```

## Benefits Achieved
| Aspect | Before | After |
|--------|--------|-------|
| CI YAML lines | 319 | 153 (-52%) |
| Maintenance | Update 2 places | Update 1 place |
| Parity | Risk of drift | Guaranteed identical |
| Local debugging | Manual replication | Exact same command |
| Skill reuse | Not reusable | `ci-lint-check` skill is the source |

## Rule
> **The `ci-lint-check` skill IS the lint check.** CI runs it; developers run it. No duplication.

This pattern should be applied to any future validation that needs to run both locally and in CI.
Loading
Loading