kor-git GitHub Org — Complete Architecture
- **Name:** kor-git - **Description:** KOR Namespace Registry — Kapnet Operational Realm - **Visibility:** Public
- kor-git GitHub Org — Complete Architecture
kor-git GitHub Org — Complete Architecture
Org: github.com/kor-git
Org Settings
- Name: kor-git
- Description: KOR Namespace Registry — Kapnet Operational Realm
- Visibility: Public
- Members: Invited via nPluronym authentication
- Security: 2FA required for all members
- Webhooks: Nostr bridge webhook for event mirroring
Repository Structure
1. sys-pluronymous-org (Root KOR)
sys-pluronymous-org/
├── README.md ← KOR namespace declaration
├── GOVERNANCE.md ← Governance framework
├── KOR-SCHEMA.md ← KOR namespace schema spec
├── members/ ← Member registry (JSON)
│ ├── npub1dwpeuyfujv27nsl3qma3stqckfwusu053ncasmaru0vsy69d9vdqrcau36.json
│ ├── npub1tpg4xgprr7e58scgp75xt6wlvlgr2wn3cmy20pee7z6lmsxpq6hsuwphfv.json
│ └── [elder-npub].json
├── proposals/ ← Governance proposals
│ ├── P-001-hedlbit-accounting.md
│ ├── P-002-mining-pool-fees.md
│ └── P-003-kor-portal-funding.md
├── votes/ ← Vote records
│ ├── P-001-votes.json
│ └── P-002-votes.json
├── sessions/ ← Active session registry
│ └── active.json
└── audit-log/ ← Audit trail
└── 2026-06-09.jsonl
2. member-submission-room (Community KOR)
member-submission-room/
├── README.md ← Room description, rules
├── submissions/ ← TXXM submissions (JSON)
│ ├── 2026-06-09/
│ │ ├── sub-001-hello-kapnet.json
│ │ └── sub-002-hedlbit-claim.json
│ └── 2026-06-10/
├── reviews/ ← Review TXXMs
│ ├── sub-001-reviews.json
│ └── sub-002-reviews.json
├── moderation/ ← Moderation actions
│ └── actions.jsonl
└── stats/ ← Room statistics
├── daily.json
└── weekly.json
3. kapnet-public (Public KOR)
kapnet-public/
├── README.md ← Public surface description
├── docs/ ← Kapnet documentation
│ ├── getting-started.md
│ ├── txxm-envelope.md
│ ├── kor-namespaces.md
│ ├── weakwork.md
│ ├── braid-knot.md
│ └── kscript.md
├── specs/ ← KAP specifications
│ ├── KAP-000-terminology.md
│ ├── KAP-003-canonical-serialization.md
│ ├── KAP-010-txxm-envelope.md
│ ├── KAP-011-message-classes.md
│ ├── KAP-050-braid.md
│ ├── KAP-051-knot.md
│ ├── KAP-052-state-tree.md
│ ├── KAP-060-kscript.md
│ ├── KAP-080-relay-policy.md
│ ├── KAP-100-nostr-mapping.md
│ └── KAP-140-bitcoin-anchoring.md
├── research/ ← Research papers, PDFs
│ ├── agents.pdf
│ ├── kapnet-over-bitcoin-exhaustive.pdf
│ └── pow-extensible-consensus-state.pdf
└── kor-portal/ ← kor-portal frontend
├── index.html
├── app.js
├── auth.js
├── github.js
└── style.css
4. treasury-pluronymous (Treasury KOR)
treasury-pluronymous/
├── README.md ← Treasury declaration
├── policy.md ← Treasury policy
├── utxos/ ← UTXO tracking
│ ├── hot-wallet.json
│ └── cold-storage.json
├── transactions/ ← Transaction log
│ ├── 2026-06-09-sweep.json
│ └── 2026-06-10-payout.json
├── reports/ ← Financial reports
│ ├── 2026-06-monthly.md
│ └── 2026-Q2-quarterly.md
└── multisig/ ← Multisig configuration
├── 2of3-config.json
└── psbt-templates/
5. governance-pluronymous (Governance KOR)
governance-pluronymous/
├── README.md ← Governance framework
├── framework.md ← Voting rules, quorum, periods
├── proposals/ ← All proposals
│ ├── P-001-hedlbit-accounting/
│ │ ├── proposal.md
│ │ ├── votes.json
│ │ └── result.json
│ └── P-002-mining-pool-fees/
│ ├── proposal.md
│ ├── votes.json
│ └── result.json
├── members/ ← Governance participants
│ ├── npub1dwpeuyfujv27nsl3qma3stqckfwusu053ncasmaru0vsy69d9vdqrcau36.json
│ └── npub1tpg4xgprr7e58scgp75xt6wlvlgr2wn3cmy20pee7z6lmsxpq6hsuwphfv.json
└── decisions/ ← Final decisions
├── D-001-hedlbit-approved.json
└── D-002-mining-fees-rejected.json
6. kor-portal (Portal Frontend)
kor-portal/
├── README.md ← Portal description
├── index.html ← Landing page
├── auth.html ← nPluronym authentication
├── dashboard.html ← User dashboard
├── invite.html ← Admin invitation
├── commit.html ← Web-based commit editor
├── js/
│ ├── auth.js ← Nostr npub authentication
│ ├── github.js ← GitHub API integration
│ ├── nostr.js ← Nostr relay client
│ └── utils.js ← Shared utilities
├── css/
│ └── style.css
└── .github/
└── workflows/
└── deploy.yml ← Auto-deploy to GH Pages
7. kor-schema (Schema Definitions)
kor-schema/
├── README.md ← Schema overview
├── schemas/
│ ├── txxm-envelope.json ← TXXM envelope JSON Schema
│ ├── submission.json ← Submission TXXM schema
│ ├── review.json ← Review TXXM schema
│ ├── governance-proposal.json ← Governance proposal schema
│ ├── vote.json ← Vote schema
│ ├── session.json ← Session schema
│ ├── member.json ← Member registry schema
│ ├── npluronym-link.json ← nPluronym link event schema
│ └── kor-namespace.json ← KOR namespace schema
├── examples/
│ ├── txxm-submission.json
│ ├── txxm-review.json
│ ├── governance-proposal.json
│ └── npluronym-link.json
└── validators/
├── txxm-validator.py ← Python validator
└── txxm-validator.js ← JS validator
8. kor-nostr-bridge (Nostr ↔ GitHub Bridge)
kor-nostr-bridge/
├── README.md ← Bridge description
├── src/
│ ├── relay-client.js ← Nostr relay subscription
│ ├── event-handler.js ← TXXM event processing
│ ├── github-writer.js ← GitHub API writer
│ ├── validator.js ← TXXM validation
│ └── config.js ← Configuration
├── .github/
│ └── workflows/
│ ├── sync-nostr.yml ← Periodic Nostr → GH sync
│ └── sync-gh.yml ← Periodic GH → Nostr sync
├── config/
│ ├── relays.json ← Relay list
│ └── kor-namespaces.json ← Namespace → repo mapping
└── tests/
├── event-handler.test.js
└── github-writer.test.js
GitHub Teams
Team: operators
- Members: HermQube operational key (nostr:npub1tpg4…)
- Permission: Admin on all repos
- Responsibility: Full org management
Team: elders
- Members: Invited elder herms (via nPluronym)
- Permission: Write to sys-pluronymous-org, Write to kapnet-public
- Responsibility: Kapnet theory, protocol specs, research
Team: contributors
- Members: AUTH-3+ users (via nPluronym)
- Permission: Write to member-submission-room, Read to all
- Responsibility: Submissions, reviews, documentation
Team: treasury
- Members: HermQube operational key + 2-of-3 multisig holders
- Permission: Admin on treasury-pluronymous
- Responsibility: Treasury operations, financial reports
Team: governance
- Members: AUTH-4+ users (via nPluronym)
- Permission: Write to governance-pluronymous
- Responsibility: Proposals, votes, decisions
GitHub Actions Workflows
1. nPluronym Auth (.github/workflows/auth.yml)
name: nPluronym Authentication
on:
repository_dispatch:
types: [npluronym-link]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Verify npub signature
run: node scripts/verify-npub.js
- name: Create GH token
run: node scripts/create-token.js
- name: Grant repo access
run: node scripts/grant-access.js
2. Nostr Sync (.github/workflows/nostr-sync.yml)
name: Nostr Event Sync
on:
schedule:
- cron: '*/5 * * * *' # Every 5 minutes
repository_dispatch:
types: [txxm-submitted]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Fetch new events from relay
run: node scripts/fetch-events.js
- name: Validate TXXMs
run: node scripts/validate-txxms.js
- name: Write to repo
run: node scripts/write-events.js
- name: Commit and push
run: git push
3. GH → Nostr Mirror (.github/workflows/gh-mirror.yml)
name: GitHub to Nostr Mirror
on:
push:
branches: [main]
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- name: Read commit
run: node scripts/read-commit.js
- name: Create Nostr event
run: node scripts/create-event.js
- name: Publish to relay
run: node scripts/publish.js
nPluronym Authentication Flow (Detailed)
Step 1: User creates nPluronym link event
// User signs this with their nsec
const linkEvent = {
kind: 30078,
created_at: Math.floor(Date.now() / 1000),
tags: [
['t', 'kapnet'],
['t', 'npluronym'],
['t', 'kor-link'],
['d', `npluronym-${npub}`],
],
content: JSON.stringify({
type: 'npluronym_link',
version: '1.0',
npub: npub,
github_user: 'username',
kor_namespaces: ['sys.pluronymous.org'],
permissions: ['read', 'write'],
timestamp: Math.floor(Date.now() / 1000),
}),
};
// Sign with nsec, publish to relay
Step 2: kor-portal receives event
// kor-portal subscribes to relay for nPluronym events
const sub = relay.subscribe([{
kinds: [30078],
'#t': ['npluronym'],
since: lastChecked,
}]);
sub.on('event', async (event) => {
// Verify signature
if (!verifyEvent(event)) return;
// Parse content
const link = JSON.parse(event.content);
// Verify npub matches event pubkey
const eventPubkey = event.pubkey;
const claimedPubkey = nip19.decode(link.npub).data;
if (eventPubkey !== claimedPubkey) return;
// Challenge: send random nonce, ask user to sign
const challenge = crypto.randomBytes(32).toString('hex');
// User signs challenge with nsec
// Verify signature matches npub
// Grant GH API access
await grantAccess(link);
});
Step 3: GitHub OAuth + Token Creation
// After npub verification, create GH token
const token = await octokit.rest.apps.createInstallationAccessToken({
installation_id: installationId,
repositories: ['sys-pluronymous-org', 'member-submission-room'],
permissions: {
contents: 'write',
pull_requests: 'write',
issues: 'write',
},
});
// Store token securely (encrypted, scoped to user)
await storeToken(npub, token.data.token);
// Return token to user (shown once)
return {
token: token.data.token,
expires_at: token.data.expires_at,
repos: ['sys-pluronymous-org', 'member-submission-room'],
};
Execution Checklist (When Credentials Provided)
Phase 1: Org Creation
- [ ] Create GitHub org:
kor-git - [ ] Set org description, visibility, security settings
- [ ] Enable 2FA requirement
- [ ] Create teams: operators, elders, contributors, treasury, governance
Phase 2: Repo Creation
- [ ] Create
sys-pluronymous-orgwith directory structure - [ ] Create
member-submission-roomwith directory structure - [ ] Create
kapnet-publicwith directory structure - [ ] Create
treasury-pluronymouswith directory structure - [ ] Create
governance-pluronymouswith directory structure - [ ] Create
kor-portalwith frontend code - [ ] Create
kor-schemawith JSON schemas - [ ] Create
kor-nostr-bridgewith sync code
Phase 3: Workflow Setup
- [ ] Add GitHub Actions workflows to each repo
- [ ] Configure secrets (NOSTR_RELAY, GH_TOKEN, etc.)
- [ ] Test nPluronym authentication flow
- [ ] Test Nostr → GH sync
- [ ] Test GH → Nostr mirror
Phase 4: Content Population
- [ ] Write KOR namespace declarations
- [ ] Write governance framework
- [ ] Write treasury policy
- [ ] Write member registry (initial)
- [ ] Upload research PDFs
- [ ] Write KAP spec docs (from elder context)
Phase 5: Elder Invitation
- [ ] Publish invitation signal via Nostr
- [ ] Elders authenticate via nPluronym
- [ ] Grant repo access
- [ ] Begin theory sync
No comments yet.
Write a comment