Compare commits

...

2 Commits

Author SHA1 Message Date
Timmy Burn
0fa21f6e88 docs: ground paperclips epic tracker for #15
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Successful in 5s
Smoke Test / smoke (pull_request) Failing after 10s
2026-04-18 15:23:26 -04:00
Timmy Burn
36636d7cc5 test: define paperclips tracker proof for #15 2026-04-18 15:20:42 -04:00
3 changed files with 368 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
# Paperclips Deep Study — Implementation Tracker
Grounded status snapshot for epic #15.
This report tracks live forge issue state against visible repo evidence.
It does not claim the epic is complete; it shows what is present vs missing today.
- Forge issues: 8 open / 5 closed
- Repo evidence: 8 present / 5 missing
| Issue | Title | Forge state | Repo evidence | Proof |
| --- | --- | --- | --- | --- |
| #2 | [P0] Paperclips-style Project Chain System | open | present | js/data.js (`PROJECT DEFINITIONS (following Paperclips' pattern exactly)`, `const PDEFS = [`) |
| #3 | [P0] Creative Compute (Quantum Burst System) | closed | present | js/data.js (`p_quantum_compute`, `Quantum-Inspired Compute`) |
| #4 | [P0] Compute Budget Supply/Demand Momentum | open | missing | missing in js/data.js: `supply/demand`, `momentum` |
| #5 | [P1] Strategy Engine Game Theory Tournaments | open | present | js/strategy.js (`Sovereign Strategy Engine`, `class StrategyEngine`) |
| #6 | [P1] Community Swarm Alignment Simulation | open | present | js/data.js (`p_swarm_protocol`, `Every building now thinks in code.`) |
| #7 | [P1] Fibonacci Trust Milestone System | open | missing | missing in js/data.js: `Fibonacci`, `trust milestone` |
| #8 | [P1] Investment Engine Research Grants | open | missing | missing in js/data.js: `investment`, `research grant` |
| #9 | [P2] Emotional Arc Milestone Narrative System | closed | present | js/emergent-mechanics.js (`THE BEACON - Emergent Game Mechanics`, `dynamic events that reward or challenge those strategies.`) |
| #10 | [P2] Number Formatting spellf equivalent | closed | present | js/utils.js (`spellf()`, `one decillion`) |
| #11 | [P2] Offline Progress Calculation | closed | present | js/render.js (`showOfflinePopup`, `Offline efficiency: 50%`) |
| #12 | [P2] Prestige New Game+ System | open | missing | missing in js/data.js: `prestige`, `New Game+` |
| #13 | [P3] Deploy Beacon as Static Site | closed | present | README.md (`No build step required`, `static HTML/JS game`) |
| #14 | [P3] Paperclips Architecture Comparison Document | open | missing | missing in README.md: `Paperclips Architecture Comparison`, `architecture comparison` |
## Notes
- `present` means the repository contains directly relevant code or docs markers for that study item.
- `missing` means the tracker could not find the expected markers yet; that child issue likely still needs a dedicated repo-side slice.
- Because #15 is an epic tracker, this artifact should advance the issue with `Refs #15`, not close it.

View File

