QENEX Law
Legal-source taxonomy, licence tagging, corpus gate

QENEX Law — Forgejo write-access enablement (ops handoff)#

Goal: let the qenex-mcp connector create the qenex-law repo and commit files, without handing cloud/scheduled Claude sessions broad admin. Prepared: 2026-08-09 · for whoever holds estate (admin/SSO) access.

The blocker (observed this session)#


Add a purpose-built tool to the qenex-mcp server (e.g. qenex_forgejo_repo_create, qenex_forgejo_file_put) that:

This keeps sessions at mcp_user while enabling exactly the writes needed — same pattern the eventual QENEX Law build will want.

Service token (create under a dedicated bot account, e.g. qenex-law-bot):


Option B — allowlist + admin (faster, broader privilege)#

If you'd rather use the generic qenex_http_call:

  1. Add to /etc/qenex/http-connector.yaml:

```yaml hosts: git.qenex.ai: methods: [GET, POST, PUT, PATCH] credential: forgejo_law_token reason: "QENEX Law repo/doc automation" owner: ceo@qenex.ai review_date: 2026-11-09 ```

  1. Place the token at /etc/qenex/secrets/forgejo_law_token (connector adds Authorization: Bearer <token>).
  2. Grant the calling session the admin role — http_call POST/PUT/PATCH require it.

⚠ This gives that session broad write across all admin tools — less contained than Option A.

  1. Reload + verify: qenex_http_allowlist(reload=true) (host loads, circuit breaker closed).

What I'd run once either is in place#

Forgejo API reference:

POST https://git.qenex.ai/api/v1/orgs/qenex-admin/repos
     {"name":"qenex-law","private":true,"auto_init":true}

PUT  https://git.qenex.ai/api/v1/repos/qenex-admin/qenex-law/contents/docs/design-spec-v0.1.md
     {"message":"docs: QENEX Law v0.1 design spec","content":"<base64>","branch":"main"}

Recommendation#

Option A. Don't grant cloud/scheduled sessions blanket admin just to write docs — a scoped tool plus a limited bot token gives exactly the access required and nothing more, is auditable, and is reusable for the full QENEX Law build later.