Skip to content

Commit cc73d7b

Browse files
committed
initial
1 parent cb0668a commit cc73d7b

36 files changed

Lines changed: 3124 additions & 1 deletion

.agent/ao-config-python.toml

Whitespace-only changes.

.agent/ao-config.toml

Whitespace-only changes.

.agent/ao-domain.toml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Domain configuration: PTAT sensor behavior and anomaly expectations
2+
3+
[domain]
4+
name = "PTAT temperature-frequency sensor array"
5+
primary_measurement = "frequency_hz"
6+
derived_measurement = "temperature_celsius"
7+
8+
[domain.model]
9+
relationship = "frequency_hz = nominal_frequency_at_25c_hz + sensitivity_hz_per_kelvin * (temperature_celsius - 25)"
10+
11+
[domain.ptat]
12+
sensitivity_hz_per_kelvin = 512.0 # typical observed value
13+
linearity_percent = 99.993
14+
operating_range_celsius = [-30, 70]
15+
nominal_frequency_at_25c_hz = 100000
16+
17+
[domain.anomalies]
18+
dropout = "sensor reports null or zero; not a valid reading"
19+
drift_offset_percent = 2.0
20+
drift_rate_percent_per_interval = 0.5
21+
nonlinearity = "deviation from linear fit > 0.1% across range"
22+
spike = "single-sample deviation > 5 sigma from rolling mean"
23+
24+
[anomaly_semantics]
25+
# gradual deviation over time
26+
drift = "sustained directional deviation beyond expected noise"
27+
# abrupt change
28+
spike = "sudden discontinuity inconsistent with prior values"
29+
# cross-sensor inconsistency
30+
divergence = "one sensor deviates significantly from correlated peers"
31+
# flatline or stuck sensor
32+
stuck = "no meaningful variation over time"
33+
34+
[domain.baseline]
35+
reference_temperature_celsius = 25
36+
baseline_definition = "first stable segment or calibration point"
37+
38+
[domain.batch]
39+
expected_batch_size = 1000
40+
sampling_rate_hz = 10
41+
calibration_check_interval_samples = 100
42+
43+
[system]
44+
name = "PTAT sensor system"
45+
description = "Sensors where output is proportional to absolute temperature"
46+
47+
[expected_relationships]
48+
# PTAT behavior: value increases approximately linearly with temperature
49+
ptat_linear = true
50+
# sensors in a group should show correlated behavior
51+
multi_sensor_expected_correlation = "high"
52+
max_inter_sensor_deviation_percent = 2.0
53+
# small noise is expected
54+
noise_present = true
55+
56+
[constraints]
57+
# acceptable variation (relative or absolute tolerance may be refined)
58+
max_deviation_percent = 5.0
59+
# drift should not exceed this rate without being flagged
60+
max_drift_rate = 0.5
61+
62+
[suspicious_patterns]
63+
# patterns that may pass basic tests but indicate issues
64+
passing_but_suspicious = [
65+
"consistent bias within tolerance but trending",
66+
"slow monotonic drift",
67+
"sensor deviates while remaining within absolute bounds",
68+
"increasing variance over time",
69+
]
70+
71+
[reporting]
72+
# agent must explicitly call out suspicious cases
73+
require_suspicion_reporting = true
74+
# explanations must reference domain expectations
75+
require_domain_reference = true

