text
stringlengths
185
73.3k
repo
stringlengths
7
100
path
stringlengths
4
146
language
stringclasses
7 values
hash
stringlengths
16
16
score
float64
7
8.5
stars
int64
0
237k
"""Per-clone wiring between simulator engine and emitter wire layer. ``start_clone`` builds the manifest from the engine's config, instantiates an ``Emitter`` (with optional BESS + load-shedding native-device configs), opens the per-clone MQTT client, runs the cold-start lifecycle, and returns a ``CloneRuntime`` the s...
SpanPanel/panelbench
src/panelbench/emitter_adapter/runtime.py
.py
7eb8010a2772b6ef
7
0
"""Capture the full retained surface a consumer sees, not just declarations. The conformance checker works from `$description` documents, because conformance is a question about what a device declares. That is not enough to exercise a *consumer*: a parser fed only descriptions can be asked whether it understands the s...
SpanPanel/panelbench
src/panelbench/emitter_adapter/wire_capture.py
.py
ed1f23655a8b20df
7
0
"""PanelBus — role-ordered power flow resolution with conservation enforcement.""" from __future__ import annotations from typing import TYPE_CHECKING from panelbench.energy.types import BusState, ComponentRole if TYPE_CHECKING: from panelbench.energy.components import Component class PanelBus: """Resolve...
SpanPanel/panelbench
src/panelbench/energy/bus.py
.py
a22e5f56d627038d
7
0
"""Physical energy components for the panel bus. Each component has a role (LOAD, SOURCE, SLACK) and implements ``resolve()`` which returns a ``PowerContribution`` given the current ``BusState``. All power values are non-negative magnitudes; direction is expressed by which field (``demand_w`` vs ``supply_w``) is popul...
SpanPanel/panelbench
src/panelbench/energy/components.py
.py
e666aba62a4d13cb
7
0
"""EnergySystem — top-level energy balance resolver for grid + PV + load. BESS dispatch lives in the emitter (`ebus_panel_sim.native_devices.bess`); this module is battery-blind. The simulator computes pre-battery grid power; the emitter publishes battery state separately and consumers (HA, dashboards) correlate the t...
SpanPanel/panelbench
src/panelbench/energy/system.py
.py
a40f1106202eb445
7
0
"""Entity discovery — map SPAN panel circuits to HA recorder entities. .. deprecated:: Superseded by :mod:`panelbench.ha_api.manifest`, which uses the ``span_panel.export_circuit_manifest`` service instead of pattern-matching entity states. No callers remain after the routes migration. Kept for refer...
SpanPanel/panelbench
src/panelbench/ha_api/entity_discovery.py
.py
394dab67c4049e4b
7
0
# Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """PreToolUse guard: finished roadmap stories are IMMUTABLE. Blocks Edit calls whose old_string touches a line carrying a finished marker ("✅", or a completed story header "### 🟢")...
sbula/specweaver
.claude/hooks/guard_finished_stories.py
.py
7776722949b96f66
7
0
import asyncio import sys from logging.config import fileConfig from pathlib import Path from alembic import context from sqlalchemy import pool from sqlalchemy.engine import Connection from sqlalchemy.ext.asyncio import async_engine_from_config # this is the Alembic Config object, which provides # access to the valu...
sbula/specweaver
alembic/env.py
.py
0f1cf2ca3ee3ed93
7
0
"""TECH_005_rename_tables Revision ID: af60fd3509a2 Revises: 1092f73fcd39 Create Date: 2026-07-12 13:11:56.459456 """ from collections.abc import Sequence from alembic import op # revision identifiers, used by Alembic. revision: str = 'af60fd3509a2' down_revision: str | Sequence[str] | None = '1092f73fcd39' branch_...
sbula/specweaver
alembic/versions/af60fd3509a2_tech_005_rename_tables.py
.py
bec8a963cfd1a825
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """What module does a changed file belong to, and what does it mean if none does? Split out of `scripts/tests.py` (2026-08-09) under TECH-025 SF-04 CB-1, whic...
sbula/specweaver
scripts/_changed_file_mapping.py
.py
89f810beb955c9ac
7
0
# Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """One citation grammar, shared by the FR and NFR sweeps. `TECH-017` finding 6. A citation used to be two independent greps over a whole file — "does it name the story" and "does `F...
sbula/specweaver
scripts/_citations.py
.py
933f877a657c5084
7
0
#!/usr/bin/env python # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Cohesion ratchet — the known incohesive classes may improve, never worsen (`TECH-035`). `check_class_health` failed on a clean tree for an entire working se...
sbula/specweaver
scripts/_class_health_baseline.py
.py
58aa057a3f5458dd
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """The `mutation.py` sub-commands that do not run a corpus. `--confirm`, `--gate`, `--install-timer` and `--summary` share nothing with the session runner exc...
sbula/specweaver
scripts/_cli_commands.py
.py
e9b576b9764685b7
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """R-DEPTH: a registry line that runs long is content sitting at the wrong depth. `TECH-017`. `R-LENGTH` caps `master_story_roadmap.md` entries at 200 charact...
sbula/specweaver
scripts/_entry_depth.py
.py
0f43fbdd0f47cc33
7
0
#!/usr/bin/env python # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """R7 — a module name may not promise nothing (`TECH-015`). A module whose name promises nothing cannot be contradicted, so it accretes. Every author with some...
sbula/specweaver
scripts/_grab_bag_names.py
.py
fecca4512d755134
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Run a list of mutants in one sandbox and file a report you can act on. `_mutate.py` answers one question at a time, which is the right shape mid-investigat...
sbula/specweaver
scripts/_mutate_campaign.py
.py
7d820fa9afcd3199
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Schedule work across a pool of sandboxes, returning results in the order the work was given. Knows nothing about mutants, verdicts or worktrees — only how ...
sbula/specweaver
scripts/_mutation_pool.py
.py
d04153978f9978f0
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """The nightly timer: two systemd user units, generated rather than checked in. Split out of `mutation.py` when that file crossed the 451-line YELLOW — the sa...
sbula/specweaver
scripts/_mutation_timer.py
.py
8a214038433be911
7
0
# Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """What a mutant taught us, and the words for saying it. Split from `mutation.py` when the vocabulary landed: the session runner is about sandboxes, subprocesses and scheduling, and...
sbula/specweaver
scripts/_mutation_verdict.py
.py
428bac7e0d76cf47
7
0
# Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """How each quality tool is invoked — one argv builder per check. Split out of `scripts/quality.py` (2026-08-12, `TECH-026`). That file sat at 595/600 against the RED threshold whil...
sbula/specweaver
scripts/_quality_runners.py
.py
61f98e8db5ad36ba
7
0
# Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Diff-safety classification for `scripts/tests.py`'s `--kind refactor` gate. Split out of `tests.py` (2026-08-02) purely to keep that file under the file-size RED threshold — no b...
sbula/specweaver
scripts/_refactor_diff_safety.py
.py
a74e54317e566d75
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """An entry must not exist in one registry and vanish from the other. `ADR-003`. `check_roadmap_sync.py` compares **checkbox status** — a `[ ]` box whose capa...
sbula/specweaver
scripts/_registry_orphans.py
.py
1b9f1e70b0a1bef2
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """What a mutation session may answer for, and over which tree. Two facts a record must carry, and neither can be recovered from the record's contents afterwa...
sbula/specweaver
scripts/_run_reach.py
.py
83cb0c287dae5fb4
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """The one artefact of a mutation session that outlives it. The sandbox is a detached worktree, removed when the run ends. So a session record that points int...
sbula/specweaver
scripts/_session_record.py
.py
3a177701cd028d26
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Read a (sub)story's path document to find which capabilities it spans. Split out of `scripts/tests.py` (2026-08-08), which had no headroom left under the f...
sbula/specweaver
scripts/_story_resolution.py
.py
4abc86e017dd4544
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """R6: a unit test class names the class or function it exercises. Split out of `scripts/check_conventions.py` (2026-08-08), which had no headroom under the f...
sbula/specweaver
scripts/_test_class_naming.py
.py
2701034e45cf650f
7.5
0
# Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Resolving the project virtualenv's interpreter and console scripts. Split out of `scripts/quality.py` (2026-08-12, `TECH-026`), which had an identical copy in `scripts/tests.py` ...
sbula/specweaver
scripts/_venv.py
.py
35d99ec710f867d6
7
0
#!/usr/bin/env python # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """The integration-contract proof matrix must stay a measurement, not decay into a snapshot. `TECH-017` produced 64 claims with verdicts and evidence, and then...
sbula/specweaver
scripts/check_audit_matrix.py
.py
8601a281e0800ca4
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Code is a document of the present. No registry ID in a `src/` comment or docstring. A comment naming the ticket that paid for a line adds nothing to the re...
sbula/specweaver
scripts/check_comment_provenance.py
.py
7f3e5beced0f460c
7
0
#!/usr/bin/env python # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Cognitive-complexity ratchet — the known set may fall, never rise (`TECH-023`). `complexipy` has failed the commit gate continuously since 2026-08-02: **97 ...
sbula/specweaver
scripts/check_complexity.py
.py
c9920694bd1b9166
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Import-graph coupling: dependency cycles, fan-in/fan-out, and instability. This does NOT replace `tach`. `tach` answers "is this import ALLOWED" against de...
sbula/specweaver
scripts/check_coupling.py
.py
01522ee0f23a1b0a
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Every citation in the test tree names a requirement some design declares. `check_fr_coverage.py` asks this per story, and only at closure. That leaves the ...
sbula/specweaver
scripts/check_dangling_citations.py
.py
eb8d20095761a4ba
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """A `✅` that nothing can verify. `TECH-053`. Two claims in the registry are unfalsifiable today, and this makes both countable. **A group flag that disagree...
sbula/specweaver
scripts/check_delivered_claims.py
.py
267dbf4a3ea9cf78
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Copy-paste detection, ratcheted. `TECH-037`. Nothing in this repo looked for duplicated code until 2026-08-12. Every instance fixed that day was found by A...
sbula/specweaver
scripts/check_duplication.py
.py
6a2a0abf41a42f12
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Check Python file sizes to catch over-large modules. Thresholds (src/ and scripts/ files): - up to 450 lines: GREEN (ok) - 451 to 600 lines: YELLOW (...
sbula/specweaver
scripts/check_file_sizes.py
.py
9911dc60d322f955
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Sweep every design's FR ledger and ratchet the number of uncited requirements. `TECH-047`. `check_fr_coverage.py` works, is correct, and takes a story ID —...
sbula/specweaver
scripts/check_fr_sweep.py
.py
e1bc40283c482b5b
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Ratchet the number of *behavioural* NFRs cited by no test. `TECH-017`. The FR ledger has been swept since `TECH-047`. NFRs never were: measured 2026-08-13,...
sbula/specweaver
scripts/check_nfr_sweep.py
.py
ae65946a7ca9fc24
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """A retirement is only valid while its target is UNBUILT. `ADR-003`, 2026-08-16 addendum. Every retirement note `ADR-003` produced carries the same promise: ...
sbula/specweaver
scripts/check_retirement_targets.py
.py
3b1d5b788e4dfc57
7
0
#!/usr/bin/env python # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Placement rules for `master_story_roadmap.md` — one walk, four rules. The master roadmap is an overview. What belongs in it was never written down, so every...
sbula/specweaver
scripts/check_roadmap_placement.py
.py
b34f9760652825d0
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Check roadmap dependency checkboxes against the capability registry. The registry (capability_matrix.md + green story headers in the master roadmap) is the...
sbula/specweaver
scripts/check_roadmap_sync.py
.py
61dee410e1e5d1c9
7
0
#!/usr/bin/env python3 # Copyright (c) 2026 sbula. All rights reserved. # Licensed under the Apache License, Version 2.0. See LICENSE file in the project root. """Verify the two skill trees are identical. `.agents/skills/` is the tool-neutral path (read by Gemini/Antigravity and anything else); `.claude/skills/` is w...
sbula/specweaver
scripts/check_skill_sync.py
.py
ee80ad38e8233c44
7
0
"""AI ④ — the German prose under a finding. The model describes, it does not decide. The verdict level, the rule and the measured values are all fixed before this is called; the only thing asked of the model is to put them into a sentence a lawyer can read. That still puts machine-written text into a document which m...
Rhinocerosdhkim/illegal-tech-dark-pattern-monitor
dpm/ai/narrative.py
.py
69baa52add876b31
7
0
import tldextract from urllib.parse import urlparse async def get_cookie_stats(context, current_url): """ Analyzes cookies in the current browser context. Identifies 1st party vs 3rd party based on the current URL. """ cookies = await context.cookies() parsed_url = urlparse(current_url) ext...
Rhinocerosdhkim/illegal-tech-dark-pattern-monitor
dpm/capture/network_audit.py
.py
2dfeef8965ec6394
7
0
"""The path a capture walks through a site. The consumer agency pointed out in the seminar of 19.08. that the interesting patterns are not on the start page: "only 2 left" and the VAT note appear once you open a product. So a capture is not one URL, it is a path -- and every signal carries the step it was measured on....
Rhinocerosdhkim/illegal-tech-dark-pattern-monitor
dpm/capture/path.py
.py
6b3a28e5acafff16
7
0
"""Find the capture runs that are lying around, and group them by target. This is what turns the timeline from a feature somebody has to remember into one the tool performs. Until now a person had to name both folders by hand — and a monitor that only notices a quietly reintroduced design when somebody remembers to lo...
Rhinocerosdhkim/illegal-tech-dark-pattern-monitor
dpm/engine/discovery.py
.py
cee10ed79088517e
7
0
"""From measured value to verdict level. eindeutig hard to dispute verdaechtig an indication, room for interpretation unklar a required signal was not captured unauffaellig nothing applies nicht_anwendbar the rule does not cover this page at all The level *values* stay German...
Rhinocerosdhkim/illegal-tech-dark-pattern-monitor
dpm/engine/verdict.py
.py
d1f45af71e894ac8
7
0
"""Print a locally generated HTML file to PDF. Playwright is already a dependency because the capture layer needs a browser, so we use it here instead of pulling in a second HTML-to-PDF engine. Nothing here ever visits a website: the only URL passed to the browser is a file:// URI pointing at a document we just wrote ...
Rhinocerosdhkim/illegal-tech-dark-pattern-monitor
dpm/report/pdf.py
.py
d467b02a14e81e94
7
0
"""Live capture runs, held in memory while the server is up. There is no database and no queue: one workstation, one person, one run at a time. A run that is gone when the server restarts is not a loss — what matters is on disk in `out/<run_id>/`, and the archive page finds it again without any of this. Progress is r...
Rhinocerosdhkim/illegal-tech-dark-pattern-monitor
dpm/ui/runner.py
.py
8f9a8783d4f7356b
7
0
import logging from typing import Any, Dict from app.agents.state import AgentState logger = logging.getLogger("condigence.supervisor.evaluator") class SupervisorEvaluator: @staticmethod def validate_step(state: AgentState, step_result: Dict[str, Any]) -> bool: """ Ensures worker outputs adhe...
rishavcondigence/CondigenceLLP
app/agents/supervisor/evaluator.py
.py
d81dddd09b35543a
7
0
import logging from typing import Any, Dict from langgraph.graph import StateGraph, END from app.agents.state import AgentState from app.agents.ceo.agent import ai_ceo from app.agents.workers.comms_agent import comms_agent from app.agents.workers.finance_agent import finance_agent from app.agents.workers.compliance_age...
rishavcondigence/CondigenceLLP
app/agents/supervisor/orchestrator.py
.py
556dae68ebe7c9db
7
0
""" WebSocket streaming endpoints for real-time agent observability. """ import asyncio import json import logging from typing import List from fastapi import APIRouter, WebSocket, WebSocketDisconnect logger = logging.getLogger("condigence.websockets") router = APIRouter(tags=["WebSockets"]) class ConnectionManager...
rishavcondigence/CondigenceLLP
app/api/websockets/stream.py
.py
283f03479550648e
7
0
""" Gmail and WhatsApp Cloud API clients. """ import logging from typing import Any, Dict from app.config import settings logger = logging.getLogger("condigence.integrations.comm") class GmailClient: async def send_draft_email(self, to_email: str, subject: str, body: str) -> Dict[str, Any]: logger.info(f...
rishavcondigence/CondigenceLLP
app/integrations/communication/gmail_client.py
.py
e4d79c9af7c36e52
7
0
""" WhatsApp Cloud API integration client. """ import logging from typing import Any, Dict from app.config import settings logger = logging.getLogger("condigence.integrations.whatsapp") class WhatsAppClient: def __init__(self): self.api_token = settings.WHATSAPP_API_TOKEN self.phone_number_id = s...
rishavcondigence/CondigenceLLP
app/integrations/communication/whatsapp_client.py
.py
fb12b9d16a74a8bf
7
0
""" Notion workspace integration client. """ import logging from typing import Any, Dict from app.config import settings logger = logging.getLogger("condigence.integrations.notion") class NotionClient: def __init__(self): self.api_key = settings.NOTION_API_KEY self.task_db_id = settings.NOTION_TA...
rishavcondigence/CondigenceLLP
app/integrations/notion/notion_client.py
.py
4178ff3dbcf66b4d
7
0
""" Pinecone Vector Database client for Company SOP and Policy RAG. """ import logging from typing import List, Dict, Any from app.config import settings logger = logging.getLogger("condigence.integrations.pinecone") class PineconeRAGClient: def __init__(self): self.api_key = settings.PINECONE_API_KEY ...
rishavcondigence/CondigenceLLP
app/integrations/vector_store/pinecone_client.py
.py
f5b9a8ef1ea60681
7
0
""" Workflow bridge for n8n cron schedules and deterministic workflows. """ import logging from typing import Any, Dict import httpx from app.config import settings logger = logging.getLogger("condigence.workflows.n8n") class N8NBridge: def __init__(self): self.webhook_base = settings.N8N_WEBHOOK_URL ...
rishavcondigence/CondigenceLLP
app/workflows/n8n_bridge.py
.py
23b1f1e6af3e4ed6
7
0
"""Generate branded Inno Setup wizard images from the app icon. Produces two BMPs the modern-style wizard uses: - wizard-large.bmp (164x314): the left welcome/finish panel — dark persona background with the logo and wordmark and an accent bar. - wizard-small.bmp (55x58): the small header logo shown on inner pa...
amnesiadevelopment/persona
.github/scripts/make_wizard_images.py
.py
5aeb67cec3add0d7
7.3
3
"""Record what the runner's GPU actually is, and label the reading honestly. WHY THIS EXISTS AS A SCRIPT RATHER THAN AS A TEST persona SPOOFS the GPU. If a spoof holds, what a page reads is the spoofed value rather than what the host draws with — so most of the masking surface (automation tells, patched-function shap...
amnesiadevelopment/persona
.github/scripts/report_runner_gpu.py
.py
f1d1fa8dc65bd79e
7.3
3
"""Embed a multi-resolution icon into a Windows PE executable's resources. flet build (as of flet 0.85) leaves the default Flutter arrow icon in the compiled Windows runner even though flutter_launcher_icons reports success, so we stamp the real icon into the finished .exe with the Win32 resource-update API. Standalon...
amnesiadevelopment/persona
.github/scripts/set_exe_icon.py
.py
27236dceb754c339
7.3
3
"""BEFORE reading: what a macOS page ACTUALLY reads, on the real selection path. Readings come from EXECUTING the emitted gpu.js under node (the _GPU_READ harness pattern already in tests/test_hardware_generation.py). The arithmetic is the INSTRUMENT'S OWN pure collision_probability() — not a second instrument. """ im...
amnesiadevelopment/persona
readings/ps183-2026-08-26/measure.py
.py
94dbbdb11de8677b
7.3
3
"""Splice the derived blocks of ``PS-16-PATCH.md`` from ``derive.py``. WHY THIS EXISTS --------------- ``PS-16-PATCH.md`` quotes ``derive.py``'s output in two places, and both quotes are load-bearing claims about provenance: * **Edit 3** embeds the whole GPU-unlinkability section, labelled *"It is the ``derive.py``...
amnesiadevelopment/persona
readings/ps185-2026-08-26/splice_patch.py
.py
9d9126ce6574ac36
7.3
3
#!/usr/bin/env python3 """PS-193 realm-reach probe — LOOPBACK, no exit needed. The live census settled the geometry question. This probe settles the MECHANISM behind candidate 2, and it needs no exit because it asks only "which realms does the shipped perturbation reach?" — a property of our own code, not of the check...
amnesiadevelopment/persona
readings/ps193-2026-08-26/realm_probe.py
.py
7713644ac3f6f8b8
7.3
3
"""PS-194: re-derive every table in EVIDENCE.md from the committed records. PS-16's maintenance rule is "re-derive, never edit-to-match". This script is what makes that possible for this directory: every figure in EVIDENCE.md is printed here, out of the JSON, so a reader can regenerate it rather than trust a transcrip...
amnesiadevelopment/persona
readings/ps194-2026-08-26/derive.py
.py
226a74355dc40bc8
7.3
3
#!/usr/bin/env python3 """Detect a newer patched-Firefox engine and bump the pins so a release rebuilds persona with the engine + its matching driver in lockstep. The engine (firefox-NN binary) and its driver (invisible_playwright, which pins invisible_core==NN.x where the major N == firefox-NN) MUST ship together — a...
amnesiadevelopment/persona
scripts/engine_autobump.py
.py
1829681f3fc3114a
7.3
3
"""PS-150: is it the PACKAGED ENGINE or the HOST? Read pixelscan under STOCK chromium. PS-143 cleared persona's masking layer (both verdicts fire with it on and off). PS-150 arm A/B cleared the verification tier's ``geo_ext`` gap (both verdicts fire with the gap closed, and the geo vector was proved to reach the page)...
amnesiadevelopment/persona
scripts/ps150_stock_control.py
.py
7bb742669224e883
7.3
3
"""PS-159: de-confound the STOCK-chromium control arm, ONE AXIS AT A TIME. PS-150's arm C read pixelscan under Debian's stock ``/usr/bin/chromium`` and got ``masking_detected`` / ``fingerprint_inconsistent`` — the same two verdicts the packaged engine gets. That looks like "the host does it too", and PS-150 deliberate...
amnesiadevelopment/persona
scripts/ps159_deconfound_stock.py
.py
d50f2ffcf720f233
7.3
3
# READ-ONLY MODULE """List the LAN devices this host has recently talked to, from the ARP cache. This generalises `discover_calorimeter_ip` in keithley-smu-control/calorimeter_reader.py, which looked up one known MAC. The device picker needs the whole table instead, but the parsing is the part worth keeping: it alread...
OmerVered1/lan-signal-sniffer
lan_sniffer/capture/neighbors.py
.py
8fc45040888f1d87
7
0
"""Save the raw reassembled traffic alongside every decoded session. Decoding depends on a profile, and a profile can be wrong — a signal identified against the wrong byte offset, a scale factor entered as 1 when it should have been 0.1, a device whose firmware changed. Without the raw bytes the only way to recover is...
OmerVered1/lan-signal-sniffer
lan_sniffer/writers/raw_writer.py
.py
ba2eba5dc08e1ff1
7
0
"""Export everything a capture might contain, for analysis elsewhere. A normal session records the signals a profile names. This exports the opposite: every field the scan found plausible, from a device nobody has identified yet, with wall-clock timestamps and the raw payload bytes alongside. The point is to make an ...
OmerVered1/lan-signal-sniffer
lan_sniffer/writers/survey.py
.py
b8954ab21486b285
7
0
#!/usr/bin/env python3 """A stand-in C80 that speaks the real protocol, for testing without hardware. Answers the same frames the instrument does — a 6-byte request, and a reply that echoes it and appends one big-endian float32 — so the app has to work out the framing and find the field exactly as it would on the benc...
OmerVered1/lan-signal-sniffer
tools/fake_instrument.py
.py
83101f75cd85fa81
7
0
""" News Scoring Module This module scores news articles based on relevance and quality. Why this file exists: - Automatically ranks articles by importance - Considers multiple factors (relevance, impact, freshness, etc.) - Helps select the BEST article, not just any article How it works: 1. Each article gets scored...
sohaib25225-gif/AI-News-Agent
agents/news_scorer.py
.py
a5b20b8ce489a535
7.24
2
""" LinkedIn Post Generator Module This module generates engaging LinkedIn posts from news articles using Google Gemini API. Why this file exists: - Converts raw news articles into compelling LinkedIn content - Uses AI to create professional, engaging posts - Formats content according to LinkedIn best practices How ...
sohaib25225-gif/AI-News-Agent
agents/post_generator.py
.py
6e6b89dc7b83a7c3
7.24
2
""" Configuration Management Module This file loads and validates all configuration settings from environment variables. It acts as a single source of truth for all configuration across the application. Why this file exists: - Centralizes all configuration in one place - Validates settings at startup (fail fast if mi...
sohaib25225-gif/AI-News-Agent
config/__init__.py
.py
73583f3861628580
7.24
2
""" Data Models Module This file defines the structure of data used throughout the application. Think of models as blueprints that define what information we store and how. Why this file exists: - Provides clear structure for news articles - Makes code more readable (we know exactly what fields exist) - Enables type ...
sohaib25225-gif/AI-News-Agent
models/__init__.py
.py
a5bb7d874ca6ec2e
7.24
2
""" News Fetcher Service This service fetches news articles from RSS feeds. Why this file exists: - Handles all news fetching logic - Parses RSS feeds into our NewsArticle model - Filters articles by date (last 24 hours only) - Handles errors gracefully (one source failing doesn't break everything) How it works: 1. ...
sohaib25225-gif/AI-News-Agent
services/news_fetcher.py
.py
c77914e331f0cb1b
7.24
2
""" Test Email Service Module This file tests the email sending functionality. """ import sys from pathlib import Path from datetime import datetime # Add parent directory to path sys.path.insert(0, str(Path(__file__).parent.parent)) from models import NewsArticle, LinkedInPost from services import EmailService fro...
sohaib25225-gif/AI-News-Agent
tests/test_email_service.py
.py
57baca1a7bd7fcee
7.74
2
""" RSS Feed Diagnostic Tool This script tests each RSS feed individually to diagnose why some sources are not returning articles. """ import sys from pathlib import Path import feedparser from datetime import datetime, timedelta import pytz # Add parent directory to path sys.path.insert(0, str(Path(__file__).parent...
sohaib25225-gif/AI-News-Agent
tests/test_rss_feeds.py
.py
1f5d8532a2ccd34a
7.74
2
""" Logging Utility Module This file sets up logging for the entire application. Logging helps us track what the application is doing and debug issues. Why this file exists: - Creates consistent log format across the application - Saves logs to file for later review - Shows logs in console during development - Makes ...
sohaib25225-gif/AI-News-Agent
utils/logger.py
.py
9834c42e5c6b7d7b
7.24
2
"""Cell buffer, string interning pools, and diff engine. Core rendering data structures following Claude Code's screen.ts design: - CharPool / StylePool / HyperlinkPool: O(1) string interning - Cell: packed integers (char_id, style_id, hyperlink_id, width) - Buffer: 2D cell grid with double-buffering and diff """ fro...
argszero/emrg
emrg/client/python_tui/buffer.py
.py
fc3803f4af3bc16d
7.35
4
"""Raw stdin → structured events. Parses raw terminal input bytes into structured events: - Key presses (with modifiers: ctrl, meta, shift) - Mouse events (SGR protocol) - Bracketed paste - Terminal resize (SIGWINCH) Equivalent to Claude Code's parse-keypress.ts (26KB). That implementation handles VT sequences, Kitty...
argszero/emrg
emrg/client/python_tui/events.py
.py
f7fd90475e87640b
7.35
4
"""ANSI escape sequence generation and terminal output. Builds on the cell buffer diff to produce minimal ANSI output: - Cursor positioning (CUP, CUD, CUF, CUB, CHA) - Style transitions (SGR sequences) - Character writes with wide-character handling - BSU/ESU synchronized output (DECSET ?2026) - Insert-lines for scrol...
argszero/emrg
emrg/client/python_tui/output.py
.py
5a1a275a54117cab
7.35
4
"""Bridge: convert Rich RenderableType to cell buffer entries. Rich produces `list[Segment]` (styled substrings) from its rendering pipeline. Our cell buffer works with `list[Span]` and integer style IDs from StylePool. This module converts between the two representations. """ from __future__ import annotations fro...
argszero/emrg
emrg/client/python_tui/rich_bridge.py
.py
31180f604bb72be3
7.35
4
"""Scrollback management — push rendered content above the viewport. Implements Codex's insert-history pattern: 1. Set scroll region to (1 .. viewport_top) 2. Write content lines with \\r\\n at viewport top 3. Old content scrolls into terminal's native scrollback 4. Reset scroll region, restore cursor All content pus...
argszero/emrg
emrg/client/python_tui/scrollback.py
.py
d130d72fd35be8c3
7.35
4
"""Viewport management — fixed region at bottom of terminal. Divides the terminal into: - Scrollback area (above viewport): terminal-native, selectable text - Viewport (fixed region at bottom): active UI (composer, status, streaming output) Region layout is explicit — no flexbox/grid. A chat UI has a simple, fixed la...
argszero/emrg
emrg/client/python_tui/viewport.py
.py
536933a6c4d45751
7.35
4
"""Chat message row widget — role-colored message display. Supported roles: user, assistant, system, tool. Each role gets a distinct color prefix (like Claude Code and Codex). """ from __future__ import annotations from datetime import datetime from typing import Literal from rich.style import Style from emrg.clie...
argszero/emrg
emrg/client/python_tui/widgets/chat_row.py
.py
9447c73ef9758324
7.35
4
"""Composer widget — multi-line text input area. The chat input field. Supports multi-line text, history navigation, and slash-command entry. Consumer subscribes to 'submit' events. """ from __future__ import annotations from collections import deque from typing import Callable from emrg.client.python_tui.widgets.b...
argszero/emrg
emrg/client/python_tui/widgets/composer.py
.py
69c6df8f27ac8f58
7.35
4
"""Diff widget — unified or split diff with syntax highlighting. Renders git-style diffs with color-coded additions/deletions. Color scheme follows Codex's conventions: green for additions, red for deletions. """ from __future__ import annotations from difflib import unified_diff from typing import Literal from emr...
argszero/emrg
emrg/client/python_tui/widgets/diff.py
.py
5ee566f48472df9b
7.35
4
"""Markdown widget — static rendering via Rich. Also provides StreamingMarkdown for incremental token-by-token rendering. Wraps Rich's Markdown parser for syntax highlighting, code blocks, tables. StreamingMarkdown holds back partial fenced code blocks until the fence closes, preventing flickering syntax highlighting...
argszero/emrg
emrg/client/python_tui/widgets/markdown.py
.py
2e313d271edb0296
7.35
4
"""Inline prompt widget — permission/approval prompts. Rendered inline in the composer area, not as modal dialogs. Follows Codex's approval_overlay.rs pattern. """ from __future__ import annotations from dataclasses import dataclass, field from typing import Literal from emrg.client.python_tui.widgets.base import L...
argszero/emrg
emrg/client/python_tui/widgets/prompt.py
.py
16ccef62462db0db
7.35
4
"""Spinner widget — animated spinner for running operations. Simple frame-based animation. Each render() call advances one frame. """ from __future__ import annotations from emrg.client.python_tui.widgets.base import Line, RenderContext, Span, Widget _SPINNER_FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", ...
argszero/emrg
emrg/client/python_tui/widgets/spinner.py
.py
f3b3bae3881309ac
7.35
4
"""Status line widget — single-line footer bar. Displays model name, agent state, and other status info. Layout (rant 2026-08-11T20:02:43): left = session + model + elapsed + message count + dir (all core info), center = server id + host only. No right section. """ from __future__ import annotations from emrg.client...
argszero/emrg
emrg/client/python_tui/widgets/status_line.py
.py
120e3132cb27b436
7.35
4
"""Table widget — tabular data display. Renders structured data (model picker, file list, etc.) as Rich tables. Follows Codex's pattern: cyan header, dim separators, default text for cells. """ from __future__ import annotations from dataclasses import dataclass, field from rich.table import Table as RichTable fro...
argszero/emrg
emrg/client/python_tui/widgets/table.py
.py
ce6a1f2a0d02b283
7.35
4
"""Tool card widget — expandable tool execution status card. Visualizes tool execution lifecycle as a state machine: pending → running → done (green check + output) → failed (red X + error, expandable) Cards render inline in the chat scrollback, not as modals. Multiple concurrent tool cards s...
argszero/emrg
emrg/client/python_tui/widgets/tool_card.py
.py
6f24ee3d753f605c
7.35
4
"""Configuration loading for EMRG daemon. Mirrors the Rust emrg-server/src/config.rs. Config is stored at ~/.emrg/config.toml. """ from __future__ import annotations import os import sys from dataclasses import dataclass, field from pathlib import Path from typing import Optional import tomllib # Python 3.11+ stdl...
argszero/emrg
emrg/config.py
.py
694b135de6ac5e09
7.35
4
"""Activation gradient-health + CE-descent A/B on the REAL level-set witness trunk (MLX). $0 CPU/local-MLX. Frozen-authority: this measures GRADIENT HEALTH at init (n-independent property of arch x init x activation x real curvelet feats) + a short CE-descent trajectory on REAL n96 pair-0 lstars (the per-coordinate Se...
adpena/comma-lab
.omx/research/activation_axis_gradhealth_harness_20260701.py
.py
24a1b3caf4d2d9c0
7
0
#!/usr/bin/env python # HISTORICAL_RECIPE_ONLY: frozen launcher record for a completed lane; not a live deploy path (codebase-drift relocation 2026-08-25). # SPDX-License-Identifier: MIT """From-EPOCH-0 decisive A/B(/C) for the Track-A distortion lever stack (#116). Three arms from a SHARED bit-identical epoch-0 init ...
adpena/comma-lab
.omx/research/archived_launchers/launch_from0_lever_stack_ab.py
.py
734a64688cb301ee
7
0
# SPDX-License-Identifier: MIT # HISTORICAL_RECIPE_ONLY: frozen launcher record for a completed lane; not a live deploy path (codebase-drift relocation 2026-08-25). """Launch the PARALLEL FLEET of MLX through-R witness arms (operator 2026-06-25). Decisive saturation test (probe_mlx_fleet_concurrency_scaling.py) verdic...
adpena/comma-lab
.omx/research/archived_launchers/launch_mlx_witness_fleet.py
.py
4152f94baa33d090
7
0
#!/usr/bin/env python3 """Resolve every backticked FILE:LINE citation in shipped packet documents. rv17 R10-F1 class cure: a citation carried forward after its target moved is the same genus as the stale recipe and the stale receipt chain -- so it gets the same machine end. For each citation whose target file exists i...
adpena/comma-lab
.omx/research/ddm_pq1_submission_packet_prep_20260815/verify_citations.py
.py
39019f47aa421078
7
0
#!/usr/bin/env python3 """Refuse when a tracked packet document was edited without a successor receipt. The gen6 receipt chain (DOC_DIVERGENCE_RECEIPT*.json, append-only, frozen SSD custody) records the sha256 of every tracked packet document each time one is deliberately changed. Eight rv17 findings shared one genus:...
adpena/comma-lab
.omx/research/ddm_pq1_submission_packet_prep_20260815/verify_receipt_chain.py
.py
e82eedfea692fef7
7
0
#!/usr/bin/env python3 """ddm_sd1 leg 1 — copy the still-owed authored SSD blobs into a repo home, VERBATIM. Byte identity is the whole point. Every file is copied with `read_bytes`/`write_bytes` and the blob sha is re-verified after the write, because the guard's test is byte identity: a header comment added "for pro...
adpena/comma-lab
.omx/research/ddm_sd1_ssd_signal_debt_drain_20260820/drain.py
.py
73780f709e110efc
7
0