okf-wiki 1.1.1

First public release, published as one snapshot. What changed between
versions is in CHANGELOG.md.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-11-14 21:03:20 +01:00
commit 0fd86a23a3
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
227 changed files with 96077 additions and 0 deletions

View file

@ -0,0 +1,14 @@
{
"name": "okf-wiki",
"description": "The okf-wiki plugin, installed from a clone of its repository.",
"owner": {
"name": "Kjell Tore Guttormsen"
},
"plugins": [
{
"name": "okf-wiki",
"source": "./",
"description": "Build an Open Knowledge Format wiki from a folder of documents."
}
]
}

View file

@ -0,0 +1,7 @@
{
"name": "okf-wiki",
"description": "Build an Open Knowledge Format wiki from a folder of documents in your own Claude Code session: every claim carries a verbatim quote and the place it comes from. The tools never call a model.",
"author": {
"name": "Kjell Tore Guttormsen"
}
}

View file

@ -0,0 +1,116 @@
---
name: okf-wiki-compiler
description: Compiler for okf-wiki (K). Reads the task parts of one pack of source blocks and writes one JSON file of short concept fragments, each with a verbatim quote and a provenance mark, plus the main page of each docs source and a home for each page that needs one. Give it the part paths and the output path, nothing else.
tools: Read, Write
model: opus
---
You compile one pack of source blocks into short fragments for a concept wiki. Code splits the sources, keeps the index,
checks every fragment and assembles the pages; your job is the part that needs understanding: which concept a block
enriches and what it adds, which concept is a source's main topic, and under which main page a new page belongs.
## How to work
1. In your first turn, read every input part named in the prompt, all of them at once. Read nothing else: never read
pages of the wiki, never open the source files, never search.
2. Then write the output. When the prompt names one output path, write the whole pack to it in your second turn.
When it names several, each with the parts it holds, write them one at a time, each in its own turn and in the
order given: one answer holds only so much, and two outputs in one turn can be cut off. The outputs are cut by code
to fit one answer each, so never leave a block out to make an output fit. Then stop. Do not rewrite or check what
you wrote.
## What a concept is
The concepts are the unit of the wiki. The index lines in your input are the concepts that exist. Choose an existing
concept before you make a new one: when a block says something about an indexed concept, the fragment is "existing"
with that concept's id, also when the block uses other words for it. Propose a "new" concept only when all four tests
hold:
1. Topic shape: it defines something referenceable by name.
2. Not bundle meta: not an overview, introduction, getting started, quickstart, tutorial, walkthrough, release notes,
changelog, roadmap, FAQ or landing page.
3. Citation test: a sentence of the form "See the X reference for ..." makes sense, where X is a concrete noun.
4. Reuse test: at least two existing concepts would benefit from citing it, or one needs it as background.
When in doubt, use an existing concept or skip the block. Skip blocks that add nothing a reader of the concept would
need. Never invent a block, a line number or a quote.
## History sources
A source marked history (a release note, or a weekly page about what changed) adds history to the concepts and does not
set the structure. Attach its fragments to existing concepts first. Make a new concept from it only when no existing
concept fits, and give that concept a home on a main page; without one the page is asked for again, and the build
stops when it has none.
## Writing a fragment
- One to three plain sentences that say what the block adds, nothing the block does not say.
- Copy the quote character for character from one line inside the anchor: the same backticks, quotes and dashes.
Every fragment has one. Code rejects a fragment whose quote is not on a line of its anchor. A rejected fragment
is dropped and counted; the pack does not run again for it.
- Code cites the whole line your quote stands on, and a reader sees only the sentence and the lines it cites. Before
you write a sentence, hold each thing it says against the quote's line. Whatever it takes from anywhere else is
cited in `context`: the heading that names the subject (a list item or a table row does not say what it belongs to:
the product, the feature, the plan), or the other line of the same section that states the condition, the step or
the setting. At most two pieces; when a sentence would need more, split it into two fragments or leave that part
out. In the last build, a sentence that used a line it did not cite was the cause of two thirds of the sentences a
reader could not check, and only one in seven of them named any context.
- Say no more than the lines you cite: no wider scope ("all" for "some", "always" for "by default"), no number, cause, purpose
or order the quote does not state, no reversed negation, never a property of one subject given to another. Keep the
line's own limits in the sentence: "can", "may", "by default", "when", "only", a named plan, platform or product.
- Write current behaviour in present tense without the version number; code shows a release note's version as the
label of the line in the page's History.
- Mark the provenance as it is: "documented" when the text says what the quote says, "inferred" when it draws a
conclusion from several lines, "merged" when it combines them, and then name the lines it combines in `context`.
The quote is required with every mark.
- Put a name that holds a full stop (a file, a setting, an identifier) in backticks.
- Write no links. Code places them: the home on its main page, and the link pass's links by meaning.
## When sources disagree
Never drop what a source says because another says something else. Outdated: a later source changes an earlier claim;
attach the change to the concept as its own fragment, so the earlier claim and the change each keep their quote.
Disputed: two docs pages disagree and neither replaces the other; write each side as its own fragment with its own
quote.
## Main pages and homes
Every source marked "name its main page" has one main page: the concept that is the source's main topic, most often
the concept its title names. Name it in `main_pages`; it must be a concept you give a fragment from that source.
Every other page needs a home: the main page under which a reader would look for it, chosen by meaning, from the main
pages listed or from those you name in this pack. When no main page fits, leave the home out: code reports the page and
asks again later. Never force a home.
## Output contract
Write one JSON object `{"fragments": [...], "main_pages": [...], "homes": [...]}` to each output path named in your
prompt. When it names more than one, each names the parts it holds: write them one at a time, each in its own turn and
in the order given, each with the fragments of the blocks in the parts it names; `main_pages` and `homes` may stand in
any of them. One answer holds only so much, and an output left unwritten makes the whole pack run again. Each
fragment has:
- `concept` and `status`: "existing" with the index `id`, or "new" with `concept` its title as a reader would write it,
in the language and letters of the source (never an id), and `tests`: {"topic_shape", "citation"}.
- `text`: one to three sentences.
- `anchor`: {"file", "start", "end"} inside one block above.
- `quote`: one piece copied character for character from one line inside the anchor. Every fragment has a quote.
Code cites the whole line it stands on, and each sentence of `text` says only what that line and its context say.
- `context`: the other lines the text draws on, at most two pieces, each copied character for character from a
heading of the anchor's path (shown after the file name) or from another line of the same section: the subject a
heading names, or the condition, step or setting another line states. Leave it out only when the text says nothing
that its quote's line does not. Code places each on that heading or line and cites it too; a piece it cannot place
is dropped.
- `provenance`, one of three values, and the quote is required with each of them:
"documented" when the text says what its quote says;
"inferred" when the text draws a conclusion from lines of its anchor that no single line states;
"merged" when the text combines what several lines of its anchor say; name those lines in `context`, or code
cites the other lines of the anchor, the eight nearest the quote.
`main_pages`: one {"source", "concept"} for each source marked "name its main page": the concept that is that source's
main topic, named as your fragments from that source name it. A history source has no main page.
`homes`: one {"concept", "home"} for each concept you write a fragment for that is "new", or whose index line is
marked neither "main page" nor "has a home", unless you name it in `main_pages`. The `home` is an id under
"Main pages", or a concept you name in `main_pages`: the main page under which a reader would look for this concept.
A new concept from a history source needs a home like any other page; without one it is asked for again, and
the build stops when it has none.

View file

@ -0,0 +1,77 @@
---
name: okf-wiki-diagnoser
description: Diagnosis helper for okf-wiki (wave 4). Reads one diagnosis task of up to ten claims, each with the excerpt it cites and a window of its source, and replies with one line per claim - a code for where the claim's content comes from, and the words the excerpt lacks. Give it the path of one task file and nothing else.
tools: Read
model: opus
---
# Diagnosing claims against their excerpts
You get the path of one task file. Read that file with the Read tool, and read no other file. Your work is to explain,
claim by claim, whether the quoted excerpt alone carries the claim, and if it does not, where the rest of the claim
comes from. You are not grading anyone; you are finding the cause.
## What the task shows you
Each claim in the task has four parts:
- **Page title:** the title of the wiki page the claim was written on.
- **The claim**, between `<claim>` and `</claim>`.
- **The excerpt**, between `<excerpt>` and `</excerpt>`: the exact source text the claim cites, with its file and line.
- **A window** of the source around that line: the heading path above it (outermost heading first), then up to eight
lines before and after. Each window line reads `<line number> <q><c>| <text>`. The mark `>` stands on the quoted line,
and the mark `c` stands on a line of fenced code (the fence lines included).
## Step 1: does the excerpt alone carry the claim?
Look at the excerpt only, not the window and not the title. The excerpt carries the claim when every part of the claim
is said by the excerpt itself, or can be derived from it in a single step that leaves no room for doubt. Plain
rewording, a shorter version, or leaving details out is fine. Anything the claim adds, widens or links that the excerpt
does not say means the excerpt alone does not carry it.
If the excerpt alone carries the claim, the code is **S** and the words are left empty.
## Step 2: if not, what is missing and where is it?
Find the part of the claim that the excerpt lacks. Then give the one code that explains the most of it. Only when two
codes explain it equally well, take the one that comes first in this list:
1. **O** - the missing part stands in the heading path or the page title.
Excerpt "Turn it every second week." under the heading path "Garden care › Compost"; claim "The compost heap is
turned every second week." The words "compost heap" come from the heading: `O | compost heap`.
2. **L** - the missing part stands in another line of the window (not the quoted line).
Excerpt "Keep it as damp as a wrung sponge." and two lines above it "The heap needs both air and water."; claim
"The heap should be kept as damp as a wrung sponge." The subject comes from the earlier line: `L | heap`.
3. **B** - the claim says more than the source: a wider scope, or a stronger word (all, always, every, must, never,
only) where the source is narrower or softer.
Excerpt "A sharp spade can cut roots cleanly."; claim "A sharp spade always cuts roots cleanly." `B | always`.
4. **T** - a number, a version, an order of steps, a cause or a purpose that the window does not give.
Excerpt "Shred autumn leaves before adding them."; claim "Shred autumn leaves before adding them so they rot twice
as fast." `T | so they rot twice as fast`.
5. **F** - a property given to the wrong thing, or two things connected the wrong way.
The window says rye flour feeds the starter and wheat flour goes into the loaf; claim "The loaf is made with rye
flour." `F | loaf made with rye flour`.
6. **U** - the missing part is not in the window, the headings or the title at all, and none of B, T or F describes
it. Claim "Water the beds early in the day with a watering can." where nothing in the window mentions a can.
`U | with a watering can`.
7. **A** - none of the above. The words are your own short note of what is wrong, at most twelve words.
When a claim has several gaps, code the one that carries the most of the claim's meaning. Never give two codes for one
claim.
## The words
For every code except S, the words are the claim's own words that the excerpt lacks, copied from the claim and kept
short. For A they are your note. For S there are none.
## Your reply
Read every claim with the same care, the last as closely as the first. Then reply with one line per claim and nothing
else, in claim order, each in the form `<number>: <code> | <words>`. The number is the claim's number in the task, the
code is one capital letter from the list above, and the words follow the bar. No heading, no explanation, no bold, no
code block.
For a task with three claims, a reply looks like this:
1: S |
2: O | compost heap
3: B | always

View file

@ -0,0 +1,61 @@
---
name: okf-wiki-linker
description: Link pass and home task for okf-wiki. Reads the task parts of one link pass, or of one home task from the guard, and writes one JSON file of proposed links or homes, chosen by meaning. Give it the task part paths and the output path, nothing else.
tools: Read, Write
model: opus
---
You link a knowledge collection by meaning. Code has already written the pages and checks every answer you give; your
only job is the decision that needs understanding. A task is one of two kinds, and its first heading says which:
- **Link pass** ("# Link pass"): say which phrase in a sentence is about which concept in the catalogue.
- **Home task** ("# Home task"): say which main page a page without a home belongs under, and which page is the main
page of a source that has none.
## How to work
1. In your first turn, read every task part named in the prompt, all of them at once. Read nothing else: never read
the pages of the collection, never open source files, never search.
2. In your second turn, write the one JSON file at the output path named in the prompt. Then stop. Do not rewrite or
check what you wrote.
## What a good link is
A link tells a reader that a phrase is about another concept, so they can follow it to learn more. Choose the phrase
by what it means: "keeps the soil moist" can point to a page about watering even though the word "watering" is not in
the sentence. Link only where a reader of the sentence would want to go to that concept. A sentence may have no link.
## What a good home is
A home is the main page under which a reader would look for a page: the topic the page is part of, a tool it is used
with, the procedure it is a step of. Choose by meaning, not by shared words. When no main page in the catalogue is
such a place, say so with `none`: a page without a natural home is reported to the operator, never forced under one.
A main page for a source is the page whose topic is that source's main topic, chosen among the pages that cite it.
## Contract
You add links to sentences of a knowledge collection. Every sentence below has a key. Link by meaning, not by name:
a link says that a phrase in the sentence is about a concept in the catalogue, and the phrase may use other words than
the concept's title.
- Targets: only ids from the catalogue in this task. Never link a page to itself.
- Anchor: a phrase that already stands, character for character, in the sentence, outside backticks. Change no word.
- At most 3 links in one sentence. No lists of related pages and no "see also" lines.
- When nothing in the catalogue fits, put the page id in `none`.
- Output: one JSON object `{"links": [{"page": ..., "sentence": ..., "anchor": ..., "target": ...}], "none": [...]}`,
where `page` is the page file as the task names it, `sentence` is the sentence key and `target` is a catalogue id.
Write it to the output path named in your prompt, then stop.
## Contract (home task)
A main page is the page for the main topic of one docs source. Every other page needs a home: a main page that links
to it in its list of related concepts. The pages and sources below lack one. Decide by meaning, as a reader of the
main page would look for the page.
- For each page under "Pages without a home": choose its home from the catalogue, or a page you name a main page
below, and add {"page": <id>, "home": <id>} to `homes`. When no main page fits, put the page id in `none`: a page
without a natural home is reported, never given a forced home.
- For each source under "Sources without a main page": choose, from the pages listed under it, the page whose topic is
that source's main topic, and add {"source": <path>, "page": <id>} to `main_pages`.
- Output: one JSON object `{"homes": [...], "none": [...], "main_pages": [...]}`. Write it to the output path named
in your prompt, then stop.

View file

@ -0,0 +1,13 @@
---
name: okf-wiki-merger
description: Merge judge for okf-wiki (step 18a). Reads one task of up to eight candidate pairs of pages, each page with its title, its home and its claims with the quotes they rest on, and replies with one line per pair - same concept or not. Give it the path of one task file and nothing else.
tools: Read
model: opus
effort: high
omitClaudeMd: true
---
You are the okf-wiki merge judge. The prompt names one task file. Read that file with the Read tool, and read nothing
else: no other file, no source, no page. For each pair in the task, decide whether the two pages are about the same
concept or not, from the meaning of the claims and the quotes they rest on. The task file holds your instructions and
the pairs; follow its instructions exactly, and reply with one line per pair and nothing else.

View file

@ -0,0 +1,12 @@
---
name: okf-wiki-reader
description: Independent reader for okf-wiki. Judges up to ten claims against the source excerpts each one cites and replies with one verdict line per claim. Give it the path of one rendered task file and nothing else.
tools: Read
model: opus
effort: xhigh
omitClaudeMd: true
---
You are the okf-wiki reader. The prompt names one task file. Read that file with the Read tool, and read nothing else:
no other file, no source, no page. The task file holds your instructions and the claims you judge. Follow its
instructions exactly, and make your reply only what it asks for.

View file

@ -0,0 +1,13 @@
---
name: okf-wiki-repairer
description: Repair helper for okf-wiki. Reads the parts of one repair task, each fragment with its sentences, quotes and source block, and writes one JSON file of answers, each fragment replaced or removed. Give it the part paths and the answer path, nothing else.
tools: Read, Write
model: opus
effort: xhigh
omitClaudeMd: true
---
You are the okf-wiki repair helper. The prompt names the parts of one task and one answer path. Read those parts with
the Read tool, and read nothing else: no other file, no source, no page. The parts hold your instructions and the
fragments you repair. Follow the instructions exactly, write one JSON file to the answer path with the Write tool, and
then hand back only the word done.

View file

@ -0,0 +1,48 @@
---
name: p1-compiler
description: TRIAL agent for the P1 method trial (branch p1-metodeprove, not v1). Reads one pack of source blocks and writes one JSON file of short concept fragments. Give it the input part paths and the output path, nothing else.
tools: Read, Write
model: opus
---
TRIAL (P1 method trial, branch p1-metodeprove): not v1 code, not the shipped skill.
You compile one pack of source blocks into short fragments for a concept wiki. Code splits the sources, keeps the index
and assembles the pages; your only job is to say, block by block, which concept a block enriches and what it adds.
## How to work
1. In your first turn, read every input part named in the prompt, all of them at once. Read nothing else: never read
pages of the wiki, never open the source files, never search.
2. In your second turn, write the one JSON file at the output path named in the prompt. Then stop. Do not rewrite or
check what you wrote.
## What a concept is
A concept is one unit of knowledge, referenceable by name. The index lines in your input are the concepts that exist.
Prefer them: when a block says something about an indexed concept, the fragment is `existing` with that concept's id.
Propose a `new` concept only when all four tests hold, and only from a docs page block, never from a release note:
1. Topic shape: it defines something referenceable by name.
2. Not bundle meta: not an overview, introduction, getting started, quickstart, tutorial, walkthrough, release notes,
changelog, roadmap, FAQ or landing page.
3. Citation test: a sentence of the form "See the X reference for ..." makes sense, where X is a concrete noun.
4. Reuse test: at least two existing concepts would benefit from citing it, or one needs it as background.
When in doubt, use an existing concept or skip the block. Release notes only add dated lines to existing concepts.
## The output
One JSON object: `{"fragments": [ ... ]}`. Each fragment:
- `concept`: the concept's name as the index gives it (or the new name).
- `status`: `"existing"` or `"new"`.
- `id`: the index id, for `existing` only.
- `text`: one to three plain sentences that say what the block adds, in your own words, nothing the block does not say.
- `anchor`: `{"file": ..., "start": N, "end": M}`, the block's file and line span exactly as the input gives it, or a
narrower span inside that one block.
- `quote`: one short piece copied character for character from one line inside the anchor. Required when the text holds
a number, a version or a name in backticks; otherwise optional.
- `tests`: for `new` only, `{"topic_shape": "...", "citation": "..."}`, one short reason each.
Skip blocks that add nothing a reader of the concept would need. Never invent a block, a line number or a quote.

View file

@ -0,0 +1,27 @@
---
name: p1-consolidator
description: TRIAL agent for the P1 method trial (branch p1-metodeprove, not v1). Rewrites assembled page bodies into flowing text while keeping every footnote label. Give it the task path and the output path, nothing else.
tools: Read, Write
model: opus
---
TRIAL (P1 method trial, branch p1-metodeprove): not v1 code, not the shipped skill.
You make assembled wiki pages read well. Each page body in your task was put together by code from short fragments, one
after another, each sentence ending in footnote labels such as `[^a3]`. You rewrite each body into flowing text.
## How to work
1. In your first turn, read the task file named in the prompt. Read nothing else.
2. In your second turn, write the one JSON file at the output path named in the prompt: `{"<page id>": "<new body>"}`
for every page in the task. Then stop.
## Rules for each body
- Keep every footnote label the old body uses, each at least once, at the end of the sentence it supports.
- Add no new label and invent no label.
- Every sentence ends with at least one label. A sentence that joins two facts carries the labels of both.
- Add no fact, number, name or version the old body does not state. Leaving out a repeated sentence is allowed.
- Keep a `## History` section and its order when the old body has one, one line per version, with its labels.
- Write plain Markdown: paragraphs and list items, no tables, no code fences, no headings other than the ones you keep.
- Output only the JSON file; no comments.

17
.gitignore vendored Normal file
View file

@ -0,0 +1,17 @@
# Local-only continuity files: this repository becomes public after v1 (CLAUDE.md rule 2).
STATE.md
PLAN.md
*.local.*
runtime/
# Local evaluation material (Anthropic-derived text is never committed, CLAUDE.md rule 3).
gates-local/
# Order briefs and plans may name Anthropic doc pages (CLAUDE.md rule 3); .claude/agents/ stays tracked.
.claude/projects/
# Python
.venv/
__pycache__/
*.pyc
.mypy_cache/
.pytest_cache/
# OS
.DS_Store

5
.gitleaksignore Normal file
View file

@ -0,0 +1,5 @@
# sha256 of the calibration key file (also in gates/calibration.manifest.json), not a secret
gates/calibration.passed.json:generic-api-key:7
# sha256 of the folder calibration key (also in gates/calibration-folder.manifest.json) and a second green run on the docs key, not secrets
gates/calibration.passed.json:generic-api-key:14
gates/calibration.passed.json:generic-api-key:21

121
CHANGELOG.md Normal file
View file

@ -0,0 +1,121 @@
# Changelog
## [Unreleased]
## [1.1.1] - 2026-11-14
The repair list is written from a reading by a command, the reader can take fewer claims per call, and the repository
is ready for its first public release.
### Added
- `krepair list`: the repair list from a reading's verdicts. It lists every claim read that does not have exactly one
verdict, supported, as `claims score` counts it; given the ids of a sample, it lists only the claims of the sample.
Before, no command wrote the list the repair task reads.
- `claims calls --size N`: at most N claims per reader call (1 to 10, default 10). A claim read among six to ten
neighbours from its page was judged more mildly than the same claim read nearly alone: 12 of 269 accepted claims
turned in the sample of 14.11.
- MIT licence (`LICENSE`).
### Changed
- The skill assembles a repair into a copy of the collection, from one answers file. Assembled into an empty folder,
every page got a new generated time and the diff reported 379 pages without a repair; and one fix builds the whole
collection to measure itself (2.5 minutes on 555 pages), so 178 answer files one at a time would take hours.
- README rewritten for the first public release.
## [1.1] - 2026-11-14
A folder of mixed PDF and Office files is built into a collection with the same code as the documentation, both
collections are looked up through one read-only server, and the reader measures a changed build on a random sample.
### Added
- `okf-wiki serve --bundle NAME WIKI [SOURCES] ...`: a read-only MCP server over stdio for lookups across built
collections, with four tools (`collections`, `search`, `page`, `source`). It calls no model and writes nothing.
`search` matches a page's title, description and text; a word in the title counts twice and rarer words weigh more.
- `sources reread ROOT --out ROOT2` reads a folder again as the same collection, and `sources watch ROOT --into DIR`
reports each new, changed or gone document by its original path with the pages built on it, once.
- `kmerge propose`: candidate pairs of concepts built twice under two names, found from the page titles; `--judged`
leaves out pairs judged different before. `kmerge controls` draws the control pairs a build has, so a small folder
no longer stops the step.
- A second calibration set for the reader, from Norwegian and English folder documents. A reading counts only when
the reader's model has a green run on both sets.
- `claims sample --of-all`: 300 random claims among every claim, with nothing added, for the reading after a changed
build.
- The upstream watch follows the announced new home of the Open Knowledge Format.
- `sources folder`: a folder of Markdown and text documents becomes a frozen copy with one command and no hand-written
description. Subfolders, capitals and non-ASCII names get a safe name and keep their original path and `file:///`
URL; Windows line breaks, Windows-1252/Latin-1 and a byte order mark are written as plain UTF-8 and recorded; every
file skipped is named with its reason.
- The repository is a Claude Code plugin: the skill and the helpers reach a session started in any folder, and
`bin/okf-wiki` runs the tools from there.
- PDF, Word, Excel and PowerPoint in `sources folder`, read with their exact place: page, paragraph, sheet and cell,
slide and notes. Every footnote names the place, the auditor checks it against the frozen copy, and the HTML view
opens the original file, a PDF at its page. Hidden Office content is left out and reported. Office files need
nothing installed; PDF needs `pypdf==6.14.2`.
- `python3 -m okfwiki.readers locate`, the reader the file-type gate measures: 128 of 128 in its working set.
- `sources folder` records each document's language (`lang`, Norwegian or English, from its common words), and the HTML
view states it on every page instead of always `en`.
- `gates/calibration.passed.json`, the record of the reader's green calibration runs (models and sha256 only), and
`reader collect --gate-passed` without a file reads it, so a fresh clone can read without the calibration set.
- `x-aliases`: a concept's other names stand on its page, end its index line as ` (also: A; B)`, are shown in the
HTML view and are searched by the lookup server as its title is. The standard has no field for another name.
- `kmerge apply --operator FILE`: verdicts a person set in place of the judge's, listed in the report.
- The operator's list `WORK/homeless-approved.json` takes `sources` beside `pages`: a document with no readable
content, so no page cites it and it has no main page, that he approves is reported by run-after and the guard
instead of stopping the build. The auditor still reports it, and it never gets a forced fragment or main page.
### Changed
- Pages judged one concept merge into the page with the shortest name, so the merged page carries the concept's short
name; before, the main page won, and 48 of 118 merged pages of collection 1 carried a longer name than a page
that went into them. The merged page keeps its own description.
- A page with a sentence that also stands on the page it merges into is merged all the same: the sentence is cut
from the page that moves, so it stands once, and the report lists it. Before, such a page was left out.
- Any file name is a page; only `release-vX.Y.Z.md` is a release note by name. `.txt` sources are built like `.md`.
- Page ids spell out letters outside ASCII (`Årlig kontroll` is `aarlig-kontroll`, not `rlig-kontroll`).
- A footnote on a page built from a folder names the original file (`Årlig plan.md, line 3`), not its safe name.
- A spreadsheet row is one line, each cell after its column letter, and a run of rows one block of about 4,000
characters that starts with the run's first row; the footnote names the cell the quote covers.
- A period after a common abbreviation (`f.eks.`, `kl.`, `bl.a.`, `e.g.`, `vs.`, `Dr.`) or an initial (`Steven L.
Rickman`) no longer ends a sentence.
- A folder's document named like a release note (`Release-v2.1.0.md`) gets the safe name `release-v2.1.0-doc.md`,
so it is built as a document with a main topic, not as a release note.
- The stop line prices the next pack by the characters of its blocks, not their number: every block records `chars`,
every pack `block_chars`. A PDF or spreadsheet block of a real folder holds about ten times the characters of a
docs block, and the cost per character stays near (6.9 tokens on collection 1, 5.8 and 8.5 on two folder trials),
so a pack of PDFs was priced about three times too low. A pack log without characters keeps the rule by blocks.
- `kpack --max-chars C` closes a new pack before the source that would take it over C characters of blocks (no cap
unless given), and run-before names a source larger than the largest measured to hold in one compiler run (a PDF of
387 767 characters: 342 of 345 fragments accepted, auditor 0 findings).
### Fixed
- A link placed after an abbreviation (`U.S. [primary aluminum production](...)`) no longer splits its sentence in
two, which made the auditor report a cited sentence as uncited and stopped a folder build.
- `kmerge apply` leaves out a page whose sentence collides with one on the page kept and lists it, instead of
refusing the whole merge.
- The coverage floor of a document fetched again is scaled by the blocks that can carry a claim, so a page that
splits its headings into more blocks is not stopped for citing too little.
### Known limitations
- The reader on 300 random claims of each collection found 17 not supported (5.67 %) in the documentation collection
of 3,162 pages and 24 (8.00 %) in the folder collection of 555 pages. The aim is under 3 %; it is not reached.
- `docs/known-limitations.md`.
## [1.0] - 2026-11-07
First version. It builds one collection, the Claude Code documentation and its release notes, into a wiki in
Google's Open Knowledge Format.
### Added
- K, the fragment compiler: code splits sources into blocks, the user's own Claude Code session writes short quoted
fragments per pack of five sources through the skill (`skills/okf-wiki/SKILL.md`), and code assembles the pages.
- The hard check at writing: every sentence has a footnote to a source that exists and a quote that stands verbatim
in it, with a provenance mark (`x-provenance`: documented, inferred or merged).
- Links made by the model from meaning (`okfwiki.klink`), checked and placed by code; a main page for every
single-topic source and a home for every other page.
- The auditor (`okfwiki.audit`): quotes at their locator, SPEC § 11 conformance, links, orphans and index coverage;
the static HTML view (`okfwiki.view`).
- The independent reader (`agents/okf-wiki-reader.md`) with its calibration gate, and claim repair at the fragment
(`okfwiki.krepair`, `agents/okf-wiki-repairer.md`).
- The change warning: sources that are new, changed or gone are reported and the pages built on them are marked.
### Known limitations
- `docs/known-limitations.md`.

60
CLAUDE.md Normal file
View file

@ -0,0 +1,60 @@
# okf-wiki
Every standing rule in this repository is in this file or in `docs/rule-decisions.md`. Nothing is inherited from the
repository this one replaces (`llm-ingestion-okf`). The rules removed on 06.11.2026 are in git history.
## Goal (the operator's words, without a solution)
Point Claude Code at a folder of documents of any kind: documentation, one's own collections, mixed PDF and Office
files. The result is a knowledge collection the operator trusts. Every claim on every page shows where it comes from,
and the source can be opened. Questions, especially those that need several documents seen together, are answered
better with the collection than without it.
The operator's approved direction stands at the top of `PLAN.md` and wins where anything else disagrees; nobody
rewords it without him. v1 is collection 1 (the Claude Code documentation and its release notes). v1.1 is one real
folder of mixed PDF and Office files built without a code change, the operator's own questions to each collection, and
a fresh collection 1 published; its finish line is in `PLAN.md`. A third collection and questions across collections
come after v1.1 (operator 13.11.2026).
## The shape
- **The unit is the concept,** built additively for each document read in.
- **K, the fragment compiler, plus Google's link rule.** Code splits sources into blocks, the user's session writes
short quoted fragments per pack of five sources through the skill (`skills/okf-wiki/SKILL.md`), and code assembles
the pages. The model makes links from meaning; there is no code linker. The auditor checks only structure: every
link points to a page that exists, no link sits in code, a heading or a footnote, every single-topic source has a
main page, and every other concept page has a link from at least one main page (`index.md` does not count).
- **One hard check at writing:** every sentence has a footnote to a source that exists and a quote that stands
verbatim in it. Claims carry a provenance mark (`x-provenance`: documented | inferred | merged). Outdated-marking
(`x-outdated`) is not in v1. The change warning is: code reports which sources are new, changed or gone and marks
the pages built on them, so one source's contribution must be replaceable on its own.
- **The auditor** (no model) reads sources into a locked raw-source layer (sha256 + page/slide/cell/line), checks
every quote at its locator, SPEC § 11 conformance, links, orphans and index coverage, and renders a static HTML view.
It is the collection's recurring health check.
- **The independent reader** (`agents/okf-wiki-reader.md`) judges claims against their cited excerpts only, up to ten
per call. v1's measurement stands. After v1 it reads a small random sample when a build changes.
- **A read-only MCP server** serves lookups across collections. Plain file search always keeps working beside it.
- The trial code in `evals/p1/` is not v1 code.
## Binding rules (the operator's; changing them is the operator's decision)
1. Shipped tools never call a language model or Claude Code. Model work happens in the user's own session through the skill.
2. `STATE.md`, `PLAN.md` and secrets stay local (gitignored), because this repository becomes public after v1. No marketing language.
3. Text derived from Anthropic documentation is never committed. The Claude Code docs test set lives outside the repository, and only
its shape is published.
4. Forgejo only, never GitHub. Never commercial, and no link to the operator's employer: `tools/check-excluded-terms.sh` runs before
every commit and on every commit message (install once per clone with `tools/install-hooks.sh`, from the main checkout).
5. Sources are always there as references: every concept links to the actual document or documents it comes from, with as exact a
reference as is practical.
## The standard
Google Open Knowledge Format, <https://github.com/GoogleCloudPlatform/open-knowledge-format>; we keep it (operator
06.11.2026). `SPEC.md` at the pinned commit is the source of truth: before touching anything format-related, read its
§ 2 terminology and the section concerned, and quote the § number. Where it is not good enough for the goal, use
`x-` fields, marked clearly, justified by a measurement, and movable to a standard field if Google adopts one.
## Working here
- Test first (no production code without a failing test), `mypy --strict`, Conventional Commits, English in code and docs.
- Tests: `python3 -m unittest discover -s tests` (also `gates/tests`, `evals/tests`); a single file with
`-p 'test_X.py'`, because a `tests` package in site-packages shadows `tests.X`.
- Types: `~/.local/bin/uvx --offline --with types-PyYAML mypy --strict okfwiki gates tests tools/*.py`
(`python3 -m mypy` does not work on this machine).
- One model build at a time: two runs would create the same concept twice.
- An agent file edited during a session reaches subagents only after the session restarts.
- Decisions the operator cannot take without reading code are taken here and written as "chose X because Y" in the commit.

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Kjell Tore Guttormsen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

160
README.md Normal file
View file

@ -0,0 +1,160 @@
# okf-wiki
Build an Open Knowledge Format wiki from a folder of documents in your own Claude Code session: every claim carries a verbatim quote and the place it comes from. The tools never call a model.
You have a folder of documents (Markdown, text, PDF, Word, Excel, PowerPoint) and want pages you can check: each
sentence names the document and the line, page, cell or slide it comes from, and the source opens at that place.
okf-wiki is a Claude Code plugin for one person or a small team who wants to look things up across such a folder and
check the answer.
*AI-generated: all code produced by Claude Code through dialog-driven development.*
## Install
Use the `https://` form: `claude plugin marketplace add` does not accept an `ssh://` URL.
```bash
claude plugin marketplace add https://git.fromaitochitta.com/open/okf-wiki.git
claude plugin install okf-wiki@okf-wiki
```
Then, in a Claude Code session, ask: `Build a wiki from the folder ~/Documents/reports`. The skill puts the frozen
copy, the work folder and the wiki beside that folder, not in it.
## Requirements
- Claude Code. The model work runs in your own session, so a build spends your own tokens (see [Cost](#cost)).
- Python 3 as `python3`, and PyYAML. Tested with Python 3.14 and PyYAML 6.0.3. Everything else is the standard library.
- PDF files need `pypdf==6.14.2`, that exact version (`python3 -m pip install pypdf==6.14.2`). Without it a folder
with a PDF is refused. Word, Excel and PowerPoint files need nothing extra.
- bash, for `bin/okf-wiki`. Tested on macOS.
## What it does
- Freezes a folder: every `.md`, `.markdown`, `.txt`, `.pdf`, `.docx`, `.xlsx` and `.pptx` file, in subfolders too.
Each file is kept as the text a reader of it sees, with the page, paragraph, sheet and cell, or slide of every
line. Hidden sheets, rows, slides and text and tracked deletions are left out and reported. A scanned PDF without a
text layer is skipped and named.
- Builds one concept page per idea, added to document by document. Every sentence has a footnote with a quote that
stands word for word in the source, at a stated place (`Report.pdf, page 2`).
- Checks the result with code: every quote at its place, the format, the links, pages nobody links to.
- Has an independent reader judge whether the quotes support the claims, and repairs the claims it rejects.
- Renders a static HTML view where every footnote opens the source at the quoted line.
- Serves read-only lookups over one or more collections as an MCP server. Plain file search keeps working beside it.
```mermaid
flowchart LR
F[Folder] --> S[Frozen copy] --> B[Blocks] --> C[Fragments*] --> P[Pages]
P --> A[Auditor]
P --> R[Reader*]
P --> V[HTML view]
P --> M[MCP lookups]
```
Steps marked `*` are done by subagents in your session. Every other step is plain Python with no model call.
## Non-goals
- No language model call from the shipped tools, and no API key. All model work happens in your Claude Code session.
- No search by meaning. The lookup server matches words; the model reads the pages it finds.
- No OCR. A PDF without a text layer is skipped.
- No marking of a claim as outdated by a later source. When sources disagree, both claims are kept, each with its quote.
- No format of its own. The pages follow Google's
[Open Knowledge Format](https://github.com/GoogleCloudPlatform/open-knowledge-format) (SPEC v0.2, read at commit
`ad30107`). Frontmatter keys that start with `x-` are this project's own additions, each with its measured reason
in [docs/x-fields.md](docs/x-fields.md).
- No hosted service, account or payment.
## Known limitations
- The reader judged 300 random claims of each built collection. It found 17 not supported (5.67 %) in a collection of
3,162 pages built from software documentation, and 24 (8.00 %) in a collection of 555 pages built from a folder of
PDF and Office files. The aim is under 3 %. A fresh build does not reach it.
- Repair brought the folder collection to 5 of 300 (1.67 %), measured 14.11.2026: every claim was read alone, the
rejected ones were repaired, and 96 claims that could not be proven from their quotes were removed. Most of those
were table rows that need more heading lines than a claim may cite, and bullets under a slide title.
- The language of a document is recorded only as Norwegian or English.
- Guards without a test of their own and limits of the measurement tools are listed in
[docs/known-limitations.md](docs/known-limitations.md).
## Cost
A build is paid for by your Claude Code session. Before the first pack you set a ceiling in tokens. After every pack
the skill checks a stop line, and the build stops before the next pack would go over the ceiling. Measured cost per
character of source text was 6.9 tokens on the documentation collection and 5.8 and 8.5 on two folder trials
([CHANGELOG](CHANGELOG.md), 1.1). A PDF of 387,767 characters was the largest measured to hold in one compiler run.
## The skill
`skills/okf-wiki/SKILL.md` is how your session builds the wiki, in packs of five sources:
1. Code splits the frozen copy into blocks.
2. A compiler subagent (`okf-wiki-compiler`) reads one pack's blocks and the list of concepts that exist, and writes
short fragments. Each has a verbatim quote from one source line and a provenance mark: `documented`, `inferred` or
`merged`. It names the main page of each single-topic document and a home (a main page that links to it) for every
other page.
3. Code checks every quote, drops a fragment that fails, assembles the pages and runs the auditor after every pack.
4. A linker subagent (`okf-wiki-linker`) proposes links by meaning. Code checks and places them and never makes a link
of its own.
5. A merger subagent (`okf-wiki-merger`) judges pairs of concepts built twice under two names; code merges them.
6. The reader (`okf-wiki-reader`) judges claims against the quotes they cite, up to ten per call. A claim it does not
support is repaired at its fragment by `okf-wiki-repairer` and read again.
Only one build runs at a time. Two at once would create the same concept twice.
To answer a question, the skill searches `index.md`, opens the main page of the area, follows its links, and opens the
source behind a footnote when the quote has to be checked.
## Running the tools yourself
Installed as a plugin, `okf-wiki MODULE ...` runs `python3 -m okfwiki.MODULE ...` from any folder in a Claude Code
session. From a clone, run `python3 -m okfwiki.MODULE` in the repository root, or call `bin/okf-wiki` by its path.
Every module takes `--help`. None of them calls a model.
```bash
okf-wiki sources folder DIR --collection NAME --out SOURCES # freeze a folder
okf-wiki sources check SOURCES # check the frozen copy
okf-wiki audit WIKI SOURCES # JSON findings; exit 0 clean, 1 findings, 2 could not run
okf-wiki view render WIKI SOURCES --out HTML # static HTML view
okf-wiki view check WIKI HTML # prints "footnotes resolved: X of N"
okf-wiki sources watch SOURCES --into DIR --bundle WIKI # documents new, changed or gone since the freeze, and their pages
```
The auditor reports four groups apart: `spec-11` (SPEC § 11 conformance), `links` (this project's link rules),
`citations` (every sentence has a footnote, every footnote a source, every quote stands at its place) and `format`.
## Lookups over MCP
Clone the repository, then register the server with the path to the clone:
```bash
git clone https://git.fromaitochitta.com/open/okf-wiki.git
claude mcp add okf-wiki -- /path/to/okf-wiki/bin/okf-wiki serve --bundle NAME WIKI SOURCES
```
Repeat `NAME WIKI SOURCES` after `--bundle` for more collections. Four tools follow the order the skill answers in:
`collections`, `search`, `page` and `source`. The server writes nothing.
## Verify it yourself
Nothing runs the tests automatically: the forge has no CI. From a clean clone, with PyYAML installed:
```bash
python3 -m unittest discover -s tests
python3 -m unittest discover -s gates/tests
python3 -m unittest discover -s evals/tests
```
Run a single test file with `-p 'test_X.py'`. The type check runs mypy through uvx, offline, so mypy and
types-PyYAML must already be in uvx's cache (run it once without `--offline` to fetch them):
`uvx --offline --with types-PyYAML mypy --strict okfwiki gates tests tools/*.py`.
`tests/v1_repo.sh` runs these with the owner's other repository checks. Several of them read local files that are
not in the repository (the test collections, the excluded-terms list) and print FAIL without them.
## Changelog
See [CHANGELOG.md](CHANGELOG.md).
## License
MIT. See [LICENSE](LICENSE).

116
agents/okf-wiki-compiler.md Normal file
View file

@ -0,0 +1,116 @@
---
name: okf-wiki-compiler
description: Compiler for okf-wiki (K). Reads the task parts of one pack of source blocks and writes one JSON file of short concept fragments, each with a verbatim quote and a provenance mark, plus the main page of each docs source and a home for each page that needs one. Give it the part paths and the output path, nothing else.
tools: Read, Write
model: opus
---
You compile one pack of source blocks into short fragments for a concept wiki. Code splits the sources, keeps the index,
checks every fragment and assembles the pages; your job is the part that needs understanding: which concept a block
enriches and what it adds, which concept is a source's main topic, and under which main page a new page belongs.
## How to work
1. In your first turn, read every input part named in the prompt, all of them at once. Read nothing else: never read
pages of the wiki, never open the source files, never search.
2. Then write the output. When the prompt names one output path, write the whole pack to it in your second turn.
When it names several, each with the parts it holds, write them one at a time, each in its own turn and in the
order given: one answer holds only so much, and two outputs in one turn can be cut off. The outputs are cut by code
to fit one answer each, so never leave a block out to make an output fit. Then stop. Do not rewrite or check what
you wrote.
## What a concept is
The concepts are the unit of the wiki. The index lines in your input are the concepts that exist. Choose an existing
concept before you make a new one: when a block says something about an indexed concept, the fragment is "existing"
with that concept's id, also when the block uses other words for it. Propose a "new" concept only when all four tests
hold:
1. Topic shape: it defines something referenceable by name.
2. Not bundle meta: not an overview, introduction, getting started, quickstart, tutorial, walkthrough, release notes,
changelog, roadmap, FAQ or landing page.
3. Citation test: a sentence of the form "See the X reference for ..." makes sense, where X is a concrete noun.
4. Reuse test: at least two existing concepts would benefit from citing it, or one needs it as background.
When in doubt, use an existing concept or skip the block. Skip blocks that add nothing a reader of the concept would
need. Never invent a block, a line number or a quote.
## History sources
A source marked history (a release note, or a weekly page about what changed) adds history to the concepts and does not
set the structure. Attach its fragments to existing concepts first. Make a new concept from it only when no existing
concept fits, and give that concept a home on a main page; without one the page is asked for again, and the build
stops when it has none.
## Writing a fragment
- One to three plain sentences that say what the block adds, nothing the block does not say.
- Copy the quote character for character from one line inside the anchor: the same backticks, quotes and dashes.
Every fragment has one. Code rejects a fragment whose quote is not on a line of its anchor. A rejected fragment
is dropped and counted; the pack does not run again for it.
- Code cites the whole line your quote stands on, and a reader sees only the sentence and the lines it cites. Before
you write a sentence, hold each thing it says against the quote's line. Whatever it takes from anywhere else is
cited in `context`: the heading that names the subject (a list item or a table row does not say what it belongs to:
the product, the feature, the plan), or the other line of the same section that states the condition, the step or
the setting. At most two pieces; when a sentence would need more, split it into two fragments or leave that part
out. In the last build, a sentence that used a line it did not cite was the cause of two thirds of the sentences a
reader could not check, and only one in seven of them named any context.
- Say no more than the lines you cite: no wider scope ("all" for "some", "always" for "by default"), no number, cause, purpose
or order the quote does not state, no reversed negation, never a property of one subject given to another. Keep the
line's own limits in the sentence: "can", "may", "by default", "when", "only", a named plan, platform or product.
- Write current behaviour in present tense without the version number; code shows a release note's version as the
label of the line in the page's History.
- Mark the provenance as it is: "documented" when the text says what the quote says, "inferred" when it draws a
conclusion from several lines, "merged" when it combines them, and then name the lines it combines in `context`.
The quote is required with every mark.
- Put a name that holds a full stop (a file, a setting, an identifier) in backticks.
- Write no links. Code places them: the home on its main page, and the link pass's links by meaning.
## When sources disagree
Never drop what a source says because another says something else. Outdated: a later source changes an earlier claim;
attach the change to the concept as its own fragment, so the earlier claim and the change each keep their quote.
Disputed: two docs pages disagree and neither replaces the other; write each side as its own fragment with its own
quote.
## Main pages and homes
Every source marked "name its main page" has one main page: the concept that is the source's main topic, most often
the concept its title names. Name it in `main_pages`; it must be a concept you give a fragment from that source.
Every other page needs a home: the main page under which a reader would look for it, chosen by meaning, from the main
pages listed or from those you name in this pack. When no main page fits, leave the home out: code reports the page and
asks again later. Never force a home.
## Output contract
Write one JSON object `{"fragments": [...], "main_pages": [...], "homes": [...]}` to each output path named in your
prompt. When it names more than one, each names the parts it holds: write them one at a time, each in its own turn and
in the order given, each with the fragments of the blocks in the parts it names; `main_pages` and `homes` may stand in
any of them. One answer holds only so much, and an output left unwritten makes the whole pack run again. Each
fragment has:
- `concept` and `status`: "existing" with the index `id`, or "new" with `concept` its title as a reader would write it,
in the language and letters of the source (never an id), and `tests`: {"topic_shape", "citation"}.
- `text`: one to three sentences.
- `anchor`: {"file", "start", "end"} inside one block above.
- `quote`: one piece copied character for character from one line inside the anchor. Every fragment has a quote.
Code cites the whole line it stands on, and each sentence of `text` says only what that line and its context say.
- `context`: the other lines the text draws on, at most two pieces, each copied character for character from a
heading of the anchor's path (shown after the file name) or from another line of the same section: the subject a
heading names, or the condition, step or setting another line states. Leave it out only when the text says nothing
that its quote's line does not. Code places each on that heading or line and cites it too; a piece it cannot place
is dropped.
- `provenance`, one of three values, and the quote is required with each of them:
"documented" when the text says what its quote says;
"inferred" when the text draws a conclusion from lines of its anchor that no single line states;
"merged" when the text combines what several lines of its anchor say; name those lines in `context`, or code
cites the other lines of the anchor, the eight nearest the quote.
`main_pages`: one {"source", "concept"} for each source marked "name its main page": the concept that is that source's
main topic, named as your fragments from that source name it. A history source has no main page.
`homes`: one {"concept", "home"} for each concept you write a fragment for that is "new", or whose index line is
marked neither "main page" nor "has a home", unless you name it in `main_pages`. The `home` is an id under
"Main pages", or a concept you name in `main_pages`: the main page under which a reader would look for this concept.
A new concept from a history source needs a home like any other page; without one it is asked for again, and
the build stops when it has none.

61
agents/okf-wiki-linker.md Normal file
View file

@ -0,0 +1,61 @@
---
name: okf-wiki-linker
description: Link pass and home task for okf-wiki. Reads the task parts of one link pass, or of one home task from the guard, and writes one JSON file of proposed links or homes, chosen by meaning. Give it the task part paths and the output path, nothing else.
tools: Read, Write
model: opus
---
You link a knowledge collection by meaning. Code has already written the pages and checks every answer you give; your
only job is the decision that needs understanding. A task is one of two kinds, and its first heading says which:
- **Link pass** ("# Link pass"): say which phrase in a sentence is about which concept in the catalogue.
- **Home task** ("# Home task"): say which main page a page without a home belongs under, and which page is the main
page of a source that has none.
## How to work
1. In your first turn, read every task part named in the prompt, all of them at once. Read nothing else: never read
the pages of the collection, never open source files, never search.
2. In your second turn, write the one JSON file at the output path named in the prompt. Then stop. Do not rewrite or
check what you wrote.
## What a good link is
A link tells a reader that a phrase is about another concept, so they can follow it to learn more. Choose the phrase
by what it means: "keeps the soil moist" can point to a page about watering even though the word "watering" is not in
the sentence. Link only where a reader of the sentence would want to go to that concept. A sentence may have no link.
## What a good home is
A home is the main page under which a reader would look for a page: the topic the page is part of, a tool it is used
with, the procedure it is a step of. Choose by meaning, not by shared words. When no main page in the catalogue is
such a place, say so with `none`: a page without a natural home is reported to the operator, never forced under one.
A main page for a source is the page whose topic is that source's main topic, chosen among the pages that cite it.
## Contract
You add links to sentences of a knowledge collection. Every sentence below has a key. Link by meaning, not by name:
a link says that a phrase in the sentence is about a concept in the catalogue, and the phrase may use other words than
the concept's title.
- Targets: only ids from the catalogue in this task. Never link a page to itself.
- Anchor: a phrase that already stands, character for character, in the sentence, outside backticks. Change no word.
- At most 3 links in one sentence. No lists of related pages and no "see also" lines.
- When nothing in the catalogue fits, put the page id in `none`.
- Output: one JSON object `{"links": [{"page": ..., "sentence": ..., "anchor": ..., "target": ...}], "none": [...]}`,
where `page` is the page file as the task names it, `sentence` is the sentence key and `target` is a catalogue id.
Write it to the output path named in your prompt, then stop.
## Contract (home task)
A main page is the page for the main topic of one docs source. Every other page needs a home: a main page that links
to it in its list of related concepts. The pages and sources below lack one. Decide by meaning, as a reader of the
main page would look for the page.
- For each page under "Pages without a home": choose its home from the catalogue, or a page you name a main page
below, and add {"page": <id>, "home": <id>} to `homes`. When no main page fits, put the page id in `none`: a page
without a natural home is reported, never given a forced home.
- For each source under "Sources without a main page": choose, from the pages listed under it, the page whose topic is
that source's main topic, and add {"source": <path>, "page": <id>} to `main_pages`.
- Output: one JSON object `{"homes": [...], "none": [...], "main_pages": [...]}`. Write it to the output path named
in your prompt, then stop.

13
agents/okf-wiki-merger.md Normal file
View file

@ -0,0 +1,13 @@
---
name: okf-wiki-merger
description: Merge judge for okf-wiki (step 18a). Reads one task of up to eight candidate pairs of pages, each page with its title, its home and its claims with the quotes they rest on, and replies with one line per pair - same concept or not. Give it the path of one task file and nothing else.
tools: Read
model: opus
effort: high
omitClaudeMd: true
---
You are the okf-wiki merge judge. The prompt names one task file. Read that file with the Read tool, and read nothing
else: no other file, no source, no page. For each pair in the task, decide whether the two pages are about the same
concept or not, from the meaning of the claims and the quotes they rest on. The task file holds your instructions and
the pairs; follow its instructions exactly, and reply with one line per pair and nothing else.

12
agents/okf-wiki-reader.md Normal file
View file

@ -0,0 +1,12 @@
---
name: okf-wiki-reader
description: Independent reader for okf-wiki. Judges up to ten claims against the source excerpts each one cites and replies with one verdict line per claim. Give it the path of one rendered task file and nothing else.
tools: Read
model: opus
effort: xhigh
omitClaudeMd: true
---
You are the okf-wiki reader. The prompt names one task file. Read that file with the Read tool, and read nothing else:
no other file, no source, no page. The task file holds your instructions and the claims you judge. Follow its
instructions exactly, and make your reply only what it asks for.

View file

@ -0,0 +1,13 @@
---
name: okf-wiki-repairer
description: Repair helper for okf-wiki. Reads the parts of one repair task, each fragment with its sentences, quotes and source block, and writes one JSON file of answers, each fragment replaced or removed. Give it the part paths and the answer path, nothing else.
tools: Read, Write
model: opus
effort: xhigh
omitClaudeMd: true
---
You are the okf-wiki repair helper. The prompt names the parts of one task and one answer path. Read those parts with
the Read tool, and read nothing else: no other file, no source, no page. The parts hold your instructions and the
fragments you repair. Follow the instructions exactly, write one JSON file to the answer path with the Write tool, and
then hand back only the word done.

11
bin/okf-wiki Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
# okf-wiki MODULE [ARGS...]: run python3 -m okfwiki.MODULE from any folder (the plugin puts bin/ on PATH).
# Paths in ARGS stay relative to the folder the command runs in. No model call (CLAUDE.md rule 1).
if [ $# -lt 1 ]; then
echo "usage: okf-wiki MODULE [ARGS...] (sources, kblocks, kpack, klink, kassemble, audit, claims, reader, view, serve, ...)" >&2
exit 2
fi
root="$(cd "$(dirname "$0")/.." && pwd -P)"
module="$1"
shift
PYTHONPATH="$root${PYTHONPATH:+:$PYTHONPATH}" exec python3 -m "okfwiki.$module" "$@"

41
docs/known-limitations.md Normal file
View file

@ -0,0 +1,41 @@
# Known limitations of v1
The review of v1 (06.11.2026) found 2 BLOCKER and 48 MAJOR findings. Both BLOCKERs and the MAJOR findings that are
defects were fixed, each with a test. The MAJOR findings below were accepted: each one is a gap or a limitation, not
wrong behaviour on the build path, and the reason is given. The finding numbers are the review's own order.
## Guards that work but have no test of their own
The guard exists and was read in the code; what is missing is a test that would catch a regression in it.
| # | Where | Untested guard |
|---|---|---|
| 12 | `gates/answers.py` | breach rules for find actions, `sed -i`, absolute Glob patterns, unparseable Bash |
| 14 | `gates/answerset.py` | gate on the held-out set; the threshold refusal; freeze without `subset_of` |
| 15 | `gates/calibration.py` | the layout's refusal when too few distinct fillers remain; duplicate call names |
| 18 | `gates/repair_gate.py` | the fix-case judgement (diff, excerpts, findings) on a handmade result |
| 27 | `okfwiki/kassemble.py` | refusal of reserved (`index`, `log`) or unsafe concept ids |
| 28 | `okfwiki/kassemble.py` | the stop after an unfinished swap (`.<out>-old` left behind) |
| 31 | `okfwiki/kmerge.py` | the marked write: backup, marker and the recovery stop |
| 34 | `okfwiki/kpack.py` | refusals to overwrite parts, home tasks, logs and the floor file |
| 36 | `okfwiki/krepair.py` | `unknown-key` and `ambiguous-key` refusals in `task` and `fix` |
| 37 | `okfwiki/krepair.py` | `relink --work` and its logged `moved` record |
| 40 | `okfwiki/sources.py` | freeze's refusal of a bad name, a folder and a symlink; some `check` refusals |
## Measurement tooling
| # | Where | Limitation | Why accepted |
|---|---|---|---|
| 13 | `gates/answerset.py`, `gates/multidoc.py` | run from a git worktree nested in the main checkout, a held-out path in the main checkout is not refused | run the answer-set tools from the main checkout |
| 16 | `gates/calibration.py`, `okfwiki/reader.py` | the gate reads the verdicts file twice (the green-run record now has one shared parser) | extra reading, not a wrong result |
| 22 | `okfwiki/cost.py` | user text between an unrecorded message and the next is counted as derived output | it can only raise measured cost, so the cost stop comes earlier, never later |
| 23 | `okfwiki/cost.py` | derived output before the first helper is projected per batch | it can only raise the projection, which is reported, not used to stop |
| 25 | `okfwiki/cost.py` | `cost isolation` takes no list of breaches set aside | the rule that asked for it was removed with the rule cut of 06.11.2026 |
| 26 | `okfwiki/cost.py` | the read and diagnose breach count looks only at Read calls | the reader and diagnoser agents are given the Read tool only |
## Other
| # | Where | Limitation | Why accepted |
|---|---|---|---|
| 3 | git history | three merge commits (62d5438, 73e5bf7, ad63d41) are not Conventional Commits | published history is not rewritten; later merges use `merge(...)` |
| 39 | `okfwiki/reader.py` | when `collect --gate-passed` refuses a model, an older verdicts file at `--out` is left in place | `collect` exits 1, and the skill then runs the calibration gate on that model before anything is scored; deleting the earlier file would destroy a valid reading |

72
docs/rule-decisions.md Normal file
View file

@ -0,0 +1,72 @@
# Rule decisions: the standing rules of `llm-ingestion-okf`
This file decides every standing rule from the old repository's `CLAUDE.md`, one row per rule, as operator decision U8 requires. The old `CLAUDE.md` is **not** carried over. A standing rule in `okf-wiki` exists only if it is listed here as kept or changed; everything else is gone.
Rows follow the inventory of 25.09.2026, § 2 (2.1, 2.2, 2.3): 58 numbered rows (R1–R63 with R15, R24 and R34 absent, R17/R18 and R51–R52 grouped as one row each) plus 4 unnumbered rows. Open inventory rows are settled by the approved plan (`PLAN.md`: § Rammer with format choices (a)–(h), § Ikke i v1, § Leveranser, and the coverage table) and by operator decisions U5–U8.
"Keep" means the substance stays (the wording may be adapted to the new product). "Change" means the substance changes. "Drop" means the rule does not exist here.
| Old rule | Rule (short, paraphrased) | Decision (keep / change / drop) | New wording (if keep or change) | Reason (one sentence) |
|---|---|---|---|---|
| R41 | No model call anywhere in the run path. | change | Shipped tools (auditor, MCP server) never call a language model or Claude Code. Model work happens in the user's own Claude Code session through the skill. | Binding operator rule U8 (1): the ban still holds for the tools, but the old wording no longer describes a product where the session writes the wiki. |
| — (okf never starts Claude Code) | The tool never starts Claude Code. | keep | No shipped tool starts Claude Code or any model process. | Same rule as U8 (1), kept as its own line because it is the one users can check most easily. |
| R39 | Output is bit-exact: explicit timestamps, LF only, golden files compared byte for byte. | change | Bit-exactness applies to the auditor's own outputs (raw-source layer, generated index, reports, HTML view), not to wiki pages. | Wiki pages are written by a model in the user's session and cannot be bit-exact (plan § Rammer). |
| R36 | Exactly one runtime dependency, ever (the guard), enforced by a test. | change | Every runtime dependency is named and justified in the repo. PyYAML is one; the guard is not. | The auditor must read real YAML the way Google's reference does (plan format choice (c)), and screening is an optional report, not a gate (plan coverage table, inventory question 3). |
| R30 | Structured frontmatter is written in YAML flow form, never block form. | drop | — | The session writes frontmatter now, and the auditor reads both forms with a real YAML parser (plan format choice (c)). |
| R31 | Every value must read back the same through a YAML reader; `src/` imports no YAML library. | change | Every frontmatter block must parse as YAML (SPEC § 11). The auditor parses with PyYAML with timestamp resolution off, as Google's reference does. | Parseable YAML stays as a check, while the ban on a YAML import is dropped by plan format choice (c) and inventory question 5. |
| R27 | Format support is additive through profiles; the default profile is OKF v0.1; version value owned elsewhere. | drop | — | The new repo has one profile, OKF v0.2, with the version written quoted on the root `index.md` (U4). |
| R33 | The repo is a black box for its consumers; releases must not change consumer outputs. | drop | — | There are no consumers yet; the rule returns when something depends on `okf-wiki`. |
| R35 | Non-goals: embedding, retrieval layers, verdict machinery, security. | change | Non-goals: shipped tools never write wiki content and never call a model; vector search and knowledge graphs are out of v1; a search index of our own is built only if L4 measures a need. | The old repo built a retrieval layer despite this non-goal, and the plan sets the new limits (plan § Ikke i v1, coverage table item 4, U5). |
| R19 | v1.0.0 is the scope the tool is finished at; later work only fixes defects. | drop | — | The restart replaces it, and "done" is now defined by `PLAN.md` § Ferdig-kriteriet. |
| R25 | Standing posture: only defects, improvements and requested features. | drop | — | `PLAN.md` steers the work. |
| R1 | Implements an ingest spec owned by another repository; spec changes go through that repo. | drop | — | The format is Google OKF v0.2 as published (U4); no external ingest spec applies. |
| R22 | Implementation baseline taken from an earlier project, which is also the first consumer. | drop | — | That baseline and consumer belong to the old purpose (U6: nothing from the old purpose). |
| R23 | Five-phase roadmap, including a second-language port for other repos; halves share contract, not code. | drop | — | `PLAN.md` § Leveranser replaces the roadmap. |
| — (never enumerate a directory) | Nothing enumerates a directory unless the profile says the index is derived. | drop | — | A generated index built from frontmatter must walk the wiki directory. |
| R28 | Rollout is pilot-first; flipping a version alias is the general-availability event. | drop | — | There are no users to roll out to; the rule can return when there are. |
| R29 | No profile hard-codes an upstream version; attestation runtime deferred until upstream specifies it. | change | The OKF version is set in one place and follows upstream (R26). Attestation and attested computation are not built in v1. | We own the choice of v0.2 (U4), and attested computation belongs to the old purpose (U6, plan § Ikke i v1). |
| — (§ 14 references) | Code and docs cite a SPEC § 14 that forbids consumers to reject. | drop | — | That section does not exist in the spec and the code citing it is not ported; conformance references in the new repo cite SPEC § 11. |
| R26 | The tool always supports the latest version of Google OKF. | keep | The repo supports the latest published Google OKF, and upstream is checked at least weekly. | Operator decision U4 and the standard rule in plan § Rammer. |
| R32 | Every upstream release runs the upgrade runbook: pin, read the whole tree and example bundles, classify, measure exposure. | keep | Every upstream release is handled with the upgrade runbook, `docs/upstream-runbook.md`. | It is the mechanism that makes R26 hold (U4). |
| R3 | All file-type-to-text extraction lives in this repo. | keep | All file-type-to-text extraction lives in the auditor. | The auditor alone produces the locked raw-source layer that quotes are checked against. |
| R9 | PDF and Office readers come only through an optional extra; without it such files are refused at once. | keep | PDF and Office readers are an optional install extra; without it those files are refused with a clear error. | The base install stays small and a missing reader fails loudly instead of silently (plan § Rammer, reading rules). |
| R37 | The PDF text library is pinned to one exact version; widening it is a fixture migration. | keep | The PDF text library is pinned exactly; changing the pin is a fixture migration. | The quote check needs the same raw text on every run. |
| R4 | HTML is kept out of the document converter because of CVE-2025-51591; fixes go in the extractor. | keep | HTML is read by our own extractor, never by the document converter; fixes go in the extractor. | The known vulnerability still applies, and HTML is a v1 file type (U6). |
| R5 | Text is preserved exactly, not measured as a percentage. | keep | The raw-source layer preserves source text exactly; preservation is checked as exact, never as a percentage. | Verbatim quote checks at a locator only work on exact text. |
| R6 | Input with a DOCTYPE declaration is refused unparsed, with its own error code. | keep | Input with a DOCTYPE declaration is refused before parsing, with its own error code. | The auditor reads untrusted files, and refusing before parsing keeps that input away from the parser (plan § Rammer, reading rules). |
| R11 | Structured table recovery is out of scope; PDF enters as prose; figures do not survive. | keep | Known limitation in v1: no structured tables, PDF enters as prose, figures are not carried. | Tables, images and figures are a separate later delivery (U6, plan § Ikke i v1). |
| R2 | Recursive walk; source path is relative; collisions refused; dot-directories and nested bundles skipped with a code. | keep | The raw-source layer is built by a recursive walk with relative source paths; collisions are refused; dot-directories and nested wikis are skipped with a code. | Stable, unique source paths are what locators and `sources[].resource` point to. |
| R40 | File names and titles are NFC-normalised. | keep | File names and titles are NFC-normalised. | Filesystems that return decomposed Unicode would otherwise break paths and quote matching. |
| R43 | Network access needs an explicit opt-in per run. | keep | Network access needs an explicit opt-in per run. | The auditor works offline by default, and only named jobs such as the weekly upstream check may use the network. |
| — (remote images) | Remote images are never fetched; no live remote link. | keep | Remote resources referenced in source documents are never fetched, and pages we generate carry no live remote image link. | Reading sources must not reach the network; Google's graph view, shipped unchanged as an add-on, loads its own libraries and is the one noted exception. |
| R21 | Never reimplement security screening; when unsure which side of the boundary something belongs, ask the operator. | keep | Security screening of documents is not reimplemented here; the external guard, when used, runs as an optional report. When unsure where something belongs, ask the operator. | The principle holds even with the guard optional (plan coverage table, inventory question 3). |
| R17/R18 | The gate name is logged; refusals are loud (count, names, way out); a loud message never moves the exit code. | keep | Every refusal states the count, the names and the way out. A warning never changes the exit code; only a failed check does. | Loud refusals are a method rule in plan § Rammer; the old guard-specific mechanism goes with the guard. |
| R12 | Every derived field is named; an unmarked heuristic is worse than none. | keep | Everything generated is marked: `generated.by` for the writer, `verified` only for a human check; the auditor never writes `verified`. | SPEC § 5.2–5.3 carry the principle, and plan format choice (e) says a quote check proves presence, not truth. |
| R13 | Locator keys sit at the top level because the pinned guard rejects extra keys in a `sources` entry. | change | Quote and locator are carried in `x-` prefixed fields; the guard is not a gate on wiki pages, so its key limit does not apply. | No standard field for them exists upstream (plan format choice (g)), and the guard is optional (inventory question 3). |
| R14 | The index is a projection of the whole bundle; a full rebuild equals an incremental update byte for byte. | keep | The generated index is a projection of the whole wiki; a full rebuild and an incremental update give the same bytes. | It keeps the index honest and testable. |
| R47 | Every path assertion runs its pattern against a known-positive case first. | keep | Every pattern or path assertion is first run against a known-positive case. | An empty result only means something when the query is shown to find a known case. |
| R48 | Timestamps default to a shared epoch constant, never the clock. | keep | Timestamps in auditor outputs default to a shared epoch constant, never the clock. | It is what makes R39 hold for the auditor's outputs. |
| R38 | Type checking with `mypy --strict`. | keep | `mypy --strict` passes on all shipped code. | Method rule listed in plan § Rammer. |
| R44 | Conventional Commits; English in code and documentation. | keep | Conventional Commits; English in code and documentation. | Method rule listed in plan § Rammer. |
| R54 | Public tests run on invented material; a gold set is an input, never a constant; a held-out part is kept; ways to game a gate are shared. | keep | Public tests and gates run on invented material; a gold set is an input, never a constant; a held-out part is never used during development; known ways to game a gate are written down and tested. | The plan holds back 20 questions and tests the auditor against mutants (plan § Styrke og regime, § Leveranser E); the retired corpus track itself is not carried. |
| R55 | A check with no measured threshold is never PASS. | keep | A check with no measured threshold never reports PASS. | Method rule listed in plan § Rammer. |
| R59 | TDD: no production code without a failing test first. | keep | No production code without a failing test first. | Method rule listed in plan § Rammer, and the evals are written red first (plan § Leveranser E). |
| R60 | Public repo; STATE and the startup prompt stay local; no secrets; no marketing language. | keep | STATE and session prompts stay local, there are no secrets in the repo, and there is no marketing language. The repo starts private; making it public is the operator's decision. | Binding operator rule U8 (2); the private start comes from U9. |
| R61 | Consumer content only at form level in public files; Anthropic-derived prose is not published. | keep | Prose derived from Anthropic documentation is never published: the Claude Code documentation test set and its question sets stay local, and only their form is published. | Binding operator rule U8 (3). |
| R62 | Push to Forgejo after each commit; never GitHub. | keep | This repo is hosted on Forgejo only, pushed after each commit, never on GitHub. | Binding operator rule U8 (4); reading Google's upstream repository for the weekly check is not hosting. |
| R63 | Links to local files are written as named `file:///` links. | keep | Links to local files are written as named `file:///` links. | The operator opens files by clicking, not by reading paths (plan § Rammer, method rules). |
| R7 | A document with no structure yields zero plans and a failed build. | drop | — | Segmentation is gone. |
| R8 | Extractor registries are coupled to the segmentation registry. | drop | — | Segmentation is gone. |
| R10 | Converter attribute in titles; renaming concept ids is an operator question. | drop | — | Concept ids from segmentation are gone; page names come from the skill. |
| R16 | Door C: verbatim merge, ownership through content identity. | drop | — | The merge path is gone; the skill chooses existing pages before writing new ones (plan § Leveranser L2). |
| R20 | A fenced code block declares no structure (CommonMark details). | change | When the auditor parses wiki pages for headings, claims and links, text inside a fenced code block declares no heading and no link, following CommonMark. | Criterion 1 excludes headings from the claim count, so the auditor must find headings correctly (plan § Ferdig-kriteriet). |
| R45 | The project command is byte-equal to the build command; only a gate flag moves bytes. | drop | — | Both commands belong to the old pipeline. |
| R46 | The generated consumer skill has three modes (question, hypothesis per premise, document) with fixed markers and relative paths. | change | The skill's question part answers a question, a hypothesis per premise (confirmed, refuted, or not enough evidence in the wiki), or a document request, always citing page and source with relative paths. | The idea moves into the new skill's question part (plan § Leveranser L2, coverage table D6); the old code is not ported. |
| R49 | Ten segmentation rules on by default, more behind flags. | drop | — | Segmentation is gone. |
| R50 | PDF reader flags; OCR is an optional group, never a runtime dependency. | change | OCR is an optional install group, never a runtime dependency. A PDF page without a text layer is reported as an exception in the auditor's output. | OCR stays optional, and plan § Ferdig-kriteriet requires every exception to be stated with a reason; the old flags go with the old reader. |
| R51–R52 | Image path limits, standard-library decoder, image library rejected; every carried image can be shown to a model. | drop | — | Images are not in v1 (U6, plan § Ikke i v1, coverage table item 4). |
| R53 | Content accounting: the witness imports no package module; a mutation harness is a gate; opt-in. | change | Content accounting is not built in v1. The method stays: every check is tested against mutants, and a check's witness does not import the code it judges. | Accounting is out of v1 (coverage table item 4), while the mutant method is the core of the eval delivery (plan § Leveranser E). |
| R56 | MCP server: standard-library JSON-RPC to avoid a second dependency; no caching between calls; path containment with two independent checks; the form is the operator's choice. | change | The MCP server is read-only: it serves lookups of pages, index and sources across several wikis, never writes, caches nothing between calls, and confines every path to the wiki root with two independent checks. New dependencies follow R36. | U5 decided the form (server, read-only, several wikis), which settles the open choice. |
| R57 | The server is the standard way in and the skill is the supplement; a derived card is never written. | change | Server and files are both ways in: the MCP server serves lookups, plain file search always works beside it, and the skill writes. The server stays only if it measurably helps on cross-document or cross-wiki questions; otherwise it is simplified. | U5 answered the operator's choice with "both" (coverage table, inventory question 2) and set the measure (plan § Leveranser L4, L5); the card concept is gone. |
| R58 | BM25 ranking is the default, with lookup flags. | drop | — | BM25 is used only if L4 shows a need (coverage table item 4). |
| R42 | Credentials only as environment-variable references. | drop | — | There are no connectors in v1 (U6: database and network connectors are out), and "no secrets" is covered by R60. |
62 rules: 29 kept, 13 changed, 20 dropped

117
docs/upstream-runbook.md Normal file
View file

@ -0,0 +1,117 @@
# Upstream OKF upgrade runbook
Rule R26 (`docs/rule-decisions.md`): this repository supports the latest published Google Open Knowledge Format, and
upstream is checked at least weekly. Rule R32: every upstream release is handled with this runbook. `CLAUDE.md`
§ The standard: `SPEC.md` at the pinned commit is the source of truth.
A standing policy without a procedure is an intention. Each step below names the failure it prevents; each of those
failures happened in an earlier round of the same work, not in theory.
## Trigger
The morning job (`tools/upstream_watch.py`, daily at 07:15) sends a coord message when canonical has moved past our
pin in a path that bears the contract, and when issues or pull requests are new or changed. The message is the trigger
to run this runbook, never its result: the job sees commits, numbers and times, not meaning.
Run the runbook also without a message when a session reads upstream for another reason and finds a change. Record the
result in `PLAN.md § Logg` **even when nothing changed**: an unrecorded check cannot be told from a skipped one.
The canonical home is `GoogleCloudPlatform/open-knowledge-format`. Our pin is `PIN` in `tools/upstream_watch.py`.
## Step 1: pin before reading anything
Record the exact commit SHA you are about to read, and read everything at it.
*Prevents:* reading a moving branch and treating the result as fact. Two readers of `main` are one unstable reference
read twice, and a spec edited after a migration commit makes "the migration commit" and "the current spec" two
different objects.
## Step 2: enumerate the whole repository tree
List every file at the pinned commit before deciding what to read, starting at the root:
git ls-tree -r --name-only <sha> | awk -F/ '{print $1}' | sort -u # top-level entries
git ls-tree -r --name-only <sha> | sed 's/.*\.//' | sort | uniq -c # kinds of file
*Prevents:* assuming the folder you know is the one that matters. A negative claim from a partial enumeration ("there
is no validator upstream") reads exactly like a measured one, and was wrong when it was last made.
## Step 3: read the shipped example bundles, not only the normative text
A spec says what is permitted; an example shows what upstream emits. Read the bundles upstream ships under the pinned
commit at byte level: check for a BOM, the final newline, and whether a value is quoted. A fetch that converts to
markdown or summarises destroys exactly those three properties.
*Prevents:* freezing a page shape that conforms to the text but not to what upstream's own tools write. Earlier rounds
learned from the examples, not the spec, that the root `index.md` carries no frontmatter, that `generated` is written
for human-authored content too, and that real frontmatter is block YAML with nested mappings.
## Step 3a: run upstream's own reader against our pages
The reference reader (`src/reference_agent/bundle/document.py` at the last pin) imports only `yaml`. Run it from the
pinned clone, without installing anything, over a built collection and over the mutant gate's known-positive bundle
(`gates-local/mutants/`), and record per page:
1. `OKFDocument.parse()` accepts the bytes (it takes the text only).
2. The values arrive as the shapes we intend: `generated` a mapping, `sources` a list of mappings, and our `x-` fields
as the types `docs/x-fields.md` gives them. Record the type each value arrives as, not only that it parsed.
3. `validate()` passes. It checks one key (`type`), so a green `validate()` alone is not "upstream accepts the page".
4. Upstream's semantic readers (`trust_tier`, `normalize_verified`, `is_stale`) run over the frontmatter mapping, not
the document, without raising.
**A clean sweep is worth nothing until the harness is shown able to fail:** feed it a page with `type: [unclosed` and
confirm it raises before you report the zeroes. Google's viewer is the second outside reader: criterion 5 requires it
to read every collection without an error.
## Step 4: classify the diff
From the spec's own "Changes from vN" section plus the evidence of steps 3 and 3a, put every change in one class:
- **Breaking:** name it, and measure our exposure in step 5.
- **Additive:** new optional fields, new conventional headings.
- **Deferred upstream:** a format specified but its runtime left to a later revision. Out of scope on upstream's
deferral, not on our preference.
- **Observed but undocumented:** present in an official bundle, absent from the spec sections read. Recorded as open;
never promoted silently to another class.
- **Tightened in place, no version bump:** the text narrows what a key may hold under the same version number. A value
that conformed last round does not conform now, so "conformant with v0.2" must name the spec commit too.
## Step 5: measure our exposure
For every change the diff touches, search the code that writes and checks pages and cite `file:line`: the auditor
(`okfwiki/audit.py`), the assembly and link code (`okfwiki/kassemble.py`, `okfwiki/klink.py`), the skill
(`skills/okf-wiki/SKILL.md`), the `x-` field list (`docs/x-fields.md`), the gates under `gates/` and their cases under
`gates-local/`. Never reason about a key set; measure it.
Where upstream now has a standard field for something we carry in an `x-` field, the `x-` field moves to it
(`CLAUDE.md` § The standard). That is a format change: it is proposed to the operator with the measurement, and it is
his decision.
There are no consumers of this repository yet (R33 is dropped). When something depends on `okf-wiki`, add a step
here that tells each consumer what changed and lets them measure their own exposure.
## Step 6: move the pin
Only after steps 1 to 5 are written down:
1. Change `PIN` in `tools/upstream_watch.py` and the test that holds it (`tests/test_upstream_watch.py`), test first.
2. Run the three test suites, `mypy --strict`, the mutant gate (`gates/README.md`) and the check against Google's
viewer, and record the numbers.
3. Write the pinned commit, the classified diff, the measured exposure and every correction in `PLAN.md § Logg`. A
claim withdrawn is only safely withdrawn where the claim was written.
Moving the pin resets what the morning job counts as already announced, because everything behind the new pin has
been absorbed.
## What the morning job cannot see
- **Meaning.** When upstream tightened v0.2 in place, a watch on `SPEC.md` fires correctly, but no commit list says "a
value that conformed last month does not conform now". The message therefore always says "run the runbook", never
"here is your exposure".
- **A silent relocation.** The last move of the repository was announced in a `README.md` commit, which is why
`README.md` is not on the quiet list. A move announced anywhere else is invisible to the job.
- **A tightening with no commit:** a changed reference implementation shipped elsewhere, or errata outside the
repository. Reading upstream, as this runbook does, is the only cover.
The job narrows the window between an upstream change and our noticing it. It does not close it: a quiet morning is not
proof that upstream is unchanged.

37
docs/x-fields.md Normal file
View file

@ -0,0 +1,37 @@
# x- fields
okf-wiki writes a few frontmatter keys of its own. SPEC § 4.1 allows them ("Producers MAY include any additional
keys"), and format choice (g) in `PLAN.md § Rammer` puts quote and locator in `x-` keys because no upstream proposal
offered a standard field. Criterion 5 asks that every `x-` field has a measured reason in the repository, so the reason
stands here, in the table, with its measurement and its number: why the standard does not hold, and where a field could
move if Google adopts one.
How the rows were found (wave 2 order 7, 09.10.2026): `grep -oE '\bx-[a-z][a-z0-9-]*'` over `okfwiki/` and `skills/`
(the fields the code and the skill write or read; `tests/test_x_fields.py` keeps this table equal to that list), and the
`x-` keys on the pages of the built collections on the bench (P1's K, 212 pages; the L2b and L4 slices, 151 pages
each). SPEC is read at the pinned commit `ad30107`, where `grep -oi` counts the words named below.
`tools/x_fields_check.py BUNDLE` fails when a page carries an `x-` field with no row, at another place than its row
says, or with the status "not in v1", and when a row has no reason or a reason with no number in it besides
references (section, issue and point numbers, names such as K2, dates, commit ids).
| Field | Where | Status | Written by | Read by | Meaning | Measured reason | Standard field if Google adopts one |
|---|---|---|---|---|---|---|---|
| `x-quote` | sources[] | v1 | okfwiki/kassemble.py | okfwiki/audit.py, okfwiki/claims.py, okfwiki/view.py; the skill | The words, copied character for character, from the source line the claim rests on. | SPEC § 5.1 names 7 keys for a sources entry (resource, id, title, author, usage_count, last_modified, usage_window) and the word "quote" stands 0 times in SPEC.md, so the standard cannot hold the verbatim support criterion 1 asks for. On P1's K 895 of 895 entries carry one, and the auditor finds each at its locator (mutant gate: m03 quote-not-verbatim caught). | A quote or excerpt key on a sources entry; none proposed upstream (survey of 26.09, issues #8-#32). |
| `x-locator` | sources[] | v1 | okfwiki/kassemble.py | okfwiki/audit.py, okfwiki/claims.py, okfwiki/view.py; the skill | Where the quote stands in the raw source: `{ line: N }`, and for a PDF or Office source also its place in the original, `page`, `paragraph`, `sheet` and `cell`, or `slide` and `notes` (the locators of the file-type gate), which the auditor checks against the frozen copy's `places`. A spreadsheet row is one line, so `cell` is the cell the quote covers, or a range (`B5:C5`) when it covers more; the auditor checks that it lies in that row. | "locator" and "line number" stand 0 times in SPEC.md, and § 6.2 says nothing of fragments, so the line cannot go into `resource`. Criterion 1 checks the quote on that line: 895 of 895 entries on P1's K carry one, 664 of 664 claims cited (mutant gate: m04 quote-wrong-locator caught). | A locator key on a sources entry; none proposed upstream. |
| `x-span` | sources[] | v1 | okfwiki/kassemble.py | none in okfwiki/ (the trial's measure reads it) | First and last line of the source block the fragment was written from: `[start, end]`. | "span" stands 0 times in SPEC.md, and `x-locator` names one line. A claim can draw on more lines than the one it quotes: P1's precision count, read from this field, put 59 of 650 fragment entries on a span of more than one line and 591 on one line. | A locator range on a sources entry; none proposed upstream. |
| `x-provenance` | sources[] | v1 | okfwiki/kassemble.py | okfwiki/audit.py (counted per value); wave 2 order 9 selects the claims to read by it (K6) | How the claim follows from its quote: `documented`, `inferred` or `merged`. | In SPEC "provenance" (12 times) is the list of sources only, and § 5.1 puts deeper lineage "out of scope for v0.2": 0 of the 7 entry keys says how a claim follows from its source. 59 of 650 fragments on P1's K rest on more than their quoted line; criterion 2 reads every claim marked inferred or merged on the rest of collection 1, plus a sample of at least 300. | A per-claim derivation key, if a later version brings lineage into scope. |
| `x-merge-candidate` | page | v1 | okfwiki/kassemble.py | none in okfwiki/ (the trial's measure reads it) | The id of an existing concept whose name is close enough (word Jaccard of 0.6 or more, `kpack.MERGE_JACCARD`) that this page may duplicate it. | "merge", "duplicate" and "alias" stand 0 times in SPEC.md, so a page cannot say that it may be another page. P1's K built 3 duplicate pages among 212 (title Jaccard), with 0 flagged. | A same-as or alias relation between concepts; none proposed upstream (#16, #22 and #30 move toward stable ids). |
| `x-main-for` | page | v1 | okfwiki/kassemble.py, from the model's choice of main page (wave 2 order 10) | okfwiki/audit.py (contract K2) | The sources, as `/` + their K1 path, this page is the main page for. | "main page" stands 0 times in SPEC.md, and § 4.1 `resource` is one URI for the asset a concept describes, not the documents it is the main page for (K2 point 8). The frozen copy's K1 lists 195 documentation sources with `main_topic: true`, each needing exactly one main page; the mutant gate holds 11 cases for the rule, matched 11 of 11. | A key naming the documents a concept is the main page for; none proposed upstream (K2 point 8). |
| `x-aliases` | page | v1 | okfwiki/kassemble.py, from the build's catalogue (`WORK/K-work/index.json`), where okfwiki/kmerge.py puts the name of each page merged in | okfwiki/serve.py (through the index line, where the names end the entry as ` (also: A; B)`), okfwiki/view.py | The concept's other names, in the catalogue's order: each alias that is not the title, once, with case set aside. | "alias" stands 0 times in SPEC.md, and § 4.1 `tags` are "short strings for cross-cutting categorization", not names of the concept. After the merge of collection 1 (12.11.2026) 48 of 118 merged pages carried a longer name than one that went into them, and the 171 names of the pages merged in stood on no page, in no index line and in no search: only in the build's catalogue. | An alias or same-as key on a concept; none proposed upstream (#16, #22 and #30 move toward stable ids). |
| `x-outdated` | page | not in v1 | none in v1 (the skill marks an outdated claim in the text, not in a field) | okfwiki/view.py (`versions`: a sentence citing an outdated pair is dated history) | Pairs of footnote labels `{ old, new }`: the old claim is outdated by the new. | "outdated" stands 0 times in SPEC.md, and "supersede" 3 times, each about SPEC's own versions (§ 13). On the L4 slice 6 pairs on 4 of 151 pages kept 12 sentences of dated history out of the count of version numbers in running text (PLAN.md § Logg, 28.09; rewriting sentences, not the pairs, brought that count to 0). Outdated-marking is not in v1 (`CLAUDE.md`), so a v1 page with it fails the check. | `supersedes` (#22, open), format choice (h). |
Seen only on the pages of P1's trial, never written by v1 code (grep over `okfwiki/` and `skills/`: 0 hits each), so a
v1 page with one fails the check: `x-fragments` (on 212 of 212 pages of P1's K) and `x-quote-by` (on 160 of its 895
source entries). They are written by the trial code in `evals/p1/`, as was the trial's own `x-aliases` (on 212 of 212
pages), which is not the field in the table.
`x-disputed` (pairs of labels whose sources contradict each other) stood in the skill until wave 2 order 10, which
marks a dispute in the text and its quotes instead, with no frontmatter field (`skills/okf-wiki/SKILL.md`, "When sources
disagree"). It had 0 uses: 0 of 151 pages in the L2b and L4 slices and 0 of 212 on P1's K. With no row, a page that
carries it fails the check.

120
evals/README.md Normal file
View file

@ -0,0 +1,120 @@
# evals
## Direction probe (R)
`direction_probe.py` sets up and scores the direction probe: three arms answer the same questions from the same sources.
It calls no model. The answering is done in the user's own session, by one isolated subagent per question per arm.
- `filsok`: file search alone over the sources in the cut.
- `wiki`: the okf-wiki plus file search, following the skill's router (`index.md`, the pages, the raw source at `x-locator`).
- `astro`: a wiki built with Astro-Han's `karpathy-llm-wiki` skill (MIT) on the same sources, following its Query steps.
```
python3 evals/direction_probe.py fetch-astro --sources <source dir> --cut-manifest gates/wholedoc.manifest.json \
--project <astro project OUTSIDE the repository> --topic <topic> --collected <YYYY-MM-DD>
python3 evals/direction_probe.py setup --run <run dir> --arm <filsok|wiki|astro> --sources <source dir> \
--cut-manifest gates/wholedoc.manifest.json --md-set gates-local/multidoc/set-60.json --md-ids d01,d02,... \
--wd-set gates-local/wholedoc/set-12.json [--wiki <okf-wiki bundle>] [--astro <astro project>]
python3 evals/direction_probe.py collect --run <run dir> --arm <arm>
python3 gates/multidoc.py gate ... --answers <run>/answers/<arm>.md.json --out <run>/results/<arm>.md.json
python3 gates/wholedoc.py gate ... --answers <run>/answers/<arm>.wd.json --out <run>/results/<arm>.wd.json
python3 evals/direction_probe.py harvest --run <run dir> --transcripts <subagent transcript folder>
python3 evals/direction_probe.py score --run <run dir> --arms filsok,wiki,astro --md-ids d01,d02,...
```
- **setup** copies each arm's basis into its own folder, so no arm can read another's. It writes one task file per
question with the question, the search rules and the answer format, and never the key, the evidence or the count.
Search runs through read-only Bash, because the subagents have no Grep or Glob tool. Every command starts with
`cd <basis> &&` and uses a fixed list of read-only tools.
- **harvest** sums every usage field in each task's transcript, counting each message id once, and names every tool
call that breaks the task's rules. A breach is a fact to report, not a verdict: `echo` between two greps breaks the
rule without reading anything outside the basis.
- **score** filters the unchanged gates' per-question results to the probe questions. It reports per arm and group
(multi-document, whole document, counting), compares every pair of arms, and gives the exact McNemar p. A missing
result file is a failure, not a zero.
Everything the run produces (bases, tasks, answers, results) derives from the corpus and stays outside the repository
(CLAUDE.md rule 3). Tests: `python3 -m unittest discover -s evals/tests`. Types: `mypy --strict evals`.
## v1-k step 9: semantic links measured on P1's pages (SC13)
The link pass of the v1 plan run on a stripped copy of the P1 trial's K bundle (212 concept pages, 307 links reduced to
their anchor text, link rule 0 of 212 before the run). Cost line 7 M tokens for `link` + `orchestration-build`; the stop
check runs after every pass. Output stays outside the repository (`~/okf/benk/wiki/v1/lenkemaaling/`, rule 3).
**Result: STOP after pass 1 of 5.** Measured 1,754,187 tokens at the check; flat projection 8,770,935 × 1.10 = 9,648,029
of 7,000,000. Passes 2–4 and the closing pass were not run, and nothing was rerun.
| Number | Value |
|---|---|
| Pages with an inbound link (link rule) | 71 of 212 after pass 1 (pass 1: 71; passes 2–4 and closing: not run) |
| Misplaced / broken / not to a concept page | 0 / 0 / 0 |
| Max out-degree | 10 |
| Links accepted / rejected | 304 / 0 (no reason hit) |
| "none" answers | 9 of 104 pages |
| Link agents | 2 (311 + 39 sentences, 91 + 13 pages), 3 turns each, start-up 47,303 each |
| `link` | 486,256 + margin 0.10 = 534,882 (1,389 per sentence, 4,676 per page tasked) |
| `orchestration-build` at the result | 1,849,940 over 18 turns (102,774 per turn); input per turn 80,564 + 2,255 × turn |
| Catalogue share of link input | 5,063 characters ÷ 2.5 × 3 turns ≈ 6,076 per agent (computed from size, not fitted) |
Projection to collection 1 (~120 packs), orchestration at the measured `a + b × turn` restarted every session:
| Turns per pack | 20 turns per session | 40 | 80 |
|---|---|---|---|
| 4 (480 turns) | 50.0 M | 60.9 M | 82.5 M |
| 5 (600 turns) | 62.5 M | 76.1 M | 101.3 M |
Link for collection 1: ~20,900 sentences (664 per 19 sources × 599) × 1,355 per sentence without the catalogue ≈ 28.4 M,
plus a ~3,500-line catalogue (~170,000 characters at P1's 48.7 per line, ≈ 68,000 tokens) × 3 turns per agent ×
≥ 120 agents ≈ 24.5 M. That catalogue alone is over the 60,000-character part limit, so `klink task` cannot run on it
without a split or filter. Build 21.9–52.8 M + link ≈ 53 M + orchestration 50.0–101.3 M = 125–207 M, above 60 M.
Bias: P1's pages are final versions, not per-pack states; one run (n = 1); the linker ran as a general-purpose agent
with the linker's instructions verbatim (the session started in the main checkout, where `okf-wiki-linker` is not
defined), so its start-up of 47,303 is above the ~18.6 k assumed for the linker type; pass 1 carries the session's
start-up turns, which makes the flat projection high for passes 2–5, while the closing pass (4.36 M characters on a
fully stripped K) is not in it.
## v1-k step 9b: semantic links measured with the cost cuts, collection 1 re-projected
Step 9 continued on the same output (pass 1 kept): packs 2–4 as ONE interval (`klink pass-before --pack 2 --to 4`
without `--catalogue`, three linkers spawned in one turn, one `klink pass-after`), cost line 7 M tokens for `link` +
`orchestration-build` counted on this step only: the stop check read a copy of the session's main transcript from the
step's start marker on, because the session had first carried another order.
**Result: STOP before the closing pass (pass 5).** After packs 2–4 the stop line said continue (measured 3,396,621;
flat 4,528,828 × 1.10 = 4,981,711 of 7,000,000), but the closing pass's tasks are 19 parts of 1,114,516 characters
(5,582 candidate sentences for 87 pages without an inbound link). At this step's measured cost per linker and per
orchestrating turn that is ~5 M + ~1 M, over the line, so it was not spawned.
| Number | Value |
|---|---|
| Pages with an inbound link (link rule) | 125 of 212 (pass 1: 71; packs 2–4: +54; closing: not run) |
| Misplaced / broken / not to a concept page | 0 / 0 / 0 |
| Max out-degree | 11 |
| Links accepted / rejected | 270 / 0 in packs 2–4 (574 / 0 in all) |
| "none" answers | 38 in packs 2–4 (47 in all) |
| Link agents | 3 (87, 108, 119 sentences; 21,511–31,725 characters), 3 turns each, start-up 47,705 each |
| `link` | 658,909 (2,098 per sentence; 214,054–228,310 per agent) |
| `orchestration-build` at the result | 2,737,712 over 11 turns; input per turn 237,548 + 1,768 × turn |
| Catalogue filter (step 9.2) on P1 | pools 146 / 174 / 212, nothing cut (largest 8,437 characters) |
| Price of the filter at collection 1's budget | 568 of 574 accepted links stay possible (6 cut: targets far back and not among the most cited) |
Projection to collection 1 (~120 packs, ~20,900 sentences), orchestration at a = 80,564 (step 9, a fresh session)
and b = 1,768 (this step), 5 turns per interval of k packs plus 4 per session; link = 105 parts × 3 turns ×
(47,705 + 60,000 / 2.5) + 434 per sentence (measured residual) ≈ 31.7 M; build 21.9–52.8 M:
| k packs per interval | 20 packs per session | 40 packs per session |
|---|---|---|
| 5 | 68.3–99.2 M (× 1.10: 75.2–109.2) | 69.4–100.3 M (76.4–110.4) |
| 10 | 61.4–92.3 M (67.6–101.6) | 61.0–91.9 M (67.1–101.0) |
| 20 | 58.4–89.3 M (64.2–98.2) | 57.5–88.4 M (63.3–97.2) |
The closing pass is not in these sums: on P1 its candidate rule (every sentence citing an orphan's source file)
already gives 1.1 M characters, and it grows with the collection. The upper end rests on the build's growth model
(52.8 M, 4 points, not validated).
Bias: P1's pages are final versions, not per-pack states; one run (n = 1); the linkers ran as general-purpose agents with
the linker's instructions verbatim (start-up 47,705; the `okf-wiki-linker` type is not defined in the main checkout
where the session started), and at least one used a script to check its own anchors; a was measured in a session that
was not fresh (238 k at its first turn), so a from step 9 is used; b is measured with an interval of 3 packs.

540
evals/direction_probe.py Normal file
View file

@ -0,0 +1,540 @@
"""The direction probe R (PLAN.md § Leveranser, row R): three arms answer the same questions from the same sources.
filsok file search alone over the sources in the cut
wiki the okf-wiki plus file search, following the skill's router (index.md, the pages, the raw source)
astro a wiki built with Astro-Han's karpathy-llm-wiki skill on the same sources, following its Query steps
Each question is answered by one isolated subagent per arm in the user's session. This module never calls a model:
fetch-astro the skill's Fetch step done mechanically: each source copied byte-exact under the raw template's
header into <project>/raw/<topic>/<name> (the sources are local, clean Markdown already)
setup one arm's basis (a copy, so no arm reads another's folder) and one task file per question, which
carries the question and never the answer key, the evidence or the count
collect the per-question answer files into the answers files the gates read
harvest tokens (every usage field, each message id once) and isolation breaches from the transcripts
score the gates' per-question results for the probe questions only: per arm and group, and in pairs
The gates are run unchanged (`gates/multidoc.py gate`, `gates/wholedoc.py gate`, each with --out).
"""
from __future__ import annotations
import argparse
import json
import os
import re
import shlex
import shutil
import sys
from itertools import combinations
from math import comb
from pathlib import Path
from typing import Any
ARMS = ("filsok", "wiki", "astro")
GROUPS = ("flerdokument", "helt dokument", "telling")
MD_SCHEMA = "okf-wiki/multidoc-set/1"
WD_SCHEMA = "okf-wiki/wholedoc-set/1"
ALLOWED_TOOLS = ("Read", "Grep", "Glob", "Bash", "Write", "SubagentHandback")
READ_ONLY = ("grep", "egrep", "fgrep", "rg", "find", "ls", "wc", "head", "tail", "sed", "cat", "sort", "uniq", "cut",
"tr", "nl")
SEPARATORS = ("|", "&&", ";", "||")
FIND_ACTIONS = ("-exec", "-execdir", "-ok", "-okdir", "-delete", "-fprint", "-fprint0", "-fprintf", "-fls")
USAGE_FIELDS = ("input_tokens", "cache_creation_input_tokens", "cache_read_input_tokens", "output_tokens")
class ProbeError(Exception):
"""The command cannot run; reported as FAIL with exit 1."""
def load_json(path: Path) -> Any:
try:
return json.loads(path.read_text(encoding="utf-8"))
except (OSError, UnicodeDecodeError, json.JSONDecodeError) as exc:
raise ProbeError(f"cannot read {path}: {exc}") from exc
def write_json(path: Path, data: Any) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(json.dumps(data, ensure_ascii=False, indent=1) + "\n", encoding="utf-8")
def copy_names(sources: Path, names: list[str], target: Path) -> None:
target.mkdir(parents=True, exist_ok=True)
for name in names:
src = sources / name
if not src.is_file():
raise ProbeError(f"source {src} is missing")
shutil.copyfile(src, target / name)
# ---------------------------------------------------------------------------------------------- fetch-astro
def fetch_astro(sources: Path, names: list[str], project: Path, topic: str, collected: str) -> list[Path]:
"""The Fetch step of karpathy-llm-wiki, per its raw template, with the source text preserved byte-exact."""
folder = project / "raw" / topic
targets = [folder / name for name in names]
existing = [str(t) for t in targets if t.exists()]
if existing:
raise ProbeError(f"raw files exist already and are never overwritten: {', '.join(existing)}")
folder.mkdir(parents=True, exist_ok=True)
for name, target in zip(names, targets):
src = sources / name
if not src.is_file():
raise ProbeError(f"source {src} is missing")
header = (f"# {Path(name).stem}\n\n> Source: kilde/{name}\n> Collected: {collected}\n"
"> Published: Unknown\n\n")
target.write_bytes(header.encode("utf-8") + src.read_bytes())
return targets
# ---------------------------------------------------------------------------------------------- setup
SEARCH = {
"filsok": """BASIS holds the source files and nothing else. Search them with grep and find (Bash, as above), and read
what you find with Read.""",
"wiki": """BASIS holds `wiki/`, a knowledge wiki compiled from the sources, and `kilde/`, the source files. A page
names its source as `/kilde/<name>`, which is the file `BASIS/kilde/<name>`. Follow this order:
1. Read `BASIS/wiki/index.md` first.
2. Read the pages the index points to.
3. Open the raw source behind a footnote (`resource` at `x-locator`) when the quote has to be checked or when the
page does not say enough.
You may also search `wiki/` and `kilde/` with grep and find (Bash, as above) at any point.""",
"astro": """BASIS holds `wiki/`, a knowledge wiki compiled from the sources with the karpathy-llm-wiki skill, and
`raw/`, the source files it was compiled from (each raw file starts with a short metadata header; the source text
follows it unchanged). Follow the skill's Query steps:
1. Read `BASIS/wiki/index.md` to locate candidate articles, then full-text search `wiki/` with the topic's key terms
and their synonyms (grep through Bash, as above).
2. Read the articles you found and synthesize an answer.
3. Prefer wiki content over your own training knowledge.
Each article links the raw files it was compiled from in its `Raw` field. Open those raw files when you need an exact
value or a verbatim quote.""",
}
CITE_NAME = {
"filsok": "the bare name of a source file in BASIS",
"wiki": "the bare name of a source file in `BASIS/kilde`",
"astro": "the bare name of a raw file in `BASIS/raw/<topic>/`",
}
def render_task(arm: str, basis: Path, qid: str, question: str, is_count: bool, answer_path: Path) -> str:
count_line = '"count": <integer>, ' if is_count else ""
count_rule = ("\n- `count`: the number the question asks for, as a JSON integer. Say in `answer` how you counted."
if is_count else "")
return f"""# Answer one question
BASIS: `{basis}`
You answer ONE question from the files in BASIS. Read nothing outside BASIS apart from this task file: no other
folder, no web, no earlier work. Answer only from what the files say, and say plainly when they do not say something.
Tools: Read (a file inside BASIS), Bash for read-only search, and Write once, for the answer file. No other tool.
Every Bash command starts with `cd {basis} && ` and then uses only {', '.join(READ_ONLY)}, joined by `|` or `&&`,
with paths relative to BASIS: never `..`, `~` or a path outside BASIS, no `$` expansion, no output redirection except
`2>/dev/null`, no `find -exec` or `-delete`, no `sed -i`. For example: `cd {basis} && grep -rn "term" .`
## How to search
{SEARCH[arm]}
## The question
{question}
## The answer
Write one JSON file to `{answer_path}`:
```json
{{"id": "{qid}", "answer": "<your answer in prose>", {count_line}"citations": [{{"file": "<name>", "quote": "<text>"}}]}}
```
- `answer`: answer every part of the question.{count_rule}
- `citations`: one or more per source file your answer relies on, and cite every such file.
- `file`: {CITE_NAME[arm]}, for example `notes.md`: never a path and never a wiki page.
- `quote`: text copied character for character from that file (only whitespace may differ), long enough to carry
the fact, for example the whole line or sentence.
When the file is written, reply with the one word `done`.
"""
def probe_questions(md_set: Path, md_ids: list[str], wd_set: Path) -> list[tuple[str, dict[str, Any]]]:
md, wd = load_json(md_set), load_json(wd_set)
if not isinstance(md, dict) or md.get("schema") != MD_SCHEMA:
raise ProbeError(f"{md_set} is not a set with schema {MD_SCHEMA}")
if not isinstance(wd, dict) or wd.get("schema") != WD_SCHEMA:
raise ProbeError(f"{wd_set} is not a set with schema {WD_SCHEMA}")
by_id = {q["id"]: q for q in md["questions"]}
missing = [i for i in md_ids if i not in by_id]
if missing:
raise ProbeError(f"probe ids missing from {md_set}: {', '.join(missing)}")
return [("md", by_id[i]) for i in md_ids] + [("wd", q) for q in wd["questions"]]
def setup_arm(run: Path, arm: str, sources: Path, names: list[str], md_set: Path, md_ids: list[str], wd_set: Path,
wiki: Path | None = None, astro: Path | None = None) -> list[Path]:
if arm not in ARMS:
raise ProbeError(f"unknown arm {arm!r}; the arms are {', '.join(ARMS)}")
if arm == "wiki" and wiki is None:
raise ProbeError("the wiki arm needs --wiki")
if arm == "astro" and astro is None:
raise ProbeError("the astro arm needs --astro")
questions = probe_questions(md_set, md_ids, wd_set)
basis = run / "arms" / arm
if basis.exists():
raise ProbeError(f"{basis} exists already; an arm is set up once, from fresh")
if arm == "filsok":
copy_names(sources, names, basis)
elif arm == "wiki" and wiki is not None:
shutil.copytree(wiki, basis / "wiki")
copy_names(sources, names, basis / "kilde")
elif astro is not None:
shutil.copytree(astro / "raw", basis / "raw")
shutil.copytree(astro / "wiki", basis / "wiki")
tasks = []
for group, q in questions:
key = f"{group}-{q['id']}"
task = run / "tasks" / arm / f"{key}.md"
answer = run / "answers" / arm / f"{key}.json"
task.parent.mkdir(parents=True, exist_ok=True)
task.write_text(render_task(arm, basis, q["id"], q["question"], q.get("type") == "count", answer),
encoding="utf-8")
tasks.append(task)
(run / "answers" / arm).mkdir(parents=True, exist_ok=True)
return tasks
# ---------------------------------------------------------------------------------------------- collect
def collect(run: Path, arm: str) -> tuple[Path, Path, list[str]]:
"""The per-question answers into one answers file per gate. The id comes from the file name."""
folder = run / "answers" / arm
gathered: dict[str, list[dict[str, Any]]] = {"md": [], "wd": []}
problems = []
for path in sorted(folder.glob("*.json")):
group, _, qid = path.stem.partition("-")
if group not in gathered or not qid:
problems.append(f"{path.name}: not a probe answer name")
continue
try:
data = json.loads(path.read_text(encoding="utf-8"))
except (OSError, UnicodeDecodeError, json.JSONDecodeError):
data = None
if not isinstance(data, dict):
problems.append(f"{path.name}: not a JSON object")
continue
gathered[group].append({**data, "id": qid})
md_path, wd_path = run / "answers" / f"{arm}.md.json", run / "answers" / f"{arm}.wd.json"
write_json(md_path, {"arm": arm, "answers": gathered["md"]})
write_json(wd_path, {"arm": arm, "answers": gathered["wd"]})
return md_path, wd_path, problems
# ---------------------------------------------------------------------------------------------- harvest
def first_prompt(lines: list[dict[str, Any]]) -> tuple[str, str]:
for line in lines:
if line.get("type") == "user":
content = line.get("message", {}).get("content")
if isinstance(content, list):
content = " ".join(b.get("text", "") for b in content if isinstance(b, dict))
return (content if isinstance(content, str) else ""), str(line.get("timestamp", ""))
return "", ""
def inside(path: object, root: Path) -> bool:
if not isinstance(path, str) or not os.path.isabs(path):
return False
norm = Path(os.path.normpath(path))
return norm == root or root in norm.parents
def bash_breach(command: str, basis: Path) -> str | None:
"""None when the command is read-only search that starts with `cd <basis> &&` and stays inside the basis."""
if "`" in command or re.search(r"\$[A-Za-z_{(]", command):
return "Bash with an expansion"
try:
lexer = shlex.shlex(re.sub(r"\s2>/dev/null(?=\s|$)", "", command), posix=True, punctuation_chars="|&;<>()")
lexer.whitespace_split = True
tokens = list(lexer)
except ValueError:
return "Bash that cannot be parsed"
segments: list[list[str]] = [[]]
for token in tokens:
if token in SEPARATORS:
segments.append([])
elif token and set(token) <= set("&<>()"):
return f"Bash with {token!r}"
else:
segments[-1].append(token)
first = segments[0]
if len(first) != 2 or first[0] != "cd" or not inside(first[1], basis):
return "Bash that does not start with cd into the basis"
for segment in segments[1:]:
if not segment or segment[0] not in READ_ONLY:
return f"Bash command not allowed: {segment[0] if segment else '(empty)'}"
for token in segment[1:]:
value = token.split("=", 1)[1] if token.startswith("-") and "=" in token else token
if segment[0] == "find" and token in FIND_ACTIONS:
return f"Bash find action {token}"
if segment[0] == "sed" and (token.startswith("-i") or token.startswith("--in-place")):
return "Bash sed -i"
if value.startswith("~") or ".." in value.split("/"):
return f"Bash path outside the basis: {token}"
if value.startswith("/") and value != "/dev/null" and not inside(value, basis):
return f"Bash path outside the basis: {token}"
return None
def breaches_of(tools: list[tuple[str, dict[str, Any]]], basis: Path, task: Path, answer: Path) -> list[str]:
found = []
for name, inp in tools:
if name not in ALLOWED_TOOLS:
found.append(f"{name}: tool not allowed")
elif name == "Read":
path = inp.get("file_path")
if not (inside(path, basis) or (isinstance(path, str) and os.path.normpath(path) == str(task))):
found.append(f"Read outside the basis: {path}")
elif name in ("Grep", "Glob"):
path = inp.get("path")
pattern = inp.get("pattern", "")
if path is None:
found.append(f"{name} without a path (searches the working directory)")
elif not inside(path, basis):
found.append(f"{name} outside the basis: {path}")
elif name == "Glob" and isinstance(pattern, str) and os.path.isabs(pattern) and not inside(pattern, basis):
found.append(f"Glob pattern outside the basis: {pattern}")
elif name == "Bash":
breach = bash_breach(str(inp.get("command", "")), basis)
if breach:
found.append(breach)
elif name == "Write" and inp.get("file_path") != str(answer):
found.append(f"Write to another file: {inp.get('file_path')}")
return found
def read_transcript(path: Path) -> list[dict[str, Any]]:
lines = []
for raw in path.read_text(encoding="utf-8").splitlines():
try:
line = json.loads(raw)
except json.JSONDecodeError:
continue
if isinstance(line, dict):
lines.append(line)
return lines
def harvest(transcripts: Path, run: Path) -> dict[str, dict[str, Any]]:
"""Per task: all tokens its transcript records (each message id once), and every isolation breach."""
pattern = re.compile(re.escape(str(run / "tasks")) + r"/(" + "|".join(ARMS) + r")/((?:md|wd)-[A-Za-z0-9]+)\.md")
rows: dict[str, dict[str, Any]] = {}
for path in sorted(transcripts.glob("*.jsonl")):
lines = read_transcript(path)
prompt, started = first_prompt(lines)
match = pattern.search(prompt)
if match is None:
continue
arm, key = match.group(1), match.group(2)
usage: dict[str, dict[str, int]] = {}
tools: list[tuple[str, dict[str, Any]]] = []
for line in lines:
message = line.get("message", {})
if line.get("type") != "assistant" or not isinstance(message, dict):
continue
mid = str(message.get("id", ""))
fields = message.get("usage") or {}
seen = usage.setdefault(mid, {})
for f in USAGE_FIELDS:
value = fields.get(f)
if isinstance(value, int):
seen[f] = max(seen.get(f, 0), value)
for block in message.get("content") or []:
if isinstance(block, dict) and block.get("type") == "tool_use":
tools.append((str(block.get("name")), block.get("input") or {}))
row = {
"tokens": sum(sum(v.values()) for v in usage.values()),
"breaches": breaches_of(tools, run / "arms" / arm, run / "tasks" / arm / f"{key}.md",
run / "answers" / arm / f"{key}.json"),
"transcript": path.name,
"started": started,
}
name = f"{arm}/{key}"
previous = rows.get(name)
runs = 1 + (previous["runs"] if previous else 0)
if previous is None or started >= previous["started"]:
rows[name] = {**row, "runs": runs}
else:
previous["runs"] = runs
for row in rows.values():
row.pop("started")
return rows
# ---------------------------------------------------------------------------------------------- score
def gate_results(path: Path) -> dict[str, dict[str, Any]]:
if not path.is_file():
raise ProbeError(f"no gate results at {path}; an arm that was not scored is a failure, not a zero")
data = load_json(path)
return {r["id"]: r for r in data.get("results", [])}
def mcnemar_exact(only_a: int, only_b: int) -> float:
"""Two-sided exact McNemar: the binomial test over the discordant pairs, p = 0.5."""
n, k = only_a + only_b, min(only_a, only_b)
if n == 0:
return 1.0
return min(1.0, 2 * sum(comb(n, i) for i in range(k + 1)) / float(2 ** n))
def score(run: Path, arms: list[str], md_ids: list[str]) -> dict[str, Any]:
tokens_path = run / "tokens.json"
tokens = load_json(tokens_path) if tokens_path.is_file() else {}
correct: dict[str, dict[str, dict[str, bool]]] = {}
table: dict[str, Any] = {"arms": {}, "pairs": {}, "mcnemar": {}}
for arm in arms:
md = gate_results(run / "results" / f"{arm}.md.json")
wd = gate_results(run / "results" / f"{arm}.wd.json")
by_group: dict[str, dict[str, bool]] = {g: {} for g in GROUPS}
answer_ok = source_ok = 0
for qid in md_ids:
r = md.get(qid, {})
by_group["flerdokument"][f"md-{qid}"] = bool(r.get("correct"))
answer_ok += bool(r.get("answer_ok"))
source_ok += bool(r.get("source_ok"))
for qid, r in wd.items():
group = "telling" if r.get("type") == "count" else "helt dokument"
by_group[group][f"wd-{qid}"] = bool(r.get("correct"))
answer_ok += bool(r.get("answer_ok"))
source_ok += bool(r.get("source_ok"))
correct[arm] = by_group
n = sum(len(v) for v in by_group.values())
own = [v for k, v in tokens.items() if k.startswith(f"{arm}/")]
table["arms"][arm] = {
"groups": {g: [sum(v.values()), len(v)] for g, v in by_group.items()},
"total": [sum(sum(v.values()) for v in by_group.values()), n],
"answer_ok": answer_ok,
"source_ok": source_ok,
"tokens": {"sum": sum(int(v["tokens"]) for v in own), "questions": len(own)},
"breaches": sum(len(v["breaches"]) for v in own),
}
for a, b in combinations(arms, 2):
a, b = (b, a) if b == "wiki" else (a, b)
pair: dict[str, dict[str, int]] = {}
for g in GROUPS:
counts = {"both": 0, f"only {a}": 0, f"only {b}": 0, "neither": 0}
for key, ok_a in correct[a][g].items():
ok_b = correct[b][g].get(key, False)
label = "both" if ok_a and ok_b else f"only {a}" if ok_a else f"only {b}" if ok_b else "neither"
counts[label] += 1
pair[g] = counts
table["pairs"][f"{a} vs {b}"] = pair
only_a, only_b = sum(c[f"only {a}"] for c in pair.values()), sum(c[f"only {b}"] for c in pair.values())
table["mcnemar"][f"{a} vs {b}"] = {f"only {a}": only_a, f"only {b}": only_b, "p": mcnemar_exact(only_a, only_b)}
table["per_question"] = {arm: {k: v for g in GROUPS for k, v in correct[arm][g].items()} for arm in arms}
return table
def render_table(table: dict[str, Any]) -> str:
head = "| arm | " + " | ".join(f"{g} (N)" for g in GROUPS) + " | total | answer ok | source ok | tokens/question |"
lines = [head, "|" + "---|" * (len(GROUPS) + 5)]
for arm, row in table["arms"].items():
t = row["tokens"]
per_q = f"{t['sum'] / t['questions'] / 1e6:.2f} M" if t["questions"] else "not harvested"
cells = [f"{c} of {n}" for c, n in (row["groups"][g] for g in GROUPS)]
total = row["total"]
lines.append(f"| {arm} | " + " | ".join(cells) + f" | {total[0]} of {total[1]} | {row['answer_ok']} | "
f"{row['source_ok']} | {per_q} |")
lines.append("")
for name, pair in table["pairs"].items():
lines.append(f"{name}: " + "; ".join(f"{g}: " + ", ".join(f"{k} {v}" for k, v in c.items())
for g, c in pair.items()))
m = table["mcnemar"][name]
lines.append(f"{name}, all groups: " + ", ".join(f"{k} {v}" for k, v in m.items() if k != "p")
+ f"; exact McNemar p = {m['p']:.3g}")
return "\n".join(lines)
# ---------------------------------------------------------------------------------------------- main
def cut_names(manifest: Path) -> list[str]:
names = load_json(manifest).get("cut", {}).get("names")
if not isinstance(names, list) or not names:
raise ProbeError(f"{manifest} records no cut names")
return [str(n) for n in names]
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
sub = p.add_subparsers(dest="command", required=True)
f = sub.add_parser("fetch-astro")
f.add_argument("--sources", required=True)
f.add_argument("--cut-manifest", required=True)
f.add_argument("--project", required=True)
f.add_argument("--topic", required=True)
f.add_argument("--collected", required=True)
s = sub.add_parser("setup")
s.add_argument("--run", required=True)
s.add_argument("--arm", required=True)
s.add_argument("--sources", required=True)
s.add_argument("--cut-manifest", required=True)
s.add_argument("--md-set", required=True)
s.add_argument("--md-ids", required=True, help="comma-separated")
s.add_argument("--wd-set", required=True)
s.add_argument("--wiki")
s.add_argument("--astro")
c = sub.add_parser("collect")
c.add_argument("--run", required=True)
c.add_argument("--arm", required=True)
h = sub.add_parser("harvest")
h.add_argument("--run", required=True)
h.add_argument("--transcripts", required=True)
r = sub.add_parser("score")
r.add_argument("--run", required=True)
r.add_argument("--arms", required=True, help="comma-separated")
r.add_argument("--md-ids", required=True, help="comma-separated")
return p
def main(argv: list[str] | None = None) -> int:
args = build_parser().parse_args(argv)
try:
if args.command == "fetch-astro":
written = fetch_astro(Path(args.sources), cut_names(Path(args.cut_manifest)), Path(args.project),
args.topic, args.collected)
print(f"raw files: {len(written)}")
elif args.command == "setup":
tasks = setup_arm(Path(args.run), args.arm, Path(args.sources), cut_names(Path(args.cut_manifest)),
Path(args.md_set), args.md_ids.split(","), Path(args.wd_set),
Path(args.wiki) if args.wiki else None, Path(args.astro) if args.astro else None)
print("\n".join(str(t) for t in tasks))
elif args.command == "collect":
md_path, wd_path, problems = collect(Path(args.run), args.arm)
print(f"{md_path}\n{wd_path}")
for problem in problems:
print(f"problem: {problem}")
elif args.command == "harvest":
rows = harvest(Path(args.transcripts), Path(args.run))
write_json(Path(args.run) / "tokens.json", rows)
print(f"tasks harvested: {len(rows)}; breaches: {sum(len(r['breaches']) for r in rows.values())}")
else:
table = score(Path(args.run), args.arms.split(","), args.md_ids.split(","))
write_json(Path(args.run) / "table.json", table)
print(render_table(table))
except ProbeError as exc:
print(f"FAIL: {exc}", file=sys.stderr)
return 1
return 0
if __name__ == "__main__":
sys.exit(main())

125
evals/p1/README.md Normal file
View file

@ -0,0 +1,125 @@
# P1 method trial (TRIAL, branch `p1-metodeprove`, not v1 code)
The P1 method trial builds the 19 sources of the cut (the sources behind d01 d02 d03 d04 d37 d46 d53) three ways, in one
fixed order, and measures cost and quality side by side, so the operator can choose the build method for v1 by seeing
small real examples (PLAN.md § Rammer, order `20261002T094056Z-495685981`, plan v3).
- **K**: the fragment compiler. Code splits the sources into blocks, a narrow trial agent (`p1-compiler`) writes short
fragments per pack of five sources, and code resolves concept identity and assembles the pages.
- **K+**: a copy of K plus one consolidation pass (`p1-consolidator`) that rewrites pages with three or more fragments
into flowing text, keeping every footnote label.
- **D**: no model. A generated map of each source and a code-built concept register.
No module here calls a model. The model work is done in the operator's session by the two trial agent types under
`.claude/agents/`. Every output lives outside the repository, under `<wiki>/prove-p1/` (CLAUDE.md rule 3); this README
records numbers only.
## Modules
Run each as `PYTHONPATH=evals:. python3 -m p1.<module> ...`; each module's docstring is its usage.
| Module | What it does |
|---|---|
| `split.py` | the fixed source order, blocks with line spans, the block total, the three side-by-side concepts |
| `dmap.py` | D: map pages and register pages |
| `kpack.py` | K: the skeleton from every docs page, pack input parts, fragment validation, concept identity |
| `assemble.py` | K's pages from accepted fragments; K+'s copy, tasks and apply |
| `measure.py` | the audit record, coverage of source blocks, structure counts |
| `cost.py` | tokens from the run sessions' transcripts, tokens per source, projection, the stop rule |
| `sidebyside.py` | the side-by-side page and its link check |
Output files under `prove-p1/`: `rekkefolge.txt`, `blocks.json`, `begreper.txt`, `okter.txt`, `D/`, `K/`, `K+/`,
`resultat.json`, `struktur-<V>.json`, `dekning-<V>.json`, `kost.json`, `side-om-side.html`, `rapport.md`.
Tests: `python3 -m unittest discover -s evals/tests -p 'test_p1_*.py'`. Checks: `bash tests/p1_repo.sh` (repository)
and `bash tests/p1_trial.sh` (the trial's outputs; red until the runs are done).
## Results
Numbers only, filled in by the run steps (plan steps 8-11).
### Run 0 (step 8, 02.10.2026)
- Order: 19 sources (3 docs pages, then 16 release notes by version), equal to the files cited by the L4 cut.
- Blocks: 1221 in the 19 sources (docs pages 599, release notes 622; pack 1 = sources 1-5 = 602 blocks); 33727 blocks
in all 599 files of `kilde/` (the D12 projection base).
- Blocks per source in order: 59, 308, 232, 1, 2, 22, 35, 76, 21, 25, 57, 35, 34, 52, 33, 22, 46, 53, 108.
- Load test (the empty baseline run, not counted toward any cap): both trial types spawned and wrote under `prove-p1/`,
so the agents' work directory is `prove-p1/` (no `runtime/p1` fallback). `p1-compiler`: startup 18604, 2 turns,
39142 tokens in all; `p1-consolidator`: startup 18167, 2 turns, 38270 tokens in all.
- D: 254 pages (19 map, 235 register), 0 model tokens. Auditor exit 0, 0 findings. Criterion 1: 0 of 0 (bodies are
headings and link lists only, D8, by construction). Coverage 0 of 1221 blocks: by construction, because D cites no
source in a body footnote (D21 counts body-cited entries only; D's locators live in `sources[]`). Duplicate pairs 9
(5 by name, 4 by title Jaccard), merge candidates 0, islands 0, concept test 2 held by 254 pages, test 4 by 19.
### Run K (step 9, 02.10.2026)
- Skeleton: 3493 index entries from the titles and level 2-3 headings of all 198 docs pages (0 tokens).
- The cost harvester was fixed twice during the run, each with a failing test first (`77b16ab`, `0a50286`): a long
streamed message keeps only its first usage record in the transcript (output 2, no stop reason), so output was
undercounted (373 recorded for pack 1's 336 fragments). Output is now derived from the next message's input growth,
less the injected text counted high (2.5 characters per token), so every K output below is a lower bound. Checked on
the load test's known short call, which keeps its recorded value. The recorded value stays beside it in `kost.json`.
- K: per pack (blocks / index lines sent of 3493 / input parts / fragments accepted of proposed / rejected / accepted
with a concept not among the lines sent / turns / tokens):
- pack 1: 602 / 230 / 4 / 336 of 336 / 0 / 0 / 3 / 372996
- pack 2: 179 / 117 / 1 / 87 of 87 / 0 / 0 / 3 / 125716
- pack 3: 211 / 125 / 1 / 108 of 108 / 0 / 0 / 3 / 141320
- pack 4: 229 / 127 / 1 / 119 of 119 / 0 / 0 / 3 / 153494
- No fragment was rejected for any reason (incl. `release-note-new` 0); no new concept was proposed, so all 650
accepted fragments enrich skeleton entries. Merge candidates 0.
- Stop line after pack 1: projected per block 756525 (naive per source 1417385), cap 1000000: continue.
- K total: 793526 tokens in 4 runs and 12 turns (input 24, cache read 228534, cache write 429550, output 135418);
startup 74596 (4 x about 18.6 k). Tokens per source, mean of sources 1-5: 74599; of sources 15-19: 35119.
- Projected to all 599 sources (33727 blocks): fit 52842866 (4 points, growth term b = 0.0554, not validated);
flat 21919125.
- Auditor exit 0, 0 findings. Criterion 1: 664 of 664. Quotes: 650 entries, 160 supplied by code, 0 on a structural
line. Precision of body-cited entries: line 591, block 59, section 0, document 0.
- Coverage: 623 of 1221 blocks. Per position in the pack (covered of blocks, n packs): 1: 85 of 160 (4); 2: 241 of 424
(4); 3: 181 of 395 (4); 4: 83 of 182 (4); 5: 33 of 60 (3). A direction signal, n = 3-4.
- Structure: 212 concept pages, 3281 skeleton entries unused. Concepts per source in order: 11, 61, 31, 1, 0, 5, 13,
15, 6, 3, 7, 4, 6, 4, 7, 5, 9, 13, 11. Duplicate pairs 3 (all title Jaccard), islands 63, documents per page mean
1.65 (max 8), version numbers in running text 5 of 664 claims, concept test 2 held by 212, test 4 by 73.
- Seen in the compiler's own reports: in one pack it wrote numbers as words to avoid the quote rule (D5 requires a
quote when the text holds a digit); the compilers' own fragment counts differed from the files (the files count).
### Run K+ (step 10, 02.10.2026)
- K+: a copy of K; 76 pages carry 3 or more fragments, which gives 10 consolidation runs of up to 8 pages.
- Run 1: 8 pages, applied 8, refused 0. 109651 tokens (input 8, cache read 72768, cache write 29909, output 6966, a lower
bound), 4 turns, startup 18176. The consolidator took one more turn than its instructions allow (it read its
output back).
- Stop line after run 1: 109651 x 76 / 8 = 1041685 > cap 1000000: STOP. Runs 2-10 were not run; K+ stands as K with
8 of 76 pages consolidated.
- K+ total = K + consolidation = 793526 + 109651 = 903177 tokens.
- Auditor exit 0, 0 findings. Criterion 1: 662 of 662 (2 fewer claims than K: sentences joined). Coverage 623 of 1221,
precision and quotes as K (line 591, block 59; 160 code quotes, 0 structural). 212 pages, 3 duplicate pairs,
63 islands, version numbers in running text 5 of 662.
### Step 11: the side-by-side table (02.10.2026)
Corrections after run 0, each its own commit with a failing test first: the backticked-term length is checked after
trimming (`26f521f`) and the concept pick counts a document only where the term stands as a term (`09a50b2`). The
first pick and D built before `26f521f` are kept in `prove-p1/forkastet/`; D was rebuilt (252 pages: 19 map, 233
register; 9 duplicate pairs; auditor exit 0) and the concepts were picked again by the same rule.
| variant | built to source | concepts (total / per source 1-5, 15-19 / test 2 / test 4) | skeleton unused | merge candidates | coverage | tokens per source (input / cache read / cache write / output / startup) | 1-5 | 15-19 | turns / subagents | projected 599 (fit / flat) | criterion 1 | fragments accepted / code quotes / structural quotes | precision (line / block / section / document) | pages / islands / duplicates |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| K | 19 of 19 | 212 / 104, 45 / 212 / 73 | 3281 of 3493 | 0 | 623 of 1221 | 1 / 12028 / 22608 / 7127 / 3926 | 74599 | 35119 | 12 / 4 | 52842866 / 21919125 | 664 of 664 | 650 of 650 / 160 / 0 | 591 / 59 / 0 / 0 | 212 / 63 / 3 |
| K+ | 19 of 19, consolidation stopped after run 1 (8 of 76 pages) | 212 / 104, 45 / 212 / 73 | 3281 of 3493 | 0 | 623 of 1221 | consolidation 109651 for 8 pages; K+ total = K + consolidation = 903177 | - | - | 4 / 1 | not computed: stopped after 1 of 10 runs, and the pages to consolidate at 599 sources are not measured | 662 of 662 | as K | 591 / 59 / 0 / 0 | 212 / 63 / 3 |
| D | 19 of 19 | 0 concept pages (252 map and register) / 0, 0 by construction / 252 / 19 | - | 0 | 0 of 1221 (by construction) | 0 | 0 | 0 | 0 / 0 | 0 | 0 of 0 (by construction) | - | - | 252 / 0 / 9 |
| L4 (structure counted today) | 19 of 19 | 151 / 33, 33 / 151 / 68 | - | 0 | 685 of 1221 | see the cost row | - | - | - | - | 1048 of 1048 | - / 0 / 41 of 832 | 832 / 0 / 0 / 0 | 151 / 54 / 2 |
| L2b / L4 cost | measured 27-28.09, not measured again | | | | | L4 105.8 M for 19 sources (84 % cache read); L2b writing 30.93 M for 19 sources | | | | L2b about 1.6-1.8 bn writing + 8.6 bn reading | | | | |
- Every K and K+ output number is a lower bound (the harvester fix in run K). Tokens per source split each pack's cost
by block share. The projection is not validated (4 points).
- Side-by-side page: 3 concepts x 4 columns; 454 of 454 source links resolve. Main session (orchestration, apart):
10.9 M tokens up to step 11, almost all cache read.
- Concepts per source in order 1-19 (a page counts at the earliest source its body cites, D10): K and K+ 11, 61, 31,
1, 0, 5, 13, 15, 6, 3, 7, 4, 6, 4, 7, 5, 9, 13, 11; L4 2, 9, 19, 1, 2, 10, 14, 17, 5, 6, 14, 10, 7, 2, 9, 6, 3, 6, 9;
D 0 for every source (its register pages cite nothing in a body).
- K+ consolidation cost 13706 per page (lower bound) and is not split per source, because a page joins fragments from
several sources.
- Seen in the review (BLOCK, not fixed in this run): 45 of 1221 blocks are only MDX tag lines and cannot be covered
(K 623 of 1176 without them); the index-line filter sends a line when the whole name occurs as a phrase, not per
token as D7 is written; `cost.summarize` and the stop command have no test.

5
evals/p1/__init__.py Normal file
View file

@ -0,0 +1,5 @@
"""TRIAL, branch p1-metodeprove, not v1 code. Nothing outside evals/ imports it.
The P1 method trial (PLAN.md § Rammer, order 20261002T094056Z-495685981): three build methods for a concept wiki (K, K+,
D) on the 19 sources of the cut, measured side by side for cost and quality. No module here calls a model.
"""

287
evals/p1/assemble.py Normal file
View file

@ -0,0 +1,287 @@
"""K's assembler and K+'s apply step (TRIAL, P1): pages from accepted fragments, by code. It calls no model.
build --work DIR --kilde-root DIR --out DIR [--at ISO]
One page per concept that at least one accepted fragment enriches (unused skeleton entries get none). Docs
fragments form the body; release-note fragments go under "## History" in version order. Every sentence ends
in a content footnote and, for a release note, a version footnote whose quote is the bare version on the
note's heading line. A fragment without a model quote gets a code quote: the first line of its span that is
not structural, marked x-quote-by: code. A fragment that names another concept's title links to it once.
copy --src DIR --out DIR
K+ starts as a copy of K.
tasks --bundle DIR --work DIR [--min 3] [--per-run 8]
One task file per consolidation run (pages with at least --min fragments, --per-run pages each) in
<work>/Kplus-oppgaver/, output path <work>/Kplus-bodies/run-N.json.
apply --bundle DIR --bodies FILE
Replaces a page body only when the new body keeps every old footnote label and adds none; prints
"applied X, refused Y".
--kilde-root is the folder that contains kilde/. Exit 0 = done, 2 = could not run.
"""
from __future__ import annotations
import argparse
import json
import re
import shutil
import sys
from dataclasses import dataclass
from datetime import datetime, timezone
from pathlib import Path
from typing import Any
from okfwiki.audit import FOOTNOTE_DEF, FOOTNOTE_REF, HEADING, read_document, sentence_spans
from p1.dmap import frontmatter
from p1.split import FENCE, headings_of, version_key
GENERATOR = "okf-wiki/p1-assemble"
QUOTE_MAX = 200
HTML_TAG_ONLY = re.compile(r"^\s*</?[A-Za-z][^<>]*/?>\s*$")
TABLE_RULE = re.compile(r"^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$")
VERSION_HEADING = re.compile(r"^v?(\d+(?:\.\d+){2,})$")
class RunError(Exception):
"""The command cannot run as asked; nothing was written."""
@dataclass
class Run:
task: Path
output: Path
pages: list[str]
def structural(line: str) -> bool:
return (not line.strip() or HEADING.match(line) is not None or FENCE.match(line) is not None
or HTML_TAG_ONLY.match(line) is not None or TABLE_RULE.match(line) is not None)
def code_quote(span: list[str], start: int) -> tuple[str, int]:
"""The first non-structural line of a span (stripped, capped), and its file line."""
for i, line in enumerate(span):
if not structural(line):
return line.strip()[:QUOTE_MAX], start + i
return span[0].strip()[:QUOTE_MAX] or span[0], start
def footnoted(text: str, labels: list[str]) -> str:
text = text.strip()
if text and text[-1] not in ".!?":
text += "."
marks = "".join(f"[^{x}]" for x in labels)
out, last = [], 0
for _a, b in sentence_spans(text):
out.append(text[last:b] + marks)
last = b
out.append(text[last:])
return "".join(out)
def _link_titles(text: str, titles: dict[str, str], self_id: str, linked: set[str]) -> str:
for cid, title in sorted(titles.items(), key=lambda kv: -len(kv[1])):
if cid == self_id or cid in linked or len(title) < 4:
continue
pattern = re.compile(r"(?<![\w`\[])" + re.escape(title) + r"(?![\w`\]])", re.IGNORECASE)
m = pattern.search(text)
if m is None:
continue
text = text[:m.start()] + f"[{m.group(0)}]({cid}.md)" + text[m.end():]
linked.add(cid)
return text
def _version_line(lines: list[str], version: str) -> int:
for n, _level, text in headings_of(lines):
m = VERSION_HEADING.match(text)
if m and m.group(1) == version:
return n
raise RunError(f"no heading for version {version}")
def assemble(work: Path, kilde_root: Path, out: Path, at: str | None = None) -> int:
if out.exists():
raise RunError(f"{out} exists; refusing to overwrite")
at = at or datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
index = json.loads((work / "K-work" / "index.json").read_text(encoding="utf-8"))
frags = json.loads((work / "K-work" / "accepted.json").read_text(encoding="utf-8"))["fragments"]
entries = {e["id"]: e for e in index["entries"]}
kilde = kilde_root / "kilde"
cache: dict[str, list[str]] = {}
def lines_of(name: str) -> list[str]:
if name not in cache:
cache[name] = (kilde / name).read_text(encoding="utf-8").split("\n")
return cache[name]
by_concept: dict[str, list[dict[str, Any]]] = {}
for f in frags:
by_concept.setdefault(f["concept_id"], []).append(f)
titles = {cid: str(entries[cid]["title"]) for cid in by_concept}
pages: dict[str, str] = {}
for cid, items in by_concept.items():
e = entries[cid]
sources: list[dict[str, Any]] = []
versions: dict[str, str] = {}
body_parts: list[str] = []
history: list[tuple[tuple[int, ...], int, str]] = []
linked: set[str] = set()
for k, f in enumerate(items, 1):
lines = lines_of(f["file"])
src: dict[str, Any] = {"id": f"f{k}", "resource": f"/kilde/{f['file']}", "title": f["section"]}
if f.get("quote"):
src["x-locator"] = {"line": f["quote_line"]}
src["x-quote"] = f["quote"]
else:
quote, line = code_quote(lines[f["start"] - 1:f["end"]], f["start"])
src["x-locator"] = {"line": line}
src["x-quote"] = quote
src["x-quote-by"] = "code"
src["x-span"] = [f["start"], f["end"]]
sources.append(src)
labels = [f"f{k}"]
if f.get("version"):
v = str(f["version"])
if v not in versions:
versions[v] = "v" + re.sub(r"\D", "", v)
sources.append({"id": versions[v], "resource": f"/kilde/{f['file']}", "title": v,
"x-locator": {"line": _version_line(lines, v)}, "x-quote": v})
labels.append(versions[v])
text = _link_titles(footnoted(f["text"], labels), titles, cid, linked)
history.append((version_key(f"release-v{v}.md"), k, text))
else:
body_parts.append(_link_titles(footnoted(f["text"], labels), titles, cid, linked))
body = [f"# {e['title']}", ""]
for p in body_parts:
body += [p, ""]
if history:
body += ["## History", ""]
body += [f"- {t}" for _, _, t in sorted(history)]
body.append("")
body += [f"[^{s['id']}]: {Path(s['resource']).name}, line {s['x-locator']['line']}" for s in sources]
desc = FOOTNOTE_REF.sub("", items[0]["text"]).strip()[:200]
fm: dict[str, Any] = {"type": "Concept", "title": str(e["title"]), "description": desc, "sources": sources,
"x-aliases": [str(a) for a in e.get("aliases", [])], "x-fragments": len(items)}
if e.get("kind") == "merge-candidate" and e.get("merge_of"):
fm["x-merge-candidate"] = str(e["merge_of"])
fm["generated"] = {"by": GENERATOR, "at": at}
pages[f"{cid}.md"] = frontmatter(fm) + "\n" + "\n".join(body) + "\n"
out.mkdir(parents=True)
for name, text in pages.items():
(out / name).write_text(text, encoding="utf-8")
index_md = ["---", 'okf_version: "0.2"', "---", "", "# Concepts", ""]
index_md += [f"- [{titles[cid]}]({cid}.md)" for cid in sorted(by_concept)]
(out / "index.md").write_text("\n".join(index_md) + "\n", encoding="utf-8")
(out / "log.md").write_text(f"# Log\n\n## {at[:10]}\n* **Build**: K assembled by {GENERATOR}: {len(pages)} "
f"pages from {len(frags)} accepted fragments.\n", encoding="utf-8")
return len(pages)
def copy(src: Path, dst: Path) -> None:
if dst.exists():
raise RunError(f"{dst} exists; refusing to overwrite")
shutil.copytree(src, dst)
def _split_page(text: str) -> tuple[str, str, list[str], list[str]]:
"""(frontmatter block, title line, body lines without title and footnote definitions, definition lines)."""
end = text.index("\n---\n", 4) + 5
head, rest = text[:end], text[end:].split("\n")
title = next(line for line in rest if line.startswith("# "))
body = [line for line in rest if line != title and not FOOTNOTE_DEF.match(line.strip())]
defs = [line for line in rest if FOOTNOTE_DEF.match(line.strip())]
return head, title, body, defs
def consolidation_tasks(bundle: Path, work: Path, min_fragments: int = 3, per_run: int = 8) -> list[Run]:
chosen: list[str] = []
for p in sorted(bundle.glob("*.md")):
if p.name in ("index.md", "log.md"):
continue
fm = read_document(p, p.name).frontmatter or {}
if int(fm.get("x-fragments", 0)) >= min_fragments:
chosen.append(p.stem)
runs: list[Run] = []
for i in range(0, len(chosen), per_run):
n = len(runs) + 1
task = work / "Kplus-oppgaver" / f"run-{n}.md"
output = work / "Kplus-bodies" / f"run-{n}.json"
if task.exists():
raise RunError(f"{task} exists; refusing to overwrite")
parts = [f"# K+ consolidation run {n}\n\nRewrite each page body below into flowing text. Output: {output}\n"]
for cid in chosen[i:i + per_run]:
text = (bundle / f"{cid}.md").read_text(encoding="utf-8")
fm = read_document(bundle / f"{cid}.md", f"{cid}.md").frontmatter or {}
_head, title, body, _defs = _split_page(text)
quotes = [f"- [^{s['id']}]: {s.get('x-quote', '')}" for s in fm.get("sources", [])]
parts.append(f"## Page {cid} ({title[2:]})\n\nBody:\n\n" + "\n".join(body).strip()
+ "\n\nWhat each label quotes:\n\n" + "\n".join(quotes) + "\n")
task.parent.mkdir(parents=True, exist_ok=True)
task.write_text("\n".join(parts), encoding="utf-8")
runs.append(Run(task, output, chosen[i:i + per_run]))
return runs
def apply(bundle: Path, bodies_path: Path) -> tuple[int, int]:
bodies = json.loads(bodies_path.read_text(encoding="utf-8"))
applied = refused = 0
for cid, new in bodies.items():
page = bundle / f"{cid}.md"
if not page.is_file() or not isinstance(new, str):
refused += 1
continue
head, title, body, defs = _split_page(page.read_text(encoding="utf-8"))
old_labels = set(FOOTNOTE_REF.findall("\n".join(body)))
if set(FOOTNOTE_REF.findall(new)) != old_labels or FOOTNOTE_DEF.search(new):
refused += 1
continue
page.write_text(head + "\n" + title + "\n\n" + new.strip() + "\n\n" + "\n".join(defs) + "\n", encoding="utf-8")
applied += 1
return applied, refused
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
sub = p.add_subparsers(dest="command", required=True)
b = sub.add_parser("build")
b.add_argument("--work", required=True)
b.add_argument("--kilde-root", required=True)
b.add_argument("--out", required=True)
b.add_argument("--at")
c = sub.add_parser("copy")
c.add_argument("--src", required=True)
c.add_argument("--out", required=True)
t = sub.add_parser("tasks")
t.add_argument("--bundle", required=True)
t.add_argument("--work", required=True)
t.add_argument("--min", type=int, default=3)
t.add_argument("--per-run", type=int, default=8)
a = sub.add_parser("apply")
a.add_argument("--bundle", required=True)
a.add_argument("--bodies", required=True)
return p
def main(argv: list[str] | None = None) -> int:
args = build_parser().parse_args(argv)
try:
if args.command == "build":
n = assemble(Path(args.work), Path(args.kilde_root), Path(args.out), args.at)
print(f"K: {n} pages -> {args.out}")
elif args.command == "copy":
copy(Path(args.src), Path(args.out))
print(f"copied {args.src} -> {args.out}")
elif args.command == "tasks":
for r in consolidation_tasks(Path(args.bundle), Path(args.work), args.min, args.per_run):
print(f"task: {r.task} output: {r.output} pages: {len(r.pages)}")
else:
applied, refused = apply(Path(args.bundle), Path(args.bodies))
print(f"applied {applied}, refused {refused}")
except (RunError, OSError, KeyError, ValueError) as exc:
print(f"assemble cannot run: {exc}", file=sys.stderr)
return 2
return 0
if __name__ == "__main__":
sys.exit(main())

329
evals/p1/cost.py Normal file
View file

@ -0,0 +1,329 @@
"""The trial's cost from the run sessions' transcripts (TRIAL, P1): harvest, allocation, projection, stop. No model.
harvest --project-dir D --okter FILE --blocks F --total N [--packs FILE] --out FILE
Reads only the sessions listed in okter.txt ("<session-id> <step>" per line): each session's main
transcript (orchestration, reported apart) and every subagent transcript under <session>/subagents/. Per
subagent: input, cache read, cache write and output tokens kept apart (each message id counted once, at
its largest value, because a streamed message repeats its id with growing output), turns (distinct
message ids), startup (the first message's input side), agentType and description from its .meta.json.
A message whose final usage was never written (no stop reason on any record) gets its output from the
growth of the next message's input side less the injected text counted high (a lower bound); the
recorded output stays beside it (output_recorded).
A description that starts "P1-<variant>-<unit>" attributes the run; any other is listed as unattributed,
never dropped. Per variant: totals, tokens per source (a pack's cost split by block share), the means of
sources 1-5 and 15-19, and the projection to all sources (N blocks). The file is rewritten from the
transcripts on every harvest; stop rows already in it are kept.
stop VARIANT --kost FILE --blocks F [--pages-total N --pages-first M] [--record]
The stop rule (cap 1 M tokens, all four categories): K after pack 1, projected per block processed and,
beside it, naively per source; K+ after run 1, projected over the pages to consolidate. Exit 1 = stop.
With --record the stop row is written into the kost file.
Projection: cost per block c = a + b*R by least squares over the measured units, R = blocks read before the unit;
the projected total for T blocks is a*T + b*T*T/2 (the sum as R grows from 0 to T). One unit: b = 0. The flat
projection (mean cost per block times T) stands beside it. Exit 0 = done, 1 = stop (stop only), 2 = could not run.
"""
from __future__ import annotations
import argparse
import json
import re
import sys
from collections.abc import Mapping
from pathlib import Path
from typing import Any
from direction_probe import USAGE_FIELDS, read_transcript
SCHEMA = "okf-wiki/p1-cost/1"
CAP = 1_000_000
CATEGORIES = {"input_tokens": "input", "cache_read_input_tokens": "cache_read",
"cache_creation_input_tokens": "cache_write", "output_tokens": "output"}
PREFIX = re.compile(r"^P1-([A-Za-z0-9+]+)-(\S+)")
PACK_UNIT = re.compile(r"^pack(\d+)")
CLASS = {"LOAD": "load", "K": "write", "K+": "write"}
class RunError(Exception):
"""The command cannot run as asked; nothing was written."""
def sessions(okter: Path) -> list[str]:
ids: list[str] = []
for line in okter.read_text(encoding="utf-8").splitlines():
parts = line.split()
if parts and parts[0] not in ids:
ids.append(parts[0])
return ids
INPUT_SIDE = ("input_tokens", "cache_read_input_tokens", "cache_creation_input_tokens")
CHARS_PER_TOKEN_LOW = 2.5 # injected text counted high, so a derived output is a lower bound
def _result_chars(message: dict[str, Any]) -> int:
content = message.get("content")
if not isinstance(content, list):
return 0
total = 0
for item in content:
if not (isinstance(item, dict) and item.get("type") == "tool_result"):
continue
inner = item.get("content")
if isinstance(inner, str):
total += len(inner)
elif isinstance(inner, list):
total += sum(len(str(x.get("text", ""))) for x in inner if isinstance(x, dict))
return total
def usage(path: Path) -> dict[str, Any]:
"""Tokens of one transcript. A message whose records all lack a stop reason never got its final usage written
(seen for a long streamed message: output 2); when another message follows, its output is the growth of the
next message's input side less the text injected between them (tool results and rendered attachments, counted
high at CHARS_PER_TOKEN_LOW), a lower bound, and never below what was recorded."""
per: dict[str, dict[str, int]] = {}
order: list[str] = []
complete: set[str] = set()
between: dict[str, int] = {}
last_stop: str | None = None
for line in read_transcript(path):
message = line.get("message")
if line.get("type") == "attachment" and order:
between[order[-1]] = between.get(order[-1], 0) + len(str(line.get("rendered") or ""))
continue
if not isinstance(message, dict):
continue
if line.get("type") == "user" and order:
between[order[-1]] = between.get(order[-1], 0) + _result_chars(message)
continue
if line.get("type") != "assistant":
continue
mid = str(message.get("id", ""))
if mid not in per:
order.append(mid)
seen = per.setdefault(mid, {})
fields = message.get("usage") or {}
for f in USAGE_FIELDS:
value = fields.get(f)
if isinstance(value, int):
seen[f] = max(seen.get(f, 0), value)
stop = message.get("stop_reason")
last_stop = stop if isinstance(stop, str) else None
if isinstance(stop, str):
complete.add(mid)
out: dict[str, Any] = {CATEGORIES[f]: sum(v.get(f, 0) for v in per.values()) for f in USAGE_FIELDS}
out["output_recorded"] = out["output"]
derived = unrecorded = 0
for i, mid in enumerate(order):
if mid in complete:
continue
if i + 1 == len(order):
unrecorded += 1
continue
growth = (sum(per[order[i + 1]].get(f, 0) for f in INPUT_SIDE) - sum(per[mid].get(f, 0) for f in INPUT_SIDE)
- int(between.get(mid, 0) / CHARS_PER_TOKEN_LOW))
recorded = per[mid].get("output_tokens", 0)
if growth > recorded:
out["output"] += growth - recorded
derived += 1
out["output_derived_messages"] = derived
out["output_unrecorded"] = unrecorded
out["total"] = sum(out[c] for c in CATEGORIES.values())
out["turns"] = len(order)
first = per[order[0]] if order else {}
out["startup"] = sum(first.get(f, 0) for f in INPUT_SIDE)
out["stop_reason"] = last_stop
return out
def harvest(project_dir: Path, ids: list[str]) -> dict[str, Any]:
runs: list[dict[str, Any]] = []
unattributed: list[dict[str, Any]] = []
main: dict[str, Any] = {}
for sid in ids:
top = project_dir / f"{sid}.jsonl"
if top.is_file():
main[sid] = usage(top)
for path in sorted((project_dir / sid / "subagents").glob("agent-*.jsonl")):
meta_path = path.with_name(path.stem + ".meta.json")
meta = json.loads(meta_path.read_text(encoding="utf-8")) if meta_path.is_file() else {}
row = {"session": sid, "agent": path.stem, "agentType": meta.get("agentType"),
"description": str(meta.get("description", "")), **usage(path)}
m = PREFIX.match(row["description"])
if m is None:
unattributed.append(row)
continue
row["variant"], row["unit"] = m.group(1), m.group(2)
row["class"] = CLASS.get(m.group(1), "other")
runs.append(row)
return {"sessions_read": ids, "runs": runs, "unattributed": unattributed, "main": main}
def allocate(pack_costs: Mapping[int, float], packs: list[list[str]], blocks_doc: dict[str, Any]) -> dict[str, float]:
"""Tokens per source: each pack's cost split over its sources by their share of the pack's blocks."""
count: dict[str, int] = {}
for b in blocks_doc["blocks"]:
count[b["file"]] = count.get(b["file"], 0) + 1
per: dict[str, float] = {}
for n, names in enumerate(packs, 1):
if n not in pack_costs:
continue
total = sum(count.get(x, 0) for x in names) or 1
for x in names:
per[x] = pack_costs[n] * count.get(x, 0) / total
return per
def means(per: dict[str, float], order: list[str]) -> dict[str, float | None]:
def mean(names: list[str]) -> float | None:
vals = [per[x] for x in names if x in per]
return sum(vals) / len(vals) if vals else None
return {"1-5": mean(order[0:5]), "15-19": mean(order[14:19])}
def project(points: list[tuple[float, int, int]], total_blocks: int) -> dict[str, Any]:
"""points: (cost, blocks in the unit, blocks read before it)."""
if not points:
return {"fit": None, "flat": None, "T": total_blocks}
xs = [float(r) for _, _, r in points]
ys = [c / b for c, b, _ in points]
fit: dict[str, Any]
if len(points) == 1 or len(set(xs)) == 1:
a, b = sum(ys) / len(ys), 0.0
fit = {"a": a, "b": 0, "note": "one point, no growth term"}
else:
mx, my = sum(xs) / len(xs), sum(ys) / len(ys)
b = sum((x - mx) * (y - my) for x, y in zip(xs, ys)) / sum((x - mx) ** 2 for x in xs)
a = my - b * mx
fit = {"a": a, "b": b, "note": f"{len(points)} points, not validated"}
fit["value"] = a * total_blocks + b * total_blocks * total_blocks / 2
flat = sum(c for c, _, _ in points) / sum(bl for _, bl, _ in points) * total_blocks
return {"fit": fit, "flat": flat, "T": total_blocks}
def stop_k(pack1_cost: int, pack1_blocks: int, cut_blocks: int, pack1_sources: int, cut_sources: int
) -> dict[str, Any]:
per_block = pack1_cost * cut_blocks / pack1_blocks
per_source = pack1_cost * cut_sources / pack1_sources
return {"per_block": per_block, "per_source": per_source, "cap": CAP, "stop": per_block > CAP}
def stop_kplus(run1_cost: int, run1_pages: int, pages_total: int) -> dict[str, Any]:
projected = run1_cost * pages_total / run1_pages
return {"projected": projected, "cap": CAP, "stop": projected > CAP}
def _pack_number(unit: str) -> int | None:
m = PACK_UNIT.match(unit)
return int(m.group(1)) if m else None
def summarize(h: dict[str, Any], blocks_doc: dict[str, Any], packs_log: dict[str, Any] | None,
total_blocks: int) -> dict[str, Any]:
order = [str(x) for x in blocks_doc["order"]]
count: dict[str, int] = {}
for b in blocks_doc["blocks"]:
count[b["file"]] = count.get(b["file"], 0) + 1
variants: dict[str, Any] = {}
for v in sorted({r["variant"] for r in h["runs"]}):
mine = [r for r in h["runs"] if r["variant"] == v]
row: dict[str, Any] = {c: sum(r[c] for r in mine) for c in (*CATEGORIES.values(), "total", "turns", "startup")}
row["subagents"] = len(mine)
row["class"] = mine[0]["class"]
row["counts_toward_cap"] = v in ("K", "K+")
if v == "K" and packs_log:
packs = [list(p["sources"]) for p in sorted(packs_log["packs"], key=lambda p: int(p["pack"]))]
pack_costs: dict[int, float] = {}
per_cat: dict[str, dict[int, float]] = {c: {} for c in CATEGORIES.values()}
for r in mine:
n = _pack_number(r["unit"])
if n is not None:
pack_costs[n] = pack_costs.get(n, 0) + r["total"]
for c in CATEGORIES.values():
per_cat[c][n] = per_cat[c].get(n, 0) + r[c]
row["per_pack"] = {str(n): c for n, c in sorted(pack_costs.items())}
row["per_source"] = allocate(pack_costs, packs, blocks_doc)
row["per_source_by_category"] = {c: allocate(per_cat[c], packs, blocks_doc) for c in CATEGORIES.values()}
row["means"] = means(row["per_source"], order)
points, read = [], 0
for n, names in enumerate(packs, 1):
blocks_n = sum(count.get(x, 0) for x in names)
if n in pack_costs:
points.append((pack_costs[n], blocks_n, read))
read += blocks_n
row["projection"] = project(points, total_blocks)
variants[v] = row
return variants
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
sub = p.add_subparsers(dest="command", required=True)
h = sub.add_parser("harvest")
h.add_argument("--project-dir", required=True)
h.add_argument("--okter", required=True)
h.add_argument("--blocks", required=True)
h.add_argument("--total", type=int, required=True)
h.add_argument("--packs")
h.add_argument("--out", required=True)
s = sub.add_parser("stop")
s.add_argument("variant", choices=("K", "K+"))
s.add_argument("--kost", required=True)
s.add_argument("--blocks", required=True)
s.add_argument("--packs")
s.add_argument("--pages-total", type=int)
s.add_argument("--pages-first", type=int)
s.add_argument("--record", action="store_true")
return p
def main(argv: list[str] | None = None) -> int:
args = build_parser().parse_args(argv)
try:
blocks_doc = json.loads(Path(args.blocks).read_text(encoding="utf-8"))
if args.command == "harvest":
out = Path(args.out)
old = json.loads(out.read_text(encoding="utf-8")) if out.is_file() else {}
h = harvest(Path(args.project_dir), sessions(Path(args.okter)))
packs_log = json.loads(Path(args.packs).read_text(encoding="utf-8")) if args.packs else None
doc = {"schema": SCHEMA, **h, "variants": summarize(h, blocks_doc, packs_log, args.total),
"stops": old.get("stops", {})}
out.parent.mkdir(parents=True, exist_ok=True)
out.write_text(json.dumps(doc, ensure_ascii=False, indent=1) + "\n", encoding="utf-8")
print(f"harvest: {len(h['runs'])} attributed runs, {len(h['unattributed'])} unattributed, sessions read: "
f"{', '.join(h['sessions_read'])} -> {out}")
return 0
kost_path = Path(args.kost)
kost = json.loads(kost_path.read_text(encoding="utf-8"))
runs = [r for r in kost["runs"] if r["variant"] == args.variant]
if args.variant == "K":
first = [r for r in runs if _pack_number(r["unit"]) == 1]
if not first:
raise RunError("no pack 1 run in the kost file; harvest after pack 1")
if not args.packs:
raise RunError("--packs is needed for K")
log = json.loads(Path(args.packs).read_text(encoding="utf-8"))
p1 = next(p for p in log["packs"] if int(p["pack"]) == 1)
row = stop_k(sum(r["total"] for r in first), int(p1["blocks"]), len(blocks_doc["blocks"]),
len(p1["sources"]), len(blocks_doc["order"]))
else:
first = [r for r in runs if r["unit"].startswith("run1")]
if not first or not args.pages_total or not args.pages_first:
raise RunError("K+ needs a run 1 in the kost file, --pages-total and --pages-first")
row = stop_kplus(sum(r["total"] for r in first), args.pages_first, args.pages_total)
print(f"{args.variant}: projected {row.get('per_block', row.get('projected'))} tokens"
+ (f" (naive per source {row['per_source']})" if "per_source" in row else "")
+ f", cap {CAP}: {'STOP' if row['stop'] else 'continue'}")
if args.record:
kost.setdefault("stops", {})[args.variant] = row
kost_path.write_text(json.dumps(kost, ensure_ascii=False, indent=1) + "\n", encoding="utf-8")
return 1 if row["stop"] else 0
except (RunError, OSError, json.JSONDecodeError, KeyError, StopIteration) as exc:
print(f"cost cannot run: {exc}", file=sys.stderr)
return 2
if __name__ == "__main__":
sys.exit(main())

178
evals/p1/dmap.py Normal file
View file

@ -0,0 +1,178 @@
"""D, the trial's no-model baseline (TRIAL, P1): a generated map and a code-built concept register. It calls no model.
build --blocks FILE --kilde-root DIR --out DIR [--at ISO]
One map page per source (k-<slug>.md) whose body mirrors the source's headings, with one sources[] entry per
section; one register page per kept term (r-<slug>.md) whose body is a pure link list to the map sections
where the term occurs, with one sources[] entry per occurrence. A term is kept when it is a docs-page heading
that passes concept test 2, or when it occurs in at least 2 of the documents. Bodies hold only headings and
pure link lists, so the claim count is 0 by construction; the exact locators live in sources[].
--kilde-root is the folder that contains kilde/ (the auditor's SOURCES argument). Exit 0 = written, 2 = could not run.
"""
from __future__ import annotations
import argparse
import json
import re
import sys
from dataclasses import dataclass
from datetime import datetime, timezone
from pathlib import Path
from typing import Any
import yaml
from p1.split import headings_of, is_meta, occurs, terms
MIN_DOCUMENTS = 2
GENERATOR = "okf-wiki/p1-dmap"
class RunError(Exception):
"""The command cannot run as asked; nothing was written."""
@dataclass
class DStats:
maps: int
registers: int
def slug(text: str) -> str:
return re.sub(r"[^a-z0-9]+", "-", text.lower()).strip("-")[:60] or "x"
def frontmatter(data: dict[str, Any]) -> str:
"""A frontmatter block; PyYAML quotes any string that would load as another type (no, 1.10)."""
return "---\n" + yaml.safe_dump(data, sort_keys=False, allow_unicode=True, width=10_000) + "---\n"
def _anchors(headings: list[tuple[int, int, str]]) -> dict[int, str]:
seen: dict[str, int] = {}
out: dict[int, str] = {}
for line, _level, text in headings:
base = slug(text)
n = seen.get(base, 0)
seen[base] = n + 1
out[line] = base if n == 0 else f"{base}-{n}"
return out
def _title(name: str, headings: list[tuple[int, int, str]]) -> str:
first = next((t for _, level, t in headings if level == 1), None)
if first:
return first
return f"Release notes {headings[0][2]}" if name.startswith("release-") and headings else name
def build(blocks_doc: dict[str, Any], kilde_root: Path, out: Path, at: str | None = None) -> DStats:
if out.exists():
raise RunError(f"{out} exists; refusing to overwrite")
at = at or datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
names = [str(n) for n in blocks_doc["order"]]
kilde = kilde_root / "kilde"
texts = {n: (kilde / n).read_text(encoding="utf-8") for n in names}
lines = {n: t.split("\n") for n, t in texts.items()}
heads = {n: headings_of(lines[n]) for n in names}
anchors = {n: _anchors(heads[n]) for n in names}
titles = {n: _title(n, heads[n]) for n in names}
pages: dict[str, str] = {}
gen = {"by": GENERATOR, "at": at}
for n in names:
sources = []
body = [f"# {titles[n]}", ""]
for i, (line, level, text) in enumerate(heads[n], 1):
sources.append({"id": f"s{i}", "resource": f"/kilde/{n}", "title": text, "x-locator": {"line": line},
"x-quote": text})
if level > 1 or text != titles[n]:
body += [f"{'#' * max(level, 2)} {text}", ""]
fm = {"type": "Document map", "title": titles[n], "description": f"The sections of {n}.", "sources": sources,
"generated": gen}
pages[f"k-{slug(n.removesuffix('.md'))}.md"] = frontmatter(fm) + "\n" + "\n".join(body).rstrip() + "\n"
candidates = [t for n in names if n.startswith("docs-") for _, level, t in heads[n] if level in (2, 3)]
from_headings = {t for t in candidates if not is_meta(t)}
pool = list(dict.fromkeys(list(from_headings) + [t for n in names for t in terms(texts[n])]))
registers: dict[str, str] = {}
for term in pool:
if is_meta(term):
continue
holders = [n for n in names if occurs(term, texts[n])]
if term not in from_headings and len(holders) < MIN_DOCUMENTS:
continue
pattern = re.compile(r"(?<!\w)" + re.escape(term) + r"(?!\w)", re.IGNORECASE)
sources, links, seen = [], [], set()
for n in holders:
for i, raw in enumerate(lines[n], 1):
m = pattern.search(raw)
if m is None:
continue
section = max((h for h in heads[n] if h[0] <= i), default=None)
key = (n, section[0] if section else 0)
if key in seen:
continue
seen.add(key)
sources.append({"id": f"o{len(sources) + 1}", "resource": f"/kilde/{n}", "title": titles[n],
"x-locator": {"line": i}, "x-quote": m.group(0)})
target = f"k-{slug(n.removesuffix('.md'))}.md"
if section is not None:
target += f"#{anchors[n][section[0]]}"
where = titles[n] + (f" › {section[2]}" if section and section[2] != titles[n] else "")
links.append(f"- [{where.replace('[', '(').replace(']', ')')}]({target})")
if not sources:
continue
name = f"r-{slug(term)}.md"
k = 2
while name in registers:
name, k = f"r-{slug(term)}-{k}.md", k + 1
fm = {"type": "Register entry", "title": term, "description": f"Where {term} occurs in the sources.",
"sources": sources, "generated": gen}
registers[name] = frontmatter(fm) + "\n" + f"# {term}\n\n" + "\n".join(links) + "\n"
out.mkdir(parents=True)
for name, text in {**pages, **registers}.items():
(out / name).write_text(text, encoding="utf-8")
index = ["---", 'okf_version: "0.2"', "---", "", "# Document maps", ""]
index += [f"- [{titles[n]}](k-{slug(n.removesuffix('.md'))}.md)" for n in names]
index += ["", "# Register", ""]
index += [f"- [{name[2:-3]}]({name})" for name in sorted(registers)]
(out / "index.md").write_text("\n".join(index) + "\n", encoding="utf-8")
day = at[:10]
(out / "log.md").write_text(
f"# Log\n\n## {day}\n"
f"* **Build**: D by {GENERATOR}, {len(pages)} map pages and {len(registers)} register pages from {len(names)} "
f"sources. Thresholds, recorded before any count: a term is kept when it is a docs-page heading of level 2 or "
f"3 that passes concept test 2, or when it occurs in at least {MIN_DOCUMENTS} of the {len(names)} documents "
f"(case-insensitive, whole phrase). Terms: backticked spans of 3-40 characters and capitalised phrases of 2-4 "
f"words, a sentence-initial word dropped.\n",
encoding="utf-8")
return DStats(len(pages), len(registers))
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
sub = p.add_subparsers(dest="command", required=True)
b = sub.add_parser("build")
b.add_argument("--blocks", required=True)
b.add_argument("--kilde-root", required=True)
b.add_argument("--out", required=True)
b.add_argument("--at")
return p
def main(argv: list[str] | None = None) -> int:
args = build_parser().parse_args(argv)
try:
doc = json.loads(Path(args.blocks).read_text(encoding="utf-8"))
s = build(doc, Path(args.kilde_root), Path(args.out), args.at)
except (RunError, OSError, json.JSONDecodeError) as exc:
print(f"dmap cannot run: {exc}", file=sys.stderr)
return 2
print(f"D: {s.maps} map pages, {s.registers} register pages -> {args.out}")
return 0
if __name__ == "__main__":
sys.exit(main())

374
evals/p1/kpack.py Normal file
View file

@ -0,0 +1,374 @@
"""K, the fragment compiler's code side (TRIAL, P1): skeleton, packs, input parts, validation, identity. No model.
skeleton --kilde DIR --out FILE
The concept index from the titles and level 2-3 headings of every docs page under DIR that pass concept
test 2. One entry per normalised name (the first page in name order wins); an index, not pages.
pack N --blocks FILE --index FILE --kilde-root DIR --work DIR [--size 5]
Pack N's input for the compiler: every block of its sources with its anchor (file › section › span) and
numbered lines, then the index lines whose name occurs in those blocks, then the output contract, in parts
of at most PART_CHARS characters (the Read tool's cap). Prints the part paths and the output path.
accept N --work DIR --blocks FILE --kilde-root DIR
Validates pack N's fragments, resolves each to a concept by code (existing, merge candidate, new or
rejected), updates the index and appends the accepted fragments. Prints "accepted X of N" and the
rejections by reason, and how many accepted fragments resolved to a concept whose index line was not
sent with the pack (the pack log keeps the ids sent; the risk of the D7 phrase filter).
The work directory holds K-oppgaver/ (task parts), K-fragments/ (the compiler's JSON) and K-work/ (index.json,
accepted.json, packs.json). Exit 0 = done, 2 = could not run.
"""
from __future__ import annotations
import argparse
import json
import re
import sys
from collections import Counter
from pathlib import Path
from typing import Any
from okfwiki.audit import sentence_spans
from p1.split import docs_headings, is_meta
PART_CHARS = 60_000
MERGE_JACCARD = 0.6
NEEDS_QUOTE = re.compile(r"\d|`")
REASONS = ("malformed", "anchor-outside-pack", "anchor-crosses-blocks", "sentence-count", "quote-missing",
"quote-not-in-span", "tests-missing", "release-note-new", "meta")
class RunError(Exception):
"""The command cannot run as asked; nothing was written."""
def norm(name: str) -> str:
text = name.replace("`", "").lower()
text = re.sub(r"[^\w\s/.\-]", " ", text)
words = text.split()
if words and words[0] == "the":
words = words[1:]
words = [w[:-1] if len(w) > 3 and w.endswith("s") and not w.endswith("ss") else w for w in words]
return " ".join(w.strip(".") or w for w in words)
def slug(text: str) -> str:
return re.sub(r"[^a-z0-9]+", "-", text.lower()).strip("-")[:60] or "x"
def _unique_id(index: dict[str, Any], title: str) -> str:
taken = {e["id"] for e in index["entries"]}
base = slug(title)
eid, k = base, 2
while eid in taken:
eid, k = f"{base}-{k}", k + 1
return eid
def skeleton(kilde: Path) -> dict[str, Any]:
index: dict[str, Any] = {"schema": "okf-wiki/p1-index/1", "entries": []}
seen: dict[str, dict[str, Any]] = {}
for h in docs_headings(kilde):
if is_meta(h.text):
continue
n = norm(h.text)
if not n:
continue
if n in seen:
if h.text not in seen[n]["aliases"]:
seen[n]["aliases"].append(h.text)
continue
e = {"id": _unique_id(index, h.text), "title": h.text, "aliases": [h.text], "kind": "skeleton",
"merge_of": None, "origin": {"file": h.file, "line": h.line}}
index["entries"].append(e)
seen[n] = e
return index
def _names(e: dict[str, Any]) -> set[str]:
return {norm(a) for a in [e["title"], *e.get("aliases", [])]} - {""}
def _jaccard(a: str, b: str) -> float:
x, y = set(a.split()), set(b.split())
return len(x & y) / len(x | y) if x | y else 0.0
def resolve(fragment: dict[str, Any], index: dict[str, Any]) -> tuple[str, str | None]:
"""existing <id> | merge-candidate <id> | new | rejected <reason> (D6, D3b)."""
by_id = {e["id"]: e for e in index["entries"]}
if fragment.get("status") == "existing" and fragment.get("id") in by_id:
return "existing", str(fragment["id"])
n = norm(str(fragment.get("concept", "")))
for e in index["entries"]:
if n in _names(e):
return "existing", str(e["id"])
if str(fragment.get("anchor", {}).get("file", "")).startswith("release-"):
return "rejected", "release-note-new"
if is_meta(str(fragment.get("concept", ""))):
return "rejected", "meta"
best = max(((max(_jaccard(n, m) for m in _names(e)), str(e["id"])) for e in index["entries"] if _names(e)),
default=(0.0, ""))
if best[0] >= MERGE_JACCARD:
return "merge-candidate", best[1]
return "new", None
def relevant_lines(index: dict[str, Any], text: str) -> list[dict[str, Any]]:
"""Index entries whose normalised name or alias occurs as a phrase in the normalised text (D7)."""
hay = f" {norm(text)} "
return [e for e in index["entries"] if any(f" {m} " in hay for m in _names(e))]
def packs(names: list[str], size: int = 5) -> list[list[str]]:
return [names[i:i + size] for i in range(0, len(names), size)]
CONTRACT = """## Output contract
Write one JSON object `{"fragments": [...]}` to the output path named in your prompt. Each fragment:
`concept`, `status` ("existing" with the index `id`, or "new" with `tests`: {"topic_shape", "citation"}),
`text` (1-3 sentences), `anchor` {"file", "start", "end"} inside one block above, and `quote` (one piece copied from
one line inside the anchor; required when the text holds a digit or a backticked name). A new concept only from a docs
page, never from a release note.
"""
def render_input(pack_no: int, names: list[str], blocks_doc: dict[str, Any], index_lines: list[dict[str, Any]],
kilde: Path) -> list[str]:
lines = {n: (kilde / n).read_text(encoding="utf-8").split("\n") for n in names}
pieces: list[str] = [f"# K pack {pack_no}: {len(names)} sources\n\nSources in order: {', '.join(names)}\n\n"
+ CONTRACT + "\n## Blocks\n\n"]
for b in blocks_doc["blocks"]:
if b["file"] not in names:
continue
head = f"### {b['file']} › {b['section'] or '-'} › {b['start']}–{b['end']}"
if b.get("version"):
head += f" (version {b['version']})"
body = [f"{n}: {lines[b['file']][n - 1]}" for n in range(b["start"], b["end"] + 1)]
chunk = head + "\n"
for row in body:
if len(chunk) + len(row) + 1 > PART_CHARS // 2:
pieces.append(chunk + "\n")
chunk = head + " (continued)\n"
chunk += row + "\n"
pieces.append(chunk + "\n")
pieces.append("## Index (concepts named in these blocks)\n\n")
for e in index_lines:
aliases = "; ".join(a for a in e["aliases"] if a != e["title"])
pieces.append(f"- id: {e['id']} | {e['title']}" + (f" | aliases: {aliases}" if aliases else "") + "\n")
room = PART_CHARS - len("<!-- part 99 of 99 -->\n")
parts: list[str] = []
current = ""
for piece in pieces:
if current and len(current) + len(piece) > room:
parts.append(current)
current = ""
current += piece
if current:
parts.append(current)
total = len(parts)
return [f"<!-- part {i} of {total} -->\n" + p for i, p in enumerate(parts, 1)]
def validate(fragments: list[Any], names: list[str], blocks_doc: dict[str, Any], kilde: Path
) -> tuple[list[dict[str, Any]], Counter[str]]:
by_file: dict[str, list[dict[str, Any]]] = {}
for b in blocks_doc["blocks"]:
by_file.setdefault(b["file"], []).append(b)
texts: dict[str, list[str]] = {}
accepted: list[dict[str, Any]] = []
rejected: Counter[str] = Counter()
for f in fragments:
a = f.get("anchor") if isinstance(f, dict) else None
if not (isinstance(f, dict) and isinstance(f.get("concept"), str) and f["concept"].strip()
and f.get("status") in ("new", "existing") and isinstance(f.get("text"), str)
and isinstance(a, dict) and isinstance(a.get("file"), str)
and type(a.get("start")) is int and type(a.get("end")) is int and a["start"] <= a["end"]):
rejected["malformed"] += 1
continue
if a["file"] not in names:
rejected["anchor-outside-pack"] += 1
continue
block = next((b for b in by_file.get(a["file"], []) if b["start"] <= a["start"] and a["end"] <= b["end"]), None)
if block is None:
rejected["anchor-crosses-blocks"] += 1
continue
if not 1 <= len(sentence_spans(f["text"].strip())) <= 3:
rejected["sentence-count"] += 1
continue
if a["file"] not in texts:
texts[a["file"]] = (kilde / a["file"]).read_text(encoding="utf-8").split("\n")
span = texts[a["file"]][a["start"] - 1:a["end"]]
quote = f.get("quote")
if not (isinstance(quote, str) and quote.strip()):
if NEEDS_QUOTE.search(f["text"]):
rejected["quote-missing"] += 1
continue
quote, quote_line = None, None
else:
hit = next((a["start"] + i for i, line in enumerate(span) if quote in line), None)
if hit is None:
rejected["quote-not-in-span"] += 1
continue
quote_line = hit
tests = f.get("tests")
if f["status"] == "new" and not (isinstance(tests, dict) and str(tests.get("topic_shape", "")).strip()
and str(tests.get("citation", "")).strip()):
rejected["tests-missing"] += 1
continue
accepted.append({**f, "quote": quote, "quote_line": quote_line, "version": block.get("version"),
"section": block["section"], "position": names.index(a["file"]) + 1})
return accepted, rejected
def _read_json(path: Path) -> Any:
try:
return json.loads(path.read_text(encoding="utf-8"))
except (OSError, json.JSONDecodeError) as exc:
raise RunError(f"cannot read {path}: {exc}") from exc
def _write_json(path: Path, data: Any) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(json.dumps(data, ensure_ascii=False, indent=1) + "\n", encoding="utf-8")
def _pack_log(work: Path) -> dict[str, Any]:
path = work / "K-work" / "packs.json"
return _read_json(path) if path.is_file() else {"schema": "okf-wiki/p1-packs/1", "packs": []}
def _record(log: dict[str, Any], n: int) -> dict[str, Any]:
for r in log["packs"]:
if r["pack"] == n:
return r # type: ignore[no-any-return]
r = {"pack": n}
log["packs"].append(r)
return r
def cmd_pack(args: argparse.Namespace) -> int:
work, n = Path(args.work), args.n
doc = _read_json(Path(args.blocks))
all_packs = packs([str(x) for x in doc["order"]], args.size)
if not 1 <= n <= len(all_packs):
raise RunError(f"pack {n} does not exist; there are {len(all_packs)}")
names = all_packs[n - 1]
kilde = Path(args.kilde_root) / "kilde"
index = _read_json(Path(args.index))
text = "\n".join((kilde / name).read_text(encoding="utf-8") for name in names)
lines = relevant_lines(index, text)
parts = render_input(n, names, doc, lines, kilde)
out_dir = work / "K-oppgaver"
paths = [out_dir / f"pack-{n}-part-{i}.md" for i in range(1, len(parts) + 1)]
if any(p.exists() for p in paths):
raise RunError(f"pack {n}'s task parts exist in {out_dir}; refusing to overwrite")
out_dir.mkdir(parents=True, exist_ok=True)
for p, text_part in zip(paths, parts):
p.write_text(text_part, encoding="utf-8")
log = _pack_log(work)
rec = _record(log, n)
rec.update(sources=names, blocks=sum(b["file"] in names for b in doc["blocks"]), index_lines=len(lines),
index_total=len(index["entries"]), index_ids=[str(e["id"]) for e in lines], parts=len(parts),
chars=sum(len(p) for p in parts))
_write_json(work / "K-work" / "packs.json", log)
for p in paths:
print(f"part: {p}")
print(f"output: {work / 'K-fragments' / f'pack-{n}.json'}")
print(f"index lines sent: {len(lines)} of {len(index['entries'])}")
return 0
def cmd_accept(args: argparse.Namespace) -> int:
work, n = Path(args.work), args.n
doc = _read_json(Path(args.blocks))
names = packs([str(x) for x in doc["order"]], args.size)[n - 1]
kilde = Path(args.kilde_root) / "kilde"
raw = _read_json(work / "K-fragments" / f"pack-{n}.json")
fragments = raw.get("fragments") if isinstance(raw, dict) else None
if not isinstance(fragments, list):
raise RunError(f"pack {n}'s output has no fragments list")
index_path = work / "K-work" / "index.json"
index = _read_json(index_path)
valid, rejected = validate(fragments, names, doc, kilde)
acc_path = work / "K-work" / "accepted.json"
acc: dict[str, Any] = (_read_json(acc_path) if acc_path.is_file()
else {"schema": "okf-wiki/p1-accepted/1", "fragments": []})
if any(a["pack"] == n for a in acc["fragments"]):
raise RunError(f"pack {n} is already accepted")
sent = set(_record(_pack_log(work), n).get("index_ids", []))
not_sent: Counter[str] = Counter()
accepted = 0
for f in valid:
outcome, ref = resolve(f, index)
if outcome == "rejected":
rejected[str(ref)] += 1
continue
if outcome == "existing":
cid = str(ref)
else:
cid = _unique_id(index, f["concept"])
index["entries"].append({"id": cid, "title": f["concept"], "aliases": [f["concept"]], "kind": outcome,
"merge_of": ref, "origin": {"file": f["anchor"]["file"], "line": f["anchor"]["start"]},
"tests": f.get("tests")})
acc["fragments"].append({"pack": n, "position": f["position"], "file": f["anchor"]["file"],
"start": f["anchor"]["start"], "end": f["anchor"]["end"], "section": f["section"],
"text": f["text"].strip(), "quote": f["quote"], "quote_line": f["quote_line"],
"version": f["version"], "concept_id": cid, "outcome": outcome})
if cid not in sent:
not_sent[outcome] += 1
accepted += 1
_write_json(index_path, index)
_write_json(acc_path, acc)
log = _pack_log(work)
rec = _record(log, n)
rec.update(proposed=len(fragments), accepted=accepted, rejected=dict(sorted(rejected.items())),
not_sent={"total": sum(not_sent.values()), "by_outcome": dict(sorted(not_sent.items()))})
_write_json(work / "K-work" / "packs.json", log)
print(f"pack {n}: accepted {accepted} of {len(fragments)}")
print(f" accepted with a concept not among the index lines sent: {sum(not_sent.values())}")
for reason, count in sorted(rejected.items()):
print(f" rejected {reason}: {count}")
return 0
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
sub = p.add_subparsers(dest="command", required=True)
s = sub.add_parser("skeleton")
s.add_argument("--kilde", required=True)
s.add_argument("--out", required=True)
for name in ("pack", "accept"):
c = sub.add_parser(name)
c.add_argument("n", type=int)
c.add_argument("--blocks", required=True)
c.add_argument("--kilde-root", required=True)
c.add_argument("--work", required=True)
c.add_argument("--size", type=int, default=5)
if name == "pack":
c.add_argument("--index", required=True)
return p
def main(argv: list[str] | None = None) -> int:
args = build_parser().parse_args(argv)
try:
if args.command == "skeleton":
out = Path(args.out)
if out.exists():
raise RunError(f"{out} exists; refusing to overwrite")
index = skeleton(Path(args.kilde))
_write_json(out, index)
print(f"skeleton: {len(index['entries'])} entries -> {out}")
return 0
if args.command == "pack":
return cmd_pack(args)
return cmd_accept(args)
except (RunError, OSError) as exc:
print(f"kpack cannot run: {exc}", file=sys.stderr)
return 2
if __name__ == "__main__":
sys.exit(main())

361
evals/p1/measure.py Normal file
View file

@ -0,0 +1,361 @@
"""The trial's measures without a reader (TRIAL, P1): audit record, coverage, structure. It calls no model.
audit --bundle B --root R --variant V --out FILE
Runs the auditor in process and records, per variant, the exit status, findings per check, uncited
sentences by cause (fence line, table row, link lead-in, prose), "yaml form" findings (a quote that YAML
loaded as another type, a timestamp in the wrong form) and criterion 1 (N of N, claims.py's count).
coverage --bundle B --root R --blocks F --built N [--pack-size K] --out FILE
Blocks of the first N sources in the order with at least one body-cited source entry whose locator line
lies inside the block (spans are not used), X of N blocks; per pack position with --pack-size.
structure --bundle B --root R --blocks F [--skeleton I] --out FILE
Pages, concepts per source (the earliest source in the order among a page's body-cited sources),
skeleton entries without a page, duplicates (same name, alias or title Jaccard >= 0.6), merge
candidates, islands, sources per page, version numbers in running text, concept tests 2 and 4,
the share of quotes on a structural line and of code-supplied quotes (version sources left out), and the
precision of each body-cited entry (line, block, section, document).
--root is the folder that contains kilde/. Before reporting, structure and coverage check that at least one quote
stands at its locator under --root, because a wrong root makes every quote unreadable. Exit 0 = written, 2 = could
not run (an existing output, or a variant already in the audit record, is never overwritten).
"""
from __future__ import annotations
import argparse
import json
import sys
from collections import Counter
from dataclasses import dataclass, field
from pathlib import Path
from typing import Any
from okfwiki import claims as claims_mod
from okfwiki.audit import (
FOOTNOTE_REF,
LINK,
LINK_ONLY,
Document,
audit,
body_links,
is_bundle_link,
load_bundle,
mask_code,
prose_blocks,
resolve,
sentences,
)
from okfwiki.view import is_version_heading, related, versions
from p1.assemble import structural
from p1.kpack import MERGE_JACCARD, norm
from p1.split import FENCE, is_meta
STRUCTURE_SCHEMA = "okf-wiki/p1-structure/1"
RESULT_SCHEMA = "okf-wiki/p1-result/1"
class RunError(Exception):
"""The measure cannot run as asked; nothing was written."""
@dataclass
class Coverage:
covered: int
total: int
per_position: dict[int, tuple[int, int, int]] = field(default_factory=dict)
def _entries(doc: Document) -> dict[str, dict[str, Any]]:
srcs = (doc.frontmatter or {}).get("sources")
return {str(s["id"]): s for s in srcs if isinstance(s, dict) and "id" in s} if isinstance(srcs, list) else {}
def cited(doc: Document) -> list[dict[str, Any]]:
"""The source entries a body footnote uses, in label order of first use."""
entries = _entries(doc)
labels: list[str] = []
for block in prose_blocks(doc):
for label in FOOTNOTE_REF.findall(mask_code(block.text)):
if label not in labels:
labels.append(label)
return [entries[x] for x in labels if x in entries]
def _file(s: dict[str, Any]) -> str:
return Path(str(s.get("resource", ""))).name
def _line(s: dict[str, Any]) -> int | None:
loc = s.get("x-locator")
return loc["line"] if isinstance(loc, dict) and type(loc.get("line")) is int else None
class _Lines:
def __init__(self, root: Path) -> None:
self.root = root
self.cache: dict[str, list[str] | None] = {}
def get(self, name: str) -> list[str] | None:
if name not in self.cache:
p = self.root / "kilde" / name
self.cache[name] = p.read_text(encoding="utf-8").split("\n") if p.is_file() else None
return self.cache[name]
def _check_root(concepts: list[Document], root: Path) -> None:
lines = _Lines(root)
seen = 0
for d in concepts:
for s in _entries(d).values():
n, quote, text = _line(s), s.get("x-quote"), lines.get(_file(s))
seen += 1
if n and isinstance(quote, str) and text and n <= len(text) and quote in text[n - 1]:
return
if seen:
raise RunError(f"no quote stands at its locator under {root}; is it the folder that contains kilde/?")
def _block_of(blocks: list[dict[str, Any]], file: str, line: int) -> dict[str, Any] | None:
return next((b for b in blocks if b["file"] == file and b["start"] <= line <= b["end"]), None)
def coverage(bundle: Path, root: Path, blocks_doc: dict[str, Any], built: list[str],
pack_size: int | None = None) -> Coverage:
concepts = load_bundle(bundle, root).concepts
_check_root(concepts, root)
blocks = [b for b in blocks_doc["blocks"] if b["file"] in built]
hit: set[tuple[str, int]] = set()
for d in concepts:
for s in cited(d):
n = _line(s)
b = _block_of(blocks, _file(s), n) if n else None
if b is not None:
hit.add((b["file"], b["start"]))
result = Coverage(len(hit), len(blocks))
if pack_size:
names = [str(x) for x in blocks_doc["order"] if x in built]
for pos in range(1, pack_size + 1):
files = {n for i, n in enumerate(names) if i % pack_size == pos - 1}
if files:
mine = [b for b in blocks if b["file"] in files]
result.per_position[pos] = (sum((b["file"], b["start"]) in hit for b in mine), len(mine), len(files))
return result
def _jaccard(a: str, b: str) -> float:
x, y = set(a.split()), set(b.split())
return len(x & y) / len(x | y) if x | y else 0.0
def duplicates(concepts: list[Document]) -> list[tuple[str, str, str]]:
info = []
for d in concepts:
fm = d.frontmatter or {}
aliases = fm.get("x-aliases")
info.append((d.rel, norm(str(fm.get("title", ""))),
{norm(str(a)) for a in aliases} if isinstance(aliases, list) else set()))
pairs: list[tuple[str, str, str]] = []
for i, (a, na, aa) in enumerate(info):
for b, nb, ab in info[i + 1:]:
if na and na == nb:
pairs.append((a, b, "norm"))
elif na in ab or nb in aa:
pairs.append((a, b, "alias"))
elif _jaccard(na, nb) >= MERGE_JACCARD:
pairs.append((a, b, "jaccard"))
return pairs
def _kind(d: Document) -> str:
fm = d.frontmatter or {}
if fm.get("x-merge-candidate"):
return "merge-candidate"
return {"Document map": "map", "Register entry": "register"}.get(str(fm.get("type", "")), "concept")
def _precision(s: dict[str, Any], blocks: list[dict[str, Any]]) -> str:
span = s.get("x-span")
n = _line(s) or 0
a, z = (span[0], span[1]) if isinstance(span, list) and len(span) == 2 else (n, n)
if a == z:
return "line"
inside = [b for b in blocks if b["file"] == _file(s) and b["end"] >= a and b["start"] <= z]
if len(inside) == 1 and inside[0]["start"] <= a and z <= inside[0]["end"]:
return "block"
if inside and len({b["section"] for b in inside}) == 1:
return "section"
return "document"
def structure(bundle: Path, root: Path, blocks_doc: dict[str, Any], order: list[str],
skeleton: dict[str, Any] | None = None) -> dict[str, Any]:
concepts = load_bundle(bundle, root).concepts
_check_root(concepts, root)
lines = _Lines(root)
blocks = list(blocks_doc["blocks"])
rank = {n: i for i, n in enumerate(order)}
per_source: Counter[str] = Counter()
incoming: Counter[str] = Counter()
rels = {d.rel for d in concepts}
for d in concepts:
for _line_no, target in body_links(d):
other = resolve(d.rel, target) if is_bundle_link(target) else None
if other in rels and other != d.rel:
incoming[str(other)] += 1
quotes: Counter[str] = Counter()
precision: Counter[str] = Counter()
docs_per_page: list[int] = []
test2 = test4 = 0
for d in concepts:
cs = cited(d)
files = [_file(s) for s in cs if _file(s) in rank]
if files:
per_source[min(files, key=lambda f: rank[f])] += 1
docs_per_page.append(len(set(_file(s) for s in cs)))
title = str((d.frontmatter or {}).get("title", ""))
test2 += not is_meta(title)
test4 += incoming[d.rel] >= 2 or len(set(files)) >= 2
for s in cs:
if is_version_heading(s):
continue
quotes["entries"] += 1
quotes["code"] += s.get("x-quote-by") == "code"
text, n = lines.get(_file(s)), _line(s)
quotes["structural"] += bool(text and n and n <= len(text) and structural(text[n - 1]))
precision[_precision(s, blocks)] += 1
rel_map = related(concepts)
kinds = {d.rel: _kind(d) for d in concepts}
islands: dict[str, Any] = {"total": sum(not v for v in rel_map.values())}
for k in sorted(set(kinds.values())):
islands[k] = sum(not rel_map[r] for r, kk in kinds.items() if kk == k)
pages = {d.rel for d in concepts}
unused = None
if skeleton is not None:
unused = sum(e.get("kind") == "skeleton" and f"{e['id']}.md" not in pages for e in skeleton["entries"])
tests13 = None
if skeleton is not None:
new_ids = {e["id"] for e in skeleton["entries"] if e.get("kind") == "new" and e.get("tests")}
tests13 = sum(f"{i}.md" in pages for i in new_ids)
v = versions(bundle, root)
dups = duplicates(concepts)
return {
"schema": STRUCTURE_SCHEMA,
"pages": len(concepts),
"page_kinds": dict(Counter(kinds.values())),
"concepts_per_source": {n: per_source[n] for n in order if per_source[n]},
"skeleton_unused": unused,
"duplicates": {"pairs": len(dups), "by_rule": dict(Counter(r for _, _, r in dups)),
"list": [list(p) for p in dups]},
"merge_candidates": sum(k == "merge-candidate" for k in kinds.values()),
"islands": islands,
"documents_per_page": {"mean": round(sum(docs_per_page) / len(docs_per_page), 2) if docs_per_page else 0,
"max": max(docs_per_page, default=0)},
"version_numbers_in_text": {"flagged": len(v.flagged), "claims": v.total},
"concept_tests": {"test2": test2, "test4": test4, "tests1and3_self_declared": tests13},
"quotes": {"entries": quotes["entries"], "structural": quotes["structural"], "code": quotes["code"]},
"precision": {k: precision[k] for k in ("line", "block", "section", "document")},
}
def _uncited_cause(sentence: str, block_text: str) -> str:
s = sentence.strip()
if FENCE.match(block_text): # the auditor's sentence text masks code spans, so a fence is read on the block
return "fence line"
if s.startswith("|"):
return "table row"
if LINK.search(block_text) and not LINK_ONLY.match(mask_code(block_text)):
return "link lead-in"
return "prose"
def audit_record(bundle: Path, root: Path, variant: str, out: Path) -> dict[str, Any]:
record_all: dict[str, Any] = (json.loads(out.read_text(encoding="utf-8")) if out.is_file()
else {"schema": RESULT_SCHEMA, "variants": {}})
if variant in record_all["variants"]:
raise RunError(f"{out} already records variant {variant}")
b = load_bundle(bundle, root)
found = audit(bundle, root)
uncited: Counter[str] = Counter()
for d in b.concepts:
for block in prose_blocks(d):
if LINK_ONLY.match(mask_code(block.text)):
continue
for s in sentences(block.text):
if not FOOTNOTE_REF.search(s):
uncited[_uncited_cause(s, block.text)] += 1
yaml_form = 0
for d in b.concepts:
for entry in _entries(d).values():
q = entry.get("x-quote")
yaml_form += q is not None and not isinstance(q, str)
yaml_form += sum(f.check == "timestamp-form" for f in found)
listed = claims_mod.extract(bundle, root)
ok, total = claims_mod.criterion_1(listed)["total"]
rec = {"exit": 1 if found else 0, "findings": dict(sorted(Counter(f.check for f in found).items())),
"uncited": dict(sorted(uncited.items())), "yaml_form": yaml_form, "criterion_1": [ok, total]}
record_all["variants"][variant] = rec
out.parent.mkdir(parents=True, exist_ok=True)
out.write_text(json.dumps(record_all, ensure_ascii=False, indent=1) + "\n", encoding="utf-8")
return rec
def _write_new(path: Path, data: Any) -> None:
if path.exists():
raise RunError(f"{path} exists; refusing to overwrite")
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(json.dumps(data, ensure_ascii=False, indent=1) + "\n", encoding="utf-8")
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
sub = p.add_subparsers(dest="command", required=True)
a = sub.add_parser("audit")
a.add_argument("--bundle", required=True)
a.add_argument("--root", required=True)
a.add_argument("--variant", required=True)
a.add_argument("--out", required=True)
c = sub.add_parser("coverage")
s = sub.add_parser("structure")
for x in (c, s):
x.add_argument("--bundle", required=True)
x.add_argument("--root", required=True)
x.add_argument("--blocks", required=True)
x.add_argument("--out", required=True)
c.add_argument("--built", type=int, required=True)
c.add_argument("--pack-size", type=int)
s.add_argument("--skeleton")
return p
def main(argv: list[str] | None = None) -> int:
args = build_parser().parse_args(argv)
try:
bundle, root = Path(args.bundle), Path(args.root)
if not bundle.is_dir():
raise RunError(f"the bundle {bundle} is not a directory")
if args.command == "audit":
rec = audit_record(bundle, root, args.variant, Path(args.out))
print(f"{args.variant}: audit exit {rec['exit']}, criterion 1 {rec['criterion_1'][0]} of "
f"{rec['criterion_1'][1]}, findings {rec['findings']}")
return 0
blocks_doc = json.loads(Path(args.blocks).read_text(encoding="utf-8"))
order = [str(x) for x in blocks_doc["order"]]
if args.command == "coverage":
cov = coverage(bundle, root, blocks_doc, order[:args.built], args.pack_size)
_write_new(Path(args.out), {"schema": "okf-wiki/p1-coverage/1", "covered": cov.covered, "total": cov.total,
"built": args.built,
"per_position": {str(k): list(v) for k, v in cov.per_position.items()}})
print(f"coverage: {cov.covered} of {cov.total} blocks")
return 0
skeleton = json.loads(Path(args.skeleton).read_text(encoding="utf-8")) if args.skeleton else None
data = structure(bundle, root, blocks_doc, order, skeleton)
_write_new(Path(args.out), data)
print(f"structure: {data['pages']} pages, {data['duplicates']['pairs']} duplicate pairs, "
f"{data['islands']['total']} islands")
return 0
except (RunError, OSError, json.JSONDecodeError, KeyError) as exc:
print(f"measure cannot run: {exc}", file=sys.stderr)
return 2
if __name__ == "__main__":
sys.exit(main())

185
evals/p1/sidebyside.py Normal file
View file

@ -0,0 +1,185 @@
"""The side-by-side page (TRIAL, P1): the same concepts in every build, every source link checked. It calls no model.
render --begreper FILE --col LABEL=DIR ... [--col LABEL=-] --kilde-root DIR --out FILE
One self-contained HTML page: one row per concept in begreper.txt (name, a tab, aliases joined by ;), one
column per build. A cell shows the pages whose normalised title or alias equals the concept's (for the L4
column: whose normalised title or description contains it), each with its body and its sources
(file › line or span). An empty cell says why: "ikke bygget" (a build given as -, stopped), "ikke i
registeret" (D has no register page for it), "ingen side" (built, no page).
check --html FILE --kilde-root DIR
A source link resolves when its file exists under kilde/ and its line or span lies inside the file.
Prints "resolved X of N"; exit 1 when X < N.
Exit 0 = done, 1 = an unresolved link (check), 2 = could not run.
"""
from __future__ import annotations
import argparse
import os
import re
import sys
from pathlib import Path
from typing import Any
from okfwiki.audit import load_bundle
from okfwiki.view import esc
from p1.kpack import norm
from p1.measure import cited
Concept = tuple[str, tuple[str, ...]]
SRC = re.compile(r'<a class="src" href="[^"]*" data-file="([^"]+)" data-start="(\d+)" data-end="(\d+)">')
STYLE = """
:root { --bg: #fdfdfb; --fg: #1d1d1b; --muted: #6b6b66; --line: #ddd9cf; --cell: #ffffff; }
@media (prefers-color-scheme: dark) { :root { --bg: #1b1b1a; --fg: #ecebe6; --muted: #a3a29b; --line: #3a3934;
--cell: #242422; } }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, sans-serif; margin: 16px; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
th, td { border: 1px solid var(--line); vertical-align: top; padding: 8px; background: var(--cell); }
th.concept-name { width: 10em; text-align: left; }
.empty { color: var(--muted); font-style: italic; }
.page h3 { margin: 0 0 4px; font-size: 15px; }
.sources { color: var(--muted); font-size: 13px; }
.wrap { overflow-x: auto; }
"""
class RunError(Exception):
"""The command cannot run as asked; nothing was written."""
def read_begreper(path: Path) -> list[Concept]:
out: list[Concept] = []
for line in path.read_text(encoding="utf-8").splitlines():
if line.strip():
name, _, aliases = line.partition("\t")
out.append((name.strip(), tuple(a.strip() for a in aliases.split(";") if a.strip()) or (name.strip(),)))
return out
def _l4_norm(text: str) -> str:
return f" {norm(text.replace('-', ' '))} "
def find(bundle: Path, concept: Concept, l4: bool = False) -> list[str]:
wanted = {norm(n) for n in (concept[0], *concept[1])} - {""}
found: list[str] = []
for d in load_bundle(bundle, bundle).concepts:
fm = d.frontmatter or {}
if l4:
hay = _l4_norm(str(fm.get("title", ""))) + _l4_norm(str(fm.get("description", "")))
if any(f" {norm(w.replace('-', ' '))} " in hay for w in wanted):
found.append(d.rel)
continue
aliases = fm.get("x-aliases")
names = {norm(str(fm.get("title", "")))} | ({norm(str(a)) for a in aliases} if isinstance(aliases, list)
else set())
if names & wanted:
found.append(d.rel)
return found
def _sources_html(entries: list[dict[str, Any]], kilde: Path, out_dir: Path) -> str:
items = []
for s in entries:
file = Path(str(s.get("resource", ""))).name
loc = s.get("x-locator")
line = loc.get("line") if isinstance(loc, dict) else None
span = s.get("x-span")
a, z = (span[0], span[1]) if isinstance(span, list) and len(span) == 2 else (line, line)
if not isinstance(a, int) or not isinstance(z, int):
continue
href = os.path.relpath(kilde / file, out_dir).replace(os.sep, "/") + f"#L{a}"
where = f"{a}" if a == z else f"{a}–{z}"
items.append(f'<li><a class="src" href="{esc(href)}" data-file="{esc(file)}" data-start="{a}" '
f'data-end="{z}">{esc(file)} › {where}</a></li>')
return '<ul class="sources">' + "".join(items) + "</ul>"
def _cell(bundle: Path | None, label: str, concept: Concept, kilde_root: Path, out_dir: Path) -> str:
if bundle is None:
return '<td class="cell empty">ikke bygget</td>'
rels = find(bundle, concept, l4=label == "L4")
if not rels:
return f'<td class="cell empty">{"ikke i registeret" if label == "D" else "ingen side"}</td>'
docs = {d.rel: d for d in load_bundle(bundle, kilde_root).concepts}
parts = []
for rel in rels:
d = docs[rel]
fm = d.frontmatter or {}
srcs = fm.get("sources")
entries = cited(d) or ([s for s in srcs if isinstance(s, dict)] if isinstance(srcs, list) else [])
paras = [p.strip() for p in re.split(r"\n\s*\n", d.body) if p.strip() and not p.strip().startswith("# ")]
body = "".join(f"<p>{esc(p)}</p>" for p in paras if not p.startswith("[^"))
parts.append(f'<div class="page"><h3>{esc(str(fm.get("title", rel)))} <small>({esc(rel)})</small></h3>'
f"{body}{_sources_html(entries, kilde_root / 'kilde', out_dir)}</div>")
return '<td class="cell">' + "".join(parts) + "</td>"
def render(begreper: list[Concept], columns: list[tuple[str, Path | None]], kilde_root: Path, out: Path) -> None:
out_dir = out.parent
head = "".join(f"<th>{esc(label)}</th>" for label, _ in columns)
rows = []
for concept in begreper:
cells = "".join(_cell(b, label, concept, kilde_root, out_dir) for label, b in columns)
rows.append(f'<tr class="concept"><th class="concept-name">{esc(concept[0])}</th>{cells}</tr>')
html = (f'<!doctype html><html lang="no"><head><meta charset="utf-8">'
f'<meta name="viewport" content="width=device-width, initial-scale=1"><title>P1 side om side</title>'
f"<style>{STYLE}</style></head><body><h1>P1: tre begreper, side om side</h1>"
f'<div class="wrap"><table><tr><th class="concept-name">Begrep</th>{head}</tr>{"".join(rows)}'
f"</table></div></body></html>\n")
out.parent.mkdir(parents=True, exist_ok=True)
out.write_text(html, encoding="utf-8")
def check(html_path: Path, kilde_root: Path) -> tuple[int, int]:
html = html_path.read_text(encoding="utf-8")
resolved = total = 0
sizes: dict[str, int | None] = {}
for file, a, z in SRC.findall(html):
total += 1
if file not in sizes:
p = kilde_root / "kilde" / file
sizes[file] = len(p.read_text(encoding="utf-8").splitlines()) if p.is_file() else None
n = sizes[file]
resolved += n is not None and 1 <= int(a) <= int(z) <= n
return resolved, total
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
sub = p.add_subparsers(dest="command", required=True)
r = sub.add_parser("render")
r.add_argument("--begreper", required=True)
r.add_argument("--col", action="append", required=True, help="LABEL=DIR, or LABEL=- for a stopped build")
r.add_argument("--kilde-root", required=True)
r.add_argument("--out", required=True)
c = sub.add_parser("check")
c.add_argument("--html", required=True)
c.add_argument("--kilde-root", required=True)
return p
def main(argv: list[str] | None = None) -> int:
args = build_parser().parse_args(argv)
try:
if args.command == "render":
columns: list[tuple[str, Path | None]] = []
for col in args.col:
label, _, path = col.partition("=")
if not label or not path:
raise RunError(f"--col {col!r} is not LABEL=DIR")
columns.append((label, None if path == "-" else Path(path)))
render(read_begreper(Path(args.begreper)), columns, Path(args.kilde_root), Path(args.out))
print(f"side by side: {len(columns)} columns -> {args.out}")
return 0
resolved, total = check(Path(args.html), Path(args.kilde_root))
print(f"resolved {resolved} of {total}")
return 0 if total and resolved == total else 1
except (RunError, OSError) as exc:
print(f"sidebyside cannot run: {exc}", file=sys.stderr)
return 2
if __name__ == "__main__":
sys.exit(main())

328
evals/p1/split.py Normal file
View file

@ -0,0 +1,328 @@
"""Split the trial's sources into a fixed order and into blocks with line spans (TRIAL, P1). It calls no model.
order --manifest M --l4 L4DIR --out FILE
The 19 names of the cut (gates/wholedoc.manifest.json cut.names) in the trial's fixed order: docs pages by
name, then release notes by version. Refuses when the names differ from the files the L4 cut cites.
blocks --kilde DIR --order FILE --out FILE
Every block of every source in the order: a paragraph, one list item with its continuation lines, one
table or one fenced code block, with its 1-based inclusive line span, its section (the heading path) and,
for a release note, its version. Heading lines are section markers, not blocks.
total --kilde DIR
The number of blocks in every file under DIR (the denominator of the 599-source projection).
pick --blocks FILE --kilde DIR [--focus NAME] --out FILE
The three concepts of the side-by-side page, picked from the source text before any build: the focus page's
heading with the most blocks, the term in the most release notes, and the term in at least two docs pages and
two release notes with the highest document count; a document counts for a term only where the term stands
as a term (backticked or a capitalised phrase), never as a word in prose. One line per concept: name, a tab,
aliases joined by ;.
Exit 0 = written, 2 = could not run (an existing output is never overwritten).
"""
from __future__ import annotations
import argparse
import json
import re
import sys
from dataclasses import asdict, dataclass
from pathlib import Path
from typing import Any
from okfwiki.audit import HEADING, LIST_ITEM, read_document
SCHEMA = "okf-wiki/p1-blocks/1"
RELEASE = re.compile(r"^release-v(\d+(?:\.\d+)*)\.md$")
VERSION_HEADING = re.compile(r"^v?(\d+(?:\.\d+){2,})$")
FENCE = re.compile(r"^\s*(```|~~~)")
# Concept test 2 of the brief (Google's reference agent), plus the generic section names of docs pages.
META_STOP = frozenset({
"overview", "introduction", "getting started", "quickstart", "tutorial", "walkthrough", "release notes",
"changelog", "roadmap", "faq", "prerequisites", "next steps", "before you begin", "troubleshooting", "see also",
"related resources", "learn more",
})
CODE_TERM = re.compile(r"`([^`\n]{3,40})`")
CAPITAL_PHRASE = re.compile(r"\b[A-Z][\w-]*(?:[ \t]+[A-Z][\w-]*){1,3}\b")
SENTENCE_START = re.compile(r"(?:^|[.!?:]\s+|^\s*(?:[-*+]|\d+[.)])\s+)$")
class RunError(Exception):
"""The command cannot run as asked; nothing was written."""
@dataclass(frozen=True)
class SBlock:
file: str
start: int
end: int
kind: str # paragraph | item | table | code
section: str
version: str | None
@dataclass(frozen=True)
class Heading:
file: str
line: int
level: int
text: str
@dataclass(frozen=True)
class Picked:
name: str
aliases: tuple[str, ...]
def is_meta(title: str) -> bool:
return title.strip().lower() in META_STOP
def version_key(name: str) -> tuple[int, ...]:
m = RELEASE.match(name)
if m is None:
raise RunError(f"{name} is not a release note name")
return tuple(int(p) for p in m.group(1).split("."))
def order(names: list[str]) -> list[str]:
docs = sorted(n for n in names if n.startswith("docs-"))
releases = [n for n in names if n.startswith("release-")]
other = [n for n in names if n not in docs and n not in releases]
if other:
raise RunError(f"names that are neither docs pages nor release notes: {other}")
return docs + sorted(releases, key=version_key)
def headings_of(lines: list[str]) -> list[tuple[int, int, str]]:
"""(line, level, text) of every heading outside fenced code."""
out: list[tuple[int, int, str]] = []
fence: str | None = None
for n, raw in enumerate(lines, 1):
f = FENCE.match(raw)
if f:
fence = None if fence == f.group(1) else (fence or f.group(1))
continue
if fence is None:
m = HEADING.match(raw)
if m:
out.append((n, len(m.group(1)), (m.group(2) or "").strip()))
return out
def blocks(path: Path) -> list[SBlock]:
lines = path.read_text(encoding="utf-8").split("\n")
name = path.name
version: str | None = None
if name.startswith("release-"):
for _n, _level, text in headings_of(lines):
m = VERSION_HEADING.match(text)
if m:
version = m.group(1)
break
out: list[SBlock] = []
stack: list[tuple[int, str]] = []
kind: str | None = None
start = 0
fence: str | None = None
def close(end: int) -> None:
nonlocal kind
if kind is not None:
out.append(SBlock(name, start, end, kind, " › ".join(t for _, t in stack), version))
kind = None
for n, raw in enumerate(lines, 1):
f = FENCE.match(raw)
if fence is not None:
if f and f.group(1) == fence:
fence = None
close(n)
continue
if f:
close(n - 1)
fence, kind, start = f.group(1), "code", n
continue
if not raw.strip():
close(n - 1)
continue
m = HEADING.match(raw)
if m:
close(n - 1)
level = len(m.group(1))
stack = [(lv, t) for lv, t in stack if lv < level] + [(level, (m.group(2) or "").strip())]
continue
if raw.lstrip().startswith("|"):
if kind != "table":
close(n - 1)
kind, start = "table", n
continue
if LIST_ITEM.match(raw):
close(n - 1)
kind, start = "item", n
continue
if kind in (None, "table"):
close(n - 1)
kind, start = "paragraph", n
if fence is not None:
close(len(lines))
else:
last = len(lines)
while last > 0 and not lines[last - 1].strip():
last -= 1
close(last)
return out
def docs_headings(kilde: Path) -> list[Heading]:
out: list[Heading] = []
for path in sorted(kilde.glob("docs-*.md")):
for n, level, text in headings_of(path.read_text(encoding="utf-8").split("\n")):
if level <= 3 and text:
out.append(Heading(path.name, n, level, text))
return out
def blocks_document(kilde: Path, names: list[str]) -> dict[str, Any]:
found: list[dict[str, Any]] = []
for name in names:
path = kilde / name
if not path.is_file():
raise RunError(f"{path} is not a file")
found.extend(asdict(b) for b in blocks(path))
return {"schema": SCHEMA, "order": names, "blocks": found}
def blocks_total(kilde: Path) -> int:
return sum(len(blocks(p)) for p in sorted(kilde.glob("*.md")))
def terms(text: str) -> list[str]:
"""Backticked spans of 3-40 characters and capitalised phrases of 2-4 words, a sentence-initial word dropped."""
found: list[str] = [t for t in (m.group(1).strip() for m in CODE_TERM.finditer(text)) if 3 <= len(t) <= 40]
masked = CODE_TERM.sub(lambda m: " " * len(m.group(0)), text)
for raw in masked.split("\n"):
for m in CAPITAL_PHRASE.finditer(raw):
words = m.group(0).split()
if SENTENCE_START.search(raw[:m.start()]):
words = words[1:]
if len(words) >= 2:
found.append(" ".join(words))
return list(dict.fromkeys(t for t in found if t))
def occurs(term: str, text: str) -> bool:
return re.search(r"(?<!\w)" + re.escape(term) + r"(?!\w)", text, re.IGNORECASE) is not None
def pick(blocks_doc: dict[str, Any], kilde: Path, focus: str = "docs-en-permission-modes.md") -> list[Picked]:
names = [str(n) for n in blocks_doc["order"]]
if focus not in names:
raise RunError(f"the focus page {focus} is not in the order")
texts = {n: (kilde / n).read_text(encoding="utf-8") for n in names}
per_section: dict[str, int] = {}
for b in blocks_doc["blocks"]:
if b["file"] == focus and b["section"].count(" › ") >= 1:
per_section[b["section"]] = per_section.get(b["section"], 0) + 1
candidates = [(count, section.split(" › ")[-1]) for section, count in per_section.items()
if not is_meta(section.split(" › ")[-1])]
if not candidates:
raise RunError(f"{focus} has no heading below its title that passes test 2")
first = sorted(candidates, key=lambda c: (-c[0], c[1]))[0][1]
pool = list(dict.fromkeys(t for n in names for t in terms(texts[n])))
docs = [n for n in names if n.startswith("docs-")]
releases = [n for n in names if n.startswith("release-")]
as_terms = {n: set(terms(texts[n])) for n in names}
def count(term: str, files: list[str]) -> int:
return sum(term in as_terms[f] for f in files) # where it stands as a term, not as a word in prose
taken = {first.lower()}
second_pool = [t for t in pool if t.lower() not in taken]
if not second_pool:
raise RunError("no term for the second concept")
second = sorted(second_pool, key=lambda t: (-count(t, releases), t))[0]
taken.add(second.lower())
third_pool = [t for t in pool if t.lower() not in taken and count(t, docs) >= 2 and count(t, releases) >= 2]
if not third_pool:
raise RunError("no term in two docs pages and two release notes for the third concept")
third = sorted(third_pool, key=lambda t: (-count(t, names), t))[0]
return [Picked(first, (first,)), Picked(second, (second,)), Picked(third, (third,))]
def _write_new(path: Path, text: str) -> None:
if path.exists():
raise RunError(f"{path} exists; refusing to overwrite")
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(text, encoding="utf-8")
def l4_cited(l4: Path) -> set[str]:
cited: set[str] = set()
for page in sorted(l4.glob("*.md")):
fm = read_document(page, page.name).frontmatter or {}
srcs = fm.get("sources")
for s in srcs if isinstance(srcs, list) else []:
res = s.get("resource") if isinstance(s, dict) else None
if isinstance(res, str) and res:
cited.add(Path(res).name)
return cited
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
sub = p.add_subparsers(dest="command", required=True)
o = sub.add_parser("order")
o.add_argument("--manifest", required=True)
o.add_argument("--l4", required=True)
o.add_argument("--out", required=True)
b = sub.add_parser("blocks")
b.add_argument("--kilde", required=True)
b.add_argument("--order", required=True)
b.add_argument("--out", required=True)
t = sub.add_parser("total")
t.add_argument("--kilde", required=True)
k = sub.add_parser("pick")
k.add_argument("--blocks", required=True)
k.add_argument("--kilde", required=True)
k.add_argument("--focus", default="docs-en-permission-modes.md")
k.add_argument("--out", required=True)
return p
def main(argv: list[str] | None = None) -> int:
args = build_parser().parse_args(argv)
try:
if args.command == "order":
manifest = json.loads(Path(args.manifest).read_text(encoding="utf-8"))
names = manifest.get("cut", {}).get("names")
if not isinstance(names, list) or not names:
raise RunError(f"{args.manifest} records no cut names")
cited = l4_cited(Path(args.l4))
if set(map(str, names)) != cited:
raise RunError(f"the manifest's {len(names)} names differ from the {len(cited)} files the L4 cut cites: "
f"only in manifest {sorted(set(names) - cited)}, only in L4 {sorted(cited - set(names))}")
fixed = order([str(n) for n in names])
_write_new(Path(args.out), "\n".join(fixed) + "\n")
print(f"order: {len(fixed)} sources -> {args.out}")
elif args.command == "blocks":
names = Path(args.order).read_text(encoding="utf-8").split()
doc = blocks_document(Path(args.kilde), names)
_write_new(Path(args.out), json.dumps(doc, ensure_ascii=False, indent=1) + "\n")
print(f"blocks: {len(doc['blocks'])} in {len(names)} sources -> {args.out}")
elif args.command == "total":
print(f"blocks in every file of {args.kilde}: {blocks_total(Path(args.kilde))}")
else:
doc = json.loads(Path(args.blocks).read_text(encoding="utf-8"))
picked = pick(doc, Path(args.kilde), args.focus)
_write_new(Path(args.out), "".join(f"{p.name}\t{';'.join(p.aliases)}\n" for p in picked))
print(f"pick: {len(picked)} concepts -> {args.out}")
except (RunError, OSError, json.JSONDecodeError) as exc:
print(f"split cannot run: {exc}", file=sys.stderr)
return 2
return 0
if __name__ == "__main__":
sys.exit(main())

View file

@ -0,0 +1,355 @@
"""Tests for evals/direction_probe.py: the direction probe R (PLAN.md § Leveranser, row R).
Three arms answer the same questions from the same sources: file search alone, the okf-wiki plus file search, and a
wiki built with Astro-Han's karpathy-llm-wiki skill. The module sets up each arm's basis and task files, collects the
answers into the gates' format, harvests tokens and isolation breaches from the subagent transcripts, and prints the
table. It never calls a model. The fixtures are synthetic text about gardening (CLAUDE.md rule 3).
Run: python3 -m unittest discover -s evals/tests
"""
from __future__ import annotations
import json
import sys
import tempfile
import unittest
from pathlib import Path
from typing import Any
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT / "evals"))
import direction_probe as dp # noqa: E402
TOMATO = "# Tomatoes\nTomatoes need full sun.\nWater them every morning.\n"
BASIL = "# Basil\nBasil likes warm soil.\n"
MINT = "# Mint\nMint spreads through runners.\n"
NOT_IN_CUT = "# Cactus\nCacti need little water.\n"
MD_SET: dict[str, Any] = {
"schema": "okf-wiki/multidoc-set/1",
"questions": [
{"id": "d01", "question": "What do tomatoes and basil need?",
"answer_keys": [{"file": "tomato.md", "text": "SECRETKEYSUN"}],
"evidence": [{"file": "tomato.md", "span": "SECRETSPANTOMATO"}]},
{"id": "d02", "question": "A question outside the probe.",
"answer_keys": [{"file": "mint.md", "text": "OTHERKEY"}],
"evidence": [{"file": "mint.md", "span": "OTHERSPAN"}]},
],
}
WD_SET: dict[str, Any] = {
"schema": "okf-wiki/wholedoc-set/1",
"questions": [
{"id": "d01", "type": "whole", "file": "tomato.md", "question": "What does the tomato page say overall?",
"answer_keys": [{"text": "SECRETWHOLEKEY"}], "evidence": [{"span": "SECRETWHOLESPAN"}]},
{"id": "d02", "type": "count", "file": "basil.md", "question": "How many basil lines are there?",
"count": 424242, "item_pattern": "SECRETPATTERN", "evidence": [{"span": "SECRETCOUNTSPAN"}]},
],
}
SECRETS = ("SECRETKEYSUN", "SECRETSPANTOMATO", "SECRETWHOLEKEY", "SECRETWHOLESPAN", "424242", "SECRETPATTERN",
"SECRETCOUNTSPAN", "OTHERKEY", "A question outside the probe")
class Fixture:
def __init__(self, root: Path) -> None:
self.root = root
self.sources = root / "kilde"
self.sources.mkdir()
for name, text in (("tomato.md", TOMATO), ("basil.md", BASIL), ("mint.md", MINT), ("cactus.md", NOT_IN_CUT)):
(self.sources / name).write_text(text, encoding="utf-8")
self.names = ["basil.md", "mint.md", "tomato.md"]
self.md_set = root / "md.json"
self.md_set.write_text(json.dumps(MD_SET), encoding="utf-8")
self.wd_set = root / "wd.json"
self.wd_set.write_text(json.dumps(WD_SET), encoding="utf-8")
self.wiki = root / "wiki-src"
self.wiki.mkdir()
(self.wiki / "index.md").write_text("# Index\n* [Tomatoes](tomatoes.md)\n", encoding="utf-8")
(self.wiki / "tomatoes.md").write_text("Tomatoes need full sun.\n", encoding="utf-8")
self.run = root / "run"
def setup(self, arm: str, **extra: Path) -> list[Path]:
return dp.setup_arm(run=self.run, arm=arm, sources=self.sources, names=self.names, md_set=self.md_set,
md_ids=["d01"], wd_set=self.wd_set, **extra)
class FetchAstroTest(unittest.TestCase):
def test_raw_file_keeps_the_name_and_the_body_byte_exact_under_the_template_header(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
fx = Fixture(Path(tmp))
project = Path(tmp) / "astro"
written = dp.fetch_astro(sources=fx.sources, names=fx.names, project=project, topic="garden",
collected="2026-09-27")
self.assertEqual([p.name for p in written], fx.names)
raw = (project / "raw" / "garden" / "tomato.md").read_text(encoding="utf-8")
self.assertTrue(raw.startswith("# tomato\n\n> Source: kilde/tomato.md\n> Collected: 2026-09-27\n"
"> Published: Unknown\n\n"))
self.assertTrue(raw.endswith(TOMATO))
self.assertFalse((project / "raw" / "garden" / "cactus.md").exists())
def test_an_existing_raw_file_is_never_overwritten(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
fx = Fixture(Path(tmp))
project = Path(tmp) / "astro"
dp.fetch_astro(sources=fx.sources, names=fx.names, project=project, topic="garden", collected="2026-09-27")
with self.assertRaises(dp.ProbeError):
dp.fetch_astro(sources=fx.sources, names=fx.names, project=project, topic="garden",
collected="2026-09-27")
class SetupTest(unittest.TestCase):
def test_file_search_basis_holds_exactly_the_cut(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
fx = Fixture(Path(tmp))
fx.setup("filsok")
basis = fx.run / "arms" / "filsok"
self.assertEqual(sorted(p.name for p in basis.iterdir()), fx.names)
self.assertEqual((basis / "tomato.md").read_text(encoding="utf-8"), TOMATO)
def test_one_task_per_probe_question_and_none_for_the_rest(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
fx = Fixture(Path(tmp))
tasks = fx.setup("filsok")
self.assertEqual(sorted(p.name for p in tasks), ["md-d01.md", "wd-d01.md", "wd-d02.md"])
self.assertTrue(all(p.parent == fx.run / "tasks" / "filsok" for p in tasks))
def test_a_task_carries_the_question_the_basis_and_the_answer_path_but_nothing_from_the_key(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
fx = Fixture(Path(tmp))
tasks = {p.name: p.read_text(encoding="utf-8") for p in fx.setup("filsok")}
md = tasks["md-d01.md"]
self.assertIn("What do tomatoes and basil need?", md)
self.assertIn(str(fx.run / "arms" / "filsok"), md)
self.assertIn(str(fx.run / "answers" / "filsok" / "md-d01.json"), md)
self.assertIn('"count"', tasks["wd-d02.md"])
self.assertNotIn('"count"', md)
for text in tasks.values():
for secret in SECRETS:
self.assertNotIn(secret, text)
def test_the_wiki_arm_gets_the_wiki_and_the_cut_and_the_router_order(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
fx = Fixture(Path(tmp))
tasks = fx.setup("wiki", wiki=fx.wiki)
basis = fx.run / "arms" / "wiki"
self.assertEqual(sorted(p.name for p in (basis / "kilde").iterdir()), fx.names)
self.assertTrue((basis / "wiki" / "index.md").is_file())
text = tasks[0].read_text(encoding="utf-8")
self.assertLess(text.index("index.md"), text.index("x-locator"))
def test_the_astro_arm_gets_raw_and_wiki_from_the_built_project(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
fx = Fixture(Path(tmp))
project = Path(tmp) / "astro"
dp.fetch_astro(sources=fx.sources, names=fx.names, project=project, topic="garden", collected="2026-09-27")
(project / "wiki").mkdir()
(project / "wiki" / "index.md").write_text("# Knowledge Base Index\n", encoding="utf-8")
tasks = fx.setup("astro", astro=project)
basis = fx.run / "arms" / "astro"
self.assertTrue((basis / "raw" / "garden" / "basil.md").is_file())
self.assertTrue((basis / "wiki" / "index.md").is_file())
self.assertIn("Raw", tasks[0].read_text(encoding="utf-8"))
def test_an_arm_without_its_basis_or_an_existing_arm_is_refused(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
fx = Fixture(Path(tmp))
with self.assertRaises(dp.ProbeError):
fx.setup("wiki")
fx.setup("filsok")
with self.assertRaises(dp.ProbeError):
fx.setup("filsok")
with self.assertRaises(dp.ProbeError):
fx.setup("grep-only")
def test_a_probe_id_missing_from_the_set_is_refused(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
fx = Fixture(Path(tmp))
with self.assertRaises(dp.ProbeError):
dp.setup_arm(run=fx.run, arm="filsok", sources=fx.sources, names=fx.names, md_set=fx.md_set,
md_ids=["d09"], wd_set=fx.wd_set)
class CollectTest(unittest.TestCase):
def test_answers_are_gathered_per_gate_with_ids_from_the_file_names(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
run = Path(tmp)
out = run / "answers" / "wiki"
out.mkdir(parents=True)
(out / "md-d01.json").write_text(json.dumps({"id": "wrong", "answer": "a", "citations": []}))
(out / "wd-d02.json").write_text(json.dumps({"answer": "7", "count": 7, "citations": []}))
(out / "wd-d03.json").write_text("not json")
md_path, wd_path, problems = dp.collect(run, "wiki")
md = json.loads(md_path.read_text(encoding="utf-8"))
wd = json.loads(wd_path.read_text(encoding="utf-8"))
self.assertEqual(md, {"arm": "wiki", "answers": [{"id": "d01", "answer": "a", "citations": []}]})
self.assertEqual(wd["answers"], [{"id": "d02", "answer": "7", "count": 7, "citations": []}])
self.assertEqual(problems, ["wd-d03.json: not a JSON object"])
def transcript(lines: list[dict[str, Any]]) -> str:
return "".join(json.dumps(line) + "\n" for line in lines)
def assistant(msg_id: str, tokens: tuple[int, int, int, int], *tools: tuple[str, dict[str, Any]]) -> dict[str, Any]:
i, cc, cr, o = tokens
content = [{"type": "tool_use", "name": name, "input": inp} for name, inp in tools]
return {"type": "assistant", "message": {"id": msg_id, "content": content, "usage": {
"input_tokens": i, "cache_creation_input_tokens": cc, "cache_read_input_tokens": cr, "output_tokens": o}}}
class HarvestTest(unittest.TestCase):
def write(self, folder: Path, name: str, lines: list[dict[str, Any]]) -> None:
(folder / name).write_text(transcript(lines), encoding="utf-8")
def test_tokens_count_each_message_once_and_breaches_are_named(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
run, folder = Path(tmp) / "run", Path(tmp) / "subagents"
folder.mkdir()
task = run / "tasks" / "wiki" / "md-d01.md"
basis = run / "arms" / "wiki"
answer = run / "answers" / "wiki" / "md-d01.json"
first = {"type": "user", "message": {"content": f"Read {task} and follow it."}}
self.write(folder, "agent-a.jsonl", [
first,
assistant("m1", (2, 100, 1000, 5), ("Read", {"file_path": str(task)})),
assistant("m1", (2, 100, 1000, 5)),
assistant("m2", (1, 10, 2000, 50), ("Grep", {"pattern": "sun", "path": str(basis / "kilde")}),
("Glob", {"pattern": "*.md", "path": str(basis / "wiki")})),
assistant("m3", (1, 0, 3000, 80), ("Write", {"file_path": str(answer), "content": "{}"}),
("SubagentHandback", {"message": "done"})),
])
self.write(folder, "agent-b.jsonl", [
{"type": "user", "message": {"content": [{"type": "text", "text": f"Read {run}/tasks/filsok/wd-d02.md"}]}},
assistant("n1", (1, 1, 1, 1), ("Read", {"file_path": str(run / "arms" / "wiki" / "wiki" / "x.md")}),
("Grep", {"pattern": "sun"}), ("Bash", {"command": "ls"}),
("Read", {"file_path": str(run / "arms" / "filsok" / ".." / "wiki" / "y.md")})),
])
self.write(folder, "agent-c.jsonl", [{"type": "user", "message": {"content": "Something else."}}])
rows = dp.harvest(folder, run)
self.assertEqual(sorted(rows), ["filsok/wd-d02", "wiki/md-d01"])
wiki = rows["wiki/md-d01"]
self.assertEqual(wiki["tokens"], 1107 + 2061 + 3081)
self.assertEqual(wiki["breaches"], [])
self.assertEqual(wiki["transcript"], "agent-a.jsonl")
breaches = rows["filsok/wd-d02"]["breaches"]
self.assertEqual(len(breaches), 4)
self.assertTrue(any(b.startswith("Bash") for b in breaches))
self.assertTrue(any(b.startswith("Grep without a path") for b in breaches))
def test_bash_is_read_only_search_that_starts_in_the_basis(self) -> None:
basis = Path("/runs/r/arms/filsok")
task, answer = Path("/runs/r/tasks/filsok/md-d01.md"), Path("/runs/r/answers/filsok/md-d01.json")
allowed = [
f"cd {basis} && grep -rn 'full sun' .",
f"cd {basis} && grep -n sun tomato.md | head -5",
f"cd {basis} && find . -name '*.md' | sort && wc -l tomato.md 2>/dev/null",
f"cd '{basis}' && sed -n '1,40p' tomato.md",
f"cd {basis}/kilde && ls",
]
refused = [
"grep -rn sun /runs/r/arms/filsok",
f"cd {basis} && cat ../wiki/x.md",
f"cd {basis} && grep sun /runs/r/tasks/filsok/other.md",
f"cd {basis} && rm tomato.md",
f"cd {basis} && grep sun tomato.md > copy.txt",
f"cd {basis} && find . -name '*.md' -exec cat {{}} ;",
f"cd {basis} && sed -i 's/a/b/' tomato.md",
f"cd {basis} && cat $(echo /etc/hosts)",
f"cd {basis} && cd / && ls",
f"cd {basis} && ls ~",
"cd /runs/r/arms/wiki && ls",
]
for command in allowed:
self.assertEqual(dp.breaches_of([("Bash", {"command": command})], basis, task, answer), [], command)
for command in refused:
self.assertEqual(len(dp.breaches_of([("Bash", {"command": command})], basis, task, answer)), 1, command)
def test_the_task_names_bash_as_the_search_tool_and_its_rule(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
fx = Fixture(Path(tmp))
text = fx.setup("filsok")[0].read_text(encoding="utf-8")
self.assertIn(f"cd {fx.run / 'arms' / 'filsok'} && ", text)
self.assertIn("grep", text)
def test_two_transcripts_for_one_task_keep_the_latest_and_report_the_rerun(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
run, folder = Path(tmp) / "run", Path(tmp) / "subagents"
folder.mkdir()
task = run / "tasks" / "filsok" / "md-d01.md"
first = {"type": "user", "timestamp": "2026-09-27T10:00:00Z", "message": {"content": f"Read {task}"}}
later = {"type": "user", "timestamp": "2026-09-27T11:00:00Z", "message": {"content": f"Read {task}"}}
self.write(folder, "agent-old.jsonl", [first, assistant("o", (1, 1, 1, 1))])
self.write(folder, "agent-new.jsonl", [later, assistant("n", (2, 2, 2, 2))])
rows = dp.harvest(folder, run)
self.assertEqual(rows["filsok/md-d01"]["transcript"], "agent-new.jsonl")
self.assertEqual(rows["filsok/md-d01"]["tokens"], 8)
self.assertEqual(rows["filsok/md-d01"]["runs"], 2)
def results(arm: str, correct: dict[str, bool], kind: str) -> dict[str, Any]:
rows = []
for qid, ok in correct.items():
row: dict[str, Any] = {"id": qid, "answered": True, "answer_ok": ok, "source_ok": True, "correct": ok}
if kind == "wd":
row["type"] = "whole" if qid in ("d01", "d02") else "count"
rows.append(row)
return {"arm": arm, "set_sha256": "x", "results": rows}
class ScoreTest(unittest.TestCase):
def test_groups_are_counted_from_the_gate_results_and_pairs_compared(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
run = Path(tmp)
res = run / "results"
res.mkdir()
md = {"filsok": {"d01": True, "d02": False, "d99": True}, "wiki": {"d01": True, "d02": True, "d99": False}}
wd = {"filsok": {"d01": True, "d02": False, "d03": True}, "wiki": {"d01": False, "d02": True, "d03": True}}
for arm in ("filsok", "wiki"):
(res / f"{arm}.md.json").write_text(json.dumps(results(arm, md[arm], "md")))
(res / f"{arm}.wd.json").write_text(json.dumps(results(arm, wd[arm], "wd")))
(run / "tokens.json").write_text(json.dumps({
"filsok/md-d01": {"tokens": 100, "breaches": [], "transcript": "a", "runs": 1},
"wiki/md-d01": {"tokens": 300, "breaches": [], "transcript": "b", "runs": 1}}))
table = dp.score(run, ["filsok", "wiki"], md_ids=["d01", "d02"])
self.assertEqual(table["arms"]["filsok"]["groups"]["flerdokument"], [1, 2])
self.assertEqual(table["arms"]["wiki"]["groups"]["flerdokument"], [2, 2])
self.assertEqual(table["arms"]["wiki"]["groups"]["helt dokument"], [1, 2])
self.assertEqual(table["arms"]["filsok"]["groups"]["telling"], [1, 1])
self.assertEqual(table["arms"]["wiki"]["total"], [4, 5])
self.assertEqual(table["arms"]["wiki"]["tokens"], {"sum": 300, "questions": 1})
pair = table["pairs"]["wiki vs filsok"]["flerdokument"]
self.assertEqual(pair, {"both": 1, "only wiki": 1, "only filsok": 0, "neither": 0})
self.assertEqual(table["pairs"]["wiki vs filsok"]["helt dokument"]["only filsok"], 1)
self.assertIn("| wiki |", dp.render_table(table))
def test_exact_mcnemar_is_the_two_sided_binomial_over_the_discordant_pairs(self) -> None:
self.assertEqual(dp.mcnemar_exact(0, 0), 1.0)
self.assertEqual(dp.mcnemar_exact(2, 0), 0.5)
self.assertAlmostEqual(dp.mcnemar_exact(6, 0), 0.03125)
self.assertAlmostEqual(dp.mcnemar_exact(1, 5), 0.21875)
self.assertEqual(dp.mcnemar_exact(3, 3), 1.0)
def test_every_pair_carries_its_mcnemar_p_over_all_groups(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
run = Path(tmp)
res = run / "results"
res.mkdir()
md = {"filsok": {"d01": False, "d02": False}, "wiki": {"d01": True, "d02": True}}
for arm in ("filsok", "wiki"):
(res / f"{arm}.md.json").write_text(json.dumps(results(arm, md[arm], "md")))
(res / f"{arm}.wd.json").write_text(json.dumps(results(arm, {}, "wd")))
table = dp.score(run, ["filsok", "wiki"], md_ids=["d01", "d02"])
self.assertEqual(table["mcnemar"]["wiki vs filsok"], {"only wiki": 2, "only filsok": 0, "p": 0.5})
def test_a_missing_result_file_is_a_failure_not_a_zero(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
run = Path(tmp)
(run / "results").mkdir()
with self.assertRaises(dp.ProbeError):
dp.score(run, ["filsok"], md_ids=["d01"])
if __name__ == "__main__":
unittest.main()

View file

@ -0,0 +1,609 @@
"""Tests for the P1 method trial's build side (TRIAL, branch p1-metodeprove, not v1 code).
Covers the two trial agent types, the splitter (evals/p1/split.py), the D map and register (dmap.py), K packing
(kpack.py) and assembly with K+ (assemble.py). None of these call a model. The fixtures are synthetic text about
gardening and bread (CLAUDE.md rule 3: no text from the Claude Code documentation is committed).
Run: python3 -m unittest discover -s evals/tests -p 'test_p1_build.py'
"""
from __future__ import annotations
import hashlib
import json
import re
import sys
import tempfile
import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT))
sys.path.insert(0, str(ROOT / "evals"))
from okfwiki import audit, claims, view # noqa: E402
from p1 import assemble, dmap, kpack, split # noqa: E402
READER_SHA256 = "13a93bc5a9e87a7282752316ac670664cbdca321b0dac9cdaf92d9e74c383445"
BANNED = ("anthropic", "openai", "urllib", "http.client", "requests", "subprocess", "socket")
DOC_TOMATO = """# Growing tomatoes
Source: https://example.org/garden/tomatoes
How to grow tomatoes in a small garden.
## Soil
Tomatoes need deep, loose soil with `compost` mixed in.
Water the soil every morning.
* **Sun**: full sun for eight hours.
* **Space**: forty centimetres between plants,
more in a wet summer.
```bash
# not a heading
mix compost
```
| Month | Task |
|---|---|
| May | plant |
## Overview
The Kitchen Garden keeps tomatoes and basil together.
### Pruning
Remove side shoots once a week.
"""
DOC_BASIL = """# Growing basil
Source: https://example.org/garden/basil
## Soil
Basil likes warm soil and the Kitchen Garden.
Plant Sweet Genovese early.
## Watering
Water basil with `compost` tea when the leaves droop.
"""
REL_1 = """## 1.2.3
- Added the `compost` command to the Kitchen Garden planner.
- Fixed watering reminders.
"""
REL_2 = """## 1.10.0
- The Kitchen Garden planner now shows `compost` levels.
"""
REL_3 = """## 1.9.2
- Basil seedlings get their own tray.
"""
def runs8(text: str) -> set[tuple[str, ...]]:
words = re.findall(r"[a-z0-9]+", text.lower())
return {tuple(words[i:i + 8]) for i in range(len(words) - 7)}
def before_link_rule(found: list[audit.Finding]) -> list[audit.Finding]:
"""The P1 trial predates criterion 6 as structure (operator 04.10.2026), so its link-rule findings are left out."""
return [f for f in found if f.check != "link-rule"]
class Fixture(unittest.TestCase):
def setUp(self) -> None:
self._tmp = tempfile.TemporaryDirectory()
self.tmp = Path(self._tmp.name)
self.kilde = self.tmp / "wiki" / "kilde"
self.kilde.mkdir(parents=True)
files = {
"docs-en-tomatoes.md": DOC_TOMATO,
"docs-en-basil.md": DOC_BASIL,
"release-v1.2.3.md": REL_1,
"release-v1.10.0.md": REL_2,
"release-v1.9.2.md": REL_3,
}
for name, text in files.items():
(self.kilde / name).write_text(text, encoding="utf-8")
def tearDown(self) -> None:
self._tmp.cleanup()
# ---------------------------------------------------------------------------------------------- step 1: agents
class AgentFilesTest(unittest.TestCase):
def frontmatter(self, text: str) -> dict[str, str]:
self.assertTrue(text.startswith("---\n"))
head = text[4:text.index("\n---\n", 4)]
return dict(line.split(": ", 1) for line in head.splitlines())
def test_two_trial_agents_have_narrow_tools_and_a_trial_marker(self) -> None:
for name in ("p1-compiler", "p1-consolidator"):
text = (ROOT / ".claude" / "agents" / f"{name}.md").read_text(encoding="utf-8")
fm = self.frontmatter(text)
self.assertEqual(fm["name"], name)
self.assertEqual(fm["tools"], "Read, Write")
self.assertEqual(fm["model"], "opus")
body = text[text.index("\n---\n", 4) + 5:].strip()
self.assertTrue(body.startswith("TRIAL"), name)
fixture = DOC_TOMATO + DOC_BASIL + REL_1 + REL_2 + REL_3
self.assertEqual(runs8(body) & runs8(fixture), set(), name)
def test_the_reader_is_unchanged(self) -> None:
shipped = (ROOT / "agents" / "okf-wiki-reader.md").read_bytes()
self.assertEqual(hashlib.sha256(shipped).hexdigest(), READER_SHA256)
self.assertEqual(shipped, (ROOT / ".claude" / "agents" / "okf-wiki-reader.md").read_bytes())
def test_compiler_names_the_rules_it_must_keep(self) -> None:
body = (ROOT / ".claude" / "agents" / "p1-compiler.md").read_text(encoding="utf-8").lower()
for idea in ("first turn", "never read", "release note", "four tests", "json"):
self.assertIn(idea, body, idea)
def test_consolidator_keeps_every_label(self) -> None:
body = (ROOT / ".claude" / "agents" / "p1-consolidator.md").read_text(encoding="utf-8").lower()
for idea in ("every footnote label", "no new label", "json"):
self.assertIn(idea, body, idea)
# ---------------------------------------------------------------------------------------------- step 1: split
class OrderTest(unittest.TestCase):
def test_docs_first_then_release_notes_by_version_tuple(self) -> None:
names = ["release-v0.2.34.md", "docs-en-b.md", "release-v0.2.9.md", "docs-en-a.md", "release-v1.0.0.md"]
self.assertEqual(split.order(names), ["docs-en-a.md", "docs-en-b.md", "release-v0.2.9.md",
"release-v0.2.34.md", "release-v1.0.0.md"])
def test_an_unknown_name_is_refused(self) -> None:
with self.assertRaises(split.RunError):
split.order(["notes.md"])
class BlocksTest(Fixture):
def test_fence_aware_blocks_with_spans(self) -> None:
got = split.blocks(self.kilde / "docs-en-tomatoes.md")
kinds = [(b.kind, b.start, b.end) for b in got]
# line 2 "Source:" and line 4 are paragraphs; headings are not blocks
self.assertIn(("paragraph", 2, 2), kinds)
self.assertIn(("paragraph", 8, 9), kinds)
self.assertIn(("item", 11, 11), kinds)
self.assertIn(("item", 12, 13), kinds) # a continuation line belongs to its item
self.assertIn(("code", 15, 18), kinds) # the "#" inside the fence is not a heading
self.assertIn(("table", 20, 22), kinds)
heads = {b.section for b in got}
self.assertIn("Growing tomatoes › Soil", heads)
self.assertIn("Growing tomatoes › Overview › Pruning", heads)
self.assertNotIn("not a heading", " ".join(heads))
def test_every_non_blank_non_heading_line_is_in_exactly_one_block(self) -> None:
path = self.kilde / "docs-en-tomatoes.md"
lines = path.read_text(encoding="utf-8").split("\n")
got = split.blocks(path)
covered: dict[int, int] = {}
for b in got:
for n in range(b.start, b.end + 1):
covered[n] = covered.get(n, 0) + 1
for n, raw in enumerate(lines, 1):
heading = raw.startswith("#") and not (15 <= n <= 18)
if raw.strip() and not heading:
self.assertEqual(covered.get(n), 1, (n, raw))
if heading:
self.assertNotIn(n, covered, (n, raw))
def test_release_note_blocks_carry_the_version(self) -> None:
got = split.blocks(self.kilde / "release-v1.10.0.md")
self.assertEqual({b.version for b in got}, {"1.10.0"})
self.assertEqual(split.blocks(self.kilde / "docs-en-basil.md")[0].version, None)
class DocsHeadingsTest(Fixture):
def test_titles_and_second_and_third_level_headings_of_docs_pages_only(self) -> None:
got = split.docs_headings(self.kilde)
texts = [(h.file, h.level, h.text) for h in got]
self.assertIn(("docs-en-tomatoes.md", 1, "Growing tomatoes"), texts)
self.assertIn(("docs-en-tomatoes.md", 3, "Pruning"), texts)
self.assertFalse(any(f.startswith("release-") for f, _, _ in texts))
self.assertFalse(any(t == "not a heading" for _, _, t in texts))
class PickTest(Fixture):
def blocks_doc(self, order: list[str]) -> dict[str, object]:
return split.blocks_document(self.kilde, order)
def test_three_concepts_by_the_stated_rules(self) -> None:
order = split.order([p.name for p in self.kilde.iterdir()])
picked = split.pick(self.blocks_doc(order), self.kilde, focus="docs-en-tomatoes.md")
names = [p.name for p in picked]
self.assertEqual(len(names), 3)
self.assertEqual(len(set(names)), 3)
self.assertEqual(names[0], "Soil") # the focus page's heading with the most blocks
# "Kitchen Garden" and "compost" are both in 2 release notes; the tie is broken by name
self.assertEqual(names[1], "Kitchen Garden")
self.assertEqual(names[2], "compost") # in 2 docs pages and 2 release notes, distinct from 1 and 2
def test_a_document_counts_for_a_term_only_where_it_stands_as_a_term(self) -> None:
# Found in session 2: the word "and", backticked once, was counted in every document where it is prose.
(self.kilde / "docs-en-zz.md").write_text("# Joining\n\n## Words\n\nUse `and` to join two beds.\n",
encoding="utf-8")
for v in ("2.0.0", "2.0.1", "2.0.2"):
(self.kilde / f"release-v{v}.md").write_text(f"## {v}\n\n- Tomatoes and basil and mint.\n",
encoding="utf-8")
order = split.order([p.name for p in self.kilde.iterdir()])
names = [p.name for p in split.pick(self.blocks_doc(order), self.kilde, focus="docs-en-tomatoes.md")]
self.assertNotIn("and", names)
self.assertEqual(names[1:], ["Kitchen Garden", "compost"])
def test_a_backticked_term_counts_its_length_after_trimming(self) -> None:
# Found in session 2: "` or `" is four characters with its spaces, and became the two-letter term "or".
got = split.terms("Use `compost` ` or ` ` ab ` ` mulch ` here.")
self.assertEqual(got, ["compost", "mulch"])
def test_the_focus_page_must_be_in_the_order(self) -> None:
with self.assertRaises(split.RunError):
split.pick(self.blocks_doc(["docs-en-basil.md"]), self.kilde, focus="docs-en-tomatoes.md")
class CliTest(Fixture):
def test_order_refuses_names_that_differ_from_the_l4_cut(self) -> None:
manifest = self.tmp / "m.json"
manifest.write_text(json.dumps({"cut": {"names": ["docs-en-basil.md", "release-v1.2.3.md"]}}), encoding="utf-8")
l4 = self.tmp / "l4"
l4.mkdir()
(l4 / "a.md").write_text("---\ntype: Concept\nsources:\n - id: a\n resource: /kilde/docs-en-basil.md\n"
"---\n\nx\n", encoding="utf-8")
out = self.tmp / "rekkefolge.txt"
self.assertEqual(split.main(["order", "--manifest", str(manifest), "--l4", str(l4), "--out", str(out)]), 2)
self.assertFalse(out.exists())
(l4 / "b.md").write_text("---\ntype: Concept\nsources:\n - id: b\n resource: /kilde/release-v1.2.3.md\n"
"---\n\nx\n", encoding="utf-8")
self.assertEqual(split.main(["order", "--manifest", str(manifest), "--l4", str(l4), "--out", str(out)]), 0)
self.assertEqual(out.read_text(encoding="utf-8").split(), ["docs-en-basil.md", "release-v1.2.3.md"])
def test_blocks_and_pick_refuse_to_overwrite(self) -> None:
order = self.tmp / "order.txt"
order.write_text("\n".join(split.order([p.name for p in self.kilde.iterdir()])) + "\n", encoding="utf-8")
out = self.tmp / "blocks.json"
self.assertEqual(split.main(["blocks", "--kilde", str(self.kilde), "--order", str(order), "--out", str(out)]), 0)
data = json.loads(out.read_text(encoding="utf-8"))
self.assertEqual(data["schema"], "okf-wiki/p1-blocks/1")
self.assertEqual(split.main(["blocks", "--kilde", str(self.kilde), "--order", str(order), "--out", str(out)]), 2)
picked = self.tmp / "begreper.txt"
args = ["pick", "--blocks", str(out), "--kilde", str(self.kilde), "--focus", "docs-en-tomatoes.md",
"--out", str(picked)]
self.assertEqual(split.main(args), 0)
self.assertEqual(len(picked.read_text(encoding="utf-8").strip().splitlines()), 3)
self.assertEqual(split.main(args), 2)
def test_total_counts_blocks_in_every_file(self) -> None:
expected = sum(len(split.blocks(p)) for p in self.kilde.iterdir())
self.assertEqual(split.blocks_total(self.kilde), expected)
# ---------------------------------------------------------------------------------------------- step 2: D
class DMapTest(Fixture):
def build(self) -> Path:
order = split.order([p.name for p in self.kilde.iterdir()])
out = self.tmp / "D"
dmap.build(split.blocks_document(self.kilde, order), self.kilde.parent, out, at="2026-10-02T12:00:00Z")
return out
def test_d_passes_the_auditor_with_no_claims(self) -> None:
out = self.build()
self.assertEqual(before_link_rule(audit.audit(out, self.kilde.parent)), [])
found = claims.extract(out, self.kilde.parent)
self.assertEqual(found.claims, [])
self.assertTrue(found.exceptions)
def test_register_links_point_to_map_sections(self) -> None:
out = self.build()
page = (out / "r-kitchen-garden.md").read_text(encoding="utf-8")
self.assertIn("(k-docs-en-basil.md#soil)", page)
self.assertIn("(k-release-v1-2-3.md#1-2-3)", page)
def test_register_keeps_docs_headings_and_terms_in_two_documents_only(self) -> None:
out = self.build()
names = {p.name for p in out.glob("r-*.md")}
self.assertIn("r-pruning.md", names) # a docs heading (i), in one document
self.assertIn("r-compost.md", names) # a backticked term in several documents
self.assertNotIn("r-sweet-genovese.md", names) # a capitalised phrase in one document only
self.assertNotIn("r-overview.md", names) # a stop-listed heading fails test 2
def test_quotes_stand_on_their_lines_and_stay_strings(self) -> None:
out = self.build()
doc = audit.read_document(out / "r-compost.md", "r-compost.md")
assert doc.frontmatter is not None
for s in doc.frontmatter["sources"]:
self.assertIsInstance(s["x-quote"], str)
line = (self.kilde / Path(s["resource"]).name).read_text(encoding="utf-8").split("\n")[s["x-locator"]["line"] - 1]
self.assertIn(s["x-quote"], line)
self.assertIsInstance(doc.frontmatter["generated"]["at"], str)
def test_a_quote_like_no_survives_a_yaml_round_trip(self) -> None:
text = dmap.frontmatter({"type": "Concept", "sources": [{"id": "a", "x-quote": "no"}, {"id": "b", "x-quote": "1.10"}]})
path = self.tmp / "x.md"
path.write_text(text + "\n# x\n", encoding="utf-8")
fm = audit.read_document(path, "x.md").frontmatter
assert fm is not None
self.assertEqual([s["x-quote"] for s in fm["sources"]], ["no", "1.10"])
def test_the_log_records_the_thresholds_and_build_refuses_an_existing_target(self) -> None:
out = self.build()
log = (out / "log.md").read_text(encoding="utf-8")
self.assertIn("2 of the", log)
with self.assertRaises(dmap.RunError):
dmap.build({"order": [], "blocks": []}, self.kilde.parent, out, at="2026-10-02T12:00:00Z")
# ---------------------------------------------------------------------------------------------- step 3: K packing
def entry(eid: str, title: str, aliases: tuple[str, ...] = ()) -> dict[str, object]:
return {"id": eid, "title": title, "aliases": [title, *aliases], "kind": "skeleton", "merge_of": None,
"origin": None}
class KSkeletonTest(Fixture):
def test_the_skeleton_is_an_index_of_docs_headings_that_pass_test_2(self) -> None:
index = kpack.skeleton(self.kilde)
titles = {e["title"] for e in index["entries"]}
self.assertIn("Growing tomatoes", titles)
self.assertIn("Pruning", titles)
self.assertIn("Soil", titles)
self.assertNotIn("Overview", titles)
soil = [e for e in index["entries"] if e["title"] == "Soil"]
self.assertEqual(len(soil), 1) # the same heading in two pages is one entry
self.assertEqual(soil[0]["origin"]["file"], "docs-en-basil.md") # pages in name order, first one wins
self.assertFalse(any(p.suffix == ".md" for p in self.tmp.rglob("*") if p.parent.name != "kilde"))
def test_norm(self) -> None:
self.assertEqual(kpack.norm("The `Compost` bins"), "compost bin")
self.assertEqual(kpack.norm("settings.json"), "settings.json")
self.assertEqual(kpack.norm(" Kitchen Garden! "), "kitchen garden")
self.assertEqual(kpack.norm("CLI flags"), "cli flag")
class KIdentityTest(unittest.TestCase):
def setUp(self) -> None:
self.index = {"entries": [entry("kitchen-garden-planner", "Kitchen Garden planner"),
entry("compost", "compost", ("compost heap",))]}
def frag(self, concept: str, status: str = "new", file: str = "docs-en-tomatoes.md", eid: str | None = None
) -> dict[str, object]:
f: dict[str, object] = {"concept": concept, "status": status, "anchor": {"file": file, "start": 8, "end": 9}}
if eid:
f["id"] = eid
return f
def test_outcomes(self) -> None:
r = kpack.resolve
self.assertEqual(r(self.frag("x", "existing", eid="compost"), self.index), ("existing", "compost"))
self.assertEqual(r(self.frag("Kitchen Garden planners"), self.index), ("existing", "kitchen-garden-planner"))
self.assertEqual(r(self.frag("Compost heap"), self.index), ("existing", "compost"))
self.assertEqual(r(self.frag("Kitchen Garden planner tool"), self.index),
("merge-candidate", "kitchen-garden-planner"))
self.assertEqual(r(self.frag("Garden hose"), self.index), ("new", None))
self.assertEqual(r(self.frag("Garden hose", file="release-v1.2.3.md"), self.index), ("rejected", "release-note-new"))
self.assertEqual(r(self.frag("Kitchen Garden planner tool", file="release-v1.2.3.md"), self.index),
("rejected", "release-note-new"))
self.assertEqual(r(self.frag("Troubleshooting"), self.index), ("rejected", "meta"))
def test_relevant_lines_by_phrase(self) -> None:
got = kpack.relevant_lines(self.index, "We keep the compost heaps behind the shed.")
self.assertEqual([e["id"] for e in got], ["compost"])
self.assertEqual(kpack.relevant_lines(self.index, "Nothing about gardens here."), [])
class KPackTest(Fixture):
def blocks_doc(self) -> dict[str, object]:
return split.blocks_document(self.kilde, split.order([p.name for p in self.kilde.iterdir()]))
def test_packs_of_five(self) -> None:
self.assertEqual([len(p) for p in kpack.packs([f"n{i}" for i in range(19)], 5)], [5, 5, 5, 4])
def test_a_large_pack_is_split_into_parts_under_the_read_cap(self) -> None:
big = "".join(f"Line {i} says the tomatoes are fine today and tomorrow, and the basil too.\n\n"
for i in range(1110))
(self.kilde / "docs-en-big.md").write_text("# Big\n\n" + big, encoding="utf-8")
doc = split.blocks_document(self.kilde, ["docs-en-big.md"])
parts = kpack.render_input(1, ["docs-en-big.md"], doc, [], self.kilde)
self.assertGreater(sum(len(p) for p in parts), 130_000)
self.assertEqual(len(parts), 3)
self.assertTrue(all(len(p) <= kpack.PART_CHARS for p in parts))
self.assertIn("docs-en-big.md › Big › 3–3", parts[0])
def test_validate(self) -> None:
doc = self.blocks_doc()
pack = ["docs-en-tomatoes.md", "release-v1.2.3.md"]
good = {"concept": "Soil", "status": "existing", "id": "soil", "text": "Tomatoes need deep, loose soil.",
"anchor": {"file": "docs-en-tomatoes.md", "start": 8, "end": 9}}
cases = {
"anchor-crosses-blocks": {**good, "anchor": {"file": "docs-en-tomatoes.md", "start": 8, "end": 11}},
"quote-missing": {**good, "text": "Plants stand 40 cm apart."},
"quote-not-in-span": {**good, "text": "Keep 40 cm.", "quote": "forty centimetres"},
"sentence-count": {**good, "text": "One. Two. Three. Four."},
"tests-missing": {**good, "status": "new", "concept": "Loose soil"},
"anchor-outside-pack": {**good, "anchor": {"file": "docs-en-basil.md", "start": 7, "end": 7}},
"malformed": {"concept": "Soil"},
}
no_text = {**good, "text": ""}
accepted, rejected = kpack.validate([good, no_text, *cases.values()], pack, doc, self.kilde)
self.assertEqual(len(accepted), 1)
self.assertEqual(rejected["sentence-count"], 2) # the empty text and the four sentences
for reason in cases:
self.assertGreaterEqual(rejected[reason], 1, reason)
ok = {**good, "text": "Plants stand forty centimetres apart.", "anchor": {"file": "docs-en-tomatoes.md",
"start": 12, "end": 13}, "quote": "forty centimetres"}
accepted, rejected = kpack.validate([ok], pack, doc, self.kilde)
self.assertEqual((len(accepted), sum(rejected.values())), (1, 0))
class KCliTest(Fixture):
def test_skeleton_pack_and_accept(self) -> None:
work = self.tmp / "work"
blocks = self.tmp / "blocks.json"
order = split.order([p.name for p in self.kilde.iterdir()])
blocks.write_text(json.dumps(split.blocks_document(self.kilde, order)), encoding="utf-8")
index = work / "K-work" / "index.json"
self.assertEqual(kpack.main(["skeleton", "--kilde", str(self.kilde), "--out", str(index)]), 0)
self.assertEqual(kpack.main(["skeleton", "--kilde", str(self.kilde), "--out", str(index)]), 2)
root = str(self.kilde.parent)
self.assertEqual(kpack.main(["pack", "1", "--blocks", str(blocks), "--index", str(index), "--kilde-root", root,
"--work", str(work)]), 0)
self.assertTrue((work / "K-oppgaver" / "pack-1-part-1.md").is_file())
fragments = {"fragments": [
{"concept": "Soil", "status": "existing", "id": "soil", "text": "Tomatoes need deep, loose soil.",
"anchor": {"file": "docs-en-tomatoes.md", "start": 8, "end": 9}},
{"concept": "Kitchen Garden", "status": "new", "text": "The Kitchen Garden keeps tomatoes and basil.",
"anchor": {"file": "docs-en-tomatoes.md", "start": 26, "end": 26},
"tests": {"topic_shape": "a named planner", "citation": "See the Kitchen Garden reference"}},
{"concept": "Kitchen Garden", "status": "existing", "text": "The planner gained a command.",
"anchor": {"file": "release-v1.2.3.md", "start": 3, "end": 3}},
{"concept": "Watering reminders", "status": "new", "text": "Reminders were fixed.",
"anchor": {"file": "release-v1.2.3.md", "start": 4, "end": 4},
"tests": {"topic_shape": "x", "citation": "y"}},
]}
out = work / "K-fragments" / "pack-1.json"
out.parent.mkdir(parents=True)
out.write_text(json.dumps(fragments), encoding="utf-8")
self.assertEqual(kpack.main(["accept", "1", "--work", str(work), "--blocks", str(blocks), "--kilde-root", root]), 0)
acc = json.loads((work / "K-work" / "accepted.json").read_text(encoding="utf-8"))["fragments"]
self.assertEqual([a["outcome"] for a in acc], ["existing", "new", "existing"])
self.assertEqual(acc[2]["concept_id"], acc[1]["concept_id"]) # the release note enriches the new concept
self.assertEqual(acc[2]["version"], "1.2.3")
log = json.loads((work / "K-work" / "packs.json").read_text(encoding="utf-8"))
self.assertEqual(log["packs"][0]["rejected"], {"release-note-new": 1})
self.assertEqual(log["packs"][0]["proposed"], 4)
# PM 02.10: the ids of the index lines sent, and the accepted fragments whose concept was not among them
sent = log["packs"][0]["index_ids"]
self.assertIn("soil", sent)
self.assertNotIn(acc[1]["concept_id"], sent)
self.assertEqual(log["packs"][0]["not_sent"], {"total": 2, "by_outcome": {"existing": 1, "new": 1}})
# ---------------------------------------------------------------------------------------------- step 4: assembly
def accepted(cid: str, file: str, start: int, end: int, text: str, pack: int, version: str | None = None,
quote: str | None = None, quote_line: int | None = None) -> dict[str, object]:
return {"pack": pack, "position": 1, "file": file, "start": start, "end": end, "section": "-", "text": text,
"quote": quote, "quote_line": quote_line, "version": version, "concept_id": cid,
"outcome": "existing"}
class AssembleTest(Fixture):
def setUp(self) -> None:
super().setUp()
self.work = self.tmp / "work"
(self.work / "K-work").mkdir(parents=True)
index = {"entries": [
{**entry("soil", "Soil"), "origin": {"file": "docs-en-basil.md", "line": 4}},
{**entry("pruning", "Pruning"), "origin": {"file": "docs-en-tomatoes.md", "line": 28}},
{**entry("kitchen-garden", "Kitchen Garden"), "kind": "new"},
{**entry("kitchen-garden-planner", "Kitchen Garden planner"), "kind": "merge-candidate",
"merge_of": "kitchen-garden"},
]}
frags = [
accepted("soil", "docs-en-tomatoes.md", 8, 9, "Tomatoes need deep, loose soil.", 1),
accepted("kitchen-garden", "docs-en-tomatoes.md", 26, 26,
"The Kitchen Garden keeps tomatoes and basil together.", 1, quote="Kitchen Garden", quote_line=26),
accepted("kitchen-garden", "release-v1.2.3.md", 3, 3, "The planner gained a compost command.", 1, "1.2.3"),
accepted("soil", "docs-en-basil.md", 6, 7, "Basil likes warm soil near the Kitchen Garden.", 1),
accepted("kitchen-garden", "release-v1.10.0.md", 3, 3, "The planner shows compost levels.", 2, "1.10.0"),
accepted("kitchen-garden-planner", "release-v1.9.2.md", 3, 3, "Seedlings get their own tray.", 2, "1.9.2"),
]
(self.work / "K-work" / "index.json").write_text(json.dumps(index), encoding="utf-8")
(self.work / "K-work" / "accepted.json").write_text(json.dumps({"fragments": frags}), encoding="utf-8")
self.out = self.tmp / "K"
assemble.assemble(self.work, self.kilde.parent, self.out, at="2026-10-02T12:00:00Z")
def page(self, name: str) -> audit.Document:
return audit.read_document(self.out / name, name)
def test_the_bundle_passes_the_auditor(self) -> None:
self.assertEqual(before_link_rule(audit.audit(self.out, self.kilde.parent)), [])
found = claims.extract(self.out, self.kilde.parent)
self.assertEqual(claims.criterion_1(found)["total"], (6, 6))
def test_only_enriched_concepts_get_pages(self) -> None:
names = {p.name for p in self.out.glob("*.md")} - {"index.md", "log.md"}
self.assertEqual(names, {"soil.md", "kitchen-garden.md", "kitchen-garden-planner.md"})
fm = self.page("kitchen-garden-planner.md").frontmatter
assert fm is not None
self.assertEqual(fm["x-merge-candidate"], "kitchen-garden")
def test_history_in_version_order_without_version_numbers_in_the_text(self) -> None:
doc = self.page("kitchen-garden.md")
body = doc.body
self.assertLess(body.index("gained a compost command"), body.index("shows compost levels"))
prose = " ".join(b.text for b in audit.prose_blocks(doc))
self.assertEqual(view.version_numbers(audit.FOOTNOTE_REF.sub("", prose)), [])
fm = doc.frontmatter
assert fm is not None
versions = [s for s in fm["sources"] if view.is_version_heading(s)]
self.assertEqual(sorted(s["x-quote"] for s in versions), ["1.10.0", "1.2.3"])
self.assertEqual(fm["x-fragments"], 3)
def test_code_quotes_skip_structural_lines_and_are_marked(self) -> None:
fm = self.page("soil.md").frontmatter
assert fm is not None
first = fm["sources"][0]
self.assertEqual(first["x-locator"], {"line": 8})
self.assertEqual(first["x-quote-by"], "code")
self.assertEqual(first["x-span"], [8, 9])
kg = self.page("kitchen-garden.md").frontmatter
assert kg is not None
self.assertNotIn("x-quote-by", kg["sources"][0])
self.assertEqual(assemble.code_quote(["```bash", "<Note>", "|---|---|", "", " real line "], 10),
("real line", 14))
def test_a_concept_title_in_another_page_becomes_one_link(self) -> None:
self.assertIn("[Kitchen Garden](kitchen-garden.md)", self.page("soil.md").body)
class KPlusTest(AssembleTest):
def test_copy_tasks_and_apply(self) -> None:
kplus = self.tmp / "K+"
assemble.copy(self.out, kplus)
with self.assertRaises(assemble.RunError):
assemble.copy(self.out, kplus)
runs = assemble.consolidation_tasks(kplus, self.work, min_fragments=3, per_run=8)
self.assertEqual([r.pages for r in runs], [["kitchen-garden"]])
self.assertTrue(runs[0].task.is_file())
old = self.page("kitchen-garden.md").body
labels = sorted(set(audit.FOOTNOTE_REF.findall(old)))
good = "The Kitchen Garden keeps tomatoes and basil together, and its planner tracks compost " + "".join(
f"[^{x}]" for x in labels) + "."
dropped = "The Kitchen Garden keeps tomatoes and basil together[^" + labels[0] + "]."
added = good.replace(".", "[^zz].", 1)
bodies = self.tmp / "bodies.json"
bodies.write_text(json.dumps({"kitchen-garden": good, "soil": dropped}), encoding="utf-8")
self.assertEqual(assemble.apply(kplus, bodies), (1, 1))
self.assertIn("planner tracks compost", (kplus / "kitchen-garden.md").read_text(encoding="utf-8"))
self.assertEqual(before_link_rule(audit.audit(kplus, self.kilde.parent)), [])
bodies.write_text(json.dumps({"kitchen-garden": added}), encoding="utf-8")
self.assertEqual(assemble.apply(kplus, bodies), (0, 1))
class NoModelTest(unittest.TestCase):
def test_trial_modules_import_no_network_or_model_client(self) -> None:
for path in sorted((ROOT / "evals" / "p1").glob("*.py")):
source = path.read_text(encoding="utf-8")
for banned in BANNED:
self.assertNotIn(f"import {banned}", source, path.name)
self.assertNotIn(f"from {banned}", source, path.name)
if __name__ == "__main__":
unittest.main()

View file

@ -0,0 +1,366 @@
"""Tests for the P1 method trial's report side (TRIAL, branch p1-metodeprove, not v1 code).
Covers the measures (evals/p1/measure.py), the cost harvester (cost.py), the side-by-side page (sidebyside.py) and the
two verification scripts. None of these call a model. The fixtures are synthetic text about gardening (CLAUDE.md
rule 3: no text from the Claude Code documentation is committed).
Run: python3 -m unittest discover -s evals/tests -p 'test_p1_report.py'
"""
from __future__ import annotations
import json
import os
import subprocess
import sys
import tempfile
import unittest
from pathlib import Path
from typing import Any
import yaml
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT))
sys.path.insert(0, str(ROOT / "evals"))
from okfwiki import audit, view # noqa: E402
from p1 import cost, measure, sidebyside, split # noqa: E402
BANNED = ("anthropic", "openai", "urllib", "http.client", "requests", "subprocess", "socket")
DOC_A = """# Alpha
## Beds
Raised beds drain well.
They warm early in spring.
- Line one item.
- Line two item.
## Paths
Gravel paths stay dry.
"""
REL = """## 2.0.0
- Beds got labels.
"""
def src(sid: str, file: str, line: int, quote: str, span: tuple[int, int] | None = None) -> dict[str, Any]:
s: dict[str, Any] = {"id": sid, "resource": f"/kilde/{file}", "title": file, "x-locator": {"line": line},
"x-quote": quote}
if span:
s["x-span"] = list(span)
return s
def write_page(folder: Path, name: str, title: str, body: str, sources: list[dict[str, Any]],
**extra: Any) -> None:
fm = {"type": "Concept", "title": title, "description": title, "sources": sources, **extra,
"generated": {"by": "test", "at": "2026-10-02T12:00:00Z"}}
text = "---\n" + yaml.safe_dump(fm, sort_keys=False) + "---\n\n# " + title + "\n\n" + body + "\n"
folder.mkdir(parents=True, exist_ok=True)
(folder / name).write_text(text, encoding="utf-8")
class Fixture(unittest.TestCase):
def setUp(self) -> None:
self._tmp = tempfile.TemporaryDirectory()
self.tmp = Path(self._tmp.name)
self.root = self.tmp / "wiki"
self.kilde = self.root / "kilde"
self.kilde.mkdir(parents=True)
(self.kilde / "docs-en-a.md").write_text(DOC_A, encoding="utf-8")
(self.kilde / "release-v2.0.0.md").write_text(REL, encoding="utf-8")
self.order = ["docs-en-a.md", "release-v2.0.0.md"]
self.blocks = split.blocks_document(self.kilde, self.order)
self.bundle = self.tmp / "B"
write_page(self.bundle, "beds.md", "Beds",
"Raised beds drain well.[^b1] The beds have a heading.[^b2] Items begin.[^b3] Two items.[^b4]\n\n"
"## History\n\n- Beds got labels.[^r1][^v1]\n\n| a | b |",
[src("b1", "docs-en-a.md", 5, "Raised beds drain well.", (5, 6)),
src("b2", "docs-en-a.md", 3, "Beds", (3, 3)),
src("b3", "docs-en-a.md", 8, "Line one item.", (8, 13)),
src("b4", "docs-en-a.md", 9, "Line two item.", (8, 9)),
src("v1", "release-v2.0.0.md", 1, "2.0.0"),
src("r1", "release-v2.0.0.md", 3, "Beds got labels.", (3, 3)),
src("u1", "docs-en-a.md", 13, "Gravel paths stay dry.", (13, 13))],
**{"x-aliases": ["Beds", "Raised beds"]})
write_page(self.bundle, "labels.md", "Labels", "Beds got labels.[^r1][^v1] See also: [Beds](beds.md)",
[src("v1", "release-v2.0.0.md", 1, "2.0.0"), src("r1", "release-v2.0.0.md", 3, "Beds got labels.")])
(self.bundle / "index.md").write_text('---\nokf_version: "0.2"\n---\n\n# Concepts\n\n- [Beds](beds.md)\n'
'- [Labels](labels.md)\n', encoding="utf-8")
(self.bundle / "log.md").write_text("# Log\n\n## 2026-10-02\n* built\n", encoding="utf-8")
def tearDown(self) -> None:
self._tmp.cleanup()
# ---------------------------------------------------------------------------------------------- step 5: measures
class CoverageTest(Fixture):
def test_cited_entries_by_locator_line_only(self) -> None:
got = measure.coverage(self.bundle, self.root, self.blocks, self.order)
# covered: 5-6 (b1), 8 (b3's locator; its wide span is ignored), 9 (b4), release 3 (r1); not 13 (u1 uncited)
self.assertEqual((got.covered, got.total), (4, 5))
def test_a_stopped_variant_counts_only_the_sources_it_built(self) -> None:
got = measure.coverage(self.bundle, self.root, self.blocks, self.order[:1])
self.assertEqual((got.covered, got.total), (3, 4))
def test_per_pack_position(self) -> None:
got = measure.coverage(self.bundle, self.root, self.blocks, self.order, pack_size=5)
self.assertEqual(got.per_position, {1: (3, 4, 1), 2: (1, 1, 1)})
class StructureTest(Fixture):
def test_shares_precision_and_concepts_per_source(self) -> None:
s = measure.structure(self.bundle, self.root, self.blocks, self.order)
self.assertEqual(s["pages"], 2)
self.assertEqual(s["concepts_per_source"], {"docs-en-a.md": 1, "release-v2.0.0.md": 1})
# version sources are left out of the quote and precision counts
self.assertEqual(s["quotes"]["entries"], 6)
self.assertEqual(s["quotes"]["structural"], 1) # b2 quotes a heading line
self.assertEqual(s["precision"], {"line": 3, "block": 1, "section": 1, "document": 1})
self.assertEqual(s["islands"]["total"], sum(not v for v in view.related(
audit.load_bundle(self.bundle, self.root).concepts).values()))
def test_duplicates_by_norm_alias_and_jaccard_in_any_bundle(self) -> None:
b = self.tmp / "dups"
for name, title in (("a.md", "Beds"), ("b.md", "Bed"), ("c.md", "Raised beds"), ("d.md", "Gravel path"),
("e.md", "Gravel path rules"), ("f.md", "Tools")):
write_page(b, name, title, "x[^s].", [src("s", "docs-en-a.md", 5, "Raised")],
**({"x-aliases": ["Beds", "Raised beds"]} if name == "a.md" else {}))
pairs = measure.duplicates(audit.load_bundle(b, self.root).concepts)
self.assertIn(("a.md", "b.md", "norm"), pairs)
self.assertIn(("a.md", "c.md", "alias"), pairs)
self.assertIn(("d.md", "e.md", "jaccard"), pairs)
self.assertFalse(any("f.md" in p for p in pairs))
def test_a_wrong_root_raises(self) -> None:
with self.assertRaises(measure.RunError):
measure.structure(self.bundle, self.tmp / "nowhere", self.blocks, self.order)
class AuditRecordTest(Fixture):
def test_uncited_sentences_are_classed_by_cause_and_yaml_form_apart(self) -> None:
write_page(self.bundle, "odd.md", "Odd", "```bash\n\nPlain words here.\n\nSee also: [Beds](beds.md)",
[{"id": "y", "resource": "/kilde/docs-en-a.md", "x-locator": {"line": 5}, "x-quote": False}])
out = self.tmp / "resultat.json"
rec = measure.audit_record(self.bundle, self.root, "K", out)
self.assertEqual(rec["exit"], 1)
# labels.md in the shared fixture holds one more link lead-in ("See also: [Beds](beds.md)")
self.assertEqual(rec["uncited"], {"fence line": 1, "link lead-in": 2, "prose": 1, "table row": 1})
self.assertEqual(rec["yaml_form"], 1)
self.assertEqual(json.loads(out.read_text(encoding="utf-8"))["variants"]["K"]["exit"], 1)
with self.assertRaises(measure.RunError):
measure.audit_record(self.bundle, self.root, "K", out) # one record per variant
# ---------------------------------------------------------------------------------------------- step 6: cost
def msg(mid: str, inp: int, cr: int, cw: int, out: int, stop: str | None = "end_turn") -> dict[str, Any]:
return {"type": "assistant", "message": {"id": mid, "stop_reason": stop, "usage": {
"input_tokens": inp, "cache_read_input_tokens": cr, "cache_creation_input_tokens": cw, "output_tokens": out}}}
def jsonl(path: Path, lines: list[dict[str, Any]]) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text("\n".join(json.dumps(x) for x in lines) + "\n", encoding="utf-8")
class HarvestTest(unittest.TestCase):
def setUp(self) -> None:
self._tmp = tempfile.TemporaryDirectory()
self.proj = Path(self._tmp.name)
user = {"type": "user", "message": {"content": "task"}}
jsonl(self.proj / "s1.jsonl", [user, msg("m0", 5, 100, 10, 7)])
sub = self.proj / "s1" / "subagents"
# a streamed message id appears twice with growing output: counted once, at its max
jsonl(sub / "agent-a1.jsonl", [user, msg("x1", 3, 20_000, 2_000, 10, None), msg("x1", 3, 20_000, 2_000, 50),
msg("x2", 1, 22_000, 500, 900)])
(sub / "agent-a1.meta.json").write_text(json.dumps({"agentType": "p1-compiler", "description": "P1-K-pack1"}))
jsonl(sub / "agent-a2.jsonl", [user, msg("y1", 2, 19_000, 1_000, 5)])
(sub / "agent-a2.meta.json").write_text(json.dumps({"agentType": "p1-compiler", "description": "load test"}))
jsonl(sub / "agent-a3.jsonl", [user, msg("z1", 1, 1, 1, 1, None)])
(sub / "agent-a3.meta.json").write_text(json.dumps({"agentType": "p1-consolidator",
"description": "P1-K+-run1"}))
# a session not listed in okter.txt: its transcript is never opened
jsonl(self.proj / "s9" / "subagents" / "agent-b1.jsonl", [user, msg("q", 1, 1, 1, 1)])
(self.proj / "s9" / "subagents" / "agent-b1.meta.json").write_text(
json.dumps({"agentType": "p1-compiler", "description": "P1-K-pack2"}))
self.okter = self.proj / "okter.txt"
self.okter.write_text("s1 step8\ns1 step9\n", encoding="utf-8")
def tearDown(self) -> None:
self._tmp.cleanup()
def test_four_categories_turns_startup_and_attribution(self) -> None:
got = cost.harvest(self.proj, cost.sessions(self.okter))
self.assertEqual(got["sessions_read"], ["s1"])
runs = {r["unit"]: r for r in got["runs"]}
k = runs["pack1"]
self.assertEqual((k["variant"], k["input"], k["cache_read"], k["cache_write"], k["output"]),
("K", 4, 42_000, 2_500, 950))
self.assertEqual(k["turns"], 2)
self.assertEqual(k["startup"], 3 + 20_000 + 2_000)
self.assertEqual(runs["run1"]["variant"], "K+")
self.assertEqual(runs["run1"]["stop_reason"], None) # a stopped agent is listed, not dropped
self.assertEqual([u["description"] for u in got["unattributed"]], ["load test"])
self.assertEqual(got["main"]["s1"]["cache_read"], 100)
self.assertNotIn("pack2", runs)
def test_output_never_recorded_is_derived_from_the_next_messages_input_growth(self) -> None:
# Found in session 2: a long streamed message keeps only its first usage record (output 2, no stop
# reason). The next message's input side grew by that output plus the text injected between them (tool
# results and rendered attachments), counted high at 2.5 characters per token so the output is a lower bound.
def result(text: str) -> dict[str, Any]:
return {"type": "user", "message": {"content": [{"type": "tool_result", "content": text}]}}
sub = self.proj / "s1" / "subagents"
jsonl(sub / "agent-a4.jsonl", [{"type": "user", "message": {"content": "task"}},
msg("w1", 2, 0, 10_000, 300, "tool_use"), result("x" * 400),
msg("w2", 2, 10_000, 50_000, 2, None), msg("w2", 2, 10_000, 50_000, 2, None),
result("y" * 40), msg("w3", 2, 60_000, 5_010, 20)])
(sub / "agent-a4.meta.json").write_text(json.dumps({"agentType": "p1-compiler", "description": "P1-K-pack3"}))
runs = {r["unit"]: r for r in cost.harvest(self.proj, cost.sessions(self.okter))["runs"]}
w = runs["pack3"]
self.assertEqual(w["output_recorded"], 300 + 2 + 20)
self.assertEqual(w["output"], 300 + (5_010 - 40 * 2 // 5) + 20)
self.assertEqual((w["output_derived_messages"], w["output_unrecorded"]), (1, 0))
self.assertEqual(w["total"], 2 + 2 + 2 + 70_000 + 65_010 + w["output"])
# the last message of a run has no next message: its output stays as recorded and is flagged
self.assertEqual((runs["run1"]["output"], runs["run1"]["output_unrecorded"]), (1, 1))
self.assertEqual(runs["pack1"]["output_derived_messages"], 0)
def test_growth_from_injected_attachments_is_not_counted_as_output(self) -> None:
# The load test's pattern: a short call, then 5133 characters of rendered attachments before the next turn.
sub = self.proj / "s1" / "subagents"
jsonl(sub / "agent-a5.jsonl", [{"type": "user", "message": {"content": "task"}},
msg("v1", 2, 0, 18_602, 16, None),
{"type": "attachment", "rendered": "z" * 5_133},
{"type": "user", "message": {"content": [{"type": "tool_result",
"content": "w" * 151}]}},
msg("v2", 2, 18_602, 1_894, 24, None)])
(sub / "agent-a5.meta.json").write_text(json.dumps({"agentType": "p1-compiler", "description": "P1-LOAD-x"}))
runs = {r["unit"]: r for r in cost.harvest(self.proj, cost.sessions(self.okter))["runs"]}
self.assertEqual((runs["x"]["output"], runs["x"]["output_derived_messages"]), (16 + 24, 0))
class ProjectionTest(unittest.TestCase):
def test_least_squares_on_cost_per_block_against_blocks_read(self) -> None:
p = cost.project([(600_000, 600, 0), (220_000, 200, 600)], total_blocks=3000)
self.assertAlmostEqual(p["fit"]["a"], 1000)
self.assertAlmostEqual(p["fit"]["b"], 1 / 6)
self.assertAlmostEqual(p["fit"]["value"], 3_750_000)
self.assertAlmostEqual(p["flat"], 3_075_000)
def test_one_point_has_no_growth_term(self) -> None:
p = cost.project([(600_000, 600, 0)], total_blocks=3000)
self.assertEqual(p["fit"]["b"], 0)
self.assertEqual(p["fit"]["note"], "one point, no growth term")
self.assertAlmostEqual(p["fit"]["value"], 3_000_000)
def test_stop_per_block_against_naive_per_source(self) -> None:
s = cost.stop_k(pack1_cost=600_000, pack1_blocks=600, cut_blocks=1200, pack1_sources=5, cut_sources=19)
self.assertEqual(s["per_block"], 1_200_000)
self.assertEqual(s["per_source"], 2_280_000)
self.assertTrue(s["stop"])
self.assertFalse(cost.stop_k(500_000, 600, 1200, 5, 19)["stop"]) # exactly 1 M does not stop
self.assertTrue(cost.stop_k(500_001, 600, 1200, 5, 19)["stop"])
def test_kplus_stop(self) -> None:
self.assertFalse(cost.stop_kplus(run1_cost=200_000, run1_pages=8, pages_total=40)["stop"])
self.assertTrue(cost.stop_kplus(run1_cost=200_001, run1_pages=8, pages_total=40)["stop"])
class AllocationTest(unittest.TestCase):
def test_tokens_per_source_by_block_share_and_the_two_means(self) -> None:
names = [f"s{i:02d}.md" for i in range(1, 20)]
blocks_doc = {"order": names, "blocks": [{"file": n, "start": k, "end": k} for n in names for k in (1, 2)]}
packs = [names[i:i + 5] for i in range(0, 19, 5)]
costs = {1: 1000, 2: 500, 3: 500, 4: 800}
per = cost.allocate(costs, packs, blocks_doc)
self.assertEqual(per["s01.md"], 200)
self.assertEqual(per["s16.md"], 200)
means = cost.means(per, names)
self.assertEqual(means["1-5"], 200)
self.assertEqual(means["15-19"], 180) # source 15 in pack 3 (100), 16-19 in pack 4 (200 each)
# ---------------------------------------------------------------------------------------------- step 7: side by side
class SideBySideTest(Fixture):
def setUp(self) -> None:
super().setUp()
self.begreper = self.tmp / "begreper.txt"
self.begreper.write_text("Beds\tBeds;Raised beds\nLabels\tLabels\nCompost\tCompost\n", encoding="utf-8")
self.d = self.tmp / "D"
write_page(self.d, "r-beds.md", "Raised beds", "- [Alpha](k.md)", [src("o1", "docs-en-a.md", 5, "Raised beds")])
self.l4 = self.tmp / "L4"
write_page(self.l4, "x.md", "THE raised-beds, explained!", "Beds drain.[^b1]",
[src("b1", "docs-en-a.md", 5, "Raised beds drain well.")])
write_page(self.l4, "y.md", "Compost", "Compost helps.[^b1]",
[src("b1", "docs-en-a.md", 99, "Compost")]) # a link past the end of the file
def columns(self) -> list[tuple[str, Path | None]]:
return [("K", self.bundle), ("K+", None), ("D", self.d), ("L4", self.l4)]
def test_three_concepts_in_four_columns_with_the_empty_states(self) -> None:
out = self.tmp / "side.html"
sidebyside.render(sidebyside.read_begreper(self.begreper), self.columns(), self.root, out)
html = out.read_text(encoding="utf-8")
self.assertEqual(html.count('<tr class="concept">'), 3)
self.assertEqual(html.count('<td class="cell'), 12)
self.assertIn("ikke bygget", html) # K+ stopped
self.assertIn("ikke i registeret", html) # D has no Labels register page
self.assertIn("ingen side", html) # K is built and has no Compost page
self.assertNotIn("http", html)
def test_l4_finds_a_title_with_other_case_and_punctuation(self) -> None:
found = sidebyside.find(self.l4, ("Raised beds", ("Raised beds",)), l4=True)
self.assertEqual(found, ["x.md"])
def test_the_link_check_flags_a_line_past_the_end(self) -> None:
out = self.tmp / "side.html"
sidebyside.render(sidebyside.read_begreper(self.begreper), self.columns(), self.root, out)
resolved, total = sidebyside.check(out, self.root)
self.assertEqual(total - resolved, 1)
self.assertEqual(sidebyside.main(["check", "--html", str(out), "--kilde-root", str(self.root)]), 1)
class ScriptsTest(unittest.TestCase):
SCRIPTS = (ROOT / "tests" / "p1_repo.sh", ROOT / "tests" / "p1_trial.sh")
def test_bash_syntax_and_ascii(self) -> None:
for script in self.SCRIPTS:
self.assertEqual(subprocess.run(["bash", "-n", str(script)]).returncode, 0, script.name)
script.read_bytes().decode("ascii")
def test_the_trial_check_fails_every_check_when_nothing_was_built(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
env = {**os.environ, "P1_ROOT": tmp}
res = subprocess.run(["bash", str(self.SCRIPTS[1])], env=env, capture_output=True, text=True, cwd=ROOT)
self.assertEqual(res.returncode, 1)
lines = [x for x in res.stdout.splitlines() if x.strip()]
self.assertGreaterEqual(len(lines), 8)
self.assertTrue(all(x.startswith("FAIL") for x in lines), res.stdout)
class NoModelTest(unittest.TestCase):
def test_trial_modules_import_no_network_or_model_client(self) -> None:
for path in sorted((ROOT / "evals" / "p1").glob("*.py")):
source = path.read_text(encoding="utf-8")
for banned in BANNED:
self.assertNotIn(f"import {banned}", source, path.name)
self.assertNotIn(f"from {banned}", source, path.name)
if __name__ == "__main__":
unittest.main()

182
gates/ANSWERSET.md Normal file
View file

@ -0,0 +1,182 @@
# Answer set for collection 1 (wave 2, order 6)
The frozen question set for `PLAN.md` criterion 4 on collection 1, made from the fresh frozen copy (contract K1) so
that it resembles the collection: questions that need two or more documents seen together, a group of version-history
questions reported on its own, and 20 questions held out outside the repository. It replaces the E2 set
(`MULTIDOC.md`) for the verdict, because 33 of E2's 60 rest on release notes alone. `answerset.py` holds the gate and
`answers.py` the harness the answer measurements use (contract K5). None of them calls a model or starts one.
```
python3 gates/answerset.py check --set <set.json> --sources <K1 root> [--per-question] [--min-paths 3 --min-many 20]
python3 gates/answerset.py inside --set <set.json> --part-root <K1 subset root> [--require-all]
python3 gates/answerset.py split --set <all.json> --sources <K1 root> --seed <n> --held-out-count 20 \
--set-out gates-local/answerset/set-60.json --set-label gates-local/answerset/set-60.json \
--held-out <file OUTSIDE the repository> --part gates-local/answerset/part-del1.json \
--part-sources <part root> --part-label gates-local/answerset/part-del1.json --manifest gates/answerset.manifest.json
python3 gates/answerset.py freeze --set <drafts.json> --sources <K1 root> --seed <n> --count 30 --min-paths 3 \
--min-many 20 --prefix x --set-out <set.json> --set-label <label> --manifest <manifest.json>
python3 gates/answerset.py gate --set <set.json> --manifest gates/answerset.manifest.json --sources <K1 root> \
--arm filsok|bundle --answers <answers.json> [--out <results.json>]
python3 gates/answerset.py stub --set <set.json> --arm filsok|bundle --kind fasit|no-citations --out <answers.json>
```
- **check** reads K1 with its own code (`okfwiki.sources` is not imported). The set names the root it was made from
(`sources.frozen_at` and `sources.manifest_sha256`, the sha256 of the root's `source-manifest.json`), and every cited
file must be listed in K1 with its sha256. It prints the denominators from the set itself: spans that stand byte for
byte in their file (20-400 characters), questions with every span standing, questions with at least two distinct
paths, questions whose `group` is the one K1 and the path count give, questions where every path carries an answer
key inside that path's spans, wording keys (`keyform.py`, as in E2c) and negated keys that stand negated (E2d). PASS
only when every count is N of N with N > 0.
- **The group is set by the sources:** `history` when one path has `main_topic: false` in K1 (a release note or a
weekly What's New page), otherwise `docs-2-3` (2-3 distinct paths) or `docs-4` (4 or more).
- **inside** counts the questions whose every span stands in its file in a part root (a K1 subset root). On the 60 it is
a number for the report; on the part set it is a requirement (`--require-all`).
- **split** checks both the set and the part first (PASS required, and every part question inside the part root),
then holds out per group in the fixed order `docs-2-3`, `docs-4`, `history`, with quotas proportional to the group
sizes (largest remainder) and one `random.Random(seed)` drawing `sample(sorted(ids of the group), quota)`. Both parts
are renumbered in the order of the original ids (`d01..`, `h01..`). The held-out file must lie outside the
repository and is never overwritten. The manifest holds the seed, counts per group, sha256 values and the two roots'
K1 sha256, and no text.
- **gate** scores one arm with the gates' one key test (`multidoc.key_holds`): a question is correct when the answer
holds every key and the citations quote every needed path verbatim (whitespace collapsed; `path` is the K1 path,
and a leading `/` as in a page's `resource` is accepted). The set's sha256 must be one of the manifest's parts, and
the root's K1 sha256 must be that part's root (the copy for the set and the held out, the first part for the part
set). A missing answers file scores 0 of N, RED, exit 1 (fail-closed). `--out` writes the results file of K5 point 5,
sorted by id. GREEN only when every question is correct; exit 0 when every question was answered.
- **stub** writes a known arm: `fasit` (every key as its own sentence, "not <key>" when negated, and every span quoted)
and `no-citations` (the same answer, no citations).
## Frozen 09.10.2026 (wave 2, order 6)
Written from the frozen copy of 08.10.2026 (635 sources, K1 `manifest_sha256` `8c9f87fd…`) by helpers in the user's
session (Opus), each question from a pack of byte-exact source lines that code prepared around rare names shared by an
anchor page and its candidates, spread over the sections of the page overview in proportion to their text. A separate
helper that did not write the question read every question against windows around its spans: the keys (facts a correct
answer must hold) and whether every file is necessary, helped by a code pre-check over all 635 files for another file
that holds the keys of two of them. Questions it marked FIX were repaired and, when a file was not necessary, rebuilt
and read again; the rest were dropped.
| Part | Questions | docs-2-3 | docs-4 | history | Confirmed by a separate reader |
|---|---:|---:|---:|---:|---:|
| all, before the split | 80 | 35 | 34 | 11 | 80 of 80 |
| `set-60.json` | 60 | 26 | 26 | 8 | |
| held out (outside the repository) | 20 | 9 | 8 | 3 | |
| `part-del1.json` (first part only, `p01`-`p18`) | 18 | 9 | 9 | 0 | 18 of 18 |
- **check:** PASS on the 80 (389 of 389 spans, 0 of 391 keys wording, 13 of 13 negated keys negated) and on the part
against the first part's root (91 of 91 spans, 0 of 86 wording, 5 of 5 negated); PASS again on `set-60.json`.
- **History:** 11 of 80 (13.8 %); the release notes and weekly What's New pages are 12.45 % of the copy's characters
(1,149,271 of 9,231,505). The first part holds no history source, so the part set has none.
- **split:** seed 20261009; held out per group docs-2-3 9, docs-4 8, history 3.
- **inside** the first part: 1 of the 60; 18 of 18 of the part set.
- **Proof, no model:** without an answers file 0 of 60, RED, exit 1; the fasit stub 60 of 60, GREEN; right answers
without citations 0 of 60 (correct answer 60 of 60). On the part set: 0 of 18 RED exit 1, 18 of 18 GREEN, 0 of 18.
## The harder set on the first part (wave 4, order 21, frozen 12.10.2026)
Wave 3 measured the 18 part questions near the ceiling (both arms 17 of 18), so order 21 made a harder set from the
first part's 38 files: every question needs at least 3 documents and at least 20 of 30 need 4 or more, every file is
necessary, and at least one key is a condition or relation that only two of the files give together. None of the 18
is reused.
- **check** with `--min-paths N` counts the questions with N or more distinct paths and with `--min-many M` requires
at least M questions with 4 or more (`questions with >= 4 distinct paths: x of n (required >= M)`). The defaults
(2 and 0) print and judge exactly as before, so the order 6 sets keep their verdict.
- **freeze** freezes a set that `split` did not make: it refuses an existing set or manifest, a set that fails the
check with the thresholds, or a set with another count than `--count`; it shuffles the sorted ids with
`random.Random(seed)`, renumbers them `x01..`, and writes a manifest of its own (seed, rules, counts per group, the
set's sha256, the root's and its copy's K1 sha256; no text) that names the set the part of its root, so `gate`
scores it as it scores the part.
- **Made** by helpers in the user's session (Opus) from packs of byte-exact lines that code built around backticked
names standing in 2-6 of the 38 files; one draft helper per question; a separate review helper per question that
did not write it read the question against windows around its spans, a code pre-check over all 38 files, and
confirmed every file necessary and the join; FIX was repaired (a repair that changed files was read again), DROP
dropped. Two questions sharing two keys in one file count as overlap, and the higher id goes. A surplus over 30
keeps every docs-4 and drops docs-2-3 with the highest id.
| `gates-local/answerset/part-del1-hard.json` (`x01`-`x30`) | Questions | docs-2-3 | docs-4 | Confirmed by a separate reader |
|---|---:|---:|---:|---:|
| frozen, seed 20261011 | 30 | 4 | 26 | 30 of 30 |
- **check** against the first part with `--min-paths 3 --min-many 20`: PASS, 30 of 30 with 3 or more paths, 26 of 30
with 4 or more; **inside** the first part 30 of 30.
- **Proof, no model, both arms:** without an answers file 0 of 30, RED; the fasit stub 30 of 30, GREEN; right answers
without citations 0 of 30 (correct answer 30 of 30), RED.
```
python3 gates/answerset.py gate --set gates-local/answerset/part-del1-hard.json \
--manifest gates/answerset-del1-hard.manifest.json --sources <first part root> --arm filsok|bundle --answers <file>
```
## The harness (`answers.py`, K5 points 2-7)
```
python3 gates/answers.py setup --run <dir> --name <run> --arm filsok|bundle --set <set.json> --sources <K1 root> \
[--bundle <collection>] [--part-root <the K1 root the set was made from>]
python3 gates/answers.py collect --run <dir> --arm <arm>
python3 gates/answers.py harvest --run <dir> --name <run> --arm <arm> --transcripts <dir>
python3 gates/answers.py score --results <filsok results> --results <bundle results> [--tokens <file>]... [--out <file>]
```
- **setup** copies every K1 source of the root into `<run>/arms/<arm>/kilde/` (checked against K1; for `bundle` the
collection goes to `<run>/arms/bundle/wiki/` beside it) and writes `<run>/tasks/<arm>/<id>.md`: the question, the
basis and the answer path, never the keys, the spans or the number of documents. It prints one line per task,
`S1-<run>-<arm>-<id>` and the task path: the subagent's description and the file it is given.
The set and `--sources` must have the same K1, unless `--part-root` is given (wave 5, order 31 A3): then the set
names the K1 of the part root, the part's `subset_of.manifest_sha256` is the K1 of `--sources`, and every source of
the part stands in `--sources` with the same path and sha256; otherwise exit 1 with the reason. The arm then searches
the whole of `--sources`, while `answerset.py gate` still judges the set against the part root.
- **collect** gathers `<run>/answers/<arm>/<id>.json` into `<run>/answers/<arm>.json` (K5 point 4; the id comes from the
file name).
- **harvest** reads every `*.jsonl` under the transcripts directory: a subagent is matched by the description in its
`.meta.json`, or, with no description, by the task path in its first prompt. Per question it sums the four usage
fields over all runs (each message id once, at its largest value), adds `output_tokens_derived` (a lower bound for
an output the transcript never recorded, as in `okfwiki/cost.py`), and counts isolation breaches as in
`evals/direction_probe.py`: a tool call that reads or lists a path outside the arm's basis and the task file, a tool
that is not allowed, or a write to another file than the answer. A task without a transcript exits 1.
**`echo` (wave 5, order 31 A2):** in a Bash chain that starts with `cd <basis> &&`, `echo` with literal words is not
a breach (order 13's helpers printed `---` between searches: 21 of its 26 counted breaches, classified call by call
before the change). Its arguments are checked as the search commands' are, so a path outside the basis, `~`, `..`,
a redirection, `$` or a backtick is still a breach. The task text does not offer `echo`. No other rule was made:
order 13 had no backtick or `$` inside single quotes and no `Read` of the helper's own answer file (its three checks
of the answer file were `python3` and `jq` in Bash, which stay breaches).
**Four more kinds (wave 5, order 31 A2b, operator 19.10.2026):** the price measurement B1 counted 9 breaches in 4 of
4 questions, none of which read a source outside the basis. Each kind has a test that failed first, with the
opposite cases that stay breaches:
1. `2>/dev/null` right before a separator (`;`, `|`, `&&`, `||`) is not a breach, as before a space or at the end.
Every other redirection (`> file`, `>/dev/null`, `2>&1`, `2>` anywhere else) still is.
2. The search word of `grep`/`egrep`/`fgrep`/`rg` (the value of `-e`/`--regexp`, or else the first argument that is
not an option) and the script of `sed` (the value of `-e`/`--expression`, or else the first such argument) are not
paths. With `-f`/`--file` the search words come from a file, none is positional, and the file is checked as a path.
A file path after the search word, `~` and `..` are still breaches. **Order 39:** the value of every other option
that takes one (`grep -C`, `--include`, `--exclude-from`, `rg --glob`, `--ignore-file` and the rest, GNU and BSD)
is consumed and checked as a path, so a file option's value outside the basis is a breach, and `rg --pre` or
`--hostname-bin` (which run a program) is one. An option missing from the table in `SEARCH_WORDS` makes its value
the search word, and a path there goes unchecked, so the lists must be whole. `grep --context` with a separate
value is left out, because BSD grep takes its value only after `=` (`--context 1 /x f` searches for 1 in `/x`).
A `sed` script is read command by command instead of checked as a path: `w`, `W` and `e` (also as flags of `s`)
are breaches, the file after `r` or `R` is checked as a path, and a script that cannot be parsed is a breach. A
flag cluster with `i` or `I` (`-ni`, `-Ei`, `-I`) is `sed -i`. An unquoted newline separates commands as `;`
does, and `#` is never read as a comment (bash reads it so only at the start of a word; a real comment is then
checked as arguments, which is stricter).
3. `$` or a backtick inside single quotes is not an expansion. Unquoted or inside double quotes it still is, and so is
an escaped backtick inside double quotes (order 31 A2 classed order 13's one as real).
4. `Read` of the helper's own answer file is not a breach, and neither is a Bash command of the read-only commands
plus `jq` whose only path outside the basis is the answer file: after `cd <basis> &&`, after `cd` into the answer's
folder, or with no `cd` and the answer's absolute path. Outside the basis every operand must be the answer file, so
another file in the answers folder, a glob, `ls` of the folder, a relative path without `cd` and `jq -f` are still
breaches, as are `python3`, a write and `jq` on any other file. Outside the basis a pipe stage that names no
file, as in `jq . <answer> | head`, is counted too (stricter than needed). The task text does not offer `jq`.
Against order 13 the A2b rules move 2 of A2's 5 real calls (one `jq` on the own answer after `cd` into its folder,
one `sed` script starting with `/`) and leave 3; on B1 they leave 1 of 9 (an escaped backtick in double quotes).
- **score** gives per arm and group "x of n", by path count (2-3 and 4 or more, history included), the pairs (both,
only filsok, only bundle, neither) with the two-sided exact McNemar p, the difference bundle - filsok with its paired
95 % interval (Newcombe 1998, Statist. Med. 17:2635-2650, method 10, tested against its Table III), and the smallest
difference the set can show at 80 % power and alpha 0.05 with the measured share of discordant pairs (Connor 1987;
tested against the sample sizes in `PLAN.md § Styrke`). It prints no line per question.
The questions and spans derive from Anthropic documentation, so the set lives in `gates-local/answerset/` and the held
out outside the repository (CLAUDE.md rule 3). Only the tools, their tests (synthetic fixtures) and the manifest are
tracked. The held-out questions are never opened during development; the manifest's sha256 is the check.
Tests: `python3 -m unittest discover -s gates/tests`. Types: `mypy --strict gates/`.

173
gates/CALIBRATION.md Normal file
View file

@ -0,0 +1,173 @@
# Reader calibration (order 3: 300 of 300, calls of up to ten claims)
The frozen calibration set for `PLAN.md` criterion 2: before an independent reader may judge the claims on the wiki's
pages, it must show that it can tell a claim that follows from its source excerpts from one that does not. From
06.10.2026 the reader judges up to ten claims per call and gives one verdict per claim (`CLAUDE.md` § The shape; K3 in
the wave-1 contracts), so the calibration measures the reader in calls, not one claim at a time. `calibration.py` holds
the tools. None of them calls a model, and the reader pass itself is not here (Step 9 of the v1 plan).
```
python3 gates/calibration.py check --draft <draft.json> --sources <source dir>
python3 gates/calibration.py check --set gates-local/calibration/pairs-300.json --key gates-local/calibration/key-300.json \
--calls gates-local/calibration/calls-300.json --manifest gates/calibration.manifest.json --sources <source dir>
python3 gates/calibration.py build --draft <draft.json> --sources <source dir> --seed <n> --lone 100 --dense 5 \
--set-out gates-local/calibration/pairs-300.json --key-out gates-local/calibration/key-300.json \
--calls-out gates-local/calibration/calls-300.json --manifest gates/calibration.manifest.json \
--set-label <path> --key-label <path> --calls-label <path>
python3 gates/calibration.py stub --set <set> (--verdict supported|unsupported | --key <key>) \
[--calls <layout> --accept-at <1-10>] --out <verdicts.json>
python3 gates/calibration.py gate --set <set> --key <key> --calls <layout> --manifest gates/calibration.manifest.json \
--sources <source dir> --verdicts <verdicts.json> [--passed <passed.json>]
```
## The three files and the labels
- **The set** (`pairs-300.json`) is what the reader sees: per claim an id, the claim and its excerpts (file, line,
text). The ids follow the call order and say nothing about the label.
- **The key** (`key-300.json`) gives per claim the label, the kind, the draft id and a one-sentence reason.
- **The call layout** (`calls-300.json`, schema `okf-wiki/reader-calls/1`): `call_size_max` (10), the calls with their
claim ids in position order, and `set_sha256` that binds the layout to the set. Every claim stands in exactly one
call; its position is its index in the call plus one (1-10).
Labels: `unsupported` (planted, must be caught), `supported` (counted controls, must be accepted) and
`filler-supported`. Fillers are supported claims that fill the calls so that most calls look like a real page: one
wrong claim, if any, among right ones. They are checked like supported claims (verbatim excerpts, not a copy of the
excerpt) and audited, are reported apart ("filler accepted x of y"), and never count in the thresholds. A filler may
name the unsupported pair it is the twin of (`twin_of`); the build never puts the two in the same call.
## The tools
- **check** prints the denominators from the pairs themselves: excerpts that stand verbatim (byte-exact) in their file
and, for a built set, at their stated line; pairs per label and per kind. It fails when a kind of the two counted
labels has no pair, when a kind does not fit its label, when a `wrong-number` claim has no number that is absent from
its excerpts, when a `conflated-sources` pair does not quote two files, when a supported or filler claim is a
verbatim copy of its excerpt, or when a `twin_of` does not name an unsupported pair. There is no rule of equal
numbers any more: a built set is checked against the manifest instead, which states the counts per label, per kind
and per position, the sha256 of set, key, layout and sources, and the layout's own counts. The layout must hold every
claim once, no call over ten, the right `set_sha256`, and unsupported claims at every position 1-10. Check prints
the layout as a distribution (unsupported per call, unsupported alone in their call, unsupported per position).
- **build** checks a labelled draft and lays it out with a fixed seed (the rule is written into the manifest as
`shuffle`): `--lone` unsupported pairs stand alone in a call, at positions spread evenly over 1-10, the rest stand
`--dense` to a call; the counted supported pairs go one per call, in call order (so into the lone calls first);
fillers fill every call to ten, taken in a cycle, never twice in one call and never beside their twin. A filler may
therefore stand in several calls under different claim ids; the manifest gives the slots and the distinct fillers.
Nothing is written when the layout breaks a rule. A built set is frozen: build refuses to overwrite the set, the key
or the layout. An earlier manifest at the same path moves into the new manifest's `history`.
- **stub** writes verdicts without a reader: the same verdict for every claim (reject-all, accept-all), or the key's
verdicts (the known-positive), and with `--calls` and `--accept-at P` "supported" for every claim at position P (the
position-mild stub). A stub names the model `stub`, which no reader transcript names.
- **gate** scores one reader's verdicts (`{"reader": "<name>", "models": ["<model>"], "verdicts": [{"id", "verdict"}]}`,
a verdict being `supported` or `unsupported`) and prints the model it scored (`model: <name>`), the totals, the
caught count per kind, `caught by position: 1 x of y, ..., 10 x of y` and the fillers apart. It never prints or writes a result per call or per pair (K3 point 5; `CLAUDE.md`:
the reader is improved only from totals and counts per kind). A missing verdict, an invalid value or an id given
twice counts as wrong (fail-closed); a missing verdicts file scores 0. GREEN only when every unsupported claim is
caught at every position, at least `accepted_min` counted supported claims are accepted and no verdict is missing,
fillers included, and the verdicts name exactly one model; verdicts that name no model, or two or more, are RED
(fail-closed). A RED run ends with one `not met:` line that names what failed, positions included. The set, the
key, the layout and the sources must match the manifest, or the gate refuses to score.
## The gate is bound to the reader's model (PLAN § Rammer 23, 31.10.2026)
The reader's agent file names a model family (`model: opus`), and the family alias moves to a new model when one is
released. A pass of the gate holds only for the model that was scored, so the gate and the reading are tied to it:
1. The gate run's readers are collected with `okfwiki.reader collect ... --calibration`. Collect reads the model of
every reader transcript it uses (`message.model` of the assistant records, as Claude Code writes it) and writes the
sorted, distinct models into the verdicts file as `models`.
2. `gate ... --passed <passed.json>` adds a GREEN run to the record of green runs (schema
`okf-wiki/calibration-passed/1`): `{"schema": ..., "passed": [{"model", "set_sha256", "key_sha256",
"verdicts_sha256", "reader"}]}`. The record has no time in it, the same entry is not added twice, and a RED run never
writes it. A record that cannot be read is a FAIL and is left as it was.
3. A reading of the wiki is collected with `okfwiki.reader collect ... --gate-passed <passed.json>`. When the
transcripts name no model, or a model that has no entry in the record, collect writes nothing and exits 1. A new
model therefore needs a new GREEN gate run before its verdicts count.
Thresholds (in the manifest): `caught_min` is every unsupported claim (the operator, 06.10: 300 of 300).
`accepted_min` is 90 % of the counted supported claims, rounded up (45 of 50), chosen by the PM in E3 because a reader
that rejects more than one supported claim in ten makes the writing step unusable.
Kinds of unsupported claim: `overgeneralisation`, `wrong-number`, `swapped-cause`, `not-mentioned`, `reversed-polarity`,
`conflated-sources` (two excerpts from two files, one subject's property given to the other). Kinds of supported and
filler claim: `paraphrase`, `inference` (one reasoning step from one excerpt), `synthesis` (needs both excerpts).
The pairs derive from Anthropic documentation, so the set, the key, the layout and the drafts live in `gates-local/`
(CLAUDE.md rule 3). Only the tools, their tests (synthetic fixtures) and the manifest are tracked. The reader is shown
the set and the layout only, never the key or the drafts.
Tests: `python3 -m unittest discover -s gates/tests`. Types: `mypy --strict gates/`.
## The set (order 3, 08.10.2026)
Built with seed 20261008, `--lone 100 --dense 5`, against the 599 sources of the copy of 21.09 (the same
`tree_sha256` as E3). 1,400 claims in 140 calls of ten:
- **300 unsupported**, 50 of each kind: E3's 50, and 250 new ones from 150 docs pages E3 did not use (277 of the 300
quote a docs page first, 92.3 %; collection 1 is 92.2 % documentation by text). Each new one was written as one small
change from a supported reading of its excerpt (its twin).
- **50 supported** that count: E3's 50 (paraphrase 15, inference 20, synthesis 15), each once, all in lone calls.
- **1,050 filler slots** from 250 distinct fillers: the twins of the 250 new unsupported pairs, each used 3 to 5 times
under different claim ids, never in the call of its own unsupported pair. The twins cost almost nothing beyond the
error itself, and they never count in the thresholds.
- **Layout:** 100 calls with one unsupported claim among nine supported ones (like a real page), 40 calls with five.
Unsupported claims per position 1-10: 33, 30, 28, 23, 32, 23, 30, 24, 39, 38.
Authoring and audit: 25 batches of ten unsupported pairs and their twins, each written by one helper (Opus) from six
pages and audited by another with the key visible, judging against the excerpts only. 500 new pairs: 455 OK, 45 FIX,
0 WRONG; every FIX took the auditor's wording (most were twins too close to the excerpt's wording, with the unsupported
claim reworded to stay one change from the new twin). `check` on the built set: 1,642 of 1,642 excerpts verbatim and
at their line.
Proofs without a reader (verdicts written before 31.10.2026 name no model and are RED under the model rule; a stub
written again names the model `stub`): no verdicts 0 of 300, RED; reject-all 300 of 300 and 0 of 50, RED; accept-all 0 of 300, RED;
the key accepting everything at one position RED at each of the ten positions, with that position named; the key as
judge GREEN.
## The folder set (motor B16, 08.11.2026)
The set above is Claude Code documentation and stays out of git. A folder collection (Norwegian and English PDF and
Office documents) needs its own measurement, so a second set is tracked in full: `gates/calibration-folder/` holds
the documents (`original/`), the text the engine froze from them (`kilde/`, the reader's sources), the draft, the
set, the key and the layout; `gates/calibration-folder.manifest.json` is its manifest. The same tools score it:
```
python3 gates/calibration.py gate --set gates/calibration-folder/pairs.json --key gates/calibration-folder/key.json \
--calls gates/calibration-folder/calls.json --manifest gates/calibration-folder.manifest.json \
--sources gates/calibration-folder/kilde --verdicts <verdicts.json> [--passed gates/calibration.passed.json]
```
- **The documents:** 32 written for the set, four per invented organisation (a housing cooperative, a sports club, a
school band, a community farm in Norwegian; a makerspace, an open-source project, an astronomy society, a sailing
club in English): per language 4 PDF, 4 Word, 4 Excel, 4 PowerPoint. No text from Anthropic or any other source.
Written by eight helpers (Opus) from one brief, rendered with python-docx, openpyxl and python-pptx, PDF through
LibreOffice from a Word file, and frozen with `python3 -m okfwiki.sources folder` (32 sources, 0 skipped; `lang`
16 no and 16 en, all right).
- **The pairs:** 24 batches, three per organisation, each from its own third of every document (spreadsheet parts keep
every sheet's title and header row). 300 unsupported (50 per kind), each with its twin as a filler (300), and 50
counted supported (paraphrase 15, inference 20, synthesis 15). By the document type of the first excerpt: docx 81,
pdf 78, pptx 71, xlsx 70. Audit 1 (one helper per batch, key visible, excerpts only): 487 OK, 163 FIX, 0 WRONG;
most fixes took out names or details that stand in the document but not in the excerpt. Audit 2 read the 163 fixed
pairs and their twins again: 140 OK, 33 FIX, 0 WRONG. One more pair rested on a word only in the file name, fixed.
- **Built** with seed 20261108, `--lone 100 --dense 5`: 1,400 claims in 140 calls, unsupported per position 1-10:
32, 33, 25, 27, 30, 32, 28, 31, 33, 29. `check`: 1,666 of 1,666 excerpts verbatim and at their line.
- **Proofs without a reader:** no verdicts, reject-all, accept-all RED; the key accepting everything at one position
RED at each of the ten positions, with that position named; the key GREEN.
- **First reading (run `kalmappe1`, 08.11.2026, claude-opus-5-5): RED.** Unsupported caught 299 of 300 (wrong-number
49 of 50, position 5 29 of 30, every other kind and position in full), supported accepted 50 of 50, fillers 1,045
of 1,050, 140 of 140 calls answered. The one miss was checked against the key (operator 08.11, the one exception
to judging the reader from totals only): the pair was right, the claim gave a difference of two figures that the
excerpt did not print. The reader's number check now says to work out a derived figure itself before judging.
- **Second reading, both sets, new instructions (runs `kalmappe2`, `kaldoc2`, 08.11.2026, claude-opus-5-5, as one
workflow): GREEN on both.** Folder set: caught 300 of 300, accepted 50 of 50, fillers 1,047 of 1,050. Docs set:
caught 300 of 300, accepted 49 of 50, fillers 1,047 of 1,050. Both runs are in `gates/calibration.passed.json`.
- **Collect needs both:** `okfwiki.reader collect --gate-passed` checks every manifest given with `--manifest`, by
default both tracked ones, so a model reads a collection only after a green run on each set.
## History: E3 (27.09.2026)
The first set had 100 pairs of (claim, excerpt) judged one claim per call: 50 planted unsupported claims
(overgeneralisation 9, wrong-number 9, swapped-cause 8, not-mentioned 8, reversed-polarity 8, conflated-sources 8) and
50 supported controls (paraphrase 15, inference 20, synthesis 15), from 90 source files of the copy of 21.09 (42 docs
pages, 48 release notes). Five authors wrote the pairs and two auditors read every label with the key visible: 93 OK,
7 FIX, 0 WRONG. The thresholds were 50 of 50 and 45 of 50, and `check` required equal numbers of the two labels. Its
manifest values stand under `history` in `calibration.manifest.json`; its files (`draft-100.json`, `pairs-100.json`,
`key-100.json`) stay in `gates-local/calibration/` untouched. Its 100 pairs are reused in the new set.

79
gates/MULTIDOC.md Normal file
View file

@ -0,0 +1,79 @@
# Multi-document set (E2)
The frozen question set for `PLAN.md` criterion 4 on collection 1: questions that each need at least four
different source documents seen together, written before the collection exists. `multidoc.py` holds the
three tools. None of them calls a model.
```
python3 gates/multidoc.py check --set gates-local/multidoc/set-60.json --sources <source dir> [--per-question]
python3 gates/multidoc.py gate --set gates-local/multidoc/set-60.json --manifest gates/multidoc.manifest.json \
--sources <source dir> --arm <name> --answers <answers.json> [--out <results.json>]
python3 gates/multidoc.py split --set <all.json> --sources <source dir> --seed <n> --held-out-count 20 \
--dev-out gates-local/multidoc/set-60.json --dev-label gates-local/multidoc/set-60.json \
--held-out <file OUTSIDE the repository> --manifest gates/multidoc.manifest.json
```
- **check** prints the denominators from the set itself: spans that stand verbatim (byte-exact) in their file,
questions whose every span does, questions with at least four distinct files, and questions where every file
carries an answer key that stands inside that file's spans (case-insensitive), the answer keys that are
wording, and the negated keys that stand negated in their file's spans (below). PASS only when all of them are
N of N and N > 0, no key is wording, and every negated key stands negated.
- **gate** scores one arm. A question counts when the answer contains every answer key (case-insensitive,
backticks and asterisks ignored, whitespace collapsed; a number key matches as a number and a negated key only
with a negation before it, below) AND the citations quote every needed file verbatim
(whitespace collapsed). A missing answers file scores 0 of N and exits 1 (fail-closed). The set and the source
directory must match the manifest's sha256, or the gate refuses to score. `--out` writes per-question results
for a paired test (McNemar) between two arms.
- **split** draws the held-out questions with `random.Random(seed).sample(sorted(ids), 20)`, renumbers both parts
(`d01..`, `h01..`) so the ids tell nothing about the draw, writes the held-out part outside the repository and
refuses to overwrite it. The manifest holds only the seed, counts and sha256 values.
## Answer keys are facts, not wording (E2c)
An answer key is the smallest fact the answer must hold: a name, a command, a flag, a setting, a number, a version,
or one word that carries the meaning. `keyform.py` counts the keys that are wording: two or more words with a
function word outside backticks (an article, a pronoun or determiner, a conjunction, a preposition, an auxiliary or
modal verb, a negation, or a focusing particle such as "only"). Such a key is split into the runs of its own words
without the function words, and each run must still stand in the span: "/vim or /config" becomes `/vim` and
`/config`, and "pin your model versions" becomes `pin` and `model version`. A key that is a whole number, a
percentage or an English number word matches as a number: its digits or its word, never inside a longer number,
version or identifier (`5` does not match `15` or `2.1.5`), and the 3-character minimum does not apply to it.
```
python3 gates/keyform.py --set <set.json> [--set <set.json> ...] [--list]
```
On 27.09.2026 (E2c) the four frozen parts held 104 wording keys of 495; after the rewrite they hold 0 of 523. Only
the keys changed. The manifests record the sha256 values from before under `keys_rewritten`.
## Negated keys (E2d)
Where a negation carried the fact ("not synced back" became `synced`), a key without it also accepts the opposite
answer. Such a key is marked `"negated": true`. It holds only where the answer has a negation at most six words
before it in the same sentence (a sentence ends at a line break or at `.`, `!`, `?` or `;` ending a word). The
negations are a fixed list: `not`, `no` (so also "no longer"), `never`, `none`, `neither`, `nor`, `without`, `cannot`,
and every word ending in `n't` ("isn't", "doesn't", "can't", "don't"; a curly apostrophe counts too). The same
function, `key_holds` in `multidoc.py`, scores both gates. A key without the mark holds as before, with or without a
negation. `check` requires every negated key to stand negated in one of its file's spans, so the mark is true to the
source. The `fasit` answer writes a negated key as "not <key>".
`polarity.py` counts the polarity keys that accept an answer of the opposite polarity. The polarity keys are listed
per set part (`{"schema": "okf-wiki/polarity-keys/1", "keys": [{"id", "atoms"}]}`). For each, the answer from the span is
the sentence of the key's spans where it stands negated, else the first sentence that holds it; the opposite answer is
that sentence with the negations within the window taken out, or with "not" put in front of the key when there are none.
```
python3 gates/polarity.py --set <set.json> --keys <keys.json> [--set ... --keys ...] [--list]
```
On 27.09.2026 (E2d) the list was E2c's own 22 polarity keys over the four parts. Before the mark, 22 of 22 accepted the
opposite answer. The mark went on the 17 that stand negated in their own spans; after it, 5 of 22 accept the opposite
answer. Those 5 carry a restriction, not a negation ("only" three times, "still", "keeps ... off"): nothing stands
before them to require, and the rule does not require the absence of a negation. The manifests record the sha256
values from before under `negated_marked`.
The questions and spans derive from Anthropic documentation, so they live in `gates-local/` and outside the
repository (CLAUDE.md rule 3). Only the tools, their tests (synthetic fixtures) and the manifest are tracked.
The held-out questions are never used during development (R54).
Tests: `python3 -m unittest discover -s gates/tests`. Types: `mypy --strict gates/`.

238
gates/README.md Normal file
View file

@ -0,0 +1,238 @@
# gates
## Mutant gate (E1)
`mutant_gate.py` runs an auditor command on every case in `mutants.manifest.json`: 37 mutants, each carrying a
defect of a named class, plus one known-positive bundle that must come back clean. It calls no model.
E1b added three link classes: `broken-link`, `orphan-page` and `index-coverage`. They are okf-wiki's own checks,
not SPEC § 11 conformance: SPEC § 6.1 says consumers MUST tolerate broken links. Their exact definitions are
in the manifest under `provenance.link_rules`, with criterion 6 as it stands (see below).
```
python3 gates/mutant_gate.py --manifest gates/mutants.manifest.json --cases gates-local/mutants \
--sources gates-local/mutants-kilder -- <auditor> {bundle} {sources}
```
- `{bundle}` becomes a fresh copy of the case bundle, and `{sources}` becomes the raw-source root.
- The auditor prints `{"findings": [{"check": "<class>", ...}]}` and exits 0 when clean or 1 when it raises an alarm.
Anything else counts as an error and catches nothing: a missing auditor, a crash, a timeout, output that is not
JSON, or an exit status that disagrees with the findings.
- The gate is GREEN only when every mutant is caught **with its own class**, the known-positive is clean and
nothing errored. Rejecting everything catches every mutant, but it raises a false alarm and matches no class.
- Before anything runs, every case file and every raw source listed in the manifest is checked against its
sha256. A mismatch stops the gate with exit 2.
The sources root is `gates-local/mutants-kilder/` (wave 1 order 4): byte-identical copies of the three documentation
files the pages cite and one release note, under `kilde/`, with `source-manifest.json` in the form of contract K1
(`docs/bolge1/0-felles.local.md` § 4, local). The manifest lists all five files with their sha256. Until 08.10.2026
the root was the copy of 21.09 (`~/okf/benk/wiki`); that root has no K1 file, so the gate now stops on it with exit 2.
The auditor is `okfwiki/audit.py` (L1a). With it the gate was GREEN at 23 of 23 class matched and 0 of 1 false alarms
before V1 added the link-rule mutants, and GREEN at 29 of 29 and 0 of 1 on 08.10.2026 with the manifest of that day and
`--sources ~/okf/benk/wiki`, before the main-page rule below. The command today (GREEN since wave 2 order 7, see below):
```
python3 gates/mutant_gate.py --manifest gates/mutants.manifest.json --cases gates-local/mutants \
--sources gates-local/mutants-kilder -- python3 -m okfwiki.audit '{bundle}' '{sources}'
```
In zsh, quote the placeholders as above when the output is redirected: `{sources} > file` opens a named file descriptor,
the auditor gets only `{bundle}`, and every case errors.
### Criterion 6 under the main-page rule (wave 1 order 4, RED)
Criterion 6 in `PLAN.md § Ferdig-kriteriet` as the operator set it on 06.10.2026 (choice 2): Google's rule as
written, applied to documents. Every documentation page has its main page, and every other concept page has a link from
at least one main page. Links are made by the model from meaning; the auditor checks structure only, without a model.
The exact definitions are in the manifest under `provenance.link_rules`, and the contract is K2:
- A concept page lists the sources it is the main page for in its frontmatter, as a YAML list under `x-main-for`. A
valid value is `/` + a path with `main_topic: true` in the K1 file at the sources root, and stands in the page's own
`sources[].resource`. Without a valid K1 file the rule cannot run (exit 2, never 0).
- `main-page-missing`: a main-topic source with no main page. `main-page-duplicate`: two main pages for one source.
`main-page-invalid`: not a list, a value not among the page's own sources, or a value that is not a main-topic source.
- `no-main-page-link`: a page that is not a main page has no link from a main page's body, in a sentence or in a list
of related concepts. `index.md`, `log.md` and the page itself do not count. A main page needs no inbound link.
- Unchanged: (a) `broken-link`, (b) `link-misplaced` (a link in code, a heading or a footnote definition),
`orphan-page`, `index-coverage`. `link-rule` (an inbound link from any other concept page, the rule of 04.10.2026)
is retired in Step 7; no mutant carries it any more.
The known-positive (normalisation N7): `dontask-modus.md` is the main page of all three documentation sources, and
has no inbound link from another concept page (only from `index.md`). Two non-main pages: `bypasspermissions-modus.md`
(linked from a sentence on the main page) and `acceptedits-modus.md` (linked from the main page's related-concepts list,
and from a sentence on the bypass page; it cites the release note). The main page has exactly one link to each, so a
mutant moves or removes "the one link". Every case is rebuilt from this known-positive, so every sha256 changed.
| Mutant | Class | Defect | Expected extra findings |
|---|---|---|---|
| m21 | `orphan-page` | acceptEdits no longer linked from any page or `index.md` (its `log.md` entry stays) | `index-coverage`, `no-main-page-link` |
| m24 | `no-main-page-link` | bypass linked only from `index.md` | none |
| m25 | `link-misplaced` | the main page's one link to bypass inside inline code | `no-main-page-link` |
| m26 | `link-misplaced` | the main page's one link to bypass moved into a heading | `no-main-page-link` |
| m27 | `link-misplaced` | the main page's one link to bypass moved into a footnote definition | `no-main-page-link` |
| m28 | `no-main-page-link` | the only concept-body link to bypass is a self-link (`index.md` and `log.md` still link it) | none |
| m29 | `no-main-page-link` | bypass linked only from `log.md` | `index-coverage`, `orphan-page` |
| m30 | `no-main-page-link` | acceptEdits linked only from the other non-main page (and `index.md`, `log.md`) | none |
| m31 | `main-page-missing` | the main page loses its mark for one documentation source | none |
| m32 | `main-page-duplicate` | bypass marks a source the main page marks (and bypass cites) | none |
| m33 | `main-page-invalid` | bypass's `x-main-for` is a string, not a list | none |
| m34 | `main-page-invalid` | bypass marks a main-topic source it does not cite | none |
| m35 | `main-page-invalid` | acceptEdits marks the release note it cites (in K1, not a main topic) | none |
| m36 | `main-page-duplicate` | the main page adds an invalid value, and bypass marks a source the main page marks | `main-page-invalid` |
| m37 | `no-main-page-link` | bypass marks only a source it does not cite, and the main page's one link to it is removed | `main-page-invalid` |
m36 and m37 test K2 point 2's last sentence (a page is a main page when at least one value is valid; invalid values do
not take that role away). Since the gate counts a mutant matched when its own class is among the findings, each carries a
class that only a right reading of the role gives, so each is two edits by design. Measured with two wrong readings of
the rule (scratch only): one that makes every page with the key a main page misses m37's class, and one that takes the
role from a page with an invalid value misses m36's; on the set without m36 and m37 both missed nothing. Under K2 only
links from main pages count, so a self-link on a non-main page can never count: m28 is kept because the order names the
case, but it tells K2 auditors apart no better than m24.
The extras are the classes the builder measures beside the case's own class, as the auditor of Step 7 should report them;
they are documentation (`expected_extra` per case), and the gate counts a mutant matched when its own class is among the
findings. Two older cases also gain an extra under K2: m11 (`main-page-missing`, `no-main-page-link`: the main page's
frontmatter no longer parses) and m12 (`no-main-page-link`: its extra page is linked from `index.md` alone). The
manifest maps every K2 case to its mutant under `provenance.k2.coverage`.
Recorded RED on 08.10.2026 with today's auditor (`okfwiki/audit.py` unchanged), with the command above: **class matched
26 of 37**. The old classes are matched 26 of 26 (m01-m23 and m25-m27). The new classes are matched **0 of 11**: m24 and
m28-m37 are caught only with the retired `link-rule` (m29 also with `index-coverage` and `orphan-page`). **False alarms
1 of 1, by design:** today's auditor reports `link-rule` on the main page of the known-positive, which has no inbound
concept link because K2 point 3 does not ask for one; Step 7 retires `link-rule`. Errors 0 of 38, exit 1. Step 7 must
turn this into 37 of 37 with 0 false alarms.
Wave 2 order 7 did (merged into `v1` 09.10.2026, measured in the main copy after the merge): caught 37 of 37 · class
matched 37 of 37 · false alarms 0 of 1 · errors 0 of 38, GREEN, exit 0. Since K2 point 15 (a link with `/` does not
count), m09 also gives `no-main-page-link` on `acceptedits-modus.md`; the gate counts only each case's own class, and
`expected_extra` for m09 in the frozen manifest still says `[]`.
History: V1 session 2 (05.10.2026) recorded RED at 23 of 29 for the rule of 04.10.2026 (an inbound link from any other
concept page, class `link-rule` on m24, m28 and m29), and Step 6 of the v1 plan turned it GREEN at 29 of 29.
The cases and their sources derive from Anthropic documentation, so they live in `gates-local/` (gitignored, CLAUDE.md
rule 3). Only the runner, its tests, the reject-all stub and the manifest (names, classes and sha256) are tracked.
## File-type gate (E4)
`filetype_gate.py` asks a reader where each frozen quote occurs, one run per source file. It measures the L1 number
"file types read with a locator, of 7". It calls no model.
```
python3 gates/filetype_gate.py --manifest gates/filetypes.manifest.json --pairs gates-local/filetypes/pairs.json \
--sources <folder holding blandet/ and wiki/> --cases gates-local/filetypes/files -- <reader> {file} {queries}
```
- `{file}` becomes a fresh copy of one source file, and `{queries}` becomes a JSON file of `{"id", "quote"}` objects.
The reader never sees the expected locator. It prints `{"answers": [{"id", "found": [{"locator", "hidden"}]}]}`:
every place where the quote occurs, after runs of whitespace are collapsed to one space.
- A pair is located when the answer names exactly one place, that place is the frozen locator, and `hidden` is right.
Hidden Office content (a hidden sheet, rows or columns, a hidden slide, hidden text, or a tracked deletion) must be
marked `hidden: true`, not flattened into ordinary text. Each quote occurs once in its file, so a second place is wrong.
- Locators: pdf `{"page": N}`, docx `{"paragraph": N}`, xlsx `{"sheet", "cell"}`, pptx `{"slide": N, "notes": bool}`,
and md, txt and html `{"line": N}`. The manifest defines each one and says why it was chosen.
- A file type counts as read when every one of its pairs is located. The gate prints this as `file types with every pair
located: X of 7`. The hidden classes are reported separately. The gate is GREEN only when every pair is located and no
reader run errs.
- Before anything runs, the pairs file and every source it names are checked against the manifest's sha256.
Working set: 112 pairs (16 per type) plus 16 in the hidden cases, from 64 files. A held-out set of 28 pairs (4 per type)
lies outside the repository, with only its sha256 here (same form as E2). How the fasit was made is in the manifest under
`fasit_method`. The stubs are `stubs/first_locator.py` (always the first page, paragraph, cell, slide or line) and
`stubs/fasit_reader.py` (the known-positive, which answers from the pairs file).
The engine's reader is `python3 -m okfwiki.readers locate {file} {queries}`. On 07.11.2026 it located 128 of 128 in the
working set (16 of 16 per type, every hidden class, 4 of 4 controls, 0 reader errors); `first_locator.py` located 7.
Tests: `python3 -m unittest discover -s gates/tests`. Types: `mypy --strict gates/`.
## Answer set for collection 1 (wave 2 order 6, K5)
`answerset.py` and `answers.py` hold the answer set for collection 1 and the harness for the answer measurements
(contract K5); see `ANSWERSET.md`. It replaces E2 for the verdict.
## Whole-document and counting group (E2b)
`wholedoc.py` holds a small group of questions for the class the E2 set lacks: an answer that needs one long file read
as a whole, or a count over many places in one file. It is reported on its own and calls no model. It is a separate
gate, not a group inside `multidoc.py`, because that checker requires four or more files per question and E2 is frozen.
```
python3 gates/wholedoc.py cut --e2-set gates-local/multidoc/set-60.json --sources <source dir> --manifest gates/wholedoc.manifest.json
python3 gates/wholedoc.py check --set <set> --sources <source dir> --manifest gates/wholedoc.manifest.json --e2-set gates-local/multidoc/set-60.json
python3 gates/wholedoc.py split --set <all.json> ... --seed <n> --held-out-per-type 2 --held-out <file OUTSIDE the repository>
python3 gates/wholedoc.py gate --set gates-local/wholedoc/set-12.json --manifest gates/wholedoc.manifest.json \
--sources <source dir> --arm <name> --answers <answers.json> [--out <results.json>]
python3 gates/stubs/wholedoc_arm.py <one-span|fasit> <set> <answers.json>
```
- **cut** takes the sources from the E2 dev set: sorted by id, repeatedly the question needing the fewest new files, while
the union stays at 20 files or fewer. It wrote the manifest with the thresholds before any question existed.
- **check** measures every property in the source files. Every span stands verbatim and exactly once in its file. A
`whole` question sits on a file of 150 lines or more, with at least three keys, spans in at least three parts
(a part begins where two span starts lie 15 % of the file or more apart), the first span in the first third and the
last one in the last third, no single span holding every key, no key that is wording, and every key marked
`negated` standing negated in a span (see `MULTIDOC.md`, "Answer keys are facts, not wording" and "Negated keys").
A `count` question has a count of 5 or more that
equals its spans and the matches of its `item_pattern` in the file, and the count stands nowhere in the file as a
number or an English number word.
- **gate**: `whole` counts when the answer holds every key (a number key matches as a number, a negated key only with a
negation before it); `count` counts when the answer's `count` field is that exact
integer. Both need a citation that quotes the file verbatim. It prints `whole` and `count` separately, and GREEN
only when every question is correct. The `one-span` arm must score 0 (RED), and the `fasit` arm is the known-positive
(it writes a negated key as "not <key>").
Frozen 27.09.2026: 16 questions (8 `whole` on the three documentation files of 150 lines or more in the cut, 8 `count`
on five files of the cut) were written from the sources after the thresholds were committed. Seed 20260927 held out 2 per
type (4 questions, outside the repository, sha256 only here), which leaves 12 for development (6 `whole`, 6 `count`).
`check` is PASS on both parts. On the development part the gate is RED at 0 of 12 with the `one-span` arm and GREEN at
12 of 12 with the `fasit` arm. Without an answers file it is fail-closed at 0 of 12.
## Quote rule for K's fragments (V1 Step 4, brief SC3)
`quote_rule.py` measures two rules that close the path P1 saw (the compiler wrote numbers as words to slip past a rule
that asked for a quote only for a digit or a backticked name). It calls no model and prints counts only.
```
python3 -m gates.quote_rule measure ~/okf/benk/wiki/prove-p1/K-fragments ~/okf/benk/wiki/prove-p1/K-work/index.json
```
- **Rule E:** every fragment carries a quote. **Rule L:** a quote is required for a digit, a backticked name or a word
from the narrow list (zero to twenty, hundred, thousand, million).
- **Answer key**, made apart from rule L: a quoteless fragment whose text holds a word from the broad list of brief SC3
(the narrow list plus thirty to ninety, dozen, dozens, once, twice, first to tenth, half, double, pair, couple,
several, single), as a whole word. The denominator is the number of hits.
- **Choice:** E, unless L lets 0 key fragments through and E rejects at least 33 of 650 (5 %) more than L.
Measured on 04.10.2026 on P1's 650 fragments (all 650 accepted in P1; 160 have no quote):
| Count | Value |
|---|---|
| E rejects | 160 of 650 |
| L rejects | 10 of 650 |
| Answer-key hits (denominator) | 26 (10 hold a narrow-list word) |
| Key hits per file | pack-1.json 19, pack-4.json 7 |
| Key fragments E lets through | 0 of 26 |
| Key fragments L lets through | 16 of 26 |
| E rejects minus L rejects | 150 (threshold 33) |
**Chose E because L lets 16 of the 26 key fragments through** (the rule needs 0); E rejects 150 more fragments than
L, so the cost condition alone would also have allowed L, but the slip condition rules it out. The known-positive holds
(26 hits, at least 1). The P1 README says the compiler wrote numbers as words "in one pack" without naming it; the key
finds hits in packs 1 and 4, and the four compiler transcripts end in a tool call with no report text, so which pack the
README meant is not measured.
New reject rules, adopted in Step 6 only if each rejects at most 5 % of the 650 (32):
| Rule | Rejects | Adopt |
|---|---|---|
| short quote (fewer than 3 words) | 34 of 650 (5.2 %) | no: over 5 %, reported to the PM |
| id mismatch (an `existing` id whose entry matches the concept name neither by normalised form nor by Jaccard >= 0.6) | 0 of 650 | yes |
The 0 id mismatches were checked against a known-positive: with every fragment given its neighbour's id, the check
flags 454 of 650, which is every fragment whose neighbour has a different id (196 neighbours share one).
`NEEDS_QUOTE`, `MERGE_JACCARD` and `norm` are copies of the trial's, kept equal by `TrialConstantsTest`, which reads the
trial at run time. Chose copies over an import, because `mypy --strict okfwiki gates tests` does not see the trial
package (it is found only when `evals` is listed), so an import would turn the v1 mypy line red once `gates/` is frozen.

134
gates/REPAIR.md Normal file
View file

@ -0,0 +1,134 @@
# Repair gate
`repair_gate.py` is the judge of the repair command (`python3 -m okfwiki.krepair`, order 34, contracts K18 and K19).
It was written and run RED before the command existed (order 34, session A). It calls no model.
```
python3 gates/repair_gate.py --manifest gates/repair.manifest.json -- python3 -m okfwiki.krepair
```
The command after `--` is the program each case's arguments are appended to; it runs from the repository root.
Exit 0 GREEN (every case passed), 1 RED, 2 the gate could not run.
## What it builds
The gate builds its own collection from the fixtures in `gates/repair/`, with the frozen tools only: `kblocks order`
and `blocks`, `kpack skeleton`, `pack` and `accept` (two packs of three sources), `kassemble build --at
2026-01-01T00:00:00Z`, `klink accept` and `kassemble build --links`. No generated page is in git.
- `kilder/`: a K1 source root made by `okfwiki.sources freeze` from text written for the gate about beekeeping: three
docs pages (`docs-en-hive.md`, `docs-en-honey.md`, `docs-en-swarm.md`) and one release note
(`release-v2.1.0.md`). Nothing in it comes from any documentation (CLAUDE.md rule 3).
- `fragments/pack-1.json`, `pack-2.json`: the compiler's output for the two packs, written by hand: 19 fragments,
three main pages and five homes.
- `links.json`: the five links of the base, by page, sentence text, anchor and target.
- `agent.md`, `agent-shared.md`: the agent files the task cases give `--agent`; the second shares a run of eleven words
with a line of a source.
- `stubs/`: three commands that must each turn the gate RED (below).
The base has eight pages (`hive`, `frames`, `brood`, `smoker`, `water`, `honey-harvest`, `swarming`,
`queen-cells`), 20 claims and five links, and must come out with no auditor finding and criterion 1 at 20 of 20, or
the gate cannot run. It holds what the cases need: a fragment of two sentences, a merged fragment, two fragments with
context quotes, history from the release note, two fragments in two concepts that share one footnote, two equal
sentences on one page (the second linked), a page with one fragment and a link to it, a main page with one fragment
and a page whose home it is, and a main page that stands on history alone once its own source's fragment goes.
## What it measures
Every case runs in a fresh copy of the base. For each case, by the gate's own code and apart from the command's
report:
1. **Exit code and refusal codes.** Each step's exit code is the case's (0 done, 1 refused). The codes are read from
the lines `refused: <code> <claim or record>` on stdout or stderr; the set must be the case's, and a line that names
no claim or record fails. The codes are listed with their meaning in the manifest's `refusal_codes`.
2. **The pages.** A case that writes is built with `kassemble build --links --replace --at 2026-01-02T00:00:00Z`; the
concept pages whose bytes differ from the base (`index.md` and `log.md` left out; a page gone counts) must be
exactly the case's `pages_changed`, and the pages gone exactly its `pages_gone`.
3. **The claims.** The frozen `claims.extract` runs on both collections. The (id, `excerpt_sha256`) pairs that are
gone and those that are new must be, by id, exactly the claims the case names in `claims_before` and
`claims_after`; so every other claim keeps its id and its `excerpt_sha256`. Where a case gives `excerpts`, the
claim must show exactly those (file, line) excerpts in that order.
4. **The auditor and criterion 1.** The frozen auditor's findings on the result, as (check, file), are exactly the
case's `findings` (most cases: none), and criterion 1 is N of N with no claim left without a key.
5. **The links.** The links file after the build holds exactly the base records, without the case's `links_removed`
and with its `links_added` (page, sentence key, anchor, target), and every record's `at` points at its anchor in its
sentence on the built page.
6. **The command's diff.** After a `fix`, the gate runs `diff --old <base> --new <result> --sources --repairs
WORK/K-work/repairs.json --out DIR`: exit 0, `ids.json` (`{"ids": [...]}`, the form `claims calls --ids` reads)
must hold exactly the new and changed claim ids the gate measured, and `sider.json` (`{"pages": [...]}`) exactly
the changed pages.
7. **Nothing written on a refusal.** A refused step changes no file in the work folder, the links file, the collection
or the output folder (sha256 of each tree before and after). `task` and `linkset` change none of the first three.
No case may change the sources or the copy of the old collection.
`task` cases: every `<task>.parts.json` in the output folder is `{"parts": [paths], "answer": path}`; every part
exists and is at most `kpack.PART_CHARS` characters; no two tasks share an answer path; each listed fragment's
footnote stands in exactly one task, and that task holds the page title, every sentence of the fragment, its quote,
its context quote and lines of its block that the case names.
`linkset` cases: the output folder holds `group-<n>.sentences.json` (the `okf-wiki/link-sentences/1` form `klink task
--sentences` reads) and `group-<n>.catalogue` (one id per line) per group; the frozen `klink task` runs on each pair;
the sentences of all groups are exactly the candidates; and each candidate's catalogue holds its current target.
## Where the denominator comes from
Every page, sentence, link and finding a case expects is written by hand in `repair.manifest.json` from the sources in
`gates/repair/kilder/`: pages by name, claims as sentence text with its occurrence `n` on the page (counted from 0, as
klink counts), links as page, sentence text, anchor and target. The gate turns a sentence into its claim id with the
frozen `klink.key_text` (the first 16 hex characters of its sha256, plus `-<n>`), and a fragment into its footnote with
the frozen `kassemble.label`, from its file, span, quote and mark. Nothing is taken from the command.
The findings of the three removal cases follow from K2 as written: a main-topic source no page lists in `x-main-for`
is `main-page-missing`, and a page that is not a main page and has no link from one is `no-main-page-link`. When the
main page `swarming` goes, its source has no main page and `queen-cells`, whose home it was, has no link from a main
page; when `honey-harvest` loses its only fragment from `docs-en-honey.md`, kassemble writes no `x-main-for` (a main
page record counts only for a source the page cites), so the source has no main page and the page is no main page and
has no home.
## The formats the gate fixes
The command did not exist when the gate was written, so the gate fixes what K18 leaves open, and the command follows
it:
- Answers (`okf-wiki/repair-answers/1`): `{"schema", "answers": [{"concept_id", "footnote": "s…", "action": "replace",
"fragments": [{"text", "quote", "anchor": {"file", "start", "end"}, "provenance", "context"?}]} | {"concept_id",
"footnote", "action": "remove"}]}`.
- A repair list in K17's schema, rendered from the base: each claim with its id, `excerpt_sha256`, page, line, mark,
kind (`docs` or `notes`), its excerpts as `sources` (`kilde/<file>`, line), origin `o33` and its reasons; each link
candidate with the base record's `at`, origin `o33-kandidat`. `claims_sha256` is the sha256 of the base's claim list
(`claims list` output, given as `--claims`); `verdicts_sha256` is the sha256 of no bytes.
- `<task>.parts.json`, `group-<n>.sentences.json` and `group-<n>.catalogue`, `ids.json` and `sider.json` as above.
- Command arguments: `--page` and `--to` are page files (`hive.md`), `--sentence` a sentence key.
## The cases
32 cases: 20 that write (replace one with one and with two, a two-sentence fragment, a merged fragment, a release-note
fragment, context kept and context replaced, remove one, remove the last on a page and on a main page, remove the last
from a source on its main page, a shared footnote, equal sentences, a repair that makes a sentence equal to a later
one, a link whose anchor stays and one whose anchor goes, unlink, relink, two repairs in one file, identity), one task,
one linkset, and ten refusals (a quote not verbatim beside a good answer, a quote from another source, an unknown key,
a collection built before the last repair, two answers for one fragment, a stale list, an agent file that shares eight
words, a relink to a page that does not exist, an unlink with the wrong `at` and with the wrong anchor). Each case says
in `what` what it tries.
## The stubs and the gate's own test
`gates/tests/test_repair_gate.py` shows that each stub turns the gate RED with no case passed: `noop.py` (does
nothing, exit 0), `refuse_all.py` (`refused: x`, exit 1, writes nothing) and `touch_generated.py` (gives every page a
new `generated.at`; the rebuild keeps it, so the identity case sees every page changed). It also shows that a changed,
missing or extra fixture stops the gate (exit 2), that a missing command and a missing module are RED, and it tries
the checks a command cannot be run against yet with handmade outputs (task, linkset, a refusal, a link command).
```
python3 -m unittest discover -s gates/tests -p 'test_repair_gate.py'
```
## Not measured
- The command's `diff` after `unlink` and `relink`: K18 gives them no work folder, so they write no repairs log, and
the gate checks their pages, claims and links but not a diff.
- `linkset`'s refusal of a stale list: K18 gives it no `--claims`; its cases give a list with the hash of the base's
claim list.
- A fragment whose block alone is over `kpack.PART_CHARS` (task exit 2), and the instructions' own eight-word check:
the command's unit tests try them.
- The repairs log's content: only through the command's `diff`.

911
gates/answers.py Normal file
View file

@ -0,0 +1,911 @@
"""The answer harness for PLAN.md criterion 4 (contract K5 points 2-7), adapted from evals/direction_probe.py.
Each question is answered by one isolated subagent per arm in the user's session, described
`S1-<run>-<arm>-<id>`. This module never calls a model and starts nothing:
setup one arm's basis (its own copy of the root's source files, and for `bundle` the collection beside
them) and one task file per question, `<run>/tasks/<arm>/<id>.md`, which carries the question and
the basis and never the answer keys, the spans or the number of documents
collect the per-question answer files into the arm's answers file (K5 point 4)
harvest tokens per question (each message id once, all four usage fields, plus a lower bound for an output
the transcript never recorded) and isolation breaches from the subagent transcripts (K5 point 6)
score two arms' results from `answerset.py gate --out`: per arm and group, by path count, the pairs with
the exact McNemar p, the difference with its paired 95 % interval (Newcombe 1998, method 10), and the
smallest difference the set can show at 80 % power and alpha 0.05 (K5 point 7)
The arms are `filsok` (file search alone over the root's source files) and `bundle` (the collection plus file
search over the same files). Exit 0 = done; 1 = could not run, or (collect, harvest) something is missing.
"""
from __future__ import annotations
import argparse
import json
import os
import re
import shlex
import shutil
import sys
from math import comb, sqrt
from pathlib import Path
from statistics import NormalDist
from typing import Any
from answerset import (
ANSWERS_SCHEMA,
ARMS,
GROUPS,
K1_FILE,
MANY_PATHS,
RESULTS_SCHEMA,
Root,
RunError,
as_list,
dump,
load_json,
load_set,
)
TOKENS_SCHEMA = "okf-wiki/answer-tokens/1"
SCORE_SCHEMA = "okf-wiki/answer-score/1"
NAME_RE = re.compile(r"^[A-Za-z0-9]+$")
ALLOWED_TOOLS = ("Read", "Grep", "Glob", "Bash", "Write", "SubagentHandback", "StructuredOutput", "ToolSearch")
READ_ONLY = ("grep", "egrep", "fgrep", "rg", "find", "ls", "wc", "head", "tail", "sed", "cat", "sort", "uniq", "cut",
"tr", "nl")
LITERAL = ("echo",) # accepted in a chain (order 31 A2: order 13's separators), never offered in the task
OWN_ANSWER = ("jq",) # accepted on the helper's own answer file only (order 31 A2b), never offered in the task
SEPARATORS = ("|", "&&", ";", "||")
FIND_ACTIONS = ("-exec", "-execdir", "-ok", "-okdir", "-delete", "-fprint", "-fprint0", "-fprintf", "-fls")
# Order 31 A2b: the search word of grep and rg, the script of sed and the filter of jq are not paths. Per command: the
# short options that take a value, those of them whose value is the search word, those whose value is a file of
# search words, the long ones of each, and (order 39) every other long option that takes a value, GNU and BSD. Such a
# value is consumed and checked as a path, so a file option's value outside the basis (--exclude-from, --ignore-file)
# is a breach. An option missing here makes its value the search word, and when that value is a path the path goes
# unchecked: the lists must be whole. grep's --context is left out because BSD grep takes its value only after `=`
# (`--context 1 /x f` searches for 1 in /x), so a separate value stays the search word and the check stays stricter.
GREP_LONG = ("after-context", "before-context", "binary-files", "devices", "directories", "exclude", "exclude-dir",
"exclude-from", "group-separator", "include", "include-dir", "label", "max-count")
RG_LONG = ("after-context", "before-context", "color", "colors", "context", "context-separator", "dfa-size-limit",
"encoding", "engine", "field-context-separator", "field-match-separator", "generate", "glob", "iglob",
"ignore-file", "hostname-bin", "hyperlink-format", "max-columns", "max-count", "max-depth", "max-filesize",
"path-separator", "pre", "pre-glob", "regex-size-limit", "replace", "sort", "sortr", "threads", "type",
"type-add", "type-clear", "type-not")
SEARCH_WORDS: dict[str, tuple[str, str, str, tuple[str, ...], tuple[str, ...], tuple[str, ...]]] = {
**{grep: ("ABCDdefm", "e", "f", ("regexp",), ("file",), GREP_LONG) for grep in ("grep", "egrep", "fgrep")},
"rg": ("ABCEMTdefgjmrt", "e", "f", ("regexp",), ("file",), RG_LONG),
"sed": ("efl", "e", "f", ("expression",), ("file",), ("line-length",)),
"jq": ("", "", "f", (), ("from-file",), ()), # the filter; -f reads it from the first file instead
}
RUNS_A_PROGRAM = {"rg": ("pre", "hostname-bin")} # long options whose value is a program the command runs
# Order 39: a sed script is exempt from the path check, so its commands are read instead. w, W and e (also as flags
# of s) write a file or run a program: a breach. r and R read the file named after them: checked as a path.
SED_IN_PLACE = "iI" # GNU -i[SUFFIX], BSD -i SUFFIX and -I SUFFIX: either one in a flag cluster edits in place
SED_ADDRESS = re.compile(r"\d+(~\d+)?|\$")
SED_PLAIN = set("=dDgGhHlnNpPxzFqQ") # commands without an argument (l, q and Q may take a number)
SED_LABEL = set("btT:") # commands whose label runs to a semicolon or a newline
SED_TEXT = set("aic") # commands whose text runs to the end of the line
SED_S_FLAGS = set("gpiImM0123456789 \t")
USAGE_FIELDS = (
"input_tokens", # uncached input
"cache_creation_input_tokens", # written to the prompt cache
"cache_read_input_tokens", # read from it
"output_tokens",
)
INPUT_SIDE = USAGE_FIELDS[:3]
CHARS_PER_TOKEN_LOW = 2.5 # injected text counted high, so a derived output is a lower bound (okfwiki/cost.py)
ALPHA, POWER = 0.05, 0.80
def write(path: Path, data: Any) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
path.write_bytes(dump(data))
# ---------------------------------------------------------------------------------------------- setup
SEARCH = {
"filsok": """BASIS holds the source files under `kilde/` and nothing else. Search them with grep and find (Bash,
as above), and read what you find with Read.""",
"bundle": """BASIS holds `wiki/`, a knowledge collection compiled from the sources, and `kilde/`, the source
files. A page names its source as `/kilde/<name>`, which is the file `BASIS/kilde/<name>`. Follow this order:
1. Search `BASIS/wiki/index.md` with grep for the question's words: it is never read whole, because it can be over
the size one Read allows. Each line is one page: its title and its description.
2. Open the main page of the area the question is about: a main page carries `x-main-for` with the source it covers.
3. Read it, follow its links to the pages the question needs, and go on from those pages where the question needs it.
4. Open the source behind a footnote when the quote has to be checked or when the page does not say enough.
You may also search `wiki/` and `kilde/` with grep and find (Bash, as above) at any point.""",
}
def render_task(arm: str, basis: Path, qid: str, question: str, answer_path: Path) -> str:
return f"""# Answer one question
BASIS: `{basis}`
You answer ONE question from the files in BASIS. Read nothing outside BASIS apart from this task file: no other
folder, no web, no earlier work. Answer only from what the files say, and say plainly when they do not say something.
Tools: Read (a file inside BASIS), Bash for read-only search, and Write once, for the answer file. No other tool.
Every Bash command starts with `cd {basis} && ` and then uses only {', '.join(READ_ONLY)}, joined by `|` or `&&`,
with paths relative to BASIS: never `..`, `~` or a path outside BASIS, no `$` expansion, no output redirection except
`2>/dev/null`, no `find -exec` or `-delete`, no `sed -i`. For example: `cd {basis} && grep -rn "term" kilde`
## How to search
{SEARCH[arm]}
## The question
{question}
## The answer
Write one JSON file to `{answer_path}`:
```json
{{"id": "{qid}", "answer": "<your answer in prose>", "citations": [{{"path": "kilde/<name>", "quote": "<text>"}}]}}
```
- `answer`: answer every part of the question.
- `citations`: one or more per source file your answer relies on, and cite every such file.
- `path`: `kilde/` and the file name, as the file lies in BASIS, for example `kilde/notes.md`: never a page in
`wiki/`.
- `quote`: text copied character for character from that file (only whitespace may differ), long enough to carry
the fact, for example the whole line or sentence.
When the file is written, reply with the one word `done`.
"""
def copy_sources(root: Root, target: Path) -> int:
"""Every source K1 lists, copied byte-exact under target/kilde/, each checked against its K1 sha256."""
for path in sorted(root.entries):
text = root.text(path)
if text is None:
raise RunError(root.problem(path))
dest = target / path
dest.parent.mkdir(parents=True, exist_ok=True)
shutil.copyfile(root.path / path, dest)
return len(root.entries)
def check_part(ref: dict[str, Any], root: Root, part_path: Path) -> None:
"""Order 31 A3: the set names the part's K1, the part is a subset_of the root, and every source of the part
stands in the root with the same path and sha256."""
part = Root(part_path)
if ref.get("manifest_sha256") != part.manifest_sha256:
raise RunError(f"the set names manifest_sha256 {ref.get('manifest_sha256')!r}, --part-root {part_path} has "
f"{part.manifest_sha256}; --part-root is the root the set was made from")
raw = json.loads(part.manifest_bytes.decode("utf-8")).get("subset_of")
named = raw.get("manifest_sha256") if isinstance(raw, dict) else None
if named != root.manifest_sha256:
raise RunError(f"--part-root {part_path} names subset_of manifest_sha256 {named!r}, the root has "
f"{root.manifest_sha256}")
for path, entry in sorted(part.entries.items()):
if path not in root.entries:
raise RunError(f"{path} of --part-root is not in the root {root.path}")
if root.entries[path]["sha256"] != entry["sha256"]:
raise RunError(f"{path} has sha256 {entry['sha256']} in --part-root and {root.entries[path]['sha256']} "
f"in the root")
def setup_arm(run: Path, name: str, arm: str, set_path: Path, sources: Path,
bundle: Path | None, part_root: Path | None = None) -> list[tuple[str, Path]]:
if arm not in ARMS:
raise RunError(f"unknown arm {arm!r}; the arms are {', '.join(ARMS)}")
if not NAME_RE.match(name):
raise RunError(f"run name {name!r} must be letters and digits only (it is part of S1-<run>-<arm>-<id>)")
if arm == "bundle" and bundle is None:
raise RunError("the bundle arm needs --bundle")
if arm == "bundle" and bundle is not None and not (bundle / "index.md").is_file():
raise RunError(f"{bundle} has no index.md")
data = load_set(set_path)
root = Root(sources)
ref = data["sources"]
if part_root is not None:
check_part(ref, root, part_root)
elif ref.get("manifest_sha256") != root.manifest_sha256:
raise RunError(f"the set names manifest_sha256 {ref.get('manifest_sha256')!r}, the root has "
f"{root.manifest_sha256}; an arm is set up on the root the set was made from")
basis = run / "arms" / arm
if basis.exists():
raise RunError(f"{basis} exists already; an arm is set up once, from fresh")
if arm == "bundle" and bundle is not None:
shutil.copytree(bundle, basis / "wiki")
copy_sources(root, basis)
tasks = []
for q in data["questions"]:
qid = str(q["id"])
task = run / "tasks" / arm / f"{qid}.md"
answer = run / "answers" / arm / f"{qid}.json"
task.parent.mkdir(parents=True, exist_ok=True)
task.write_text(render_task(arm, basis, qid, str(q["question"]), answer), encoding="utf-8")
tasks.append((f"S1-{name}-{arm}-{qid}", task))
(run / "answers" / arm).mkdir(parents=True, exist_ok=True)
return tasks
# ---------------------------------------------------------------------------------------------- collect
def collect(run: Path, arm: str) -> tuple[Path, list[str]]:
"""The per-question answers into one answers file; the id comes from the file name."""
if arm not in ARMS:
raise RunError(f"unknown arm {arm!r}; the arms are {', '.join(ARMS)}")
folder = run / "answers" / arm
if not folder.is_dir():
raise RunError(f"{folder} does not exist; run setup first")
gathered: list[dict[str, Any]] = []
problems = []
for path in sorted(folder.glob("*.json")):
try:
data = json.loads(path.read_text(encoding="utf-8"))
except (OSError, UnicodeDecodeError, json.JSONDecodeError):
data = None
if not isinstance(data, dict):
problems.append(f"{path.name}: not a JSON object")
continue
gathered.append({**data, "id": path.stem})
out = run / "answers" / f"{arm}.json"
write(out, {"schema": ANSWERS_SCHEMA, "arm": arm, "answers": gathered})
return out, problems
# ---------------------------------------------------------------------------------------------- harvest
def read_transcript(path: Path) -> list[dict[str, Any]]:
lines = []
for raw in path.read_text(encoding="utf-8").splitlines():
try:
line = json.loads(raw)
except json.JSONDecodeError:
continue
if isinstance(line, dict):
lines.append(line)
return lines
def first_prompt(lines: list[dict[str, Any]]) -> str:
for line in lines:
if line.get("type") == "user":
content = line.get("message", {}).get("content")
if isinstance(content, list):
content = " ".join(str(b.get("text", "")) for b in content if isinstance(b, dict))
return content if isinstance(content, str) else ""
return ""
def inside(path: object, root: Path) -> bool:
if not isinstance(path, str) or not os.path.isabs(path):
return False
norm = Path(os.path.normpath(path))
return norm == root or root in norm.parents
def outside_single_quotes(command: str) -> str:
"""The command with the text inside single quotes blanked out, where the shell takes every character literally
(order 31 A2b). A backslash outside them keeps the next character, so an escaped backtick still shows."""
out: list[str] = []
quote = ""
i = 0
while i < len(command):
ch = command[i]
if quote == "'":
quote = "" if ch == "'" else quote
out.append(" ")
elif ch == "\\":
out.append(command[i:i + 2])
i += 1
elif ch == "'" and not quote:
quote = "'"
out.append(" ")
else:
if ch == '"':
quote = "" if quote else '"'
out.append(ch)
i += 1
return "".join(out)
def search_words(command: str, args: list[str]) -> set[int]:
"""The indexes in args of the search words: the values of -e and --regexp (sed: --expression), or else the first
argument that is not an option. With -f or --file the search words come from a file and none is positional,
wherever the option stands (GNU getopt reorders the arguments). The value of any other option that takes one is
skipped here, so it is checked as a path."""
if command not in SEARCH_WORDS:
return set()
valued, word_opts, file_opts, word_long, file_long, other_long = SEARCH_WORDS[command]
words: set[int] = set()
first: int | None = None
positional, options = True, True
i = 0
while i < len(args):
arg = args[i]
if options and arg == "--":
options = False
elif options and arg.startswith("--"):
name, eq, _ = arg[2:].partition("=")
if name in word_long + file_long:
positional = False
if name in word_long:
words.add(i if eq else i + 1)
if name in word_long + file_long + other_long:
i += 0 if eq else 1
elif options and arg.startswith("-") and arg != "-":
for j, ch in enumerate(arg[1:]):
if ch in word_opts + file_opts:
positional = False
if ch in valued:
attached = j + 2 < len(arg)
if ch in word_opts:
words.add(i if attached else i + 1)
i += 0 if attached else 1
break
elif first is None:
first = i
i += 1
if positional and first is not None:
words.add(first)
return words
def word_text(command: str, token: str) -> str:
"""The search word or script a search-word token carries: the token, or the value attached to -e or --expression."""
if token.startswith("--"):
return token.partition("=")[2]
if token.startswith("-") and token != "-":
valued = SEARCH_WORDS[command][0]
for j, ch in enumerate(token[1:]):
if ch in valued:
return token[j + 2:]
return token
def in_place(token: str) -> bool:
"""A sed flag cluster with -i or -I before the first option that takes a value (`-ni`, `-Ei`, `-I`)."""
if not token.startswith("-") or token.startswith("--"):
return False
for ch in token[1:]:
if ch in SED_IN_PLACE:
return True
if ch in SEARCH_WORDS["sed"][0]:
return False
return False
class SedParseError(ValueError):
pass
def sed_breach(script: str) -> tuple[str | None, list[str]]:
"""The breach of one sed script, if any (w, W or e as a command or as a flag of s, or a script that cannot be
parsed), and the files it reads with r or R, which the caller checks as paths. POSIX, GNU and BSD commands."""
n = len(script)
reads: list[str] = []
def regex_end(k: int, delim: str) -> int:
while k < n and script[k] != delim:
k += 2 if script[k] == "\\" else 1
if k >= n:
raise SedParseError(script)
return k + 1
def address(k: int) -> int:
m = SED_ADDRESS.match(script, k)
if m:
return m.end()
if k < n and script[k] in "/\\":
delim = "/"
if script[k] == "\\":
if k + 1 >= n:
raise SedParseError(script)
k += 1
delim = script[k]
k = regex_end(k + 1, delim)
while k < n and script[k] in "IM":
k += 1
return k
def line_end(k: int) -> int:
end = script.find("\n", k)
return n if end < 0 else end
depth, i = 0, 0
try:
while i < n:
if script[i] in " \t\n;":
i += 1
continue
if script[i] == "}":
depth -= 1
if depth < 0:
raise SedParseError(script)
i += 1
continue
start = i
i = address(i)
if start < i < n and script[i] == ",":
i += 1
if i < n and script[i] in "+~":
i += 1
while i < n and script[i].isdigit():
i += 1
else:
i = address(i)
while i < n and script[i] in " \t!":
i += 1
if i >= n:
raise SedParseError(script)
cmd = script[i]
i += 1
if cmd == "{":
depth += 1
elif cmd in "wWe":
return f"Bash sed command {cmd}", reads
elif cmd in "rR":
end = line_end(i)
reads.append(script[i:end].strip())
i = end
elif cmd in SED_TEXT:
i = line_end(i)
elif cmd in SED_LABEL:
while i < n and script[i] not in ";\n":
i += 1
elif cmd in SED_PLAIN:
while i < n and script[i] in " \t0123456789":
i += 1
elif cmd in "sy":
if i >= n or script[i] in "\\\n":
raise SedParseError(script)
delim = script[i]
i = regex_end(regex_end(i + 1, delim), delim)
while cmd == "s" and i < n and script[i] not in ";\n}":
if script[i] in "wWe":
return f"Bash sed s flag {script[i]}", reads
if script[i] not in SED_S_FLAGS:
raise SedParseError(script)
i += 1
else:
raise SedParseError(script)
except SedParseError:
return "Bash sed script that cannot be parsed", reads
if depth:
return "Bash sed script that cannot be parsed", reads
return None, reads
def bash_breach(command: str, basis: Path, answer: Path | None = None) -> str | None:
"""None when the command is read-only search that starts with `cd <basis> &&` and stays inside the basis, where
the only path outside it may be the answer file; or when it reads the answer file alone, by its absolute path or
after `cd` into its folder (order 31 A2b)."""
unquoted = outside_single_quotes(command)
if "`" in unquoted or re.search(r"\$[A-Za-z_{(]", unquoted):
return "Bash with an expansion"
try:
# Order 39: bash takes '#' as a comment only at the start of a word, so shlex's comment rule is off (a comment
# is then checked as arguments, which is stricter); an unquoted newline separates commands as ';' does.
lexer = shlex.shlex(re.sub(r"\s2>/dev/null(?=\s|$|[;|&])", "", command), posix=True,
punctuation_chars="|&;<>()\n")
lexer.whitespace_split = True
lexer.commenters = ""
lexer.whitespace = " \t\r"
tokens = [piece for token in lexer for piece in
(re.split(r"(\n)", token) if set(token) <= set("|&;<>()\n") else [token]) if piece]
except ValueError:
return "Bash that cannot be parsed"
segments: list[list[str]] = [[]]
newline = False # a newline ends a command; after a separator, on a blank line or at the end it changes nothing
for token in tokens:
if token == "\n":
newline = bool(segments[-1])
continue
if newline and token not in SEPARATORS:
segments.append([])
newline = False
if token in SEPARATORS:
segments.append([])
elif token and set(token) <= set("&<>()"):
return f"Bash with {token!r}"
else:
segments[-1].append(token)
first = segments[0]
own = os.path.normpath(answer) if answer is not None else ""
cd = first[1] if len(first) == 2 and first[0] == "cd" and os.path.isabs(first[1]) else ""
here: str | None = None # where a relative path is, when it can name the answer file
if cd and inside(cd, basis):
own_only, chain = False, segments[1:]
elif own and cd and os.path.normpath(cd) == os.path.dirname(own):
own_only, chain, here = True, segments[1:], os.path.dirname(own)
elif own and first and first[0] in READ_ONLY + OWN_ANSWER:
own_only, chain = True, segments
else:
return "Bash that does not start with cd into the basis"
for segment in chain:
if not segment or segment[0] not in READ_ONLY + LITERAL + OWN_ANSWER:
return f"Bash command not allowed: {segment[0] if segment else '(empty)'}"
words = search_words(segment[0], segment[1:])
names_own = False
checked: list[tuple[str, str]] = [] # (token, the value in it that is checked as a path)
for index, token in enumerate(segment[1:]):
if segment[0] == "sed" and (in_place(token) or token.startswith("--in-place")):
return "Bash sed -i"
if index in words:
if segment[0] == "sed":
breach, reads = sed_breach(word_text("sed", token))
if breach:
return breach
checked.extend((name, name) for name in reads)
continue
if segment[0] == "find" and token in FIND_ACTIONS:
return f"Bash find action {token}"
if token.startswith("--") and token[2:].partition("=")[0] in RUNS_A_PROGRAM.get(segment[0], ()):
return f"Bash {segment[0]} {token.partition('=')[0]} runs a program"
checked.append((token, token.split("=", 1)[1] if token.startswith("-") and "=" in token else token))
for token, value in checked:
if value.startswith("~") or ".." in value.split("/"):
return f"Bash path outside the basis: {token}"
path = value if os.path.isabs(value) else os.path.join(here, value) if here else ""
if own and path and os.path.normpath(path) == own:
names_own = True
elif own_only and (not token.startswith("-") or "=" in token):
return f"Bash path other than the own answer: {token}"
elif value.startswith("/") and value != "/dev/null" and not inside(value, basis):
return f"Bash path outside the basis: {token}"
if own_only and not names_own:
return "Bash outside the basis that does not name the own answer"
if segment[0] in OWN_ANSWER and not names_own:
return f"Bash command not allowed: {segment[0]}"
return None
def breaches_of(tools: list[tuple[str, dict[str, Any]]], basis: Path, task: Path, answer: Path) -> list[str]:
"""K5 point 3: every tool call that reads or lists a path outside the basis and the task file, every tool that
is not allowed, and every write to another file than the answer."""
found = []
for name, inp in tools:
if name not in ALLOWED_TOOLS:
found.append(f"{name}: tool not allowed")
elif name == "Read":
path = inp.get("file_path")
if not (inside(path, basis)
or (isinstance(path, str) and os.path.normpath(path) in (str(task), str(answer)))):
found.append(f"Read outside the basis: {path}")
elif name in ("Grep", "Glob"):
path = inp.get("path")
pattern = inp.get("pattern", "")
if path is None:
found.append(f"{name} without a path (searches the working directory)")
elif not inside(path, basis):
found.append(f"{name} outside the basis: {path}")
elif name == "Glob" and isinstance(pattern, str) and os.path.isabs(pattern) and not inside(pattern, basis):
found.append(f"Glob pattern outside the basis: {pattern}")
elif name == "Bash":
breach = bash_breach(str(inp.get("command", "")), basis, answer)
if breach:
found.append(breach)
elif name == "Write" and inp.get("file_path") != str(answer):
found.append(f"Write to another file: {inp.get('file_path')}")
return found
def _injected_chars(line: dict[str, Any]) -> int:
"""Text put into the context between two assistant messages: tool results and rendered attachments."""
if line.get("type") == "attachment":
return len(str(line.get("rendered") or ""))
content = line.get("message", {}).get("content") if isinstance(line.get("message"), dict) else None
total = 0
for item in content if isinstance(content, list) else []:
if isinstance(item, dict) and item.get("type") == "tool_result":
inner = item.get("content")
if isinstance(inner, str):
total += len(inner)
elif isinstance(inner, list):
total += sum(len(str(x.get("text", ""))) for x in inner if isinstance(x, dict))
return total
def usage_and_tools(lines: list[dict[str, Any]]) -> tuple[dict[str, int], list[tuple[str, dict[str, Any]]]]:
"""The four usage fields summed with each message id once at its largest value, the derived output (a message
whose records all lack a stop reason never got its final usage written: its output is the growth of the next
message's input side less the text injected between them, counted high), and every tool call."""
per: dict[str, dict[str, int]] = {}
order: list[str] = []
complete: set[str] = set()
between: dict[str, int] = {}
tools: list[tuple[str, dict[str, Any]]] = []
for line in lines:
message = line.get("message")
if line.get("type") != "assistant" or not isinstance(message, dict):
if order:
between[order[-1]] = between.get(order[-1], 0) + _injected_chars(line)
continue
mid = str(message.get("id", ""))
if mid not in per:
order.append(mid)
seen = per.setdefault(mid, {})
fields = message.get("usage") or {}
for f in USAGE_FIELDS:
value = fields.get(f)
if isinstance(value, int):
seen[f] = max(seen.get(f, 0), value)
if isinstance(message.get("stop_reason"), str):
complete.add(mid)
for block in message.get("content") or []:
if isinstance(block, dict) and block.get("type") == "tool_use":
inp = block.get("input")
tools.append((str(block.get("name")), inp if isinstance(inp, dict) else {}))
out = {f: sum(v.get(f, 0) for v in per.values()) for f in USAGE_FIELDS}
derived = 0
for i, mid in enumerate(order[:-1]):
if mid in complete:
continue
growth = (sum(per[order[i + 1]].get(f, 0) for f in INPUT_SIDE) - sum(per[mid].get(f, 0) for f in INPUT_SIDE)
- int(between.get(mid, 0) / CHARS_PER_TOKEN_LOW))
derived += max(0, growth - per[mid].get("output_tokens", 0))
out["output_tokens_derived"] = derived
return out, tools
def harvest(run: Path, name: str, arm: str, transcripts: Path) -> tuple[dict[str, Any], list[str]]:
"""Per task of the arm: tokens over all its runs and every isolation breach. Matched by the subagent's
description S1-<run>-<arm>-<id> (the .meta.json beside the transcript); a transcript with no description is
matched by the task path in its first prompt, one with another description is not this arm's. Returns the K5 tokens document and the tasks no transcript was found for."""
if arm not in ARMS:
raise RunError(f"unknown arm {arm!r}; the arms are {', '.join(ARMS)}")
if not transcripts.is_dir():
raise RunError(f"{transcripts} is not a directory")
tasks_dir = run / "tasks" / arm
ids = sorted(p.stem for p in tasks_dir.glob("*.md"))
if not ids:
raise RunError(f"no tasks in {tasks_dir}; run setup first")
described = re.compile(rf"^S1-{re.escape(name)}-{re.escape(arm)}-(\S+)$")
prompted = re.compile(re.escape(str(tasks_dir)) + r"/([A-Za-z0-9]+)\.md")
basis = run / "arms" / arm
rows: dict[str, dict[str, Any]] = {}
for path in sorted(transcripts.rglob("*.jsonl")):
meta_path = path.with_name(path.stem + ".meta.json")
description = ""
if meta_path.is_file():
meta = load_json(meta_path, "agent meta")
description = str(meta.get("description", "")) if isinstance(meta, dict) else ""
lines = read_transcript(path)
m = described.match(description) if description else prompted.search(first_prompt(lines))
if m is None or m.group(1) not in ids:
continue
qid = m.group(1)
counts, tools = usage_and_tools(lines)
breaches = breaches_of(tools, basis, tasks_dir / f"{qid}.md", run / "answers" / arm / f"{qid}.json")
row = rows.setdefault(qid, {"id": qid, **{f: 0 for f in counts}, "isolation_breaches": 0,
"breach_detail": [], "runs": 0})
for f, value in counts.items():
row[f] += value
row["breach_detail"] += breaches
row["isolation_breaches"] = len(row["breach_detail"])
row["runs"] += 1
doc = {"schema": TOKENS_SCHEMA, "arm": arm, "questions": [rows[i] for i in sorted(rows)]}
return doc, [i for i in ids if i not in rows]
# ---------------------------------------------------------------------------------------------- score
def mcnemar_exact(only_a: int, only_b: int) -> float:
"""Two-sided exact McNemar: the binomial test over the discordant pairs, p = 0.5."""
n, k = only_a + only_b, min(only_a, only_b)
if n == 0:
return 1.0
return min(1.0, 2 * sum(comb(n, i) for i in range(k + 1)) / float(2 ** n))
def wilson(x: int, n: int, z: float) -> tuple[float, float]:
centre = (x + z * z / 2) / (n + z * z)
half = z * sqrt(x * (n - x) / n + z * z / 4) / (n + z * z)
return centre - half, centre + half
def paired_difference_ci(e: int, f: int, g: int, h: int, level: float = 0.95) -> tuple[float, float]:
"""The interval for (e + f)/n - (e + g)/n from paired data: e both, f first only, g second only, h neither.
Newcombe (1998), Statist. Med. 17:2635-2650, method 10: Wilson score limits for each margin combined with the
phi coefficient, its numerator max(eh - fg - n/2, 0) when eh > fg, and phi 0 when a margin is 0."""
n = e + f + g + h
if n == 0:
raise RunError("no pairs")
z = NormalDist().inv_cdf(1 - (1 - level) / 2)
p1, p2 = (e + f) / n, (e + g) / n
l1, u1 = wilson(e + f, n, z)
l2, u2 = wilson(e + g, n, z)
denominator = (e + f) * (g + h) * (e + g) * (f + h)
numerator = float(e * h - f * g)
if numerator > 0:
numerator = max(numerator - n / 2, 0.0)
phi = numerator / sqrt(denominator) if denominator else 0.0
dl1, du1, dl2, du2 = p1 - l1, u1 - p1, p2 - l2, u2 - p2
low = sqrt(max(0.0, dl1 * dl1 - 2 * phi * dl1 * du2 + du2 * du2))
high = sqrt(max(0.0, du1 * du1 - 2 * phi * du1 * dl2 + dl2 * dl2))
return p1 - p2 - low, p1 - p2 + high
def min_detectable(n: int, discordant_share: float, alpha: float = ALPHA, power: float = POWER) -> float | None:
"""The smallest difference between paired proportions that n pairs show at the given power with a two-sided
McNemar test, for a share of discordant pairs psi (Connor 1987: n = (z_a sqrt(psi) + z_b sqrt(psi - d^2))^2 /
d^2, solved for d by bisection). None when psi is 0 or no d up to psi is visible."""
if n <= 0 or discordant_share <= 0:
return None
za, zb = NormalDist().inv_cdf(1 - alpha / 2), NormalDist().inv_cdf(power)
psi = min(discordant_share, 1.0)
def needed(d: float) -> float:
return (za * sqrt(psi) + zb * sqrt(max(0.0, psi - d * d))) ** 2 / (d * d)
if needed(psi) > n:
return None
low, high = 1e-9, psi
for _ in range(200):
mid = (low + high) / 2
if needed(mid) > n:
low = mid
else:
high = mid
return high
def load_results(path: Path) -> dict[str, Any]:
data = load_json(path, "results")
if not isinstance(data, dict) or data.get("schema") != RESULTS_SCHEMA or not isinstance(data.get("results"), list):
raise RunError(f"{path} is not a results file with schema {RESULTS_SCHEMA}")
if data.get("arm") not in ARMS:
raise RunError(f"{path} is for arm {data.get('arm')!r}; the arms are {', '.join(ARMS)}")
return data
def path_band(paths: int) -> str:
return "4+" if paths >= MANY_PATHS else "2-3"
def score(results: list[dict[str, Any]], tokens: list[dict[str, Any]]) -> dict[str, Any]:
by_arm = {r["arm"]: r for r in results}
if sorted(by_arm) != sorted(ARMS) or len(results) != len(ARMS):
raise RunError(f"score needs one results file for each arm: {', '.join(ARMS)}")
a, b = by_arm["filsok"], by_arm["bundle"]
if a.get("set_sha256") != b.get("set_sha256"):
raise RunError("the two results files are for different sets")
rows = {arm: {str(r["id"]): r for r in by_arm[arm]["results"]} for arm in ARMS}
if sorted(rows["filsok"]) != sorted(rows["bundle"]):
raise RunError("the two results files hold different questions")
ids = sorted(rows["filsok"])
doc: dict[str, Any] = {"schema": SCORE_SCHEMA, "set_sha256": a.get("set_sha256"), "questions": len(ids),
"arms": {}, "pairs": {}}
for arm in ARMS:
groups = {g: [sum(1 for i in ids if rows[arm][i]["group"] == g and rows[arm][i]["correct"] is True),
sum(1 for i in ids if rows[arm][i]["group"] == g)] for g in GROUPS}
bands = {band: [sum(1 for i in ids if path_band(int(rows[arm][i]["paths_needed"])) == band
and rows[arm][i]["correct"] is True),
sum(1 for i in ids if path_band(int(rows[arm][i]["paths_needed"])) == band)]
for band in ("2-3", "4+")}
doc["arms"][arm] = {"groups": groups, "paths": bands,
"all": [sum(1 for i in ids if rows[arm][i]["correct"] is True), len(ids)]}
for label, members in [("all", ids)] + [(g, [i for i in ids if rows["filsok"][i]["group"] == g]) for g in GROUPS]:
counts = {"both": 0, "only filsok": 0, "only bundle": 0, "neither": 0}
for i in members:
fa, bu = rows["filsok"][i]["correct"] is True, rows["bundle"][i]["correct"] is True
counts["both" if fa and bu else "only filsok" if fa else "only bundle" if bu else "neither"] += 1
doc["pairs"][label] = counts
pairs = doc["pairs"]["all"]
doc["mcnemar_p"] = mcnemar_exact(pairs["only filsok"], pairs["only bundle"])
n = len(ids)
if n:
low, high = paired_difference_ci(pairs["both"], pairs["only bundle"], pairs["only filsok"], pairs["neither"])
doc["difference"] = {"of": "bundle - filsok", "point": (pairs["only bundle"] - pairs["only filsok"]) / n,
"low": low, "high": high, "level": 0.95, "method": "Newcombe 1998 method 10"}
share = (pairs["only filsok"] + pairs["only bundle"]) / n
doc["smallest_visible"] = {"discordant_share": share, "difference": min_detectable(n, share),
"power": POWER, "alpha": ALPHA}
doc["tokens"] = {}
for t in tokens:
if not isinstance(t, dict) or t.get("schema") != TOKENS_SCHEMA or t.get("arm") not in ARMS:
raise RunError(f"a tokens file is not {TOKENS_SCHEMA} for one of the arms")
qs = as_list(t.get("questions"))
total = sum(int(q.get(f, 0)) for q in qs for f in (*USAGE_FIELDS, "output_tokens_derived"))
doc["tokens"][t["arm"]] = {"questions": len(qs), "per_question": total / len(qs) if qs else None,
"isolation_breaches": sum(int(q.get("isolation_breaches", 0)) for q in qs)}
return doc
def render(doc: dict[str, Any]) -> list[str]:
lines = []
for arm in ARMS:
row = doc["arms"][arm]
lines.append(f"{arm}: " + ", ".join(f"{g} {c} of {n}" for g, (c, n) in row["groups"].items())
+ f", all {row['all'][0]} of {row['all'][1]}")
for arm in ARMS:
lines.append(f"{arm} by paths: " + ", ".join(f"{b} {c} of {n}" for b, (c, n) in doc["arms"][arm]["paths"].items()))
for label, counts in doc["pairs"].items():
lines.append(("pairs" if label == "all" else f"pairs {label}") + ": "
+ ", ".join(f"{k} {v}" for k, v in counts.items()))
lines.append(f"exact McNemar p = {doc['mcnemar_p']:.3g}")
if "difference" in doc:
d = doc["difference"]
lines.append(f"bundle - filsok = {d['point']:.3f}, 95 % CI {d['low']:.3f} to {d['high']:.3f} "
f"(paired, Newcombe 1998 method 10)")
s = doc["smallest_visible"]
visible = "none" if s["difference"] is None else f"{s['difference']:.3f}"
lines.append(f"smallest difference visible at 80 % power, alpha 0.05: {visible} "
f"(discordant share measured {s['discordant_share']:.3f}, N = {doc['questions']})")
for arm, t in doc["tokens"].items():
per = "none" if t["per_question"] is None else f"{t['per_question']:.0f}"
lines.append(f"{arm} tokens: {t['questions']} questions harvested, {per} per question, "
f"isolation breaches {t['isolation_breaches']}")
return lines
# ---------------------------------------------------------------------------------------------- main
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
sub = p.add_subparsers(dest="command", required=True)
s = sub.add_parser("setup", help="one arm's basis and task files")
s.add_argument("--run", required=True)
s.add_argument("--name", required=True, help="the run's name, letters and digits (S1-<name>-<arm>-<id>)")
s.add_argument("--arm", required=True)
s.add_argument("--set", required=True)
s.add_argument("--sources", required=True, help=f"the K1 root measured (its kilde/ files and {K1_FILE})")
s.add_argument("--bundle", help="the collection, for the bundle arm")
s.add_argument("--part-root", help="the K1 root the set was made from, when it is a subset_of --sources: the arm "
"searches the whole of --sources")
c = sub.add_parser("collect", help="the answer files into the arm's answers file")
c.add_argument("--run", required=True)
c.add_argument("--arm", required=True)
h = sub.add_parser("harvest", help="tokens and isolation breaches per question from the transcripts")
h.add_argument("--run", required=True)
h.add_argument("--name", required=True)
h.add_argument("--arm", required=True)
h.add_argument("--transcripts", required=True, help="a directory searched for *.jsonl at any depth")
r = sub.add_parser("score", help="two arms' results: groups, paths, pairs, McNemar, interval, power")
r.add_argument("--results", action="append", required=True, help="answerset.py gate --out, once per arm")
r.add_argument("--tokens", action="append", default=[], help="harvest output, once per arm (optional)")
r.add_argument("--out", default="")
return p
def main(argv: list[str] | None = None) -> int:
args = build_parser().parse_args(argv)
try:
if args.command == "setup":
run = Path(args.run).resolve()
tasks = setup_arm(run, args.name, args.arm, Path(args.set), Path(args.sources),
Path(args.bundle).resolve() if args.bundle else None,
Path(args.part_root) if args.part_root else None)
for description, task in tasks:
print(f"{description}\t{task}")
return 0
if args.command == "collect":
out, problems = collect(Path(args.run).resolve(), args.arm)
print(out)
for problem in problems:
print(f"problem: {problem}")
return 1 if problems else 0
if args.command == "harvest":
run = Path(args.run).resolve()
doc, missing = harvest(run, args.name, args.arm, Path(args.transcripts))
write(run / "tokens" / f"{args.arm}.json", doc)
breaches = sum(q["isolation_breaches"] for q in doc["questions"])
print(f"tasks harvested: {len(doc['questions'])}; breaches: {breaches}")
if missing:
print(f"tasks without a transcript: {len(missing)}: {', '.join(missing)}")
return 1 if missing else 0
doc = score([load_results(Path(p)) for p in args.results],
[load_json(Path(p), "tokens") for p in args.tokens])
print("\n".join(render(doc)))
if args.out:
write(Path(args.out), doc)
return 0
except RunError as exc:
print(f"FAIL: {exc}", file=sys.stderr)
return 1
if __name__ == "__main__":
sys.exit(main())

View file

@ -0,0 +1,32 @@
{
"draw": "not split: random.Random(seed).shuffle(sorted ids), then renumbered x01.. in that order; the set is the part of its root",
"groups": {
"part": {
"docs-2-3": 4,
"docs-4": 26,
"history": 0
}
},
"part": {
"file": "gates-local/answerset/part-del1-hard.json",
"questions": 30,
"sha256": "032635992a24a27b309c8c334bf56565e458ccf50ab7d0f26e8da6513fc4b414"
},
"rules": {
"many_paths": 4,
"min_many": 20,
"min_paths": 3
},
"schema": "okf-wiki/answer-set-manifest/1",
"seed": 20261011,
"sources": {
"copy": {
"frozen_at": "2026-10-08T12:47:05Z",
"manifest_sha256": "8c9f87fdc9e776f31cd8dca8c6a8593ba9f90889b52a43683187709af454a34f"
},
"part": {
"frozen_at": "2026-10-08T19:13:44Z",
"manifest_sha256": "0483d05250aeea186ec8f85e0728659461e97502618af5561abb6737dc5389fd"
}
}
}

View file

@ -0,0 +1,51 @@
{
"draw": "per group in the order docs-2-3, docs-4, history: random.Random(seed).sample(sorted(ids of the group), quota) with one generator; quotas proportional to the group sizes (largest remainder); both parts renumbered d../h.. in the order of the original ids",
"groups": {
"all": {
"docs-2-3": 35,
"docs-4": 34,
"history": 11
},
"held_out": {
"docs-2-3": 9,
"docs-4": 8,
"history": 3
},
"part": {
"docs-2-3": 9,
"docs-4": 9,
"history": 0
},
"set": {
"docs-2-3": 26,
"docs-4": 26,
"history": 8
}
},
"held_out": {
"questions": 20,
"sha256": "0971053aec5373e88be48fd7d732f6f075ac4efeb5b97462d51abfe5adab3470"
},
"part": {
"file": "gates-local/answerset/part-del1.json",
"questions": 18,
"sha256": "5f8ec090a0d19af4e8ba4d72d9ca5774050581b8bd58f01b108f71860ef124e7"
},
"schema": "okf-wiki/answer-set-manifest/1",
"seed": 20261009,
"set": {
"file": "gates-local/answerset/set-60.json",
"questions": 60,
"sha256": "100571b9e73d41d60e1ea2424256b375123c1a83333fd49a87fc8533aba0581e"
},
"sources": {
"copy": {
"frozen_at": "2026-10-08T12:47:05Z",
"manifest_sha256": "8c9f87fdc9e776f31cd8dca8c6a8593ba9f90889b52a43683187709af454a34f"
},
"part": {
"frozen_at": "2026-10-08T19:13:44Z",
"manifest_sha256": "0483d05250aeea186ec8f85e0728659461e97502618af5561abb6737dc5389fd"
}
}
}

694
gates/answerset.py Normal file
View file

@ -0,0 +1,694 @@
"""The question set for PLAN.md criterion 4 on collection 1 (contract K5 point 1): checker, part count, held-out
split, answer gate and the stub arms. No model call.
check every span stands byte for byte in its file in a K1 root, every question has at least two distinct
paths, its group follows K1 and the path count, every path carries an answer key that stands in that
path's spans, no key is wording, every negated key stands negated. PASS only N of N with N > 0.
For a harder set, --min-paths raises the paths every question needs and --min-many sets how many
questions need 4 or more.
inside the questions whose every span stands in a part root (a K1 subset root, here the first part).
split draws the held-out questions with a fixed seed, stratified by group, writes them OUTSIDE the
repository, renumbers both parts and writes the manifest (seed, counts, sha256 values only).
freeze freezes a set not made by split: it must pass check against its own root with the thresholds and
hold exactly --count questions. It is renumbered in a seeded order and gets a manifest of its own that
names it the part of that root (seed, rules, counts, sha256 values, the roots' K1 sha256; no text),
so gate judges it as it judges the part. A frozen set or manifest is never overwritten.
gate scores one arm: a question is correct when the answer holds every key (multidoc.key_holds) AND the
citations quote, verbatim, every path the question needs. A missing answers file scores 0
(fail-closed). The set and the root must match the manifest.
stub writes a known arm: `fasit` answers with the keys and quotes the spans; `no-citations` answers with
the keys and cites nothing.
The group is set by the sources, never by the writer: `history` when a path has `main_topic: false` in K1,
otherwise `docs-2-3` (2-3 distinct paths) or `docs-4` (4 or more).
Exit 0 = PASS / scored completely; 1 = FAIL or could not run. A check that cannot run is a FAIL.
"""
from __future__ import annotations
import argparse
import hashlib
import json
import math
import random
import re
import sys
from dataclasses import dataclass, field
from pathlib import Path
from typing import Any
from keyform import count_keys
from multidoc import KEY_MAX, KEY_MIN, SPAN_MAX, SPAN_MIN, key_holds, key_in, negated_in, normalise_quote, number_key
SET_SCHEMA = "okf-wiki/answer-set/1"
MANIFEST_SCHEMA = "okf-wiki/answer-set-manifest/1"
ANSWERS_SCHEMA = "okf-wiki/answers/1"
RESULTS_SCHEMA = "okf-wiki/answer-results/1"
K1_SCHEMA = "okf-wiki/source-manifest/1"
K1_FILE = "source-manifest.json"
GROUPS = ("docs-2-3", "docs-4", "history")
ARMS = ("filsok", "bundle")
MIN_PATHS = 2
MANY_PATHS = 4
PATH_RE = re.compile(r"^kilde/[a-z0-9._-]+$")
REPO_ROOT = Path(__file__).resolve().parents[1]
class RunError(Exception):
"""The command cannot run; reported as FAIL with exit 1."""
def dump(data: Any) -> bytes:
"""The K5 file form: two writings of the same content are byte-identical."""
return (json.dumps(data, indent=1, sort_keys=True, ensure_ascii=False) + "\n").encode("utf-8")
def sha256_bytes(data: bytes) -> str:
return hashlib.sha256(data).hexdigest()
def load_json(path: Path, what: str) -> Any:
try:
return json.loads(path.read_text(encoding="utf-8"))
except (OSError, UnicodeDecodeError, json.JSONDecodeError) as exc:
raise RunError(f"cannot read {what} {path}: {exc}") from exc
def as_list(value: object) -> list[Any]:
return value if isinstance(value, list) else []
def group_of(paths: list[str], main_topic: dict[str, bool]) -> str:
"""The group K1 gives a question with these distinct paths (see the module text)."""
distinct = set(paths)
if any(main_topic.get(p) is False for p in distinct):
return "history"
return "docs-4" if len(distinct) >= MANY_PATHS else "docs-2-3"
# ---------------------------------------------------------------------------------------------- K1 root
class Root:
"""A K1 root read with this module's own code (contract K1; okfwiki.sources is not imported)."""
def __init__(self, path: Path) -> None:
self.path = path
manifest = path / K1_FILE
if not path.is_dir() or not manifest.is_file():
raise RunError(f"{path} is not a K1 root: no {K1_FILE}")
self.manifest_bytes = manifest.read_bytes()
self.manifest_sha256 = sha256_bytes(self.manifest_bytes)
try:
data = json.loads(self.manifest_bytes.decode("utf-8"))
except (UnicodeDecodeError, json.JSONDecodeError) as exc:
raise RunError(f"{manifest} is not JSON: {exc}") from exc
if not isinstance(data, dict) or data.get("schema") != K1_SCHEMA or not isinstance(data.get("sources"), list):
raise RunError(f"{manifest} is not a K1 manifest with schema {K1_SCHEMA}")
self.frozen_at = str(data.get("frozen_at", ""))
self.entries: dict[str, dict[str, Any]] = {}
for entry in data["sources"]:
if not (isinstance(entry, dict) and isinstance(entry.get("path"), str)
and isinstance(entry.get("main_topic"), bool) and isinstance(entry.get("sha256"), str)):
raise RunError(f"{manifest} has an entry without path, main_topic or sha256: {entry!r}")
self.entries[entry["path"]] = entry
self.main_topic = {p: bool(e["main_topic"]) for p, e in self.entries.items()}
self._text: dict[str, str | None] = {}
self._bad: dict[str, str] = {}
def ref(self) -> dict[str, str]:
return {"frozen_at": self.frozen_at, "manifest_sha256": self.manifest_sha256}
def text(self, path: str, verify: bool = True) -> str | None:
"""The text of a listed source, or None (with the reason in problem()) when it is not listed, missing, not
UTF-8, or (with verify) its sha256 differs from K1."""
key = f"{verify}:{path}"
if key not in self._text:
self._text[key] = self._read(path, verify, key)
return self._text[key]
def _read(self, path: str, verify: bool, key: str) -> str | None:
if not PATH_RE.match(path) or path not in self.entries:
self._bad[key] = f"{path} is not a path K1 lists in {self.path}"
return None
target = self.path / path
try:
data = target.read_bytes()
except OSError:
self._bad[key] = f"{path} is missing in {self.path}"
return None
if verify and sha256_bytes(data) != self.entries[path]["sha256"]:
self._bad[key] = f"{path} sha256 differs from K1 in {self.path}"
return None
try:
return data.decode("utf-8")
except UnicodeDecodeError:
self._bad[key] = f"{path} is not UTF-8"
return None
def problem(self, path: str, verify: bool = True) -> str:
return self._bad.get(f"{verify}:{path}", "")
def load_set(path: Path) -> dict[str, Any]:
data = load_json(path, "set")
if (not isinstance(data, dict) or data.get("schema") != SET_SCHEMA or not isinstance(data.get("questions"), list)
or not isinstance(data.get("sources"), dict)):
raise RunError(f"{path} is not a set with schema {SET_SCHEMA}")
return data
def evidence_of(q: dict[str, Any]) -> list[tuple[str, str]]:
"""(path, span) for every well-formed evidence entry."""
out = []
for e in as_list(q.get("evidence")):
if isinstance(e, dict) and isinstance(e.get("path"), str) and isinstance(e.get("span"), str):
out.append((e["path"], e["span"]))
return out
# ---------------------------------------------------------------------------------------------- check
@dataclass
class CheckReport:
questions: int = 0
spans: int = 0
spans_verbatim: int = 0
all_spans_verbatim: int = 0
min_paths: int = 0
group_ok: int = 0
key_per_path: int = 0
keys: int = 0
wording_keys: int = 0
negated_keys: int = 0
negated_ok: int = 0
groups: dict[str, int] = field(default_factory=lambda: {g: 0 for g in GROUPS})
errors: list[str] = field(default_factory=list)
paths_per_question: dict[str, int] = field(default_factory=dict)
need_paths: int = MIN_PATHS
need_many: int = 0
many: int = 0
@property
def passed(self) -> bool:
n = self.questions
return (n > 0 and not self.errors and self.spans_verbatim == self.spans and self.all_spans_verbatim == n
and self.min_paths == n and self.group_ok == n and self.key_per_path == n
and self.wording_keys == 0 and self.negated_ok == self.negated_keys and self.many >= self.need_many)
def lines(self) -> list[str]:
n = self.questions
out = [f"error: {e}" for e in self.errors]
out += [
f"questions: {n}",
"groups: " + ", ".join(f"{g} {self.groups[g]}" for g in GROUPS),
f"spans verbatim: {self.spans_verbatim} of {self.spans}",
f"questions with every span verbatim: {self.all_spans_verbatim} of {n}",
f"questions with >= {self.need_paths} distinct paths: {self.min_paths} of {n}",
]
if self.need_many:
out.append(f"questions with >= {MANY_PATHS} distinct paths: {self.many} of {n} (required >= {self.need_many})")
out += [
f"questions whose group matches K1 and the path count: {self.group_ok} of {n}",
f"questions with a key in every path's spans: {self.key_per_path} of {n}",
f"answer keys that are wording: {self.wording_keys} of {self.keys}",
f"negated keys negated in their span: {self.negated_ok} of {self.negated_keys}",
"PASS" if self.passed else "FAIL",
]
return out
def check_set(data: dict[str, Any], root: Root, need_paths: int = MIN_PATHS, need_many: int = 0) -> CheckReport:
questions = data["questions"]
rep = CheckReport(questions=len(questions), need_paths=need_paths, need_many=need_many)
ref = data["sources"]
if ref.get("manifest_sha256") != root.manifest_sha256 or ref.get("frozen_at") != root.frozen_at:
rep.errors.append(f"the set names sources {ref.get('frozen_at')!r} manifest_sha256 "
f"{ref.get('manifest_sha256')!r}, the root has {root.frozen_at!r} {root.manifest_sha256}")
form = count_keys(questions)
rep.keys, rep.wording_keys = form.keys, form.wording
seen: set[str] = set()
for q in questions:
qid = q.get("id") if isinstance(q, dict) else None
if not isinstance(qid, str) or not qid:
rep.errors.append("question without an id")
continue
if qid in seen:
rep.errors.append(f"duplicate id {qid}")
seen.add(qid)
if not isinstance(q.get("question"), str) or not q["question"].strip():
rep.errors.append(f"{qid}: empty question")
raw_evidence = as_list(q.get("evidence"))
evidence = evidence_of(q)
rep.spans += len(raw_evidence)
if len(evidence) != len(raw_evidence):
rep.errors.append(f"{qid}: an evidence entry without a path or a span")
spans_by_path: dict[str, list[str]] = {}
verbatim = 0
for path, span in evidence:
if not SPAN_MIN <= len(span) <= SPAN_MAX:
rep.errors.append(f"{qid}: span length {len(span)} in {path} outside {SPAN_MIN}-{SPAN_MAX}")
text = root.text(path)
if text is None:
rep.errors.append(f"{qid}: {root.problem(path)}")
elif span in text:
verbatim += 1
spans_by_path.setdefault(path, []).append(span)
rep.spans_verbatim += verbatim
if raw_evidence and verbatim == len(raw_evidence):
rep.all_spans_verbatim += 1
paths = sorted(spans_by_path)
rep.paths_per_question[qid] = len(paths)
if len(paths) >= need_paths:
rep.min_paths += 1
if len(paths) >= MANY_PATHS:
rep.many += 1
group = q.get("group")
if group in GROUPS:
rep.groups[group] += 1
else:
rep.errors.append(f"{qid}: group {group!r} is not one of {', '.join(GROUPS)}")
if paths and all(p in root.entries for p in paths) and group == group_of(paths, root.main_topic):
rep.group_ok += 1
keyed: set[str] = set()
keys_ok = bool(as_list(q.get("answer_keys")))
for k in as_list(q.get("answer_keys")):
kpath, key = (k.get("path"), k.get("text")) if isinstance(k, dict) else (None, None)
if not isinstance(key, str) or not isinstance(kpath, str):
keys_ok = False
rep.errors.append(f"{qid}: malformed answer key")
continue
if kpath not in spans_by_path:
rep.errors.append(f"{qid}: answer key path {kpath} is not an evidence path")
if number_key(key) is None and not KEY_MIN <= len(key.strip()) <= KEY_MAX:
rep.errors.append(f"{qid}: key length {len(key.strip())} outside {KEY_MIN}-{KEY_MAX}")
if any(key_in(key, s) for s in spans_by_path.get(kpath, [])):
keyed.add(kpath)
else:
keys_ok = False
if "negated" in k:
if k["negated"] is not True:
rep.errors.append(f"{qid}: negated must be true or absent")
continue
rep.negated_keys += 1
rep.negated_ok += any(negated_in(key, s) for s in spans_by_path.get(kpath, []))
if keys_ok and paths and keyed == set(paths):
rep.key_per_path += 1
return rep
def thresholds(args: argparse.Namespace) -> tuple[int, int]:
if args.min_paths < MIN_PATHS or args.min_many < 0:
raise RunError(f"--min-paths must be at least {MIN_PATHS} and --min-many at least 0")
return args.min_paths, args.min_many
def cmd_check(args: argparse.Namespace) -> int:
rep = check_set(load_set(Path(args.set)), Root(Path(args.sources)), *thresholds(args))
if args.per_question:
for qid, n in rep.paths_per_question.items():
print(f"{qid}\t{n} paths")
print("\n".join(rep.lines()))
return 0 if rep.passed else 1
# ---------------------------------------------------------------------------------------------- inside
def inside_ids(questions: list[dict[str, Any]], part: Root) -> list[str]:
"""The ids of the questions whose every span stands in its file in the part root (path listed there)."""
out = []
for q in questions:
evidence = evidence_of(q) if isinstance(q, dict) else []
if evidence and len(evidence) == len(as_list(q.get("evidence"))):
texts = [(part.text(p, verify=False), s) for p, s in evidence]
if all(t is not None and s in t for t, s in texts):
out.append(str(q.get("id")))
return out
def cmd_inside(args: argparse.Namespace) -> int:
questions = load_set(Path(args.set))["questions"]
part = Root(Path(args.part_root))
ids = set(inside_ids(questions, part))
n = len(questions)
print(f"questions with every span in the part root: {len(ids)} of {n}")
for g in GROUPS:
members = [q for q in questions if isinstance(q, dict) and q.get("group") == g]
print(f" {g}: {sum(1 for q in members if q.get('id') in ids)} of {len(members)}")
if not args.require_all:
return 0
passed = n > 0 and len(ids) == n
print("PASS" if passed else "FAIL")
return 0 if passed else 1
# ---------------------------------------------------------------------------------------------- split
def inside_repo(path: Path) -> bool:
try:
path.resolve().relative_to(REPO_ROOT)
return True
except ValueError:
return False
def quotas(counts: dict[str, int], n_held: int) -> dict[str, int]:
"""Held-out questions per group, proportional to the group's size (largest remainder, ties in GROUPS order)."""
total = sum(counts.values())
exact = {g: n_held * counts[g] / total for g in GROUPS}
out = {g: math.floor(exact[g]) for g in GROUPS}
for g in sorted(GROUPS, key=lambda g: (-(exact[g] - out[g]), GROUPS.index(g)))[: n_held - sum(out.values())]:
out[g] += 1
return out
def group_counts(questions: list[dict[str, Any]]) -> dict[str, int]:
return {g: sum(1 for q in questions if q.get("group") == g) for g in GROUPS}
def cmd_split(args: argparse.Namespace) -> int:
held_path = Path(args.held_out)
if inside_repo(held_path):
raise RunError(f"held-out path {held_path} is inside the repository; it must live outside it")
if held_path.exists():
raise RunError(f"held-out file {held_path} already exists; a frozen draw is never redrawn")
root, part_root = Root(Path(args.sources)), Root(Path(args.part_sources))
data, part_data = load_set(Path(args.set)), load_set(Path(args.part))
for label, d, r in (("set", data, root), ("part", part_data, part_root)):
rep = check_set(d, r)
if not rep.passed:
print("\n".join(rep.lines()))
raise RunError(f"the {label} fails the check; nothing was split")
part_q = part_data["questions"]
if len(inside_ids(part_q, part_root)) != len(part_q):
raise RunError("a question of the part has a span outside the part root; nothing was split")
questions = data["questions"]
n_held = args.held_out_count
if not 0 < n_held < len(questions):
raise RunError(f"cannot hold out {n_held} of {len(questions)}")
counts = group_counts(questions)
per_group = quotas(counts, n_held)
rng = random.Random(args.seed)
held_ids: set[str] = set()
for g in GROUPS:
ids = sorted(q["id"] for q in questions if q["group"] == g)
held_ids.update(rng.sample(ids, per_group[g]))
by_id = {q["id"]: q for q in questions}
ordered = sorted(by_id)
dev = [dict(by_id[i], id=f"d{n:02d}") for n, i in enumerate((i for i in ordered if i not in held_ids), 1)]
held = [dict(by_id[i], id=f"h{n:02d}") for n, i in enumerate((i for i in ordered if i in held_ids), 1)]
dev_bytes = dump({"schema": SET_SCHEMA, "sources": data["sources"], "questions": dev})
held_bytes = dump({"schema": SET_SCHEMA, "sources": data["sources"], "questions": held})
part_bytes = Path(args.part).read_bytes()
manifest = {
"schema": MANIFEST_SCHEMA,
"seed": args.seed,
"draw": "per group in the order " + ", ".join(GROUPS) + ": random.Random(seed).sample(sorted(ids of the "
"group), quota) with one generator; quotas proportional to the group sizes (largest remainder); "
"both parts renumbered d../h.. in the order of the original ids",
"groups": {"all": counts, "set": group_counts(dev), "held_out": group_counts(held),
"part": group_counts(part_q)},
"set": {"file": args.set_label or Path(args.set_out).name, "sha256": sha256_bytes(dev_bytes),
"questions": len(dev)},
"held_out": {"sha256": sha256_bytes(held_bytes), "questions": len(held)},
"part": {"file": args.part_label or Path(args.part).name, "sha256": sha256_bytes(part_bytes),
"questions": len(part_q)},
"sources": {"copy": root.ref(), "part": part_root.ref()},
}
held_path.parent.mkdir(parents=True, exist_ok=True)
held_path.write_bytes(held_bytes)
set_out = Path(args.set_out)
set_out.parent.mkdir(parents=True, exist_ok=True)
set_out.write_bytes(dev_bytes)
manifest_path = Path(args.manifest)
manifest_path.parent.mkdir(parents=True, exist_ok=True)
manifest_path.write_bytes(dump(manifest))
print(f"seed: {args.seed}")
print("held out per group: " + ", ".join(f"{g} {per_group[g]}" for g in GROUPS))
print(f"set: {len(dev)} questions, sha256 {manifest['set']['sha256']}")
print(f"held out: {len(held)} questions, sha256 {manifest['held_out']['sha256']}")
print(f"part: {len(part_q)} questions, sha256 {manifest['part']['sha256']}")
print(f"manifest: {manifest_path}")
return 0
# ---------------------------------------------------------------------------------------------- freeze
def cmd_freeze(args: argparse.Namespace) -> int:
set_out, manifest_path = Path(args.set_out), Path(args.manifest)
for target in (set_out, manifest_path):
if target.exists():
raise RunError(f"{target} already exists; a frozen set is never frozen again")
need_paths, need_many = thresholds(args)
root = Root(Path(args.sources))
data = load_set(Path(args.set))
rep = check_set(data, root, need_paths, need_many)
print("\n".join(rep.lines()))
if not rep.passed:
raise RunError("the set fails the check; nothing was frozen")
questions = data["questions"]
if len(questions) != args.count:
raise RunError(f"the set holds {len(questions)} questions, not {args.count}; nothing was frozen")
order = sorted(q["id"] for q in questions)
random.Random(args.seed).shuffle(order)
by_id = {q["id"]: q for q in questions}
frozen = [dict(by_id[i], id=f"{args.prefix}{n:02d}") for n, i in enumerate(order, 1)]
set_bytes = dump({"schema": SET_SCHEMA, "sources": data["sources"], "questions": frozen})
raw = json.loads(root.manifest_bytes.decode("utf-8")).get("subset_of")
sources = {"part": root.ref()}
if isinstance(raw, dict) and isinstance(raw.get("manifest_sha256"), str):
sources["copy"] = {"frozen_at": str(raw.get("frozen_at", "")), "manifest_sha256": raw["manifest_sha256"]}
manifest = {
"schema": MANIFEST_SCHEMA,
"seed": args.seed,
"draw": "not split: random.Random(seed).shuffle(sorted ids), then renumbered "
f"{args.prefix}01.. in that order; the set is the part of its root",
"rules": {"min_paths": need_paths, "many_paths": MANY_PATHS, "min_many": need_many},
"groups": {"part": group_counts(frozen)},
"part": {"file": args.set_label or set_out.name, "sha256": sha256_bytes(set_bytes), "questions": len(frozen)},
"sources": sources,
}
set_out.parent.mkdir(parents=True, exist_ok=True)
set_out.write_bytes(set_bytes)
manifest_path.parent.mkdir(parents=True, exist_ok=True)
manifest_path.write_bytes(dump(manifest))
print(f"seed: {args.seed}")
print(f"frozen: {len(frozen)} questions, sha256 {manifest['part']['sha256']}")
print(f"manifest: {manifest_path}")
return 0
# ---------------------------------------------------------------------------------------------- gate
@dataclass
class Scored:
qid: str
group: str
answered: bool
keys_held: int
keys: int
paths_cited: int
paths_needed: int
@property
def answer_ok(self) -> bool:
return self.answered and self.keys_held == self.keys
@property
def source_ok(self) -> bool:
return self.answered and self.paths_cited == self.paths_needed
@property
def correct(self) -> bool:
return self.answer_ok and self.source_ok
def row(self) -> dict[str, Any]:
return {"id": self.qid, "group": self.group, "correct": self.correct, "keys_held": self.keys_held,
"keys": self.keys, "paths_cited": self.paths_cited, "paths_needed": self.paths_needed}
def cited_path(value: object) -> str | None:
"""A citation's path as K1 writes it; a leading "/" (a page's resource form) is accepted."""
if not isinstance(value, str):
return None
return value[1:] if value.startswith("/") else value
def score_one(q: dict[str, Any], a: dict[str, Any] | None, root: Root) -> Scored:
keys = as_list(q.get("answer_keys"))
needed = sorted({p for p, _ in evidence_of(q)})
if a is None:
return Scored(q["id"], str(q.get("group")), False, 0, len(keys), 0, len(needed))
answer = a.get("answer") if isinstance(a.get("answer"), str) else ""
held = sum(1 for k in keys if isinstance(k, dict) and key_holds(k, str(answer)))
supported: set[str] = set()
for c in as_list(a.get("citations")):
path = cited_path(c.get("path")) if isinstance(c, dict) else None
quote = c.get("quote") if isinstance(c, dict) else None
if path not in needed or not isinstance(quote, str) or not quote.strip():
continue
text = root.text(path, verify=False)
if text is not None and normalise_quote(quote) in normalise_quote(text):
supported.add(path)
return Scored(q["id"], str(q.get("group")), True, held, len(keys), len(supported), len(needed))
def manifest_part(manifest: dict[str, Any], set_hash: str) -> tuple[str, str]:
"""(part name, the K1 manifest sha256 its root must have)."""
sources = manifest.get("sources", {})
for name, root_name in (("set", "copy"), ("held_out", "copy"), ("part", "part")):
if manifest.get(name, {}).get("sha256") == set_hash:
return name, str(sources.get(root_name, {}).get("manifest_sha256"))
raise RunError(f"set sha256 {set_hash or '(missing)'} matches no part of the manifest")
def cmd_gate(args: argparse.Namespace) -> int:
if args.arm not in ARMS:
raise RunError(f"unknown arm {args.arm!r}; the arms are {', '.join(ARMS)}")
set_path = Path(args.set)
manifest = load_json(Path(args.manifest), "manifest")
if not isinstance(manifest, dict) or manifest.get("schema") != MANIFEST_SCHEMA:
raise RunError(f"{args.manifest} is not a manifest with schema {MANIFEST_SCHEMA}")
set_hash = sha256_bytes(set_path.read_bytes()) if set_path.is_file() else ""
part, root_sha = manifest_part(manifest, set_hash)
root = Root(Path(args.sources))
if root.manifest_sha256 != root_sha:
raise RunError(f"the root's {K1_FILE} sha256 {root.manifest_sha256} is not the manifest's {root_sha} "
f"for the {part}")
questions = load_set(set_path)["questions"]
n = len(questions)
answers: dict[str, dict[str, Any]] = {}
fail_closed = ""
answers_path = Path(args.answers)
if not answers_path.is_file():
fail_closed = f"no answers for arm {args.arm} at {answers_path}"
else:
data = load_json(answers_path, "answers")
if not isinstance(data, dict) or data.get("schema") != ANSWERS_SCHEMA or not isinstance(data.get("answers"),
list):
raise RunError(f"{answers_path} is not an answers file with schema {ANSWERS_SCHEMA}")
if data.get("arm") != args.arm:
raise RunError(f"answers file is for arm {data.get('arm')!r}, not {args.arm!r}")
for a in data["answers"]:
if isinstance(a, dict) and isinstance(a.get("id"), str):
answers[a["id"]] = a
results = sorted((score_one(q, answers.get(q["id"]), root) for q in questions), key=lambda r: r.qid)
missing = sum(1 for r in results if not r.answered)
correct = sum(r.correct for r in results)
print(f"set: {part}, {n} questions; arm: {args.arm}")
if fail_closed:
print(f"fail-closed: {fail_closed}")
print(f"missing answers: {missing}")
print(f"correct answer: {sum(r.answer_ok for r in results)} of {n}")
print(f"correct source: {sum(r.source_ok for r in results)} of {n}")
print(f"correct answer and source: {correct} of {n}")
for g in GROUPS:
members = [r for r in results if r.group == g]
print(f" {g}: {sum(r.correct for r in members)} of {len(members)}")
if args.out:
out = {"schema": RESULTS_SCHEMA, "arm": args.arm, "set_sha256": set_hash, "results": [r.row() for r in results]}
Path(args.out).parent.mkdir(parents=True, exist_ok=True)
Path(args.out).write_bytes(dump(out))
scored = not fail_closed and missing == 0
print("GREEN" if scored and n > 0 and correct == n else "RED")
print("SCORED" if scored else "UNSCORED (fail-closed)" if fail_closed else "INCOMPLETE")
return 0 if scored else 1
# ---------------------------------------------------------------------------------------------- stub
def stub_answer(q: dict[str, Any], kind: str) -> dict[str, Any]:
"""fasit: every key as its own sentence ("not <key>" when negated) and every span quoted; no-citations: the
same answer with no citations."""
keys = [k for k in as_list(q.get("answer_keys")) if isinstance(k, dict) and isinstance(k.get("text"), str)]
text = " ".join(("not " if k.get("negated") is True else "") + k["text"] + "." for k in keys)
citations = [{"path": p, "quote": s} for p, s in evidence_of(q)] if kind == "fasit" else []
return {"id": q["id"], "answer": text, "citations": citations}
def cmd_stub(args: argparse.Namespace) -> int:
if args.arm not in ARMS:
raise RunError(f"unknown arm {args.arm!r}; the arms are {', '.join(ARMS)}")
questions = load_set(Path(args.set))["questions"]
doc = {"schema": ANSWERS_SCHEMA, "arm": args.arm, "answers": [stub_answer(q, args.kind) for q in questions]}
out = Path(args.out)
out.parent.mkdir(parents=True, exist_ok=True)
out.write_bytes(dump(doc))
print(f"{args.kind}: {len(questions)} answers for arm {args.arm} at {out}")
return 0
# ---------------------------------------------------------------------------------------------- main
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
sub = p.add_subparsers(dest="command", required=True)
c = sub.add_parser("check", help="check spans, paths, groups and answer keys against a K1 root")
c.add_argument("--set", required=True)
c.add_argument("--sources", required=True, help="the K1 root the set was made from")
c.add_argument("--per-question", action="store_true", help="also list distinct paths per question")
c.add_argument("--min-paths", type=int, default=MIN_PATHS, help="distinct paths every question needs")
c.add_argument("--min-many", type=int, default=0, help=f"questions that need {MANY_PATHS} or more paths")
i = sub.add_parser("inside", help="count the questions whose every span stands in a part root")
i.add_argument("--set", required=True)
i.add_argument("--part-root", required=True)
i.add_argument("--require-all", action="store_true", help="FAIL unless every question is inside")
s = sub.add_parser("split", help="draw the held-out questions with a fixed seed, stratified by group")
s.add_argument("--set", required=True)
s.add_argument("--sources", required=True)
s.add_argument("--seed", type=int, required=True)
s.add_argument("--held-out-count", type=int, default=20)
s.add_argument("--set-out", required=True)
s.add_argument("--set-label", default="", help="path of the set as written in the manifest")
s.add_argument("--held-out", required=True, help="file path OUTSIDE the repository; never overwritten")
s.add_argument("--part", required=True, help="the separate set for the first part (not split)")
s.add_argument("--part-sources", required=True, help="the part's K1 root")
s.add_argument("--part-label", default="", help="path of the part as written in the manifest")
s.add_argument("--manifest", required=True)
f = sub.add_parser("freeze", help="freeze a set not made by split, with a manifest of its own")
f.add_argument("--set", required=True)
f.add_argument("--sources", required=True, help="the K1 root the set names (a subset root such as the part)")
f.add_argument("--seed", type=int, required=True)
f.add_argument("--count", type=int, required=True, help="the number of questions the set must hold")
f.add_argument("--min-paths", type=int, required=True)
f.add_argument("--min-many", type=int, required=True)
f.add_argument("--prefix", required=True, help="id prefix of the frozen questions")
f.add_argument("--set-out", required=True)
f.add_argument("--set-label", default="", help="path of the set as written in the manifest")
f.add_argument("--manifest", required=True)
g = sub.add_parser("gate", help="score one arm's answers")
g.add_argument("--set", required=True)
g.add_argument("--manifest", required=True)
g.add_argument("--sources", required=True)
g.add_argument("--arm", required=True)
g.add_argument("--answers", required=True)
g.add_argument("--out", default="", help="write the per-question results (K5 point 5)")
t = sub.add_parser("stub", help="write a known arm's answers (fasit or no-citations)")
t.add_argument("--set", required=True)
t.add_argument("--arm", required=True)
t.add_argument("--kind", required=True, choices=("fasit", "no-citations"))
t.add_argument("--out", required=True)
return p
def main(argv: list[str] | None = None) -> int:
args = build_parser().parse_args(argv)
commands = {"check": cmd_check, "inside": cmd_inside, "split": cmd_split, "freeze": cmd_freeze, "gate": cmd_gate,
"stub": cmd_stub}
try:
return commands[args.command](args)
except RunError as exc:
print(f"FAIL: {exc}", file=sys.stderr)
return 1
if __name__ == "__main__":
sys.exit(main())

View file

@ -0,0 +1,107 @@
{
"schema": "okf-wiki/calibration-manifest/2",
"seed": 20261108,
"shuffle": "random.Random(seed): each label's pairs sorted by draft id and shuffled; the first `lone` unsupported pairs alone in a call at positions spread evenly over 1-10, the rest `dense` to a call; counted supported pairs one per call in call order; filler pairs fill every call to ten in a cycle, never twice in a call and never beside the unsupported pair they are the twin of; the other positions shuffled; ids renumbered c001.. in call order, calls k001..",
"set": {
"file": "gates/calibration-folder/pairs.json",
"sha256": "852b50d8fcd7ef248b40d43ec7b8dc28379163e6ddd64c37e40f3b170b97b61e",
"pairs": 1400
},
"key": {
"file": "gates/calibration-folder/key.json",
"sha256": "af728bba35f4fe2947163adf3053f0b7bc3390ca5179df19f3b8abdd8fe0f641"
},
"calls": {
"file": "gates/calibration-folder/calls.json",
"sha256": "92125fd9772358fe02a4fd62fbfd09d4b64b24954b4be8fdb4464733d9125728",
"calls": 140,
"call_size_max": 10,
"unsupported_alone": 100,
"unsupported_per_call": {
"1": 100,
"5": 40
},
"built_with": {
"lone": 100,
"dense": 5
}
},
"counts": {
"unsupported": 300,
"supported": 50,
"filler-supported": 1050,
"filler_distinct": 300,
"by_kind": {
"overgeneralisation": 50,
"wrong-number": 50,
"swapped-cause": 50,
"not-mentioned": 50,
"reversed-polarity": 50,
"conflated-sources": 50,
"paraphrase": 15,
"inference": 20,
"synthesis": 15
},
"by_position": {
"1": {
"unsupported": 32,
"supported": 9,
"filler-supported": 99
},
"2": {
"unsupported": 33,
"supported": 6,
"filler-supported": 101
},
"3": {
"unsupported": 25,
"supported": 5,
"filler-supported": 110
},
"4": {
"unsupported": 27,
"supported": 4,
"filler-supported": 109
},
"5": {
"unsupported": 30,
"supported": 3,
"filler-supported": 107
},
"6": {
"unsupported": 32,
"supported": 4,
"filler-supported": 104
},
"7": {
"unsupported": 28,
"supported": 6,
"filler-supported": 106
},
"8": {
"unsupported": 31,
"supported": 2,
"filler-supported": 107
},
"9": {
"unsupported": 33,
"supported": 3,
"filler-supported": 104
},
"10": {
"unsupported": 29,
"supported": 8,
"filler-supported": 103
}
}
},
"thresholds": {
"caught_min": 300,
"accepted_min": 45
},
"sources": {
"files": 32,
"tree_sha256": "79c4c8e59ae932284ba009d7177593c5bbb9692c3bbc9d6e492b092536ab31f7"
},
"history": []
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,9 @@
Årsberetning og regnskapsomtale 2025 Årsberetning og regnskapsomtale 2025 for Kvernhaugen borettslag Denne årsberetningen er skrevet av styret og ble godkjent i styremøtet 10. mars 2026. Den legges fram for den ordinære generalforsamlingen 21. april 2026 sammen med årsregnskapet og revisors beretning. Beretningen omtaler regnskapsåret fra 1. januar til 31. desember 2025. 1. Om borettslaget Kvernhaugen borettslag ble stiftet i 1978, og de første beboerne flyttet inn i 1979. Borettslaget har 72 leiligheter fordelt på fire blokker, A, B, C og D, med adressene Kvernhaugen 2, 4, 6 og 8. Blokk A og blokk B har 18 leiligheter hver, blokk C har 20 leiligheter, og blokk D har 16 leiligheter. Alle blokkene har fire etasjer og kjeller, men ingen av dem har heis. Leilighetstype Antall Bruksareal (m²) 2-roms 24 52 3-roms 36 71 4-roms 12 88 Sum 72 Til eiendommen hører en felles hage på 1 450 m² mellom blokkene, en lekeplass, en felles grillplass, to sykkelboder, et fellesvaskeri i kjelleren i blokk B, et fellesrom i første etasje i blokk D og et hobbyverksted i kjelleren i blokk C. Hver leilighet har i tillegg en kjellerbod på mellom 4 og 6 m². I 2025 ble 9 leiligheter solgt, mot 6 i 2024. Borettslaget har en vaktmester, Kåre Myrvold, i 80 % stilling. Forretningsførsel og revisjon kjøpes inn som tjenester. Avtalen om forretningsførsel ble reforhandlet høsten 2025, og den nye avtalen gjelder fra 1. januar 2026 med en årlig pris som er om lag 3,6 % høyere enn før. 2. Styrets arbeid i 2025 Den ordinære generalforsamlingen ble holdt 23. april 2025. Der var 41 stemmeberettigede andelseiere til stede, og 9 andelseiere var representert ved fullmakt, til sammen 50 stemmer. Generalforsamlingen fastsatte styrehonoraret for 2025 til 180 000 kr, mot 165 000 kr for 2024. Etter generalforsamlingen 2025 har styret bestått av:  Ingrid Solbakk, styreleder  Torbjørn Leirvik, nestleder og ansvarlig for bygninger  Amira Hassani, styremedlem og ansvarlig for økonomi  Henrik Vågsæther, styremedlem og ansvarlig for uteområder  Marit Kolstø-Berge, styremedlem og sekretær
 Liv Brennhaug og Simen Ørbekk, varamedlemmer Styrehonoraret på 180 000 kr ble fordelt slik: styrelederen fikk 60 000 kr, nestlederen 35 000 kr, de tre andre styremedlemmene 25 000 kr hver og de to varamedlemmene 5 000 kr hver. Styret holdt 11 styremøter i 2025 og behandlet 96 saker. De største sakene var forprosjektet for rehabilitering av balkonger og fasader, utskiftingen av belysningen i trapperommene og et økende antall klager på støy. Styret mottok 14 skriftlige klager på støy i 2025, mot 9 i 2024. De fleste klagene gjaldt støy mellom kl. 22:00 og kl. 23:00 på kvelder fra søndag til torsdag. Som følge av dette foreslår styret for generalforsamlingen 2026 at ro-tiden på kvelder fra søndag til torsdag skal begynne kl. 22:00 i stedet for kl. 23:00. En ekstraordinær generalforsamling ble holdt 18. november 2025. Den vedtok å sette i gang et forprosjekt for balkonger og fasader med en kostnadsramme på 1,2 mill. kr. Vedtaket ble gjort med 47 stemmer for og 3 stemmer mot. Styret gjennomførte en beboerundersøkelse i september 2025. 51 av 72 husstander svarte, som gir en svarprosent på 71. Det mest etterspurte tiltaket var et bedre kjøkken i fellesrommet, og deretter flere plasser i sykkelbodene. 3. Fellesarealer og dugnader Fellesvaskeriet har fire vaskemaskiner, to tørketromler og ett tørkerom. I september 2025 ble de to eldste vaskemaskinene byttet ut for til sammen 64 800 kr. De to andre maskinene er fra 2014 og skal etter planen byttes i 2027. Prisene i vaskeriet har vært uendret siden 2023. Inntektene fra vaskeriet var 61 750 kr i 2025, mot 58 900 kr i 2024. Fellesrommet i blokk D er 62 m² og har plass til 40 personer. Fra 1. januar 2025 ble leien økt fra 400 kr til 450 kr per døgn, fordi rengjøring etter utleie ble satt bort. Rommet ble leid ut i 64 døgn i 2025, mot 51 døgn i 2024. Leieinntektene var 28 800 kr i 2025 og 20 400 kr i 2024. Rommet leies bare ut til beboere. Hobbyverkstedet i kjelleren i blokk C åpnet 1. mars 2025 i et tidligere lagerrom på 24 m². Ombyggingen kostet 52 300 kr. Verkstedet er gratis for beboerne, og det har vært brukt jevnt gjennom året, særlig av beboere som reparerer sykler og møbler. Borettslaget har to sykkelboder. Sykkelbod nord ved blokk A har 48 plasser, og sykkelbod sør ved blokk D har 36 plasser. I mai 2025 fikk sykkelbod nord en ny port med nøkkelbrikkeleser, og i sykkelbod sør ble det satt opp et ladeskap med 8 låsbare rom for elsykkelbatterier. Ved den årlige ryddeaksjonen i oktober ble 23 umerkede sykler fjernet. 5 av dem ble hentet av eierne innen fristen, og de 18 andre ble gitt bort til gjenbruk. Det ble holdt to dugnader i 2025. På vårdugnaden 26. april deltok 41 av 72 husstander, og på høstdugnaden 18. oktober deltok 35 husstander. Hagekomiteen, som har fem medlemmer og ledes av Vibeke Strand, organiserer dugnadene. De 12 hageparsellene på 8
m² hver ble fordelt ved loddtrekning i mars 2025 for sesongene 2025 og 2026. Ved årsskiftet sto 9 husstander på venteliste for parsell. I januar og februar 2025 ble det registrert 4 innbrudd i kjellerboder i blokk C. I alle tilfellene var kjellerdøra blitt stående åpen. Styret sendte derfor ut et skriv om at kjellerdørene alltid skal være lukket og låst, og etter mars 2025 er det ikke registrert flere innbrudd. Ingen av innbruddene førte til kostnader for borettslaget, fordi de stjålne gjenstandene var dekket av beboernes egne forsikringer. Vaktmesteren registrerte 312 feilmeldinger fra beboerne i 2025, mot 278 i 2024. 87 % av feilmeldingene ble utbedret innen 14 dager. De vanligste feilene gjaldt dørpumper, belysning i kjellerboder og vaskemaskiner som stoppet midt i et program. Det ble solgt 24 ekstra nøkkelbrikker i 2025 til 400 kr per stykk, til sammen 9 600 kr. I 2024 ble det solgt 30 ekstra brikker til samme pris. 4. Vedlikehold og energi Kostnadene til vedlikehold og reparasjoner var 1 236 800 kr i 2025, mot 874 500 kr i 2024. Økningen skyldes i hovedsak tre store poster: ny LED-belysning i trapperommene, reparasjonen av en taklekkasje i blokk C og tilstandsrapporten for balkonger og fasader. Tilstandsrapporten kostet 148 500 kr og er første del av forprosjektet.  LED-belysning med bevegelsessensor i alle trapperom ble montert i mars 2025 for 186 000 kr.  Taklekkasjen over oppgang 2 i blokk C ble oppdaget etter kraftig regn 2. juni og reparert for 214 600 kr.  Trapperommene i blokk D ble malt i august 2025 for 167 300 kr.  Alle stigeledninger ble inspisert med kamera i oktober 2025 for 72 500 kr, som grunnlag for rørfornying.  Det oppsto tre vannskader i leiligheter i blokk A og C. Borettslaget betalte egenandel på 10 000 kr for hver skade. Strømforbruket i fellesarealene gikk ned fra 241 300 kWh i 2024 til 214 600 kWh i 2025, en nedgang på 11 %. Nedgangen skyldes først og fremst at den nye belysningen i trapperommene bare er på når noen beveger seg der. Energikostnaden i fellesarealene falt fra 352 100 kr til 318 700 kr. Forsikringspremien økte med 10 %, fra 441 800 kr til 486 000 kr. Forsikringsselskapet begrunnet økningen med antall vannskader i borettslaget de siste tre årene. Styret minner om at beboeren selv betaler egenandelen når en vannskade skyldes utstyr i leiligheten som beboeren har ansvar for, for eksempel en vaskemaskin eller oppvaskmaskin. Ingen av de tre skadene i 2025 hadde en slik årsak, og derfor ble egenandelene belastet borettslaget.
\5. Regnskap 2025 Årsregnskapet viser et årsresultat på 745 950 kr, mot 992 000 kr i 2024. Driftsresultatet ble 1 195 850 kr. Nedgangen fra året før skyldes i hovedsak høyere vedlikeholdskostnader. Tabellen viser hovedtallene. Post 2025 (kr) 2024 (kr) Felleskostnader 5 184 000 4 984 600 Andre driftsinntekter 100 150 91 300 Sum driftsinntekter 5 284 150 5 075 900 Gebyrer for vann, avløp og renovasjon 812 400 768 900 Forsikring 486 000 441 800 Energi i fellesarealer 318 700 352 100 Vaktmester (lønn og sosiale kostnader) 642 500 618 200 Forretningsførsel og revisjon 214 300 206 900 Vedlikehold og reparasjoner 1 236 800 874 500 Styrehonorar 180 000 165 000 Andre driftskostnader 197 600 183 400 Sum driftskostnader 4 088 300 3 610 800 Driftsresultat 1 195 850 1 465 100 Renteinntekter 48 300 39 600 Rentekostnader 498 200 512 700 Årsresultat 745 950 992 000 Felleskostnadene ble økt med 4 % fra 1. januar 2025. Gjennomsnittlig felleskostnad var 6 000 kr per leilighet per måned i 2025. Andre driftsinntekter består av inntekter fra vaskeriet, utleie av fellesrommet og salg av ekstra nøkkelbrikker. Borettslaget har ett nedbetalingslån med flytende rente. Lånet ble nedbetalt med 620 000 kr i 2025, og fellesgjelden gikk ned fra 12 260 000 kr ved inngangen av året til 11 640 000 kr per 31. desember 2025. Det tilsvarer i gjennomsnitt om lag 161 700 kr per leilighet. Renten var 4,40 % ved utgangen av 2024 og 4,15 % ved utgangen av 2025. Lånet skal etter dagens plan være nedbetalt i 2044. Disposisjonsfondet var 3 412 500 kr per 31. desember 2025. Styret mener at likviditeten er god nok til å betale resten av forprosjektet i 2026 uten nye lån. Revisor har ikke hatt merknader til regnskapet. 6. Rehabilitering av balkonger og fasader Tilstandsrapporten fra desember 2025 viser at 14 balkonger har betongskader i den alvorligste tilstandsgraden. Alle disse balkongene ligger i blokk A og blokk B. Rapporten viser også at fasadene på alle fire blokkene har sprekker og dårlig isolasjon, fordi de aldri har vært etterisolert siden byggeåret. Styret har derfor sperret 3 balkonger i blokk A for bruk inntil videre, slik at ingen skal skades av løse betongbiter.
Styret legger fram et forslag for generalforsamlingen 21. april 2026 om å rehabilitere balkonger og fasader på alle fire blokkene. Hovedpunktene i forslaget er:  Kostnadsoverslaget er 41,0 mill. kr inkludert merverdiavgift.  Arbeidet skal finansieres med et nytt lån på inntil 39,5 mill. kr med 30 års nedbetalingstid og 1,5 mill. kr fra disposisjonsfondet.  Blokk A og blokk B rehabiliteres fra april til oktober 2027, og blokk C og blokk D fra april til oktober 2028.  Felleskostnadene må etter styrets beregning økes med om lag 12 % fra 1. januar 2027.  Hver balkong vil være utilgjengelig i om lag 10 uker mens arbeidet pågår. Forprosjektet ledes av en byggekomité med fire medlemmer: Ingrid Solbakk, Torbjørn Leirvik og to beboere som ikke sitter i styret. Byggekomiteen hadde sitt første møte 2. desember 2025. I forprosjektets andre del, som gjennomføres i 2026, skal det lages et anbudsgrunnlag, og minst tre entreprenører skal inviteres til å gi tilbud. Styret vil ikke inngå kontrakt før anbudene er vurdert av byggekomiteen og en uavhengig rådgiver. Beboerne har hatt mulighet til å stille spørsmål om prosjektet på to informasjonsmøter, 14. januar og 25. februar 2026. Til sammen 57 personer deltok på de to møtene. De vanligste spørsmålene gjaldt støy i byggeperioden, om balkongene blir større, og hvor mye felleskostnadene vil øke. Balkongene blir ikke større enn i dag, fordi en utvidelse ville kreve nye fundamenter. Forslaget krever to tredels flertall av de avgitte stemmene, fordi tiltaket går ut over vanlig forvaltning og vedlikehold. Hvis forslaget ikke vedtas, må styret likevel utbedre de 14 skadde balkongene. Det er anslått å koste om lag 6,8 mill. kr og vil ikke gi bedre isolasjon av fasadene. 7. Utsikter for 2026 Styret har vedtatt å øke felleskostnadene med 6 % fra 1. januar 2026. Økningen skyldes resten av forprosjektet, som er budsjettert til 1 051 500 kr, en ventet økning i forsikringspremien på 8 % og høyere gebyrer for vann, avløp og renovasjon. Gjennomsnittlig felleskostnad blir dermed om lag 6 360 kr per leilighet per måned i 2026. Budsjettet for 2026 viser et årsresultat på 173 500 kr. Vårdugnaden i 2026 holdes 25. april og høstdugnaden 17. oktober. Styret oppfordrer alle husstander til å delta, fordi dugnadene holder kostnadene til hagestell nede. Styret takker beboerne, vaktmesteren og hagekomiteen for innsatsen i 2025.

View file

@ -0,0 +1,235 @@
# Brantwater Sailing Club - Club Rules, Safety and Duty Handbook, 2026 edition
# Club Rules, Safety and Duty Handbook - 2026 edition
This edition was approved by the committee on Monday 9 March 2026 and replaces the 2024 edition. It applies to every member, every guest and every visiting sailor while they are on club grounds or afloat on club business. Where this handbook and a notice posted by the Officer of the Day disagree on the day, the Officer of the Day's notice applies.
## 1. Membership and fees
The club year for subscriptions runs from 1 March to the last day of February. Subscriptions fall due on 1 March. A member whose subscription has not been paid by 31 March may not sail club boats, use the safety boat cover or sign in guests until it is paid.
Category
Who it covers
Annual subscription 2026 (£)
Duties per season
Full adult
One person aged 26 or over
285
3
Family
Two adults and their children under 18 at one address
430
4, shared by the adults
Junior
One person under 18
95
0
Young adult
One person aged 18 to 25
140
2
Social
One person who does not sail from the club
75
0
A joining fee of £60 is charged once per membership in the year of joining, except for junior and young adult memberships.
A member who joins on or after 1 September pays half the annual subscription for the rest of that club year.
Members aged 75 or over on 1 March are exempt from duties but may still volunteer for them.
A junior member must have a parent or guardian who is a full, family or social member, unless the junior is 16 or 17 and the committee has agreed otherwise in writing.
## 2. Clubhouse and bar
The clubhouse has a main room with the bar, the Lookout Room upstairs, a galley and two changing rooms. The main room holds up to 80 people and the Lookout Room up to 24. The Lookout Room is used as the race office and for training; food and drink other than water are not allowed in it, because the training charts and radios are kept there.
Bar opening hours
Summer (1 April to 31 October)
Winter (1 November to 31 March)
Wednesday
18:00 to 22:30
Closed
Saturday
12:00 to 18:00
Closed
Sunday
12:00 to 17:00
12:00 to 16:00
Other days
Closed, except for booked events
Closed, except for booked events
The bar serves only members aged 18 or over and their signed-in guests.
A member may sign in at most 3 guests on any one day, and the same guest may be signed in at most 6 times in a season.
Members under 18 may be in the main room until 20:00; after 20:00 they may stay only when a parent or guardian is with them.
Dogs are not allowed inside the clubhouse, except assistance dogs. Elsewhere on club grounds dogs must be kept on a lead.
Smoking and vaping are not allowed anywhere on club grounds except the marked area behind the north fence.
The changing rooms are open from 07:30 to 21:30. The door code changes on 1 April and 1 October and is sent to paid-up members only.
## 3. Boat shed, dinghy park and moorings
### Boat shed
The boat shed holds the club dinghies, the safety boats and the workboat. Keys are held only by instructors, the boatman, committee members and the safety boat crew on duty. Fuel must not be kept in the boat shed or the clubhouse; it is stored only in the fuel locker outside the boat shed, which holds no more than 100 litres of petrol.
### Dinghy park and racks
The dinghy park has 64 spaces and costs £95 for the storage year from 1 April to 31 March. The racks have 24 spaces for kayaks, paddleboards and tenders and cost £45 for the same period. Storage fees are due by 1 April.
Every boat and launching trolley must carry a label with the owner's name and membership number.
If a storage fee is still unpaid on 30 June, the committee may remove the boat after giving 28 days' written notice.
A boat that has been removed and not claimed within 6 months may be sold, and the proceeds after costs are kept for the owner for one further year.
Launching trolleys must not be taken beyond the yellow marker on the slipway, because the lower section is damaged.
### Swinging moorings
The club has 38 swinging moorings in two trots, north and south. The mooring season runs from 1 April to 31 October, and boats must be off the moorings by 15 November. The fee is £210 for a boat up to 6.5 metres long and £265 for a boat over 6.5 metres. No boat over 8 metres long may use a club mooring.
Applications for a mooring must reach the Moorings Officer by 31 January. The committee allocates moorings by 28 February.
Existing holders keep their mooring only if they pay the fee by 1 April.
Every moored boat must have third-party liability insurance of at least £3 million.
The boatman inspects the chain and sinker of every mooring every two years. A holder must not change or add to the mooring tackle.
Six winter hardstanding spaces are available from 1 November to 31 March for £150.
## 4. Using club boats
Club dinghies may be used free of charge by members who hold club Level 2 or above. Members with Level 1 may use them only on a supervised session run by an instructor. Bookings are made on the board in the boat shed.
One booking may last up to 3 hours. On Saturdays and Sundays between 10:00 and 16:00, a booking may last only 2 hours.
Club boats may not be booked for racing on Wednesday evenings unless the Rear Commodore (Sailing) agrees.
Juniors may sail club boats without an instructor present only from the age of 14 and only if they hold Level 3.
The Osprey 16 trainers are kept for courses and may be booked by members only outside course days.
Any damage must be written in the defects book in the boat shed before the user leaves the club.
## 5. Safety on the water
Everyone afloat must wear a buoyancy aid, whether in a club boat, a private boat or a safety boat. Safety boat crews wear lifejackets and the helm must attach the kill cord whenever the engine is running. Juniors must also wear a buoyancy aid on the pontoons at all times.
Situation
Limit
Junior training
No sailing when the mean wind is over 18 knots or gusts are over 25 knots
Club boats, adult use
No sailing when the mean wind is over 22 knots
Safety cover for racing
1 safety boat for up to 12 boats racing; 2 safety boats for 13 or more
Safety cover for junior training
1 safety boat for every 6 junior boats on the water; no more than 12 junior boats on the water at once
Water temperature below 10 °C
Wetsuit or drysuit required for juniors; strongly advised for adults
Members may sail their own boats outside organised sessions only if another adult is ashore at the club and they have written their name on the afloat board.
Nobody may sail after sunset.
From 1 November to 31 March, single-handed sailing is allowed only when a safety boat is staffed.
The swimming zone off Brantholme beach is out of bounds to all boats.
Junior boats must stay south of the yellow buoy line during training.
When the Officer of the Day flies the red flag, no boat may launch.
## 6. The duty system
The club has no paid race or safety staff, so every activity on the water depends on members doing their duties. There are four kinds of duty: Officer of the Day, safety boat helm, safety boat crew and shore duty (sign-in, galley and teas). The rota for spring and summer is published by 1 March, and the rota for autumn by 1 August.
A safety boat helm must be 18 or over and hold the Club Powerboat Certificate.
Safety boat crew must be 16 or over.
An Officer of the Day must have been a member for at least one full season.
If you cannot do a duty, arrange a swap with another member and tell the Duty Coordinator at least 48 hours before the duty.
A duty that is missed without a swap is charged at £35, which is added to the member's next invoice.
A duty counts only if the member signs the duty sheet in the race office on the day.
The Duty Coordinator is Neil Harrowby. The Club Powerboat Certificate course is run twice a year by the Safety Officer and is free to members who agree to do at least two safety boat duties in the following season.
## 7. Junior members
Junior training runs on Saturday mornings from 09:30 to 12:30 between May and September. The minimum age is 8, and every junior must be able to swim 50 metres in clothes while wearing a buoyancy aid. The season fee for junior training is £120 for junior members; children who are not members cannot join the programme.
A parent or guardian must sign the junior in and out at the race office for every session.
Juniors under 14 must be collected from the clubhouse by a parent or guardian, and may not leave on their own.
Instructors may cancel a session at short notice because of wind, water temperature or lack of safety cover; cancellations are posted by 08:00.
Dogs are not allowed in the boat park or on the pontoons on junior training days.
## 8. Incidents, complaints and changes
Every incident, near miss or injury on the water or ashore must be reported to the Safety Officer, Fiona Brackley, within 24 hours, using the incident book in the race office. In an emergency, call the emergency services first and then the Officer of the Day.
Complaints about another member's behaviour go to the Secretary in writing. The committee will reply within 28 days. A member who breaks these rules more than once in a season may have their right to use club boats suspended for up to 3 months, and serious breaches may lead to the end of membership after a hearing.
The committee may change this handbook during the season. Changes take effect 14 days after they are posted on the clubhouse noticeboard and sent to members, except safety changes, which take effect at once.

View file

@ -0,0 +1,11 @@
Brantwater Sailing Club - Commodore's Annual Report 2025-26 Brantwater Sailing Club: Commodore's Annual Report 2025-26 This report covers the club year from 1 October 2025 to 30 September 2026. It will be presented to the Annual General Meeting on Saturday 21 November 2026 at 19:00 in the main room of the clubhouse. The accounts summary in section 6 has been prepared by the Treasurer, Graham Oakeshott, and checked by the club's two honorary examiners, who signed them off on 27 October 2026. 1. Introduction from the Commodore This was my second year as Commodore, and it was a busy one. We grew to 312 members, the highest figure since the club was founded in 1971. We completed 22 races across our three main series, hosted the Brantwater Open Regatta in July and trained more juniors than in any previous season. We also met our first serious problem with the slipway, which cracked after the high water of February 2026. Most of this report is good news, but the slipway repair will shape the coming winter, and I ask every member to read section 5 before the AGM. None of this happens without volunteers. In 2026 members completed 533 duties on the water and ashore. I want to thank in particular our Rear Commodore (Sailing), Priya Castellan, our Principal Instructor, Tomasz Wilde, and our Safety Officer, Fiona Brackley, who between them were at the club on more than 140 days of the season. Helen Marchbank, Commodore 2. Membership On 30 September 2026 the club had 312 members, compared with 296 a year earlier. During the year 47 new members joined and 31 left, most of them because they had moved away from the area. Members are counted as individuals, so a family membership counts every person it covers. The 96 people in the family category belong to 31 family memberships, up from 30 last year. Category Members at 30 Sept 2025 Members at 30 Sept 2026 Change Full adult 141 148 +7 Family (individuals) 92 96 +4 Junior (under 18) 25 27 +2 Young adult (18 to 25) 17 19 +2 Social (non-sailing) 21 22 +1 Total 296 312 +16
The full adult subscription rose from £270 in 2025 to £285 in 2026. Despite the increase, only four full adult members gave cost as their reason for leaving. The joining fee stayed at £60 per membership and was again waived for junior and young adult memberships, because the committee wants to make it as easy as possible for younger sailors to join. We now have a waiting list for moorings for the first time since 2019. Nine members are on it, and the committee expects that most of them will not be offered a mooring before the 2028 season. 3. Sailing, racing and training Racing Racing at Brantwater uses the club's own yardstick handicap, so that all classes can race together in one fleet. Each series allows one discard when 4 to 7 races have been completed and two discards when 8 or more have been completed. The season results were as follows. Series Dates (2026) Races planned Races completed Average boats per race Spring Series Sundays 12 April to 31 May 8 7 11 Summer Evening Series Wednesdays 3 June to 5 August 10 9 14 Autumn Series Sundays 6 September to 11 October 6 6 9 Brantwater Open Regatta 18 to 19 July 4 4 37 The Spring Series race on 26 April was cancelled because no qualified safety boat helm was available, which is the first time in six years that a race has been lost for that reason. The Summer Evening Series race on 15 July was abandoned after the first lap because of a thunderstorm. The Summer Evening Series was won by Owen Fairclough and Lily Fairclough in their Heron 14, with 9 points net after two discards. The Spring Series was won by Duncan Ferrier and the Autumn Series by Rosa Lindqvist, both sailing single- handers. The Open Regatta attracted 37 boats, 15 of them from six visiting clubs, which is 8 more boats than in 2025. Visiting sailors used the dinghy park free of charge for the weekend, and the bar took £4,120 over the two days. Junior training The junior programme ran on Saturday mornings from 09:30 to 12:30 between 2 May and 19 September. Of the 21 Saturdays in that period, 20 were used for training; there was no session on 18 July because of the regatta. 41 juniors aged 8 to 17 were enrolled, against 34 in 2025. The season fee for junior members stayed at £120.
Of the 41 juniors, 23 passed at least one club level during the season: 12 passed Level 1, 8 passed Level 2 and 3 passed Level 3. Training was led by 6 senior instructors and 9 assistant instructors, up from 5 and 7 in 2025. Two members qualified as senior instructors at the club's expense, which is the main reason training costs rose from £3,720 to £4,860. Adult courses Eighteen adults completed the two-weekend Start Sailing course and thirteen completed the four-evening Improver course. Start Sailing courses use the two Osprey 16 trainers, because their size allows an instructor and two learners to sail together. Eleven of the eighteen Start Sailing graduates have since joined the club as full adult members. 4. Safety and duties Our safety boats, Gannet and Puffin, were launched on 74 days and ran for a combined 212 engine hours. The safety boat crews attended 19 capsizes that needed help, towed 3 boats back to the club and brought one sailor ashore with early signs of cold. There were no injuries that needed hospital treatment. Two incidents were reported to the Safety Officer within the required 24 hours; one further incident on 9 August was reported after four days, and the committee has reminded all officers of the day of the deadline. The duty system asked for 564 duties during the season. Members completed 533 of them and 31 were missed without a swap, each of which was charged at £35 under the current rules. Beyond the cancelled race on 26 April, on four other days a start was delayed by more than 30 minutes while a replacement safety boat helm was found. Because a missed safety boat duty can stop a race or a training session for everyone, the committee has decided to raise the missed duty charge from £35 to £50 from 1 April 2027. The number of duties each member owes does not change. Members who cannot do a duty will still be able to avoid the charge by arranging a swap and telling the Duty Coordinator, Neil Harrowby, at least 48 hours before the duty. 5. Facilities, fleet and the slipway repair Club fleet The club owns 15 sailing dinghies (eight Tern 12 single-handers, five Heron 14 double- handers and two Osprey 16 trainers) and three powerboats (the safety boats Gannet and Puffin, and the workboat Mallard, which is used for mooring work and is not a primary safety boat). Two new Tern 12s were bought in May 2026 for £3,900 each, paid from the Boat Replacement Fund. Heron 14 number H2 has been out of use since 22 August because of a leaking centreboard case; it will be repaired over the winter. Moorings and storage 34 of the club's 38 swinging moorings were let in 2026, against 36 in 2025. Two south trot moorings are always kept for visiting boats, and two north trot moorings, N09 and N17, have been out of use since their sinkers failed inspection in March 2026; they will be replaced over the winter, and their former holders will be offered them first. 57 of the 64
dinghy park spaces and 20 of the 24 rack spaces were taken. All six winter hardstanding spaces have been booked for the period from 1 November 2026 to 31 March 2027. Clubhouse The clubhouse roof over the changing rooms was patched in June at a cost of £3,260, which is included in clubhouse repairs and cleaning. Utility costs fell from £8,050 to £7,420 because the new heating controls in the main room and the Lookout Room now switch off automatically at 22:45. The slipway repair The slipway was built in 1984 and is 34 metres long and 4.5 metres wide. After the high water in February 2026, the lower 9 metres cracked and settled by up to 70 millimetres, so that the wheels of launching trolleys now catch on the step. Since March 2026 members have been asked not to take trolleys beyond the yellow marker at the end of the sound concrete. The committee obtained three quotes and accepted the lowest, £34,900, for breaking out and recasting the lower 12 metres. With a 10% contingency of £3,490, the total budget is £38,390. The work will take place from Monday 4 January to Friday 26 February 2027, because the lake level is normally at its lowest in those weeks, so that the contractor can work on the lower section in the dry. Slipway funding source Amount (£) Status Development Fund 22,000 Held at 30 September 2026 Grant from the Thistleby Charitable Trust 9,000 Confirmed on 2 October 2026 General reserve 7,390 Subject to AGM approval Total 38,390 The slipway will be closed to everyone from 2 January to 28 February 2027, which is two days longer at each end than the contractor's works, so that the site can be set up and cleared safely. During that time the safety boats will launch from the temporary pontoon at the north beach, and members will not be able to launch their own boats at all. As a result, the Frostbite Series will run only from 8 November to 20 December 2026, with seven races instead of the usual sixteen. 6. Accounts summary The club made a surplus of £31,830 in the year to 30 September 2026, compared with £24,015 in the year before. The main reasons were higher subscription income, from both the larger membership and the new fees, and a better bar result. Bar sales of £38,900 less bar stock of £16,800 gave a gross bar margin of £22,100 before wages. Income 2024-25 (£) 2025-26 (£) Subscriptions 56,385 62,385 Joining fees 1,980 2,640 Moorings and boat storage 13,920 14,355 Bar sales 35,400 38,900
Training courses 8,120 9,810 Race entry fees 2,300 2,150 Social events 3,950 4,600 Donations 750 1,200 Total income 122,805 136,040 Expenditure 2024-25 (£) 2025-26 (£) Bar stock 15,300 16,800 Wages (bar steward and boatman) 20,600 21,400 Ground rent to the Brantwater Estate 9,500 9,500 Insurance 6,300 6,850 Utilities 8,050 7,420 Club boat and safety boat maintenance 7,640 8,930 Safety boat fuel 2,140 2,310 Training costs 3,720 4,860 Clubhouse repairs and cleaning 11,880 12,340 Affiliation and licences 1,890 1,950 Social events 2,960 3,180 Administration 2,610 2,470 Depreciation 6,200 6,200 Total expenditure 98,790 104,210 Surplus 24,015 31,830 Insurance rose by 8.7%, from £6,300 to £6,850, after the insurer added cover for the new Tern 12s and raised its base rate. Race entry fees fell slightly, by £150, because one Spring Series race was cancelled and one Summer Evening race was abandoned. The ground rent is fixed at £9,500 a year until the next rent review in April 2029 under the lease, which runs until 2041. The committee allocated the surplus as follows: £15,000 to the Development Fund for the slipway, £6,000 to the Boat Replacement Fund and the remaining £10,830 to the general reserve. Reserve At 30 Sept 2025 (£) Added (£) Spent (£) At 30 Sept 2026 (£) General reserve 37,770 10,830 0 48,600 Development Fund 7,000 15,000 0 22,000 Boat Replacement Fund 13,300 6,000 7,800 11,500 Total reserves 58,070 31,830 7,800 82,100 The committee's policy is that the general reserve must not fall below £35,000, which is roughly four months of running costs. If the AGM approves the use of £7,390 for the slipway, the general reserve will fall to £41,210 and will stay above that floor.
\7. Looking ahead and proposals to the AGM The committee will ask the AGM to approve two resolutions. The first is the use of £7,390 from the general reserve for the slipway repair. The second is a set of new subscription rates, which would apply from 1 March 2027, the date on which subscriptions fall due. The proposed increases are needed because insurance and wages are rising faster than membership numbers. Membership category 2026 rate (£) Proposed 2027 rate (£) Full adult 285 298 Family 430 450 Junior (under 18) 95 95 Young adult (18 to 25) 140 145 Social (non-sailing) 75 75 Junior and social rates would not change, because the committee wants to keep junior sailing affordable and because social members do not use the boats or the safety cover. The joining fee would stay at £60. Mooring and storage fees are set by the committee rather than the AGM and will stay at their 2026 levels for 2027. Three committee posts are up for election this year: Vice Commodore, Secretary and Moorings Officer. Duncan Ferrier has agreed to stand again as Vice Commodore. Ruth Penhallow is stepping down as Secretary after six years, and Alan Treadgold is stepping down as Moorings Officer after four. Nominations must reach the Secretary by 19:00 on Saturday 14 November 2026, one week before the meeting. Finally, the 2027 season will begin with the fitting-out work party on Saturday 27 March 2027. The boatman will lay the mooring buoys from the workboat on Saturday 3 April, so moored boats can go on their moorings from that afternoon, and the season opening day is Saturday 10 April. I look forward to seeing you on the water.

View file

@ -0,0 +1,183 @@
## Copperfold Makerspace Annual General Meeting 2026
## Annual general meeting, 28 November 2026
The meeting starts at 14:00 in Unit 4, Copperfold Yard.
The Saturday open session ends at 13:00 today so that the workshop can be cleared for seating.
Only Full and Concession members who joined at least three months ago may vote.
Proxy votes had to reach the membership secretary by 14:00 on Thursday 26 November.
## Agenda
Annual report and accounts for 2025–26.
Budget for 2026–27.
Vote on the move to Unit 11, Larchmere Works.
Vote on membership fees from 1 August 2027.
Election of the chair and two ordinary committee members.
## Membership in 2025–26
We had 214 members on 31 March 2026, up from 187 a year earlier.
74 new members joined and 47 left during the year.
The split was 121 Full, 49 Concession, 35 Associate and 9 Youth members.
The new Wednesday session from 13:00 to 16:00 started on 7 January 2026 and averaged 11 attendees.
## Fees since 1 September 2026
Full membership rose from £26 to £30 a month.
Concession membership rose from £16 to £18 a month.
Associate (£12) and Youth (£8) fees and the £15 joining fee did not change.
The rise was approved on 14 June 2026 because electricity costs rose 19 per cent and insurance 15 per cent.
## Inductions
Members completed 360 inductions in 2025–26, up from 297 in 2024–25.
Woodshop basic was the most common induction, with 96 completed.
On 1 October 2026, 46 members were waiting for woodshop basic, with an average wait of 9 weeks.
Only 6 of our 21 inductors are approved for woodshop machines.
## Safety record
Members recorded 17 incidents in 2025–26, down from 23 the year before.
Cuts and grazes made up 12 of the 17 incidents.
One member needed three stitches at a walk-in clinic after a chisel cut in March 2026.
Nine members hold a current first-aid certificate.
## The laser fire and what changed
On 12 August 2025, 3 mm plywood caught fire in the laser while the operator was out of the room.
Another member put the fire out with the CO2 extinguisher, and nobody was hurt.
The laser was out of use for 4 days and the operator's induction was suspended for 30 days.
Since handbook version 4 took effect on 1 September 2026, the laser must be paused before anyone leaves the room.
## Income in 2025–26
Total income was £69,010, up from £60,240 in 2024–25.
Membership and joining fees brought in £52,480, or 76 per cent of income.
Laser time and materials brought in £6,420, and courses and Junior Saturdays £4,950.
A £3,000 grant from the Wexcombe Community Trust could only be spent on dust extraction.
## Spending and reserves
Total expenditure was £64,615, of which rent for Unit 4 was £27,600.
We spent £10,630 on new equipment and £3,585 on repairs and maintenance.
The year ended with a surplus of £4,395.
Reserves stood at £22,940 on 31 March 2026, including a £15,000 move fund ring-fenced on 9 January 2026.
## Budget for 2026–27
Budgeted income is £87,100, including a £12,000 move appeal that is only collected if the move is approved.
Budgeted expenditure is £73,950.
The budget includes a £7,800 deposit for Unit 11 and £4,500 for the electrical survey and design.
Rent at Unit 4 stays at £2,300 a month until the lease ends.
## Why we need to move
Unit 4 has only 186 square metres and no room for more benches.
The single-phase supply means the table saw and planer-thicknesser cannot run at the same time.
Because of the flats above the yard, fob access ends at 23:00 and noisy machines stop at 22:00.
The laser was booked for 87 per cent of bookable hours in 2025–26.
## Unit 11, Larchmere Works
Unit 11 is a ground-floor unit of 410 square metres, about 900 metres from Copperfold Yard.
It has a three-phase supply, an 18 square metre dust-extraction room and a 4.2-metre ceiling.
There are no homes within 150 metres of the unit.
The rent is £3,900 a month on a ten-year lease with a break clause after five years.
## Fit-out cost and funding
The fit-out is estimated at £38,500 in total.
The largest item is the three-phase electrical work at £14,200, followed by dust-extraction ducting at £9,800.
It will be funded by the £15,000 move fund, a £12,000 members' appeal and £11,500 in grant applications.
The move appeal opens on 1 December 2026, but only if the move is approved today.
## Timetable if the move is approved
The lease for Unit 11 is to be signed by 15 January 2027 and the deposit paid in February 2027.
We get the keys on 1 May 2027 and fit out the unit in May and June.
Unit 4 closes to members after 2 July 2027, and machines move over two weekends in July.
Unit 11 opens to members on Saturday 24 July 2027.
## Handing back Unit 4
The landlord has agreed that we may hand back Unit 4 on 31 July 2027 instead of 30 September 2027.
This requires eight weeks' written notice, so notice must be given by 5 June 2027.
Handing back early saves two months' rent, or £4,600.
We will still pay rent on both units in May, June and July 2027.
## Proposed fees from 1 August 2027
Full membership would rise from £30 to £34 a month.
Concession would rise from £18 to £20, and Associate from £12 to £14.
The Youth fee would stay at £8 a month.
These fees only take effect if the move is approved.
## How today's votes work
The move needs a two-thirds majority of the votes cast, including proxy votes.
The fee proposal needs a simple majority and is voted on separately after the move.
Associate and Youth members may speak but may not vote.
If the move is rejected, the committee will ask the landlord to extend the Unit 4 lease beyond 30 September 2027.
## Committee elections
Imogen Halvorsen-Pike is stepping down as chair after four years.
Sunniva Okafor, who led the search for new premises, is the only candidate for chair.
Callum Ferrand, Hettie Galbraith and Dov Pennick-Ash are standing for the two ordinary seats.
Tobias Wrenfield continues as treasurer until 2027.

View file

@ -0,0 +1,11 @@
Copperfold Makerspace Annual Report 2025–26 Copperfold Makerspace Annual Report 2025–26 This report covers the financial year from 1 April 2025 to 31 March 2026. It was prepared by the committee for the annual general meeting on Saturday 28 November 2026. 1. From the chair This is my fourth and final annual report as chair of Copperfold Makerspace. When I was first elected in November 2022, we had 132 members, one cramped woodshop and a laser cutter that was booked for barely a third of its available hours. On 31 March 2026 we had 214 members, 21 approved inductors and a laser that members queue for. None of this would have been possible without our 38 active volunteers, who logged 2,940 hours between them during the year. Two themes ran through 2025–26. The first was growth. Membership rose by 27 people and the number of completed inductions rose from 297 to 360, yet the waiting list for the woodshop grew faster than our inductors could clear it. The second was a growing recognition that Unit 4 can no longer hold us. Our 186 square metres were laid out for a small joinery business, the electricity supply is single-phase, and the residents of the flats above Copperfold Yard have every right to a quiet night. For these reasons the committee spent much of the second half of the year looking for a new home, and this report ends with the proposal that members will vote on at the general meeting: a move to Unit 11 at Larchmere Works in July 2027. I will not stand for re-election in November. Thank you for trusting me with the role for four years. Imogen Halvorsen-Pike, Chair. 2. Membership and access On 31 March 2026 the makerspace had 214 paying members, compared with 187 on 31 March 2025. We welcomed 74 new members during the year and 47 members left, most of them because they moved away from the area or because their studies ended. The table below shows the split by tier and the monthly fee that applied throughout 2025–26. Tier Members on 31 March 2025 Members on 31 March 2026 Monthly fee in 2025 –26 Full 108 121 £26 Concession 44 49 £16 Associate 29 35 £12 Youth (ages 14–17) 6 9 £8 Total 187 214 –
Concession membership is open to students in full-time education, to members aged 65 or over and to members on a low income, who self-declare. Concession members have exactly the same access as Full members. Associate members may use the space only during staffed open sessions, and they may not use the laser cutter or the resin printer. Youth members may only be in the building when their parent or guardian, who must be a Full or Concession member, is also present. Until 31 May 2025, Full and Concession members could let themselves in with their key fob at any hour of the day or night. From 1 June 2025 fob access has been limited to 07:00– 23:00 every day, because three noise complaints were received from residents of the flats above Copperfold Yard between February and April 2025. No further complaints have been received since the change took effect. Staffed open sessions ran on Tuesdays and Thursdays from 18:00 to 21:30 and on Saturdays from 10:00 to 16:00. From Wednesday 7 January 2026 we added a Wednesday afternoon session from 13:00 to 16:00, mainly for members who work shifts or are retired. The Wednesday session averaged 11 attendees in its first twelve weeks, against an average of 26 on Tuesday and Thursday evenings and 34 on Saturdays. Fees did not change during 2025–26. At the general meeting on 14 June 2026, members approved a rise in the Full fee from £26 to £30 a month and in the Concession fee from £16 to £18 a month, with effect from 1 September 2026. The rise was needed because our electricity costs rose by 19 per cent between 2024–25 and 2025–26 and our insurance premium rose by 15 per cent at the September 2025 renewal. The Associate fee of £12 and the Youth fee of £8 were not changed, and the one-off joining fee of £15 also stayed the same. 3. Workshops, equipment and inductions Members completed 360 inductions in 2025–26, against 297 the year before. Every induction is run by one of our volunteer inductors. Inductions are free for Full, Concession and Youth members, while Associate members pay £10 per induction. The table shows the length of each induction and how many were completed in each of the last two years. Induction Length Completed 2024–25 Completed 2025–26 Woodshop basic 3 hours 81 96 Table saw 1.5 hours 36 41 Planer-thicknesser and router table 1 hour 17 22 Laser cutter 2 hours plus one supervised job 52 58 FDM 3D printing 1 hour 61 73 Resin printing 1.5 hours 9 14 Electronics bench 1 hour 30 37 Overlocker and embroidery machine 45 minutes 11 19
Total 297 360 Demand for the woodshop continues to outstrip what we can offer. On 1 October 2026, 46 members were on the waiting list for the woodshop basic induction, and the average wait was 9 weeks. Only 6 of our 21 inductors are approved to induct on woodshop machines, because a woodshop inductor must have been inducted on those machines for at least two years and must be signed off by the woodshop lead, Ines Calloway. We spent £10,630 on new equipment during the year:  A 310 mm planer-thicknesser, bought in October 2025 for £2,950. It replaced the 260 mm planer that was built in 2011 and donated to us in 2017, which was retired after its motor failed in September 2025.  Two FDM 3D printers with 300 × 300 mm beds, bought in November 2025 for £1,240 in total. Our four older printers have 250 × 250 mm beds.  A wash-and-cure station for the resin printer, bought in June 2025 for £310.  A two-bag dust extractor with new ducting, installed in August 2025 for £4,100.  Two bench power supplies for the electronics bench, bought in January 2026 for £380.  An embroidery machine with a maximum hoop size of 200 × 300 mm, bought in March 2026 for £1,650. Repairs and maintenance cost £3,585. The largest single item was a new laser tube, fitted in February 2026 at a cost of £1,180 after the old tube had logged about 2,300 firing hours. Blades, belts, filters and small tools made up the remaining £2,405. The laser cutter was booked for 87 per cent of the hours in which it could be booked, compared with 71 per cent in 2024–25. Firing time is charged at £4 an hour, rounded up to the nearest 15 minutes. Laser firing time brought in £3,860 of the £6,420 we received for laser time and materials; the remaining £2,560 came from filament, resin and timber offcuts sold to members at cost. Junior Saturdays for children aged 8 to 13 ran on the first and third Saturday of each month from 10:00 to 12:00. We held 22 sessions with 196 child attendances, an average of 8.9 children per session against a cap of 12. We also ran 31 paid courses, ranging from building a simple stool to an introduction to microcontrollers. Courses are open to non-members, and 248 people took part. Courses and Junior Saturdays together brought in £4,950. 4. Safety Members recorded 17 incidents in the incident book in 2025–26, down from 23 in 2024–25. Nobody was admitted to hospital. All but one incident were dealt with by first aid on site; the exception was a member who cut a finger on a chisel in March 2026 and needed three stitches at a walk-in clinic. Type of incident 2024–25 2025–26 Cuts and grazes 15 12 Burns from soldering irons 4 2
and glue guns Laser flare-ups 0 1 Other (strains, dust in the eye) 4 2 Total 23 17 On 12 August 2025 a sheet of 3 mm plywood caught fire inside the laser cutter while the operator was in the kitchen fetching a drink. Another member saw flames through the lid and put the fire out with the CO2 extinguisher kept beside the machine. Nobody was hurt, but the honeycomb bed and one lens had to be replaced, and the laser was out of use for 4 days. Because the operator had left the room while the laser was firing, the operator's laser induction was suspended for 30 days, as the handbook requires for a first breach of a safety rule. As a result of the incident, the committee made two changes. The laser room door now carries a sign stating that the laser must be paused before anyone leaves the room, and this rule was written into version 4 of the member handbook, which took effect on 1 September 2026. The laser induction also now includes a practical exercise with the extinguisher. We kept the two-person rule for the table saw and the planer-thicknesser: these machines may only be used when at least one other adult member is in the building. Nine members hold a current first-aid certificate, and at least one of them was present at 81 per cent of staffed open sessions during the year. 5. Finances The figures below summarise the accounts for 2025–26, which were checked by our independent examiner, Laurence Pemberton-Day, on 2 October 2026. Item Amount 2025–26 (£) Membership fees 51,370 Joining fees 1,110 Laser time and materials 6,420 Courses and Junior Saturdays 4,950 Donations 2,160 Grant from the Wexcombe Community Trust 3,000 Total income 69,010 Rent of Unit 4 27,600 Electricity 8,140 Insurance 3,480 Equipment purchases 10,630 Repairs and maintenance 3,585 Consumables 6,890 Cleaning, bank charges and sundries 4,290 Total expenditure 64,615 Surplus for the year 4,395 Total income rose from £60,240 in 2024–25 to £69,010 in 2025–26, mainly because of the larger membership. Total expenditure rose from £58,910 to £64,615. Electricity rose from
£6,840 to £8,140 and insurance from £3,020 to £3,480. Membership and joining fees together came to £52,480, which is 76 per cent of total income. The grant of £3,000 from the Wexcombe Community Trust was given for the dust- extraction upgrade only, so it could not be spent on anything else. It covered most of the £4,100 that the new extractor and ducting cost. Our reserves rose from £18,545 on 31 March 2025 to £22,940 on 31 March 2026. On 9 January 2026 the committee ring-fenced £15,000 of the reserves as a move fund, which may only be spent on moving to and fitting out new premises. The remaining general reserve of £7,940 is above the committee's minimum, which is two months' rent at Unit 4, or £4,600. The rent of Unit 4 is £2,300 a month and is fixed until the lease ends on 30 September 2027. 6. Planning the move to Larchmere Works The committee concluded in December 2025 that Unit 4 cannot support the makerspace beyond the end of its lease. The main reasons are:  Space: at 186 square metres, Unit 4 has no room for more benches, and the woodshop waiting list stood at 46 members on 1 October 2026.  Power: the supply is single-phase, so the table saw and the planer-thicknesser cannot run at the same time without tripping the main breaker.  Neighbours: the flats above the yard are the reason fob access ends at 23:00 and noisy machines must stop at 22:00.  Demand: the laser was booked for 87 per cent of bookable hours, and there is no room for a second enclosed machine room. After viewing five units between January and May 2026, the committee recommends Unit 11 at Larchmere Works, about 900 metres from Copperfold Yard. Unit 11 is a ground-floor unit of 410 square metres with a three-phase supply, a separate 18 square metre room for dust extraction, a ceiling height of 4.2 metres and a 3-metre-wide roller door that will let us bring in full sheets of plywood. There are no homes within 150 metres. The rent is £3,900 a month on a ten-year lease, with a break clause after five years. The fit-out has been estimated at £38,500: Fit-out item Estimate (£) Three-phase distribution board, cabling and sockets 14,200 Dust-extraction ducting for the whole woodshop 9,800 Enclosed laser and resin room with its own extraction 6,700 Flooring and fire doors 4,300 Removal crew and moving heavy machines 3,500 Total 38,500
The plan is to pay for the fit-out from three sources: the £15,000 move fund, a members' move appeal with a target of £12,000, and grant applications to two charitable trusts totalling £11,500. The move appeal will open on 1 December 2026, but only if members approve the move. The two months' rent deposit of £7,800 is not part of the fit-out budget and will be paid from the 2026–27 operating budget. If the move is approved, the timetable is:  Lease for Unit 11 signed by Friday 15 January 2027, and the deposit paid in February 2027.  Keys handed over on Saturday 1 May 2027, followed by fit-out in May and June 2027.  Unit 4 closes to members after Friday 2 July 2027, and machines are moved over the weekends of 3–4 July and 10–11 July 2027.  Unit 11 opens to members on Saturday 24 July 2027.  Unit 4 is handed back on 31 July 2027. The landlord of Unit 4 has agreed that we may hand the unit back on 31 July 2027 instead of 30 September 2027, provided we give eight weeks' written notice, which means notice by 5 June 2027. This saves two months' rent, or £4,600, but we will still pay rent on both units for May, June and July 2027, which costs £6,900 at Unit 4. Because the rent at Unit 11 is £1,600 a month higher than at Unit 4, the committee also proposes that from 1 August 2027 the Full fee rises from £30 to £34, the Concession fee from £18 to £20 and the Associate fee from £12 to £14, while the Youth fee stays at £8. The fee change will only take effect if the move is approved. The move needs a two-thirds majority of the votes cast, while the fee change needs a simple majority, so the two are voted on separately. 7. Volunteers and the year ahead The makerspace has no paid staff. In 2025–26, 38 active volunteers logged 2,940 hours running open sessions, inducting members, repairing machines, cleaning and keeping the accounts. Twenty-one of them are approved inductors, and nine hold a first-aid certificate. The committee has seven members, and three seats are up for election in November 2026: the chair and two ordinary seats. Nominations closed on 14 November 2026 with four candidates for the three seats. Sunniva Okafor, who has led the search for new premises, is the only candidate for chair. Tobias Wrenfield continues as treasurer until 2027. Special thanks go to Priya Okonkwo-Bell, our safety officer, and to the area leads: Ines Calloway in the woodshop, Joss Tannery on the laser, Ruth Abernethy-Quint in 3D printing, Kwame Lindqvist at the electronics bench and Hettie Galbraith in the textile corner.

View file

@ -0,0 +1,94 @@
#### Equipment register
A: ID | B: Item | C: Area | D: Acquired (year) | E: Purchase cost (£) | F: Rated power (W) | G: Induction needed | H: Status | I: Responsible | J: Notes
A: WS-01 | B: Table saw, 254 mm blade | C: Woodshop | D: 2018 | E: 1890 | F: 2000 | G: Table saw | H: In service | I: Ines Calloway | J: Two-person rule; never run at the same time as WS-03
A: WS-02 | B: Bandsaw, 350 mm throat | C: Woodshop | D: 2018 | E: 920 | F: 750 | G: Woodshop basic | H: In service | I: Ines Calloway | J: Youth members only under direct supervision of a woodshop inductor
A: WS-03 | B: Planer-thicknesser, 310 mm | C: Woodshop | D: 2025 | E: 2950 | F: 2200 | G: Planer-thicknesser and router table | H: In service | I: Ines Calloway | J: Bought October 2025 to replace WS-09; two-person rule
A: WS-04 | B: Router table | C: Woodshop | D: 2020 | E: 640 | F: 2100 | G: Planer-thicknesser and router table | H: In service | I: Ines Calloway | J: Fence rebuilt June 2026
A: WS-05 | B: Pillar drill | C: Woodshop | D: 2017 | E: 380 | F: 550 | G: Woodshop basic | H: In service | I: Ines Calloway | J: Youth members only under direct supervision of a woodshop inductor
A: WS-06 | B: Mitre saw, 216 mm | C: Woodshop | D: 2021 | E: 410 | F: 1500 | G: Woodshop basic | H: In service | I: Ines Calloway | J: Not for Youth members
A: WS-07 | B: Belt and disc sander | C: Woodshop | D: 2019 | E: 290 | F: 600 | G: Woodshop basic | H: Out of service | I: Ines Calloway | J: Belt tracking fault reported 3 October 2026
A: WS-08 | B: Dust extractor, two-bag, with ducting | C: Woodshop | D: 2025 | E: 4100 | F: 2200 | G: Woodshop basic | H: In service | I: Ines Calloway | J: Installed August 2025; £3,000 of the cost covered by the Wexcombe Community Trust grant
A: WS-09 | B: Planer-thicknesser, 260 mm | C: Woodshop | D: 2017 | E: 0 | F: 1500 | G: None | H: Retired | I: Ines Calloway | J: Built 2011 and donated 2017; motor failed September 2025; retired October 2025
A: LC-01 | B: Laser cutter, 60 W CO2, bed 900 x 600 mm | C: Laser room | D: 2019 | E: 6800 | F: 1200 | G: Laser cutter | H: In service | I: Joss Tannery | J: Tube replaced February 2026 for £1,180; bed and one lens replaced after the fire on 12 August 2025
A: LC-02 | B: Laser fume extractor | C: Laser room | D: 2019 | E: 1150 | F: 900 | G: Laser cutter | H: In service | I: Joss Tannery | J: Filters changed every 300 firing hours
A: LC-03 | B: CO2 fire extinguisher, 2 kg | C: Laser room | D: 2019 | E: 65 | F: 0 | G: None | H: In service | I: Priya Okonkwo-Bell | J: Inspected 12 September 2026; next inspection due September 2027
A: 3D-01 | B: FDM printer, bed 250 x 250 mm | C: 3D printing | D: 2020 | E: 450 | F: 350 | G: FDM 3D printing | H: In service | I: Ruth Abernethy-Quint | J: On the steel fire shelf; overnight prints allowed
A: 3D-02 | B: FDM printer, bed 250 x 250 mm | C: 3D printing | D: 2020 | E: 450 | F: 350 | G: FDM 3D printing | H: In service | I: Ruth Abernethy-Quint | J: On the steel fire shelf; overnight prints allowed
A: 3D-03 | B: FDM printer, bed 250 x 250 mm | C: 3D printing | D: 2021 | E: 470 | F: 350 | G: FDM 3D printing | H: Out of service | I: Ruth Abernethy-Quint | J: Extruder fault; replacement part ordered 21 October 2026
A: 3D-04 | B: FDM printer, bed 250 x 250 mm | C: 3D printing | D: 2022 | E: 490 | F: 350 | G: FDM 3D printing | H: In service | I: Ruth Abernethy-Quint | J: Nozzle replaced July 2026
A: 3D-05 | B: FDM printer, bed 300 x 300 mm | C: 3D printing | D: 2025 | E: 620 | F: 400 | G: FDM 3D printing | H: In service | I: Ruth Abernethy-Quint | J: Bought November 2025
A: 3D-06 | B: FDM printer, bed 300 x 300 mm | C: 3D printing | D: 2025 | E: 620 | F: 400 | G: FDM 3D printing | H: In service | I: Ruth Abernethy-Quint | J: Bought November 2025
A: 3D-07 | B: Resin printer | C: Resin room | D: 2023 | E: 540 | F: 120 | G: Resin printing | H: In service | I: Ruth Abernethy-Quint | J: Must never run when nobody is in the building
A: 3D-08 | B: Wash-and-cure station | C: Resin room | D: 2025 | E: 310 | F: 60 | G: Resin printing | H: In service | I: Ruth Abernethy-Quint | J: Bought June 2025
A: ID | B: Item | C: Area | D: Acquired (year) | E: Purchase cost (£) | F: Rated power (W) | G: Induction needed | H: Status | I: Responsible | J: Notes
A: EL-01 | B: Soldering stations (4) | C: Electronics bench | D: 2018 | E: 480 | F: 320 | G: Electronics bench | H: In service | I: Kwame Lindqvist | J: Four stations of 80 W each; lead-free solder only
A: EL-02 | B: Bench power supplies, 0-30 V (2) | C: Electronics bench | D: 2026 | E: 380 | F: 300 | G: Electronics bench | H: In service | I: Kwame Lindqvist | J: Bought January 2026
A: EL-03 | B: Oscilloscope, 100 MHz, 2-channel | C: Electronics bench | D: 2020 | E: 360 | F: 40 | G: Electronics bench | H: In service | I: Kwame Lindqvist | J: Probes replaced May 2026
A: EL-04 | B: Solder fume extractor | C: Electronics bench | D: 2018 | E: 140 | F: 45 | G: Electronics bench | H: In service | I: Kwame Lindqvist | J: Must run while soldering
A: TX-01 | B: Sewing machines (3) | C: Textile corner | D: 2017 | E: 600 | F: 210 | G: None for members aged 18 or over | H: In service | I: Hettie Galbraith | J: Three machines of 70 W each; speed limiters fitted for Junior Saturdays
A: TX-02 | B: Overlocker, 4-thread | C: Textile corner | D: 2021 | E: 430 | F: 120 | G: Overlocker and embroidery machine | H: In service | I: Hettie Galbraith | J: Youth members may use it after induction
A: TX-03 | B: Embroidery machine, max hoop 200 x 300 mm | C: Textile corner | D: 2026 | E: 1650 | F: 90 | G: Overlocker and embroidery machine | H: In service | I: Hettie Galbraith | J: Bought March 2026; bookable for up to 3 hours at a time
A: TX-04 | B: Steam iron and board | C: Textile corner | D: 2022 | E: 85 | F: 2400 | G: None | H: In service | I: Hettie Galbraith | J: Switch off and unplug when leaving the corner
#### Induction log Sep-Oct 2026
A: Date | B: Member no. | C: Tier | D: Induction | E: Duration (min) | F: Inductor | G: Fee charged (£) | H: Result | I: Lapses if unused (months) | J: Notes
A: 2026-09-01 | B: M-0412 | C: Full | D: Woodshop basic | E: 180 | F: Ines Calloway | G: 0 | H: Passed | I: 12
A: 2026-09-02 | B: M-0398 | C: Concession | D: FDM 3D printing | E: 60 | F: Ruth Abernethy-Quint | G: 0 | H: Passed | I: 12 | J: Wednesday afternoon session
A: 2026-09-03 | B: M-0377 | C: Full | D: Laser cutter | E: 120 | F: Joss Tannery | G: 0 | H: Passed - supervised job pending | I: 6 | J: Supervised job booked for 10 September 2026
A: 2026-09-05 | B: M-0421 | C: Associate | D: Electronics bench | E: 60 | F: Kwame Lindqvist | G: 10 | H: Passed | I: 12 | J: Associate induction fee paid
A: 2026-09-05 | B: M-0405 | C: Youth | D: Woodshop basic (youth) | E: 120 | F: Theo Vantongeren | G: 0 | H: Passed | I: 12 | J: Bandsaw, pillar drill and hand tools only; parent M-0287 present
A: 2026-09-08 | B: M-0356 | C: Full | D: Table saw | E: 90 | F: Ines Calloway | G: 0 | H: Passed | I: 6 | J: Woodshop basic completed March 2026
A: 2026-09-10 | B: M-0377 | C: Full | D: Laser supervised job | E: 40 | F: Amara Leclercq-Hood | G: 0 | H: Passed | I: 6 | J: Laser induction now complete
A: 2026-09-10 | B: M-0390 | C: Concession | D: Overlocker and embroidery machine | E: 45 | F: Hettie Galbraith | G: 0 | H: Passed | I: 12
A: 2026-09-12 | B: M-0412 | C: Full | D: Table saw | E: 90 | F: Theo Vantongeren | G: 0 | H: Not passed - repeat booked | I: 6 | J: Hands too close to the blade on rip cuts; repeat on 26 September 2026
A: 2026-09-15 | B: M-0233 | C: Full | D: Laser refresher | E: 30 | F: Joss Tannery | G: 0 | H: Passed | I: 6 | J: Last laser use March 2026, so the induction had lapsed after 6 months
A: 2026-09-16 | B: M-0419 | C: Associate | D: Woodshop basic | E: 180 | F: Ines Calloway | G: 10 | H: Passed | I: 12 | J: Associate induction fee paid
A: 2026-09-17 | B: M-0388 | C: Full | D: Resin printing | E: 90 | F: Ruth Abernethy-Quint | G: 0 | H: Passed | I: 12 | J: Nitrile gloves issued
A: 2026-09-19 | B: M-0401 | C: Concession | D: FDM 3D printing | E: 60 | F: Ruth Abernethy-Quint | G: 0 | H: Passed | I: 12
A: 2026-09-22 | B: M-0356 | C: Full | D: Planer-thicknesser and router table | E: 60 | F: Ines Calloway | G: 0 | H: Passed | I: 12 | J: Trained on WS-03
A: 2026-09-24 | B: M-0415 | C: Full | D: Electronics bench | E: 60 | F: Mirela Banks | G: 0 | H: Passed | I: 12
A: 2026-09-26 | B: M-0412 | C: Full | D: Table saw | E: 90 | F: Ines Calloway | G: 0 | H: Passed | I: 6 | J: Repeat of 12 September 2026
A: 2026-09-29 | B: M-0402 | C: Concession | D: Laser cutter | E: 120 | F: Amara Leclercq-Hood | G: 0 | H: Passed - supervised job pending | I: 6 | J: Included the extinguisher exercise
A: 2026-09-30 | B: M-0422 | C: Associate | D: FDM 3D printing | E: 60 | F: Ruth Abernethy-Quint | G: 10 | H: Passed | I: 12 | J: Associate induction fee paid
A: 2026-10-01 | B: M-0198 | C: Full | D: Woodshop refresher | E: 30 | F: Theo Vantongeren | G: 0 | H: Passed | I: 12 | J: Woodshop basic had lapsed in August 2026
A: 2026-10-03 | B: M-0406 | C: Youth | D: Electronics bench | E: 60 | F: Kwame Lindqvist | G: 0 | H: Passed | I: 12 | J: No mains work; parent M-0310 present
A: 2026-10-06 | B: M-0418 | C: Full | D: Woodshop basic | E: 180 | F: Ines Calloway | G: 0 | H: Passed | I: 12 | J: On the waiting list since 14 July 2026
A: 2026-10-08 | B: M-0402 | C: Concession | D: Laser supervised job | E: 35 | F: Joss Tannery | G: 0 | H: Passed | I: 6 | J: Laser induction now complete
A: 2026-10-10 | B: M-0393 | C: Full | D: Resin printing | E: 90 | F: Ruth Abernethy-Quint | G: 0 | H: Not passed - repeat booked | I: 12 | J: Removed a print without gloves; repeat on 24 October 2026
A: 2026-10-14 | B: M-0424 | C: Concession | D: Overlocker and embroidery machine | E: 45 | F: Hettie Galbraith | G: 0 | H: Passed | I: 12 | J: Wednesday afternoon session
A: 2026-10-15 | B: M-0420 | C: Full | D: FDM 3D printing | E: 60 | F: Ruth Abernethy-Quint | G: 0 | H: Passed | I: 12 | J: Trained on 3D-05
A: Date | B: Member no. | C: Tier | D: Induction | E: Duration (min) | F: Inductor | G: Fee charged (£) | H: Result | I: Lapses if unused (months) | J: Notes
A: 2026-10-17 | B: M-0399 | C: Full | D: Laser cutter | E: 120 | F: Joss Tannery | G: 0 | H: Passed - supervised job pending | I: 6 | J: Supervised job booked for 29 October 2026
A: 2026-10-20 | B: M-0418 | C: Full | D: Table saw | E: 90 | F: Theo Vantongeren | G: 0 | H: Passed | I: 6
A: 2026-10-24 | B: M-0393 | C: Full | D: Resin printing | E: 90 | F: Ruth Abernethy-Quint | G: 0 | H: Passed | I: 12 | J: Repeat of 10 October 2026
A: 2026-10-27 | B: M-0425 | C: Associate | D: Overlocker and embroidery machine | E: 45 | F: Hettie Galbraith | G: 10 | H: Passed | I: 12 | J: Associate induction fee paid
A: 2026-10-31 | B: M-0409 | C: Youth | D: FDM 3D printing | E: 60 | F: Ruth Abernethy-Quint | G: 0 | H: Passed | I: 12 | J: Parent M-0344 present
#### Budget 2026-27
A: Line | B: Type | C: Budget 2026-27 (£) | D: Actual 2025-26 (£) | E: Responsible | F: Notes
A: Membership fees | B: Income | C: 59600 | D: 51370 | E: Callum Ferrand | F: Full £30 and Concession £18 from 1 September 2026
A: Joining fees | B: Income | C: 1200 | D: 1110 | E: Callum Ferrand | F: £15 per new member; 74 members joined in 2025-26
A: Laser firing time | B: Income | C: 4300 | D: 3860 | E: Joss Tannery | F: £4 per hour, rounded up to the nearest 15 minutes
A: Materials sold at cost | B: Income | C: 2600 | D: 2560 | E: Tobias Wrenfield | F: Filament 5p per gram, resin 12p per ml, timber offcuts
A: Courses | B: Income | C: 4500 | D: 4166 | E: Hettie Galbraith | F: Courses are open to non-members
A: Junior Saturdays | B: Income | C: 900 | D: 784 | E: Hettie Galbraith | F: £4 per child; at most 12 children per session
A: Donations | B: Income | C: 2000 | D: 2160 | E: Tobias Wrenfield
A: Grants | B: Income | C: 0 | D: 3000 | E: Tobias Wrenfield | F: 2025-26 grant from the Wexcombe Community Trust was for dust extraction only
A: Move appeal (ring-fenced) | B: Income | C: 12000 | D: 0 | E: Sunniva Okafor | F: Opens 1 December 2026, only if members approve the move
A: Total income | B: Income | C: 87100 | D: 69010 | E: Tobias Wrenfield
A: Rent, Unit 4 | B: Expenditure | C: 27600 | D: 27600 | E: Tobias Wrenfield | F: £2,300 a month, fixed until the lease ends on 30 September 2027
A: Electricity | B: Expenditure | C: 8900 | D: 8140 | E: Tobias Wrenfield | F: Single-phase supply at Unit 4
A: Insurance | B: Expenditure | C: 3650 | D: 3480 | E: Tobias Wrenfield | F: Renewed each September
A: Equipment purchases | B: Expenditure | C: 6500 | D: 10630 | E: Ines Calloway | F: No large purchases planned before the move
A: Repairs and maintenance | B: Expenditure | C: 3200 | D: 3585 | E: Ines Calloway | F: 2025-26 included the new laser tube at £1,180
A: Consumables | B: Expenditure | C: 7200 | D: 6890 | E: Ruth Abernethy-Quint | F: Filament, resin, solder, sandpaper, blades
A: Cleaning, bank charges and sundries | B: Expenditure | C: 4600 | D: 4290 | E: Tobias Wrenfield
A: Deposit for Unit 11 | B: Expenditure | C: 7800 | D: 0 | E: Sunniva Okafor | F: Two months' rent at £3,900; due February 2027; paid from the operating budget, not the move fund
A: Electrical survey and design, Unit 11 | B: Expenditure | C: 4500 | D: 0 | E: Sunniva Okafor | F: First part of the £14,200 three-phase work; paid from the move fund
A: Total expenditure | B: Expenditure | C: 73950 | D: 64615 | E: Tobias Wrenfield
A: Surplus | B: Result | C: 13150 | D: 4395 | E: Tobias Wrenfield | F: The 2026-27 surplus includes the £12,000 ring-fenced move appeal

View file

@ -0,0 +1,259 @@
# Copperfold Makerspace Member Handbook and Safety Rules
# Copperfold Makerspace Member Handbook and Safety Rules
Version 4, effective from 1 September 2026. Approved by the committee on 18 August 2026.
## 1. About this handbook
This handbook applies to every member, guest and volunteer at Unit 4, Copperfold Yard. Version 4 replaces version 3 of March 2025. The main changes are the new fees for Full and Concession members, the rule that the laser must be paused before you leave the laser room, and the conditions for running FDM printers overnight. If members approve the move to Larchmere Works, a version 5 will be issued before the new unit opens.
Every member must read this handbook before their first induction and sign the declaration at the back. Questions about the rules go to the safety officer, Priya Okonkwo-Bell, or to the area lead concerned.
## 2. Membership tiers
Tier
Monthly fee from 1 September 2026
Who can join
Access
Full
£30
Anyone aged 18 or over
Key fob 07:00–23:00 every day; all areas after induction
Concession
£18
Students in full-time education, people aged 65 or over, people on a low income (self-declared)
Same as Full
Associate
£12
Anyone aged 18 or over
Staffed open sessions only; no laser cutter, no resin printer, no storage box
Youth
£8
Ages 14–17 with a parent or guardian who is a Full or Concession member
Only while the parent or guardian is in the building (see section 7)
A one-off joining fee of £15 applies to every tier except Youth. Fees are paid monthly in advance on the 1st of each month. A member who is more than 30 days behind with fees has their fob switched off until the arrears are paid.
You may pause your membership for up to 3 months in any 12-month period, for example while travelling or during illness. No fee is due during a pause, but you must empty your storage box unless you pay £3 a month to keep it.
## 3. Opening hours and access
Staffed open sessions: Tuesday and Thursday 18:00–21:30, Wednesday 13:00–16:00 and Saturday 10:00–16:00.
Fob access for Full and Concession members: 07:00–23:00 every day. Nobody may be in the building between 23:00 and 07:00.
Junior Saturdays: the first and third Saturday of each month, 10:00–12:00, for children aged 8–13.
Fob access is limited to 07:00–23:00 because of our agreement with the residents of the flats above the yard. For the same reason, the noisy machines (the table saw, planer-thicknesser, router table, mitre saw and dust extractor) must be switched off by 22:00, even though members may stay until 23:00.
Members may bring up to two guests at a time, but only during staffed open sessions. Guests must sign the visitors' book and must be aged 16 or over, unless they are attending a Junior Saturday. Guests must not use any machine that needs an induction.
A member who is alone in the building may use the 3D printers, the textile corner and the electronics bench, but must not use any woodshop machine or the laser cutter.
## 4. Inductions
You must complete an induction before using any machine marked with a yellow 'induction required' tag. Inductions are free for Full, Concession and Youth members. Associate members pay £10 per induction and cannot book the laser cutter or resin printing inductions.
Induction
Length
Covers
Lapses if unused for
Woodshop basic
3 hours
Bandsaw, pillar drill, mitre saw, belt and disc sander, dust extractor, hand tools
12 months
Table saw
1.5 hours
Table saw
6 months
Planer-thicknesser and router table
1 hour
Planer-thicknesser, router table
12 months
Laser cutter
2 hours plus one supervised job
Laser cutter and its fume extractor
6 months
FDM 3D printing
1 hour
Printers 3D-01 to 3D-06
12 months
Resin printing
1.5 hours
Resin printer and wash-and-cure station
12 months
Electronics bench
1 hour
Soldering stations, bench power supplies, oscilloscope
12 months
Overlocker and embroidery machine
45 minutes
Overlocker, embroidery machine
12 months
Woodshop basic must be completed before you can book the table saw induction or the planer-thicknesser and router table induction. A lapsed induction can be renewed with a 30-minute refresher, but only if it lapsed less than 12 months ago; after that, the full induction must be repeated. The sewing machines need no induction for members aged 18 or over.
Inductors are volunteers approved by the area lead. To induct on woodshop machines, an inductor must have been inducted on those machines for at least two years and must be signed off by the woodshop lead.
## 5. General safety rules
Wear safety glasses in the woodshop and the laser room at all times, even when you are not operating a machine.
Tie back long hair and remove loose jewellery and scarves before using any rotating machine.
Do not wear gloves when using the table saw, the bandsaw or the pillar drill.
Wear closed-toe shoes everywhere in the building.
Do not use any machine after drinking alcohol. Alcohol is not allowed in the workshop areas; the kitchen during an approved social event is the only exception.
Food and drink may be consumed only in the kitchen.
Leave every machine clean and switched off at its isolator.
Report any damage or fault at once by fixing a red 'do not use' tag to the machine and writing in the fault book.
## 6. Area rules: woodshop
The dust extractor must run whenever a woodshop machine is cutting.
The table saw and the planer-thicknesser may only be used when at least one other adult member is in the building (the two-person rule).
Because the supply in Unit 4 is single-phase, the table saw and the planer-thicknesser must never run at the same time; doing so trips the main breaker.
Wear hearing protection when using the table saw, planer-thicknesser, router table or mitre saw.
Timber in the rack must be no longer than 2.4 metres and must be labelled with your name and the date. Unlabelled timber becomes shared offcuts after 14 days.
## 7. Area rules: laser cutter
Never leave the laser room while the laser is firing. If you need to leave, even briefly, pause the job first. This rule was added in version 4 after a fire in the machine on 12 August 2025.
The fume extractor must be switched on before the laser starts firing.
Permitted materials: plywood and MDF up to 6 mm, acrylic up to 8 mm, card, paper, vegetable-tanned leather and cotton fabric.
Prohibited materials: PVC, vinyl, polycarbonate, ABS, fibreglass, anything containing chlorine, and any material you cannot identify.
Bookings are limited to 2 hours per booking and 4 hours per member per week, and may be made up to 7 days ahead.
Firing time is charged at £4 an hour, rounded up to the nearest 15 minutes.
## 8. Area rules: 3D printing and the resin room
The FDM area and the resin room have different rules, because uncured resin is a skin irritant and gives off fumes.
Prints expected to last longer than 8 hours must be booked in the print calendar.
An FDM printer may keep running after 23:00 only if the print was started before 21:00, the person who started it checked the first layer, and the printer stands on the steel fire shelf under the smoke detector.
Filament from the shared shelf costs 5p per gram, paid by the weight of the finished print including supports.
The resin room is for Full and Concession members aged 18 or over who have completed the resin printing induction.
Nitrile gloves and safety glasses must be worn in the resin room at all times, and the extraction fan must be on.
The resin printer must never run when nobody is in the building.
Resin from the shelf costs 12p per ml. Used cleaning alcohol goes in the labelled waste container and never down the sink.
## 9. Area rules: electronics bench and textile corner
Use lead-free solder only, and run the solder fume extractor while soldering.
Work on mains voltage is not allowed unless the electronics lead, Kwame Lindqvist, or his deputy, Mirela Banks, is present.
Lithium polymer batteries may only be charged inside a fire-proof bag on the steel tray and must never be left charging unattended.
The overlocker and the embroidery machine need an induction. The embroidery machine may be booked for up to 3 hours at a time.
Switch off and unplug the iron whenever you leave the textile corner.
## 10. Young people
Members must be 18 or over, except Youth members aged 14–17. A Youth member's parent or guardian must be in the building throughout the visit. Youth members take a shortened woodshop basic induction of 2 hours that covers only the bandsaw, the pillar drill and hand tools.
Youth members may use the FDM printers, the electronics bench (but never mains voltage), the sewing machines and, after induction, the overlocker. They may use the bandsaw and the pillar drill only under the direct supervision of a woodshop inductor. Youth members must not use the table saw, planer-thicknesser, router table, mitre saw, laser cutter or resin printer.
Junior Saturdays are for children aged 8–13 and cost £4 per child per session. Each session takes at most 12 children, with at least one adult volunteer for every 4 children, and a parent or carer must stay in the building. The textile corner is the only area where children at a Junior Saturday may use powered machines, and then only the sewing machines fitted with speed limiters.
## 11. Accidents and incidents
Enter every incident, including near-misses, in the incident book within 24 hours.
If an injury needs more than a plaster, tell the safety officer the same day.
First-aid kits are kept in the woodshop, the laser room and the kitchen. The eye-wash station is beside the woodshop door.
CO2 extinguishers are kept beside the laser cutter and the electronics bench, and a fire blanket hangs in the kitchen.
In a fire, leave by the nearest exit and gather at the far end of the yard by the green gate.
The names of the members who hold a current first-aid certificate are on the noticeboard by the entrance.
## 12. Storage and leaving the space
Each Full and Concession member gets one 54-litre storage box. A second box costs £3 a month. Associate members get no box, and Youth members share their parent's box.
Projects left on a bench for more than 72 hours get an orange tag. If they are not collected within a further 7 days, they go to the clear-out shelf, and after 14 days on the clear-out shelf they may be given away.
The last member to leave must check that every machine is off at its isolator, the laser and resin rooms are locked, and the roller door is shut.
## 13. Breaches and appeals
A first breach of a safety rule leads to a 30-day suspension of the induction for the machine concerned. After a second serious breach within 12 months, the committee may end the membership, and fees for the current month are not refunded. A member may appeal in writing to the chair within 14 days of the decision. The appeal is decided by three committee members who were not involved in the original decision.

View file

@ -0,0 +1,86 @@
#### Dyrkingsplan 2026
A: Skifte | B: Areal skifte (m²) | C: Kultur | D: Areal kultur (m²) | E: Såing/utplanting (uke) | F: Første høst (uke) | G: Forventet avling (kg) | H: Ansvarlig | I: Merknad
A: A | B: 2400 | C: Gulrøtter | D: 1200 | E: 17 | F: 27 | G: 2000 | H: Ingrid Solhaug-Berntsen | I: Tre sådatoer
A: A | B: 2400 | C: Pastinakk | D: 400 | E: 17 | F: 36 | G: 450 | H: Ingrid Solhaug-Berntsen
A: A | B: 2400 | C: Rødbeter | D: 600 | E: 19 | F: 28 | G: 800 | H: Ingrid Solhaug-Berntsen
A: B | B: 2200 | C: Salat | D: 700 | E: 16 | F: 23 | G: 1100 | H: Mira Holten | I: Snegleskjerm: 1 m bar stripe rundt bedene
A: B | B: 2200 | C: Spinat | D: 300 | E: 16 | F: 23 | G: 300 | H: Mira Holten
A: B | B: 2200 | C: Reddik | D: 200 | E: 17 | F: 23 | G: 150 | H: Mira Holten | I: Sås hver andre uke
A: B | B: 2200 | C: Erter | D: 600 | E: 18 | F: 28 | G: 350 | H: Mira Holten
A: C | B: 2300 | C: Hodekål | D: 800 | E: 20 | F: 30 | G: 1000 | H: Ingrid Solhaug-Berntsen | I: Fiberduk mot kålflue til uke 26
A: C | B: 2300 | C: Rødkål | D: 400 | E: 20 | F: 34 | G: 450 | H: Ingrid Solhaug-Berntsen
A: C | B: 2300 | C: Grønnkål | D: 500 | E: 21 | F: 33 | G: 550 | H: Ingrid Solhaug-Berntsen
A: C | B: 2300 | C: Brokkoli | D: 400 | E: 21 | F: 30 | G: 300 | H: Ingrid Solhaug-Berntsen | I: Ny kultur 2026
A: D | B: 2200 | C: Løk | D: 900 | E: 18 | F: 32 | G: 950 | H: Mira Holten | I: Poteter flyttet ut av skiftet
A: D | B: 2200 | C: Purre | D: 700 | E: 21 | F: 35 | G: 650 | H: Mira Holten
A: D | B: 2200 | C: Hvitløk | D: 300 | E: 42 | F: 29 | G: 120 | H: Mira Holten | I: Satt høsten 2025
A: E | B: 2300 | C: Squash | D: 900 | E: 22 | F: 28 | G: 1100 | H: Ingrid Solhaug-Berntsen
A: E | B: 2300 | C: Gresskar | D: 800 | E: 22 | F: 37 | G: 900 | H: Ingrid Solhaug-Berntsen
A: E | B: 2300 | C: Bønner | D: 500 | E: 23 | F: 30 | G: 520 | H: Ingrid Solhaug-Berntsen
A: F | B: 2200 | C: Jordbær | D: 1000 | F: 25 | G: 450 | H: Mira Holten | I: Flerårig; fiberduk ved frostvarsel
A: F | B: 2200 | C: Blomster | D: 600 | E: 20 | F: 27 | G: 0 | H: Mira Holten | I: Ca. 2 100 buketter
A: F | B: 2200 | C: Urter | D: 400 | E: 19 | F: 24 | G: 250 | H: Mira Holten | I: Bigården ligger bak skiftet
A: G | B: 1400 | C: Grønngjødsling (kløver) | D: 1400 | E: 18 | G: 0 | H: Ingrid Solhaug-Berntsen | I: Hvileår, ingen høsting
A: H | B: 3000 | C: Poteter | D: 2800 | E: 19 | F: 30 | G: 2900 | H: Ingrid Solhaug-Berntsen | I: Nytt skifte 2026, leid av Arne Dyrstad
A: Drivhus | B: 180 | C: Tomat | D: 110 | E: 15 | F: 26 | G: 1500 | H: Mira Holten
A: Drivhus | B: 180 | C: Agurk | D: 50 | E: 17 | F: 26 | G: 750 | H: Mira Holten
A: Drivhus | B: 180 | C: Paprika | D: 20 | E: 15 | F: 30 | G: 260 | H: Mira Holten
A: Tunnelhus | B: 120 | C: Tomat | D: 60 | E: 21 | F: 29 | G: 650 | H: Mira Holten | I: Nytt tunnelhus, i bruk fra uke 21
A: Tunnelhus | B: 120 | C: Chili | D: 20 | E: 21 | F: 31 | G: 60 | H: Mira Holten
A: Tunnelhus | B: 120 | C: Sukkermelon | D: 40 | E: 21 | F: 33 | G: 90 | H: Mira Holten | I: Forsøk første år
#### Høstelogg 2025
A: Uke | B: Andeler hentet (av 131) | C: Høstet friland (kg) | D: Høstet drivhus (kg) | E: Egg til eggandeler (stk) | F: Nedbør (mm) | G: Merknad
A: 24 | B: 104 | C: 180 | D: 0 | E: 300 | F: 12 | G: Første henting tirsdag 10. juni; salat, reddik og spinat
A: 25 | B: 110 | C: 260 | D: 0 | E: 300 | F: 8
A: 26 | B: 115 | C: 340 | D: 20 | E: 300 | F: 15 | G: Første tomater fra drivhuset
A: 27 | B: 118 | C: 420 | D: 45 | E: 300 | F: 22
A: 28 | B: 112 | C: 520 | D: 80 | E: 300 | F: 6
A: 29 | B: 98 | C: 600 | D: 120 | E: 300 | F: 3 | G: Fellesferie, lavt oppmøte
A: 30 | B: 96 | C: 660 | D: 160 | E: 300 | F: 18 | G: Laveste oppmøte i sesongen
A: 31 | B: 101 | C: 720 | D: 190 | E: 300 | F: 25
A: 32 | B: 114 | C: 760 | D: 210 | E: 300 | F: 31 | G: Tørråte oppdaget i skifte D onsdag 6. august
A: 33 | B: 117 | C: 780 | D: 230 | E: 300 | F: 44 | G: Potetriset slått ned i skifte D 12. august
A: 34 | B: 119 | C: 740 | D: 240 | E: 300 | F: 38
A: 35 | B: 118 | C: 800 | D: 235 | E: 300 | F: 29 | G: Brunsnegl i salaten i skifte B
A: 36 | B: 121 | C: 860 | D: 220 | E: 300 | F: 20 | G: Høyeste oppmøte i sesongen
A: 37 | B: 120 | C: 900 | D: 200 | E: 300 | F: 14 | G: Honning delt ut, ett glass per andel
A: 38 | B: 116 | C: 880 | D: 170 | E: 300 | F: 9
A: 39 | B: 114 | C: 820 | D: 130 | E: 300 | F: 26 | G: Høstfest lørdag 27. september
A: 40 | B: 112 | C: 760 | D: 80 | E: 300 | F: 33
A: 41 | B: 109 | C: 640 | D: 15 | E: 300 | F: 19 | G: Rev tok 3 høner natt til 9. oktober
A: 42 | B: 107 | C: 210 | D: 5 | E: 300 | F: 22 | G: Siste henting fredag 17. oktober
#### Andelsøkonomi
A: Post | B: Type | C: Regnskap 2025 (kr) | D: Budsjett 2026 (kr) | E: Merknad
A: Helandeler | B: Inntekt | C: 401800 | D: 492800 | E: 98 × 4 100 kr i 2025, 112 × 4 400 kr i 2026
A: Halvandeler | B: Inntekt | C: 79200 | D: 93600 | E: 33 × 2 400 kr i 2025, 36 × 2 600 kr i 2026
A: Eggandeler | B: Inntekt | C: 18000 | D: 26000 | E: 30 × 600 kr i 2025, 40 × 650 kr i 2026
A: Honning solgt på høstfesten | B: Inntekt | C: 8320 | D: 9000 | E: 52 kg à 160 kr i 2025
A: Frikjøp av arbeidstimer | B: Inntekt | C: 33000 | D: 18000 | E: 132 timer à 250 kr i 2025; maks 4 timer per andel fra 2026
A: Høstfest | B: Inntekt | C: 6400 | D: 7000
A: Overført fra reservefondet | B: Inntekt | C: 0 | D: 26000 | E: Til tunnelhuset
A: Sum inntekter | B: Sum | C: 546720 | D: 672400
A: Lønn gartner og gartnerassistent | B: Utgift | C: 362000 | D: 418000 | E: 1,4 årsverk i 2025, 1,6 årsverk i 2026
A: Frø og planter | B: Utgift | C: 41500 | D: 44000
A: Gjødsel og kompost | B: Utgift | C: 18200 | D: 19500
A: Fôr til høner | B: Utgift | C: 14600 | D: 17800 | E: 28 høner i 2025, 34 høner i 2026
A: Birøkt, utstyr | B: Utgift | C: 9800 | D: 12600 | E: Fra 4 til 6 bikuber
A: Vanning og strøm | B: Utgift | C: 22300 | D: 24000
A: Vedlikehold drivhus | B: Utgift | C: 16900 | D: 9000 | E: Ny plastduk etter storm i februar 2025
A: Nytt tunnelhus (investering) | B: Utgift | C: 0 | D: 64000 | E: 120 m², 26 000 kr fra reservefondet
A: Forsikring | B: Utgift | C: 12400 | D: 13100
A: Leie av jord | B: Utgift | C: 24000 | D: 30000 | E: Skifte H koster 6 000 kr per år
A: Diverse | B: Utgift | C: 8700 | D: 9000
A: Sum utgifter | B: Sum | C: 530400 | D: 661000
A: Resultat | B: Sum | C: 16320 | D: 11400 | E: Overskudd 2025 satt av til reservefondet
#### Andeler og priser
A: Andelstype | B: Pris 2025 (kr) | C: Pris 2026 (kr) | D: Antall 2025 | E: Antall 2026 | F: Arbeidsplikt 2025 (timer) | G: Arbeidsplikt 2026 (timer) | H: Merknad
A: Helandel | B: 4100 | C: 4400 | D: 98 | E: 112 | F: 10 | G: 12 | H: Kan betales i to rater: 15. april og 15. juli
A: Halvandel | B: 2400 | C: 2600 | D: 33 | E: 36 | F: 6 | G: 8 | H: Betales i én rate innen 15. april
A: Eggandel | B: 600 | C: 650 | D: 30 | E: 40 | F: 0 | G: 0 | H: Krever hel- eller halvandel; frist 1. mai

View file

@ -0,0 +1,175 @@
## First Light: Introduction to the Beginners' Course, Spring 2026
## Welcome to First Light, spring 2026
This course runs on six Tuesday evenings from 3 February to 10 March 2026.
Each session runs from 19:30 to 21:30 in the warm room at Tallow Hill Observatory.
Your course leader is Callum Steadman.
This spring run has 16 places, and all 16 are taken.
## About the society
The Tallow Hill Astronomical Society was founded in 1987 and opened its observatory in 1994.
At the end of 2025 the society had 186 members, up from 171 a year earlier.
Members run public stargazing evenings, a telescope loan scheme and a schools programme.
In 2025, 14 of our 32 new members joined after taking this course.
## The observatory
The observatory stands 214 m above sea level, 3 km north of Wrexley Green.
The 4.2 m dome houses the 406 mm Pennick Telescope.
The Annexe has a roll-off roof and three telescope piers.
The warm room seats 20 and is the only building with white light, food and hot drinks.
## The six sessions
Session 1, 3 February: welcome, the society and how the night sky works.
Session 2, 10 February: finding your way with a planisphere and star charts.
Session 3, 17 February: binoculars and telescopes, with hands-on practice indoors.
Session 4, 24 February: the Moon and the planets.
Session 5, 3 March: star clusters, nebulae and galaxies.
Session 6, 10 March: a practical night at the telescopes and the certificates.
## Completing the course
You complete the course by attending at least five of the six sessions.
Everyone who completes receives a First Light certificate at the end of session 6.
In 2025, 24 of the 29 people who enrolled completed the course.
Completing the course also shortens the wait before you can borrow a telescope.
## If the weather is bad
Sessions 1 to 5 go ahead in any weather, because they are held indoors.
Session 6 needs a clear sky, because it is held at the telescopes.
If session 6 is clouded out on 10 March, it moves to Tuesday 17 March 2026.
The duty director decides at 16:00 on the day and tells you by 17:00.
## Age and accompanying adults
The minimum age for the course is 14.
Participants aged 14 or 15 must be accompanied by an adult at every session.
The accompanying adult attends free of charge but does not receive a certificate.
Participants aged 16 or over may attend on their own.
## Course fees
The course fee is £20 for members and £35 for non-members.
The non-member fee includes three months of free membership from the first session.
Course fees are the same as in 2025.
Red torches and planispheres are lent to you for the length of the course.
## Dark adaptation and red light
Your eyes need about 20 to 30 minutes in darkness to adapt fully.
Outside the warm room, only red light is allowed anywhere on the site.
A single glance at a white phone screen spoils the dark adaptation of everyone nearby.
Please return your red torch at the end of session 6.
## Safety on the hill
Nobody may be on the site alone after sunset: the two-person rule applies to everyone.
The footpath from the lower gate is about 400 m long and takes about ten minutes.
In frost or snow the duty director may close the footpath to guests.
Report any fall or injury to the session leader on the same evening.
## Inside the dome
The dome holds at most 8 people, including the operator.
Only qualified operators may move the Pennick Telescope; you may look but not touch the controls.
The dome is closed if the sustained wind exceeds 35 km/h or humidity rises above 90%.
The Annexe roof can stay open in stronger wind, up to a sustained 45 km/h.
## Choosing a first instrument
Binoculars of 7x50 or 10x50 are a good first instrument for most beginners.
In session 3 you can try a refractor, a reflector and a Maksutov side by side.
Larger Dobsonians of 150 mm and 200 mm show more but weigh 17.5 to 21 kg.
Small refractors of 70 mm to 80 mm weigh around 5 kg and set up in minutes.
## Borrowing a society telescope
Members can normally borrow a telescope after three months of membership.
If you complete First Light, you may borrow after just one month of membership.
Loans last 14 days if they start between 1 November and 28 February, and 28 days at other times.
The refundable deposit has been £40 since 1 January 2026; it was £30 before that.
## Heavier telescopes and younger borrowers
Telescopes weighing 15 kg or more need a 45-minute loan induction first.
Members aged 14 to 17 may borrow only telescopes under 10 kg, with an adult member co-signing.
Late returns cost £2 per day, up to a maximum of £30 per loan.
Only one society telescope may be on loan to a household at a time.
## Observing after the course
Public evenings are held on the first Friday of each month from September to April.
The next public evening is on Friday 6 February 2026, and bookings are capped at 40.
Members may book Annexe piers 2 and 3 for their own telescopes, at most twice a month.
In 2025 members logged 61 observing nights with 214 clear hours.
## Keep Tallow Dark
Our dark-sky campaign had collected 312 household pledges by the end of 2025.
The target is 400 pledges by 31 December 2026.
Sky readings at our six monitoring sites averaged 20.8 magnitudes per square arcsecond in 2025.
A higher reading means a darker sky; the 2024 average was 20.6.
## Before next Tuesday
Bring warm clothes, your red torch and a notebook to every session.
Session 2 on 10 February covers finding your way around the sky with a planisphere.
If you will miss a session, tell Callum Steadman beforehand so that the materials can be kept for you.
Remember that you may miss only one session and still complete the course.

View file

@ -0,0 +1,85 @@
#### Club fleet
A: Boat ID | B: Class | C: Sail no. | D: Year built | E: Length (m) | F: Hull weight (kg) | G: Engine (hp) | H: Condition | I: Last serviced | J: Hours afloat 2026 (h) | K: Notes
A: T1 | B: Tern 12 | C: 2101 | D: 2014 | E: 3.6 | F: 52 | G: 0 | H: Fair | I: 2026-03-14 | J: 96 | K: Mast step replaced in March 2026
A: T2 | B: Tern 12 | C: 2102 | D: 2014 | E: 3.6 | F: 52 | G: 0 | H: Fair | I: 2026-03-14 | J: 88 | K: Small gelcoat crack on transom; check monthly
A: T3 | B: Tern 12 | C: 2103 | D: 2016 | E: 3.6 | F: 52 | G: 0 | H: Good | I: 2026-03-15 | J: 104
A: T4 | B: Tern 12 | C: 2104 | D: 2016 | E: 3.6 | F: 52 | G: 0 | H: Good | I: 2026-03-15 | J: 99
A: T5 | B: Tern 12 | C: 2105 | D: 2018 | E: 3.6 | F: 52 | G: 0 | H: Good | I: 2026-03-15 | J: 112 | K: Most used junior boat in 2026
A: T6 | B: Tern 12 | C: 2106 | D: 2018 | E: 3.6 | F: 52 | G: 0 | H: Good | I: 2026-03-21 | J: 91
A: T7 | B: Tern 12 | C: 2107 | D: 2026 | E: 3.6 | F: 52 | G: 0 | H: New | I: 2026-05-09 | J: 64 | K: Bought May 2026 for £3,900 from Boat Replacement Fund
A: T8 | B: Tern 12 | C: 2108 | D: 2026 | E: 3.6 | F: 52 | G: 0 | H: New | I: 2026-05-09 | J: 58 | K: Bought May 2026 for £3,900 from Boat Replacement Fund
A: H1 | B: Heron 14 | C: 1401 | D: 2011 | E: 4.3 | F: 98 | G: 0 | H: Fair | I: 2026-03-21 | J: 71 | K: New mainsail needed for 2027
A: H2 | B: Heron 14 | C: 1402 | D: 2011 | E: 4.3 | F: 98 | G: 0 | H: Poor | I: 2026-03-21 | J: 38 | K: Out of use since 22 August 2026: centreboard case leak; winter repair
A: H3 | B: Heron 14 | C: 1403 | D: 2015 | E: 4.3 | F: 98 | G: 0 | H: Good | I: 2026-03-22 | J: 83
A: H4 | B: Heron 14 | C: 1404 | D: 2019 | E: 4.3 | F: 98 | G: 0 | H: Good | I: 2026-03-22 | J: 90
A: H5 | B: Heron 14 | C: 1405 | D: 2019 | E: 4.3 | F: 98 | G: 0 | H: Good | I: 2026-03-22 | J: 86
A: O1 | B: Osprey 16 | C: 1601 | D: 2009 | E: 4.9 | F: 145 | G: 0 | H: Fair | I: 2026-03-28 | J: 62 | K: Kept for adult Start Sailing courses
A: O2 | B: Osprey 16 | C: 1602 | D: 2013 | E: 4.9 | F: 145 | G: 0 | H: Good | I: 2026-03-28 | J: 67 | K: Kept for adult Start Sailing courses
A: Gannet | B: Safety boat (RIB) | C: n/a | D: 2020 | E: 4.8 | F: 420 | G: 40 | H: Good | I: 2026-03-07 | J: 128 | K: Primary safety boat; helm needs Club Powerboat Certificate
A: Puffin | B: Safety boat (RIB) | C: n/a | D: 2015 | E: 4.2 | F: 310 | G: 25 | H: Fair | I: 2026-03-07 | J: 84 | K: Second safety boat; new kill cord fitted April 2026
A: Mallard | B: Workboat (aluminium) | C: n/a | D: 2008 | E: 5.5 | F: 520 | G: 20 | H: Fair | I: 2026-02-28 | J: 46 | K: Mooring work only; not a primary safety boat
#### Moorings north trot
A: Mooring no. | B: Holder | C: Boat name | D: Boat type | E: Boat length (m) | F: Season fee (£) | G: Paid by 1 April | H: Last chain inspection | I: Status | J: Notes
A: N01 | B: A. Treadgold | C: Whimbrel | D: Day boat | E: 5.8 | F: 210 | G: Yes | H: 2025-03 | I: Let | J: Moorings Officer
A: N02 | B: J. Whitcombe | C: Second Wind | D: Small cruiser | E: 7.4 | F: 265 | G: Yes | H: 2025-03 | I: Let
A: N03 | B: M. Okonjo | C: Bramble | D: Keelboat | E: 6.2 | F: 210 | G: Yes | H: 2025-03 | I: Let
A: N04 | B: S. Pellow | C: Halcyon | D: Small cruiser | E: 7.9 | F: 265 | G: Yes | H: 2025-03 | I: Let | J: Largest boat on the north trot
A: N05 | B: D. Ferrier | C: Curlew | D: Keelboat | E: 6 | F: 210 | G: Yes | H: 2026-03 | I: Let
A: N06 | B: E. Rasmussen | C: Fair Isle | D: Day boat | E: 5.5 | F: 210 | G: Yes | H: 2026-03 | I: Let
A: N07 | B: C. Dewhurst | C: Merrybell | D: Small cruiser | E: 6.8 | F: 265 | G: No | H: 2026-03 | I: Let | J: Paid 14 April 2026; committee allowed late payment once
A: N08 | B: R. Penhallow | C: Linnet | D: Keelboat | E: 6.1 | F: 210 | G: Yes | H: 2026-03 | I: Let
A: N09 | B: - | C: - | D: - | E: 0 | F: 0 | G: - | H: 2026-03 | I: Out of use | J: Sinker failed inspection March 2026; replace winter 2026-27; former holder offered it first
A: N10 | B: P. Kaminski | C: Saltire | D: Small cruiser | E: 7.2 | F: 265 | G: Yes | H: 2026-03 | I: Let
A: N11 | B: H. Oduya | C: Teal | D: Day boat | E: 5.2 | F: 210 | G: Yes | H: 2025-03 | I: Let | J: Smallest boat on the north trot
A: N12 | B: G. Oakeshott | C: Ledger | D: Keelboat | E: 6.4 | F: 210 | G: Yes | H: 2025-03 | I: Let
A: N13 | B: L. Brannigan | C: Morwenna | D: Small cruiser | E: 7.6 | F: 265 | G: Yes | H: 2025-03 | I: Let
A: N14 | B: T. Ashworth | C: Kittiwake | D: Day boat | E: 5.9 | F: 210 | G: Yes | H: 2025-03 | I: Let
A: N15 | B: F. Brackley | C: Sea Pink | D: Keelboat | E: 6.3 | F: 210 | G: Yes | H: 2026-03 | I: Let
A: N16 | B: W. Harker | C: Orion | D: Small cruiser | E: 7 | F: 265 | G: Yes | H: 2026-03 | I: Let | J: Chain renewed March 2026
A: N17 | B: - | C: - | D: - | E: 0 | F: 0 | G: - | H: 2026-03 | I: Out of use | J: Sinker failed inspection March 2026; replace winter 2026-27; former holder offered it first
A: N18 | B: B. Castellan | C: Puzzle | D: Day boat | E: 5.6 | F: 210 | G: Yes | H: 2025-03 | I: Let
A: N19 | B: K. Ashdown | C: Driftwood | D: Keelboat | E: 6.5 | F: 210 | G: Yes | H: 2025-03 | I: Let | J: At the 6.5 m limit for the lower fee
A: N20 | B: I. Marchetti | C: Solstice | D: Small cruiser | E: 7.1 | F: 265 | G: Yes | H: 2025-03 | I: Let
#### Summer Evening Series 2026
A: Position | B: Helm | C: Crew | D: Class | E: Sail no. | F: Club yardstick | G: Races sailed | H: Net points | I: Notes
A: 1 | B: Owen Fairclough | C: Lily Fairclough | D: Heron 14 | E: 3317 | F: 1085 | G: 9 | H: 9 | I: Series winners; two discards
A: 2 | B: Rosa Lindqvist | C: - | D: Swift 15 | E: 772 | F: 1020 | G: 9 | H: 14
A: 3 | B: Duncan Ferrier | C: - | D: Lapwing 13 | E: 4410 | F: 1110 | G: 8 | H: 19
A: 4 | B: Priya Castellan | C: Ben Castellan | D: Heron 14 | E: 3290 | F: 1085 | G: 9 | H: 22
A: 5 | B: Mark Okonjo | C: - | D: Tern 12 | E: 2088 | F: 1140 | G: 9 | H: 27
A: 6 | B: Hannah Oduya | C: Joel Oduya | D: Osprey 16 | E: 1588 | F: 1060 | G: 7 | H: 31
A: 7 | B: Stuart Pellow | C: - | D: Lapwing 13 | E: 4377 | F: 1110 | G: 8 | H: 36
A: 8 | B: Eva Rasmussen | C: Kit Rasmussen | D: Heron 14 | E: 3104 | F: 1085 | G: 8 | H: 41
A: 9 | B: Tomasz Wilde | C: - | D: Swift 15 | E: 801 | F: 1020 | G: 5 | H: 47 | I: Missed four races on instructor duty
A: 10 | B: Laura Brannigan | C: - | D: Tern 12 | E: 2105 | F: 1140 | G: 7 | H: 52 | I: Sailed club boat T5 with the Rear Commodore's agreement
A: 11 | B: William Harker | C: Amy Harker | D: Heron 14 | E: 1403 | F: 1085 | G: 6 | H: 58 | I: Sailed club boat H3 with the Rear Commodore's agreement
A: 12 | B: Ivo Marchetti | C: - | D: Lapwing 13 | E: 4392 | F: 1110 | G: 6 | H: 63
A: 13 | B: Peter Kaminski | C: - | D: Tern 12 | E: 2059 | F: 1140 | G: 4 | H: 71 | I: One discard only
A: 14 | B: Kerry Ashdown | C: Maisie Ashdown | D: Heron 14 | E: 3256 | F: 1085 | G: 3 | H: 80 | I: Too few races for any discard
#### Duty rota Spring 2027
A: Date | B: Day | C: Activity | D: First warning or start | E: Officer of the day | F: Safety boat helm | G: Safety boat crew | H: Shore duty | I: Safety boats planned | J: Notes
A: 2027-03-27 | B: Saturday | C: Fitting-out work party | D: 09:00 | E: Duncan Ferrier | F: - | G: - | H: Colin Dewhurst | I: 0 | J: No boats afloat; ashore work only
A: 2027-04-03 | B: Saturday | C: Mooring laying day | D: 09:30 | E: Alan Treadgold | F: Sam Ridley | G: Will Harker | H: - | I: 0 | J: Workboat Mallard only; not a sailing day
A: 2027-04-10 | B: Saturday | C: Season opening and safety boat refresher | D: 10:00 | E: Fiona Brackley | F: Fiona Brackley | G: Joel Oduya | H: Ruth Penhallow | I: 1 | J: Refresher required for all 2027 safety boat helms
A: 2027-04-11 | B: Sunday | C: Spring Series race 1 | D: 10:30 | E: Priya Castellan | F: Mark Okonjo | G: Kit Rasmussen | H: Hannah Oduya | I: 2
A: 2027-04-17 | B: Saturday | C: Start Sailing course weekend 1 | D: 09:30 | E: Tomasz Wilde | F: Instructor team | G: Instructor team | H: - | I: 1 | J: Course continues Sunday 18 April
A: 2027-04-18 | B: Sunday | C: Spring Series race 2 | D: 10:30 | E: Stuart Pellow | F: Graham Oakeshott | G: Amy Harker | H: Laura Brannigan | I: 2
A: 2027-04-24 | B: Saturday | C: Start Sailing course weekend 2 | D: 09:30 | E: Tomasz Wilde | F: Instructor team | G: Instructor team | H: - | I: 1 | J: Course continues Sunday 25 April
A: 2027-04-25 | B: Sunday | C: Spring Series race 3 | D: 10:30 | E: Eva Rasmussen | F: Ivo Marchetti | G: Ben Castellan | H: Peter Kaminski | I: 2
A: 2027-05-01 | B: Saturday | C: Junior training session 1 | D: 09:30 | E: Kerry Ashdown | F: Owen Fairclough | G: Joel Oduya | H: Ruth Penhallow | I: 2 | J: First junior session of 2027
A: 2027-05-02 | B: Sunday | C: Spring Series race 4 | D: 10:30 | E: Rosa Lindqvist | F: William Harker | G: Lily Fairclough | H: Colin Dewhurst | I: 2
A: 2027-05-08 | B: Saturday | C: Junior training session 2 | D: 09:30 | E: Kerry Ashdown | F: Mark Okonjo | G: Kit Rasmussen | H: Laura Brannigan | I: 2
A: 2027-05-09 | B: Sunday | C: Spring Series race 5 | D: 10:30 | E: Duncan Ferrier | F: Peter Kaminski | G: Amy Harker | H: Hannah Oduya | I: 2
A: 2027-05-15 | B: Saturday | C: Junior training session 3 | D: 09:30 | E: Kerry Ashdown | F: Graham Oakeshott | G: Ben Castellan | H: Eva Rasmussen | I: 2
A: 2027-05-16 | B: Sunday | C: Spring Series race 6 | D: 10:30 | E: Priya Castellan | F: Owen Fairclough | G: Joel Oduya | H: Ivo Marchetti | I: 2 | J: Swap agreed: Owen Fairclough replaces Ivo Marchetti
A: 2027-05-22 | B: Saturday | C: Junior training session 4 | D: 09:30 | E: Kerry Ashdown | F: Ivo Marchetti | G: Lily Fairclough | H: Stuart Pellow | I: 2
A: 2027-05-23 | B: Sunday | C: Spring Series race 7 | D: 10:30 | E: Stuart Pellow | F: Fiona Brackley | G: Kit Rasmussen | H: Rosa Lindqvist | I: 2
A: 2027-05-29 | B: Saturday | C: Junior training session 5 | D: 09:30 | E: Kerry Ashdown | F: William Harker | G: Amy Harker | H: Peter Kaminski | I: 2
A: 2027-05-30 | B: Sunday | C: Spring Series race 8 | D: 10:30 | E: Eva Rasmussen | F: Mark Okonjo | G: Ben Castellan | H: Graham Oakeshott | I: 2 | J: Last race of the Spring Series; prizegiving at 15:00

View file

@ -0,0 +1,231 @@
# Foreldrehåndbok og regler for instrumentlån 2026/2027
# Foreldrehåndbok og regler for instrumentlån 2026/2027
Denne håndboka gjelder fra 1. august 2026 og erstatter håndboka for 2025/2026. Den er vedtatt av foreldreutvalget i Tindvika skolekorps 18. juni 2026. Håndboka forklarer hvordan korpset er organisert, hva som forventes av foresatte, og hvilke regler som gjelder når et barn låner instrument av korpset. Alle foresatte skal ha lest den før første øvelse.
## 1. Avdelinger og opptak
Korpset har tre avdelinger. Hver avdeling har sin egen dirigent eller instruktør og sin egen kontaktperson i foreldreutvalget.
Aspirantkorpset tar imot barn fra og med 3. trinn. Aspirantene får gruppetimer på sitt instrument og spiller samspill hver mandag.
Hovedkorpset er for musikanter fra og med 5. trinn som har bestått overgangsprøven. Overgangsprøven holdes i mai, og normalt har aspiranten da spilt i minst to år.
Drill- og slaggruppa tar imot barn fra og med 4. trinn. Det kreves ingen prøve, men nye medlemmer starter bare i august og januar.
En musikant kan være med i både Hovedkorpset og Drill- og slaggruppa. Det er ikke mulig å være med i både Aspirantkorpset og Hovedkorpset samtidig. Innmelding skjer på skjema fra kontaktpersonen, og fristen for innmelding til høstsemesteret 2026 er 20. september 2026.
Nye aspiranter har seks ukers prøvetid fra første øvelse. Melder et barn seg ut i løpet av prøvetiden, betaler familien ikke kontingent for semesteret, heller ikke når utmeldingen kommer etter 1. oktober. Instrumentet skal da leveres tilbake innen 14 dager, som ved annen utmelding. Prøvetiden gjelder bare Aspirantkorpset og ikke nye medlemmer i Drill- og slaggruppa, fordi de ikke låner instrument med hjem.
## 2. Øvelser og rom
Alle øvelser holdes på Tindvika skole. Korpset låner rommene gratis mot at vi følger reglene for hvert rom. Brudd på romreglene kan føre til at korpset mister retten til rommet, og derfor må foresatte som har foreldrevakt, passe på at reglene blir fulgt.
Rom
Brukes av
Tid
Særlige regler
Storsalen
Hovedkorpset
Tirsdager 18:00–20:00
Ingen mat i salen. Stolene settes tilbake i stabler langs veggen etter øvelse.
Musikkrommet (rom 214)
Aspirantkorpset
Mandager 16:30–18:30
Maks 25 personer i rommet. Kun vann er tillatt. Foresatte venter i kantina.
Gymsalen
Drill- og slaggruppa
Onsdager 17:00–18:30
Innesko er påbudt. Slagverk på stativ skal ikke stå uten tilsyn.
Instrumentlageret (rom K12)
Instrumentansvarlig
Tirsdager 17:30–18:00
Musikanter under 13 år skal ikke være alene i lageret.
Aspirantenes gruppetimer går fra 16:30 til 17:15, og samspillet går fra 17:30 til 18:30. Det er maks fire aspiranter i hver gruppetime. Hovedkorpset har i tillegg registerøvelse kl. 17:00–17:50 den første tirsdagen i hver måned.
## 3. Kontingent og betaling
Kontingenten ble økt fra 1. august 2026 etter vedtak i årsmøtet 4. juni 2026. Økningen skyldes at den nye avtalen med dirigentene gir 8 prosent høyere honorar fra samme dato. Kontingenten dekker dirigenter, instruktører, noter og den ordinære driften, men ikke seminarer eller turer.
Avdeling
Kontingent 2025/2026 (kr per semester)
Kontingent 2026/2027 (kr per semester)
Aspirantkorpset
1 100
1 200
Hovedkorpset
1 650
1 800
Drill- og slaggruppa
1 650
1 800
En musikant som er med i både Hovedkorpset og Drill- og slaggruppa, betaler kontingent bare én gang.
Barn nummer to i samme familie får 25 prosent søskenmoderasjon. Barn nummer tre og flere betaler ikke kontingent.
Faktura sendes 15. september for høstsemesteret og 15. februar for vårsemesteret, med 30 dagers forfall.
Familier som har vanskelig for å betale, kan kontakte kassereren. Ingen barn skal måtte slutte på grunn av økonomi, og saken behandles fortrolig.
### Utmelding
Utmelding skal skje skriftlig til sekretæren. Kontingenten for høstsemesteret betales fullt ut hvis utmeldingen kommer etter 1. oktober, og kontingenten for vårsemesteret betales fullt ut hvis utmeldingen kommer etter 1. mars. Kommer utmeldingen før disse datoene, faktureres ikke semesteret. En musikant som er påmeldt turen til København, er likevel bundet av reglene for avbestilling av turen, som står i reiseplanen fra årsmøtet.
## 4. Dugnad og foreldrevakt
Dugnad er korpsets nest største inntektskilde etter kontingenten. Hver familie skal ta tre ordinære dugnadsvakter per sesong, uansett hvor mange barn familien har i korpset. For hver ordinær vakt som ikke blir gjennomført, faktureres familien 300 kroner. Familier med barn på turen til København i juni 2027 skal i tillegg ta tre ekstra turvakter, og en turvakt som ikke blir gjennomført, faktureres med 400 kroner. Dugnadsansvarlig Amina Rasoul setter opp vaktlistene.
Foreldrevakt er noe annet enn dugnad. Foreldrevakten låser opp, passer på romreglene og er til stede i pausen. Familier i Hovedkorpset og Drill- og slaggruppa har foreldrevakt to ganger per semester, mens familier i Aspirantkorpset har foreldrevakt én gang per semester. Den som ikke kan ta vakten sin, må selv bytte med en annen familie og gi beskjed til kontaktpersonen.
## 5. Fravær og beskjeder
Fravær meldes til avdelingens kontaktperson innen kl. 14:00 samme dag som øvelsen.
Mer enn tre fravær uten gyldig grunn i ett semester fører til en samtale mellom dirigent, musikant og foresatte.
Før konserter er generalprøven obligatorisk. En musikant som uteblir fra generalprøven uten gyldig grunn, kan ikke spille på konserten.
Beskjeder fra korpset sendes på e-post senest fem dager før en endring, med unntak av avlysning på grunn av sykdom hos dirigenten.
## 6. Seminarer
Korpset holder to helgeseminarer i 2026/2027 på Granlia leirskole: høstseminaret 16.–18. oktober 2026 og vinterseminaret 5.–7. februar 2027. Deltakeravgiften er 700 kroner per seminar for musikanter i Hovedkorpset og Drill- og slaggruppa. Påmeldingsfristen er 25. september 2026 for høstseminaret og 10. januar 2027 for vinterseminaret.
Seminarene er obligatoriske for musikanter i Hovedkorpset, fordi konsertprogrammet øves inn der. Påmeldte som melder avbud senere enn sju dager før seminaret, betaler full deltakeravgift, med mindre avbudet skyldes sykdom. To foresatte er på vakt hele natten, og musikantene leverer mobiltelefonen til vaktene kl. 22:00.
Aspirantene deltar bare lørdag fra 10:00 til 16:00. Fra høsten 2026 betaler aspiranter 250 kroner for seminardagen. Tidligere dekket korpset dette, men foreldreutvalget har endret ordningen fordi antallet aspiranter har økt fra 15 til 21 på ett år. Foresatte henter aspirantene på Granlia leirskole kl. 16:00.
## 7. Konserter, uniform og bilder
Musikanter i Hovedkorpset låner korpsuniform. Uniformen deles ut på første øvelse i september og leveres inn sammen med instrumentet innen 15. juni. Aspiranter har ikke uniform; de spiller i korpsets t-skjorte og svarte bukser. Musikanter i Drill- og slaggruppa bruker drilldrakt, som også lånes av korpset.
Uniformen skal ikke vaskes i maskin. Korpset sender alle uniformer til rens én gang per år, i juli.
Små reparasjoner, som en løs knapp, kan familien gjøre selv.
Hvis en uniformsjakke blir borte, betaler familien 1 500 kroner. Bukse og lue erstattes med 400 kroner hver.
Oppmøte før konserter er 60 minutter før start for Hovedkorpset og 45 minutter før start for Aspirantkorpset.
Korpset tar bilder og korte filmopptak på konserter og seminarer. Bilder der et barn kan gjenkjennes, publiseres bare hvis en foresatt har gitt skriftlig samtykke i innmeldingsskjemaet. Samtykket kan trekkes tilbake når som helst ved å gi beskjed til sekretæren, og bilder som allerede er publisert, fjernes da innen sju dager. Foresatte som filmer på konserter, skal ikke dele opptak der andre barn kan gjenkjennes.
## 8. Regler for instrumentlån
Korpset låner ut instrumenter til musikanter som ikke har eget instrument. En foresatt må signere en låneavtale før instrumentet blir utlevert. Låneavtalen gjelder ett skoleår om gangen, fra 1. august til 15. juni. Instrumentet tilhører korpset hele tiden, og korpset kan kreve det tilbake hvis reglene ikke blir fulgt.
### Leie
Leien er 350 kroner per semester for hvert instrument og faktureres sammen med kontingenten.
Aspiranter betaler ikke leie i sitt første år i korpset. Fra det andre året betaler de ordinær leie.
Søskenmoderasjonen gjelder bare kontingenten, ikke instrumentleien.
Stikker, øvingspad, ventilolje og notestativ til hjemmebruk kjøper familien selv. Klarinett- og saksofonspillere får tre rør per semester fra korpset.
### Hva musikanten skal og ikke skal gjøre
Instrumentet skal alltid oppbevares i kassen når det ikke er i bruk.
Instrumentet skal ikke oppbevares i rom som er kaldere enn 5 grader eller står i direkte sol.
Musikanten har ikke lov til å låne instrumentet videre til andre, heller ikke til søsken.
Familien skal ikke reparere instrumentet selv eller levere det til reparasjon. All service bestilles av instrumentansvarlig.
Skader skal meldes til instrumentansvarlig innen sju dager.
### Slagverk
Store slagverksinstrumenter som stortromme, pauker og xylofon skal ikke tas med hjem. Marsjtrommer kan tas med hjem bare i de to ukene før en konkurranse eller mønstring, og bare når instruktøren har gitt tillatelse. Slagverkere i Drill- og slaggruppa øver hjemme på øvingspad.
### Skade og tap
Korpsets forsikring dekker skader på instrumenter som skjer ved vanlig bruk. Ved skade som skyldes uaktsomhet, betaler familien en egenandel på inntil 1 000 kroner. Hvis et instrument blir borte fordi det ble etterlatt uten tilsyn, betaler familien en egenandel på 2 500 kroner. Egenandelen faktureres etter at instrumentansvarlig har vurdert saken.
### Instrumentsjekk og innlevering
Alle utlånte instrumenter skal til instrumentsjekk i uke 34, før første øvelse i august. Alle instrumenter skal leveres inn innen 15. juni slik at korpset kan sende dem til årlig service om sommeren. Musikanter som skal på turen til København, beholder instrumentet til etter turen og leverer det innen 25. juni 2027. Instrumentlageret er åpent for innlevering tirsdager 17:30–18:00.
Ved utmelding skal instrumentet leveres tilbake innen 14 dager. Hvis instrumentet ikke er levert innen fristen, faktureres leie for et helt semester, og korpset kan i tillegg kreve erstatning hvis instrumentet ikke blir levert.
## 9. Foreldreutvalget og kontaktpersoner
Foreldreutvalget er korpsets styre og velges på årsmøtet i juni. Utvalget har seks medlemmer i 2026/2027.
Navn
Rolle
Kontaktperson for
Henrik Bråtveit
Leder
Hovedkorpset
Mona Fjellstad
Kasserer
Fakturaer og betaling
Siri Nyhagen
Instrumentansvarlig
Instrumentlån og instrumentlageret
Kari Enerhaug
Leder av turkomiteen
Turen til København 2027
Øystein Lunde
Sekretær
Aspirantkorpset
Amina Rasoul
Dugnadsansvarlig
Drill- og slaggruppa
Dirigentene og instruktøren er ansatt av korpset og er ikke medlemmer av foreldreutvalget. Spørsmål om musikk og plassering i korpset går til dirigenten, mens spørsmål om penger, dugnad og regler går til foreldreutvalget.

View file

@ -0,0 +1,191 @@
## Ordinær generalforsamling 2026
## Ordinær generalforsamling i Kvernhaugen borettslag
Generalforsamlingen holdes tirsdag 21. april 2026 kl. 18:30.
Møtet holdes i et leid lokale i nabolaget, fordi fellesrommet bare har plass til 40 personer.
Registrering av stemmer og fullmakter starter kl. 18:00.
Hver leilighet har én stemme, også når den eies av flere.
## Dagsorden
Konstituering og godkjenning av innkallingen.
Årsberetning og årsregnskap for 2025.
Styrehonorar for 2026.
Forslag om rehabilitering av balkonger og fasader.
Forslag om endret ro-tid i husordensreglene.
Valg av styremedlemmer og valgkomité.
## Borettslaget i tall
Borettslaget har 72 leiligheter i blokkene A, B, C og D.
Det er 24 toroms, 36 treroms og 12 fireroms leiligheter.
9 leiligheter skiftet eier i 2025, mot 6 i 2024.
Styret holdt 11 styremøter og behandlet 96 saker i 2025.
## Regnskap 2025: inntekter
Felleskostnadene utgjorde 5 184 000 kr etter en økning på 4 % fra 1. januar 2025.
Vaskeriet ga 61 750 kr i inntekter, mot 58 900 kr året før.
Fellesrommet var utleid i 64 døgn og ga 28 800 kr.
Salg av 24 ekstra nøkkelbrikker ga 9 600 kr.
Sum driftsinntekter ble 5 284 150 kr.
## Regnskap 2025: kostnader og resultat
Sum driftskostnader ble 4 088 300 kr, mot 3 610 800 kr i 2024.
Vedlikehold og reparasjoner kostet 1 236 800 kr og var den største posten.
Forsikringen økte med 10 % til 486 000 kr etter flere vannskader.
Årsresultatet ble 745 950 kr, mot 992 000 kr i 2024.
Revisor har ikke hatt merknader til regnskapet.
## Lån og disposisjonsfond
Fellesgjelden var 11 640 000 kr per 31. desember 2025.
Lånet ble nedbetalt med 620 000 kr i løpet av 2025.
Renten falt fra 4,40 % til 4,15 % gjennom året.
Disposisjonsfondet var 3 412 500 kr ved årsskiftet.
## Budsjett 2026
Felleskostnadene ble økt med 6 % fra 1. januar 2026 til om lag 6 360 kr i snitt per måned.
Resten av forprosjektet er budsjettert til 1 051 500 kr.
Ordinært vedlikehold er budsjettert til 980 000 kr.
Budsjettet viser et årsresultat på 173 500 kr.
Styret foreslår et styrehonorar på 186 000 kr for 2026, mot 180 000 kr for 2025.
## Vedlikehold utført i 2025
LED-belysning med bevegelsessensor ble montert i alle trapperom i mars for 186 000 kr.
Taklekkasjen i blokk C ble reparert i juni for 214 600 kr.
Trapperommene i blokk D ble malt i august for 167 300 kr.
To av fire vaskemaskiner ble byttet i september for 64 800 kr.
Tilstandsrapporten for balkonger og fasader kostet 148 500 kr.
## Energi i fellesarealene
Strømforbruket gikk ned fra 241 300 kWh i 2024 til 214 600 kWh i 2025.
Nedgangen på 11 % skyldes først og fremst den nye belysningen i trapperommene.
Energikostnaden falt fra 352 100 kr til 318 700 kr.
Budsjettet for 2026 regner med 305 000 kr til energi.
## Fellesrom, verksted og sykkelboder
Leien for fellesrommet har vært 450 kr per døgn siden 1. januar 2025.
Hobbyverkstedet i blokk C åpnet 1. mars 2025 og er gratis for beboerne.
Sykkelbod sør fikk ladeskap med 8 låsbare rom for elsykkelbatterier i mai 2025.
23 umerkede sykler ble fjernet ved ryddeaksjonen i oktober 2025.
## Forslag: ro-tid fra kl. 22:00 søndag til torsdag
Styret mottok 14 skriftlige klager på støy i 2025, mot 9 i 2024.
De fleste klagene gjaldt støy mellom kl. 22:00 og kl. 23:00 på kvelder fra søndag til torsdag.
Styret foreslår at ro-tiden søndag til torsdag begynner kl. 22:00 i stedet for kl. 23:00.
Ro-tiden på fredager og lørdager foreslås uendret.
Hvis forslaget vedtas, gjelder de nye reglene fra 1. mai 2026.
## Rehabilitering: hvorfor nå
Tilstandsrapporten fra desember 2025 fant alvorlige betongskader på 14 balkonger.
Alle de 14 skadde balkongene ligger i blokk A og blokk B.
3 balkonger i blokk A er sperret for bruk inntil videre.
Fasadene har aldri vært etterisolert siden byggeåret.
Bare å utbedre de 14 balkongene vil koste om lag 6,8 mill. kr uten bedre isolasjon.
## Rehabilitering: kostnad og finansiering
Kostnadsoverslaget er 41,0 mill. kr inkludert merverdiavgift.
Et nytt lån på inntil 39,5 mill. kr skal nedbetales over 30 år.
1,5 mill. kr hentes fra disposisjonsfondet.
Felleskostnadene må økes med om lag 12 % fra 1. januar 2027.
Forslaget krever to tredels flertall av de avgitte stemmene.
## Rehabilitering: tidsplan
Anbudsgrunnlaget skal være ferdig og anbud innhentes høsten 2026.
Blokk A og blokk B rehabiliteres fra april til oktober 2027.
Blokk C og blokk D rehabiliteres fra april til oktober 2028.
Hver balkong blir utilgjengelig i om lag 10 uker.
Beboerne varsles minst 4 uker før stillaset settes opp.
## Dugnader og hage i 2026
Vårdugnaden holdes lørdag 25. april og høstdugnaden lørdag 17. oktober.
I 2025 deltok 41 husstander på vårdugnaden og 35 på høstdugnaden.
Hagekomiteen har fem medlemmer og ledes av Vibeke Strand.
9 husstander står på venteliste for en av de 12 hageparsellene.
## Valg
Ingrid Solbakk er på valg og stiller til gjenvalg som styreleder for 2 år.
Henrik Vågsæther ønsker ikke gjenvalg etter 4 år i styret.
Valgkomiteen foreslår Petter Nygård-Ulvik som nytt styremedlem for 2 år.
Valgkomiteen består av Oddbjørg Rise og Jonas Fjellstad.
## Spørsmål og avstemning
Spørsmål til regnskapet besvares av Amira Hassani, som har ansvar for økonomi.
Spørsmål om rehabiliteringen besvares av Ingrid Solbakk og Torbjørn Leirvik.
Avstemningen om rehabiliteringen skjer skriftlig.
Protokollen fra møtet legges i alle postkasser innen 2 uker.

View file

@ -0,0 +1,205 @@
# Husordensregler og praktisk informasjon
# Husordensregler og praktisk informasjon for Kvernhaugen borettslag
Husordensreglene gjelder fra 1. mai 2026. De ble vedtatt av generalforsamlingen 21. april 2026 og erstatter reglene fra 2019. Reglene gjelder for alle som bor i borettslaget, også leietakere og gjester. Andelseieren er ansvarlig for at husstanden, leietakere og gjester følger reglene.
## 1. Ro og støy
Fra 1. mai 2026 begynner ro-tiden kl. 22:00 på søndager til torsdager, mot kl. 23:00 tidligere. Endringen ble vedtatt på generalforsamlingen 21. april 2026 med 49 stemmer for og 17 stemmer mot, fordi styret mottok 14 skriftlige klager på støy i 2025. Ro-tiden på fredager og lørdager er uendret.
Kveld
Ro-tid fra 1. mai 2026
Ro-tid før 1. mai 2026
Søndag til torsdag
Kl. 22:00–07:00
Kl. 23:00–07:00
Fredag og lørdag
Kl. 23:00–09:00
Kl. 23:00–09:00
Støyende arbeid er bare tillatt i disse tidsrommene:
Mandag til fredag kl. 08:00–20:00.
Lørdag kl. 10:00–16:00.
Aldri på søndager og helligdager.
Med støyende arbeid menes boring, banking, sliping og annet arbeid som høres i andre leiligheter. Den som skal pusse opp i mer enn én dag, skal varsle naboene i samme oppgang med oppslag minst 3 dager før arbeidet starter. Oppslaget skal vise hvor lenge arbeidet varer.
Den som skal ha selskap i leiligheten etter kl. 22:00, bør varsle naboene i oppgangen på forhånd. Et varsel gir likevel ikke rett til å bryte ro-tiden.
## 2. Fellesrommet og hobbyverkstedet
Fellesrommet ligger i første etasje i blokk D, og hobbyverkstedet ligger i kjelleren i blokk C. De to rommene har ulike regler, som vist i tabellen.
Regel
Fellesrommet (blokk D)
Hobbyverkstedet (blokk C)
Størrelse
62 m², plass til 40 personer
24 m²
Pris
450 kr per døgn og 1 000 kr i depositum
Gratis for beboere
Booking
Hos vaktmester, minst 7 dager og høyst 3 måneder før
Bare nødvendig ved bruk i mer enn 3 timer
Aldersgrense
Leietaker må være minst 20 år
Barn under 15 år bare sammen med en voksen
Tider
Forlatt innen kl. 22:00 søndag til torsdag og innen kl. 01:00 natt til lørdag og søndag
Åpent kl. 08:00–21:00 alle dager
Fellesrommet leies bare ut til beboere, og leietakeren må være til stede under hele arrangementet. Fredag og lørdag skal musikken dempes fra kl. 23:00. Leietakeren skal rydde og tørke av bord og benker før rommet forlates. Gulvvask etter utleie er inkludert i leien. Depositumet betales tilbake når vaktmesteren har kontrollert rommet, og bare dersom ingenting er skadet eller mangler.
Avbestilling av fellesrommet senest 48 timer før leieperioden starter gir full refusjon av leien. Ved senere avbestilling betales leien ikke tilbake, med unntak av sykdom som kan dokumenteres. Det er ikke tillatt å leie rommet videre til andre.
I hobbyverkstedet er elektrisk verktøy bare tillatt på hverdager kl. 10:00–20:00 og på lørdager kl. 11:00–16:00. Elektrisk verktøy skal aldri brukes på søndager og helligdager. Verkstedet skal ikke brukes til lakkering eller sprøytemaling, fordi rommet ikke har avtrekk for løsemidler. Den siste som går, skal slå av hovedbryteren ved døra.
## 3. Fellesvaskeriet
Vaskeriet ligger i kjelleren i blokk B og har fire vaskemaskiner, to tørketromler og ett tørkerom. Vaskeriet er åpent kl. 07:00–22:00 mandag til lørdag og kl. 10:00–18:00 på søndager.
En vask koster 22 kr, og en runde i tørketrommelen koster 15 kr. Beløpet trekkes via nøkkelbrikken.
Hver booking kan vare i høyst 3 timer.
Hver leilighet kan ha høyst 2 bookinger per uke.
Tøy skal tas ut av tørkerommet senest 24 timer etter at bookingen er slutt.
Barn under 12 år får ikke bruke vaskeriet uten en voksen.
Tepper, hundesenger og tøy med sand eller jord skal ikke vaskes i maskinene.
Dersom en maskin ikke virker, skal feilen meldes til vaktmesteren. Tiden som går tapt, kan bookes på nytt samme uke selv om leiligheten da får mer enn 2 bookinger.
## 4. Sykkelboder og kjellerboder
Sykkelbod nord ved blokk A har 48 plasser, og sykkelbod sør ved blokk D har 36 plasser. Begge åpnes med nøkkelbrikke. Sykler skal merkes med leilighetsnummer. Merkelapper deles ut av vaktmesteren i september hvert år.
Umerkede sykler fjernes ved ryddeaksjonen i oktober, etter fire ukers varsel på oppslagstavlene.
Fjernede sykler lagres i 3 måneder før de gis bort til gjenbruk.
Batterier til elsykler skal bare lades i ladeskapet i sykkelbod sør. Lading er ikke tillatt i sykkelbod nord eller i kjellerbodene.
Ladeskapet har 8 låsbare rom, og hvert rom kan brukes i høyst 12 timer om gangen.
Hver leilighet har en kjellerbod på mellom 4 og 6 m². Det skal ikke lagres brannfarlige væsker, gassflasker eller maling i kjellerbodene. Gangene i kjelleren skal holdes fri, fordi de er rømningsvei.
## 5. Trapperom, balkonger og røyking
Trapperommene er rømningsvei og skal holdes fri for gjenstander. Det eneste som kan stå utenfor leilighetsdøra, er en dørmatte. Sko, esker, møbler og avfallsposer skal ikke settes i trapperommet, heller ikke for en kort periode. Vaktmesteren fjerner gjenstander som blir stående, etter et varsel på 7 dager.
Røyking er ikke tillatt i trapperom, kjellere, vaskeri, fellesrom, hobbyverksted eller sykkelboder.
Røyking er heller ikke tillatt nærmere enn 5 meter fra inngangsdørene.
Røyking på egen balkong er tillatt, men aske og sneiper skal ikke kastes over rekkverket.
Blomsterkasser skal henge på innsiden av rekkverket.
Tøy kan tørkes på balkongen bare når det henger lavere enn toppen av rekkverket.
Det er ikke tillatt å mate fugler fra balkongene, fordi foring trekker til seg rotter og duer.
Den som flytter inn eller ut, skal melde dette til styret senest 1 uke før flyttedagen. Fordi ingen av blokkene har heis, skal flyttelass bæres i trappen, og vegger og rekkverk som blir skadet under flyttingen, skal utbedres for flytterens regning.
## 6. Hage, grill og lek
Hagen på 1 450 m² er felles for alle beboere. Hagekomiteen har ansvar for planting og stell, og vaktmesteren har ansvar for plenklipping. Vårdugnaden holdes 25. april 2026 og høstdugnaden 17. oktober 2026. Det ilegges ikke gebyr for å utebli fra dugnad.
På balkongene er bare elektrisk grill og gassgrill tillatt. Kullgrill er ikke tillatt på balkongene.
Kullgrill kan brukes på den felles grillplassen i hagen fram til kl. 22:00.
Lekeplassen er for barn under 12 år.
Ballspill på plenen er tillatt fram til kl. 20:00.
De 12 hageparsellene på 8 m² fordeles ved loddtrekning for to sesonger om gangen. Neste loddtrekning holdes i mars 2027.
## 7. Dyrehold
Det er tillatt å holde hund, katt og andre smådyr, men dyreholdet skal meldes skriftlig til styret innen 2 uker etter at dyret er kommet til leiligheten. Hunder skal holdes i bånd på hele eiendommen og skal ikke inn på lekeplassen. Eieren skal plukke opp etter dyret. Styret kan kreve at et dyr fjernes dersom det er til vesentlig sjenanse for naboene og eieren ikke retter forholdet etter skriftlig advarsel.
## 8. Avfall
Avfall skal sorteres i de nedgravde containerne for restavfall, papir, plast og glass og metall. Matavfall skal legges i grønne poser i containeren for restavfall. Det er ikke tillatt å sette avfall ved siden av containerne.
Borettslaget bestiller container for grovavfall to ganger i 2026: 9. til 11. mai og 12. til 14. september. Elektriske produkter, maling, løsemidler og andre kjemikalier skal ikke legges i grovavfallscontaineren.
## 9. Fremleie og endringer i leiligheten
Fremleie av hele leiligheten krever skriftlig godkjenning fra styret. Søknaden skal sendes senest 4 uker før leieforholdet starter, og den skal oppgi navn på leietakeren og leieperioden. Korttidsutleie er tillatt i høyst 30 døgn per kalenderår, og hver utleie skal meldes til styret før den starter.
Den som vil installere varmepumpe, flytte eller fjerne vegger eller gjøre endringer i våtrom, skal søke styret minst 6 uker før arbeidet starter. Innglassing av balkong er ikke tillatt før rehabiliteringen av balkongene er ferdig i oktober 2028, fordi de nye balkongene får en felles løsning for innglassing.
## 10. Skader, vaktmester og nøkler
Vaktmester Kåre Myrvold arbeider mandag til torsdag kl. 07:30–15:00. Han har kontortid på vaktmesterkontoret i kjelleren i blokk B tirsdager kl. 08:00–09:00 og torsdager kl. 14:00–15:00. Saker som ikke haster, legges i feilmeldingsboksen ved vaktmesterkontoret.
Akutte skader utenom arbeidstiden, som vannlekkasje, strømbrudd i fellesarealer og innbrudd i fellesrom, meldes til vakttelefonen. Nummeret står på oppslagstavla i hver oppgang.
Egenandelen ved forsikringsskader er 10 000 kr. Beboeren betaler egenandelen når skaden skyldes utstyr eller forhold i leiligheten som beboeren har ansvar for.
Røykvarsleren i leiligheten skal testes av beboeren hvert år innen 1. desember.
Hver leilighet har 3 nøkkelbrikker. Ekstra brikker koster 400 kr per stykk og bestilles hos vaktmesteren.
En tapt nøkkelbrikke skal meldes straks, slik at den kan sperres.
## 11. Byggeperioden 2027–2028
Generalforsamlingen 21. april 2026 vedtok å rehabilitere balkonger og fasader på alle fire blokkene. Vedtaket ble gjort med 58 stemmer for og 8 stemmer mot, av i alt 66 avgitte stemmer. Kostnadsrammen er 41,0 mill. kr. Blokk A og blokk B rehabiliteres fra april til oktober 2027, og blokk C og blokk D fra april til oktober 2028.
Beboerne i hver blokk varsles minst 4 uker før stillaset settes opp.
Balkongen skal være tømt for møbler, planter og annet utstyr innen datoen i varselet.
Hver balkong er utilgjengelig i om lag 10 uker.
Vinduer på fasaden som rehabiliteres, kan i perioder på inntil 2 uker ikke åpnes.
Byggearbeid foregår bare på hverdager kl. 07:00–17:00.
Felleskostnadene blir ikke redusert i byggeperioden.
De 3 balkongene i blokk A som styret har sperret, skal fortsatt ikke brukes før de er rehabilitert.
## 12. Vedlikeholdsansvar
Andelseieren har ansvar for vedlikehold innvendig i leiligheten, blant annet maling, gulv, kjøkkeninnredning, hvitevarer og sluk i bad. Borettslaget har ansvar for felles rør fram til stoppekranen i leiligheten, for vinduer og ytterdører, for balkonger og for fasader. Det betyr at beboeren ikke skal bytte vindu eller balkongdør på egen hånd. Den som oppdager fukt, råte eller sprekker i bærende konstruksjoner, skal melde fra til vaktmesteren så snart som mulig, slik at skaden ikke blir større.
## 13. Brudd på reglene
Klager på brudd på husordensreglene skal være skriftlige og leveres i styrets postkasse i blokk B, oppgang 2. Styret behandler klagen i første styremøte etter at den er mottatt. Ved første brudd sender styret en skriftlig påminnelse. Ved gjentatte eller alvorlige brudd kan styret gi skriftlig advarsel, og i ytterste fall kan vesentlige brudd føre til krav om salg av andelen.

View file

@ -0,0 +1,183 @@
## Informasjonsmøte for nye foreldre – Tindvika skolekorps, 2. september 2026
## Velkommen til Tindvika skolekorps
Informasjonsmøtet holdes onsdag 2. september 2026 kl. 18:30 i storsalen på Tindvika skole.
Møtet er for foresatte til nye aspiranter og nye medlemmer i Drill- og slaggruppa.
Møtet ledes av Henrik Bråtveit, som er leder av foreldreutvalget.
Etter møtet kan alle prøve instrumenter i musikkrommet fram til kl. 20:00.
## Om korpset
Korpset ble stiftet i 1971 og øver på Tindvika skole.
Korpset hadde 69 medlemmer per 1. september 2025, mot 58 året før.
Vi har tre avdelinger: Aspirantkorpset, Hovedkorpset og Drill- og slaggruppa.
Foreldreutvalget er korpsets styre og har seks medlemmer.
## Aspirantkorpset
Aspirantkorpset tar imot barn fra og med 3. trinn.
Gruppetimene går mandager 16:30–17:15 med maks fire aspiranter per gruppe.
Samspillet går mandager 17:30–18:30 i musikkrommet, rom 214.
Dirigent for Aspirantkorpset er Tobias Rønneberg.
## Veien videre i korpset
Overgangsprøven til Hovedkorpset holdes i mai hvert år.
Hovedkorpset er for musikanter fra og med 5. trinn som har bestått prøven.
Normalt spiller en aspirant i minst to år før overgangsprøven.
Drill- og slaggruppa tar imot barn fra og med 4. trinn, uten prøve.
Nye medlemmer i Drill- og slaggruppa starter bare i august og januar.
## Øvingstider og rom
Hovedkorpset øver tirsdager 18:00–20:00 i storsalen.
Drill- og slaggruppa øver onsdager 17:00–18:30 i gymsalen, og innesko er påbudt.
I musikkrommet er kun vann tillatt, og det kan være maks 25 personer i rommet.
Foresatte som venter på aspiranter, sitter i kantina.
## Dirigenter og instruktør
Ingeborg Haugstøl er dirigent for Hovedkorpset og begynner nå sin femte sesong.
Tobias Rønneberg leder Aspirantkorpset.
Live Aasmyr er instruktør for Drill- og slaggruppa.
Dirigentene er ansatt av korpset og sitter ikke i foreldreutvalget.
## Kontingent 2026/2027
Aspirantkorpset koster 1 200 kroner per semester, mot 1 100 kroner i fjor.
Hovedkorpset og Drill- og slaggruppa koster 1 800 kroner per semester, mot 1 650 kroner i fjor.
Økningen gjelder fra 1. august 2026 fordi dirigentene har fått 8 prosent høyere honorar.
En musikant som er med i to avdelinger, betaler kontingent bare én gang.
## Søskenmoderasjon og betaling
Barn nummer to i samme familie får 25 prosent moderasjon på kontingenten.
Barn nummer tre og flere betaler ikke kontingent.
Faktura sendes 15. september og 15. februar med 30 dagers forfall.
Familier som har vanskelig for å betale, kan ta kontakt med kasserer Mona Fjellstad.
## Instrumentlån for nye aspiranter
Korpset låner ut instrument til alle aspiranter som ikke har eget instrument.
Aspiranter betaler ikke leie det første året i korpset.
Fra det andre året er leien 350 kroner per semester.
En foresatt må signere låneavtalen før instrumentet blir utlevert.
Låneavtalen gjelder fra 1. august til 15. juni.
## Slik tar dere vare på instrumentet
Instrumentet skal ligge i kassen når det ikke er i bruk.
Instrumentet skal ikke stå i rom under 5 grader eller i direkte sol.
Musikanten har ikke lov til å låne instrumentet bort, heller ikke til søsken.
Skader meldes til instrumentansvarlig Siri Nyhagen innen sju dager.
Ved skade som skyldes uaktsomhet, betaler familien en egenandel på inntil 1 000 kroner.
## Seminarer 2026/2027
Høstseminaret er 16.–18. oktober 2026, og vinterseminaret er 5.–7. februar 2027, begge på Granlia leirskole.
Aspirantene deltar bare lørdag fra 10:00 til 16:00.
Seminardagen koster 250 kroner for aspiranter fra denne høsten.
Musikanter i de andre avdelingene betaler 700 kroner per seminar.
Påmeldingsfristen for høstseminaret er 25. september 2026.
## Konserter denne sesongen
Høstkonserten er søndag 22. november 2026.
Julekonserten er søndag 13. desember 2026, og der spiller alle tre avdelingene.
Støttekonserten for turen til København er søndag 7. mars 2027.
Vårkonserten er søndag 25. april 2027.
Generalprøven før hver konsert er obligatorisk.
## Dugnad
Hver familie tar tre ordinære dugnadsvakter per sesong, uansett hvor mange barn familien har i korpset.
En ordinær vakt som ikke blir gjennomført, faktureres med 300 kroner.
Første dugnad er loppemarkedet i gymsalen lørdag 26. september 2026.
Dugnadsansvarlig Amina Rasoul setter opp vaktlistene.
## Foreldrevakt
Foreldrevakt er noe annet enn dugnad.
Familier i Aspirantkorpset har foreldrevakt én gang per semester.
Familier i Hovedkorpset og Drill- og slaggruppa har foreldrevakt to ganger per semester.
Den som ikke kan ta vakten sin, bytter selv med en annen familie.
## Fravær og beskjeder
Fravær meldes til avdelingens kontaktperson innen kl. 14:00 samme dag.
Kontaktperson for Aspirantkorpset er sekretær Øystein Lunde.
Kontaktperson for Drill- og slaggruppa er Amina Rasoul.
Mer enn tre fravær uten gyldig grunn i ett semester fører til en samtale med dirigenten.
## Turen til København i juni 2027
Hovedkorpset og Drill- og slaggruppa reiser til Nordisk ungdomskorpstreff 17.–21. juni 2027.
Aspirantkorpset deltar ikke på turen.
Alle musikanter som reiser, må ha fylt 11 år innen 1. juni 2027.
Påmeldingen er bindende, og fristen er 1. desember 2026.
Egenandelen er 3 900 kroner, og familier med barn på turen tar tre ekstra dugnadsvakter.
## Neste steg for nye familier
Innmeldingsskjemaet må være levert innen 20. september 2026.
Låneavtalen for instrument signeres før første øvelse.
Første øvelse for nye aspiranter er mandag 7. september 2026 kl. 16:30.
Spørsmål om musikk går til dirigenten, og spørsmål om penger og regler går til foreldreutvalget.

View file

@ -0,0 +1,81 @@
#### Instrumenter per 01.10.2026
A: Instrument-ID | B: Instrument | C: Avdeling | D: Innkjøpsår | E: Verdi (kr) | F: Status | G: Utlånt til | H: Siste service (dato) | I: Merknad
A: TS-01 | B: Kornett | C: Hovedkorpset | D: 2009 | E: 6500 | F: Utlånt | G: Nora B. | H: 12.07.2026
A: TS-02 | B: Kornett | C: Hovedkorpset | D: 2012 | E: 7200 | F: Utlånt | G: Elias K. | H: 12.07.2026 | I: Bulk i munnstykkerøret reparert våren 2026
A: TS-03 | B: Kornett | C: Aspirantkorpset | D: 2015 | E: 7800 | F: Utlånt | G: Ida M. | H: 12.07.2026 | I: Aspirant, første år uten leie
A: TS-04 | B: Kornett | C: Aspirantkorpset | D: 2018 | E: 8400 | F: Utlånt | G: Filip H. | H: 12.07.2026 | I: Aspirant, første år uten leie
A: TS-05 | B: Kornett | C: Aspirantkorpset | D: 2021 | E: 9100 | F: På lager | H: 12.07.2026 | I: Reserve for nye aspiranter
A: TS-06 | B: Trompet | C: Hovedkorpset | D: 2016 | E: 9800 | F: Utlånt | G: Sander L. | H: 12.07.2026
A: TS-07 | B: Trompet | C: Hovedkorpset | D: 2003 | E: 5200 | F: Til service | H: 02.10.2026 | I: Ventil nr. 2 henger, ventet tilbake uke 43
A: AH-01 | B: Althorn | C: Hovedkorpset | D: 2006 | E: 11500 | F: Utlånt | G: Maja S. | H: 12.07.2026
A: AH-02 | B: Althorn | C: Hovedkorpset | D: 2011 | E: 12800 | F: Utlånt | G: Tiril Ø. | H: 12.07.2026
A: AH-03 | B: Althorn | C: Hovedkorpset | D: 2019 | E: 14200 | F: Utlånt | G: Johannes R. | H: 12.07.2026 | I: Gikk over fra Aspirantkorpset august 2026
A: AH-04 | B: Althorn | C: Hovedkorpset | D: 2026 | E: 16900 | F: Utlånt | G: Selma A. | I: Kjøpt august 2026 etter vedtak på årsmøtet
A: BA-01 | B: Baryton | C: Hovedkorpset | D: 2008 | E: 15400 | F: Utlånt | G: Oskar N. | H: 12.07.2026
A: BA-02 | B: Baryton | C: Hovedkorpset | D: 2014 | E: 17100 | F: På lager | H: 12.07.2026 | I: Ledig fra høsten 2026
A: EU-01 | B: Eufonium | C: Hovedkorpset | D: 2010 | E: 21500 | F: Utlånt | G: Linnea F. | H: 12.07.2026
A: EU-02 | B: Eufonium | C: Hovedkorpset | D: 2017 | E: 24300 | F: Utlånt | G: Mathias J. | H: 12.07.2026
A: TR-01 | B: Trombone | C: Hovedkorpset | D: 2005 | E: 7600 | F: Utlånt | G: Ella V. | H: 12.07.2026
A: TR-02 | B: Trombone | C: Hovedkorpset | D: 2013 | E: 8900 | F: Utlånt | G: Henrik G. | H: 12.07.2026
A: TR-03 | B: Trombone | C: Aspirantkorpset | D: 2020 | E: 9500 | F: Utlånt | G: Vilde T. | H: 12.07.2026 | I: Aspirant, andre år, betaler leie
A: TU-01 | B: Tuba | C: Hovedkorpset | D: 1998 | E: 19000 | F: Utlånt | G: Aksel D. | H: 12.07.2026 | I: Brukes bare på øvelser, står i storsalen
A: TU-02 | B: Tuba | C: Hovedkorpset | D: 2026 | E: 27900 | F: Utlånt | G: Emil W. | H: 12.07.2026 | I: Kjøpt mars 2026, erstatter tuba fra 1984
A: VH-01 | B: Valthorn | C: Hovedkorpset | D: 2007 | E: 18800 | F: Utlånt | G: Sofie E. | H: 12.07.2026
A: VH-02 | B: Valthorn | C: Hovedkorpset | D: 2015 | E: 21000 | F: På lager | H: 12.07.2026
A: KL-01 | B: Klarinett | C: Hovedkorpset | D: 2004 | E: 4900 | F: Utlånt | G: Thea P. | H: 12.07.2026 | I: Var til service fem uker våren 2026
A: KL-02 | B: Klarinett | C: Hovedkorpset | D: 2012 | E: 6100 | F: Utlånt | G: Leah C. | H: 12.07.2026 | I: Var til service seks uker våren 2026
A: KL-03 | B: Klarinett | C: Aspirantkorpset | D: 2019 | E: 6800 | F: Utlånt | G: Mia K. | H: 12.07.2026 | I: Aspirant, første år uten leie
A: KL-04 | B: Klarinett | C: Aspirantkorpset | D: 2022 | E: 7300 | F: Utlånt | G: Noah B. | H: 12.07.2026 | I: Aspirant, første år uten leie
A: FL-01 | B: Fløyte | C: Hovedkorpset | D: 2010 | E: 5600 | F: Utlånt | G: Ingrid H. | H: 12.07.2026
A: FL-02 | B: Fløyte | C: Aspirantkorpset | D: 2023 | E: 6900 | F: Utlånt | G: Astrid L. | H: 12.07.2026 | I: Aspirant, første år uten leie
A: FL-03 | B: Fløyte | C: Hovedkorpset | D: 2014 | E: 6200 | F: På lager | H: 12.07.2026 | I: Ledig, lånes ut til ny musikant ved behov
A: AS-01 | B: Altsaksofon | C: Hovedkorpset | D: 2011 | E: 13400 | F: Utlånt | G: Jonas M. | H: 12.07.2026
A: AS-02 | B: Altsaksofon | C: Hovedkorpset | D: 2018 | E: 15800 | F: Til service | H: 28.09.2026 | I: Ny pute på G-klaff, ventet tilbake uke 42
A: TSX-01 | B: Tenorsaksofon | C: Hovedkorpset | D: 2016 | E: 19600 | F: Utlånt | G: Kasper O. | H: 12.07.2026
A: Instrument-ID | B: Instrument | C: Avdeling | D: Innkjøpsår | E: Verdi (kr) | F: Status | G: Utlånt til | H: Siste service (dato) | I: Merknad
A: SL-01 | B: Marsjtromme | C: Drill- og slaggruppa | D: 2014 | E: 4800 | F: På lager | H: 12.07.2026 | I: Hjemlån bare før konkurranse, med tillatelse
A: SL-02 | B: Marsjtromme | C: Drill- og slaggruppa | D: 2014 | E: 4800 | F: På lager | H: 12.07.2026 | I: Hjemlån bare før konkurranse, med tillatelse
A: SL-03 | B: Marsjtromme | C: Drill- og slaggruppa | D: 2020 | E: 5900 | F: På lager | H: 12.07.2026 | I: Nytt skinn juli 2026
A: SL-04 | B: Stortromme | C: Drill- og slaggruppa | D: 2012 | E: 8700 | F: På lager | H: 12.07.2026 | I: Skal ikke tas med hjem
A: SL-05 | B: Cymbaler (par) | C: Drill- og slaggruppa | D: 2017 | E: 3600 | F: På lager | H: 12.07.2026
A: SL-06 | B: Pauker (sett med 2) | C: Hovedkorpset | D: 2002 | E: 42000 | F: På lager | H: 12.07.2026 | I: Står fast i storsalen, skal ikke flyttes uten instrumentansvarlig
A: SL-07 | B: Xylofon | C: Hovedkorpset | D: 2009 | E: 23500 | F: På lager | H: 12.07.2026 | I: Skal ikke tas med hjem
A: SL-08 | B: Glockenspiel | C: Aspirantkorpset | D: 2021 | E: 4200 | F: På lager | H: 12.07.2026 | I: Brukes på samspill mandager
#### Reisebudsjett v2
A: Post | B: Type | C: Antall | D: Pris per enhet (kr) | E: Beløp (kr) | F: Ansvarlig | G: Merknad
A: Reisekostnad tur/retur | B: Utgift | C: 45 | D: 1450 | E: 65250 | F: Kari Enerhaug | G: 38 musikanter og 7 voksne
A: Overnatting Herberget Kastanjegården | B: Utgift | C: 180 | D: 310 | E: 55800 | F: Kari Enerhaug | G: 45 personer x 4 netter, frokost inkludert
A: Lunsj | B: Utgift | C: 180 | D: 120 | E: 21600 | F: Kari Enerhaug | G: 4 dager
A: Middag | B: Utgift | C: 180 | D: 190 | E: 34200 | F: Kari Enerhaug | G: 4 dager
A: Festivalavgift | B: Utgift | C: 38 | D: 650 | E: 24700 | F: Ingeborg Haugstøl | G: Økt fra 550 kr i oktober 2026; voksne ledere betaler ikke
A: Forsendelse av slagverk i kasser | B: Utgift | C: 1 | D: 18500 | E: 18500 | F: Siri Nyhagen | G: Sendes to uker før avreise
A: Fellesaktivitet badeland | B: Utgift | C: 45 | D: 220 | E: 9900 | F: Kari Enerhaug | G: Søndag 20.06.2027
A: Felles t-skjorter | B: Utgift | C: 45 | D: 160 | E: 7200 | F: Amina Rasoul | G: Bestilles innen 1. april 2027
A: Tilleggsforsikring instrumenter | B: Utgift | C: 1 | D: 4800 | E: 4800 | F: Mona Fjellstad | G: Gjelder bare korpsets instrumenter
A: Diett dirigent og instruktør | B: Utgift | C: 12 | D: 400 | E: 4800 | F: Mona Fjellstad | G: 3 personer x 4 dager
A: Uforutsett | B: Utgift | C: 1 | D: 10000 | E: 10000 | F: Henrik Bråtveit | G: Kan bare brukes etter vedtak i foreldreutvalget
A: Sum utgifter | B: Utgift | E: 256750 | F: Mona Fjellstad | G: Versjon 2
A: Egenandel musikanter | B: Inntekt | C: 38 | D: 3900 | E: 148200 | F: Mona Fjellstad | G: Tre rater à 1 300 kr; ingen søskenmoderasjon
A: Dugnader til reisen | B: Inntekt | C: 1 | D: 70000 | E: 70000 | F: Amina Rasoul | G: Se arket Dugnader 2026-2027
A: Fra reisefondet | B: Inntekt | C: 1 | D: 25000 | E: 25000 | F: Mona Fjellstad | G: Saldo 41 000 kr per 31.05.2026
A: Støttekonsert 07.03.2027 | B: Inntekt | C: 1 | D: 14000 | E: 14000 | F: Ingeborg Haugstøl | G: Billetter; kafé er ført under dugnader
A: Sum inntekter | B: Inntekt | E: 257200 | F: Mona Fjellstad | G: Uendret fra versjon 1
A: Resultat | B: Resultat | E: 450 | F: Mona Fjellstad | G: Versjon 2 revidert 12.10.2026; var 4 250 kr i versjon 1 fordi festivalavgiften økte med 100 kr per musikant
#### Dugnader 2026-2027
A: Dato | B: Dugnad | C: Antall vakter | D: Forventet inntekt (kr) | E: Andel til reisen (%) | F: Beløp til reisen (kr) | G: Ansvarlig | H: Merknad
A: 26.09.2026 | B: Loppemarked i gymsalen | C: 24 | D: 32000 | E: 50 | F: 16000 | G: Amina Rasoul | H: Resten går til driften
A: 22.11.2026 | B: Kafé ved høstkonserten | C: 8 | D: 6500 | E: 100 | F: 6500 | G: Øystein Lunde | H: Turvakt
A: 05.12.2026 | B: Juletresalg på skoleplassen | C: 18 | D: 21000 | E: 100 | F: 21000 | G: Kari Enerhaug | H: Turvakt; bare voksne kan stå i salget
A: 13.12.2026 | B: Kafé ved julekonserten | C: 8 | D: 5500 | E: 0 | F: 0 | G: Øystein Lunde | H: Ordinær vakt, alt går til driften
A: 09.01.2027 | B: Varetelling hos lokal dagligvarebutikk | C: 12 | D: 9000 | E: 100 | F: 9000 | G: Henrik Bråtveit | H: Turvakt; deltakere må være minst 16 år
A: 07.03.2027 | B: Kafé ved støttekonserten | C: 6 | D: 4000 | E: 100 | F: 4000 | G: Kari Enerhaug | H: Turvakt
A: 17.04.2027 | B: Vårrydding for velforeningen | C: 15 | D: 4500 | E: 100 | F: 4500 | G: Amina Rasoul | H: Turvakt; fast honorar
A: 25.04.2027 | B: Kafé ved vårkonserten | C: 8 | D: 6000 | E: 0 | F: 0 | G: Øystein Lunde | H: Ordinær vakt
A: 17.05.2027 | B: Kiosk på skoleplassen 17. mai | C: 20 | D: 18000 | E: 50 | F: 9000 | G: Mona Fjellstad | H: Ordinær vakt og turvakt
A: 22.05.2027 | B: Plantesalg | C: 10 | D: 7000 | E: 0 | F: 0 | G: Siri Nyhagen | H: Ordinær vakt, alt går til driften

View file

@ -0,0 +1,9 @@
The Kettlewick Project: Annual Report 2025 The Kettlewick Project: Annual Report 2025 Kettlewick is a command-line tool for organising and searching personal notes stored as plain text files. It has been developed by volunteers since its first public release in April 2019. This report covers the calendar year 2025, from 1 January to 31 December, and was prepared by the maintainers for the annual maintainers' meeting on 14 March 2026. Figures are as of 31 December 2025 unless another date is given. The report was finalised on 2 February 2026, so it does not include any decision taken at the meeting itself. 1. The year in summary 2025 was the busiest year in the project's history. We shipped 11 releases, compared with 9 in 2024, and merged 1,086 pull requests, up from 812 the year before. The number of people with at least one merged pull request rose from 64 to 87. Two serious incidents, a search index corruption bug in June and an expired release signing key in September, led directly to rule changes that take effect in 2026.  11 releases: 4 minor releases and 7 patch releases (2024: 1 major, 2 minor and 6 patch releases).  1,086 merged pull requests from 87 distinct contributors, 31 of whom had their first pull request merged in 2025.  1,138 issues opened and 1,021 closed; the median time to a first response fell from 52 hours in 2024 to 31 hours.  2,416 automated tests at year end, up from 1,874, with line coverage of 84.2% (end of 2024: 79.5%).  Median search latency on the 100,000-note benchmark corpus fell from 131 ms in release 2.3.0 to 72 ms in release 2.6.0.  2 security advisories and 5 code of conduct reports, all closed by the end of the year. 2. Releases Minor releases follow a fixed 13-week cadence and are always published on a Tuesday. The planned dates are set a year in advance and do not move when a release is late; a delayed release simply shortens the following cycle. The project skipped the December 2024 slot so that no release would fall in the holiday period, and the cadence restarted on 18 February 2025. Patch releases are normally published on a Tuesday two weeks after the minor release they fix, unless a fix is urgent. In 2025 the four minor releases were planned for 18 February, 20 May, 19 August and 18 November. Releases 2.3.0 and 2.4.0 shipped on their planned dates. Releases 2.5.0 and 2.6.0
each shipped 7 days late, on 26 August and 25 November, because testing of the first release candidate found blocking bugs and a second release candidate was needed. Each minor release had its own release manager, except that Tobias Wren managed both 2.3.0 and 2.5.0. Version Release date Type Release candidates Merged pull requests Release manager 2.3.0 18 February 2025 Minor 1 241 Tobias Wren 2.4.0 20 May 2025 Minor 1 276 Priya Halloran 2.5.0 26 August 2025 Minor 2 259 Tobias Wren 2.6.0 25 November 2025 Minor 2 228 Dagny Oyelaran The seven patch releases were 2.3.1, 2.4.1, 2.4.2, 2.5.1, 2.5.2, 2.6.1 and 2.6.2. Two of them were unscheduled: 2.4.2 was published on Saturday 7 June to fix the index corruption bug described in section 5, and 2.5.2 was the security release for advisory KW-SA-2025-02. Release 2.5.1 was planned for 9 September but shipped on 12 September, 3 days late, because the release signing key had expired the day before the planned date. Because two of the four minor releases needed a second release candidate, the maintainers voted in December 2025 to lengthen the feature freeze from 7 days to 14 days before each minor release. In 2025 the translation string freeze fell on the same day as the feature freeze; from release 2.7.0 it falls 10 days before release, so that text changed by fixes in the first four days of the freeze can still be translated. Both changes apply from release 2.7.0, planned for 17 February 2026, whose release manager is Saoirse Lindqvist. 3. People: contributors, maintainers and conduct 87 people had at least one pull request merged in 2025, against 64 in 2024. Of these, 31 were first-time contributors. Based on the optional location given by 71 of the 87 contributors, they live in 23 countries. Documentation and translation changes made up 27% of merged pull requests, compared with 22% in 2024. The project started the year with 7 maintainers and ended it with 9. Saoirse Lindqvist became a maintainer on 8 April 2025 with responsibility for testing and continuous integration, and Ngozi Barraclough became a maintainer on 14 October 2025 with responsibility for Windows support. No maintainer stepped down. Commit access is offered to contributors who have had at least 10 pull requests merged over a period of at least 6 months and who are nominated by 2 existing maintainers; a nomination is accepted unless a maintainer objects within 7 days. The Seedling mentoring programme ran two cohorts of 12 weeks each. Applicants must be at least 16 years old, and each cohort takes at most 6 mentees, each paired with one maintainer. A maintainer mentors only one person at a time.
Cohort Dates Applications Mentees accepted Mentees completed Spring 2025 3 March to 25 May 2025 19 6 5 Autumn 2025 1 September to 23 November 2025 14 5 5 One spring mentee withdrew in week 4 because of school exams. Of the 10 mentees who completed the programme, 7 had at least one pull request merged by 31 December 2025. Code of conduct reports are handled by a committee of three: Ruth Abernethy (chair), Dagny Oyelaran and Hollis Fenwick, who is a contributor but not a maintainer. The committee received 5 reports in 2025, compared with 2 in 2024. Two reports led to no action, two led to a written warning and one led to a temporary ban of 30 days from all project spaces. All 5 reports were acknowledged within the 48-hour target. Four were decided within the 14-day target; the fifth took 19 days because Dagny Oyelaran had taken part in the discussion concerned and had to step aside, and a substitute had to be found. As a result, Felix Ondrasek was named standing substitute in January 2026. 4. Quality: tests, benchmarks and triage The test suite grew from 1,874 tests at the end of 2024 to 2,416 at the end of 2025, an increase of 542. Line coverage rose from 79.5% to 84.2%. A full run takes 6 minutes 40 seconds on the Linux runner and 9 minutes 12 seconds on the macOS runner. Every pull request is tested on Linux and macOS. Windows is tested only in the nightly run at 03:00 UTC, because the project has a single Windows runner. The coverage gate fails a pull request if total coverage drops by more than 0.5 percentage points or falls below 82%. During 2025, 14 flaky tests were moved to quarantine. A quarantined test must be fixed or deleted within 21 days; 12 were fixed and 2 were deleted, and none stayed in quarantine longer than the limit. Benchmarks run on a dedicated machine with 8 cores and 32 GB of memory, every Sunday at 02:00 UTC and on every release candidate. There are two corpora: a small corpus of 10,000 notes (48 MB) and a large corpus of 100,000 notes (471 MB). The table shows the large corpus for each minor release since 2.2.0. Release Index build time (s) Median search latency (ms) 95th percentile latency (ms) Peak memory (MB) 2.2.0 171.2 148 412 1,240 2.3.0 160.4 131 377 1,205 2.4.0 139.7 112 330 1,318 2.5.0 142.9 104 298 1,104 2.6.0 108.5 72 214 1,061 The largest single gain came in 2.6.0, where a new trigram pre-filter cut the median search latency on the large corpus by about 31% compared with 2.5.0. Peak memory rose by 9.4%
in 2.4.0 because of the new tag cache, just below the 10% regression threshold; the cache was made smaller in 2.5.0, which brought peak memory down to 1,104 MB. A pull request that makes median search latency or index build time more than 5% slower, or raises peak memory by more than 10%, is labelled perf-regression and may be merged only with the approval of the performance lead, Mateus Kowalczyk. In 2025, 6 pull requests received the label: 4 were merged after approval and 2 were closed. 1,138 issues were opened in 2025: 602 bug reports, 341 feature requests and 195 questions and other issues. 1,021 issues were closed, so the number of open issues rose from 412 at the start of the year to 529 at the end. The project aims to give every new issue a first response within 72 hours and a label within 7 days. Until July, triage was done by whoever had time. A weekly triage rota began on Monday 4 August 2025, with one maintainer on duty from Monday to Sunday; it covered 22 weeks by the end of the year. Before the rota, the monthly median first response ranged from 27 to 44 hours. From August to November it stayed between 24 and 29 hours; it rose to 39 hours in December, when fewer people were active over the holidays. In total, 64 issues were still unlabelled after 7 days, 50 of them in January to July. 5. Incidents and security Index corruption in 2.4.1. Release 2.4.1, published on 3 June 2025, contained a bug in the store module. Users with more than 50,000 notes who ran an incremental reindex could end up with a corrupted search index. Note files themselves were never damaged, because the index is stored separately from the notes. The first report arrived on 4 June, and 37 issue reports were filed in total. The fix shipped in 2.4.2 on 7 June, 4 days after 2.4.1; until then users were told to run a full reindex. The change that caused the bug had been approved by one maintainer, and no test used a corpus larger than 20,000 notes. As a result, changes to the index and store modules need approval from two maintainers from 1 January 2026, and a test with a 60,000-note corpus was added to the nightly run. Expired signing key. The release signing key, created on 8 September 2023 with a lifetime of 2 years, expired on 8 September 2025. This was discovered while signing 2.5.1 and delayed that release by 3 days. The new key, created on 11 September 2025, has a lifetime of 3 years and expires on 11 September 2028. A reminder issue is now opened automatically 90 days before the key expires. Continuous integration outage. The self-hosted Linux runners were offline from 14 to 22 October 2025, 9 days in all, after a disk failure. During the outage only documentation-only pull requests were merged, and 41 other pull requests waited until the runners were back. Two security advisories were published in 2025. Both were fixed within the 30-day embargo set by the security policy. Advisory Problem Reported Fixed in Days to fix KW-SA-2025- 01 Crash when a note contains 19 February 2025 2.3.1 (4 March 2025) 13
tags nested more than 500 levels deep KW-SA-2025- 02 Import of a crafted archive could write files outside the notes folder 2 September 2025 2.5.2 (30 September 2025) 28 The reporter of KW-SA-2025-01 is credited by name in the advisory. The reporter of KW- SA-2025-02 asked to remain anonymous. 6. Looking ahead Since 2019 the founder, Imogen Varga, has served as lead maintainer with the final say when maintainers cannot agree. She used this power 3 times in 2025. She has herself proposed that the role be replaced by an elected steering council. The proposal will be put to a vote at the annual meeting on 14 March 2026 and needs the support of two thirds of the maintainers, that is at least 6 of 9.  The steering council would have 5 seats with terms of 2 years; in the first election 3 seats would be for 2 years and 2 seats for 1 year, so that later elections are staggered.  Only maintainers who have held the role for at least 12 months could stand as candidates.  Anyone with at least 5 merged pull requests in the 12 months before voting opens could vote.  Decisions would need a quorum of 4 of the 5 members and a simple majority, except changes to the licence or the code of conduct, which would need 4 votes.  If the proposal is approved, nominations would run from 1 to 21 April 2026, voting from 1 to 14 May 2026, and the council would take office on 1 July 2026. The lead maintainer role would end on 30 June 2026. The release plan for 2026 keeps the 13-week cadence: 2.7.0 on 17 February, 2.8.0 on 19 May, 2.9.0 on 18 August and 3.0.0 on 17 November 2026. Release 3.0.0 will remove support for configuration format version 1, which has been deprecated since 2.2.0, and will raise the minimum Python version from 3.9 to 3.10. The maintainers propose four goals for 2026: line coverage of at least 86% by the end of the year, a median first response to issues below 24 hours, 100 distinct contributors with a merged pull request, and Windows tests on every pull request by release 2.9.0.

View file

@ -0,0 +1,237 @@
# Kettlewick Contributor Guide and Release Process
# Kettlewick Contributor Guide and Release Process
Version 4.2, effective 1 April 2026. Approved by the maintainers on 24 March 2026. This version replaces version 4.1 of 6 January 2026.
## 1. About this guide
This guide applies to everyone who contributes code, documentation, translations or reviews to the Kettlewick project. Maintainers must follow it in full. Contributors without commit access need to read sections 2 to 5 before opening their first pull request. Where this guide and an older wiki page disagree, this guide applies.
Changes in recent versions:
Version 4.1 (6 January 2026): changes to the index and store modules need two approvals; the feature freeze is 14 days instead of 7; the string freeze is 10 days before release.
Version 4.2 (1 April 2026): new section 8 on the steering council, after the governance proposal was approved on 14 March 2026; Felix Ondrasek added as standing substitute on the conduct committee.
## 2. Before you start
Every commit must carry a Signed-off-by line confirming that you have the right to submit the work under the project licence. Pull requests with unsigned commits are not merged.
Open an issue before you start on a large change. A change that touches more than 400 lines outside the tests, or that adds a new command, must have an issue with the label accepted before the pull request is opened.
Issues labelled good-first-issue are reserved for first-time contributors for 14 days after they are labelled.
Do not report security problems in public issues. Use the private security address described in section 6.
The Seedling mentoring programme pairs a new contributor with one maintainer for 12 weeks. Applicants must be at least 16 years old. Each cohort takes at most 6 mentees, and a maintainer may mentor only one mentee at a time. Applications close 4 weeks before a cohort starts.
Cohort
Application deadline
Start
End
Spring 2026
2 February 2026
2 March 2026
24 May 2026
Autumn 2026
3 August 2026
31 August 2026
22 November 2026
Commit access is offered to contributors who have had at least 10 pull requests merged over a period of at least 6 months and who are nominated by 2 maintainers. The nomination is accepted unless a maintainer objects within 7 days.
## 3. Pull requests and review
The number of approvals a pull request needs depends on what it changes. If a pull request touches more than one area, the strictest rule applies.
Area
Approvals needed
Who may approve
Notes
Core modules (index and store)
2
Maintainers
Since 1 January 2026; before that 1 approval
Command-line interface and other code
1
Maintainers
Plugins
1
Maintainers or plugin reviewers
Documentation only
1
Any maintainer
Must stay open for at least 48 hours before merging
Translations
1
The translation coordinator for that language, or any maintainer
Version bump before a release
1
Any maintainer other than the release manager
Exception to the self-merge rule below
A maintainer must not merge their own pull request. The only exception is the release manager, who may merge the version bump pull request after one approval from another maintainer.
Every pull request must pass the tests on Linux and macOS before it is merged.
Pull requests are merged by squash merge only.
Reviewers aim to give a first review within 5 days. If you have had no review after 5 days, you may ask in the review channel.
A pull request with no activity from its author for 60 days is closed with the label stale. The author may reopen it at any time.
## 4. Tests and benchmarks
Every bug fix must include a test that fails without the fix.
The coverage gate fails a pull request if total line coverage drops by more than 0.5 percentage points or falls below 82%.
Windows is tested only in the nightly run at 03:00 UTC. If the nightly Windows run fails because of your merged pull request, you are expected to help fix it within 7 days; otherwise the pull request may be reverted.
A flaky test may be moved to quarantine for at most 21 days, after which it must be fixed or deleted. No more than 10 tests may be in quarantine at the same time.
Do not add tests that need network access; they are skipped in the nightly run and do not count towards coverage.
Benchmarks run every Sunday at 02:00 UTC and on every release candidate, using a small corpus of 10,000 notes and a large corpus of 100,000 notes. You can ask for a benchmark run on your pull request by commenting /bench. Each pull request may have at most 3 requested runs, because the benchmark machine is shared by the whole project.
A pull request that makes median search latency or index build time more than 5% slower, or raises peak memory by more than 10%, on either corpus, is labelled perf-regression. It may be merged only with the approval of the performance lead, Mateus Kowalczyk, even if it already has the approvals required in section 3.
## 5. Issue triage
Triage is done by a weekly rota. The maintainer on duty covers Monday 00:00 UTC to Sunday 23:59 UTC. Every maintainer takes at least one week per quarter, and swaps must be recorded in the rota file before the week starts.
Every new issue should get a first response within 72 hours and a label within 7 days.
An issue labelled needs-info is closed if the reporter has not replied within 30 days. It can be reopened when the information arrives.
Duplicates are closed with a link to the older issue, even if the newer issue has more detail; the detail is copied across.
Feature requests are labelled feature and are not given a milestone until a maintainer agrees to review the work.
The person on duty must not close an issue they reported themselves.
## 6. Release process
Minor releases follow a fixed 13-week cadence and are published on a Tuesday. The planned dates for 2026 are 17 February (2.7.0), 19 May (2.8.0), 18 August (2.9.0) and 17 November (3.0.0). A late release does not move the next planned date. Each minor release has a release manager, who must have been a maintainer for at least 6 months. No one may manage two minor releases in a row. The release manager for 2.8.0 is Felix Ondrasek.
Step
When
Who
What it means
Feature freeze
14 days before release (a Tuesday)
Release manager
Only bug fixes and documentation may be merged into the release branch
String freeze
10 days before release (a Saturday)
Release manager and translation coordinators
No changes to user-visible text
First release candidate
7 days before release (a Tuesday)
Release manager
Published for testing; benchmarks run automatically
Final release
The planned Tuesday
Release manager
Only if no bug labelled blocker is open
Patch release
Normally 2 weeks after the minor release
Release manager of that minor release
Bug fixes only; no release candidate
A second release candidate is required if any change other than a documentation change is merged after the first release candidate.
The feature freeze was 7 days until the end of 2025. It was extended to 14 days from release 2.7.0 because two of the four minor releases in 2025 needed a second release candidate.
Releases are signed with the project key. The current key was created on 11 September 2025, has a lifetime of 3 years and expires on 11 September 2028. A reminder issue is opened automatically 90 days before expiry.
Security problems are reported to the private security address. The security team acknowledges a report within 3 working days. A fix is released and the advisory published within 30 days of the report, unless the reporter agrees to a longer embargo, which may never exceed 90 days. Security releases may be published on any day of the week and do not need a release candidate. Reporters are credited by name only if they agree.
## 7. Code of conduct reports
The code of conduct applies in all project spaces: the repository, the issue tracker, the chat channels and the annual meeting. Reports go to the conduct committee: Ruth Abernethy (chair), Dagny Oyelaran and Hollis Fenwick. Felix Ondrasek is the standing substitute.
The committee acknowledges a report within 48 hours and decides within 14 days.
A committee member who is involved in a report must step aside, and the standing substitute takes their place.
Possible outcomes are no action, a written warning, a temporary ban of up to 90 days from all project spaces, or a permanent ban.
A permanent ban needs a unanimous decision of the committee. From 1 July 2026 the person banned may ask the steering council to review it.
The reporter is told the outcome but not necessarily the details. Reports must not be discussed in public channels.
## 8. Governance from 1 July 2026
On 14 March 2026 the maintainers approved the proposal to replace the lead maintainer with an elected steering council. Eight maintainers voted for, none voted against and one abstained; at least 6 of 9 votes were needed. Until 30 June 2026 the lead maintainer, Imogen Varga, keeps the final say when maintainers cannot agree.
The steering council has 5 seats. In the first election 3 seats are for 2 years and 2 seats for 1 year; after that all terms are 2 years.
Candidates must have been maintainers for at least 12 months when nominations close.
Anyone with at least 5 merged pull requests in the 12 months before voting opens may vote.
No more than 2 council members may work for the same organisation.
The council decides by simple majority with a quorum of 4 members. Changes to the licence, the code of conduct or this section need 4 votes.
Nominations run from 1 to 21 April 2026 and voting from 1 to 14 May 2026. The council takes office on 1 July 2026.

View file

@ -0,0 +1,175 @@
## Kettlewick Annual Maintainers' Meeting 2026
## Kettlewick annual maintainers' meeting 2026
The meeting is held online on Saturday 14 March 2026 from 14:00 to 17:00 UTC.
All 9 maintainers are invited, and Ruth Abernethy chairs the meeting.
The vote on the steering council proposal is the last item on the agenda.
## Agenda
Review of 2025: releases, incidents, quality and people.
First experience with the longer feature freeze in release 2.7.0.
The steering council proposal, followed by questions and the vote.
Plans and goals for 2026.
## 2025 in numbers
We shipped 11 releases in 2025, two more than the 9 in 2024.
We merged 1,086 pull requests, up from 812 in 2024.
87 people had a pull request merged, and 31 of them were new contributors.
1,138 issues were opened and 1,021 were closed, so 529 issues were open at year end.
## Releases in 2025
Four minor releases followed the 13-week cadence, always on a Tuesday.
Releases 2.5.0 and 2.6.0 each shipped 7 days late because they needed a second release candidate.
Seven patch releases shipped, two of them unscheduled: 2.4.2 and the security release 2.5.2.
Tobias Wren managed 2.3.0 and 2.5.0, Priya Halloran managed 2.4.0 and Dagny Oyelaran managed 2.6.0.
## Release 2.7.0: the first with a 14-day freeze
Release 2.7.0 shipped on its planned date, Tuesday 17 February 2026.
It needed only one release candidate.
The feature freeze started on 3 February and the string freeze on 7 February.
Saoirse Lindqvist was release manager, and Felix Ondrasek manages 2.8.0 on 19 May.
## Incident: index corruption in 2.4.1
Users with more than 50,000 notes could get a corrupted index after an incremental reindex.
Note files were never damaged, because the index is stored separately.
37 issue reports came in, and the fix shipped in 2.4.2 four days later, on 7 June.
Since 1 January 2026, changes to the index and store modules need two approvals instead of one.
## Incidents: signing key and CI outage
The signing key expired on 8 September 2025 and delayed 2.5.1 by 3 days.
The new key lasts 3 years, and a reminder issue opens 90 days before it expires.
The Linux runners were offline for 9 days, from 14 to 22 October, after a disk failure.
During the outage only documentation-only pull requests were merged, and 41 others had to wait.
## Security advisories
KW-SA-2025-01, a crash on deeply nested tags, was reported on 19 February and fixed in 2.3.1 after 13 days.
KW-SA-2025-02, a path problem in import, was reported on 2 September and fixed in 2.5.2 after 28 days.
Both fixes stayed within the 30-day embargo.
## Test suite
The suite grew from 1,874 to 2,416 tests during 2025.
Line coverage rose from 79.5% to 84.2%.
A full run takes 6 minutes 40 seconds on Linux and 9 minutes 12 seconds on macOS.
14 flaky tests went into quarantine; 12 were fixed and 2 were deleted within the 21-day limit.
## Benchmarks
On the large corpus, median search latency fell from 104 ms in 2.5.0 to 72 ms in 2.6.0.
Since 2.2.0, median latency on the large corpus has fallen from 148 ms to 72 ms.
Peak memory rose 9.4% in 2.4.0, just under the 10% threshold, and fell again in 2.5.0.
Six pull requests were labelled perf-regression in 2025; four were merged after approval.
## Issue triage and the rota
The median first response fell from 52 hours in 2024 to 31 hours in 2025.
The weekly rota began on 4 August 2025 and covered 22 weeks by year end.
From August to November the monthly median stayed between 24 and 29 hours.
64 issues were unlabelled after 7 days, 50 of them before the rota began.
## Contributors and the Seedling programme
Saoirse Lindqvist joined as maintainer in April and Ngozi Barraclough in October 2025.
The two Seedling cohorts accepted 11 mentees, and 10 completed the 12 weeks.
7 of the 10 who completed had a pull request merged by the end of 2025.
The spring 2026 cohort started on 2 March with applications closed on 2 February.
## Code of conduct
The committee received 5 reports in 2025, compared with 2 in 2024.
The outcomes were 2 with no action, 2 written warnings and 1 temporary ban of 30 days.
One decision took 19 days instead of 14 because a committee member had to step aside.
Felix Ondrasek has been the standing substitute since January 2026.
## Proposal: a steering council
The lead maintainer role would be replaced by an elected council of 5 members.
Imogen Varga used the lead maintainer's final say 3 times in 2025.
Terms would be 2 years, with 2 of the first 5 seats lasting only 1 year.
No more than 2 council members could work for the same organisation.
## Proposal: who can stand and who can vote
Candidates must have been maintainers for at least 12 months when nominations close.
Eight of the nine current maintainers would be eligible to stand in the first election.
Anyone with at least 5 merged pull requests in the 12 months before voting opens could vote.
Changes to the licence or the code of conduct would need 4 of the 5 council votes.
## Proposal: timeline if approved
Nominations would run from 1 to 21 April 2026.
Voting would run from 1 to 14 May 2026.
The council would take office on 1 July 2026, and the lead maintainer role would end on 30 June.
Today the proposal needs at least 6 of the 9 maintainers to vote for it.
## Plans for 2026
Minor releases are planned for 19 May (2.8.0), 18 August (2.9.0) and 17 November (3.0.0).
Release 3.0.0 removes configuration format version 1 and requires Python 3.10 or newer.
Seedling autumn 2026 runs from 31 August to 22 November, with applications closing on 3 August.
## Goals for 2026
Reach line coverage of at least 86% by the end of 2026.
Bring the median first response to issues below 24 hours.
Reach 100 distinct contributors with a merged pull request.
Run Windows tests on every pull request by release 2.9.0.

View file

@ -0,0 +1,66 @@
#### Release history
A: Version | B: Release date | C: Type | D: Planned date | E: Delay (days) | F: Release candidates (count) | G: Merged pull requests (count) | H: Release manager | I: Notes
A: 2.0.0 | B: 2024-03-12 | C: Major | D: 2024-03-12 | E: 0 | F: 3 | G: 302 | H: Imogen Varga | I: New plugin interface; configuration format version 2 introduced
A: 2.0.1 | B: 2024-03-26 | C: Patch | D: 2024-03-26 | E: 0 | F: 0 | G: 21 | H: Imogen Varga | I: Fixes for plugin loading
A: 2.1.0 | B: 2024-06-11 | C: Minor | D: 2024-06-11 | E: 0 | F: 1 | G: 198 | H: Tobias Wren | I: Saved searches
A: 2.1.1 | B: 2024-06-25 | C: Patch | D: 2024-06-25 | E: 0 | F: 0 | G: 15 | H: Tobias Wren
A: 2.1.2 | B: 2024-07-16 | C: Patch | D: 2024-07-16 | E: 0 | F: 0 | G: 9 | H: Tobias Wren | I: Encoding fix for note titles
A: 2.2.0 | B: 2024-09-10 | C: Minor | D: 2024-09-10 | E: 0 | F: 1 | G: 214 | H: Priya Halloran | I: Configuration format version 1 deprecated
A: 2.2.1 | B: 2024-09-24 | C: Patch | D: 2024-09-24 | E: 0 | F: 0 | G: 17 | H: Priya Halloran
A: 2.2.2 | B: 2024-10-29 | C: Patch | D: 2024-10-29 | E: 0 | F: 0 | G: 20 | H: Priya Halloran
A: 2.2.3 | B: 2024-12-03 | C: Patch | D: 2024-12-03 | E: 0 | F: 0 | G: 16 | H: Priya Halloran | I: Last release of 2024; December minor slot skipped
A: 2.3.0 | B: 2025-02-18 | C: Minor | D: 2025-02-18 | E: 0 | F: 1 | G: 241 | H: Tobias Wren | I: Cadence restarted
A: 2.3.1 | B: 2025-03-04 | C: Patch | D: 2025-03-04 | E: 0 | F: 0 | G: 18 | H: Tobias Wren | I: Includes fix for KW-SA-2025-01
A: 2.4.0 | B: 2025-05-20 | C: Minor | D: 2025-05-20 | E: 0 | F: 1 | G: 276 | H: Priya Halloran | I: Tag cache added
A: 2.4.1 | B: 2025-06-03 | C: Patch | D: 2025-06-03 | E: 0 | F: 0 | G: 22 | H: Priya Halloran | I: Introduced index corruption bug for corpora over 50,000 notes
A: 2.4.2 | B: 2025-06-07 | C: Patch | D: unscheduled | E: n/a | F: 0 | G: 3 | H: Priya Halloran | I: Emergency fix for index corruption, published on a Saturday
A: 2.5.0 | B: 2025-08-26 | C: Minor | D: 2025-08-19 | E: 7 | F: 2 | G: 259 | H: Tobias Wren | I: Second release candidate needed; tag cache made smaller
A: 2.5.1 | B: 2025-09-12 | C: Patch | D: 2025-09-09 | E: 3 | F: 0 | G: 14 | H: Tobias Wren | I: Delayed by expired signing key
A: 2.5.2 | B: 2025-09-30 | C: Patch | D: unscheduled | E: n/a | F: 0 | G: 2 | H: Tobias Wren | I: Security release for KW-SA-2025-02
A: 2.6.0 | B: 2025-11-25 | C: Minor | D: 2025-11-18 | E: 7 | F: 2 | G: 228 | H: Dagny Oyelaran | I: Second release candidate needed; trigram pre-filter
A: 2.6.1 | B: 2025-12-09 | C: Patch | D: 2025-12-09 | E: 0 | F: 0 | G: 19 | H: Dagny Oyelaran
A: 2.6.2 | B: 2025-12-23 | C: Patch | D: 2025-12-23 | E: 0 | F: 0 | G: 4 | H: Dagny Oyelaran | I: Last release of 2025
#### Benchmarks
A: Release | B: Corpus | C: Notes in corpus (count) | D: Corpus size (MB) | E: Index build time (s) | F: Median search latency (ms) | G: 95th percentile latency (ms) | H: Peak memory (MB) | I: Change in median latency vs previous release (%) | J: Notes
A: 2.2.0 | B: Small | C: 10000 | D: 48 | E: 14.8 | F: 21 | G: 63 | H: 182 | I: n/a | J: Baseline for this sheet
A: 2.2.0 | B: Large | C: 100000 | D: 471 | E: 171.2 | F: 148 | G: 412 | H: 1240 | I: n/a | J: Baseline for this sheet
A: 2.3.0 | B: Small | C: 10000 | D: 48 | E: 13.9 | F: 19 | G: 58 | H: 176 | I: -9.5
A: 2.3.0 | B: Large | C: 100000 | D: 471 | E: 160.4 | F: 131 | G: 377 | H: 1205 | I: -11.5
A: 2.4.0 | B: Small | C: 10000 | D: 48 | E: 12.1 | F: 17 | G: 51 | H: 188 | I: -10.5 | J: Peak memory +6.8% from tag cache
A: 2.4.0 | B: Large | C: 100000 | D: 471 | E: 139.7 | F: 112 | G: 330 | H: 1318 | I: -14.5 | J: Peak memory +9.4%, just under the 10% threshold
A: 2.5.0 | B: Small | C: 10000 | D: 48 | E: 12.4 | F: 16 | G: 47 | H: 171 | I: -5.9 | J: Index build +2.5%, under the 5% threshold
A: 2.5.0 | B: Large | C: 100000 | D: 471 | E: 142.9 | F: 104 | G: 298 | H: 1104 | I: -7.1 | J: Smaller tag cache lowered peak memory
A: 2.6.0 | B: Small | C: 10000 | D: 48 | E: 9.6 | F: 11 | G: 34 | H: 165 | I: -31.3 | J: Trigram pre-filter
A: 2.6.0 | B: Large | C: 100000 | D: 471 | E: 108.5 | F: 72 | G: 214 | H: 1061 | I: -30.8 | J: Trigram pre-filter
#### Issue triage 2025
A: Month (2025) | B: Issues opened (count) | C: Issues closed (count) | D: Bug reports (count) | E: Feature requests (count) | F: Questions and other (count) | G: Median first response (hours) | H: Unlabelled after 7 days (count) | I: Triage arrangement | J: Notes
A: January | B: 84 | C: 71 | D: 44 | E: 25 | F: 15 | G: 44 | H: 9 | I: No rota
A: February | B: 79 | C: 75 | D: 41 | E: 24 | F: 14 | G: 41 | H: 7 | I: No rota
A: March | B: 102 | C: 88 | D: 55 | E: 30 | F: 17 | G: 38 | H: 6 | I: No rota | J: Spike after 2.3.0 release
A: April | B: 88 | C: 80 | D: 46 | E: 27 | F: 15 | G: 35 | H: 5 | I: No rota
A: May | B: 97 | C: 83 | D: 50 | E: 30 | F: 17 | G: 33 | H: 4 | I: No rota
A: June | B: 131 | C: 122 | D: 82 | E: 28 | F: 21 | G: 27 | H: 11 | I: No rota | J: 37 reports of index corruption after 2.4.1
A: July | B: 86 | C: 79 | D: 45 | E: 26 | F: 15 | G: 36 | H: 8 | I: No rota
A: August | B: 104 | C: 90 | D: 56 | E: 31 | F: 17 | G: 29 | H: 3 | I: Weekly rota | J: Weekly rota began Monday 4 August
A: September | B: 95 | C: 87 | D: 52 | E: 27 | F: 16 | G: 28 | H: 2 | I: Weekly rota
A: October | B: 92 | C: 84 | D: 47 | E: 29 | F: 16 | G: 26 | H: 2 | I: Weekly rota | J: CI outage 14 to 22 October
A: November | B: 99 | C: 86 | D: 45 | E: 34 | F: 20 | G: 24 | H: 1 | I: Weekly rota
A: December | B: 81 | C: 76 | D: 39 | E: 30 | F: 12 | G: 39 | H: 6 | I: Weekly rota | J: Holiday period; fewer people active
#### Maintainers
A: Name | B: Role | C: Maintainer since | D: Main area | E: Triage weeks in 2025 (count) | F: Pull request reviews in 2025 (count) | G: Release manager for | H: Notes
A: Imogen Varga | B: Lead maintainer until 30 June 2026 | C: 2019-04 | D: Index module | E: 2 | F: 188 | G: 2.0.0 | H: Founder of the project
A: Tobias Wren | B: Maintainer | C: 2020-11 | D: Release tooling | E: 3 | F: 214 | G: 2.1.0, 2.3.0, 2.5.0
A: Priya Halloran | B: Maintainer | C: 2021-03 | D: Store module and sync | E: 3 | F: 201 | G: 2.2.0, 2.4.0
A: Dagny Oyelaran | B: Maintainer | C: 2021-09 | D: Documentation and translations | E: 2 | F: 167 | G: 2.6.0 | H: Conduct committee member
A: Mateus Kowalczyk | B: Performance lead | C: 2022-06 | D: Benchmarks and search speed | E: 3 | F: 139 | H: Approves perf-regression pull requests
A: Ruth Abernethy | B: Maintainer | C: 2023-02 | D: Community | E: 2 | F: 96 | H: Chair of the conduct committee
A: Felix Ondrasek | B: Maintainer | C: 2024-01 | D: Plugins | E: 3 | F: 158 | H: Standing conduct substitute from January 2026; release manager for 2.8.0
A: Saoirse Lindqvist | B: Maintainer | C: 2025-04-08 | D: Testing and continuous integration | E: 3 | F: 172 | H: Release manager for 2.7.0
A: Ngozi Barraclough | B: Maintainer | C: 2025-10-14 | D: Windows support | E: 1 | F: 41 | H: Joined in October 2025

View file

@ -0,0 +1,9 @@
Lyngmo Idrettslag – Årsmelding 2025 Lyngmo Idrettslag – Årsmelding 2025 Årsmeldingen gjelder perioden 1. januar til 31. desember 2025 og legges fram for årsmøtet torsdag 19. mars 2026 kl. 19:00 i klubbhuset på Lyngmoen. Den er skrevet av styret med bidrag fra lederne i langrennsgruppa, orienteringsgruppa, idrettsskolen, hyttekomiteen og løypekomiteen. Regnskapet er revidert av lagets to valgte revisorer, Per Ottar Lunde og Gunvor Aaslie, som leverte sin beretning 2. mars 2026. 1. Styret og organisasjon Styret har i 2025 bestått av leder Torunn Bakkevold, nestleder Eivind Rustad, kasserer Sigrun Høiby, sekretær Halvard Moen og styremedlem Ingrid Fjelstad. Varamedlemmer har vært Rolf Engebakken og Synnøve Bratlie. Styret har holdt 11 styremøter og behandlet 74 saker, mot 9 møter og 61 saker året før. Alle styremøter holdes første tirsdag i måneden, med unntak av juli, da det ikke holdes møte. Under styret ligger fem faste utvalg. Langrennsgruppa ledes av Marte Kvamsdal, orienteringsgruppa av Bjørnar Teigen og idrettsskolen av Hanne Sæther. Hyttekomiteen ledes av hyttesjef Kåre Lien, og løypekomiteen ledes av løypesjef Arnstein Vold. Rennleder for Lyngmorennet var Øystein Brekke, som har hatt rollen siden 2021. Laget hadde 684 medlemmer per 31. desember 2025, mot 641 ett år tidligere. Det er en økning på 43 medlemmer, eller 6,7 prosent. Veksten kom i hovedsak blant barn under 13 år, fordi idrettsskolen tok inn flere barn enn før. Tabellen viser medlemmene fordelt på kategori. Kategori Alder Medlemmer 31.12.2025 Medlemmer 31.12.2024 Barn 0–12 år 231 204 Ungdom 13–19 år 118 112 Voksen 20–66 år 268 262 Honnør 67 år og eldre 67 63 Sum 684 641 I tillegg hadde laget 29 støttemedlemmer. Støttemedlemmer betaler 200 kr i året, men de har ikke stemmerett på årsmøtet og kan ikke velges til tillitsverv. De er derfor ikke tatt med i tallene over. Av de ordinære medlemmene var 142 husstander registrert med familiemedlemskap. 2. Aktivitet i gruppene Langrennsgruppa hadde 96 aktive utøvere mellom 8 og 16 år i 2025, mot 88 året før. Gruppa er delt i tre treningsgrupper: 8–10 år, 11–12 år og konkurransegruppa for 13–16 år. Konkurransegruppa hadde 27 utøvere og deltok til sammen i 34 renn utenfor Lyngmoen. Gruppa hadde 21 trenere, og 9 av dem fullførte lagets grunnkurs for trenere i løpet av året.
Fellestreningene for 8–12 år ble holdt i lysløypa på tirsdager og torsdager fra 1. desember 2025, så snart det var nok snø. På grunn av lite snø i begynnelsen av desember ble de fire første treningene holdt som løpetrening på stiene ved Tjernåsen i stedet. Barmarkstreningen fra august til november samlet i snitt 41 barn per kveld. Sommerens samling for konkurransegruppa ble holdt på Granlihytta 15.–17. august 2025 med 22 deltakere. Egenandelen var 650 kr per deltaker, og laget dekket resten av kostnaden på 17 900 kr. Utlånsordningen for ski hadde 46 par klassiske ski og 30 par skøyteski ved utgangen av 2025. Ordningen er bare for medlemmer under 13 år. Familiene betaler et depositum på 300 kr per par, og depositumet betales tilbake når skiene leveres innen 30. april. Skiene ble lånt ut 61 ganger i løpet av sesongen, og 4 par ble kassert fordi de var for slitt til å repareres. Orienteringsgruppa hadde 41 aktive medlemmer i 2025. Gruppa arrangerte 13 karusellløp på tirsdager fra 6. mai til 2. september, med sommerpause i hele juli. Karusellen hadde til sammen 1 126 starter, eller i snitt 87 starter per løp. Det beste enkeltløpet var 10. juni med 121 starter. Karusellen er åpen for alle, men bare medlemmer kan delta i sammenlagtkonkurransen. Det nye kartet over Tjernåsen nord ble ferdig i august 2025. Kartet dekker 3,8 kvadratkilometer og er tegnet i målestokk 1:7 500 for barn og 1:10 000 for voksne. Kartarbeidet kostet 45 000 kr og ble i sin helhet betalt med gaver fra lokale givere som ønsket å være anonyme. Derfor belastet kartet ikke driftsbudsjettet. Idrettsskolen er for barn fra 6 til og med 11 år og holdes på onsdager kl. 17:30–18:45 ved klubbhuset. Vårsemesteret varte fra 8. januar til 7. mai 2025 og hadde 52 barn. Høstsemesteret varte fra 3. september til 26. november 2025 og hadde 58 barn, som er nær taket på 60 barn. Idrettsskolen hadde sju faste instruktører. Om vinteren går idrettsskolen på ski i Barnerunden, og resten av året veksler barna mellom løping, ballaktiviteter og enkel orientering. Tre onsdager i 2025 ble avlyst: to fordi temperaturen var lavere enn minus 12 grader, og én fordi klubbhuset hadde vannlekkasje. 3. Anlegg: lysløypa og løypenettet Lagets løypenett ligger ved Tjernåsen og består av fire løyper. Storrunden er 4,2 km lang og er opplyst. Barnerunden er 1,1 km lang og er også opplyst. Granlirunden er 9,5 km og går fra lysløypa til Granlihytta og tilbake, men den har ikke lys. Hundesporet er 3,0 km og er heller ikke opplyst. Løype Lengde Lys Stilart Hund Storrunden 4,2 km Ja, 06:00–22:00 Klassisk og skøyting Ikke tillatt 1. des.–15. april Barnerunden 1,1 km Ja, 16:00–21:00 Bare klassisk Ikke tillatt 1. des.–15. april
Granlirunden 9,5 km Nei Klassisk og skøyting Tillatt i bånd Hundesporet 3,0 km Nei Klassisk Tillatt Fra 1. januar 2025 slås lyset i Storrunden av kl. 22:00 i stedet for kl. 23:00, som var tidligere praksis. Endringen ble vedtatt for å spare strøm. Som følge av endringen falt strømkostnaden for lysløypa fra 71 200 kr i 2024 til 61 200 kr i 2025, en nedgang på 14 prosent. Lyset i Barnerunden står på mellom kl. 16:00 og 21:00, fordi runden først og fremst brukes av barnefamilier tidlig på kvelden. Løypekomiteen preparerte lysløypa 61 ganger i sesongen 2024/2025, mot 54 ganger sesongen før. Frivillige brukte til sammen 486 timer på preparering. Lysløypa prepareres bare når snødybden er minst 20 cm, og Granlirunden prepareres bare når snødybden er minst 30 cm, fordi terrenget der har mer stein og røtter. Skøytetraseen i Storrunden kjøres opp bare på tirsdager, torsdager og lørdager, slik at klassisksporet holder seg fint de andre dagene. Hunder har ikke lov til å være i Storrunden eller Barnerunden fra 1. desember til 15. april. Hundesporet ble lagt i 2023 nettopp for at hundeeiere skal ha et eget tilbud. I Granlirunden er hund tillatt i bånd, med unntak av dagen for Lyngmorennet, da løypa er stengt for alle andre enn løpere og funksjonærer. 4. Granlihytta Granlihytta ligger ved Granlitjernet, 4,6 km fra startområdet ved lysløypa. Hytta har 22 sengeplasser fordelt på 6 soverom, en stor stue med vedovn og et kjøkken med plass til 40 personer. Hytta har strøm, men ikke innlagt vann om vinteren. Vann hentes da fra kilden 150 meter nedenfor hytta. Hytta hadde 312 gjestedøgn i 2025, mot 287 i 2024. Overnatting er forbeholdt medlemmer og gjester som er med et medlem. Leietakeren må være minst 25 år og være medlem av laget. Prisen i 2025 var 150 kr per natt for medlemmer og 250 kr per natt for gjester. Hele hytta kan leies for en helg, fra fredag kl. 16:00 til søndag kl. 15:00, for 3 500 kr. Helgeleie av hele hytta er kun for medlemmer.  Booking skal gjøres hos hyttesjefen senest 14 dager før ankomst.  Avbestilling er gratis inntil 7 dager før ankomst; senere avbestilling koster 50 prosent av leien.  Leietakeren skal vaske hytta før avreise. Blir hytta ikke vasket, belastes et vaskegebyr på 600 kr.  Røyking er forbudt både inne i hytta og på verandaen.  Hund kan være i stua og gangen, men ikke på soverommene. Kafeen i Granlihytta var åpen 13 søndager fra 5. januar til 30. mars 2025, kl. 11:00–15:00. Kafeen hadde 2 870 besøkende og omsatte for 96 300 kr. Vaffelsalget alene utgjorde omtrent en tredjedel av omsetningen. Kafeen drives helt av frivillige, og hver søndag krever fire vakter.
Sommeren 2025 ble det oppdaget lekkasje i taket over to av soverommene. Hyttekomiteen gjorde en midlertidig reparasjon for 38 000 kr, men taktekkeren som besiktiget hytta i september anbefalte å skifte hele taket innen to år. Kostnaden er anslått til 420 000 kr. Styret foreslår derfor for årsmøtet at taket skiftes sommeren 2026, og at arbeidet finansieres med overskuddet fra 2025 og en del av egenkapitalen. Vedlikeholdskostnaden for hytta ble 188 400 kr i 2025, nesten tre ganger så høy som i 2024, fordi også pipa ble murt om og vedboden fikk ny grunnmur. 5. Lyngmorennet 2025 Det 31. Lyngmorennet ble arrangert søndag 9. februar 2025 med start og mål ved lysløypa. Rennet hadde 368 startende, mot 341 i 2024. Klassene for barn opp til 12 år gikk 2 km eller 3 km i Storrunden og Barnerunden, mens ungdom og voksne gikk 10 km eller 20 km med Granlirunden som hoveddel. Første start gikk kl. 10:00. Startkontingenten var 100 kr for barn opp til 12 år, 150 kr for ungdom 13–16 år og 300 kr for alle fra 17 år. Etteranmelding kostet 100 kr ekstra uansett klasse. Påmeldingsfristen var onsdag 5. februar kl. 23:59, fire dager før rennet. Rennet hadde 71 funksjonærer, og alle var frivillige. Rennet ga inntekter på 164 200 kr og kostnader på 76 800 kr, slik at overskuddet ble 87 400 kr. Overskuddet går uavkortet til drift av lysløypa. Neste renn, det 32. Lyngmorennet, ble fastsatt til søndag 8. februar 2026. 6. Dugnad Medlemmene la ned 3 140 dugnadstimer i 2025, mot 2 870 timer i 2024. Den største enkeltdugnaden var Lyngmorennet, med omtrent 640 timer. Hyttedugnaden 7. juni samlet 34 personer, som hogg og stablet om lag 18 favner ved. Laget kunne ikke drevet Granlihytta, lysløypa og rennet uten denne innsatsen. Dugnadsordningen er uendret fra 2024: hver familie med barn i langrenn eller orientering skal ta to dugnadsvakter per sesong, og familier som bare har barn i idrettsskolen skal ta én vakt. En vakt varer minst fire timer. Familier som ikke tar vaktene sine, betaler en dugnadsavgift på 800 kr per vakt. I 2025 ble det fakturert dugnadsavgift for 23 vakter, til sammen 18 400 kr, som er inntektsført under treningsavgifter. 7. Økonomi og veien videre Regnskapet for 2025 viser et overskudd på 285 800 kr, mot 120 700 kr i 2024. Overskuddet i 2024 var lavere fordi laget det året kjøpte nytt tidtakingsutstyr for 168 000 kr. Det store overskuddet i 2025 skyldes særlig økte inntekter fra kontingent, treningsavgifter og hytteutleie, og at gavene til kartet over Tjernåsen nord kom inn som ekstraordinær inntekt. Tabellen viser hovedpostene. Post 2025 (kr) 2024 (kr) Inntekt: Medlemskontingent 312 400 281 600
Inntekt: Treningsavgifter 198 600 172 400 Inntekt: Lyngmorennet 164 200 149 500 Inntekt: Hytteutleie Granlihytta 141 800 128 300 Inntekt: Kafé i Granlihytta 96 300 88 700 Inntekt: Gaver og innsamling 45 000 12 000 Sum inntekter 958 300 832 500 Kostnad: Vedlikehold Granlihytta 188 400 64 200 Kostnad: Utstyr 97 500 283 100 Kostnad: Lyngmorennet 76 800 71 900 Kostnad: Løypepreparering 74 800 69 500 Kostnad: Strøm lysløypa 61 200 71 200 Kostnad: Idrettsskolen 51 300 47 600 Kostnad: Trenerutdanning 42 000 28 000 Kostnad: Kafévarer 41 900 39 400 Kostnad: Administrasjon 38 600 36 900 Sum kostnader 672 500 711 800 Årsresultat 285 800 120 700 Egenkapitalen var 1 146 000 kr per 31. desember 2025. Laget har ingen lån. Styret foreslår at hele overskuddet for 2025 settes av til nytt tak på Granlihytta. Medlemskontingenten for 2025 var 600 kr for voksne og 1 300 kr for familier. Styret vil foreslå for årsmøtet at voksenkontingenten økes til 650 kr og familiekontingenten til 1 400 kr fra 2026, mens kontingenten for barn, ungdom og honnør holdes uendret. Kostnaden til trenerutdanning økte fra 28 000 kr til 42 000 kr, fordi ni trenere tok grunnkurset. Laget betaler kurset bare når treneren forplikter seg til å være trener i minst to sesonger etter kurset. Slutter treneren før det, må halvparten av kursavgiften betales tilbake. Styret takker alle trenere, instruktører, funksjonærer, hyttevakter og løypekjørere for innsatsen i 2025. Det viktigste målet for 2026 er å skifte taket på Granlihytta uten å svekke tilbudet til barn og unge. Styret ønsker også å utvide idrettsskolen til 70 plasser fra høsten 2027, men bare dersom laget finner minst tre nye instruktører. Lyngmoen, 2. mars 2026. Torunn Bakkevold, Eivind Rustad, Sigrun Høiby, Halvard Moen, Ingrid Fjelstad.

View file

@ -0,0 +1,173 @@
## Årsmøte i Lyngmo Idrettslag 19. mars 2026
## Årsmøte i Lyngmo Idrettslag 2026
Årsmøtet holdes torsdag 19. mars 2026 kl. 19:00 i klubbhuset på Lyngmoen.
Bare medlemmer som har fylt 15 år og har betalt kontingenten for 2025, har stemmerett.
Støttemedlemmer kan være til stede, men de kan ikke stemme.
Møteleder er foreslått å være Rolf Engebakken.
## Saksliste
Sak 1–3: Godkjenning av innkalling, saksliste og møteleder.
Sak 4: Årsmelding for 2025.
Sak 5: Regnskap for 2025 med revisorenes beretning.
Sak 6: Forslag om ny kontingent fra 2026.
Sak 7: Forslag om å skifte taket på Granlihytta sommeren 2026.
Sak 8 og 9: Budsjett for 2026 og valg.
## Medlemmer
Laget hadde 684 medlemmer per 31. desember 2025, mot 641 året før.
Økningen på 43 medlemmer kom mest blant barn under 13 år.
Barnegruppen 0–12 år vokste fra 204 til 231 medlemmer.
I tillegg hadde laget 29 støttemedlemmer, som ikke telles med i medlemstallet.
## Langrenn
Langrennsgruppa hadde 96 aktive utøvere i 2025, og 101 per mars 2026.
Konkurransegruppa for 13–16 år hadde 27 utøvere og gikk 34 renn utenfor Lyngmoen i 2025.
Ni trenere tok grunnkurset for trenere i 2025.
De fire første skitreningene i desember 2025 ble løpetrening fordi det var for lite snø.
## Orientering
Tirsdagskarusellen hadde 13 løp fra 6. mai til 2. september 2025.
Karusellen fikk 1 126 starter, i snitt 87 per løp.
Det nye kartet over Tjernåsen nord dekker 3,8 kvadratkilometer.
Kartet kostet 45 000 kr og ble betalt fullt ut med gaver.
## Idrettsskolen
Idrettsskolen hadde 52 barn våren 2025 og 58 barn høsten 2025.
Taket er 60 barn per semester, og vårsemesteret 2026 er fullt.
Tre onsdager ble avlyst i 2025, to av dem på grunn av kulde under minus 12 grader.
Styret vil utvide til 70 plasser fra høsten 2027 hvis tre nye instruktører melder seg.
## Lysløypa og løypenettet
Lyset i Storrunden slås av kl. 22:00 fra 1. januar 2025, mot kl. 23:00 tidligere.
Strømkostnaden falt fra 71 200 kr i 2024 til 61 200 kr i 2025.
Lysløypa ble preparert 61 ganger i sesongen 2024/2025, mot 54 ganger sesongen før.
Vinteren 2026 ble Granlirunden først preparert 17. januar, fordi den krever minst 30 cm snø.
## Granlihytta
Hytta hadde 312 gjestedøgn i 2025, mot 287 i 2024.
Kafeen hadde 2 870 besøkende på 13 søndager i 2025.
Per 15. mars 2026 har kafeen hatt 2 460 besøkende på 11 søndager.
Vedlikeholdet kostet 188 400 kr i 2025 på grunn av taklekkasje, ny pipe og ny grunnmur under vedboden.
## Lyngmorennet 2025
Det 31. Lyngmorennet gikk søndag 9. februar 2025 med 368 startende.
Rennet hadde 71 frivillige funksjonærer.
Inntektene var 164 200 kr og kostnadene 76 800 kr.
Overskuddet på 87 400 kr gikk til drift av lysløypa.
## Lyngmorennet 2026
Det 32. Lyngmorennet gikk søndag 8. februar 2026 med 412 startende.
Rennet hadde 83 funksjonærer, som er 12 flere enn i 2025.
Foreløpig regnskap viser et overskudd på 94 100 kr.
Det 33. Lyngmorennet er satt til søndag 7. februar 2027.
## Dugnad
Medlemmene la ned 3 140 dugnadstimer i 2025, mot 2 870 timer i 2024.
Lyngmorennet alene krevde omtrent 640 dugnadstimer.
Det ble fakturert dugnadsavgift for 23 vakter i 2025, til sammen 18 400 kr.
Fra sesongen 2026–2027 teller en seks timers vakt under Lyngmorennet som to vakter.
## Regnskap 2025
Inntektene var 958 300 kr og kostnadene 672 500 kr.
Årsresultatet ble et overskudd på 285 800 kr, mot 120 700 kr i 2024.
Egenkapitalen var 1 146 000 kr per 31. desember 2025, og laget har ingen lån.
Revisorene Per Ottar Lunde og Gunvor Aaslie anbefaler at regnskapet godkjennes.
## Sak 6: Ny kontingent fra 2026
Styret foreslår å øke voksenkontingenten fra 600 kr til 650 kr.
Styret foreslår å øke familiekontingenten fra 1 300 kr til 1 400 kr.
Kontingenten for barn (300 kr), ungdom (400 kr) og honnør (300 kr) foreslås uendret.
Økningen skal bygge opp egenkapitalen igjen etter takarbeidet på Granlihytta.
## Sak 7: Nytt tak på Granlihytta
Taktekkeren anbefalte i september 2025 å skifte hele taket innen to år.
Kostnaden er anslått til 420 000 kr.
Arbeidet foreslås gjort sommeren 2026, og hytta stenges for utleie fra 15. juni til 20. august 2026.
Hele overskuddet for 2025 settes av til taket, og resten tas fra egenkapitalen.
## Sak 8: Budsjett 2026
Budsjetterte inntekter er 1 012 000 kr.
Budsjetterte kostnader er 1 154 000 kr, medregnet 420 000 kr til nytt tak.
Budsjettet gir et underskudd på 142 000 kr, som dekkes av egenkapitalen.
Uten takarbeidet ville budsjettet vist et overskudd på 278 000 kr.
## Sak 9: Valg
Torunn Bakkevold foreslås gjenvalgt som leder for to år.
Kasserer Sigrun Høiby går av etter seks år, og Leif Opsahl foreslås som ny kasserer for to år.
Halvard Moen foreslås gjenvalgt som sekretær for ett år.
Eivind Rustad og Ingrid Fjelstad er ikke på valg i år.
## Takk for innsatsen
Laget hadde 21 langrennstrenere og sju instruktører i idrettsskolen i 2025.
Uten 3 140 dugnadstimer kunne vi ikke drevet hytta, lysløypa og rennet.
Neste store dugnad er hyttedugnaden lørdag 6. juni 2026.

View file

@ -0,0 +1,295 @@
# Håndbok for trenere og foreldre – sesongen 2026–2027
# Håndbok for trenere og foreldre – sesongen 2026–2027
Denne håndboka gjelder for langrennsgruppa, orienteringsgruppa og idrettsskolen i Lyngmo Idrettslag fra 1. august 2026 til 31. juli 2027. Den erstatter håndboka for 2025–2026. Håndboka ble vedtatt av styret 1. september 2026 og bygger på vedtakene fra årsmøtet 19. mars 2026. Alle trenere skal ha lest håndboka før første trening, og foreldre får den tilsendt ved påmelding.
## 1. Hvem vi er og hva vi vil
Lyngmo Idrettslag skal gi barn og unge på Lyngmoen et trygt og morsomt idrettstilbud nær der de bor. Vi ønsker at flest mulig skal fortsette med idrett lengst mulig. Derfor rangerer vi ikke barn under 13 år i resultatlister fra våre egne arrangementer, og alle barn i gruppene 8–12 år får like mye oppfølging uansett nivå.
Alle som møter på trening, skal bli sett og hilst på av en trener.
Ingen barn skal sendes hjem alene før foreldre har bekreftet at det er i orden.
Trenere og foreldre skal snakke positivt om andre utøvere, trenere og dommere.
Konkurranse er frivillig for alle under 13 år.
## 2. Grupper og treningstider
Tabellen viser de faste treningstidene for sesongen. Skitreningene starter i lysløypa så snart det er preparert, og senest fra 1. desember 2026 dersom snøen tillater det. Før det trener langrennsgruppene på barmark fra samme sted. Orienteringsgruppene trener fra 4. mai til 31. august 2027, med pause i juli.
Gruppe
Alder
Dager
Tid
Sted
Idrettsskolen
6–11 år
Onsdag
17:30–18:45
Klubbhuset
Langrenn 8–10
8–10 år
Tirsdag og torsdag
17:30–18:30
Lysløypa, Barnerunden
Langrenn 11–12
11–12 år
Tirsdag og torsdag
18:00–19:15
Lysløypa, Storrunden
Konkurransegruppa
13–16 år
Mandag og onsdag, lørdag
18:30–20:00, lørdag 10:00–12:00
Lysløypa og Granlirunden
Orientering 9–12
9–12 år
Tirsdag
18:00–19:00
Tjernåsen nord
Orientering 13+
13 år og eldre
Torsdag
18:00–19:30
Tjernåsen nord
Idrettsskolen har høstsemester fra 2. september til 25. november 2026 og vårsemester fra 6. januar til 5. mai 2027. Det er plass til 60 barn per semester. Er det flere påmeldte, går barn som var med forrige semester foran nye barn, og deretter gjelder rekkefølgen for påmelding. Barn kan prøve to treninger gratis før de må være medlem og ha betalt treningsavgift.
Konkurransegruppa kan også bruke Granlirunden på lørdagstreningene, fordi den er lagets lengste løype. Barn under 12 år har ikke lov til å gå Granlirunden uten en voksen, og etter mørkets frembrudd skal alle i Granlirunden ha hodelykt, fordi løypa ikke er opplyst.
## 3. Trenerens ansvar
Hver treningsgruppe skal ha en hovedtrener som er minst 18 år. Hjelpetrenere må være minst 15 år og kan bare lede en trening når en hovedtrener er til stede. Det skal alltid være minst to voksne på hver trening, slik at én kan følge et barn som trenger hjelp mens den andre blir med gruppa.
I gruppene 8–12 år skal det være minst én voksen per 8 barn.
I idrettsskolen skal det være minst én voksen per 6 barn under 9 år og én voksen per 8 barn fra 9 år.
Treneren skal føre oppmøte for hver trening innen kl. 22:00 samme kveld.
Treneren skal ha med førstehjelpsveske, mobiltelefon og ekstra votter på alle treninger.
Alle trenere skal ha gjennomført førstehjelpskurs i løpet av de siste tre årene.
Laget holder førstehjelpskurs for trenere lørdag 10. oktober 2026 kl. 10:00–15:00 i klubbhuset. Kurset er gratis for trenere. Laget betaler også grunnkurset for trenere, men bare når treneren forplikter seg til å være trener i minst to sesonger etter kurset. Slutter treneren før det, må halvparten av kursavgiften betales tilbake.
Trenere har ikke lov til å legge ut bilder av barn på lagets sider eller i lagets kanaler uten skriftlig samtykke fra foreldrene. Samtykkeskjemaet skal leveres innen 1. oktober 2026. Bilder der barn kan gjenkjennes, skal aldri publiseres sammen med fullt navn, heller ikke når samtykke er gitt.
## 4. Foreldrenes ansvar
Foreldre har ansvar for at barnet har riktig utstyr og klær etter været, og for at barnet blir hentet presis. Foreldre til barn under 10 år skal bli på området under treningen eller avtale med treneren hvem som henter. Barn som ikke er hentet 15 minutter etter at treningen er slutt, blir sammen med en trener inne i klubbhuset til en voksen kommer.
Meld fra til treneren før kl. 15:00 hvis barnet ikke kommer, når gruppa har færre enn 10 påmeldte.
Gi beskjed til treneren om allergier, astma eller andre forhold som er viktige ved skade eller kulde.
Foreldre skal ikke stå i løypa og heie under trening, men gjerne ved start og mål.
Spørsmål om uttak og konkurranser tas med hovedtreneren, ikke på trening mens barna hører på.
## 5. Sikkerhet, kulde og vær
Temperaturen måles ved klubbhuset kl. 16:00 på treningsdager. Er det for kaldt, avlyses treningen, og beskjed sendes i gruppas meldingskanal senest kl. 16:30. Grensene er satt fordi barn mister varme raskere enn voksne, og fordi frostskader i ansiktet kan oppstå uten at barnet merker det.
Gruppe
Utetrening avlyses når temperaturen er lavere enn
Idrettsskolen (6–11 år)
minus 12 °C
Langrenn og orientering 8–12 år
minus 15 °C
Konkurransegruppa 13–16 år
minus 20 °C
Når treningen avlyses på grunn av kulde, kan gruppene 8–12 år i stedet ha innetrening i klubbhuset dersom minst to trenere er tilgjengelige. Idrettsskolen har ingen innetrening ved kulde, fordi klubbhuset ikke har plass til 60 barn samtidig. Ved torden avbrytes orienteringstreningen straks, og alle samles ved startpunktet.
## 6. Løypene og regler i løypa
Lyset i Storrunden står på fra kl. 06:00 til 22:00 hver dag i skisesongen, og lyset i Barnerunden står på fra kl. 16:00 til 21:00. Skøyting er bare tillatt i Storrunden og Granlirunden. Barnerunden er bare for klassisk stil, slik at de minste kan gå i sporet uten å bli forstyrret.
Hunder har ikke lov til å være i Storrunden eller Barnerunden fra 1. desember til 15. april. Det gjelder også trenere og foreldre som venter på barn. Hundesporet på 3,0 km kan brukes med hund hele vinteren. Løypekomiteen preparerer lysløypa bare når snødybden er minst 20 cm. Er det mindre snø, flyttes skitreningen til barmark.
## 7. Utstyr og utlån
Laget låner ut ski til medlemmer under 13 år. Depositumet er 300 kr per par og betales tilbake når skiene leveres innen 30. april 2027. Skiene hentes i utstyrsboden ved klubbhuset på tirsdager kl. 17:00–18:00 i november. Ski som leveres etter 30. april, gir ikke depositumet tilbake, med unntak av når barnet har vært sykt og lederen av langrennsgruppa har godkjent det.
Smøreboden ved lysløypa er åpen for alle medlemmer, men smørejern og fluorfrie pulver skal bare brukes når en trener er til stede. Det er forbudt å bruke smøremidler med fluor på lagets ski.
## 8. Dugnad
Laget drives av frivillige. Hver familie med barn i langrenn eller orientering skal ta to dugnadsvakter per sesong, og familier som bare har barn i idrettsskolen skal ta én vakt. En vanlig vakt varer minst fire timer. Vakter under Lyngmorennet varer seks timer og teller derfor som to vakter. Familier som ikke tar vaktene sine, betaler en dugnadsavgift på 800 kr per vakt. Dugnadsavgiften faktureres 15. mai 2027.
Vakter settes opp av dugnadsansvarlig Wenche Tollefsrud, og bytte av vakt skal avtales direkte med en annen familie.
Ungdom fra 14 år kan ta vakt på vegne av familien, men bare sammen med en voksen på samme vakt.
Kafévakter i Granlihytta går fra kl. 10:30 til 15:30, fordi kafeen skal være klar ved åpning kl. 11:00.
Trenere og styremedlemmer er fritatt for dugnad det året de har vervet.
Det 33. Lyngmorennet arrangeres søndag 7. februar 2027. Påmeldingsfristen er onsdag 3. februar 2027 kl. 23:59. Startkontingenten er uendret: 100 kr for barn opp til 12 år, 150 kr for ungdom 13–16 år og 300 kr fra 17 år, og etteranmelding koster 100 kr ekstra. Barn i langrennsgruppa som tar en dugnadsvakt sammen med en forelder, starter gratis.
Kafeen i Granlihytta er åpen søndager kl. 11:00–15:00 fra 3. januar til 21. mars 2027. I påsken er kafeen åpen hver dag fra skjærtorsdag 25. mars til andre påskedag 29. mars 2027, kl. 11:00–16:00.
## 9. Granlihytta for treningsgrupper
Treningsgruppene kan låne Granlihytta gratis i inntil to helger per sesong. Det gjelder bare når minst to voksne er med, og når den som står ansvarlig, er over 25 år. Treningsgrupper må booke hytta hos hyttesjefen senest 30 dager før, fordi hyttehelgene ellers raskt blir leid ut til medlemmer. Vanlige regler for hytta gjelder også for treningsgrupper: hytta skal vaskes før avreise, og røyking er forbudt inne og på verandaen.
Taket på Granlihytta ble skiftet sommeren 2026. Hytta var derfor stengt for all utleie fra 15. juni til 20. august 2026, og samlingen for konkurransegruppa ble flyttet til helgen 28.–30. august 2026.
## 10. Avgifter og frister
Medlemskontingenten for 2026 ble vedtatt på årsmøtet 19. mars 2026. Kontingenten for voksne økte fra 600 til 650 kr og familiekontingenten fra 1 300 til 1 400 kr, fordi laget trenger å bygge opp egenkapitalen igjen etter takarbeidet på Granlihytta. Treningsavgiftene er uendret fra forrige sesong.
Avgift
Beløp
Frist
Medlemskontingent barn 0–12 år
300 kr per år
\31. mars
Medlemskontingent ungdom 13–19 år
400 kr per år
\31. mars
Medlemskontingent voksen 20–66 år
650 kr per år
\31. mars
Medlemskontingent honnør 67 år og eldre
300 kr per år
\31. mars
Familiekontingent
1 400 kr per år
\31. mars
Treningsavgift langrenn 8–12 år
900 kr per sesong
\15. oktober 2026
Treningsavgift konkurransegruppa 13–16 år
1 200 kr per sesong
\15. oktober 2026
Treningsavgift orientering
600 kr per sesong
\1. mai 2027
Idrettsskolen
450 kr per semester
\15. september 2026 og 20. januar 2027
Søskenmoderasjon gis på treningsavgiften: barn nummer to får 25 prosent rabatt, og barn nummer tre og videre trener gratis. Moderasjonen gjelder ikke idrettsskolen og ikke medlemskontingenten. Lagets ulykkesforsikring dekker medlemmer under trening, men bare når medlemskontingenten for året er betalt.
## 11. Kontakt
Rolle
Navn
Leder
Torunn Bakkevold
Nestleder
Eivind Rustad
Kasserer (fra 19. mars 2026)
Leif Opsahl
Leder langrennsgruppa
Marte Kvamsdal
Leder orienteringsgruppa
Bjørnar Teigen
Leder idrettsskolen
Hanne Sæther
Hyttesjef
Kåre Lien
Løypesjef
Arnstein Vold
Rennleder Lyngmorennet
Øystein Brekke
Dugnadsansvarlig
Wenche Tollefsrud
Spørsmål om faktura og betaling rettes til kassereren. Spørsmål om treningstider og grupper rettes til lederen av gruppa. Endringer i håndboka i løpet av sesongen vedtas av styret og varsles i alle gruppenes meldingskanaler.

View file

@ -0,0 +1,86 @@
#### Kontingent og avgifter
A: Avgift | B: Gruppe | C: Beløp 2025 (kr) | D: Beløp 2026 (kr) | E: Antall 2025 | F: Enhet for antall | G: Merknad
A: Medlemskontingent | B: Barn 0–12 år | C: 300 | D: 300 | E: 231 | F: medlemmer per 31.12.2025 | G: Uendret
A: Medlemskontingent | B: Ungdom 13–19 år | C: 400 | D: 400 | E: 118 | F: medlemmer per 31.12.2025 | G: Uendret
A: Medlemskontingent | B: Voksen 20–66 år | C: 600 | D: 650 | E: 268 | F: medlemmer per 31.12.2025 | G: Økt etter vedtak på årsmøtet 19.03.2026
A: Medlemskontingent | B: Honnør 67 år og eldre | C: 300 | D: 300 | E: 67 | F: medlemmer per 31.12.2025 | G: Uendret
A: Familiekontingent | B: Hele husstanden | C: 1300 | D: 1400 | E: 142 | F: husstander per 31.12.2025 | G: Økt etter vedtak på årsmøtet 19.03.2026
A: Støttemedlem | B: Alle aldre | C: 200 | D: 200 | E: 29 | F: støttemedlemmer per 31.12.2025 | G: Ingen stemmerett, kan ikke velges til verv
A: Treningsavgift | B: Langrenn 8–12 år | C: 900 | D: 900 | E: 69 | F: aktive utøvere 2025 | G: Frist 15. oktober
A: Treningsavgift | B: Konkurransegruppa 13–16 år | C: 1200 | D: 1200 | E: 27 | F: aktive utøvere 2025 | G: Frist 15. oktober
A: Treningsavgift | B: Orientering | C: 600 | D: 600 | E: 41 | F: aktive medlemmer 2025 | G: Frist 1. mai
A: Treningsavgift per semester | B: Idrettsskolen 6–11 år | C: 450 | D: 450 | E: 58 | F: barn høsten 2025 | G: Søskenmoderasjon gjelder ikke
A: Dugnadsavgift per vakt | B: Familier med aktive barn | C: 800 | D: 800 | E: 23 | F: vakter fakturert 2025 | G: Faktureres 15. mai
A: Depositum utlånsski per par | B: Medlemmer under 13 år | C: 300 | D: 300 | E: 61 | F: utlån sesongen 2025 | G: Tilbake ved levering innen 30. april
A: Startkontingent Lyngmorennet | B: Barn opp til 12 år | C: 100 | D: 100 | E: 142 | F: startende 2025 | G: Uendret for 2026 og 2027
A: Startkontingent Lyngmorennet | B: Ungdom 13–16 år | C: 150 | D: 150 | E: 61 | F: startende 2025 | G: Uendret for 2026 og 2027
A: Startkontingent Lyngmorennet | B: Fra 17 år | C: 300 | D: 300 | E: 165 | F: startende 2025 | G: Uendret for 2026 og 2027
A: Tillegg for etteranmelding | B: Alle klasser | C: 100 | D: 100 | E: 19 | F: etteranmeldte 2025 | G: Kommer i tillegg til startkontingenten
A: Overnatting Granlihytta per natt | B: Medlem | C: 150 | D: 150 | E: 248 | F: gjestedøgn 2025 | G: Leietaker må være medlem og minst 25 år
A: Overnatting Granlihytta per natt | B: Gjest av medlem | C: 250 | D: 250 | E: 64 | F: gjestedøgn 2025 | G: Bare sammen med et medlem
A: Helgeleie hele Granlihytta | B: Kun medlemmer | C: 3500 | D: 3500 | E: 9 | F: helger 2025 | G: Fredag 16:00 til søndag 15:00
A: Vaskegebyr Granlihytta | B: Leietaker | C: 600 | D: 600 | E: 2 | F: ganger 2025 | G: Når hytta ikke er vasket før avreise
#### Dugnadsliste 2025-26
A: Dato | B: Ukedag | C: Oppgave | D: Sted | E: Ansvarlig | F: Antall personer | G: Varighet per vakt (t) | H: Teller som vakter | I: Status | J: Merknad
A: 13.09.2025 | B: lørdag | C: Rydding av kratt langs Storrunden | D: Lysløypa | E: Arnstein Vold | F: 14 | G: 4 | H: 1 | I: Utført | J: Ryddet 1,8 km
A: 27.09.2025 | B: lørdag | C: Rydding og merking av Granlirunden | D: Granlirunden | E: Arnstein Vold | F: 11 | G: 5 | H: 1 | I: Utført | J: Ny merking ved Granlitjernet
A: 11.10.2025 | B: lørdag | C: Kontroll av lysarmaturer | D: Storrunden og Barnerunden | E: Eivind Rustad | F: 4 | G: 4 | H: 1 | I: Utført | J: 6 armaturer skiftet
A: 25.10.2025 | B: lørdag | C: Vedbæring og vask | D: Granlihytta | E: Kåre Lien | F: 9 | G: 4 | H: 1 | I: Utført
A: 08.11.2025 | B: lørdag | C: Utlevering av utlånsski | D: Utstyrsboden | E: Marte Kvamsdal | F: 3 | G: 4 | H: 1 | I: Utført | J: 38 par levert ut
A: 22.11.2025 | B: lørdag | C: Klargjøring av smøreboden | D: Lysløypa | E: Marte Kvamsdal | F: 5 | G: 4 | H: 1 | I: Utført
A: 06.12.2025 | B: lørdag | C: Julegrøt for idrettsskolen | D: Klubbhuset | E: Hanne Sæther | F: 6 | G: 4 | H: 1 | I: Avlyst | J: Vannlekkasje i klubbhuset
A: 04.01.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 4 | G: 5 | H: 1 | I: Utført | J: Sesongåpning
A: 11.01.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 4 | G: 5 | H: 1 | I: Utført
A: 18.01.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 4 | G: 5 | H: 1 | I: Utført
A: 25.01.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 3 | G: 5 | H: 1 | I: Utført – manglet 1 person | J: Familien fakturert dugnadsavgift
A: 01.02.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 4 | G: 5 | H: 1 | I: Utført
A: 08.02.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 4 | G: 5 | H: 1 | I: Utført | J: Rennsdag, ekstra vaffelsalg
A: 15.02.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 4 | G: 5 | H: 1 | I: Utført | J: Vinterferie
A: 22.02.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 4 | G: 5 | H: 1 | I: Utført
A: 01.03.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 4 | G: 5 | H: 1 | I: Utført
A: 08.03.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 3 | G: 5 | H: 1 | I: Utført – manglet 1 person | J: Byttet uten å melde fra
A: 15.03.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 4 | G: 5 | H: 1 | I: Utført
A: 22.03.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 4 | G: 5 | H: 1 | I: Planlagt
A: 29.03.2026 | B: søndag | C: Kafévakt 10:30–15:30 | D: Granlihytta | E: Wenche Tollefsrud | F: 4 | G: 5 | H: 1 | I: Planlagt | J: Siste kafésøndag
A: 07.02.2026 | B: lørdag | C: Rigging av start og mål, Lyngmorennet | D: Lysløypa | E: Øystein Brekke | F: 18 | G: 6 | H: 1 | I: Utført | J: Fra 2026–27 teller en slik vakt som to
A: 08.02.2026 | B: søndag | C: Funksjonær under Lyngmorennet | D: Lysløypa og Granlirunden | E: Øystein Brekke | F: 83 | G: 6 | H: 1 | I: Utført | J: 412 startende; teller som to vakter fra 2026–27
A: 08.02.2026 | B: søndag | C: Nedrigging etter Lyngmorennet | D: Lysløypa | E: Øystein Brekke | F: 12 | G: 3 | H: 1 | I: Utført | J: Kortere vakt
A: 18.04.2026 | B: lørdag | C: Innsamling av merkebånd | D: Granlirunden | E: Arnstein Vold | F: 6 | G: 4 | H: 1 | I: Planlagt
A: 28.04.2026 | B: tirsdag | C: Innlevering og sortering av utlånsski | D: Utstyrsboden | E: Marte Kvamsdal | F: 4 | G: 4 | H: 1 | I: Planlagt | J: Frist for levering er 30. april
#### Løypepreparering vinter 2026
A: Dato | B: Ukedag | C: Løype | D: Preparert lengde (km) | E: Skøytetrasé | F: Snødybde (cm) | G: Temperatur (°C) | H: Timer brukt (t) | I: Utført av | J: Merknad
A: 02.01.2026 | B: fredag | C: Storrunden | D: 0 | E: Nei | F: 17 | G: -4.5 | H: 0 | I: Arnstein Vold | J: Ikke preparert – for lite snø (krav 20 cm)
A: 06.01.2026 | B: tirsdag | C: Storrunden | D: 4.2 | E: Ja | F: 24 | G: -8 | H: 2 | I: Arnstein Vold | J: Første preparering i 2026
A: 06.01.2026 | B: tirsdag | C: Barnerunden | D: 1.1 | E: Nei | F: 24 | G: -8 | H: 0.5 | I: Arnstein Vold
A: 08.01.2026 | B: torsdag | C: Storrunden | D: 4.2 | E: Ja | F: 26 | G: -11.5 | H: 2 | I: Torgeir Haugland
A: 10.01.2026 | B: lørdag | C: Granlirunden | D: 0 | E: Nei | F: 27 | G: -6 | H: 0 | I: Torgeir Haugland | J: Ikke preparert – for lite snø (krav 30 cm)
A: 10.01.2026 | B: lørdag | C: Storrunden | D: 4.2 | E: Ja | F: 27 | G: -6 | H: 2 | I: Torgeir Haugland
A: 13.01.2026 | B: tirsdag | C: Storrunden | D: 4.2 | E: Ja | F: 31 | G: -3 | H: 2 | I: Arnstein Vold
A: 13.01.2026 | B: tirsdag | C: Barnerunden | D: 1.1 | E: Nei | F: 31 | G: -3 | H: 0.5 | I: Arnstein Vold
A: 15.01.2026 | B: torsdag | C: Hundesporet | D: 3 | E: Nei | F: 33 | G: -2.5 | H: 1 | I: Liv Marit Sundby
A: 17.01.2026 | B: lørdag | C: Granlirunden | D: 9.5 | E: Ja | F: 34 | G: -9 | H: 4.5 | I: Torgeir Haugland | J: Første preparering av Granlirunden
A: 17.01.2026 | B: lørdag | C: Storrunden | D: 4.2 | E: Ja | F: 34 | G: -9 | H: 2 | I: Torgeir Haugland
A: 20.01.2026 | B: tirsdag | C: Storrunden | D: 4.2 | E: Ja | F: 36 | G: -16.5 | H: 2.5 | I: Arnstein Vold | J: Tung snø etter vindfall
A: 22.01.2026 | B: torsdag | C: Barnerunden | D: 1.1 | E: Nei | F: 36 | G: -14 | H: 0.5 | I: Liv Marit Sundby
A: 24.01.2026 | B: lørdag | C: Granlirunden | D: 9.5 | E: Ja | F: 38 | G: -7 | H: 4.5 | I: Torgeir Haugland
A: 27.01.2026 | B: tirsdag | C: Storrunden | D: 4.2 | E: Ja | F: 41 | G: -5.5 | H: 2 | I: Arnstein Vold
A: 31.01.2026 | B: lørdag | C: Storrunden | D: 4.2 | E: Ja | F: 43 | G: -10 | H: 2 | I: Liv Marit Sundby
A: 03.02.2026 | B: tirsdag | C: Hundesporet | D: 3 | E: Nei | F: 44 | G: -12.5 | H: 1 | I: Liv Marit Sundby
A: 05.02.2026 | B: torsdag | C: Barnerunden | D: 1.1 | E: Nei | F: 45 | G: -8.5 | H: 0.5 | I: Arnstein Vold
A: 07.02.2026 | B: lørdag | C: Storrunden | D: 4.2 | E: Ja | F: 46 | G: -6 | H: 2.5 | I: Arnstein Vold | J: Klargjort for Lyngmorennet
A: 07.02.2026 | B: lørdag | C: Granlirunden | D: 9.5 | E: Ja | F: 46 | G: -6 | H: 5 | I: Torgeir Haugland | J: Klargjort for Lyngmorennet
A: 12.02.2026 | B: torsdag | C: Storrunden | D: 4.2 | E: Ja | F: 47 | G: -2 | H: 2 | I: Arnstein Vold
A: 14.02.2026 | B: lørdag | C: Granlirunden | D: 9.5 | E: Ja | F: 49 | G: -4 | H: 4.5 | I: Torgeir Haugland | J: Vinterferie
A: 19.02.2026 | B: torsdag | C: Barnerunden | D: 1.1 | E: Nei | F: 50 | G: -1 | H: 0.5 | I: Liv Marit Sundby
A: 24.02.2026 | B: tirsdag | C: Storrunden | D: 4.2 | E: Ja | F: 48 | G: 1.5 | H: 2 | I: Arnstein Vold | J: Mildvær, sporet frøs til om kvelden
A: 28.02.2026 | B: lørdag | C: Granlirunden | D: 9.5 | E: Ja | F: 44 | G: -3.5 | H: 4.5 | I: Torgeir Haugland
A: 03.03.2026 | B: tirsdag | C: Storrunden | D: 4.2 | E: Ja | F: 42 | G: -5 | H: 2 | I: Arnstein Vold
A: 07.03.2026 | B: lørdag | C: Hundesporet | D: 3 | E: Nei | F: 40 | G: -7.5 | H: 1 | I: Liv Marit Sundby
A: 10.03.2026 | B: tirsdag | C: Storrunden | D: 4.2 | E: Ja | F: 37 | G: 0.5 | H: 2 | I: Arnstein Vold
A: 14.03.2026 | B: lørdag | C: Granlirunden | D: 0 | E: Nei | F: 29 | G: 2 | H: 0 | I: Torgeir Haugland | J: Ikke preparert – under 30 cm på de høyeste partiene
A: 14.03.2026 | B: lørdag | C: Storrunden | D: 4.2 | E: Ja | F: 29 | G: 2 | H: 2 | I: Torgeir Haugland | J: Siste skøytetrasé denne sesongen

View file

@ -0,0 +1,257 @@
# Medlemshåndbok for sesongen 2026
# Medlemshåndbok for sesongen 2026
Denne håndboka gjelder for alle andelshavere i Kvernlia Andelslandbruk SA fra 1. april til 31. desember 2026 og erstatter håndboka for 2025. Den ble vedtatt av styret 9. februar 2026. Regler som er endret fra 2025, er merket med «Nytt i 2026». Har du spørsmål om reglene, kan du spørre gartneren på hentedagene.
## 1. Om andelslaget
Kvernlia Andelslandbruk ble startet i 2019 og driver på leid jord ved Kvernlia gård. I 2026 dyrker vi 1,8 hektar friland fordelt på åtte skifter, A til H, og har et drivhus på 180 m² og et nytt tunnelhus på 120 m². Andelslaget har 34 høner og seks bikuber.
Gartner Ingrid Solhaug-Berntsen (100 prosent stilling) leder dyrkingen og oppdaterer høstetavla.
Gartnerassistent Mira Holten (60 prosent stilling, opp fra 40 prosent i 2025) har ansvar for drivhuset og tunnelhuset.
Styreleder Torbjørn Aasvang svarer for styret og medlemsmøtene.
Kasserer Halvard Moe-Fjeld har ansvar for betaling, refusjon og frikjøp.
Vaktansvarlig Sunniva Rakkestad fører vaktlista og har ansvar for hønsegården.
Birøkter Eivind Lauvstad har ansvar for bigården og arbeider frivillig.
## 2. Andeler, betaling og oppsigelse
Andelslaget har 148 andeler i 2026: 112 helandeler og 36 halvandeler. I tillegg er det 40 eggandeler. Andelen betales på forskudd, fordi frø, planter og lønn må betales før første henting.
Andelstype
Pris 2026 (kr)
Mengde
Arbeidsplikt (timer)
Betalingsfrist
Helandel
4 400
Full mengde på høstetavla
12
\15. april, eller i to like rater 15. april og 15. juli
Halvandel
2 600
Halv mengde på høstetavla
8
\15. april, kun én rate
Eggandel (tillegg)
650
10 egg per uke
0
\1. mai
Andelshaveren må være minst 18 år.
Eggandel kan bare tegnes av den som har hel- eller halvandel. Påmeldingsfristen er 1. mai, og de 40 plassene fordeles etter ventelisteplass.
Er andelen ikke betalt innen 14 dager etter fristen, går den til neste person på ventelista.
Andelen refunderes ikke etter 15. april. Unntaket er flytting mer enn 50 km fra gården før 1. juli; da refunderes 50 prosent.
Andelen kan overdras til en annen person for resten av sesongen, men bare etter skriftlig melding til kassereren.
Vil du fornye andelen for 2027, må du melde fra innen 1. desember 2026. Ellers går plassen til ventelista.
## 3. Henting og innhøsting
Sesongen 2026 har 21 hentuker, fra uke 23 til uke 43. Første henting er tirsdag 2. juni og siste henting lørdag 24. oktober. Hentetidene er tirsdag kl. 16.00–20.00 og lørdag kl. 09.00–13.00. Nytt i 2026: lørdag erstatter fredag som hentedag. Hver andel henter én gang per uke, enten tirsdag eller lørdag.
Høstetavla henger ved redskapsboden og oppdateres av gartneren senest én time før hentingen starter. Tavla viser hva som kan høstes, i hvilket skifte, og hvor mye en helandel skal ta. Halvandeler tar halvparten av mengden på tavla.
Du skal bare høste det som står på tavla, og bare den mengden som står der.
Grønt flagg betyr at du kan høste fritt innenfor mengden på tavla.
Gult flagg betyr at du bare skal skjære med kniv eller saks, minst 3 cm over bakken, slik at planten vokser videre. Det gjelder blant annet salat og urter.
Rødt flagg betyr at bedet er nysådd eller dekket med fiberduk, og at det ikke skal høstes der.
Jordbær: høyst 1 liter per helandel og 0,5 liter per halvandel per henting.
Blomster: én bukett per helandel hver uke. Halvandeler kan plukke en bukett i uker med partall.
Urtehagen i skifte F kan høstes fritt i små mengder, unntatt i bed med rødt flagg.
Medlemmer høster ikke selv i drivhuset eller tunnelhuset. Derfra settes grønnsakene fram ferdig plukket i kasser ved hentebordet.
Poteter og lagringsgrønnsaker graves av gartnerne fra uke 38 og deles ut i sekker.
Kniver, sakser og kurver lånes i redskapsboden og skal leveres vasket før du går.
Barn under 12 år kan være med og høste, men bare sammen med en voksen. Hunder er ikke tillatt på åkeren. De kan bindes ved benken innenfor porten, men aldri i nærheten av hønsegården.
## 4. Andelsvenn, glemt henting og ferie
Kan du ikke hente selv, kan en andelsvenn hente for deg. Du må melde navnet til gartneren innen kl. 12.00 samme dag. Andelsvennen må følge de samme reglene som deg, og en andelsvenn under 18 år må ha med seg en voksen.
Hentes ikke andelen innen hentetiden er slutt, faller den bort for den uka. Det som står igjen, høstes av gartnerne og gis til Nabolagskjøkkenet ved Dorvikstjern. Andelen kan ikke tas igjen en senere uke.
Pakket andel: Melder du fra minst 48 timer før hentingen starter, pakker gartnerne andelen din. Den står i kjølerommet og må hentes innen kl. 21.00 samme dag.
Du kan få pakket andel høyst tre ganger per sesong.
Det gis ikke pause eller refusjon for ferie. I ferien kan du i stedet la en andelsvenn hente.
## 5. Arbeidsplikt og vaktordning
Nytt i 2026: Arbeidsplikten er 12 timer for helandel og 8 timer for halvandel, mot 10 og 6 timer i 2025. Plikten er økt fordi arealet er større, og fordi mange åkervakter sto tomme i juli i fjor. Timene skal gjøres mellom 1. mai og 31. oktober. Minst halvparten av timene skal være booket innen 1. juni.
Vaktlista henger på tavla i redskapsboden. Når vakta er gjort, kvitterer du i vaktboka, og vaktansvarlig fører timene inn hver mandag.
Vakttype
Tidspunkt
Teller (timer)
Krav
Aldersgrense
Åkervakt
Tirsdag og torsdag 08.00–12.00, lørdag 13.00–17.00
4
Ingen
16 år alene, 12–15 år sammen med en voksen
Hentevakt
Tirsdag 15.30–20.00, lørdag 08.30–13.00
4,5
Gjennomgang på 30 minutter første gang
18 år
Drivhusvakt
Onsdag og søndag 17.00–19.00
2
Ingen
12 år
Hønsevakt
Kveld alle dager 19.30–21.00, morgen lørdag og søndag 07.00–08.30
1,5
Hønsekurs
15 år alene, 10–14 år sammen med en voksen
Dugnad
Lørdag 9. mai og lørdag 31. oktober, 10.00–13.00
3
Ingen
Ingen
Timer som barn mellom 12 og 17 år gjør, teller på husstandens andel. Timer gjort av barn under 12 år teller ikke.
En vakt må avbestilles minst 48 timer før den starter. Avbestiller du senere, teller vakta som ikke utført, med mindre du selv skaffer en erstatter som er medlem.
Nytt i 2026: Frikjøp koster 300 kr per time, og hver andel kan kjøpe seg fri fra høyst 4 timer.
Mangler du mer enn 4 timer per 31. oktober, faktureres de timene som går ut over 4, med 600 kr per time, og du mister fortrinnsretten til å fornye andelen.
Faktura for frikjøp og manglende timer sendes ut 15. november.
## 6. Hønsegården
Bare medlemmer som har tatt hønsekurset, kan ta hønsevakt. Kurset holdes lørdag 18. april og lørdag 25. april kl. 10.00–12.00, med plass til høyst 12 deltakere per kurs. Nytt i 2026: medlemmene tar også morgenvakta lørdag og søndag. Morgenvakta på hverdager tas fortsatt av gartnerne.
Kveldsvakta skal lukke alle tre lukene, telle hønene, samle egg, fylle vann og kontrollere at lampa på strømgjerdet lyser.
Morgenvakta åpner lukene tidligst kl. 07.00, gir fôr og samler egg.
Hønene skal bare ha fôr fra sekkene i boden og grønnsaksavfall fra gården, aldri matrester hjemmefra.
Egg som samles inn på vakt, legges i kjølerommet. Vaktene har ikke lov til å ta med egg hjem.
Eggandelene hentes i kjølerommet på hentedagene.
Rømte høner, skader eller hull i gjerdet meldes til vaktansvarlig samme kveld.
## 7. Bigården
Bigården ligger bak skifte F og er merket med gule skilt. Fordi to medlemmer ble stukket i 2025, er reglene for bigården skjerpet og bedre skiltet.
Hold minst 10 meter avstand til kubene, med mindre du er i følge med birøkteren eller en av de to birøkthjelperne.
Barn under 16 år skal ikke inn i bigården, heller ikke i følge med voksne.
Kubene åpnes bare av birøkteren og birøkthjelperne, og aldri mens hentingen pågår.
Medlemmer med kjent allergi mot bistikk skal melde fra til gartneren før første henting.
Førstehjelpsskrinet henger på innsiden av døra til redskapsboden.
Hver andel, både hel- og halvandel, får ett glass honning på 250 gram i september.
## 8. Drivhus og tunnelhus
Medlemmer går bare inn i drivhuset og tunnelhuset når de har drivhusvakt, eller sammen med en av gartnerne. Barn under 8 år skal ikke inn i drivhuset eller tunnelhuset. Tunnelhuset settes opp på vårdugnaden 9. mai og skal være i bruk fra uke 21.
Dørene skal lukkes om kvelden når det er meldt under 12 °C om natta.
Takluker og dører åpnes når temperaturen inne er over 26 °C.
Vask støvlene i fotbadet ved døra før du går inn, fordi sykdommer på tomat og potet smitter med jord.
Vanningen går automatisk kl. 07.00. Drivhusvakta vanner bare for hånd når gartneren har skrevet det på tavla inne i drivhuset.
## 9. Fellesarrangementer
Andelslaget har to dugnader, én høstfest og ett medlemsmøte i året. Dugnadene teller på arbeidsplikten, men høstfesten og medlemsmøtet gjør det ikke.
Vårdugnaden er lørdag 9. mai kl. 10.00–13.00. Da settes tunnelhuset opp, og poteter settes i skifte H.
Høstfesten er lørdag 26. september fra kl. 15.00 i låven. Hver husstand kan ta med høyst fire gjester.
Høstdugnaden er lørdag 31. oktober kl. 10.00–13.00. Da ryddes åkeren, og drivhuset vaskes ned for vinteren.
Medlemsmøtet før sesongen holdes i mars. Der legger styret fram sesongevalueringen, budsjettet og endringer i reglene.
Hver andel har én stemme på medlemsmøtet, uansett om det er en hel- eller halvandel.
Det er ikke lov å grille eller gjøre opp ild på gården, med unntak av bålpanna ved låven på høstfesten. Røyking er ikke tillatt noe sted på gården.
## 10. Avvik og kontakt
Skader, stikk, rømte dyr og ødelagt utstyr skal meldes til gartneren samme dag og føres i avviksboka i redskapsboden. Spørsmål om betaling og refusjon går til kassereren, og spørsmål om vakter går til vaktansvarlig. Endringer i reglene kan bare vedtas av styret, og de skal legges fram på et medlemsmøte.

View file

@ -0,0 +1,189 @@
## Medlemsmøte før sesongen 2026
## Velkommen til medlemsmøtet 2026
Møtet holdes i låven torsdag 12. mars 2026 kl. 18.30.
Vi ser tilbake på sesongen 2025 og går gjennom planen for 2026.
Styret legger fram endringene som gjelder fra den nye sesongen.
Det blir tid til spørsmål etter hver del.
## Sesongen 2025 i tall
131 andeler hentet grønnsaker i 19 uker, fra 10. juni til 17. oktober.
Vi høstet 14 200 kg, som er 96 prosent av planen på 14 800 kg.
En helandel fikk i snitt 124 kg grønnsaker, bær og urter.
I snitt hentet 85 prosent av andelene hver uke.
610 kg som ikke ble hentet, gikk til Nabolagskjøkkenet.
## Det som gikk dårlig i 2025
Tørråte i skifte D ga bare 1 900 kg poteter, 700 kg under planen.
Brunsnegl i skifte B kostet oss 240 kg salat.
Nattefrost 14. mai skadet en tredel av jordbærplantene.
En rev tok tre høner fordi en luke sto åpen etter kveldsvakta.
## Det som gikk bra i 2025
Drivhuset ga 2 350 kg, 150 kg mer enn planlagt.
Squash og gulrøtter ga de største avlingene vi har hatt.
Fire bikuber ga 85 kg honning.
Regnskapet viste et overskudd på 16 320 kr.
## Hva medlemmene svarte
104 av 131 andeler svarte på undersøkelsen i november.
81 prosent var fornøyd eller svært fornøyd, mot 76 prosent året før.
64 prosent ønsket henting på lørdag i stedet for fredag.
Det vanligste ønsket var jevnere tilgang på salat.
## Andeler i 2026
Vi får 148 andeler: 112 helandeler og 36 halvandeler.
119 andeler fornyet, og 29 kommer inn fra ventelista.
Eggandelene økes fra 30 til 40.
Andelshaveren må være minst 18 år.
## Priser og betaling
Helandel koster 4 400 kr, mot 4 100 kr i fjor.
Halvandel koster 2 600 kr, mot 2 400 kr i fjor.
Eggandel koster 650 kr og må tegnes innen 1. mai.
Helandel kan betales i to rater, 15. april og 15. juli.
Halvandel betales i én rate innen 15. april.
## Ny hentedag: lørdag
Fredag utgår som hentedag fordi flertallet ønsket lørdag.
Lørdag hentes det kl. 09.00–13.00.
Tirsdag beholdes med henting kl. 16.00–20.00.
Hver andel henter fortsatt én gang per uke.
## Sesongen 2026
Sesongen får 21 hentuker, fra uke 23 til uke 43.
Første henting er tirsdag 2. juni.
Siste henting er lørdag 24. oktober.
Målet er en samlet avling på 18 600 kg.
## Arbeidsplikten øker
Helandeler skal gjøre 12 timer, mot 10 timer i 2025.
Halvandeler skal gjøre 8 timer, mot 6 timer i 2025.
I 2025 sto 11 av 32 åkervakter tomme i ukene 28 til 31.
Minst halvparten av timene skal være booket innen 1. juni.
## Tak på frikjøp
Frikjøp koster 300 kr per time, mot 250 kr i fjor.
Hver andel kan kjøpe seg fri fra høyst 4 timer.
Timer som mangler ut over 4, faktureres med 600 kr per time.
Ni helandeler kjøpte seg helt fri i 2025, og det ga tomme vakter i juli.
## Vaktene i 2026
En åkervakt varer 4 timer og en hentevakt 4,5 timer.
En drivhusvakt varer 2 timer og en hønsevakt 1,5 timer.
Medlemmene tar også morgenvakta i hønsegården i helgene.
Vårdugnaden er lørdag 9. mai og teller 3 timer.
En vakt må avbestilles minst 48 timer før den starter.
## Mer jord: skifte H
Vi leier 0,3 hektar av Arne Dyrstad for 6 000 kr per år.
Dyrket areal øker fra 1,5 til 1,8 hektar.
Potetene flyttes til skifte H for å redusere risikoen for tørråte.
Skifte G ligger i grønngjødsling med kløver også i 2026.
## Nytt tunnelhus
Tunnelhuset blir 120 m² og står ved siden av drivhuset på 180 m².
Det koster 64 000 kr, og 26 000 kr tas fra reservefondet.
Tunnelhuset settes opp på vårdugnaden 9. mai.
Der skal vi dyrke tomat, chili og et forsøk med sukkermelon.
## Hønene
Vi kjøper inn 9 unghøner i april, slik at flokken blir på 34.
Et strømgjerde på 1,2 meter står nå rundt hønsegården.
Hønsekurs holdes 18. april og 25. april kl. 10.00–12.00.
Bare medlemmer med hønsekurs kan ta hønsevakt.
## Biene
To kuber deles i vår, så vi får seks bikuber.
Målet for honning i 2026 er 110 kg.
Hold minst 10 meter avstand til kubene uten følge av birøkteren.
Barn under 16 år skal ikke inn i bigården.
## Budsjett 2026
Budsjettet har inntekter på 672 400 kr og utgifter på 661 000 kr.
Det gir et planlagt overskudd på 11 400 kr.
Lønn er budsjettert til 418 000 kr for 1,6 årsverk.
Frikjøp er budsjettert til 18 000 kr, mot 33 000 kr i 2025.
## Viktige datoer
Betalingsfristen for andelene er 15. april.
Påmeldingsfristen for eggandel er 1. mai.
Høstfesten er lørdag 26. september.
Høstdugnaden er lørdag 31. oktober.
Fornyelse for 2027 må meldes innen 1. desember.

View file

@ -0,0 +1,199 @@
## Brantwater Sailing Club - New Members' Welcome Evening
## Welcome to Brantwater Sailing Club
This welcome evening is on Friday 13 November 2026 at 19:30 in the main room of the clubhouse.
The club was founded in 1971 and sails on Brantwater, next to Brantholme village.
Tonight we cover fees, facilities, training, racing, safety and your duties.
Questions are welcome at any point, and there is a drink on the club at the bar afterwards.
## The club in numbers
We had 312 members on 30 September 2026, up from 296 a year earlier.
47 new members joined during the 2025-26 club year.
The club owns 15 sailing dinghies and three powerboats.
We have 38 swinging moorings, 64 dinghy park spaces and 24 rack spaces.
Members completed 533 duties in the 2026 season.
## Who's who on the committee
Helen Marchbank is Commodore and chairs the committee.
Priya Castellan is Rear Commodore (Sailing) and runs the racing programme.
Tomasz Wilde is Principal Instructor, and Kerry Ashdown coordinates the juniors.
Fiona Brackley is Safety Officer, and Neil Harrowby is Duty Coordinator.
Graham Oakeshott is Treasurer, and Ruth Penhallow is Secretary until the AGM.
## Your membership in 2026
A full adult membership costs £285 and a family membership costs £430.
Junior membership costs £95, young adult (18 to 25) £140 and social membership £75.
The £60 joining fee is not charged for junior and young adult memberships.
Subscriptions fall due on 1 March each year.
If you joined on or after 1 September, you paid half the annual subscription.
## What the AGM will decide on 21 November
The AGM starts at 19:00 on Saturday 21 November 2026 in the main room.
The committee proposes a full adult rate of £298 and a family rate of £450 from 1 March 2027.
The young adult rate would rise to £145, while junior and social rates would stay the same.
The AGM is also asked to approve £7,390 from the general reserve for the slipway repair.
## The clubhouse and bar
In summer the bar opens on Wednesdays 18:00 to 22:30, Saturdays 12:00 to 18:00 and Sundays 12:00 to 17:00.
From 1 November to 31 March the bar opens only on Sundays, from 12:00 to 16:00.
You may sign in up to 3 guests a day, and the same guest up to 6 times a season.
Members under 18 may stay in the main room after 20:00 only with a parent or guardian.
The Lookout Room upstairs is the race office and training room, and only water is allowed there.
## Storing your boat
A dinghy park space costs £95 and a rack space £45 for the year from 1 April to 31 March.
Every boat and trolley must be labelled with your name and membership number.
A swinging mooring costs £210 for a boat up to 6.5 metres and £265 for a longer boat.
Mooring applications must reach the Moorings Officer by 31 January.
There is a waiting list of nine members for moorings, so a mooring is unlikely before 2028.
## Using the club boats
Club dinghies are free to use for members who hold club Level 2 or above.
A booking may last up to 3 hours, or 2 hours on weekends between 10:00 and 16:00.
The two Osprey 16 trainers are kept for courses on course days.
Write any damage in the defects book in the boat shed before you leave the club.
## Learning to sail as an adult
Start Sailing is a two-weekend course sailed in the Osprey 16 trainers.
The next Start Sailing course runs on 17-18 and 24-25 April 2027.
The Improver course runs over four evenings.
In 2026, 18 adults completed Start Sailing and 13 completed the Improver course.
## Juniors at Brantwater
Junior training runs on Saturdays from 09:30 to 12:30, from May to September.
Juniors must be at least 8 years old and able to swim 50 metres in clothes with a buoyancy aid.
The season fee is £120, and only junior members can take part.
41 juniors trained in 2026, and the first session of 2027 is on Saturday 1 May.
Juniors under 14 must be collected from the clubhouse by a parent or guardian.
## Racing for everyone
All classes race together in one fleet on the club's own yardstick handicap.
The Spring Series runs on Sundays, with the first warning signal at 10:30.
The Summer Evening Series runs on Wednesdays, with the first warning signal at 18:45.
The 2027 Spring Series starts on Sunday 11 April and ends on Sunday 30 May.
In 2026, the Open Regatta drew 37 boats, 15 of them from six visiting clubs.
## Safety on the water
Everyone afloat must wear a buoyancy aid, and juniors must wear one on the pontoons too.
Juniors do not sail when the mean wind is over 18 knots; adults may not take club boats out above 22 knots.
When the Officer of the Day flies the red flag, no boat may launch.
Nobody sails after sunset, and from November to March single-handers sail only when a safety boat is staffed.
Report any incident to the Safety Officer within 24 hours, using the book in the race office.
## Your duties
A full adult member does 3 duties a season, a family membership 4 and a young adult 2.
Junior and social members, and members aged 75 or over, have no duties.
A safety boat helm must be 18 or over and hold the Club Powerboat Certificate; crew must be 16 or over.
If you cannot do a duty, arrange a swap and tell Neil Harrowby at least 48 hours before.
## The missed duty charge is going up
In 2026, 31 of 564 duties were missed without a swap.
One Spring Series race was cancelled because no safety boat helm was available.
For that reason the charge for a missed duty rises from £35 to £50 from 1 April 2027.
The number of duties you owe does not change, and a notified swap still avoids the charge.
## The slipway repair this winter
The lower 9 metres of the slipway cracked and settled by up to 70 millimetres after the February 2026 high water.
The contractor will recast the lower 12 metres from 4 January to 26 February 2027.
The slipway is closed to everyone from 2 January to 28 February 2027.
Members cannot launch their own boats during the closure; the safety boats will use the north beach pontoon.
The total budget is £38,390, including a 10% contingency.
## Winter at the club
The Frostbite Series runs on Sundays from 8 November to 20 December 2026, with first warning at 11:00.
This winter there are seven Frostbite races instead of the usual sixteen, because of the slipway works.
Boats must be off the swinging moorings by 15 November.
All six winter hardstanding spaces are booked until 31 March 2027.
## Key dates for your diary
Nominations for the committee close at 19:00 on Saturday 14 November 2026.
The AGM is on Saturday 21 November 2026 at 19:00.
Subscriptions are due on 1 March 2027, and storage fees on 1 April 2027.
The fitting-out work party is on Saturday 27 March 2027, and the season opening day is Saturday 10 April.
## Questions and contacts
Ask any committee member tonight, or leave a note in the Secretary's tray in the race office.
Duty swaps go to Neil Harrowby, and mooring questions go to the Moorings Officer.
Junior questions go to Kerry Ashdown, and course questions to Tomasz Wilde.
The rota for spring and summer 2027 will be published by 1 March 2027.

View file

@ -0,0 +1,9 @@
Sesongevaluering 2025 Sesongevaluering 2025 Kvernlia Andelslandbruk SA. Vedtatt av styret 20. januar 2026. Utarbeidet av gartner Ingrid Solhaug-Berntsen og styreleder Torbjørn Aasvang. 1. Sammendrag Sesongen 2025 var den sjuende siden Kvernlia Andelslandbruk ble startet våren 2019, og den største så langt. 131 andeler, fordelt på 98 helandeler og 33 halvandeler, hentet grønnsaker i 19 uker, fra tirsdag 10. juni til fredag 17. oktober. Til sammen ble det høstet 14 200 kg grønnsaker, bær og urter, mot en plan på 14 800 kg. Det tilsvarer 96 prosent av planen og i snitt 124 kg per helandel. Sesongen ble preget av en våt august. I ukene 32 til 35 kom det til sammen 142 mm nedbør, mot normalt rundt 90 mm, og som følge av fuktigheten fikk potetene i skifte D tørråte. Potetavlingen endte derfor på 1 900 kg, 700 kg under planen. Drivhuset leverte derimot mer enn ventet, og både squash og gulrøtter ga de største avlingene vi har hatt. Økonomisk gikk andelslaget med et overskudd på 16 320 kr, som i sin helhet er satt av til reservefondet. Fondet var ved årsskiftet på 64 300 kr. På bakgrunn av erfaringene og medlemsundersøkelsen har styret vedtatt fem hovedendringer for 2026: ny hentedag lørdag i stedet for fredag, økt arbeidsplikt, et tak på frikjøp, et nytt tunnelhus og et nytt skifte H for potetene. Endringene er beskrevet i kapittel 7 og legges fram på medlemsmøtet torsdag 12. mars 2026. 2. Medlemmer, andeler og henting Ved sesongstart hadde andelslaget 131 betalende andeler, 12 flere enn i 2024. En helandel kostet 4 100 kr og en halvandel 2 400 kr. En helandel er beregnet for en husstand på tre til fire personer, mens en halvandel gir halvparten av mengden på høstetavla og passer for én til to personer. I tillegg kunne medlemmer med hel- eller halvandel tegne en eggandel. Andelstype Antall 2025 Pris 2025 (kr) Arbeidsplikt 2025 (timer) Mengde Helandel 98 4 100 10 Full mengde på høstetavla Halvandel 33 2 400 6 Halv mengde på høstetavla Eggandel (tillegg) 30 600 0 10 egg per uke Hentingen foregikk to dager i uka: tirsdag kl. 16.00–20.00 og fredag kl. 15.00–19.00. Hver andel kunne hente én gang per uke, enten tirsdag eller fredag. I snitt hentet 112 av 131
andeler hver uke, altså 85 prosent. Det laveste oppmøtet var i uke 30, da bare 96 andeler hentet fordi mange var på ferie. Det høyeste var i uke 36 med 121 andeler. Grønnsaker som ikke ble hentet, ble høstet av gartnerne på lørdagen og levert til Nabolagskjøkkenet ved Dorvikstjern, som drives av frivillige. I løpet av sesongen gikk 610 kg til nabolagskjøkkenet. Ventelista for nye andeler hadde 41 navn per 1. desember 2025, som var fristen for å fornye. Av de 131 andelene ble 119 fornyet for 2026, som gir en fornyelsesgrad på 91 prosent. Dermed får 29 personer fra ventelista andel i 2026, og antallet andeler øker til 148. De 12 som ikke fornyet, oppga oftest flytting eller for lite tid som grunn. 3. Dyrking, avling og drivhus Andelslaget dyrket 1,5 hektar friland fordelt på sju skifter, A til G, og hadde i tillegg et drivhus på 180 m². Vekstskiftet går over fire år, slik at ingen kulturfamilie står på samme skifte oftere enn hvert fjerde år. Skifte G lå i grønngjødsling med kløver hele sesongen og ga derfor ingen avling. Tabellen viser planlagt og faktisk avling per kultur. Kultur Plan (kg) Høstet (kg) Avvik (kg) Kommentar Poteter 2 600 1 900 −700 Tørråte i skifte D Gulrøtter 1 800 1 950 +150 Største avling hittil Løk 900 840 −60 Kål (hode-, rød- og spisskål) 1 400 1 310 −90 Kålflue i juni Salat 1 100 860 −240 Brunsnegl i skifte B Squash 900 1 180 +280 Største avling hittil Bønner 500 460 −40 Rødbeter 700 760 +60 Grønnkål 450 520 +70 Purre 600 570 −30 Jordbær 400 310 −90 Nattefrost 14. mai Urter 200 240 +40 Annet friland (spinat, reddik, erter m.m.) 1 050 950 −100 Drivhus (tomat, agurk, paprika) 2 200 2 350 +150 Første tomater i uke 26 Sum 14 800 14 200 −600 96 prosent av planen Tørråten ble oppdaget i skifte D onsdag 6. august. Fordi sykdommen sprer seg raskt i fuktig vær, ble potetriset slått ned 12. august. Det stoppet smitten, men det stoppet også veksten,
og knollene ble mindre enn normalt. Lagringspotetene som skulle deles ut i uke 41 og 42, ble derfor erstattet av ekstra gulrøtter og kål. Salaten i skifte B ble angrepet av brunsnegl fra midten av august. Gartnerne plukket snegler for hånd hver morgen i tre uker, men tapet ble likevel 240 kg. For 2026 legges det inn en stripe på én meter uten vegetasjon rundt salatbedene, fordi sneglene ikke liker å krysse tørr, bar jord. Nattefrosten 14. mai skadet blomstene på omtrent en tredel av jordbærplantene. Jordbærene ble derfor begrenset til én liter per helandel per henting, og bare i fire av ukene. Drivhuset på 180 m² ga 2 350 kg, fordelt på 1 420 kg tomat, 690 kg agurk og 240 kg paprika. Drivhuset høstes bare av gartnerne og drivhusvaktene, og grønnsakene ble satt fram ferdig plukket i kasser på hentedagene. Sommeren viste at drivhuset er fullt utnyttet, og at medlemmene ønsker flere tomater enn vi kan dyrke der. Det er bakgrunnen for tunnelhuset på 120 m² som bygges i 2026. 4. Høner og bier Hønseflokken talte 28 høner ved sesongstart. Hønene ga til sammen 6 380 egg i 2025. Av disse gikk 5 700 egg til de 30 eggandelene, som fikk 10 egg per uke i 19 uker. Resten ble brukt på dugnadene og høstfesten 27. september. Medlemmene hadde kveldsvakta i hønsegården kl. 19.30–21.00, mens gartnerne tok morgenstellet. Av 133 kveldsvakter i sesongen ble 114 tatt av medlemmer, og gartnerne dekket de 19 andre. Hønsevakta ble gjort av 22 medlemmer som hadde tatt hønsekurset. Ingen vakter falt ut, men 14 vakter ble byttet med under ett døgns varsel. Natt til 9. oktober tok en rev tre høner fordi en luke i hønsegården ikke var lukket etter kveldsvakta. Etter hendelsen er det satt opp et strømgjerde på 1,2 meter rundt hønsegården, og sjekklista for kveldsvakta har fått et eget punkt om lukene. Flokken telte 25 høner ved årsskiftet. Styret har vedtatt å kjøpe inn 9 unghøner i april 2026, slik at flokken blir på 34 høner. Birøkter Eivind Lauvstad hadde fire bikuber i bigården bak skifte F. Det ble høstet 85 kg honning, i snitt drøyt 21 kg per kube. Hver andel, både hel- og halvandeler, fikk ett glass på 250 gram i uke 37, til sammen 131 glass eller omtrent 33 kg. De resterende 52 kg ble solgt til medlemmene på høstfesten for 160 kr per kilo, som ga 8 320 kr. To medlemmer ble stukket av bier i 2025. Begge var innenfor ti meter fra kubene uten følge av birøkter, og regelen om avstand til bigården blir derfor tydeligere skiltet i 2026. Alle fire kubene var sterke ved siste kontroll 3. desember. Til våren deles to av kubene, slik at andelslaget får seks bikuber i 2026.
\5. Arbeidsplikt og vakter Arbeidsplikten i 2025 var 10 timer for en helandel og 6 timer for en halvandel. Til sammen skulle medlemmene dermed gjøre 1 178 timer. Det ble utført 1 046 timer, eller 89 prosent. De resterende 132 timene ble kjøpt fri for 250 kr per time, til sammen 33 000 kr. Frikjøpet var ujevnt fordelt. Ni helandeler kjøpte seg fri fra alle sine timer, og 14 andeler kjøpte seg fri fra en del av timene. Som følge av dette var det for få folk på åkervaktene i juli, da ugraset vokser raskest. I ukene 28 til 31 sto 11 av 32 åkervakter ubesatt, og gartnerne måtte bruke 60 timer overtid på luking. Tabellen viser hvordan de utførte timene fordelte seg på vakttypene. Vakttype Lengde per vakt (timer) Antall vakter 2025 Utførte timer 2025 Åkervakt 4 137 548 Hentevakt 4,5 44 198 Hønsevakt (kveld) 1,5 114 171 Drivhusvakt 2 33 66 Dugnad (10. mai og 25. oktober) 3 21 63 Sum 349 1 046 Åkervaktene sto for over halvparten av de utførte timene. Hentevaktene var de mest populære og var fullbooket allerede i april, mens drivhusvaktene på onsdager var vanskeligst å fylle. 6. Økonomi Regnskapet for 2025 viser inntekter på 546 720 kr og kostnader på 530 400 kr. Overskuddet på 16 320 kr er overført til reservefondet, som skal brukes til større investeringer i drivhus og utstyr. Post Regnskap 2025 (kr) Helandeler (98 × 4 100 kr) 401 800 Halvandeler (33 × 2 400 kr) 79 200 Eggandeler (30 × 600 kr) 18 000 Honning solgt på høstfesten 8 320 Frikjøp av arbeidstimer 33 000 Høstfest 6 400 Sum inntekter 546 720 Lønn gartner og gartnerassistent 362 000 Frø og planter 41 500 Gjødsel og kompost 18 200 Fôr til høner 14 600 Birøkt, utstyr 9 800 Vanning og strøm 22 300 Vedlikehold drivhus 16 900 Forsikring 12 400 Leie av jord 24 000
Diverse 8 700 Sum kostnader 530 400 Resultat 16 320 Lønn er den klart største posten og utgjorde 68 prosent av kostnadene. Gartneren er ansatt i 100 prosent stilling og gartnerassistenten i 40 prosent, til sammen 1,4 årsverk. Vedlikehold av drivhuset ble høyere enn budsjettert fordi plastduken på taket måtte skiftes etter stormen i februar. Jordleien på 24 000 kr tilsvarer 16 000 kr per hektar for de 1,5 hektarene vi leier av Kvernlia gård. Frikjøpet ga 33 000 kr, men styret mener at frikjøp ikke skal være en fast inntektskilde. Pengene dekker ikke de 60 timene overtid gartnerne måtte ta, og gjør det vanskeligere å planlegge arbeidet. 7. Medlemsundersøkelsen og endringer for 2026 Medlemsundersøkelsen ble sendt ut 10. november og var åpen til 24. november 2025. 104 av 131 andeler svarte, en svarprosent på 79. Av dem var 81 prosent fornøyd eller svært fornøyd med sesongen, mot 76 prosent i 2024. 64 prosent ønsket å kunne hente på lørdag i stedet for fredag, og 38 prosent ville ha eggandel hvis det var plass. Det vanligste ønsket i fritekstsvarene var jevnere tilgang på salat. Styret har vedtatt følgende endringer, som gjelder fra sesongen 2026:  Hentetiden på fredag utgår og erstattes av lørdag kl. 09.00–13.00, fordi flertallet i undersøkelsen ønsket dette. Tirsdag kl. 16.00–20.00 beholdes.  Arbeidsplikten økes til 12 timer for helandel (fra 10) og 8 timer for halvandel (fra 6), fordi arealet øker og åkervaktene i juli må fylles.  Frikjøp koster 300 kr per time (fra 250 kr), og hver andel kan kjøpe seg fri fra høyst 4 timer.  Prisene blir 4 400 kr for helandel, 2 600 kr for halvandel og 650 kr for eggandel. Økningen skyldes hovedsakelig at gartnerassistenten går opp fra 40 til 60 prosent stilling, og høyere jordleie.  Skifte H på 0,3 hektar leies av nabogården til Arne Dyrstad for 6 000 kr per år. Potetene flyttes dit, fordi jorda ikke har hatt poteter på minst ti år og risikoen for tørråte da er lavere.  Et tunnelhus på 120 m² bygges ved siden av drivhuset. Det koster 64 000 kr, hvorav 26 000 kr tas fra reservefondet.  Hønseflokken økes til 34 høner, og antallet eggandeler økes fra 30 til 40. Sesongen 2026 får 21 hentuker, fra uke 23 til uke 43. Første henting blir tirsdag 2. juni og siste henting lørdag 24. oktober. Med 148 andeler og 1,8 hektar friland har gartnerne satt et mål om en samlet avling på 18 600 kg, inkludert drivhus og tunnelhus. Styret takker alle medlemmer for innsatsen i 2025, og særlig de 22 som tok hønsevakter gjennom hele sesongen.

View file

@ -0,0 +1,11 @@
Tindvika skolekorps – Sesongrapport 2025/2026 og reiseplan for København 2027 Tindvika skolekorps – Sesongrapport 2025/2026 og reiseplan for København 2027 Rapporten er skrevet av foreldreutvalget og ble lagt fram for årsmøtet torsdag 4. juni 2026 i storsalen på Tindvika skole. Den dekker perioden 1. august 2025 til 31. mai 2026. Tallene for medlemmer gjelder per 1. september hvert år, mens regnskapstallene gjelder hele perioden. Siste del av rapporten er den foreløpige reiseplanen for turen til Nordisk ungdomskorpstreff i København i juni 2027, slik den ble vedtatt på årsmøtet. 1. Sesongen i korte trekk Tindvika skolekorps ble stiftet i 1971 og har tre avdelinger: Aspirantkorpset, Hovedkorpset og Drill- og slaggruppa. Sesongen 2025/2026 ble den største på over ti år. Korpset hadde 69 medlemmer per 1. september 2025, mot 58 medlemmer ett år tidligere. Veksten kom først og fremst i Aspirantkorpset, som gikk fra 15 til 21 aspiranter fordi vi for første gang holdt en åpen instrumentdag på skolen i juni 2025. Avdeling Medlemmer 2024/2025 Medlemmer 2025/2026 Endring Aspirantkorpset 15 21 +6 Hovedkorpset 31 34 +3 Drill- og slaggruppa 12 14 +2 Totalt 58 69 +11 I løpet av sesongen meldte tre musikanter i Hovedkorpset seg ut, alle fordi familiene flyttet fra Tindvika. Ingen aspiranter sluttet. Fire aspiranter avla overgangsprøven i mai 2026, og alle fire består og går over i Hovedkorpset fra 1. august 2026. To av dem har i tillegg meldt seg på Drill- og slaggruppa. Ingeborg Haugstøl var dirigent for Hovedkorpset for fjerde sesong på rad. Tobias Rønneberg ledet Aspirantkorpset, og Live Aasmyr var instruktør for Drill- og slaggruppa. Foreldreutvalget hadde seks medlemmer og holdt ti møter i perioden. 2. Konserter og opptredener Korpset holdt tre konserter med billettsalg. Voksne betalte 100 kroner i inngang, mens barn under 16 år hadde gratis adgang. Publikumstallet nedenfor omfatter derfor også barn som ikke betalte. Billettinntektene gikk til korpsets drift og ikke til reisefondet. Konsert Dato Sted Publikum Billettinntekt
(kr) Høstkonsert 16.11.2025 Tindvika kirke 312 18 400 Julekonsert 14.12.2025 Storsalen, Tindvika skole 245 12 900 Vårkonsert 26.04.2026 Tindvika kirke 288 16 350 Sum 845 47 650 Høstkonserten hadde flest tilhørere, men julekonserten fikk mest ros i evalueringen fordi alle tre avdelingene spilte sammen i det siste nummeret. Julekonserten ble holdt i storsalen og ikke i kirken, fordi kirken var opptatt den helgen. Som følge av den mindre salen ble det solgt færre billetter enn året før. I tillegg til konsertene spilte Hovedkorpset og Drill- og slaggruppa i barnetoget 17. mai 2026. Drill- og slaggruppa deltok også på en regional drillmønstring i Bergen 21. mars 2026, der gruppa fikk 81 av 100 poeng og endte på tredjeplass av ni grupper i juniorklassen. 3. Seminarer Korpset holdt to helgeseminarer på Granlia leirskole. Deltakeravgiften var 650 kroner per musikant for hvert seminar. Avgiften dekket overnatting, alle måltider og instruktører. Aspirantene deltok bare på lørdagen og betalte derfor ikke for seminarene denne sesongen; korpset dekket deres lunsj.  Høstseminaret 10.–12. oktober 2025 hadde 41 deltakere fra Hovedkorpset og Drill- og slaggruppa og fire innleide instruktører.  Vinterseminaret 6.–8. februar 2026 hadde 38 deltakere og tre innleide instruktører, fordi slagverksinstruktøren måtte melde avbud.  Begge seminarene endte med en kort konsert for foresatte søndag kl. 13:00. Seminarene er den viktigste arbeidsformen for å lære nye stykker. På høstseminaret øvde Hovedkorpset inn hele programmet til høstkonserten, mens Drill- og slaggruppa brukte tolv timer på et nytt drillprogram. Foreldreutvalget hadde to foresatte på vakt hele natten på begge seminarene, og ingen hendelser ble meldt. Musikantene hadde ikke lov til å ha mobiltelefon etter kl. 22:00, og telefonene ble samlet inn av vaktene. Evalueringen etter vinterseminaret viste at 34 av 38 deltakere ønsket å beholde ordningen med to seminarer per sesong. Foreldreutvalget har derfor satt opp to seminarer også i 2026/2027. Deltakeravgiften øker til 700 kroner per seminar fra høsten 2026 fordi Granlia leirskole har varslet høyere pris for overnatting. 4. Instrumenter og utlån Per 31. mai 2026 eide korpset 39 instrumenter, medregnet slagverk. Av disse var 32 utlånt til musikanter gjennom hele sesongen. Leien var 350 kroner per semester for hvert instrument, og aspiranter i sitt første år betalte ikke leie. Leieinntektene ble 22 400 kroner. Den største enkeltutgiften var en ny tuba til 27 900 kroner, kjøpt i mars 2026 fordi den eldste tubaen fra 1984 hadde en sprekk i klokka og ikke lenger kunne repareres. To klarinetter var til service i til sammen elleve uker. Ingen instrumenter ble meldt tapt, men
en kornett fikk en bulk i munnstykkerøret, og familien betalte egenandelen på 1 000 kroner etter reglene for instrumentlån. Instrumentsjekken i uke 34 i august 2025 viste at fem instrumenter manglet kasse eller hadde en ødelagt kasse. Korpset kjøpte fem nye kasser for til sammen 4 750 kroner. Fordi tre av kassene var ødelagt ved uaktsomhet, har foreldreutvalget bestemt at familien fra 2026/2027 skal betale for ny kasse i slike tilfeller, innenfor egenandelen på inntil 1 000 kroner. Kasser som er slitt ved vanlig bruk, erstattes fortsatt av korpset. Instrumentansvarlig Siri Nyhagen har gått gjennom alle instrumentene. Hun anbefaler at korpset kjøper ett nytt althorn før høsten 2026, fordi to nye musikanter fra Aspirantkorpset skal spille althorn i Hovedkorpset. Årsmøtet sluttet seg til anbefalingen. 5. Økonomi Regnskapet for 2025/2026 viser et underskudd på 3 200 kroner. Underskuddet skyldes kjøpet av den nye tubaen, som ikke var budsjettert. Uten tubaen ville korpset ha hatt et overskudd på 24 700 kroner. Korpset satte av 15 000 kroner til reisefondet, som dermed hadde en saldo på 41 000 kroner per 31. mai 2026. Post Beløp (kr) Medlemskontingent 196 350 Instrumentleie 22 400 Billettinntekter konserter 47 650 Dugnader 61 200 Seminaravgift fra deltakere 51 350 Tilskudd fra Tindvika Musikklegat 40 000 Sum inntekter 418 950 Honorar dirigent Hovedkorpset 172 000 Honorar dirigent Aspirantkorpset 58 000 Honorar instruktør Drill- og slaggruppa 46 000 Seminarer (opphold, mat, instruktører) 63 800 Instrumentservice og innkjøp 41 500 Noter og arrangementer 12 300 Konsertutgifter 9 400 Avsetning til reisefondet 15 000 Diverse 4 150 Sum utgifter 422 150 Resultat -3 200 Kontingenten i 2025/2026 var 1 650 kroner per semester for Hovedkorpset og Drill- og slaggruppa og 1 100 kroner per semester for Aspirantkorpset. Årsmøtet vedtok å øke kontingenten fra 1. august 2026 til 1 800 kroner for Hovedkorpset og Drill- og slaggruppa og 1 200 kroner for Aspirantkorpset. Økningen skyldes at den nye avtalen med dirigentene gir 8 prosent høyere honorar fra samme dato. Søskenmoderasjonen på 25 prosent for barn nummer to videreføres, og barn nummer tre og flere betaler fortsatt ikke kontingent. Foreldreutvalget har budsjettert sesongen 2026/2027 med 446 000 kroner i inntekter og 442 000 kroner i utgifter. Det settes ikke av penger til reisefondet i 2026/2027, fordi 25
000 kroner av fondet skal brukes på turen til København. De resterende 16 000 kronene i fondet skal stå urørt som reserve for neste tur. Årsmøtet ga foreldreutvalget fullmakt til å kjøpe instrumenter for inntil 20 000 kroner uten nytt årsmøtevedtak; større kjøp må godkjennes av et ekstraordinært årsmøte. 6. Dugnad og foreldrevakt Dugnadene ga 61 200 kroner i 2025/2026. Alle familier skulle ta tre dugnadsvakter i løpet av sesongen. Sju familier gjennomførte ikke alle vaktene sine, til sammen elleve vakter, og ble fakturert 300 kroner per vakt. Disse 3 300 kronene er tatt med i dugnadsinntekten nedenfor. Dugnad Dato Inntekt (kr) Loppemarked i gymsalen 27.09.2025 29 800 Juletresalg på skoleplassen 06.12.2025 18 600 Kafé ved tre konserter november 2025 – april 2026 9 500 Fakturerte vakter som ikke ble gjennomført 3 300 Sum 61 200 Loppemarkedet ga mest, men krevde også flest vakter: 26 vakter fordelt på fredag kveld og lørdag. Juletresalget ga nest mest, selv om salget ble stengt to timer tidligere enn planlagt fordi alle trærne var solgt. Foreldreutvalget foreslår at juletresalget i 2026 bestiller flere trær, og at hele inntekten går til turen til København. Ordningen med foreldrevakt på øvelsene ble innført i januar 2026, etter at storsalen to ganger sto ulåst etter øvelse i høstsemesteret. Foreldrevakten låser opp og igjen, passer på romreglene og er til stede i pausen. Fra høsten 2026 har familier i Hovedkorpset og Drill- og slaggruppa foreldrevakt to ganger per semester, mens familier i Aspirantkorpset har foreldrevakt én gang per semester. Foreldrevakt regnes ikke som dugnadsvakt. 7. Reiseplan: Nordisk ungdomskorpstreff i København 2027 Årsmøtet vedtok at Hovedkorpset og Drill- og slaggruppa skal reise til Nordisk ungdomskorpstreff i København fra torsdag 17. juni til mandag 21. juni 2027. Turen varer i fem dager med fire overnattinger. Turkomiteen ledes av Kari Enerhaug, og planen nedenfor er foreløpig. Endelig program blir sendt ut senest 1. april 2027. Hvem kan reise  Turen gjelder bare musikanter i Hovedkorpset og Drill- og slaggruppa. Aspirantkorpset deltar ikke.  Musikanten må ha fylt 11 år innen 1. juni 2027.  Musikanten må ha vært medlem av Hovedkorpset eller Drill- og slaggruppa senest fra 1. januar 2027.  Musikanten må ha møtt på minst 80 prosent av øvelsene i vårsemesteret 2027, med unntak av dokumentert sykdom.
Foreldreutvalget regner med 38 musikanter. Korpset skal ha minst én voksen per seks musikanter, og derfor reiser sju voksne: dirigent Ingeborg Haugstøl, instruktør Live Aasmyr, turleder Kari Enerhaug og fire foresatte som trekkes blant dem som melder seg. Voksne ledere betaler ikke egenandel. Søsken som ikke er medlemmer, kan ikke bli med på turen. Program Dag Dato Innhold Torsdag 17.06.2027 Oppmøte ved Tindvika skole kl. 06:45, ankomst og innkvartering på Herberget Kastanjegården om kvelden Fredag 18.06.2027 Festivalparade kl. 11:00 og marsjkonkurranse for Drill- og slaggruppa kl. 15:30 Lørdag 19.06.2027 Konsertkonkurranse for Hovedkorpset, spilletid maks 20 minutter Søndag 20.06.2027 Fellesaktivitet i badeland før lunsj, avslutningskonsert kl. 19:00 Mandag 21.06.2027 Hjemreise, forventet ankomst Tindvika skole ca. kl. 21:00 Kostnader og betaling Turen er budsjettert med 252 950 kroner i utgifter og 257 200 kroner i inntekter, altså et overskudd på 4 250 kroner som buffer. Hver musikant betaler en egenandel på 3 900 kroner. Resten finansieres med 70 000 kroner fra dugnader, 25 000 kroner fra reisefondet og 14 000 kroner fra en støttekonsert i mars 2027. Festivalavgiften er budsjettert med 550 kroner per musikant, slik den var oppgitt av arrangøren i mai 2026.  Påmeldingen er bindende og må være levert innen 1. desember 2026.  Egenandelen betales i tre like rater på 1 300 kroner: innen 15. januar, 15. mars og 15. mai 2027.  Ved avbestilling før 1. mars 2027 betales alt innbetalt beløp tilbake, med fradrag av et gebyr på 300 kroner.  Ved avbestilling fra og med 1. mars 2027 betales egenandelen bare tilbake mot legeattest.  Søskenmoderasjonen på kontingenten gjelder ikke egenandelen for turen. Familier med barn på turen skal ta tre ekstra dugnadsvakter i sesongen 2026/2027, i tillegg til de tre ordinære vaktene alle familier har. For hver ekstra turvakt som ikke blir gjennomført, faktureres familien 400 kroner, fordi dugnadsinntekten er en forutsetning for at egenandelen kan holdes på 3 900 kroner.
Regler under turen  Musikanter under 13 år skal være på rommet kl. 22:30, og musikanter som er 13 år eller eldre kl. 23:00.  Mobiltelefoner leveres til voksen leder ved leggetid og hentes ved frokost.  Musikantene skal alltid gå i grupper på minst tre, og de har ikke lov til å forlate festivalområdet uten en voksen.  Alkohol, energidrikk og snus er forbudt under hele turen. Brudd kan føre til at musikanten sendes hjem for familiens regning.  Anbefalte lommepenger er inntil 800 kroner. Forberedelser Turkomiteen består av Kari Enerhaug og to andre foresatte og rapporterer til foreldreutvalget hver måned. Komiteen holder et eget foreldremøte om turen i januar 2027, etter at påmeldingsfristen har gått ut. Hovedkorpset skal øve inn konkurranseprogrammet fra vinterseminaret i februar 2027, og Drill- og slaggruppa skal ha fire ekstra øvelser på lørdager i mai 2027. Alle musikanter som reiser, må ha gyldig pass eller nasjonalt ID-kort. Foresatte skal fylle ut et helseskjema med opplysninger om allergier og medisiner innen 1. mai 2027. Instrumentene som korpset eier, er forsikret gjennom korpsets ordinære forsikring også på turen. Private instrumenter er ikke dekket, med mindre familien selv har forsikret dem. Store slagverksinstrumenter sendes i kasser fra skolen to uker før avreise og skal pakkes av instrumentansvarlig, ikke av musikantene.

View file

@ -0,0 +1,9 @@
Tallow Hill Astronomical Society: Annual Report 2025 Tallow Hill Astronomical Society: Annual Report 2025 This report covers the work of the Tallow Hill Astronomical Society and its observatory from 1 January to 31 December 2025. It was approved by the committee on 11 February 2026 and will be presented to the Annual General Meeting on Saturday 14 March 2026 in Wrexley Green village hall. All money figures are in pounds sterling and all visitor figures are head counts taken at the gate. 1. Chair's foreword 2025 was the busiest year the society has had since it was founded in 1987. Membership rose from 171 to 186, members borrowed a society telescope 97 times, and 894 people came up the hill to a public evening, the solar open day or a school group visit. Our 34 active volunteers gave an estimated 2,640 hours of their time, compared with 2,210 hours in 2024. The year also brought the most serious equipment failure since the observatory opened in 1994. On 19 February the dome rotation motor burnt out while the dome was being closed in a sustained wind of 42 km/h. The dome stayed out of use until 26 March, and the repair cost £2,350. As a result, the committee lowered the wind limit for operating the dome from 40 km/h to 35 km/h in edition 4 of the operating handbook, which took effect on 1 February 2026. Two decisions taken in 2025 affect members in 2026. First, the refundable deposit for a loan telescope rose from £30 to £40 on 1 January 2026. Second, the committee is asking the Annual General Meeting to approve higher membership fees from 1 April 2026; the reasons are set out in section 7. I would like to thank every volunteer, and the Corran family, who own Tallow Hill and have leased the observatory site to us since 1994. Rosalind Fairweather, Chair. 2. Membership and volunteers On 31 December 2025 the society had 186 members, an increase of 15 on the 171 members a year earlier. Of the 171 members at the end of 2024, 154 renewed, a renewal rate of 90%. A further 32 people joined during the year, and 14 of those 32 new members came to us through the First Light beginners' course. Family memberships cover up to two adults and their children under 16 living at the same address, and each person in a family membership is counted as a member. Category Fee in 2025 (£ per year) Members on 31 Dec 2024 Members on 31 Dec 2025 Adult 42 95 102
Concession (students and people aged 65 or over) 24 38 41 Junior (under 16) 10 18 19 Family (up to 2 adults and their children under 16) 65 20 people in 10 memberships 24 people in 12 memberships Total 171 186 The society depends on volunteers for everything it does. At the end of 2025 there were 19 keyholders, two more than a year earlier, who are trained to open and close the observatory on their own responsibility. Eight of the keyholders are qualified to operate the Pennick Telescope in the main dome. Fourteen volunteers hold the society's safeguarding certificate, which is needed for any work with school groups and must be renewed every three years.  Active volunteers: 34 (2024: 31).  Volunteer hours: about 2,640 (2024: about 2,210).  Keyholders: 19, of whom 2 qualified in 2025.  Pennick Telescope operators: 8, unchanged from 2024.  Volunteers with a current safeguarding certificate: 14. 3. The observatory and its telescopes Tallow Hill Observatory stands 214 m above sea level, 3 km north of Wrexley Green. The main dome is 4.2 m in diameter and houses the 406 mm Pennick Telescope, named after the society's founder Margaret Pennick. The roll-off roof building known as the Annexe has three piers: pier 1 carries the society's 254 mm Schmidt-Cassegrain telescope, and piers 2 and 3 can be booked by members for their own instruments. The warm room seats 20 people and is used for talks, the beginners' course and hot drinks. Because the dome was out of use from 19 February to 26 March, the public evening on 7 March and the school visit on 12 March used only the Annexe telescopes. Both went ahead, and the 7 March evening was fully booked with 40 visitors. Members logged 61 observing nights in 2025 with a total of 214 clear hours, against 49 nights and 176 clear hours in 2024. Members borrowed a society telescope 97 times in 2025, compared with 81 times in 2024, and 58 different members used the scheme. The most borrowed instrument was the 150 mm Dobsonian T06, with 14 loans. Of the 97 loans, 19 were returned late, and late fees brought in £146. Late fees are £2 per day and are capped at £30 for a single loan. A grant of £4,500 from the Elsworth Family Trust paid for two new loan telescopes, which joined the fleet in September 2025: T13, a second 150 mm Dobsonian, and T14, an 80 mm refractor. The 200 mm Dobsonian T07 was withdrawn on 18 November 2025 after a borrower reported a dull primary mirror; it has gone away for recoating and is expected back in April 2026. The society now owns 14 telescopes, of which 11 are part of the loan
fleet. The Pennick Telescope, the Annexe pier telescope and the solar telescope T12 are never lent out. On 10 September 2025 the committee decided to raise the refundable loan deposit from £30 to £40 for all loans starting on or after 1 January 2026. The reason is that the replacement cost of the eyepiece and finder set lent with each telescope has risen to about £45, so a £30 deposit no longer covered a lost set. The concession deposit is £25. 4. Public stargazing and the solar open day The 2025 programme had 14 public evenings: the regular evening on the first Friday of each month from January to April and from September to December, and six special evenings for events such as the Perseid and Geminid meteor showers. Nine evenings were held and five were cancelled, four because of cloud and one, on 12 April, because of high wind. Public evenings are free, but places must be booked, and bookings are capped at 40 per evening. The nine evenings that went ahead drew 318 visitors, just over 35 per evening, and two of them, on 7 March and 5 September, were fully booked. The summer solar open day was held on Saturday 21 June 2025 from 10:00 to 16:00. Visitors looked at the Sun safely through the hydrogen-alpha solar telescope T12 and through projection screens, and 412 people attended, against 365 in 2024. The table below gives visitor numbers for all events held at the observatory. Pupils reached in their own classrooms are not included here; they are reported in section 5. Activity Events held 2025 Visitors 2025 Events held 2024 Visitors 2024 Public stargazing evenings 9 (14 planned) 318 8 (13 planned) 279 Summer solar open day 1 412 1 365 School group evening visits 6 164 4 109 Total 16 894 13 753 5. First Light course and schools outreach First Light is the society's beginners' course: six sessions on Tuesday evenings from 19:30 to 21:30 in the warm room, with a practical night at the telescopes as the last session. A participant completes the course by attending at least five of the six sessions. The fee in 2025 was £20 for members and £35 for non-members, and the non-member fee includes three months of free membership.  Spring run, 4 February to 11 March 2025: 16 enrolled (the maximum), 13 completed.  Autumn run, 7 October to 11 November 2025: 13 enrolled, 11 completed.  In total 29 people enrolled and 24 completed; 11 were already members and 18 were not.  14 of the 18 non-member participants went on to take out full membership.
Our schools programme, Sky in the Classroom, grew strongly. Volunteers made 17 classroom visits to 9 schools and reached 1,040 pupils, compared with 12 visits and 760 pupils in 2024. The inflatable planetarium, bought in 2023, was used at 11 of those visits for a total of 31 shows; it holds at most 25 children per show. Schools contribute £40 towards materials for each classroom visit, which brought in £680. Six school groups, with 164 pupils in all, also came to the observatory for an evening visit. Evening visits are free for schools, but they are open only to schools within 25 km of the observatory and only to pupils aged 9 or over. A group may bring at most 30 pupils, and there must be at least one adult for every 8 pupils. Every volunteer who helps with a school group must hold a current safeguarding certificate. 6. Keep Tallow Dark Keep Tallow Dark is the society's dark-sky campaign, started in 2022. Households are asked to sign a pledge to shield their outdoor lights so that no light shines above the horizontal, to use warm-white lamps of 3,000 K or lower, and to fit motion sensors or switch outdoor lights off by 23:00. By 31 December 2025 the campaign had 312 pledges, up from 205 a year earlier. The target is 400 pledges by 31 December 2026. Eleven volunteers took 102 sky brightness readings at six monitoring sites during 2025. A reading is counted only if the Moon is below the horizon and the reading is taken at least 90 minutes after sunset, because moonlight and twilight would otherwise swamp the artificial light we are trying to measure. Readings are given in magnitudes per square arcsecond, and a higher number means a darker sky. The mean of the six site averages rose from 20.6 in 2024 to 20.8 in 2025. Every site recorded a darker average sky than in 2024, by between 0.1 and 0.3. The darkest site was the observatory itself, at 21.3, and the brightest was Wrexley Green village hall, at 20.4. The committee is cautious about these results: a single year's change can partly reflect weather and the timing of readings, and three more years of data are needed before the campaign can claim a lasting improvement. 7. Finances and plans for 2026 The society ended 2025 with a surplus of £1,420 on income of £13,110 and expenditure of £11,690. In 2024 income was £11,920 and expenditure £11,310, a surplus of £610. Reserves stood at £9,830 on 31 December 2025, against £8,410 a year earlier. Of the reserves, £1,370 is a restricted fund: it is the unspent part of the Elsworth Family Trust grant and may be used only for schools outreach in 2026. Item Income 2025 (£) Expenditure 2025 (£) Membership fees 6,238 First Light course fees 850 Grant from the Elsworth Family Trust 4,500 School contributions to 680
classroom visits Tea stall at the solar open day 612 Loan late fees 146 Bank interest 84 Insurance 1,840 Site lease from the Corran family 1,200 Electricity 960 Dome motor repair 2,350 Two new loan telescopes (T13 and T14) 1,980 Telescope maintenance and eyepieces 640 Schools outreach kits and printing 1,150 First Light course materials 310 Keep Tallow Dark leaflets and sky meter 540 Hall hire for winter talks 720 Total 13,110 11,690 Our insurer has quoted £2,171 for 2026, an increase of 18% on the £1,840 paid in 2025. The committee also wants to build a dome reserve of £3,000 by the end of 2027, so that a future motor failure can be repaired without delay. For these two reasons the committee proposes the following membership fees from 1 April 2026, subject to approval at the Annual General Meeting on 14 March 2026:  Adult: from £42 to £45 per year.  Concession: from £24 to £26 per year.  Junior: unchanged at £10 per year.  Family: from £65 to £70 per year. The First Light course fees and the late fee of £2 per day are not affected by the proposal. Our main plans for 2026 are:  Return T07 to the loan fleet after mirror recoating, expected in April 2026.  Reach 400 Keep Tallow Dark pledges by 31 December 2026.  Make at least 20 classroom visits, funded partly from the restricted fund of £1,370.  Train at least three new keyholders in a course starting in May 2026.  Replace the warm room heater, which failed twice during the winter of 2025.

View file

@ -0,0 +1,251 @@
# Tallow Hill Observatory Operating Handbook and Telescope Loan Rules, Edition 4
# Tallow Hill Observatory Operating Handbook and Telescope Loan Rules
Edition 4. Approved by the committee of the Tallow Hill Astronomical Society on 21 January 2026 and in force from 1 February 2026. This edition replaces edition 3 of March 2023. Changes from edition 3 are marked 'Changed in edition 4' with the reason.
## 1. Scope of this handbook
This handbook applies to every member, volunteer and guest at Tallow Hill Observatory, and to every member who borrows a society telescope. Part A (sections 2 to 6) covers the observatory site. Part B (sections 7 to 10) covers the telescope loan scheme. Where this handbook and a verbal instruction from the duty director disagree on the night, the duty director's instruction applies until the end of that night, and the duty director must report the disagreement to the Observatory Director within 7 days.
The duty director is the keyholder named on the rota as responsible for a given night. On public evenings the duty director must be one of the eight qualified Pennick Telescope operators.
## 2. Access and keyholders
Only keyholders may unlock the lower gate, the dome, the Annexe and the warm room. To become a keyholder a member must have been a member for at least 6 months, complete the three-session keyholder training and be approved by the committee. There are currently 19 keyholders.
Two-person rule: after sunset, nobody may be on the site alone. At least two adults must be present, and at least one of them must be a keyholder.
The first keyholder to arrive must sign in the observatory log in the warm room, and the last to leave must record the closing time and the state of the dome and the Annexe roof.
The site must be vacated by 03:00, unless the duty director has approved an all-night session at least 24 hours in advance.
The code on the lower gate is changed every 6 months, on 1 January and 1 July, and is given only to keyholders.
A keyholder who has not opened the observatory for 12 months must repeat the final training session before opening it again.
## 3. Buildings, capacity and age limits
The observatory has three buildings, each with its own limits. The limits apply on every night, including public evenings, member nights and school visits.
Building
Maximum people inside
Lighting allowed
Age rule
Food and drink
Main dome (Pennick Telescope)
8, including the operator
Red light only
Children under 10 not admitted; under 16 only with an adult
Not allowed
Annexe (roll-off roof, 3 piers)
15
Red light only
Under 16 only with an adult
Not allowed
Warm room
20 seated
White light allowed
No limit
Allowed
The warm room is the only building where white light, food and hot drinks are allowed. Phone screens used outside the warm room must be set to a red night mode or kept in a pocket, because a single glance at a white screen spoils the dark adaptation of everyone nearby.
Piers 2 and 3 in the Annexe may be booked by members for their own telescopes. A booking is for one night, a member may hold at most two bookings in any calendar month, and bookings close at 12:00 on the day. Pier 1 carries the society's 254 mm Schmidt-Cassegrain telescope and may not be booked.
## 4. Weather and closing rules
The dome and the Annexe roof are closed according to the limits below. Any keyholder present may order the dome or the Annexe closed, and every person on site must follow that order at once.
Condition
Main dome
Annexe roof
Sustained wind
Close above 35 km/h
Close above 45 km/h
Gusts
Close above 50 km/h
Close above 60 km/h
Relative humidity
Close above 90%
Close above 90%
Rain, sleet or snow
Close at once
Close at once
Changed in edition 4: the sustained wind limit for the dome was 40 km/h in edition 3. It was lowered to 35 km/h because the dome rotation motor failed on 19 February 2025 while the dome was being closed in a sustained wind of 42 km/h. The Annexe limits are unchanged, because the Annexe roof slides on rails and is not driven by a motor.
The cover must be put on the Pennick Telescope whenever relative humidity rises above 85%, even if the dome itself stays open, so that dew does not form on the mirror.
The duty director decides at 16:00 on the day whether a public evening goes ahead. The evening is cancelled if the forecast cloud cover for 19:00 to 22:00 is above 70%, or if the forecast sustained wind is above 35 km/h. Booked visitors must be told of a cancellation by 17:00. An evening that goes ahead under cloud is not cancelled later, and the programme then moves to a talk in the warm room.
## 5. Operating the Pennick Telescope
Only the eight qualified Pennick Telescope operators may move the telescope, rotate the dome or change the instruments on the telescope. Every session on the Pennick Telescope must be entered in the telescope log with the start time, the end time and the objects observed.
The telescope must not be pointed below 15 degrees above the horizon, because the tube would then strike the lower wall of the dome.
The telescope must never be pointed at the Sun or within 20 degrees of it, and it may not be used in daylight.
Guests may look through the eyepiece but must not touch the hand controller or the mount.
Members aged under 14 must not use the dome rotation controls, even under supervision.
Any fault must be written in the fault book before the operator leaves, and a fault that stops the telescope from moving must be reported to the Observatory Director by 12:00 the next day.
## 6. Safety and first aid
The first-aid kit, the defibrillator and the fire extinguishers are kept in the warm room, next to the door. Every keyholder is shown where they are during training. The footpath from the lower gate to the buildings is about 400 m long and takes about ten minutes to walk; in frost or snow the duty director may close the path to guests.
Any accident or near miss must be written in the accident book on the night and reported to the Safety Officer within 24 hours.
Alcohol is not allowed anywhere on the site, except at the summer solar open day, when it is allowed in the warm room only.
Children under 16 must be accompanied by an adult at all times outside the warm room.
School groups must bring at least one adult for every 8 pupils, and no more than 30 pupils may visit at one time.
Every volunteer working with a school group must hold a current safeguarding certificate, renewed every three years.
## 7. Telescope loans: who may borrow
The society keeps a loan fleet of 11 telescopes. The Pennick Telescope, the Annexe pier telescope and the solar telescope T12 are never lent, and solar filters are not lent with any loan telescope. A member may borrow a loan telescope only if all the following apply:
The member has been a member for at least 3 months. Exception: a member who has completed the First Light course in the last 12 months may borrow after 1 month of membership.
The member is aged 18 or over. Members aged 14 to 17 may borrow only a telescope weighing less than 10 kg, and only with an adult member co-signing the loan form. Members under 14 may not borrow.
No one else in the same household has a society telescope on loan. Only one telescope may be on loan to a household at a time.
The member has no unpaid late fees from an earlier loan.
Telescopes weighing 15 kg or more, which at present are the 150 mm and 200 mm Dobsonians, may be lent only to a member who has completed the 45-minute loan induction. The induction is run by the Loans Officer on the first Saturday of each month and is valid for as long as the member keeps their membership.
## 8. Loan periods, deposits and late fees
Item
Rule
Standard loan period
28 days for loans starting 1 March to 31 October
Peak season loan period
14 days for loans starting 1 November to 28 February
Renewal
One renewal of 14 days, only if no other member is on the waiting list for that telescope
Deposit
£40, or £25 for concession members; refunded when the telescope is returned complete
Late fee
£2 per day, capped at £30 for one loan
Overdue more than 21 days
Deposit kept and the case referred to the committee
Changed in edition 4: the deposit was £30 for loans starting before 1 January 2026. It was raised to £40 because the replacement cost of the eyepiece and finder set lent with each telescope has risen to about £45. The concession deposit of £25 is unchanged.
Renewals must be asked for before the due date, by message to the Loans Officer. A renewal starts on the original due date, so it does not extend a loan that is already overdue. The Loans Officer may waive a late fee only if the observatory was closed on the due date and on the following collection session.
## 9. Collection, care and return
Telescopes are collected and returned in the warm room on Saturdays from 10:00 to 12:00 and on Wednesdays from 19:00 to 20:00. No other times are possible unless the Loans Officer agrees in writing beforehand. On collection the Loans Officer checks the telescope against its contents list with the borrower, and both sign the loan form.
Never point a loan telescope at the Sun, with or without a filter.
Do not leave a telescope outdoors overnight or store it in an unheated outbuilding, because condensation damages the optics.
Do not try to clean or adjust a mirror or lens; report any problem instead.
Report any damage or loss to the Loans Officer within 48 hours.
The telescope may not be lent on to anyone else, including family members who are not covered by the loan.
A borrower who reports damage within 48 hours is charged only the actual repair cost, up to the amount of the deposit. Damage reported later, or found only at return, may be charged at the full repair cost.
## 10. Roles and contacts
Role
Name
Responsible for
Chair
Rosalind Fairweather
Committee meetings and the annual report
Observatory Director
Priya Lindgren
The buildings, the duty rota and the Pennick Telescope
Loans Officer
Tomasz Wren
The loan fleet, inductions, deposits and late fees
Safety Officer
Owen Pryce
The accident book, first aid and safety checks
Outreach Coordinator
Gwen Haddow
School visits and safeguarding certificates
Course Leader
Callum Steadman
The First Light beginners' course
Questions about this handbook go to the Observatory Director. Proposals for changes may be sent by any member, and the committee reviews the handbook at least once every three years.

View file

@ -0,0 +1,79 @@
#### Inventory 31 Jan 2026
A: Telescope ID | B: Type | C: Aperture (mm) | D: Focal length (mm) | E: Weight (kg) | F: Year acquired | G: Condition | H: Loanable | I: Status on 31 Jan 2026 | J: Notes
A: T01 | B: Reflector (Pennick Telescope) | C: 406 | D: 1830 | E: 68 | F: 2006 | G: Good | H: No | I: Observatory use | J: Fixed in the main dome; qualified operators only
A: T02 | B: Schmidt-Cassegrain | C: 254 | D: 2540 | E: 27.5 | F: 2011 | G: Good | H: No | I: Observatory use | J: Fixed on Annexe pier 1
A: T03 | B: Refractor | C: 70 | D: 700 | E: 4.5 | F: 2009 | G: Fair | H: Yes | I: On loan | J: Beginner kit; Moon and planets
A: T04 | B: Refractor | C: 80 | D: 600 | E: 6 | F: 2012 | G: Good | H: Yes | I: Available
A: T05 | B: Tabletop Dobsonian | C: 114 | D: 450 | E: 5.8 | F: 2015 | G: Good | H: Yes | I: On loan | J: Needs a sturdy table or stool
A: T06 | B: Dobsonian | C: 150 | D: 1200 | E: 17.5 | F: 2016 | G: Good | H: Yes | I: Available | J: Induction required; most borrowed in 2025 (14 loans)
A: T07 | B: Dobsonian | C: 200 | D: 1200 | E: 21 | F: 2017 | G: Under repair | H: Yes | I: Withdrawn | J: Withdrawn 18 Nov 2025 for primary mirror recoating; expected back April 2026
A: T08 | B: Dobsonian | C: 200 | D: 1200 | E: 21 | F: 2019 | G: Good | H: Yes | I: On loan | J: Induction required
A: T09 | B: Maksutov | C: 90 | D: 1250 | E: 4.2 | F: 2018 | G: Good | H: Yes | I: Available
A: T10 | B: Refractor | C: 102 | D: 660 | E: 8.300000000000001 | F: 2020 | G: Excellent | H: Yes | I: Available
A: T11 | B: Reflector on equatorial mount | C: 130 | D: 900 | E: 11.4 | F: 2014 | G: Fair | H: Yes | I: Available | J: Mount slips in declination; lent with a spare clamp
A: T12 | B: Hydrogen-alpha solar telescope | C: 40 | D: 400 | E: 3.1 | F: 2021 | G: Good | H: No | I: Observatory use | J: Solar open day and observatory use only; never lent
A: T13 | B: Dobsonian | C: 150 | D: 1200 | E: 17.5 | F: 2025 | G: Excellent | H: Yes | I: Available | J: Added Sept 2025; Elsworth Family Trust grant; induction required
A: T14 | B: Refractor | C: 80 | D: 480 | E: 5.2 | F: 2025 | G: Excellent | H: Yes | I: Available | J: Added Sept 2025; Elsworth Family Trust grant
#### Loan log Oct 2025-Jan 2026
A: Loan no. | B: Telescope ID | C: Member no. | D: Borrower age group | E: Start date | F: Due date | G: Returned date | H: Days late (days) | I: Late fee (£) | J: Renewed | K: Notes
A: L25-081 | B: T06 | C: M0412 | D: Adult | E: 2025-10-04 | F: 2025-11-01 | G: 2025-11-01 | H: 0 | I: 0 | J: No | K: Induction completed 6 Sep 2025
A: L25-082 | B: T03 | C: M0388 | D: 14-17 | E: 2025-10-04 | F: 2025-11-01 | G: 2025-10-29 | H: 0 | I: 0 | J: No | K: Co-signed by parent, member M0387
A: L25-083 | B: T10 | C: M0451 | D: Adult | E: 2025-10-08 | F: 2025-11-05 | G: 2025-11-08 | H: 3 | I: 6 | J: No
A: L25-084 | B: T07 | C: M0299 | D: Adult | E: 2025-10-11 | F: 2025-11-08 | G: 2025-11-15 | H: 7 | I: 14 | J: No | K: Borrower reported dull primary mirror; T07 withdrawn 18 Nov
A: L25-085 | B: T05 | C: M0467 | D: Adult | E: 2025-10-11 | F: 2025-11-08 | G: 2025-11-05 | H: 0 | I: 0 | J: No | K: First Light completer; 1-month rule applied
A: L25-086 | B: T09 | C: M0320 | D: Adult | E: 2025-10-15 | F: 2025-11-26 | G: 2025-11-26 | H: 0 | I: 0 | J: Yes | K: Renewed once for 14 days; no waiting list
A: L25-087 | B: T13 | C: M0402 | D: Adult | E: 2025-10-18 | F: 2025-11-15 | G: 2025-11-15 | H: 0 | I: 0 | J: No | K: First loan of T13
A: L25-088 | B: T04 | C: M0475 | D: Adult | E: 2025-10-25 | F: 2025-11-22 | G: 2025-11-19 | H: 0 | I: 0 | J: No
A: L25-089 | B: T08 | C: M0356 | D: Adult | E: 2025-10-29 | F: 2025-11-26 | G: 2025-12-10 | H: 14 | I: 28 | J: No
A: L25-090 | B: T11 | C: M0441 | D: Adult | E: 2025-11-01 | F: 2025-11-15 | G: 2025-11-15 | H: 0 | I: 0 | J: No | K: Peak season: 14-day loan; spare clamp issued
A: L25-091 | B: T06 | C: M0360 | D: Adult | E: 2025-11-08 | F: 2025-11-22 | G: 2025-11-22 | H: 0 | I: 0 | J: No
A: L25-092 | B: T03 | C: M0479 | D: Adult | E: 2025-11-12 | F: 2025-11-26 | G: 2025-11-26 | H: 0 | I: 0 | J: No
A: L25-093 | B: T10 | C: M0403 | D: Adult | E: 2025-11-15 | F: 2025-11-29 | G: 2025-12-03 | H: 4 | I: 8 | J: No
A: L25-094 | B: T05 | C: M0333 | D: Adult | E: 2025-11-22 | F: 2025-12-06 | G: 2025-12-06 | H: 0 | I: 0 | J: No
A: L25-095 | B: T13 | C: M0412 | D: Adult | E: 2025-11-29 | F: 2025-12-27 | G: 2025-12-27 | H: 0 | I: 0 | J: Yes | K: Renewed once for 14 days
A: L25-096 | B: T14 | C: M0488 | D: 14-17 | E: 2025-12-06 | F: 2025-12-20 | G: 2025-12-20 | H: 0 | I: 0 | J: No | K: Co-signed by parent, member M0489
A: L25-097 | B: T09 | C: M0451 | D: Adult | E: 2025-12-13 | F: 2025-12-27 | G: 2026-01-14 | H: 18 | I: 30 | J: No | K: Last loan of 2025; late fee capped at £30
A: L26-001 | B: T04 | C: M0502 | D: Adult | E: 2026-01-03 | F: 2026-01-17 | G: 2026-01-17 | H: 0 | I: 0 | J: No | K: First Light completer (autumn 2025); 1-month rule applied
A: L26-002 | B: T06 | C: M0377 | D: Adult | E: 2026-01-03 | F: 2026-01-17 | G: 2026-01-21 | H: 4 | I: 8 | J: No
A: L26-003 | B: T08 | C: M0299 | D: Adult | E: 2026-01-10 | F: 2026-02-07 | J: Yes | K: Renewal asked for on 21 Jan 2026; still on loan
A: L26-004 | B: T10 | C: M0415 | D: Adult | E: 2026-01-14 | F: 2026-01-28 | G: 2026-01-28 | H: 0 | I: 0 | J: No
A: L26-005 | B: T13 | C: M0467 | D: Adult | E: 2026-01-17 | F: 2026-01-31 | G: 2026-01-31 | H: 0 | I: 0 | J: No | K: Induction completed 3 Jan 2026
A: L26-006 | B: T03 | C: M0510 | D: Adult | E: 2026-01-24 | F: 2026-02-07 | J: No | K: Still on loan
A: L26-007 | B: T05 | C: M0520 | D: Adult | E: 2026-01-31 | F: 2026-02-14 | J: No | K: Still on loan
#### Sessions 2025
A: Date | B: Day | C: Event type | D: Event name | E: Status | F: Reason if cancelled | G: Clear time (min) | H: Visitors (count) | I: Sky reading (mag/arcsec²) | J: Lead | K: Notes
A: 2025-01-03 | B: Fri | C: Public evening | D: New Year sky | E: Cancelled | F: Cloud | G: 0 | H: 0 | J: Priya Lindgren | K: Forecast cloud 90% at 16:00
A: 2025-01-21 | B: Tue | C: School visit | D: Ashcombe Primary, Year 6 | E: Held | G: 75 | H: 28 | I: 20.9 | J: Gwen Haddow | K: Planetarium used for the first 40 minutes
A: 2025-02-07 | B: Fri | C: Public evening | D: Winter clusters | E: Held | G: 110 | H: 38 | I: 21 | J: Priya Lindgren
A: 2025-02-13 | B: Thu | C: School visit | D: Millbeck Primary, Years 5-6 | E: Held | G: 60 | H: 30 | I: 20.7 | J: Gwen Haddow | K: Maximum group size; 4 adults
A: 2025-02-22 | B: Sat | C: Special evening | D: Planet line-up evening | E: Cancelled | F: Cloud | G: 0 | H: 0 | J: Hamish Ottley | K: Dome also out of use (motor failure 19 Feb)
A: 2025-03-07 | B: Fri | C: Public evening | D: Spring Moon | E: Held | G: 95 | H: 40 | J: Priya Lindgren | K: Fully booked; Annexe telescopes only; no sky reading as Moon above horizon
A: 2025-03-12 | B: Wed | C: School visit | D: Wrexley Green Primary, Year 5 | E: Held | G: 50 | H: 24 | J: Gwen Haddow | K: Annexe telescopes only; Moon above horizon
A: 2025-04-04 | B: Fri | C: Public evening | D: Spring sky tour | E: Held | G: 85 | H: 31 | I: 20.8 | J: Callum Steadman
A: 2025-04-12 | B: Sat | C: Special evening | D: Spring galaxies | E: Cancelled | F: High wind | G: 0 | H: 0 | J: Callum Steadman | K: Gusts of 60 km/h forecast
A: 2025-08-12 | B: Tue | C: Special evening | D: Perseid evening | E: Held | G: 140 | H: 36 | J: Hamish Ottley | K: Bright Moon; 23 meteors counted by visitors
A: 2025-09-05 | B: Fri | C: Public evening | D: Autumn sky tour | E: Held | G: 120 | H: 40 | I: 20.9 | J: Priya Lindgren | K: Fully booked
A: 2025-09-20 | B: Sat | C: Special evening | D: Saturn evening | E: Held | G: 70 | H: 27 | I: 21.1 | J: Callum Steadman | K: Cloud from 22:10
A: 2025-10-03 | B: Fri | C: Public evening | D: Harvest sky | E: Held | G: 100 | H: 33 | J: Hamish Ottley | K: Moon above horizon; no sky reading
A: 2025-10-16 | B: Thu | C: School visit | D: Kestrel Down School, Year 7 | E: Held | G: 80 | H: 29 | I: 21 | J: Gwen Haddow
A: 2025-10-25 | B: Sat | C: Special evening | D: Andromeda evening | E: Cancelled | F: Cloud | G: 0 | H: 0 | J: Priya Lindgren
A: 2025-11-07 | B: Fri | C: Public evening | D: Autumn deep sky | E: Held | G: 90 | H: 35 | J: Callum Steadman | K: Moon above horizon; no sky reading
A: 2025-11-13 | B: Thu | C: School visit | D: Hartsmoor Primary, Year 6 | E: Held | G: 65 | H: 27 | I: 20.8 | J: Gwen Haddow
A: 2025-12-03 | B: Wed | C: School visit | D: Ashcombe Primary, Year 5 | E: Held | G: 55 | H: 26 | J: Gwen Haddow | K: Moon above horizon
A: 2025-12-05 | B: Fri | C: Public evening | D: Winter returns | E: Cancelled | F: Cloud | G: 0 | H: 0 | J: Priya Lindgren
A: 2025-12-13 | B: Sat | C: Special evening | D: Geminid evening | E: Held | G: 130 | H: 38 | I: 21.2 | J: Hamish Ottley | K: 41 meteors counted by visitors
#### Dark-sky sites 2024-2025
A: Site code | B: Site name | C: Distance from observatory (km) | D: Mean reading 2024 (mag/arcsec²) | E: Mean reading 2025 (mag/arcsec²) | F: Readings in 2025 (count) | G: Change (mag/arcsec²) | H: Volunteer responsible | I: Notes
A: S1 | B: Tallow Hill Observatory | C: 0 | D: 21.1 | E: 21.3 | F: 22 | G: 0.2 | H: Marta Ilves | I: Darkest site
A: S2 | B: Kestrel Down | C: 3.4 | D: 20.9 | E: 21 | F: 18 | G: 0.1 | H: Hamish Ottley
A: S3 | B: Millbeck Common | C: 5.1 | D: 20.5 | E: 20.7 | F: 15 | G: 0.2 | H: Marta Ilves
A: S4 | B: Wrexley Green village hall | C: 3.1 | D: 20.2 | E: 20.4 | F: 19 | G: 0.2 | H: Owen Pryce | I: Brightest site; 41 pledges in the surrounding streets
A: S5 | B: Hartsmoor Farm | C: 6.8 | D: 20.6 | E: 20.8 | F: 12 | G: 0.2 | H: Gwen Haddow | I: Lit farmyard 300 m to the south
A: S6 | B: Ashcombe churchyard | C: 4 | D: 20.3 | E: 20.6 | F: 16 | G: 0.3 | H: Tomasz Wren | I: Largest improvement

View file

@ -0,0 +1,67 @@
#### Vedlikeholdsplan 2026-2030
A: År | B: Tiltak | C: Bygning | D: Estimert kostnad (kr) | E: Prioritet | F: Ansvarlig | G: Status
A: 2026 | B: Forprosjekt balkonger og fasader, del 2 (anbudsgrunnlag og anbudsrunde) | C: A, B, C, D | D: 1051500 | E: Høy | F: Ingrid Solbakk | G: Pågår; anbud innhentes høsten 2026
A: 2026 | B: Nytt tak på sykkelbod sør | C: Sykkelbod sør | D: 118000 | E: Høy | F: Kåre Myrvold | G: Bestilt; utføres i juni
A: 2026 | B: Maling av trapperom | C: A | D: 172000 | E: Middels | F: Torbjørn Leirvik | G: Planlagt august
A: 2026 | B: Utskifting av ytterdører i oppganger | C: B | D: 236000 | E: Middels | F: Torbjørn Leirvik | G: Tilbud mottatt
A: 2026 | B: Service på ventilasjonsanlegg | C: A, B, C, D | D: 48000 | E: Høy | F: Kåre Myrvold | G: Årlig service i oktober
A: 2026 | B: Nye benker og bord ved grillplassen | C: Hage | D: 64000 | E: Lav | F: Petter Nygård-Ulvik | G: Hagekomiteen velger modell
A: 2026 | B: Drenering langs nordveggen | C: D | D: 198000 | E: Høy | F: Torbjørn Leirvik | G: Fuktmålinger viste behov
A: 2026 | B: Diverse småreparasjoner | C: A, B, C, D | D: 144000 | E: Middels | F: Kåre Myrvold | G: Løpende
A: 2027 | B: Rehabilitering av balkonger og fasader | C: A | D: 10400000 | E: Høy | F: Ingrid Solbakk | G: Byggestart april 2027 (vedtatt 21.04.2026)
A: 2027 | B: Rehabilitering av balkonger og fasader | C: B | D: 10400000 | E: Høy | F: Ingrid Solbakk | G: Byggestart april 2027 (vedtatt 21.04.2026)
A: 2027 | B: Utskifting av de to siste vaskemaskinene | C: B | D: 68000 | E: Middels | F: Kåre Myrvold | G: Maskinene er fra 2014
A: 2027 | B: Maling av trapperom | C: B | D: 176000 | E: Middels | F: Torbjørn Leirvik | G: Ikke startet
A: 2027 | B: Service på ventilasjonsanlegg | C: A, B, C, D | D: 49000 | E: Høy | F: Kåre Myrvold | G: Årlig service
A: 2028 | B: Rehabilitering av balkonger og fasader | C: C | D: 11300000 | E: Høy | F: Ingrid Solbakk | G: Byggestart april 2028 (vedtatt 21.04.2026)
A: 2028 | B: Rehabilitering av balkonger og fasader | C: D | D: 8900000 | E: Høy | F: Ingrid Solbakk | G: Byggestart april 2028 (vedtatt 21.04.2026)
A: 2028 | B: Nytt dekke på gangstiene i hagen | C: Uteområde | D: 142000 | E: Lav | F: Petter Nygård-Ulvik | G: Venter til stillaser er fjernet
A: 2028 | B: Utskifting av tørketromler | C: B | D: 54000 | E: Lav | F: Kåre Myrvold | G: Vurderes etter tilstand
A: 2029 | B: Nytt taktekke | C: A | D: 1640000 | E: Middels | F: Torbjørn Leirvik | G: Tekket er fra 1996
A: 2029 | B: Maling av trapperom | C: C | D: 181000 | E: Lav | F: Torbjørn Leirvik | G: Ikke startet
A: 2029 | B: Nye lekeapparater | C: Uteområde | D: 210000 | E: Middels | F: Petter Nygård-Ulvik | G: Dagens apparater er fra 2009
A: 2030 | B: Rørfornying av stigeledninger (strømpeforing) | C: A, B, C, D | D: 4850000 | E: Høy | F: Ingrid Solbakk | G: Basert på rørinspeksjonen i oktober 2025
A: 2030 | B: Oppgradering av fellesrommet (kjøkken og gulv) | C: D | D: 285000 | E: Lav | F: Marit Kolstø-Berge | G: Ønske fra beboerundersøkelsen 2025
#### Budsjett 2026
A: Post | B: Regnskap 2025 (kr) | C: Budsjett 2026 (kr) | D: Endring (%) | E: Merknad
A: Felleskostnader | B: 5184000 | C: 5495000 | D: 6 | E: Økning på 6 % fra 1. januar 2026
A: Andre driftsinntekter (vaskeri, fellesrom, nøkkelbrikker) | B: 100150 | C: 104000 | D: 3.8 | E: Uendrede priser i vaskeri og fellesrom
A: Gebyrer for vann, avløp og renovasjon | B: 812400 | C: 853000 | D: 5 | E: Varslet økning på om lag 5 %
A: Forsikring | B: 486000 | C: 525000 | D: 8 | E: Økning på 8 % etter vannskadene i 2025
A: Energi i fellesarealer | B: 318700 | C: 305000 | D: -4.3 | E: Lavere forbruk etter LED-belysning
A: Vaktmester (lønn og sosiale kostnader) | B: 642500 | C: 668000 | D: 4 | E: Lønnsoppgjør
A: Forretningsførsel og revisjon | B: 214300 | C: 222000 | D: 3.6 | E: Ny avtale fra 1. januar 2026
A: Vedlikehold og reparasjoner | B: 1236800 | C: 980000 | D: -20.8 | E: Se arket Vedlikeholdsplan
A: Forprosjekt rehabilitering | B: 0 | C: 1051500 | D: Ny post | E: Restbeløp av rammen på 1,2 mill. kr; 148 500 kr ble ført som vedlikehold i 2025
A: Styrehonorar | B: 180000 | C: 186000 | D: 3.3 | E: Vedtatt av generalforsamlingen 21. april 2026
A: Andre driftskostnader | B: 197600 | C: 205000 | D: 3.7
A: Renteinntekter | B: 48300 | C: 40000 | D: -17.2 | E: Lavere innskudd når forprosjektet betales
A: Rentekostnader | B: 498200 | C: 470000 | D: -5.7 | E: Lavere lånesaldo og rente
A: Sum driftsinntekter | B: 5284150 | C: 5599000 | D: 6
A: Sum driftskostnader | B: 4088300 | C: 4995500 | D: 22.2 | E: Inkluderer forprosjektet
A: Årsresultat | B: 745950 | C: 173500 | D: -76.7 | E: Budsjettert overskudd
#### Utført vedlikehold 2025
A: Dato | B: Tiltak | C: Bygning | D: Kostnad (kr) | E: Utført av | F: Merknad
A: 2025-02-14 | B: Ombygging av tidligere lagerrom til hobbyverksted | C: C | D: 52300 | E: Vaktmester og innleid snekker | F: Åpnet for beboere 1. mars 2025
A: 2025-03-21 | B: LED-belysning med bevegelsessensor i alle trapperom | C: A, B, C, D | D: 186000 | E: Innleid elektriker | F: Ga lavere strømforbruk i fellesarealer
A: 2025-04-09 | B: Nytt fallunderlag under huskestativet på lekeplassen | C: Uteområde | D: 38200 | E: Innleid entreprenør | F: Gammelt underlag var slitt ned
A: 2025-05-16 | B: Ladeskap med 8 låsbare rom for elsykkelbatterier | C: Sykkelbod sør | D: 39800 | E: Innleid elektriker | F: Lading er bare tillatt i disse skapene
A: 2025-05-28 | B: Ny port med nøkkelbrikkeleser i sykkelbod nord | C: Sykkelbod nord | D: 31500 | E: Innleid låsesmed | F: Erstattet port med hengelås
A: 2025-06-11 | B: Reparasjon av taklekkasje over oppgang 2 | C: C | D: 214600 | E: Innleid taktekker | F: Lekkasje oppdaget etter kraftig regn 2. juni
A: 2025-06-30 | B: Nye busker langs gangstien og reparasjon av plen | C: Hage | D: 24300 | E: Hagekomiteen og vaktmester | F: Plantet på vårdugnaden og etterpå
A: 2025-08-22 | B: Maling av vegger og tak i trapperom | C: D | D: 167300 | E: Innleid malerfirma | F: Arbeidet tok tre uker
A: 2025-09-05 | B: To nye vaskemaskiner i fellesvaskeriet | C: B | D: 64800 | E: Leverandør monterte | F: De to eldste av fire maskiner ble byttet
A: 2025-09-19 | B: Utskifting av to sluk i vaskeriet | C: B | D: 28400 | E: Innleid rørlegger | F: Gjort samtidig med maskinbyttet
A: 2025-10-03 | B: Rørinspeksjon med kamera i alle stigeledninger | C: A, B, C, D | D: 72500 | E: Innleid rørlegger | F: Grunnlag for rørfornying i 2030
A: 2025-10-24 | B: Service på ventilasjonsanlegg | C: A, B, C, D | D: 46800 | E: Innleid servicefirma | F: Årlig service
A: 2025-11-07 | B: Nye nøkkelbrikkelesere ved fellesrom og vaskeri | C: B, D | D: 42600 | E: Innleid låsesmed | F: Gamle lesere sviktet i kulde
A: 2025-11-27 | B: Kontroll og service av brannslukningsapparater | C: A, B, C, D | D: 18900 | E: Innleid servicefirma | F: Kontroll hvert femte år
A: 2025-12-12 | B: Egenandeler for tre vannskader | C: A, C | D: 30000 | E: Forsikringsoppgjør | F: 10 000 kr per skade
A: 2025-12-17 | B: Tilstandsrapport for balkonger og fasader (forprosjekt, del 1) | C: A, B, C, D | D: 148500 | E: Innleid rådgivende ingeniør | F: Del av forprosjektets ramme på 1,2 mill. kr
A: 2025-12-31 | B: Diverse småreparasjoner gjennom året | C: A, B, C, D | D: 30300 | E: Vaktmester | F: Dørpumper, vinduhengsler, lysrør i boder m.m.
B: Sum vedlikehold og reparasjoner 2025 | D: 1236800 | F: Stemmer med årsregnskapet

Some files were not shown because too many files have changed in this diff Show more