Skip to content

Commit c994dfa

Browse files
authored
Merge pull request #454 from control-toolbox/refactor/docs-structure
Refactor documentation structure: consolidate internals page
2 parents 976037c + 7f78806 commit c994dfa

20 files changed

Lines changed: 168 additions & 1734 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ reports/
4545
.vscode/
4646
.extras/
4747
.tmp/
48+
.claude/
4849

4950
# Temporary test artifacts (created during test runs)
5051
test/_test_*/

AGENTS.md

Lines changed: 18 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,72 +4,38 @@ Quick-reference for any agent working on this repository.
44

55
---
66

7-
## Project Overview
7+
## Repository Layout
88

9-
**CTBase.jl** is the foundational Julia package in the [control-toolbox](https://github.com/control-toolbox) ecosystem.
10-
It provides the **base layer**: shared types, exceptions, extensions infrastructure, and development tools.
11-
12-
---
13-
14-
## Source Architecture
15-
16-
Submodule layout (all public symbols accessed via qualified paths — no top-level exports):
9+
Standard control-toolbox package structure. Each directory may contain a `README.md`
10+
with package-specific details — read it before working in that directory.
1711

1812
```text
19-
src/
20-
├── CTBase.jl # Top-level manifest — exports nothing
21-
├── Core/ # Core types and utilities
22-
├── Descriptions/ # Type descriptions and metadata
23-
├── Exceptions/ # Structured exception types
24-
├── Extensions/ # Extension infrastructure
25-
└── Unicode/ # Unicode utilities
26-
27-
ext/
28-
├── CoveragePostprocessing.jl # Coverage report postprocessing
29-
├── DocumenterReference.jl # Documenter.jl reference generation
30-
└── TestRunner.jl # Test runner with progress bar
31-
32-
test/suite/ # Tests organised by functionality (not by src layout)
33-
docs/ # Documenter.jl site (auto-generated API)
34-
dev/ # Code philosophy, operational rules, plan template (versioned)
13+
src/ # Source code: one submodule per responsibility, no top-level exports
14+
ext/ # Weak-dependency extensions (loaded on demand by Julia)
15+
test/suite/ # Test suite: organised by functionality, not by src/ layout
16+
docs/ # Documentation site (DocumenterVitepress)
3517
```
3618

3719
---
3820

39-
## Developer resources
40-
41-
| File | Purpose |
42-
|---|---|
43-
| [`dev/philosophy/PHILOSOPHY.md`](dev/philosophy/PHILOSOPHY.md) | Code philosophy — modules, types/traits, exceptions, docstrings, testing, docs |
44-
| [`dev/RULES.md`](dev/RULES.md) | Operational rules — running tests (MCP), building docs, git, output capture |
45-
| [`dev/planning.md`](dev/planning.md) | Plan template — phases, steps, human checkpoints |
46-
47-
---
48-
49-
## Devin Workflows
21+
## Developer Resources
5022

51-
| Workflow | Trigger | Purpose |
52-
|---|---|---|
53-
| `architecture.md` || Introducing new types, restructuring modules, reviewing SOLID/patterns |
54-
| `docstrings.md` || Writing or reviewing Julia docstrings |
55-
| `documentation.md` | `glob: docs/**/*` | Documenter.jl layout, `make.jl` template, `api_reference.jl`, `InterLinks` setup |
56-
| `exceptions.md` || Adding error paths, contract stubs, argument validation |
57-
| `modules.md` | `glob: src/**/*.jl, ext/**/*.jl` | Submodule conventions: qualified imports, manifest pattern, export policy, DAG ordering |
58-
| `performance.md` || Hot paths, inner loops, profiling, benchmarking |
59-
| `plan.md` || Writing an implementation plan before coding |
60-
| `testing-creation.md` || Writing or reviewing test files under `test/suite/` |
61-
| `testing-execution.md` | `model_decision` | How to run tests (commands, `tee` capture) |
62-
| `type-stability.md` || New structs, parametric types, `@inferred` test design |
23+
Design philosophy, operational rules, and plan templates live in the
24+
[control-toolbox Handbook](https://github.com/control-toolbox/Handbook):
6325

64-
Workflows live in `.devin/workflows/`.
26+
| Topic | Link |
27+
| --- | --- |
28+
| Code philosophy (modules, types/traits, exceptions, docstrings, testing, docs) | [`PHILOSOPHY.md`](https://raw.githubusercontent.com/control-toolbox/Handbook/refs/heads/main/PHILOSOPHY.md) |
29+
| Operational rules (tests, coverage, docs, git) | [`RULES.md`](https://raw.githubusercontent.com/control-toolbox/Handbook/refs/heads/main/RULES.md) |
30+
| Plan template | [`PLAN.md`](https://raw.githubusercontent.com/control-toolbox/Handbook/refs/heads/main/PLAN.md) |
6531

6632
---
6733

6834
## Key Conventions
6935

70-
- **No top-level exports** — use `CTBase.Submodule.symbol` everywhere.
71-
- **Qualified imports**`using PackageName: PackageName`, never bare `using`.
36+
- **No top-level exports** — use `Package.Submodule.symbol` everywhere.
37+
- **Qualified imports**`import Pkg: Pkg`, never bare `using`.
7238
- **Fake types at module top-level** — never inside test functions.
73-
- **Plans before code** — write a plan and confirm with the user before touching files. Template: [`dev/planning.md`](dev/planning.md).
39+
- **Plans before code** — write a plan and confirm with the user before touching files.
7440
- **Docstrings last** — written only after all implementation steps are stable.
7541
- **Never commit or push without explicit user approval.**

CHANGELOGS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8585
- `testing.md`: Categories, fakes/stubs, module + callable function template
8686
- `documentation.md`: API generation, guides, draft workflow
8787
- **Added agent guides**: Added `AGENTS.md` (agent navigation guide) and `CLAUDE.md` (Claude project context)
88-
- **Added planning template**: Added `dev/planning.md` for implementation plans
88+
- **Added planning template**: Added `dev/PLAN.md` for implementation plans
8989
- **Added operational rules**: Added `dev/RULES.md` for MCP, doc build, git, and output capture procedures
9090

9191
#### **Documentation Build Improvements**

CLAUDE.md

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,41 @@
1-
# CTBase.jl — Claude project context
1+
# CTBase.jl — Agent Navigation Guide
22

3-
## Essential rules
3+
Quick-reference for any agent working on this repository.
44

5-
1. **Never commit or push without explicit approval.** Ask first, every time.
6-
2. **Run tests via the `ct-dev-mcp` MCP**`get_test_command` → run with `tee`
7-
`generate_report`. Never invent the test command.
8-
3. **Build docs draft-first**`draft = true` globally to validate links, then per file
9-
with `Draft = false`, then full build. See `dev/RULES.md`.
10-
4. **Qualify everything**`Module.symbol` at every call site; `import Pkg: Pkg` not
11-
`using Pkg`; no top-level package exports.
12-
5. **Write a plan before coding** — any task touching more than one file or a public
13-
interface needs a plan confirmed by the user first. Template in `dev/planning.md`.
14-
6. **Docstrings last** — written only after the API is stable.
15-
7. **Fake types at module top-level** — never inside test functions (world-age issues).
5+
---
166

17-
## Where to find more
7+
## Repository Layout
188

19-
| Topic | File |
20-
| --- | --- |
21-
| Code philosophy (modules, types/traits, exceptions, docstrings, testing, docs) | [`dev/philosophy/`](dev/philosophy/PHILOSOPHY.md) |
22-
| Operational rules (MCP, doc build, git, output capture) | [`dev/RULES.md`](dev/RULES.md) |
23-
| Plan template | [`dev/planning.md`](dev/planning.md) |
24-
25-
## Project structure (quick reference)
9+
Standard control-toolbox package structure. Each directory may contain a `README.md`
10+
with package-specific details — read it before working in that directory.
2611

2712
```text
28-
src/CTBase.jl # top-level manifest — exports nothing
29-
src/<Module>/<Module>.jl # submodule manifests
30-
ext/ # weak-dependency extensions (CoveragePostprocessing, DocumenterReference, TestRunner)
31-
test/suite/ # tests by functionality, not by src layout
32-
docs/ # Documenter.jl site
33-
dev/ # philosophy, rules, planning template (versioned)
13+
src/ # Source code: one submodule per responsibility, no top-level exports
14+
ext/ # Weak-dependency extensions (loaded on demand by Julia)
15+
test/suite/ # Test suite: organised by functionality, not by src/ layout
16+
docs/ # Documentation site (DocumenterVitepress)
3417
```
18+
19+
---
20+
21+
## Developer Resources
22+
23+
Design philosophy, operational rules, and plan templates live in the
24+
[control-toolbox Handbook](https://github.com/control-toolbox/Handbook):
25+
26+
| Topic | Link |
27+
| --- | --- |
28+
| Code philosophy (modules, types/traits, exceptions, docstrings, testing, docs) | [`PHILOSOPHY.md`](https://github.com/control-toolbox/Handbook/blob/main/PHILOSOPHY.md) |
29+
| Operational rules (tests, coverage, docs, git) | [`RULES.md`](https://github.com/control-toolbox/Handbook/blob/main/RULES.md) |
30+
| Plan template | [`PLAN.md`](https://github.com/control-toolbox/Handbook/blob/main/PLAN.md) |
31+
32+
---
33+
34+
## Key Conventions
35+
36+
- **No top-level exports** — use `Package.Submodule.symbol` everywhere.
37+
- **Qualified imports**`import Pkg: Pkg`, never bare `using`.
38+
- **Fake types at module top-level** — never inside test functions.
39+
- **Plans before code** — write a plan and confirm with the user before touching files.
40+
- **Docstrings last** — written only after all implementation steps are stable.
41+
- **Never commit or push without explicit user approval.**

README.template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ For instructions on how to customize this README.template.md and use the central
55
please see the user guide: https://github.com/orgs/control-toolbox/discussions/67
66
-->
77

8-
The CTBase.jl package is part of the [control-toolbox ecosystem](https://github.com/control-toolbox).
8+
CTBase.jl is the **foundational layer** of the [control-toolbox ecosystem](https://github.com/control-toolbox): it provides the shared types, exception infrastructure, extensions scaffolding, and development utilities that all other packages in the ecosystem build on.
99

1010
<!-- INCLUDE_BADGES: Documentation, CI, Coverage, PackageEvaluation, Release, License, CodeStyle -->
1111

dev/RULES.md

Lines changed: 0 additions & 117 deletions
This file was deleted.

dev/philosophy/PHILOSOPHY.md

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)