Nexara Connect docs0.1.0

Decisions pinned to code

A decision, an ADR or a runbook describes code. When that code changes, the page may be wrong. Pin the page to the code, and Nexara marks it Needs check the moment a push touches that code:

The page stays as it is. Somebody reads it, then marks it Still current or edits it. Until then, agents see the note and rank the page below current pages.

What a pin is

A pin is a repository, a file or folder in it, optional lines, and the commit the page was written against. It lives in the page's frontmatter, so git holds it like any other property:

---
title: Login uses server sessions
type: decision
pins:
  - repo: https://github.com/acme/api
    path: src/auth/login.ts
    lines: 10-40
    commit: 4f2a91c
  - repo: https://github.com/acme/api
    path: src/session/
---
FieldMeaning
repoThe repository URL. https://, ssh:// and git@host:owner/repo forms of the same repo are one repo.
pathA file, or a folder ending with / (everything below it counts). No ...
linesOptional, files only: 40 or 10-40.
commitOptional: the commit the page describes. A change in this exact commit does not flag the page.

A page can carry up to 20 pins. A pin that does not parse is reported on the page and ignored; it never breaks the page.

Pinning a page

Pinning is a change to the page: it needs the right to change the page, it is one commit, and it is in the audit log (node.pin).

When code changes

With a webhook (GitHub or GitLab)

An owner or admin adds the repository once in Settings, Code webhooks: repository URL, provider and (optionally) the branch to watch (the repo's default branch otherwise). Nexara answers with a payload URL and a secret. The secret is shown once. Then, in the repository:

Each push to the watched branch is matched against every pin on that repo. A pinned file that was changed, removed or renamed, or anything below a pinned folder, marks the page Needs check with the commit and the number of files. The same push delivered twice changes nothing.

What the webhook does not do:

Rotate a secret from the same screen (the old one stops working at once). Removing a repo stops reading its pushes; pins and flags stay.

Without a webhook: Check now

For a repository that does not send pushes here, open the pinned page, choose Check now, give the commit range (1a2b3c4..5d6e7f8) and paste what changed. In the repository, run:

git diff --name-status 1a2b3c4..5d6e7f8

--numstat, --stat, git log --name-status and a plain list of paths work too. Paste a full git diff to check lines pins against the lines that actually changed. Renames (R087 old new, {a => b}) count for both the old and the new path.

Check now flags only pages you could change (edit or propose on), and only answers with those. The API is POST /api/v1/code-pins/check with {repo, range, changes, node_id?}.

Where Needs check shows

To clear it, mark the page Still current (page menu, State), or re-pin it at the new commit. A later push flags it again.

Privacy