@@ -0,0 +1,271 @@
#!/usr/bin/env python3
"""Generate a grounded implementation tracker for the Beacon Paperclips study epic."""
from __future__ import annotations
import argparse
import json
import os
from pathlib import Path
from typing import Iterable
from urllib.request import Request, urlopen
API_BASE = 'https://forge.alexanderwhitestone.com/api/v1'
REPO = 'Timmy_Foundation/the-beacon'
EPIC_NUMBER = 15
TRACKED_ISSUES = [
{
'number': 2,
'title': '[P0] Paperclips-style Project Chain System',
'evidence': {
'path': 'js/data.js',
'snippets': [
"PROJECT DEFINITIONS (following Paperclips' pattern exactly)",
'const PDEFS = [',
],
},
},
{
'number': 3,
'title': '[P0] Creative Compute (Quantum Burst System)',
'evidence': {
'path': 'js/data.js',
'snippets': [
'p_quantum_compute',
'Quantum-Inspired Compute',
],
},
},
{
'number': 4,
'title': '[P0] Compute Budget Supply/Demand Momentum',
'evidence': {
'path': 'js/data.js',
'snippets': [
'supply/demand',
'momentum',
],
},
},
{
'number': 5,
'title': '[P1] Strategy Engine Game Theory Tournaments',
'evidence': {
'path': 'js/strategy.js',
'snippets': [
'Sovereign Strategy Engine',
'class StrategyEngine',
],
},
},
{
'number': 6,
'title': '[P1] Community Swarm Alignment Simulation',
'evidence': {
'path': 'js/data.js',
'snippets': [
'p_swarm_protocol',
'Every building now thinks in code.',
],
},
},
{
'number': 7,
'title': '[P1] Fibonacci Trust Milestone System',
'evidence': {
'path': 'js/data.js',
'snippets': [
'Fibonacci',
'trust milestone',
],
},
},
{
'number': 8,
'title': '[P1] Investment Engine Research Grants',
'evidence': {
'path': 'js/data.js',
'snippets': [
'investment',
'research grant',
],
},
},
{
'number': 9,
'title': '[P2] Emotional Arc Milestone Narrative System',
'evidence': {
'path': 'js/emergent-mechanics.js',
'snippets': [
'THE BEACON - Emergent Game Mechanics',
'dynamic events that reward or challenge those strategies.',
],
},
},
{
'number': 10,
'title': '[P2] Number Formatting spellf equivalent',
'evidence': {
'path': 'js/utils.js',
'snippets': [
'spellf()',
'one decillion',
],
},
},
{
'number': 11,
'title': '[P2] Offline Progress Calculation',
'evidence': {
'path': 'js/render.js',
'snippets': [
'showOfflinePopup',
'Offline efficiency: 50%',
],
},
},
{
'number': 12,
'title': '[P2] Prestige New Game+ System',
'evidence': {
'path': 'js/data.js',
'snippets': [
'prestige',
'New Game+',
],
},
},
{
'number': 13,
'title': '[P3] Deploy Beacon as Static Site',
'evidence': {
'path': 'README.md',
'snippets': [
'No build step required',
'static HTML/JS game',
],
},
},
{
'number': 14,
'title': '[P3] Paperclips Architecture Comparison Document',
'evidence': {
'path': 'README.md',
'snippets': [
'Paperclips Architecture Comparison',
'architecture comparison',
],
},
},
]
def load_issue_states(issues_json: str | None) -> dict[int, dict]:
if issues_json:
records = json.loads(Path(issues_json).read_text(encoding='utf-8'))
return {int(record['number']): record for record in records}
token_path = Path(os.path.expanduser('~/.config/gitea/token'))
token = token_path.read_text(encoding='utf-8').strip()
headers = {'Authorization': f'token {token}'}
states = {}
for issue in TRACKED_ISSUES:
req = Request(f'{API_BASE}/repos/{REPO}/issues/{issue["number"]}', headers=headers)
with urlopen(req, timeout=30) as response:
data = json.loads(response.read().decode())
states[issue['number']] = {
'number': data['number'],
'title': data['title'],
'state': data['state'],
'html_url': data.get('html_url'),
}
return states
def evidence_status(repo_root: Path, issue: dict) -> tuple[str, str]:
evidence = issue['evidence']
rel_path = evidence['path']
snippets = evidence['snippets']
content = (repo_root / rel_path).read_text(encoding='utf-8')
matches = [snippet for snippet in snippets if snippet in content]
if len(matches) == len(snippets):
proof = f"{rel_path} ({', '.join(f'`{snippet}`' for snippet in snippets)})"
return 'present', proof
missing = [snippet for snippet in snippets if snippet not in matches]
proof = f"missing in {rel_path}: {', '.join(f'`{snippet}`' for snippet in missing)}"
return 'missing', proof
def render_markdown(rows: Iterable[dict]) -> str:
rows = list(rows)
open_count = sum(1 for row in rows if row['forge_state'] == 'open')
closed_count = sum(1 for row in rows if row['forge_state'] == 'closed')
present_count = sum(1 for row in rows if row['repo_evidence'] == 'present')
missing_count = sum(1 for row in rows if row['repo_evidence'] == 'missing')
lines = [
'# Paperclips Deep Study — Implementation Tracker',
'',
f'Grounded status snapshot for epic #{EPIC_NUMBER}.',
'This report tracks live forge issue state against visible repo evidence.',
'It does not claim the epic is complete; it shows what is present vs missing today.',
'',
f'- Forge issues: {open_count} open / {closed_count} closed',
f'- Repo evidence: {present_count} present / {missing_count} missing',
'',
'| Issue | Title | Forge state | Repo evidence | Proof |',
'| --- | --- | --- | --- | --- |',
]
for row in rows:
lines.append(
f"| #{row['number']} | {row['title']} | {row['forge_state']} | {row['repo_evidence']} | {row['proof']} |"
)
lines.extend(
[
'',
'## Notes',
'',
'- `present` means the repository contains directly relevant code or docs markers for that study item.',
'- `missing` means the tracker could not find the expected markers yet; that child issue likely still needs a dedicated repo-side slice.',
'- Because #15 is an epic tracker, this artifact should advance the issue with `Refs #15`, not close it.',
'',
]
)
return '\n'.join(lines)
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--repo-root', default='.', help='Path to the-beacon checkout')
parser.add_argument('--issues-json', help='Optional local JSON file with issue records for offline testing')
parser.add_argument('--output', required=True, help='Where to write the markdown tracker')
args = parser.parse_args()
repo_root = Path(args.repo_root).resolve()
issue_states = load_issue_states(args.issues_json)
rows = []
for issue in TRACKED_ISSUES:
state = issue_states.get(issue['number'], {})
repo_evidence, proof = evidence_status(repo_root, issue)
rows.append(
{
'number': issue['number'],
'title': state.get('title', issue['title']),
'forge_state': state.get('state', 'unknown'),
'repo_evidence': repo_evidence,
'proof': proof,
}
)
output = Path(args.output)
output.parent.mkdir(parents=True, exist_ok=True)
output.write_text(render_markdown(rows), encoding='utf-8')
print(output)
return 0
if __name__ == '__main__':
raise SystemExit(main())

