forked from WikiDeck/wikideck
Compare commits
76
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5dcdc1cdc6 | ||
|
|
b88dfb1e94
|
||
|
|
b427fa4217
|
||
|
|
b3a1179703
|
||
|
|
eea2deb1fb
|
||
|
|
216a419c0b
|
||
|
|
bd3d36a7e1
|
||
|
|
176d1927a8
|
||
|
|
36963fed30
|
||
|
|
83d3d104c1
|
||
|
|
2ecb42c019
|
||
|
|
84e6e08209
|
||
|
|
359f0df32d
|
||
|
|
d8780701e6
|
||
|
|
3f04c3afa9
|
||
|
|
52559f65d7
|
||
|
|
4fea176877
|
||
|
|
b865807272
|
||
|
|
5d607c1521
|
||
|
|
e835238d05
|
||
|
|
158981e965
|
||
|
|
12f80fdc53
|
||
|
|
05aead39ae
|
||
|
|
9f82f050b4
|
||
|
|
af646dcc32
|
||
|
|
e3b2261da3
|
||
|
|
40f4aa6d4e
|
||
|
|
f00ea55dfd
|
||
|
|
0534cde1a9
|
||
|
|
c8cf8245fc
|
||
|
|
e70199ecb0
|
||
|
|
ee5dc35330
|
||
|
|
79abaa78f2
|
||
|
|
c07f3a737b
|
||
|
|
74f269923c
|
||
|
|
4566271ce3
|
||
|
|
9282c0234d
|
||
|
|
7b6873921a
|
||
|
|
a127a40293
|
||
|
|
6adfda3cf0
|
||
|
|
687b628424
|
||
|
|
1f11210b5b
|
||
|
|
8b0e2287a5
|
||
|
|
0ac2073038
|
||
|
|
5b21074462
|
||
|
|
ccc6eef951
|
||
|
|
7025c37390
|
||
|
|
8cfcf6c025
|
||
|
|
22da9764eb
|
||
|
|
e1fbf5e5af
|
||
|
|
ca8ff48628
|
||
|
|
621611ecd9
|
||
|
|
447314440b
|
||
|
|
7734d8ae90
|
||
|
|
4cac26d84b
|
||
|
|
84a505c4a5
|
||
|
|
c254c4c537
|
||
|
|
e48081f041
|
||
|
|
fc65e497a8
|
||
|
|
4e753b35fe
|
||
|
|
bcd8630a8e
|
||
|
|
a1de67ea14
|
||
|
|
558427545f
|
||
|
|
d6f230d6b9
|
||
|
|
2814b46b73
|
||
|
|
f2bd3e38e2
|
||
|
|
2dd7382004
|
||
|
|
55f26d3fad
|
||
|
|
9d61c177b7
|
||
|
|
4080114085
|
||
|
|
3cee89d023
|
||
|
|
0cc5032857
|
||
|
|
9850fd8554
|
||
|
|
b1d2b5c10e
|
||
|
|
f8eeae826f
|
||
|
|
baad477ca5
|
@@ -1,98 +0,0 @@
|
||||
# WikiDeck Night 1: team handbook
|
||||
|
||||
Read this whole file before doing anything. It's the contract between about 17 agents on 4 machines.
|
||||
|
||||
**Coordinator:** the Claude session on tower-plus (Eric's interactive session).
|
||||
**Lead/integrator:** `night-lead` on tower-plus.
|
||||
**Window:** 2026-11-16 22:45 until **01:30 EST, hard stop**.
|
||||
**Milestone:** https://gitea.eom.dev/claude/wikideck/milestone/63
|
||||
|
||||
## Goal
|
||||
Turn WikiDeck into a game:
|
||||
1. A **fun, robust, balance-tested card game**, playable in the browser against a private testnet.
|
||||
2. **eom.dev accounts:** log in through Dex SSO, and link a self-custodial wallet to your account.
|
||||
3. **Peer-hosted game modes:** node operators publish their own modes as an incentive to run a peer.
|
||||
4. **An Android app**, built and running in an emulator, and an **iOS app** (macOS VM; Xcode sign-in waits for Eric).
|
||||
|
||||
## Hard rules (no exceptions)
|
||||
- **Where to push:** only to `git@gitea.eom.dev:claude/wikideck.git`. Never push to `WikiDeck/wikideck` (upstream) or to `main` on this fork.
|
||||
- **Branches:** every change goes on a branch named `night/<team>/<topic>`, through a PR into **`night/2026-11-16`**. Only `night-lead` merges.
|
||||
- **Live services:** don't touch the live wikideck deployment (k8s namespace `wikideck`) or mainnet. The testnet is private, on poweredge-r350.
|
||||
- **No consensus or protocol changes:**
|
||||
- no block, transfer or trade format changes
|
||||
- nothing that changes validation in `server/chain.ts` or `shared/protocol.ts`
|
||||
- the game runs **off-chain**
|
||||
- if you think you need a protocol change, write it up in your issue instead
|
||||
- **Production SSO:** don't change Dex or any other production service yourself. The SSO team prepares the Dex change, and the coordinator reviews and applies it.
|
||||
- **Nothing public:** only `night-lead` and the scheduled standup post on Discourse (planning topic only). No other public posts, no purchases or sign-ups, and no secrets in git.
|
||||
- **The printer and CNC:** inspiron-3670 drives a 3D printer and a CNC router. Never start, resume or send a print or cut.
|
||||
- **Git identity** in every clone:
|
||||
```
|
||||
git config user.name Claude
|
||||
git config user.email claude@eom.dev
|
||||
git config commit.gpgsign false
|
||||
```
|
||||
End commit messages with `Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>`.
|
||||
- **Before opening a PR:** `npm test` and `npm run build` must pass. If something can't pass yet, say so in the PR.
|
||||
|
||||
## How we coordinate
|
||||
**Gitea is the shared brain.** The machines don't share a filesystem, and workers can't message each other.
|
||||
- **Your issue is your inbox.**
|
||||
- Prefix every comment with your agent name, e.g. `[engine-a]`.
|
||||
- Check your issue and your PRs for new comments **at least every 15 minutes** and whenever you finish a step.
|
||||
- **Status labels on your issue:**
|
||||
- `status/in-progress` while you're working
|
||||
- `status/needs-review` when a PR is up
|
||||
- `status/blocked` with a comment explaining why
|
||||
- `status/done` when finished
|
||||
- **Need another team?** Comment on *their* issue, starting with `[from <you>]`.
|
||||
- **Contracts beat conversations.** Interfaces live in files on the integration branch (`docs/game/*.md`, TypeScript types). Read them before asking.
|
||||
- **When the lead (or the coordinator) messages you directly** through herdr, the message is a peer request within this plan. Act on it.
|
||||
- **Stuck for more than 10 minutes?** Label `status/blocked` and comment. Don't spin.
|
||||
|
||||
## Resources (be a good neighbour)
|
||||
- **inspiron-3670** (6 cores, 60 GB RAM) has 7 agents, the Android emulator and a macOS VM. Wrap heavy commands in a shared lock:
|
||||
```
|
||||
flock /tmp/night-heavy.lock <npm ci | npm run build | gradle ...>
|
||||
```
|
||||
- **imac** (8 threads, about 4 GB free) and **poweredge-r350** (16 threads, about 6 GB free): keep builds to one at a time.
|
||||
- **LocalAI** (`https://localai.eom.dev`) is shared production with slow single-GPU inference. Don't use it in loops.
|
||||
|
||||
## Timeline (EST)
|
||||
|
||||
| Time | Milestone |
|
||||
|---|---|
|
||||
| 22:45 | Kickoff. The design council researches. Infra teams set up (testnet, Android SDK, macOS, SSO scaffolding, UI shell, beta fixes). |
|
||||
| **23:30** | **Design v1 frozen** (`docs/game/DESIGN.md`). The engine team implements it. |
|
||||
| 23:45 | **Engine API contract** (`docs/game/ENGINE_API.md` plus TypeScript types) on the integration branch, so UI, simulation and modes can build against it. |
|
||||
| 00:15 | Engine alpha. Simulation starts bot matches. The UI wires up real matches. |
|
||||
| 00:45 | Balance report v1. The council tunes the rules (v1.1). |
|
||||
| **01:10** | **Code freeze:** fixes only. The lead integrates. QA plays end to end. |
|
||||
| 01:25 | Final reports in each issue. The lead writes `docs/night/REPORT.md`. |
|
||||
| **01:30** | **Stop.** |
|
||||
|
||||
## Teams
|
||||
|
||||
| Agent | Machine | Issue |
|
||||
|---|---|---|
|
||||
| council-designer-a, council-designer-b, council-data | imac | Game design council, card data analysis |
|
||||
| council-critic, night-lead, night-review, macos-fetch | tower-plus | Design council (critic), integration and QA, iOS (download) |
|
||||
| engine-a, engine-b | inspiron-3670 | Game engine |
|
||||
| ui-a, ui-b | inspiron-3670 | Game UI and AI opponent, beta fixes |
|
||||
| modes | inspiron-3670 | Peer-hosted game modes |
|
||||
| mobile-android, mobile-ios | inspiron-3670 | Android app, iOS app and macOS VM |
|
||||
| sim-testnet, sim-balance, sso | poweredge-r350 | Testnet and simulation, eom.dev accounts |
|
||||
|
||||
## What the cards hold (game design input)
|
||||
Each card's data comes from `shared/enrichment.ts`: `PageEnrichment` and `MintStatsSnapshot`.
|
||||
- **Identity:** `title`, `description`, `wikidataId` (structured facts: instance-of, dates, coordinates...) and `categories[]`
|
||||
- **Size and history:** `pageBytes` and `revisionId`
|
||||
- **Reach:** `languageCount`, the number of language editions
|
||||
- **Pageviews:** monthly views, `total`, `dailyAverage` and `trendPercent`
|
||||
- **Derived 0–100-ish scores:** `stats.attention`, `stats.depth` and `stats.reach`
|
||||
- **Two values for everything:** an immutable **at-mint snapshot** and **live current values** that change over time
|
||||
- **Duplicates:** the same article can be minted more than once, each copy with its own snapshot
|
||||
|
||||
Two facts to design around:
|
||||
- **New players own no cards.** The design must give them a way to play immediately, for example starter decks of preview or loaner cards that don't touch NFTs.
|
||||
- **Cards are NFTs.** A match must never move or burn cards on-chain tonight.
|
||||
@@ -7,7 +7,6 @@ import { blockClaimMessage, CONSENSUS, NETWORK, type MiningTemplate, type Testne
|
||||
import { CHAIN_ID, sha256, miningBlob, mintId, blockSchema } from './consensus.ts';
|
||||
import { RandomX } from './randomx.ts';
|
||||
import { assertLaunchAllowed } from '../launch.ts';
|
||||
import { rewardSummary } from './reward.ts';
|
||||
|
||||
assertLaunchAllowed();
|
||||
|
||||
@@ -80,7 +79,7 @@ try {
|
||||
const signature = Buffer.from(await crypto.subtle.sign({name:'ECDSA',hash:'SHA-256'},wallet.privateKey,new TextEncoder().encode(blockClaimMessage(hash)))).toString('base64');
|
||||
const block: TestnetBlock = { ...header, hash, tokenId:mintId(header), powHash:result.hash, signature, transactions:template.transactions };
|
||||
blockSchema.parse(block);
|
||||
try { await api('/api/blocks',block); accepted++; console.log(`\nAccepted block #${header.height} · ${accepted}/${limit}\n${rewardSummary(block)}`); }
|
||||
try { await api('/api/blocks',block); accepted++; console.log(`Accepted block #${header.height} · NFT ${block.tokenId} · ${accepted}/${limit}`); }
|
||||
catch (e) { console.error((e as Error).message); }
|
||||
solved = true;
|
||||
} else {
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import { rarity, stats } from '../../shared/protocol.ts';
|
||||
import type { TestnetBlock } from '../../shared/testnet.ts';
|
||||
|
||||
/** Human-readable summary of the card a miner just earned (upstream WikiDeck/wikideck#12). */
|
||||
export function rewardSummary(block: Pick<TestnetBlock, 'height' | 'tokenId' | 'powHash' | 'article' | 'statsSnapshot'>): string {
|
||||
const { article } = block;
|
||||
const s = stats(block.powHash);
|
||||
const snap = block.statsSnapshot?.stats;
|
||||
const extract = article.extract.length > 160 ? `${article.extract.slice(0, 157).trimEnd()}…` : article.extract;
|
||||
const lines = [
|
||||
`You earned a ${rarity(block.powHash)} card: ${article.title}`,
|
||||
` ${article.url}`,
|
||||
` ${extract}`,
|
||||
` Power ${s.power} · Defense ${s.defense} · Knowledge ${s.knowledge}`,
|
||||
];
|
||||
if (snap) lines.push(` At mint: attention ${snap.attention ?? '—'} · depth ${snap.depth} · reach ${snap.reach}`);
|
||||
lines.push(` Block #${block.height} · NFT ${block.tokenId}`);
|
||||
return lines.join('\n');
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { rewardSummary } from '../server/testnet/reward.ts';
|
||||
import { rarity, stats } from '../shared/protocol.ts';
|
||||
|
||||
test('miner reward summary names the earned card, its rarity and stats', () => {
|
||||
const powHash = '000eca7498a26d1908613726da6e869d7c9c936f4a461cb439ef24672b9a0008';
|
||||
const text = rewardSummary({ height: 42, tokenId: 'abc123', powHash,
|
||||
article: { pageId: 1, title: 'Ada Lovelace', extract: 'x'.repeat(300), url: 'https://en.wikipedia.org/wiki/Ada_Lovelace',
|
||||
revisionId: 1, source: 'live', category: 'People' },
|
||||
statsSnapshot: { capturedAt: '2026-11-16T00:00:00Z', revisionId: 1, pageBytes: 1, languageCount: 1, languagesTruncated: false,
|
||||
pageviews: { status: 'unavailable' } as never, stats: { attention: null, depth: 50, reach: 7 } } });
|
||||
const s = stats(powHash);
|
||||
assert.match(text, new RegExp(`You earned a ${rarity(powHash)} card: Ada Lovelace`));
|
||||
assert.match(text, /https:\/\/en\.wikipedia\.org\/wiki\/Ada_Lovelace/);
|
||||
assert.match(text, new RegExp(`Power ${s.power} · Defense ${s.defense} · Knowledge ${s.knowledge}`));
|
||||
assert.match(text, /attention — · depth 50 · reach 7/);
|
||||
assert.match(text, /Block #42 · NFT abc123/);
|
||||
assert.ok(text.split('\n')[2].length < 170, 'long extracts are truncated');
|
||||
});
|
||||
Reference in New Issue
Block a user