.gitattributes

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# ============================================================
2+
# .gitattributes (Keep files consistent across operating systems)
3+
# ============================================================
4+
5+
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .gitattributes.
6+
# WHY: Ensure consistent line endings, diff behavior, and file classification
7+
# across Windows, macOS, and Linux environments.
8+
# ALT: Repository may omit .gitattributes ONLY if equivalent normalization is
9+
# enforced reliably by tooling and CI (rare and fragile).
10+
# CUSTOM: Update file-type rules only when introducing new languages,
11+
# binary artifacts, or documentation formats.
12+
# NOTE: Rules are ordered by impact and generality, not alphabetically.
13+
# Git attributes are documented at https://git-scm.com/docs/gitattributes
14+
15+
# === Core defaults (always apply) ===
16+
17+
# WHY: Auto-detect text files and normalize line endings to avoid cross-platform drift.
18+
* text=auto
19+
20+
21+
# === Programming languages and scripts ===
22+
23+
# WHY: Python and shell scripts must use LF for CI/CD, Linux environments, and containers.
24+
*.py text eol=lf
25+
*.sh text eol=lf
26+
27+
# WHY: PowerShell convention on Windows uses CRLF.
28+
*.ps1 text eol=crlf
29+
30+
31+
# === Markup and documentation ===
32+
33+
# WHY: Documentation and markup files use LF; standard for cross-platform tooling.
34+
*.md text eol=lf
35+
36+
37+
# === Configuration and structured text ===
38+
39+
# WHY: Configuration and structured text formats use LF for stable diffs.
40+
*.json text eol=lf
41+
*.jsonc text eol=lf
42+
*.jsonl text eol=lf
43+
*.toml text eol=lf
44+
*.yaml text eol=lf
45+
*.yml text eol=lf
46+
47+
48+
# === Databases (binary) ===
49+
50+
# WHY: Database files are binary; prevent text normalization and meaningless diffs.
51+
*.db binary
52+
*.sqlite binary
53+
*.sqlite3 binary
54+
55+
56+
# === Compressed artifacts (binary) ===
57+
58+
# WHY: Compressed artifacts are binary; prevent text normalization.
59+
*.gz binary
60+
*.tar binary
61+
*.tgz binary
62+
*.zip binary
63+
*.7z binary
64+
65+
66+
# === Log files (binary) ===
67+
68+
# WHY: Log files are typically large; prevent text normalization.
69+
*.log binary
70+
project.log binary
71+
72+
73+
# === GitHub metadata and UI ===
74+
75+
# WHY: Exclude documentation and tests from GitHub language statistics.
76+
docs/** linguist-documentation
77+
tests/** linguist-documentation
78+
evaluation/** linguist-documentation

.gitignore

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# ============================================================
2+
# .gitignore (Keep unnecessary files out of the repository)
3+
# ============================================================
4+
5+
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .gitignore.
6+
# WHY: Prevent committing generated artifacts, local state, secrets, and OS-specific files.
7+
# ALT: Repository may customize ignores, but MUST preserve universal safety rules.
8+
# CUSTOM: Logs may be temporarily committed for verification; keep ignored for
9+
# production use and security.
10+
11+
12+
# === Private local evaluation scenarios ===
13+
14+
# WHY: Users test ACS against proprietary codebases by adding scenarios here.
15+
# This directory is intentionally gitignored so private test cases are never
16+
# committed or pushed. Clone, do not fork, to preserve upstream pull access.
17+
evaluation/local/
18+
19+
20+
# === Universal (all projects, all languages) ===
21+
22+
# WHY: Logs are useful during debugging and verification.
23+
# ALT: Comment if logs must be inspected or validated.
24+
*.log
25+
logs/
26+
PRIVATE_NOTES.md
27+
PRIVATE-NOTES.md
28+
29+
# WHY: Temporary and swap files are machine-local noise and create meaningless diffs.
30+
*.swo
31+
*.swp
32+
*.tmp
33+
*~
34+
35+
36+
# === VS Code ===
37+
38+
# WHY: Ignore editor state while allowing a shared baseline configuration.
39+
#.vscode/
40+
41+
# WHY: Commit recommended extensions (opt-in) for consistent development experience.
42+
# NOTE: Share recommendations, not personal editor styles or preferences.
43+
!.vscode/extensions.json
44+
!.vscode/settings.json
45+
46+
47+
# === OS-specific files (macOS / Windows) ===
48+
49+
# WHY: OS-generated metadata files should never be tracked.
50+
.AppleDouble
51+
.DS_Store
52+
.LSOverride
53+
Icon\r
54+
._*
55+
.Spotlight-V100/
56+
.Trashes
57+
desktop.ini
58+
ehthumbs.db
59+
Thumbs.db
60+
61+
62+
# === Editors / IDEs (non-VS Code) ===
63+
64+
# WHY: IDE metadata is machine-local and should not be tracked.
65+
*.code-workspace
66+
.idea/
67+
68+
69+
# === Environment variables and secrets ===
70+
71+
# WHY: Never commit credentials or environment-specific configuration.
72+
.env
73+
.env.*
74+
*.env
75+
76+
77+
# === Documentation build output ===
78+
79+
# WHY: Static site build output is generated; kept in case MkDocs is added.
80+
site/
81+
82+
83+
# === Generic caches ===
84+
85+
# WHY: Generic caches are machine-local and should not be tracked.
86+
.cache/
87+
88+
89+
# === Python (evaluation scripts) ===
90+
91+
# WHY: Virtual environments are machine-local and reproducible.
92+
.venv/
93+
venv/
94+
95+
# REQ.PYTHON: Do NOT git ignore uv.lock. Commit it and use it in CI/CD pipelines.
96+
97+
# WHY: Python bytecode is generated.
98+
__pycache__/
99+
*.pyc
100+
*.pyd
101+
*.pyo
102+
103+
# WHY: Tooling caches should not be tracked.
104+
.coverage
105+
.coverage.*
106+
.mypy_cache/
107+
.pytest_cache/
108+
.pytype/
109+
.ruff_cache/

.markdownlint.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"MD013": false,
3+
"MD033": false,
4+
"MD041": false
5+
}

.pre-commit-config.yaml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# ============================================================
2+
# .pre-commit-config.yaml (Markdown Hygiene)
3+
# ============================================================
4+
# VARIANT: markdown-hygiene
5+
# SOURCE: https://github.com/denisecase/templates
6+
#
7+
# REQ: Documentation-only repos MAY include a .pre-commit-config.yaml for repo hygiene (optional).
8+
# WHY: Keep Markdown diffs clean across OSes and prevent common documentation commit errors.
9+
#
10+
# OBS: These hooks use and do NOT override:
11+
# - .editorconfig (whitespace / indentation)
12+
# - .gitattributes (EOL normalization)
13+
# - pyproject.toml (Python tool settings)
14+
#
15+
# OPTIONAL LOCAL USAGE (no repo venv required):
16+
# You must have uv installed locally.
17+
# Run these commands ONCE in from the repo root to enable pre-commit:
18+
#
19+
# uv self update
20+
# uvx pre-commit install
21+
# uvx pre-commit run --all-files
22+
#
23+
# This enables the pre-commit hooks for this project repo.
24+
# ALL subsequent commits in this repo will AUTOMATICALLY run these
25+
# pre-commit hooks, after `git add` and before `git commit`.
26+
#
27+
# NOTE: enabling pre-commit is optional. It is not needed to clone or commit.
28+
29+
exclude: |
30+
(?x)^(
31+
\.DS_Store|
32+
\.coverage|
33+
\.ipynb_checkpoints/|
34+
\.mypy_cache/|
35+
\.nox/|
36+
\.pytest_cache/|
37+
\.ruff_cache/|
38+
\.tox/|
39+
\.venv/|
40+
.*\.(egg-info)/|
41+
.*\.log|
42+
__pycache__/|
43+
_minted.*/|
44+
build/|
45+
coverage\.xml|
46+
dist/|
47+
htmlcov/|
48+
lake-packages/|
49+
node_modules/|
50+
out/|
51+
site/
52+
)
53+
54+
repos:
55+
# === REPO: PRE-COMMIT HOOKS (cross-platform, zero config) ===
56+
#
57+
# These hooks prevent problems that show up later as:
58+
# - mysterious diffs
59+
# - broken builds on another OS
60+
61+
- repo: https://github.com/pre-commit/pre-commit-hooks
62+
rev: v6.0.0
63+
hooks:
64+
# === PRE-COMMIT: NORMALIZE FILE FORMATTING ===
65+
66+
- id: trailing-whitespace
67+
name: A1) Clean trailing whitespace (per .editorconfig)
68+
args: [--markdown-linebreak-ext=md] # Preserves markdown double-space line breaks
69+
70+
- id: end-of-file-fixer
71+
name: A2) End files with a newline (per .gitattributes)
72+
73+
- id: mixed-line-ending
74+
name: A3) Normalize line endings to LF before linters
75+
args: [--fix=lf] # OBS: Windows working copies may be CRLF.
76+
77+
# === PRE-COMMIT: CHECK DATA FILE FORMATS ===
78+
79+
- id: check-json
80+
name: B1) Validate JSON syntax (except .vscode/)
81+
# WHY: VSCode settings may include comments, which are non-standard JSON.
82+
exclude: ^\.vscode/.*\.json$
83+
84+
- id: check-toml
85+
name: B2) Validate TOML syntax
86+
87+
- id: check-yaml
88+
name: B3) Validate YAML syntax
89+
files: \.(yml|yaml)$
90+
# WHY:
91+
# VS Code config files are editor-specific
92+
# mkdocs.yml may use YAML anchors not supported by the checker
93+
exclude: ^(\.vscode/|mkdocs\.ya?ml$)
94+
95+
# === PRE-COMMIT:CHECK FOR COMMON PROBLEMS ===
96+
97+
- id: check-added-large-files
98+
name: C1) Prevent accidental commits of large binaries
99+
args: [--maxkb=500]
100+
101+
- id: check-merge-conflict
102+
name: C2) Prevent committing merge conflicts
103+
104+
- id: check-case-conflict
105+
name: C3) Check for filename case conflicts
106+
107+
# === GLOBAL SETTINGS ===
108+
# ALT: Set fail_fast to true to stop at first failure.
109+
fail_fast: false # Run all hooks even if one fails

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.14

.yamllint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# ============================================================
2+
# .yamllint.yml (Keep YAML files clean and consistent)
3+
# ============================================================
4+
5+
# WHY: Enforce YAML correctness (.yamllint.yml) without arbitrary style constraints.
6+
# OBS: Default yamllint rules conflict with GitHub Actions YAML.
7+
# Line length, document start, truthy, and comment spacing are intentionally disabled.
8+
9+
extends: default
10+
11+
rules:
12+
line-length: disable
13+
document-start: disable
14+
truthy: disable
15+
comments: disable

0 commit comments

Comments
 (0)