* release(docs): deploy public docs from a docs-live branch moved by stable releases The Mintlify GitHub App deployed docs/ on every push to main, so the public site described unreleased behavior while binaries shipped from ironclaw-v* tags — the root cause behind #7317's drift reports. The site now tracks the latest stable release: - .github/workflows/ironclaw-release.yml: new publish-docs-live job (after host, prerelease-guarded via the dist manifest's announcement_is_prerelease) force-updates refs/heads/docs-live to the released commit through the GitHub refs API, bootstrapping the branch on first run. Forced by design: successive stable tags need not be ancestor-related, and docs-live is a pointer, not a history. The Mintlify dashboard repoint to docs-live is the one out-of-repo step, documented in the release strategy. - scripts/ci/ws12_workflow_contracts.py: the job, the branch ref, and the prerelease guard join REQUIRED_MARKERS so a cargo-dist regeneration that drops the hand-added job fails Code Style instead of silently unhooking docs publication. - docs/changelog.mdx (new, in en nav under a Releases group): human-curated <Update> entry per stable release, seeded with v1.1.0 and v1.0.0 from the GitHub release notes; links tagged docs trees for older releases instead of maintaining versioned page sets. - scripts/ci/cut_ironclaw_release.py: ensure_stable_changelog_entry — a stable (non-rc) cut refuses when the candidate commit's changelog lacks the release's vX.Y.Z entry, with an actionable message; rc cuts are exempt so the freeze/blocker flow is unimpeded. Five new cases in test_cut_ironclaw_release.py (missing entry, missing file, present entry, rc exemption, malformed-version deferral to the canonical validator). - docs/internal/weekly-release-strategy.md: Monday checklist writes the changelog entry on the release branch; promotion notes the automatic docs-live repoint; new "Docs publication" section records the dashboard configuration, post-promotion verification, branch-protection recommendation, emergency manual repoint, and older-release access. End-to-end proof of the workflow job rides the next stable release; until the Mintlify dashboard is repointed the site keeps deploying from main, so the rollout order is: merge, repoint the dashboard, then the next stable tag takes over. Part of #7317 (doc-truth pipeline, PR 4 of 5). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * release(docs): harden the docs-live chain after review Three gaps found reviewing the pipeline end to end: - Changelog history loss: the runbook told the release owner to write the changelog entry on the frozen release branch, which is never merged back — next week's candidate, cut from main, would ship a changelog missing the release and docs-live would silently drop it. The entry now lands on main before the Monday cut; the gate's message and the runbook say so, with a cherry-pick fallback. - Substring gate false-pass: the stable gate accepted any 'vX.Y.Z' substring, so an rc-labeled entry (description="vX.Y.Z-rc.1") or a prose mention satisfied it. It now requires the exact description="vX.Y.Z" attribute; both cases pinned in tests. - Backwards repoint: re-running an older release's workflow would force-move docs-live to the older commit and silently revert the live site. publish-docs-live now moves the pointer only when its own tag is the newest stable ironclaw-v* tag, and the guard is pinned in ws12 REQUIRED_MARKERS so regeneration cannot drop it. The runbook also gains the docs-hotfix recipe (publish tag+fix, never main) and spells out that docs-live branch protection must allow force pushes or it 422s the automation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * release(docs): match a real changelog Update tag and fail the repoint closed Post-review hardening: the stable gate now requires the version on an actual <Update> tag (lookalike attributes and other elements refuse, with a regression test); the publish-docs-live step runs under set -euo pipefail and rejects empty tag discovery instead of silently skipping; ws12 pins the backward-repoint comparison itself; comments trimmed and the public changelog no longer overclaims while the dashboard still deploys from main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * release(docs): close the review-round gaps in the docs-live chain Seed the changelog with v1.2.0 (already-shipped stable whose branch never merges back), put ironclaw-release.yml in code_style's has_code scope and pin that semantically in ws12, bootstrap docs-live via POST only when the branch truly does not exist so protection 422s surface as themselves, drive the changelog gate through main() in tests, restore the emergency paragraph to its own runbook section, and tell contributors docs reach the live site with the next stable release. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
7.2 KiB
Contributing
Getting Started
git clone https://github.com/nearai/ironclaw.git
cd ironclaw
./scripts/dev-setup.sh
This installs the Rust toolchain, WASM targets, git hooks, and runs initial checks.
How to Contribute
- Bug fixes, docs improvements, and focused cleanup tied to a concrete problem are welcome.
- Search existing issues and PRs before opening a new one to avoid duplicates.
- Keep changes scoped. One bug, one feature, or one documentation improvement per PR.
Creating Issues
Open an issue when you are reporting a bug, proposing a feature, or documenting a gap in behavior.
For bug reports, include:
- What you expected to happen
- What actually happened
- Clear reproduction steps
- Relevant logs, screenshots, or error output
- Environment details when they matter (OS, database backend, feature flags, commit/branch)
For feature requests:
- Open an issue first before writing code
- Explain the problem being solved, not just the implementation idea
- Wait for maintainer feedback before investing in a large PR
We require an issue for new features so maintainers can prioritize the work and confirm it fits the roadmap before anyone spends time implementing it.
Fixing Bugs
- Small, targeted bug-fix PRs are welcome
- If there is already an issue, link it in your PR
- If the bug is non-trivial, security-sensitive, or changes behavior across subsystems, open or confirm an issue first so the approach can be aligned before implementation
Refactor-Only PRs
Refactor-only PRs are not accepted from contributors outside the core team. If a refactor is necessary to land a bug fix or approved feature, keep it minimal and clearly tied to that change.
Development Workflow
Use the Ironclaw TDD playbook to choose the smallest test layers that prove a feature or bug fix and to find the correct test location.
cargo fmt # format
cargo clippy --all --benches --tests --examples --all-features # lint (warnings surface here; the pre-PR block below denies them)
cargo test # unit + integration suites (Postgres legs self-provision testcontainers; skipped when Docker is unavailable)
These commands are for day-to-day iteration while you are developing locally. The pre-submission checks below are intentionally stricter and use CI-style flags so you can catch formatting drift and clippy warnings before requesting review.
Before You Open a PR
Run the local validation checks required before requesting a review. These are stricter than the commands for iterative development:
cargo fmt --all -- --check
cargo clippy --all --benches --tests --examples --all-features -- -D warnings
cargo build
cargo test
Also run the owning crate's feature-gated suite when your change touches
database-backed or runtime-integration behavior (the workspace-root
integration feature is empty — the flag only means something per-crate):
cargo test -p <owning-crate> --features integration # e.g. -p ironclaw_hooks for the Postgres/libSQL parity matrix
Before asking for review:
- Build and exercise the changed path locally, not just the narrowest unit test
- Keep the PR focused and avoid mixing unrelated concerns
- Fill out the PR template with a clear summary, validation notes, and impact assessment
- If your change affects tracked behavior, update
FEATURE_PARITY.mdin the same branch - If onboarding or setup behavior changes, update the relevant setup docs in the same branch
- If you are using a coding agent and it supports them, run
review-prorpr-shepherd --fixbefore opening or updating the PR codex review --base origin/mainis also encouraged before requesting review
Review Follow-Through
Review conversations are author-owned.
- Address each review comment with a code change or a clear explanation
- Resolve conversations you have handled; leave them open only when reviewer judgment is still needed
- Do not leave review cleanup for maintainers when the follow-through belongs to the author
If a PR is stale for more than 48 hours after review feedback is posted, maintainers may take over the follow-up work and land the changes needed to accomplish the original PR or issue intent.
Code Style
- Zero clippy warnings policy
- No
.unwrap()or.expect()in production code (tests are fine) - Use
thiserrorfor error types, map errors with context - Prefer
crate::for cross-module imports - Comments for non-obvious logic only
See CLAUDE.md for full style guidelines.
Feature Parity Requirement
When your change affects a tracked capability, update FEATURE_PARITY.md in the same branch.
Required before opening a PR
- Review the relevant parity rows in
FEATURE_PARITY.md. - Update status/notes if behavior changed.
- Include the
FEATURE_PARITY.mddiff in your commit when applicable.
Review Tracks
All PRs follow a risk-based review process:
| Track | Scope | Requirements |
|---|---|---|
| A | Docs, tests, chore, dependency bumps | 1 approval + CI green |
| B | Features, maintainer-requested refactors, new tools/channels | 1 approval + CI green + test evidence |
| C | Security (crates/substrates/ironclaw_safety/, crates/substrates/ironclaw_secrets/), turn runtime and agent loop (crates/kernel/, crates/loop/), database schema, CI workflows |
2 approvals + rollback plan documented |
Select the appropriate track in the PR template based on what your changes touch.
Database Changes
IronClaw uses dual-backend persistence (PostgreSQL + libSQL) behind the RootFilesystem mount catalog. All new persistence features must support both backends. See crates/substrates/ironclaw_filesystem/CONTRACT.md and .claude/rules/database.md.
Adding Dependencies
Run cargo deny check before adding new dependencies to verify license compatibility and check for known advisories.
Document your Changes
- The folder
/docscontains user-facing documentation for technical savvy users, developers and operators. It is built with Mintlify and rendered on the website. - The live site deploys from the
docs-livebranch, which release automation points at each stable release — docs merged tomainappear on the site with the next stable release, not immediately. To fix a wrong page on the live site mid-week, see the docs-hotfix recipe indocs/internal/weekly-release-strategy.md("Docs publication"). - For features, update the relevant capability doc in
docs/capabilities/ - For channels, update the relevant channel doc in
docs/channels/ - For extensions / tools, update the relevant doc in
docs/extensions/ - Core features live in
docs/capabilities
In case you want to document the library itself (i.e. reference documentation) for other core contributors, use the docs/internal/ folder
If you use your Claude Code to "plan" and want to leave a record of it, use the docs/internal/plans folder.
Skills
Read the .claude/skills/mintlify-docs for guidelines on how to generate documentation with mintlify.
Test the Docs
To make sure the documentation still works, do:
cd docs
mint dev
To make sure you did not break any internal links, do:
cd docs
mint broken-links