Skip to content

feat(prompts): add Antigravity managed prompt rules#8

Merged
andrei-hasna merged 8 commits into
mainfrom
task/5963cf8d-prompts-antigravity
Jul 9, 2026
Merged

feat(prompts): add Antigravity managed prompt rules#8
andrei-hasna merged 8 commits into
mainfrom
task/5963cf8d-prompts-antigravity

Conversation

@andrei-hasna

Copy link
Copy Markdown
Contributor

Summary

  • Add managed prompt hierarchy documentation and active Antigravity render support.
  • Retire Gemini from active config-agent targets while preserving metadata-only stale-row handling.
  • Seed global agent rules for session naming, worktrees, PR-first landing, no direct main pushes, autonomous repair, Hasna CLIs, conversation surfaces, no implicit Codewith budgets, and secrets safety.
  • Bump package version to 0.4.5.

Validation

  • todos redaction scan --file /tmp/open-instructions-head.patch — passed.
  • bun run src/cli/index.tsx package-manager-scan --fail-on-findings . — passed.
  • git diff --check HEAD~1 HEAD — passed.
  • env -u HASNA_INSTRUCTIONS_API_URL -u HASNA_INSTRUCTIONS_API_KEY bun run typecheck — passed.
  • env -u HASNA_INSTRUCTIONS_API_URL -u HASNA_INSTRUCTIONS_API_KEY bun test — 273 passed.
  • env -u HASNA_INSTRUCTIONS_API_URL -u HASNA_INSTRUCTIONS_API_KEY bun run build — passed.

Adversarial review

  • Independent release review found the missing secrets-safety clause; fixed before this PR.
  • Current commit patch scan and full release gate are clean.

… + route init --force reset through Store

- server: drop mountMcpHttpRoutes from the cloud server. The /mcp route sat
  outside the /v1/* auth middleware (unauthenticated) and its tools resolved a
  server-side LocalConfigStore -> ephemeral on-container SQLite instead of RDS.
  MCP is a client transport: run locally with HASNA_INSTRUCTIONS_API_URL/KEY it
  routes through the authenticated /v1 API. Matches economy/mementos/knowledge.
- mcp/http: delete now-dead mountMcpHttpRoutes.
- store: add ConfigStore.reset(); LocalConfigStore wipes the on-disk db via
  resetLocalDatabase(), CloudConfigStore refuses (cannot wipe shared cloud).
- cli: init --force now calls store.reset() instead of touching sqlite directly.
- db: add resetLocalDatabase() (close handle + rm db/-wal/-shm, honors env path).
insertFeedback wrote a category column that CREATE TABLE IF NOT EXISTS
never added to pre-existing feedback tables, so
and the send_feedback MCP tool failed in local mode with
"table feedback has no column named category". ensureFeedbackTable now
ALTERs in any missing column idempotently. Adds a regression test for
the legacy-table shape.
Large JSON payloads (e.g. `instructions list --json | jq`) exceeding the
64KB pipe buffer were silently truncated: console.log to a pipe is async
in Bun/Node and the process exited before the buffer drained. Route JSON
and large content dumps through a blocking writeSync loop that retries on
EAGAIN and stops on EPIPE, guaranteeing full delivery to pipe consumers.
…n on ~/.hasna/instructions

- update: target @hasna/instructions (was @hasna/configs) for version check/install
- db: sole HASNA_INSTRUCTIONS_DB_PATH env, store at ~/.hasna/instructions/instructions.db
- db: delete CONFIGS_DB_PATH backward-compat fallback and migrateDotfile() legacy copy
- server: drop CONFIGS_PORT/CONFIGS_HOST env fallbacks
- mcp: CONFIGS_PROFILE -> INSTRUCTIONS_PROFILE; fix db_path display string
- cli: whoami/init/backup dirs + brand strings -> ~/.hasna/instructions, @hasna/instructions
- status: single-env contract (drop fallback field)
- tests: rename env + drop legacy dotfile-migration tests
list and profile list with --json/--format json printed the human
'No configs found.'/'No profiles.' line on an empty store, breaking
JSON parsers. Route the format check before the empty-guard so both
commands always emit '[]' (exit 0) when empty.
… profile add/resolve/apply/delete + MCP apply_config/apply_profile

Republish from HEAD source that already routes every CLI command and MCP
tool through the Store (ApiStore /v1 + bearer). The previously-published
0.4.3 dist was stale (MCP apply paths reached the local getDatabase() guard
in cloud mode; live ECS still runs 0.3.0 without the feedback/profile
routes). Verified all 7 flows end-to-end against a real instructions-serve
+ Postgres in cloud (api) mode.
@andrei-hasna
andrei-hasna merged commit 9c8a4e9 into main Jul 9, 2026
1 check passed
@andrei-hasna
andrei-hasna deleted the task/5963cf8d-prompts-antigravity branch July 9, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant