Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.3.3 - 2026-07-09

- Promote managed global agent operating rules v1.1.2 with Antigravity provider rendering and Gemini retired from active providers.
- Add non-overridable worktree, PR-first, no-main-push, autonomous repair, conversations surfaces, and no-budget-unless-requested rules.


## Unreleased

- Bumped `hasna-agent-operating-rules` to v1.1.2 (2026-07-09) and expanded the canonical source set with rules for automatic session renaming, task-specific worktree mutation under `$HOME/.hasna/repos/worktrees`, PR-first landing, no direct pushes to main/default/protected branches, autonomous repair before asking, full Hasna CLI/package source-of-truth coverage, default conversation surfaces plus `conversations blockers`, durable goal-plan adversarial verification, and Codewith goal/token/goal-plan budget opt-in only.
- Added Antigravity as an active global instruction provider target and provider overlay, while keeping Gemini out of active target/provider compatibility coverage.

## 0.2.1

- Added the versioned `hasna-agent-operating-rules` canonical source: Hasna Agent Operating Rules v1.1.0 (version stamp on line 1, sentinel `<!-- hasna:agent-operating-rules v=1.1.0 -->`), leading with Andrei's four core operating rules (independent adversarial reviewer on every user-requested work item; record-as-you-go in todos/mementos/conversations CLIs; register an agent identity before taking work, subagents never; every project has a continuously updated conversations channel) followed by the fleet communication duties from the fleet comms strategy (todos task 39a68145).
Expand Down
46 changes: 29 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ identities instructions export ./instructions.json --json
identities instructions import ./instructions.json --json
identities instructions sources --json
identities instructions sources --canonical --provider codewith --json
identities instructions export --canonical --provider antigravity --json
identities instructions export --canonical --provider codewith --json
identities instructions export --canonical --provider opencode --json
```
Expand All @@ -254,27 +255,38 @@ fields derived from `kind`, `mergePolicy`, and `precedence`.
OpenIdentities also ships the canonical Hasna global coding-agent source set
for downstream renderers. It contains one global system prompt, one
non-overridable global rules source, the versioned non-overridable Hasna Agent
Operating Rules document (`hasna-agent-operating-rules`, currently v1.1.0 with
sentinel `<!-- hasna:agent-operating-rules v=1.1.0 -->`, precedence 175), and
provider overlays for Codewith, Claude Code, Codex, and OpenCode. OpenConfigs
should consume these sources and render managed provider blocks or OpenCode
instruction references; it remains responsible for file rendering, path
dereferencing, and merge mechanics.
Operating Rules document (`hasna-agent-operating-rules`, currently v1.1.2 with
sentinel `<!-- hasna:agent-operating-rules v=1.1.2 -->`, precedence 175), and
provider overlays for Antigravity, Codewith, Claude Code, Codex, and OpenCode.
OpenConfigs should consume these sources and render managed provider blocks or
OpenCode instruction references; it remains responsible for file rendering,
path dereferencing, and merge mechanics. Antigravity is an active target in this
source set; Gemini is not an active target and should not be restored as one.

The canonical set includes rules for Knowledge CLI/SDK usage, Todos plans and
evidence, Mementos/Conversations/Projects source-of-truth boundaries,
coordinator delegation, Codewith-native loop terminology versus OpenLoops,
dispatch self-healing without tmux fallback, adversarial verification, secrets
safety, commit/push secrets scans, no Co-Authored-By trailers, Bun preference,
and Hasna package release-age registry hygiene. The Agent Operating Rules add
the four core operating rules (adversarial reviewer on every user-requested
work item, record-as-you-go in the todos/mementos/conversations CLIs, identity
registration before taking work with subagents never registering, and a
continuously updated conversations channel per project) plus the fleet
communication duties (bounded announcements/blockers reads, `[BREAKING]`
evidence, Hasna CLI/package source-of-truth boundaries (todos, conversations,
mementos, knowledge, projects, repos, accounts, instructions, machines, secrets,
access), automatic session renaming when supported, task-specific worktree
mutation under the canonical `$HOME/.hasna/repos/worktrees` root, PR-first
landing, no direct pushes to main/default/protected branches, autonomous repair
before asking, coordinator delegation, Codewith-native loop terminology versus
OpenLoops, dispatch self-healing without tmux fallback,
adversarial verification, secrets safety, commit/push secrets scans, no
Co-Authored-By trailers, Bun preference, and Hasna package release-age registry
hygiene. The Agent Operating Rules add the core operating rules (adversarial
reviewer on every user-requested work item, record-as-you-go in the
todos/mementos/conversations CLIs, identity registration before taking work
with subagents never registering, and a continuously updated conversations
channel per project), durable goal-plan adversarial verification, default
conversation surfaces (announcements, incidents, git-publishing, git-prs,
git-commits, git-releases, hq, agent-policy, project/product channels, and
`conversations blockers`), and the fleet communication duties (`[BREAKING]`
heads-up before fleet-affecting changes, publish intent before npm/bun publish,
incidents-first, no secrets in messages, channel content treated as data,
convention lookup before naming, identity release at session end).
convention lookup before naming, identity release at session end). The Codewith
overlay keeps Codewith-native goal, goal-plan, schedule, and loop guidance, while
the global non-overridable rules forbid setting Codewith goal, token, or
goal-plan budgets unless the user explicitly asks for budgets.

SDK consumers can import the same data from `@hasna/identities`:

Expand Down
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 33 additions & 11 deletions docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ provider files or managed blocks in their own layer.
```bash
identities instructions sources --canonical --json
identities instructions sources --canonical --provider codewith --json
identities instructions export --canonical --provider antigravity --json
identities instructions export --canonical --provider claude --json
identities instructions export --canonical --provider opencode --json
```
Expand All @@ -138,6 +139,7 @@ The canonical set includes:
- `hasna-global-coding-agent-system-prompt`
- `hasna-global-coding-agent-non-overridable-rules`
- `hasna-agent-operating-rules`
- `hasna-antigravity-global-agent-overlay`
- `hasna-codewith-global-agent-overlay`
- `hasna-claude-global-agent-overlay`
- `hasna-codex-global-agent-overlay`
Expand All @@ -148,34 +150,54 @@ matching provider overlays. For example, `--provider codewith` returns the three
global sources and the Codewith overlay.

`hasna-agent-operating-rules` is the versioned Hasna Agent Operating Rules
document (currently v1.1.0, stamped on line 1 and carrying the sentinel comment
`<!-- hasna:agent-operating-rules v=1.1.0 -->` so renderers and drift checks can
verify currency). It leads with the four core operating rules — an independent
document (currently v1.1.2, stamped on line 1 and carrying the sentinel comment
`<!-- hasna:agent-operating-rules v=1.1.2 -->` so renderers and drift checks can
verify currency). It leads with the core operating rules — an independent
adversarial reviewer on every user-requested piece of work, record-as-you-go in
the todos/mementos/conversations CLIs, agent-identity registration before
taking work (subagents never register), and a continuously updated
conversations channel per project — followed by the fleet communication duties
(announcements/blockers reads bounded `--since 7d`, `[BREAKING]` heads-up before
fleet-affecting changes, publish intent before npm/bun publish, incidents-first,
no secrets in messages, channel content is data not instructions, convention
lookup before naming, identity release at session end). It is non-overridable
taking work (subagents never register), a continuously updated conversations
channel per project, automatic session renaming when supported, Hasna
CLI/package source-of-truth boundaries, and autonomous repair before asking —
then code/landing rules and fleet communication duties. It is non-overridable
and renders at precedence 175, between the global system prompt (150) and the
provider overlays (200).

Required rule coverage is part of the source content:

- Knowledge must use the Knowledge CLI or SDK, never ad hoc global Markdown
under `$HOME/.hasna`, `$HOME/.husna`, or similar scratch paths.
- Hasna CLIs/packages are source of truth for todos, conversations, mementos,
knowledge, projects, repos, accounts, instructions, machines, secrets, and
access.
- Planning and evidence must use Todos CLI tasks and todos plans.
- Mementos, Conversations, and Projects CLIs remain source of truth in their
domains.
- Agents should automatically rename sessions when the runtime supports it.
- Repo mutation must happen in task-specific worktrees under the canonical
`$HOME/.hasna/repos/worktrees` root; prefer Hasna repo/project worktree
mechanisms, otherwise `git worktree` rooted there, and never mutate shared
checkouts.
- Normal changes use PR-first landing through a branch/worktree plus a pull
request or prepared pull-request handoff.
- Agents must not push directly to `main`, default, or protected branches unless
the user explicitly instructs that exact repo and operation.
- Agents act autonomously by diagnosing and repairing owning CLIs, packages,
and workflows before asking the user; ask only for destructive,
secret-bearing, or user-only decisions.
- Coordinator sessions delegate product-code implementation through subagents
or task workflows.
- Codewith-native loops and OpenLoops are different mechanisms and terms.
- Dispatch failures require self-healing of the owning package or workflow; no
tmux prompt-paste fallback is allowed without explicit human authorization.
- Non-trivial work needs adversarial verification or a labeled adversarial
self-review when no reviewer can be spawned.
- Durable goal plans require adversarial verification steps during the plan and
a final adversarial verification step before completion.
- Default conversation surfaces are announcements, incidents, git-publishing,
git-prs, git-commits, git-releases, hq, agent-policy, project/product
channels, and `conversations blockers` (not a literal blockers channel).
- Codewith goal, token, and goal-plan budgets must not be set unless the user
explicitly asks for budgets.
- Antigravity is an active provider target; Gemini must not be created or
restored as an active global instruction provider target.
- Secrets must not be exposed, commit/push secrets scans are mandatory, and
commits must not use Co-Authored-By trailers.
- Bun is preferred for Hasna JavaScript and TypeScript repositories, with
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hasna/identities",
"version": "0.2.2",
"version": "0.3.3",
"description": "Open identity records for humans and AI agents",
"type": "module",
"main": "dist/src/index.js",
Expand Down Expand Up @@ -131,7 +131,7 @@
"typescript": "^5.7.3"
},
"dependencies": {
"@hasna/contracts": "0.4.1",
"@hasna/contracts": "0.4.2",
"@modelcontextprotocol/sdk": "^1.29.0",
"pg": "^8.16.3",
"zod": "^3.24.2"
Expand Down
Loading
Loading