View File

@@ -0,0 +1,67 @@
#!/usr/bin/env python3
import json
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
SCRIPT = ROOT / 'scripts' / 'paperclips_tracker.py'
ISSUES = [
{'number': 2, 'title': '[P0] Paperclips-style Project Chain System', 'state': 'open'},
{'number': 3, 'title': '[P0] Creative Compute (Quantum Burst System)', 'state': 'closed'},
{'number': 4, 'title': '[P0] Compute Budget Supply/Demand Momentum', 'state': 'open'},
{'number': 5, 'title': '[P1] Strategy Engine Game Theory Tournaments', 'state': 'open'},
{'number': 6, 'title': '[P1] Community Swarm Alignment Simulation', 'state': 'open'},
{'number': 7, 'title': '[P1] Fibonacci Trust Milestone System', 'state': 'open'},
{'number': 8, 'title': '[P1] Investment Engine Research Grants', 'state': 'open'},
{'number': 9, 'title': '[P2] Emotional Arc Milestone Narrative System', 'state': 'closed'},
{'number': 10, 'title': '[P2] Number Formatting spellf equivalent', 'state': 'closed'},
{'number': 11, 'title': '[P2] Offline Progress Calculation', 'state': 'closed'},
{'number': 12, 'title': '[P2] Prestige New Game+ System', 'state': 'open'},
{'number': 13, 'title': '[P3] Deploy Beacon as Static Site', 'state': 'closed'},
{'number': 14, 'title': '[P3] Paperclips Architecture Comparison Document', 'state': 'open'},
]
def run_tracker(tmp_path: Path) -> str:
issues_path = tmp_path / 'issues.json'
output_path = tmp_path / 'tracker.md'
issues_path.write_text(json.dumps(ISSUES), encoding='utf-8')
result = subprocess.run(
[
sys.executable,
str(SCRIPT),
'--repo-root',
str(ROOT),
'--issues-json',
str(issues_path),
'--output',
str(output_path),
],
capture_output=True,
text=True,
)
assert result.returncode == 0, result.stderr or result.stdout
return output_path.read_text(encoding='utf-8')
def test_tracker_renders_summary_counts(tmp_path: Path) -> None:
report = run_tracker(tmp_path)
assert '# Paperclips Deep Study — Implementation Tracker' in report
assert '- Forge issues: 8 open / 5 closed' in report
assert '- Repo evidence: 8 present / 5 missing' in report
def test_tracker_renders_issue_rows_with_grounded_evidence(tmp_path: Path) -> None:
report = run_tracker(tmp_path)
assert '| #2 | [P0] Paperclips-style Project Chain System | open | present |' in report
assert '| #3 | [P0] Creative Compute (Quantum Burst System) | closed | present |' in report
assert '| #8 | [P1] Investment Engine Research Grants | open | missing |' in report
assert '| #14 | [P3] Paperclips Architecture Comparison Document | open | missing |' in report
assert 'js/data.js (`p_quantum_compute`, `Quantum-Inspired Compute`)' in report
assert 'README.md (`No build step required`, `static HTML/JS game`)' in report