fenolite 0.0.1.dev0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fenolite-0.0.1.dev0/.gitignore +32 -0
- fenolite-0.0.1.dev0/AGENTS.md +47 -0
- fenolite-0.0.1.dev0/CHANGELOG.md +19 -0
- fenolite-0.0.1.dev0/CLAUDE.md +1 -0
- fenolite-0.0.1.dev0/CONTRIBUTING.md +51 -0
- fenolite-0.0.1.dev0/LEGAL-ANNEX.md +9 -0
- fenolite-0.0.1.dev0/LEGAL.md +49 -0
- fenolite-0.0.1.dev0/LICENSE +202 -0
- fenolite-0.0.1.dev0/Makefile +30 -0
- fenolite-0.0.1.dev0/NOTICE +1 -0
- fenolite-0.0.1.dev0/PKG-INFO +117 -0
- fenolite-0.0.1.dev0/README.md +74 -0
- fenolite-0.0.1.dev0/docs/adr/0001-neutral-model.md +57 -0
- fenolite-0.0.1.dev0/docs/adr/0003-clean-room-and-provenance.md +50 -0
- fenolite-0.0.1.dev0/docs/adr/0004-licence-apache-2.0.md +48 -0
- fenolite-0.0.1.dev0/docs/adr/README.md +34 -0
- fenolite-0.0.1.dev0/docs/cli-contract.md +71 -0
- fenolite-0.0.1.dev0/docs/design-model.md +70 -0
- fenolite-0.0.1.dev0/docs/evidence/README.md +10 -0
- fenolite-0.0.1.dev0/docs/evidence/residue-history.md +9 -0
- fenolite-0.0.1.dev0/docs/evidence/sources.md +9 -0
- fenolite-0.0.1.dev0/docs/formats/README.md +6 -0
- fenolite-0.0.1.dev0/docs/formats/units.md +45 -0
- fenolite-0.0.1.dev0/docs/hypotheses.md +18 -0
- fenolite-0.0.1.dev0/docs/provenance.md +33 -0
- fenolite-0.0.1.dev0/examples/README.md +4 -0
- fenolite-0.0.1.dev0/openspec/README.md +10 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0002-cli-contract/.openspec.yaml +2 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0002-cli-contract/design.md +49 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0002-cli-contract/proposal.md +38 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0002-cli-contract/specs/cli-contract/spec.md +115 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0002-cli-contract/specs/package-layering/spec.md +22 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0002-cli-contract/tasks.md +32 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0003-ip-hygiene/.openspec.yaml +2 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0003-ip-hygiene/design.md +47 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0003-ip-hygiene/proposal.md +38 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0003-ip-hygiene/specs/corpus-policy/spec.md +46 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0003-ip-hygiene/specs/ip-hygiene/spec.md +56 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0003-ip-hygiene/specs/residue-scan/spec.md +69 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0003-ip-hygiene/tasks.md +33 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0004-design-model-core/.openspec.yaml +2 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0004-design-model-core/design.md +55 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0004-design-model-core/proposal.md +37 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0004-design-model-core/specs/canonical-serialization/spec.md +50 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0004-design-model-core/specs/core-primitives/spec.md +74 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0004-design-model-core/specs/design-model/spec.md +79 -0
- fenolite-0.0.1.dev0/openspec/changes/archive/2026-09-30-c0004-design-model-core/tasks.md +37 -0
- fenolite-0.0.1.dev0/openspec/changes/c0001-repo-bootstrap/.openspec.yaml +2 -0
- fenolite-0.0.1.dev0/openspec/changes/c0001-repo-bootstrap/design.md +49 -0
- fenolite-0.0.1.dev0/openspec/changes/c0001-repo-bootstrap/proposal.md +37 -0
- fenolite-0.0.1.dev0/openspec/changes/c0001-repo-bootstrap/specs/ci-baseline/spec.md +36 -0
- fenolite-0.0.1.dev0/openspec/changes/c0001-repo-bootstrap/specs/licensing-and-notices/spec.md +51 -0
- fenolite-0.0.1.dev0/openspec/changes/c0001-repo-bootstrap/specs/repo-layout/spec.md +52 -0
- fenolite-0.0.1.dev0/openspec/changes/c0001-repo-bootstrap/tasks.md +34 -0
- fenolite-0.0.1.dev0/openspec/config.yaml +32 -0
- fenolite-0.0.1.dev0/openspec/specs/canonical-serialization/spec.md +54 -0
- fenolite-0.0.1.dev0/openspec/specs/cli-contract/spec.md +119 -0
- fenolite-0.0.1.dev0/openspec/specs/core-primitives/spec.md +78 -0
- fenolite-0.0.1.dev0/openspec/specs/corpus-policy/spec.md +50 -0
- fenolite-0.0.1.dev0/openspec/specs/design-model/spec.md +83 -0
- fenolite-0.0.1.dev0/openspec/specs/ip-hygiene/spec.md +60 -0
- fenolite-0.0.1.dev0/openspec/specs/package-layering/spec.md +26 -0
- fenolite-0.0.1.dev0/openspec/specs/residue-scan/spec.md +73 -0
- fenolite-0.0.1.dev0/packaging/phenolite/LICENSE +202 -0
- fenolite-0.0.1.dev0/packaging/phenolite/README.md +11 -0
- fenolite-0.0.1.dev0/packaging/phenolite/pyproject.toml +29 -0
- fenolite-0.0.1.dev0/packaging/phenolite/src/phenolite/__init__.py +8 -0
- fenolite-0.0.1.dev0/pyproject.toml +85 -0
- fenolite-0.0.1.dev0/schemas/README.md +5 -0
- fenolite-0.0.1.dev0/schemas/fenolite.envelope.v0.json +226 -0
- fenolite-0.0.1.dev0/schemas/fenolite.error.v0.json +33 -0
- fenolite-0.0.1.dev0/schemas/fenolite.model.v0/board.json +1220 -0
- fenolite-0.0.1.dev0/schemas/fenolite.model.v0/circuit.json +526 -0
- fenolite-0.0.1.dev0/schemas/fenolite.model.v0/findings.json +53 -0
- fenolite-0.0.1.dev0/schemas/fenolite.model.v0/manufacturing.json +186 -0
- fenolite-0.0.1.dev0/schemas/fenolite.model.v0/meta.json +149 -0
- fenolite-0.0.1.dev0/schemas/fenolite.model.v0/rules.json +286 -0
- fenolite-0.0.1.dev0/src/fenolite/__init__.py +7 -0
- fenolite-0.0.1.dev0/src/fenolite/__main__.py +8 -0
- fenolite-0.0.1.dev0/src/fenolite/cli/__init__.py +3 -0
- fenolite-0.0.1.dev0/src/fenolite/cli/api.py +101 -0
- fenolite-0.0.1.dev0/src/fenolite/cli/cmd__echo.py +50 -0
- fenolite-0.0.1.dev0/src/fenolite/cli/cmd_capabilities.py +112 -0
- fenolite-0.0.1.dev0/src/fenolite/cli/errors.py +120 -0
- fenolite-0.0.1.dev0/src/fenolite/cli/exitcodes.py +23 -0
- fenolite-0.0.1.dev0/src/fenolite/cli/main.py +215 -0
- fenolite-0.0.1.dev0/src/fenolite/cli/output.py +201 -0
- fenolite-0.0.1.dev0/src/fenolite/core/__init__.py +3 -0
- fenolite-0.0.1.dev0/src/fenolite/core/coords.py +31 -0
- fenolite-0.0.1.dev0/src/fenolite/core/errors.py +64 -0
- fenolite-0.0.1.dev0/src/fenolite/core/evidence.py +71 -0
- fenolite-0.0.1.dev0/src/fenolite/core/ids.py +89 -0
- fenolite-0.0.1.dev0/src/fenolite/core/io.py +84 -0
- fenolite-0.0.1.dev0/src/fenolite/core/provenance.py +23 -0
- fenolite-0.0.1.dev0/src/fenolite/core/units.py +143 -0
- fenolite-0.0.1.dev0/src/fenolite/model/__init__.py +74 -0
- fenolite-0.0.1.dev0/src/fenolite/model/base.py +54 -0
- fenolite-0.0.1.dev0/src/fenolite/model/board.py +250 -0
- fenolite-0.0.1.dev0/src/fenolite/model/canonical.py +248 -0
- fenolite-0.0.1.dev0/src/fenolite/model/circuit.py +100 -0
- fenolite-0.0.1.dev0/src/fenolite/model/design.py +206 -0
- fenolite-0.0.1.dev0/src/fenolite/model/findings.py +19 -0
- fenolite-0.0.1.dev0/src/fenolite/model/manufacturing.py +51 -0
- fenolite-0.0.1.dev0/src/fenolite/model/rules.py +102 -0
- fenolite-0.0.1.dev0/src/fenolite/model/schema.py +20 -0
- fenolite-0.0.1.dev0/src/fenolite/py.typed +0 -0
- fenolite-0.0.1.dev0/tests/README.md +12 -0
- fenolite-0.0.1.dev0/tests/_resources.py +36 -0
- fenolite-0.0.1.dev0/tests/_scanmod.py +24 -0
- fenolite-0.0.1.dev0/tests/_schema.py +97 -0
- fenolite-0.0.1.dev0/tests/conftest.py +32 -0
- fenolite-0.0.1.dev0/tests/consistency/test_cli_consistency.py +150 -0
- fenolite-0.0.1.dev0/tests/corpus/manifest.toml +17 -0
- fenolite-0.0.1.dev0/tests/corpus/test_manifest.py +131 -0
- fenolite-0.0.1.dev0/tests/data/MANIFEST.toml +8 -0
- fenolite-0.0.1.dev0/tests/residue/test_hook.py +73 -0
- fenolite-0.0.1.dev0/tests/residue/test_no_token_list.py +39 -0
- fenolite-0.0.1.dev0/tests/residue/test_official_libs.py +42 -0
- fenolite-0.0.1.dev0/tests/residue/test_repo_clean.py +16 -0
- fenolite-0.0.1.dev0/tests/residue/test_scan.py +138 -0
- fenolite-0.0.1.dev0/tests/strategies.py +110 -0
- fenolite-0.0.1.dev0/tests/unit/README.md +5 -0
- fenolite-0.0.1.dev0/tests/unit/cli/test_capabilities.py +43 -0
- fenolite-0.0.1.dev0/tests/unit/cli/test_exitcodes.py +43 -0
- fenolite-0.0.1.dev0/tests/unit/cli/test_main.py +157 -0
- fenolite-0.0.1.dev0/tests/unit/cli/test_output.py +139 -0
- fenolite-0.0.1.dev0/tests/unit/cli/test_tty.py +52 -0
- fenolite-0.0.1.dev0/tests/unit/core/test_errors.py +23 -0
- fenolite-0.0.1.dev0/tests/unit/core/test_evidence.py +49 -0
- fenolite-0.0.1.dev0/tests/unit/core/test_ids.py +51 -0
- fenolite-0.0.1.dev0/tests/unit/core/test_io.py +62 -0
- fenolite-0.0.1.dev0/tests/unit/core/test_units.py +104 -0
- fenolite-0.0.1.dev0/tests/unit/model/test_board.py +51 -0
- fenolite-0.0.1.dev0/tests/unit/model/test_canonical.py +168 -0
- fenolite-0.0.1.dev0/tests/unit/model/test_circuit.py +44 -0
- fenolite-0.0.1.dev0/tests/unit/model/test_design.py +136 -0
- fenolite-0.0.1.dev0/tests/unit/model/test_rules.py +62 -0
- fenolite-0.0.1.dev0/tests/unit/test_adrs.py +44 -0
- fenolite-0.0.1.dev0/tests/unit/test_cli_stub.py +31 -0
- fenolite-0.0.1.dev0/tests/unit/test_import_graph.py +207 -0
- fenolite-0.0.1.dev0/tests/unit/test_legal_docs.py +60 -0
- fenolite-0.0.1.dev0/tests/unit/test_no_copyleft_deps.py +55 -0
- fenolite-0.0.1.dev0/tests/unit/test_no_prior_code.py +51 -0
- fenolite-0.0.1.dev0/tests/unit/test_provenance.py +125 -0
- fenolite-0.0.1.dev0/tests/unit/test_pyproject_invariants.py +60 -0
- fenolite-0.0.1.dev0/tests/unit/test_repo_layout.py +43 -0
- fenolite-0.0.1.dev0/tests/unit/test_schema_drift.py +75 -0
- fenolite-0.0.1.dev0/tests/unit/test_spdx_headers.py +39 -0
- fenolite-0.0.1.dev0/tools/README.md +5 -0
- fenolite-0.0.1.dev0/tools/corpus_fetch.py +92 -0
- fenolite-0.0.1.dev0/tools/gen_schemas.py +173 -0
- fenolite-0.0.1.dev0/tools/hooks/pre-commit +16 -0
- fenolite-0.0.1.dev0/tools/residue/README.md +30 -0
- fenolite-0.0.1.dev0/tools/residue/blobs.sha256 +2 -0
- fenolite-0.0.1.dev0/tools/residue/patterns.regex +8 -0
- fenolite-0.0.1.dev0/tools/residue/scan.py +263 -0
- fenolite-0.0.1.dev0/tools/residue/scope.toml +20 -0
- fenolite-0.0.1.dev0/uv.lock +1922 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Claude Code local state
|
|
2
|
+
.claude/*
|
|
3
|
+
|
|
4
|
+
# Private planning material (never published)
|
|
5
|
+
private/
|
|
6
|
+
|
|
7
|
+
# Fenolite derived cache
|
|
8
|
+
.fenolite/
|
|
9
|
+
|
|
10
|
+
# Python / tooling
|
|
11
|
+
.venv/
|
|
12
|
+
__pycache__/
|
|
13
|
+
*.py[cod]
|
|
14
|
+
.pytest_cache/
|
|
15
|
+
.ruff_cache/
|
|
16
|
+
.hypothesis/
|
|
17
|
+
.coverage
|
|
18
|
+
htmlcov/
|
|
19
|
+
dist/
|
|
20
|
+
build/
|
|
21
|
+
*.egg-info/
|
|
22
|
+
|
|
23
|
+
# Editor/OS
|
|
24
|
+
.DS_Store
|
|
25
|
+
.idea/
|
|
26
|
+
.vscode/
|
|
27
|
+
|
|
28
|
+
# Backups written by atomic saves
|
|
29
|
+
*.bak
|
|
30
|
+
|
|
31
|
+
# Temporary verification artefacts
|
|
32
|
+
verify_results/*.tmp
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Guidance for AI agents working on Fenolite
|
|
2
|
+
|
|
3
|
+
Read this file before changing anything. Humans: this is also the short version of `CONTRIBUTING.md`.
|
|
4
|
+
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
1. **OpenSpec first.** Every change lives in `openspec/changes/<id>/` with `proposal.md`,
|
|
8
|
+
`design.md`, `specs/` and `tasks.md`. Do not write code that no task asks for. Implement tasks
|
|
9
|
+
in order, tick `- [x]` only after the task's proof command passed.
|
|
10
|
+
2. **One fix per iteration.** Make one focused change, run its proof, then move on.
|
|
11
|
+
3. **Before finishing:** `make check` (ruff check, ruff format --check, pyright src, pytest) must pass.
|
|
12
|
+
4. Update `CHANGELOG.md` under `## [Unreleased]` for every change.
|
|
13
|
+
|
|
14
|
+
## Hard rules
|
|
15
|
+
|
|
16
|
+
- **Clean-room.** Never add code, constants, seeds, fixtures, statistics, vocabularies, templates or
|
|
17
|
+
examples taken from an employer, a private project or any organisation. Test data is authored for
|
|
18
|
+
Fenolite or fetched from public sources declared in the corpus manifest.
|
|
19
|
+
- **Format knowledge from public sources only.** Record each fact in `docs/formats/<backend>/*.md`
|
|
20
|
+
with its source (listed in `docs/evidence/sources.md`) and an evidence label. Never copy or
|
|
21
|
+
transcribe third-party parser code or grammar files, and never decompile vendor software.
|
|
22
|
+
- **No runtime dependencies in the core.** `pyproject.toml` `dependencies` stays empty; third-party
|
|
23
|
+
packages go to an extra and are imported lazily.
|
|
24
|
+
- **Copyleft only across a process boundary.** Run GPL/AGPL tools as subprocesses; never import them.
|
|
25
|
+
- **Never commit** anything under `private/`, KiCad official library files, or absolute user paths.
|
|
26
|
+
- Every `.py` file starts with the SPDX and copyright lines.
|
|
27
|
+
|
|
28
|
+
## Conventions
|
|
29
|
+
|
|
30
|
+
- The design model (entities, ids, units, canonical JSON) is described in `docs/design-model.md`.
|
|
31
|
+
|
|
32
|
+
- Lengths: integer nanometres. Angles: integer microdegrees. No floats in the model.
|
|
33
|
+
- Evidence labels: `KICAD-VERIFIED`, `ORACLE-VERIFIED(<tool>)`, `CORPUS-VERIFIED`,
|
|
34
|
+
`ALTIUM-VERIFIED(kit|author-report)`, `INFERRED`, `UNKNOWN`, `UNVERIFIED` (lowest wins).
|
|
35
|
+
|
|
36
|
+
## Using the `fenolite` CLI (contract v0, `docs/cli-contract.md`)
|
|
37
|
+
|
|
38
|
+
1. Start with `fenolite capabilities --json`: commands, extras, external tools and their versions.
|
|
39
|
+
2. Output is JSON whenever stdout is not a terminal; pass `--json` anyway to be explicit. Use
|
|
40
|
+
`--fields a,b.c` to keep the reply small.
|
|
41
|
+
3. Read the exit code first: 0 ok, 1 bug, 2 usage, 3 bad input, 4 confirmation required,
|
|
42
|
+
5 findings (read `issues`), 6 external tool missing, 7 lossy operation refused. On non-zero,
|
|
43
|
+
stderr holds one error object with `code`, `message`, `hint`, `retryable`.
|
|
44
|
+
4. Writing commands never write by default: run with `--dry-run`, check `result.plan`, then re-run
|
|
45
|
+
with `--confirm`. The `receipt` lists every written file with its SHA-256.
|
|
46
|
+
5. Pass `--seed` and `--timestamp` when you need byte-identical outputs.
|
|
47
|
+
6. Every reply carries `evidence.level`; treat anything below `KICAD-VERIFIED` as unconfirmed.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Fenolite are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
|
|
5
|
+
[Semantic Versioning](https://semver.org/) (pre-1.0: minor versions may break).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.0.1.dev0] - 2026-09-30
|
|
10
|
+
|
|
11
|
+
Pre-alpha repository bootstrap; not usable for real boards yet.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Repository bootstrap: package skeleton (`src/fenolite`, stdlib-only core, closed extras), Apache-2.0 licence with NOTICE and SPDX headers, `LEGAL.md`/`LEGAL-ANNEX.md`, DCO, ADR-0004, evidence registers and the `unit` CI baseline (ruff, pyright strict, pytest on ubuntu and macos).
|
|
16
|
+
- CLI contract v0: JSON envelope (`schemas/fenolite.envelope.v0.json`) and typed stderr errors (`schemas/fenolite.error.v0.json`), exit codes 0–7, `--fields`, mutation protocol (`--dry-run`/`--confirm`, atomic writes with `.bak`, receipts), `--seed`/`--timestamp`, the `capabilities` command, a consistency test over every command and a package-layering test.
|
|
17
|
+
- IP hygiene: ADR-0003 (clean-room and provenance), four explicit prohibitions in `LEGAL.md`, provenance rules and test, residue scan (`tools/residue/scan.py`: structural patterns, blob hashes, private token and hash lists kept outside the repository, UTF-16/cp1252/zip awareness, `--staged` and `--history` modes) with a pre-commit hook and CI step, copyleft-dependency and no-ported-code guards, corpus manifest with the embeddable rule and `tools/corpus_fetch.py`.
|
|
18
|
+
- Design model v0: `fenolite.core` (integer nm/µdeg units with exact parsing and half-even conversion to 1/10 000 mil, ids, evidence levels, errors and issues, provenance, coordinates, atomic I/O) and `fenolite.model` (entity header with native ids, provenance and extension bags; circuit, board, rules, manufacturing and findings layers; `Design` with indexes, validation and entity replacement; canonical JSON with a validating decoder; JSON Schemas in `schemas/fenolite.model.v0/`), ADR-0001 and `docs/design-model.md`.
|
|
19
|
+
- Name reservation: alias distribution `phenolite` (installs `fenolite`) and a release workflow that publishes both to PyPI with trusted publishing when a GitHub Release is published.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Contributing to Fenolite
|
|
2
|
+
|
|
3
|
+
Thank you for helping. Fenolite is spec-driven, agent-friendly and strict about provenance.
|
|
4
|
+
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
1. **One change per pull request.** Every change starts as an OpenSpec change under
|
|
8
|
+
`openspec/changes/<id>/` (`proposal.md`, `design.md`, `specs/`, `tasks.md`). No code lands
|
|
9
|
+
without one. See `openspec/README.md`.
|
|
10
|
+
2. Implement the tasks in order; each task names the command that proves it.
|
|
11
|
+
3. Run `make check` (ruff, ruff format, pyright, pytest) before pushing; CI runs the same steps.
|
|
12
|
+
4. Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/)
|
|
13
|
+
(`feat(model): …`, `fix(kicad): …`, `docs: …`, `test: …`, `chore: …`).
|
|
14
|
+
|
|
15
|
+
## Developer Certificate of Origin
|
|
16
|
+
|
|
17
|
+
Every commit MUST carry a `Signed-off-by:` trailer certifying the
|
|
18
|
+
[Developer Certificate of Origin 1.1](https://developercertificate.org/):
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
git commit -s -m "feat(core): add integer length units"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
By signing off you state that you wrote the contribution or have the right to submit it under
|
|
25
|
+
the Apache License 2.0.
|
|
26
|
+
|
|
27
|
+
## Provenance rules (read `LEGAL.md`)
|
|
28
|
+
|
|
29
|
+
- Learn formats only from public documentation and from files you are entitled to read.
|
|
30
|
+
- Never decompile vendor software; never copy, transcribe or compile third-party parser code
|
|
31
|
+
or grammar files into Fenolite. Reading public sources for facts is fine: record each fact in
|
|
32
|
+
`docs/formats/` with its source.
|
|
33
|
+
- Never add files, values, names, templates or examples that belong to an employer or any other
|
|
34
|
+
organisation. Test data is authored for Fenolite or fetched from public sources listed in the
|
|
35
|
+
corpus manifest.
|
|
36
|
+
- Copyleft tools run only as external processes; they never become dependencies.
|
|
37
|
+
|
|
38
|
+
## Allowed vs forbidden derivation
|
|
39
|
+
|
|
40
|
+
| Allowed | Forbidden |
|
|
41
|
+
|---|---|
|
|
42
|
+
| Reading a public format page and writing in `docs/formats/kicad/pcb.md`: "a `via` node carries `(at X Y)`, `(size D)`, `(drill D)`, `(layers A B)` — source S-0007", then implementing the parser from that page. | Opening a GPL parser's source, copying or paraphrasing its function that reads `via` nodes, or converting its grammar file into a Python parser. |
|
|
43
|
+
| Measuring a record layout on a public, licence-compatible sample file and recording the offsets with the file's manifest id. | Measuring anything on files you are not entitled to share or use (for example an employer's boards) or reusing values measured on them earlier. |
|
|
44
|
+
| Running a copyleft tool as a subprocess and comparing its output with Fenolite's (an oracle). | Adding that tool, or a library that links it, to `pyproject.toml`. |
|
|
45
|
+
| Writing an example board from scratch for `examples/`. | Recreating a board, template, title block, rule set or part list you know from work. |
|
|
46
|
+
|
|
47
|
+
## Code style
|
|
48
|
+
|
|
49
|
+
- Python ≥ 3.11, stdlib-only core, full type hints (`pyright` strict on `src/`).
|
|
50
|
+
- Every `.py` file starts with the SPDX and copyright lines (see any existing file).
|
|
51
|
+
- Lengths are integer nanometres; angles are integer microdegrees; no floats in the model.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Clean-room session log
|
|
2
|
+
|
|
3
|
+
One row per working session that touches `src/fenolite/backends/` or `docs/formats/`: what was
|
|
4
|
+
edited and which public sources were consulted. The prior proprietary work mentioned in
|
|
5
|
+
`LEGAL.md` block B is never opened during these sessions.
|
|
6
|
+
|
|
7
|
+
| date | area | files touched | public sources consulted | author |
|
|
8
|
+
|---|---|---|---|---|
|
|
9
|
+
| 2026-09-30 | docs/formats | docs/formats/units.md | S-0001, S-0002 | maintainer |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Legal notes
|
|
2
|
+
|
|
3
|
+
Fenolite is licensed under the Apache License, Version 2.0 (see `LICENSE` and `NOTICE`).
|
|
4
|
+
This file explains where Fenolite's knowledge of third-party file formats comes from and how the
|
|
5
|
+
project relates to earlier, non-public work in the same domain. It is a statement of project
|
|
6
|
+
policy, not legal advice.
|
|
7
|
+
|
|
8
|
+
## A. Format analysis
|
|
9
|
+
|
|
10
|
+
Fenolite reads and writes files produced by other electronic design automation (EDA) tools.
|
|
11
|
+
|
|
12
|
+
1. Knowledge of third-party file formats comes **only** from public documentation (official
|
|
13
|
+
documentation, published specifications, public developer documentation of open-source tools)
|
|
14
|
+
and from files the contributor is entitled to read (files they created themselves, or files
|
|
15
|
+
published under a licence that permits the use).
|
|
16
|
+
2. Every format fact used by the code is recorded in `docs/formats/<backend>/*.md` with its public
|
|
17
|
+
source, listed in `docs/evidence/sources.md`, and carries an evidence label. Code is written
|
|
18
|
+
from those pages, never from third-party source code. Reading public copyleft sources to learn
|
|
19
|
+
a **fact** is allowed only when the fact is recorded there with its source.
|
|
20
|
+
3. Copyleft software (GPL, AGPL and similar) is used only behind a process boundary (a
|
|
21
|
+
subprocess exchanging files or documented JSON) or through a plugin API that its project
|
|
22
|
+
publishes; it is never imported, vendored or transcribed (ADR-0004).
|
|
23
|
+
|
|
24
|
+
The following are **forbidden** (ADR-0003):
|
|
25
|
+
|
|
26
|
+
- **(P1)** decompiling, disassembling or otherwise reverse engineering vendor software — contributors
|
|
27
|
+
never decompile a tool to learn its format;
|
|
28
|
+
- **(P2)** transcribing, compiling or converting GPL/AGPL parser sources or machine-readable grammar
|
|
29
|
+
files (for example Kaitai `.ksy` descriptions) into Fenolite code;
|
|
30
|
+
- **(P3)** using files the contributor is not entitled to read (for example an employer's design
|
|
31
|
+
files, or files obtained under terms that do not allow this use);
|
|
32
|
+
- **(P4)** using an employer's software licence to study or reverse engineer a tool for Fenolite.
|
|
33
|
+
|
|
34
|
+
Opening a file one is entitled to read in a tool one is licensed to use, and reporting what the
|
|
35
|
+
tool does with it, is ordinary use and may be recorded as a fact with evidence label
|
|
36
|
+
`…(author-report)`; no file used in such a session enters the repository unless it is authored for
|
|
37
|
+
Fenolite or published under a licence listed as embeddable in the corpus manifest.
|
|
38
|
+
|
|
39
|
+
## B. Prior work
|
|
40
|
+
|
|
41
|
+
The author of Fenolite has written proprietary software in the same domain, for professional use,
|
|
42
|
+
before this project started. Fenolite is developed **clean-room** with respect to that work:
|
|
43
|
+
|
|
44
|
+
- no code, constants, seeds, fixtures, test data, statistics, vocabularies, parameter sets,
|
|
45
|
+
templates or examples from that work, or from any organisation, are reused in Fenolite;
|
|
46
|
+
- format facts that the prior work also relied on are re-derived from the public sources in
|
|
47
|
+
block A and recorded with those sources;
|
|
48
|
+
- professional use of the prior work continues outside this repository and is declared here;
|
|
49
|
+
work sessions on format code are logged in `LEGAL-ANNEX.md`.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright {yyyy} {name of copyright owner}
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Private residue lists (gitignored) are picked up automatically when present.
|
|
2
|
+
ifneq (,$(wildcard private/residue-tokens.txt))
|
|
3
|
+
export FENOLITE_RESIDUE_TOKENS_FILE ?= private/residue-tokens.txt
|
|
4
|
+
endif
|
|
5
|
+
ifneq (,$(wildcard private/residue-blobs.sha256))
|
|
6
|
+
export FENOLITE_RESIDUE_BLOBS_FILE ?= private/residue-blobs.sha256
|
|
7
|
+
endif
|
|
8
|
+
|
|
9
|
+
.PHONY: check lint format types test residue hooks
|
|
10
|
+
|
|
11
|
+
check: lint format types test
|
|
12
|
+
|
|
13
|
+
lint:
|
|
14
|
+
uv run ruff check .
|
|
15
|
+
|
|
16
|
+
format:
|
|
17
|
+
uv run ruff format --check .
|
|
18
|
+
|
|
19
|
+
types:
|
|
20
|
+
uv run pyright src
|
|
21
|
+
|
|
22
|
+
test:
|
|
23
|
+
uv run pytest -q
|
|
24
|
+
|
|
25
|
+
residue:
|
|
26
|
+
uv run python tools/residue/scan.py
|
|
27
|
+
|
|
28
|
+
hooks:
|
|
29
|
+
ln -sf ../../tools/hooks/pre-commit .git/hooks/pre-commit
|
|
30
|
+
@echo "pre-commit hook installed"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Fenolite — Copyright (c) 2026 Fenolite contributors
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: fenolite
|
|
3
|
+
Version: 0.0.1.dev0
|
|
4
|
+
Summary: Headless, agent-first PCB design automation in Python: generate, open, verify, compare, convert and export KiCad (and later Altium) projects from code or the CLI.
|
|
5
|
+
Author: Fenolite contributors
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
License-File: NOTICE
|
|
9
|
+
Keywords: ai-agents,altium,cli,drc,eda,electronics,gerber,hardware-as-code,kicad,pcb
|
|
10
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Manufacturing
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: hypothesis>=6.100; extra == 'dev'
|
|
26
|
+
Requires-Dist: pyright>=1.1.390; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest-xdist>=3.6; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest>=8.3; extra == 'dev'
|
|
29
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
30
|
+
Provides-Extra: geo
|
|
31
|
+
Requires-Dist: pyclipper>=1.3; extra == 'geo'
|
|
32
|
+
Requires-Dist: shapely>=2.1; extra == 'geo'
|
|
33
|
+
Provides-Extra: kicad-ipc
|
|
34
|
+
Requires-Dist: kicad-python>=0.8; extra == 'kicad-ipc'
|
|
35
|
+
Provides-Extra: mcp
|
|
36
|
+
Requires-Dist: mcp>=1.0; extra == 'mcp'
|
|
37
|
+
Provides-Extra: oracles
|
|
38
|
+
Requires-Dist: gerbonara>=1.6; (python_version >= '3.12') and extra == 'oracles'
|
|
39
|
+
Requires-Dist: pygerber>=2.4; extra == 'oracles'
|
|
40
|
+
Provides-Extra: route
|
|
41
|
+
Requires-Dist: freerouting-client>=2.3; extra == 'route'
|
|
42
|
+
Description-Content-Type: text/markdown
|
|
43
|
+
|
|
44
|
+
# Fenolite
|
|
45
|
+
|
|
46
|
+
**Headless, agent-first PCB design automation in Python.** Fenolite lets an engineer — or an AI
|
|
47
|
+
coding agent — generate, open, verify, compare, convert and export printed-circuit-board projects
|
|
48
|
+
from Python code or a JSON-speaking command line, without a GUI. KiCad is the first backend (its
|
|
49
|
+
files, with `kicad-cli` as the verification oracle); a second backend for another major commercial
|
|
50
|
+
format family follows.
|
|
51
|
+
|
|
52
|
+
> **Status: pre-alpha.** The repository is being bootstrapped. Nothing here is ready for real
|
|
53
|
+
> boards yet. Follow `openspec/changes/` to see what is being built and in which order.
|
|
54
|
+
|
|
55
|
+
*Fenolite* is the Portuguese word for phenolic board material — the laminate many of us etched our
|
|
56
|
+
first circuit boards on.
|
|
57
|
+
|
|
58
|
+
## Principles
|
|
59
|
+
|
|
60
|
+
- **Agent-first CLI.** JSON on stdout when not attached to a terminal, a fixed envelope, typed
|
|
61
|
+
errors, a small exit-code vocabulary, and writes only with `--confirm` (`--dry-run` shows the plan).
|
|
62
|
+
- **Evidence on every answer.** Each result says how it was verified (see below). Nothing is
|
|
63
|
+
claimed that was not checked.
|
|
64
|
+
- **No silent information loss.** What Fenolite does not understand in a file is preserved, and a
|
|
65
|
+
lossy operation stops unless explicitly allowed.
|
|
66
|
+
- **Small, exact model.** Integer nanometres and microdegrees, stable ids, canonical JSON that
|
|
67
|
+
diffs cleanly in Git.
|
|
68
|
+
- **Stdlib-only core.** `pip install fenolite` installs no other package; heavier features are
|
|
69
|
+
optional extras.
|
|
70
|
+
- **Your templates, not ours.** Sheet frames and title blocks are generated from your own spec;
|
|
71
|
+
Fenolite ships no organisation's templates, rules or libraries.
|
|
72
|
+
|
|
73
|
+
The model is described in `docs/design-model.md`; the CLI contract in `docs/cli-contract.md`.
|
|
74
|
+
|
|
75
|
+
## Evidence labels
|
|
76
|
+
|
|
77
|
+
| Label | Meaning |
|
|
78
|
+
|---|---|
|
|
79
|
+
| `KICAD-VERIFIED` | accepted by `kicad-cli` of the stated version, and the claim confirmed by its output |
|
|
80
|
+
| `ORACLE-VERIFIED(<tool>)` | an independent parser or tool agreed |
|
|
81
|
+
| `CORPUS-VERIFIED` | round-trip holds on public files listed in the corpus manifest |
|
|
82
|
+
| `ALTIUM-VERIFIED(kit)` | confirmed by a native-tool acceptance run with archived results |
|
|
83
|
+
| `ALTIUM-VERIFIED(author-report)` | reported by the author from ordinary use; never enough for a release claim |
|
|
84
|
+
| `INFERRED` | deduced from public documentation; a hypothesis in `docs/hypotheses.md` tracks it |
|
|
85
|
+
| `UNKNOWN` | bytes or fields preserved without interpretation |
|
|
86
|
+
| `UNVERIFIED` | default for anything new |
|
|
87
|
+
|
|
88
|
+
A command's overall label is the lowest label of the steps it ran.
|
|
89
|
+
|
|
90
|
+
## Install (development)
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
git clone <this repository>
|
|
94
|
+
cd fenolite
|
|
95
|
+
uv sync --extra dev
|
|
96
|
+
uv run fenolite --version
|
|
97
|
+
make check
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Talk to it like an agent does:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
uv run fenolite capabilities --json --fields tools # what is installed here
|
|
104
|
+
uv run fenolite capabilities --text # the same, for humans
|
|
105
|
+
echo $? # 0 ok, 2 usage, 4 confirm, 5 findings …
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Optional extras: `geo` (polygon booleans), `kicad-ipc` (live KiCad session), `route` (Freerouting
|
|
109
|
+
client), `mcp` (MCP server), `oracles` (Gerber re-parsers used in tests), `dev`.
|
|
110
|
+
|
|
111
|
+
## Licence and provenance
|
|
112
|
+
|
|
113
|
+
Apache-2.0 (`LICENSE`, `NOTICE`). Format knowledge comes only from public sources; see `LEGAL.md`
|
|
114
|
+
for the clean-room rules and `CONTRIBUTING.md` for how to contribute. Every CI run and every commit
|
|
115
|
+
(after `make hooks`) passes a residue scan (`tools/residue/`) that blocks absolute paths, internal
|
|
116
|
+
identifier shapes and known non-public files; see `docs/provenance.md` for the provenance rules. AI agents working in this
|
|
117
|
+
repository: read `AGENTS.md` first.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Fenolite
|
|
2
|
+
|
|
3
|
+
**Headless, agent-first PCB design automation in Python.** Fenolite lets an engineer — or an AI
|
|
4
|
+
coding agent — generate, open, verify, compare, convert and export printed-circuit-board projects
|
|
5
|
+
from Python code or a JSON-speaking command line, without a GUI. KiCad is the first backend (its
|
|
6
|
+
files, with `kicad-cli` as the verification oracle); a second backend for another major commercial
|
|
7
|
+
format family follows.
|
|
8
|
+
|
|
9
|
+
> **Status: pre-alpha.** The repository is being bootstrapped. Nothing here is ready for real
|
|
10
|
+
> boards yet. Follow `openspec/changes/` to see what is being built and in which order.
|
|
11
|
+
|
|
12
|
+
*Fenolite* is the Portuguese word for phenolic board material — the laminate many of us etched our
|
|
13
|
+
first circuit boards on.
|
|
14
|
+
|
|
15
|
+
## Principles
|
|
16
|
+
|
|
17
|
+
- **Agent-first CLI.** JSON on stdout when not attached to a terminal, a fixed envelope, typed
|
|
18
|
+
errors, a small exit-code vocabulary, and writes only with `--confirm` (`--dry-run` shows the plan).
|
|
19
|
+
- **Evidence on every answer.** Each result says how it was verified (see below). Nothing is
|
|
20
|
+
claimed that was not checked.
|
|
21
|
+
- **No silent information loss.** What Fenolite does not understand in a file is preserved, and a
|
|
22
|
+
lossy operation stops unless explicitly allowed.
|
|
23
|
+
- **Small, exact model.** Integer nanometres and microdegrees, stable ids, canonical JSON that
|
|
24
|
+
diffs cleanly in Git.
|
|
25
|
+
- **Stdlib-only core.** `pip install fenolite` installs no other package; heavier features are
|
|
26
|
+
optional extras.
|
|
27
|
+
- **Your templates, not ours.** Sheet frames and title blocks are generated from your own spec;
|
|
28
|
+
Fenolite ships no organisation's templates, rules or libraries.
|
|
29
|
+
|
|
30
|
+
The model is described in `docs/design-model.md`; the CLI contract in `docs/cli-contract.md`.
|
|
31
|
+
|
|
32
|
+
## Evidence labels
|
|
33
|
+
|
|
34
|
+
| Label | Meaning |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `KICAD-VERIFIED` | accepted by `kicad-cli` of the stated version, and the claim confirmed by its output |
|
|
37
|
+
| `ORACLE-VERIFIED(<tool>)` | an independent parser or tool agreed |
|
|
38
|
+
| `CORPUS-VERIFIED` | round-trip holds on public files listed in the corpus manifest |
|
|
39
|
+
| `ALTIUM-VERIFIED(kit)` | confirmed by a native-tool acceptance run with archived results |
|
|
40
|
+
| `ALTIUM-VERIFIED(author-report)` | reported by the author from ordinary use; never enough for a release claim |
|
|
41
|
+
| `INFERRED` | deduced from public documentation; a hypothesis in `docs/hypotheses.md` tracks it |
|
|
42
|
+
| `UNKNOWN` | bytes or fields preserved without interpretation |
|
|
43
|
+
| `UNVERIFIED` | default for anything new |
|
|
44
|
+
|
|
45
|
+
A command's overall label is the lowest label of the steps it ran.
|
|
46
|
+
|
|
47
|
+
## Install (development)
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git clone <this repository>
|
|
51
|
+
cd fenolite
|
|
52
|
+
uv sync --extra dev
|
|
53
|
+
uv run fenolite --version
|
|
54
|
+
make check
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Talk to it like an agent does:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
uv run fenolite capabilities --json --fields tools # what is installed here
|
|
61
|
+
uv run fenolite capabilities --text # the same, for humans
|
|
62
|
+
echo $? # 0 ok, 2 usage, 4 confirm, 5 findings …
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Optional extras: `geo` (polygon booleans), `kicad-ipc` (live KiCad session), `route` (Freerouting
|
|
66
|
+
client), `mcp` (MCP server), `oracles` (Gerber re-parsers used in tests), `dev`.
|
|
67
|
+
|
|
68
|
+
## Licence and provenance
|
|
69
|
+
|
|
70
|
+
Apache-2.0 (`LICENSE`, `NOTICE`). Format knowledge comes only from public sources; see `LEGAL.md`
|
|
71
|
+
for the clean-room rules and `CONTRIBUTING.md` for how to contribute. Every CI run and every commit
|
|
72
|
+
(after `make hooks`) passes a residue scan (`tools/residue/`) that blocks absolute paths, internal
|
|
73
|
+
identifier shapes and known non-public files; see `docs/provenance.md` for the provenance rules. AI agents working in this
|
|
74
|
+
repository: read `AGENTS.md` first.
|