Skip to content

Commit ae7fa64

Browse files
committed
update
1 parent 6376a3f commit ae7fa64

83 files changed

Lines changed: 4778 additions & 146 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ./AGENTS.md
1+
# ./AGENTS.md (SE Admin)
22

33
## Scope
44

@@ -58,3 +58,18 @@ uv run python -m zensical build
5858

5959
- pre-commit runs only on tracked / staged files.
6060
- Developers should `git add -A` files before expecting hooks to run.
61+
62+
63+
## SE Admin CLI
64+
65+
All admin operations run through the CLI. Use `--dry-run` before any mutating command.
66+
67+
```shell
68+
uv run python -m se_admin repos
69+
uv run python -m se_admin tasks
70+
uv run python -m se_admin check --set foundation
71+
uv run python -m se_admin run --dry-run
72+
uv run python -m se_admin run
73+
```
74+
75+
Task files live in `data/tasks/`. Filename must match `[task].id`.

CHANGELOG.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
<!-- markdownlint-disable MD024 -->
4+
35
All notable changes to this project will be documented in this file.
46

57
The format is based on **[Keep a Changelog](https://keepachangelog.com/en/1.1.0/)**
@@ -9,6 +11,53 @@ and this project adheres to **[Semantic Versioning](https://semver.org/spec/v2.0
911

1012
---
1113

14+
## [0.1.1] - 2026-04-29
15+
16+
### Added
17+
18+
- Data-driven DSL architecture: declarative TOML task files interpreted by
19+
a composable operation tree (`AtomicOperation | OpSequence | Conditional`)
20+
- Domain layer: `repos`, `profiles`, `selectors`, `tasks`, `findings`,
21+
`operations`, `capabilities`
22+
- Observe layer: `filesystem`, `toml_files`, `pyproject`, `workflows`,
23+
`git`, `github` - actual repo state, no decisions
24+
- Actions layer: `copy_file`, `replace_file`, `patch_toml`,
25+
`patch_markdown`, `run_command` - primitive idempotent mutations
26+
- Checks layer: `required_paths`, `exact_files`, `workflows`,
27+
`python_version`, `reference_files`, `tags` - pure comparisons
28+
returning `Finding` objects
29+
- Migrations layer: `replace_mkdocs_with_zensical`, `python_package_profile`,
30+
`python_tooling_profile`, `python_version`, `workflow_names` -
31+
composed action sequences
32+
- Reports layer: `summary` (terminal), `markdown` (docs/CI),
33+
`json_report` (machine-readable)
34+
- CLI commands: `show`, `repos`, `tasks`, `check`, `run`
35+
- `check` command: profile checks against a single repo or repo set,
36+
exits 1 on any failure
37+
- `run` command: execute a task by id with `--dry-run` support
38+
- Profile `extends` - profiles can reference other profiles;
39+
`all_repos` baseline profile composes `markdown` + `links`
40+
- `all_repos` added as first profile on all repo entries, replacing
41+
explicit `links` declarations
42+
- `profiles.toml`: structured by language/toolchain then docs generator
43+
then cross-cutting; `html_static`, `markdown`, `all_repos` profiles added
44+
- `repos.toml`: all repos updated to use `all_repos` baseline
45+
- Task files: `normalize_core_files`, `normalize_lychee_location` label
46+
fields added; friendly error on missing `[task].label`
47+
- `utils/paths.py`, `utils/text.py` - path resolution and text formatting
48+
utilities
49+
- Tests: `test_config_loader`, `test_profiles`, `test_required_paths`,
50+
`test_reports`
51+
- Docs: `concepts.md`, `commands.md`, `configuration.md`, `examples.md`
52+
53+
### Fixed
54+
55+
- `domain/operations.py` forward reference resolved with
56+
`from __future__ import annotations`
57+
- Ruff suppressions: `S603`, `S607` (subprocess), `S310` (urlopen)
58+
59+
---
60+
1261
## [0.1.0] - 2026-04-22
1362

1463
### Added
@@ -49,5 +98,6 @@ git tag v0.1.0 -m "0.1.0"
4998
git push origin v0.1.0
5099
```
51100

52-
[Unreleased]: https://github.com/structural-explainability/se-admin/compare/v0.1.0...HEAD
101+
[Unreleased]: https://github.com/structural-explainability/se-admin/compare/v0.1.1...HEAD
102+
[0.1.1]: https://github.com/structural-explainability/se-admin/releases/tag/v0.1.1
53103
[0.1.0]: https://github.com/structural-explainability/se-admin/releases/tag/v0.1.0

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ cff-version: "1.2.0"
99
type: software
1010

1111
title: "Structural Explainability Admin"
12-
version: "0.1.0"
13-
date-released: "2026-04-22"
12+
version: "0.1.1"
13+
date-released: "2026-04-29"
1414

1515
authors:
1616
- family-names: Case

README.md

Lines changed: 121 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
> Structural Explainability Admin:
1313
> administration of the SE ecosystem.
1414
15+
SE Admin is a data-driven system that applies composable operations
16+
over repository surfaces
17+
with declarative targets and selectable scope
18+
to move repos between states.
19+
1520
## Owns
1621

1722
- enforcement of constitution (automation)
@@ -41,19 +46,131 @@ bulk operations
4146
- dependency upgrades
4247
- structural updates
4348

49+
## Overview
50+
51+
```text
52+
data/ = declared desired state, no logic, only declarations
53+
observe/ = actual repo state, no decisions, only facts
54+
checks/ = pure comparison, no side effects
55+
actions/ = primitive mutations
56+
migrations/ = composed actions
57+
reports/ = human/machine output projections only
58+
```
59+
60+
```text
61+
domain/
62+
repo - repository
63+
profile = named bundle of expectations (paths, workflows, checks)
64+
selector = how you choose repos (set, name, pattern)
65+
finding = result of a check
66+
```
67+
68+
```text
69+
repos.toml = instances: which repos exist, repo sets, assigned profiles
70+
profiles.toml = reusable traits: profile definitions
71+
checks.toml = constraints: check definitions and canonical comparisons
72+
migrations.toml = transformations: named migration recipes
73+
```
74+
75+
```text
76+
data (declared) -> observe (actual) -> checks (compare) -> actions/migrations -> reports
77+
```
78+
79+
## Operation Requirements
80+
81+
Data describes operations and a small interpreter executing them
82+
83+
All operations must be:
84+
85+
- deterministic
86+
- idempotent
87+
- side-effect scoped
88+
89+
Examples:
90+
91+
- delete_file is OK if missing
92+
- add_dependency is OK if already present
93+
- replace_text is no-op if not found
94+
95+
## Operation Taxonomy
96+
97+
### Detection (no side effects)
98+
99+
- path_exists
100+
- path_missing
101+
- toml_key_exists
102+
- toml_value_equals
103+
- dependency_present
104+
- workflow_present
105+
106+
### Mutation (single responsibility)
107+
108+
Filesystem
109+
110+
- create_file
111+
- delete_file
112+
- copy_file
113+
- ensure_directory
114+
- rename_path
115+
TOML
116+
- toml_set_key
117+
- toml_remove_key
118+
- toml_add_dependency
119+
- toml_remove_dependency
120+
- toml_ensure_table
121+
Workflows (still files, but special intent)
122+
- ensure_workflow
123+
- remove_workflow
124+
- replace_workflow
125+
Text
126+
- replace_block
127+
- insert_block
128+
- remove_block
129+
Process
130+
- run_command
131+
132+
## Composition
133+
134+
```text
135+
Operation =
136+
AtomicOperation
137+
| Sequence[Operation]
138+
| Conditional(condition, Operation)
139+
```
140+
141+
## Example
142+
143+
A tool transition is a declarative description of how to
144+
remove one capability and establish another across all affected surfaces.
145+
146+
```text
147+
Sequence(
148+
Conditional(detect_mkdocs, Sequence(
149+
delete_file("mkdocs.yml"),
150+
toml_remove_dependency("mkdocs"),
151+
remove_workflow("deploy-mkdocs.yml")
152+
)),
153+
154+
Sequence(
155+
create_file("zensical.toml"),
156+
toml_add_dependency(group="docs", name="zensical"),
157+
ensure_workflow("deploy-zensical.yml"),
158+
ensure_directory("docs")
159+
)
160+
)
161+
```
162+
44163
## Command Reference
45164

46165
<details>
47166
<summary>Show command reference</summary>
48167

49168
### In a machine terminal
50169

51-
After you get a copy of this repo in your own GitHub account,
52-
open a machine terminal in `Repos` or where you want the project:
170+
Open a machine terminal where you want the project:
53171

54172
```shell
55-
# Replace username with YOUR GitHub username.
56-
git clone https://github.com/username/se-admin
173+
git clone https://github.com/structural-explainability/se-admin
57174

58175
cd se-admin
59176
code .

SE_MANIFEST.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ schema = "se-manifest-2"
1111
name = "se-admin"
1212
org = "structural-explainability"
1313
status = "active"
14-
version = "0.1.0"
14+
version = "0.1.1"
1515

1616
[repo]
1717
# WHY: Repo identity is defined structurally
@@ -50,7 +50,7 @@ excludes = [
5050
]
5151

5252
[validation]
53-
entrypoint = "se_admin.app:run_show"
53+
entrypoint = "se_admin.cli:main"
5454

5555
# === Behavior / governance ===
5656

data/checks.toml

Whitespace-only changes.

data/migrations.toml

Whitespace-only changes.

data/profiles.toml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# data/profiles.toml
2+
3+
# repos.toml = which repos exist and which profiles they compose
4+
# profiles.toml = what each profile requires
5+
6+
# === ALL REPOSITORIES ===
7+
8+
[profiles.all_repos]
9+
label = "Baseline for all repositories"
10+
description = "Every repository in the ecosystem must satisfy this profile."
11+
extends = ["markdown", "links"]
12+
13+
# === GO REPOSITORIES ===
14+
15+
# === HTML/CSS/JS REPOSITORIES ===
16+
17+
[profiles.html_static]
18+
label = "Static HTML documentation repository"
19+
description = "Repository serving pre-authored HTML, no build step."
20+
required_paths = ["docs/index.html"]
21+
22+
# === LATEX PAPER REPOSITORIES ===
23+
24+
[profiles.paper_latex]
25+
label = "LaTeX paper repository"
26+
description = "Repository containing a LaTeX paper source."
27+
required_paths = ["README.md", "LICENSE"]
28+
optional_paths = ["main.tex", "paper.tex", "references.bib", "latexmkrc"]
29+
30+
31+
# === LEAN THEOREM PROVING REPOSITORIES ===
32+
33+
[profiles.lean]
34+
label = "Lean repository"
35+
description = "Repository containing Lean formalization artifacts."
36+
required_paths = ["lean-toolchain", "lakefile.toml"]
37+
required_workflows = ["ci-lean.yml"]
38+
39+
# == MARKDOWN REPOSITORIES ===
40+
41+
[profiles.markdown]
42+
label = "Markdown repository"
43+
description = "Repository containing Markdown documentation."
44+
required_paths = [".markdownlint.yml","README.md"]
45+
46+
# === PYTHON SRC REPOSITORIES ===
47+
48+
[profiles.python_package]
49+
label = "Python package repository"
50+
description = "Repository containing a Python package with source layout."
51+
required_paths = ["pyproject.toml", "src", "tests"]
52+
required_workflows = ["ci-python-zensical.yml"]
53+
54+
# === PYTHON FOR TOOLING ONLY REPOSITORIES ===
55+
56+
[profiles.python_tooling]
57+
label = "Python tooling repository"
58+
description = "Repository using Python for repository tooling, documentation, or automation without a package contract."
59+
required_paths = ["pyproject.toml"]
60+
required_workflows = ["ci-python-zensical-tooling.yml"]
61+
62+
# === PYTHON ZENSICAL REPOSITORIES ===
63+
64+
[profiles.zensical]
65+
# this repo has docs built by Zensical using Python
66+
# therefore pyproject.toml must include Zensical in docs dependencies
67+
label = "Zensical documentation repository"
68+
description = "Repository that builds documentation with Zensical."
69+
required_paths = ["zensical.toml", "docs"]
70+
required_workflows = ["deploy-zensical.yml"]
71+
72+
[profiles.zensical.pyproject]
73+
required_optional_dependency_groups = ["docs"]
74+
75+
[profiles.zensical.pyproject.optional_dependencies.docs]
76+
required = ["zensical"]
77+
78+
# === REPOSITORIES WITH LINK CHECKING ===
79+
80+
81+
[profiles.links]
82+
label = "Link-checked repository"
83+
description = "Repository checked with the standard link-checking workflow."
84+
required_workflows = ["links.yml"]
85+
86+
# === REPOSITORIES WITH REFERENCE ARTIFACTS ===
87+
88+
[profiles.reference]
89+
label = "Reference artifact repository"
90+
description = "Repository containing canonical reference or specification artifacts."
91+
required_paths = ["reference"]

0 commit comments

Comments
 (0)