@regardio/dev 2.0.2 → 2.1.0

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.
package/docs/en/agents.md DELETED
@@ -1,57 +0,0 @@
1
- ---
2
-
3
- title: AI Agent Guidelines
4
- type: guide
5
- status: published
6
- summary: Instructions for AI coding assistants working with Regardio projects
7
- related: [coding-standards, react-standards, development-principles]
8
- locale: en-US
9
- ---
10
-
11
- # AI Agent Guidelines
12
-
13
- Baseline expectations for AI coding assistants working in Regardio projects. Follow the linked standards — they apply equally to agent and human contributions.
14
-
15
- ## How Agents Should Work
16
-
17
- - **Scope changes tightly** - Only change what the task requires. Do not refactor adjacent code, add features, or reorganize files unless asked.
18
- - **Read before writing** - Understand existing patterns in the file and its neighbors before editing. Match the style you find.
19
- - **Avoid unnecessary complexity** - Only implement what is explicitly required. Do not introduce abstractions, helpers, or utilities speculatively.
20
- - **No emojis** - Unless explicitly requested.
21
- - **Preserve comments and documentation** - Do not add or remove comments unless the task calls for it.
22
- - **Explain uncertainty** - If something is ambiguous, say so rather than guessing.
23
-
24
- ## Implementation Workflow
25
-
26
- When working on any non-trivial task, follow this sequence:
27
-
28
- 1. **Understand the business logic** — Gather context before writing code. Read relevant domain documents. Know what is actually needed; do not implement what was not asked for.
29
- 2. **Evaluate existing solutions** — Check for well-maintained libraries or utilities before writing custom code. Do not reinvent; do not introduce a dependency without verifying it exists and is actively maintained.
30
- 3. **Define tests first** — Identify what tests describe the expected behavior before implementing. Tests are a contract. Do not modify tests to make them pass.
31
- 4. **Implement with reusability in mind** — Prefer simple, readable code. Duplicate until a clear pattern emerges, then extract. Avoid speculative abstractions.
32
- 5. **Stop if it gets complicated** — Growing complexity despite good preparation is a signal. Surface the difficulty, reconsider the approach, and back out rather than pushing through.
33
- 6. **Document intent, stay lean** — Comments explain *why*, not *what*. Check existing documentation and business logic context before starting work.
34
-
35
- ## Standards
36
-
37
- - [Coding Standards](./standards/coding.md) — TypeScript, React, and general coding patterns
38
- - [React and TypeScript Standards](./standards/react.md) — Component, hook, and state patterns
39
- - [SQL Schema Standards](./standards/sql.md) — PostgreSQL naming, structure, and access control
40
- - [Development Principles](./standards/principles.md) — Code quality, architecture, security
41
- - [API Standards](./standards/api.md) — API design and implementation
42
- - [Naming Conventions](./standards/naming.md) — Naming across TypeScript, SQL, CSS, Git
43
- - [Testing Approach](./standards/testing.md) — Testing philosophy and patterns
44
- - [Commit Conventions](./standards/commits.md) — Conventional commits and changelog generation
45
- - [Documentation Standard](./standards/documentation.md) — Document structure and conventions
46
- - [Writing](./standards/writing.md) — Voice, tone, and language
47
-
48
- ## Commands
49
-
50
- ```bash
51
- pnpm fix # Fix and lint everything
52
- pnpm lint # Lint only
53
- pnpm test # Run tests
54
- pnpm typecheck # Type check
55
- ```
56
-
57
- Run `typecheck` and `lint` before marking a task complete.
@@ -1,173 +0,0 @@
1
- ---
2
-
3
- title: "Documentation Standard"
4
- description: "How Regardio documents its work — for agents to navigate, for humans to reason with, for tests to build on."
5
- publishedAt: 2026-04-17
6
- order: 1
7
- language: "en"
8
- status: "published"
9
- ---
10
-
11
- ## Context
12
-
13
- Regardio documentation is read by three audiences at once. Agents use it to answer questions about the system and to write code against a known contract. Humans use it to build a judgement of their own about what the project does and why. Tests use it as the specification the implementation is measured against.
14
-
15
- Those audiences do not all need the same shape on every page. An architectural decision reads best as a short chain of reasoning — context, alternatives, what was chosen and why. A naming reference reads best as a catalogue. A quick introduction to a tool reads best as a few paragraphs and a short example. Forcing every document into one template serves the template rather than the content, and what the reader comes away with is ceremony instead of understanding.
16
-
17
- What the documentation needs is enough predictability for tooling to rely on — a consistent frontmatter, a recognisable title, a place to find related reading — and enough freedom for each document to take the shape its content asks for.
18
-
19
- ## Decision
20
-
21
- Every Regardio document carries a small shared surface. Underneath, it takes whichever of a few shapes fits the content it carries.
22
-
23
- ### Shared surface
24
-
25
- Every document has the same top:
26
-
27
- - **Frontmatter** that identifies the document and lets tooling index it
28
- - **A title** as a heading or implicit from frontmatter
29
- - **An opening that names what the document is for** — one or two sentences, before any sub-headings, so that a reader landing cold knows where they are
30
-
31
- Every document has the same bottom:
32
-
33
- - **Cross-references** to documents the reader is likely to want next, either inline in the prose or collected under `## Related` at the end
34
-
35
- Between the top and the bottom, the document takes the shape its content asks for.
36
-
37
- ### Shapes the body takes
38
-
39
- A few shapes recur. Pick the one the content fits; do not pad the content into a shape it resists.
40
-
41
- **Decision record.** When the document captures a choice with real trade-offs, the ADR shape carries the reasoning well: *Status → Context → Decision → Alternatives Considered → Operational Rules → Consequences*. Operational Rules are the part tests bind to. The shape is an option for decision-heavy documents, not a requirement for every document.
42
-
43
- **Reference catalogue.** When the content is a set of rules, names, or mappings that readers look up rather than read end-to-end, a catalogue of short sections with examples is the honest form. Naming conventions, file-layout rules, linter settings, and configuration tables read this way.
44
-
45
- **Concept or entity note.** When the document describes a thing in the domain — a Channel, a Piece, a Plan — a short run of paragraphs that names the thing, its role, and its relations is usually enough. Two or three headings if the thing has parts worth naming separately.
46
-
47
- **Quick introduction.** When the document introduces a tool or a workflow, a few paragraphs and a small example are enough. The reader needs to know what the thing is, when to reach for it, and where to go next. No ADR skeleton is required for a tool page.
48
-
49
- **Warm reasoning.** When the document is working something out — a use case, a walkthrough, an explanation of why a piece of the domain behaves the way it does — prose that follows the thought is the right form. Headings appear where they help the reader keep their place, not because structure is owed.
50
-
51
- A document can borrow from more than one shape. An architectural document might open with warm reasoning and close with Operational Rules. An entity note might include a short alternatives paragraph when the entity's shape had genuine contenders. The shapes are orientation, not slots.
52
-
53
- ### Frontmatter
54
-
55
- Frontmatter is the part tooling reads. Keep it stable.
56
-
57
- | Field | Required | Notes |
58
- |---|---|---|
59
- | `title` | yes | Noun phrase naming the document. Decision records may prefix `"ADR: "`. |
60
- | `description` | yes | One sentence. What this document is for, without hedging. |
61
- | `publishedAt` | yes | ISO date (`YYYY-MM-DD`) the document was first accepted. |
62
- | `status` | yes | `"draft"`, `"published"`, `"superseded"`. |
63
- | `language` | yes | `"en"`, `"de"`. |
64
- | `order` | no | Integer, when a sibling set has a meaningful reading order. |
65
- | `kind` | no | `"adr"`, `"entity"`, `"concept"`, `"architecture"`, `"guide"`, `"use-case"`, `"reference"`. Lets agents and renderers pick the right treatment. |
66
- | `area` | no | `"ensemble"`, `"supabase"`, `"connect"`, `"instrument"`, `"dev"`. Names the implementation the document belongs to. |
67
- | `supersedes` | no | Filename (without extension) of the document this one replaces. |
68
- | `supersededBy` | no | Filename of the document that replaced this one. |
69
-
70
- ### Tense and stance
71
-
72
- Documents describe what the system does, in the present tense, observed rather than advertised. "The publication function returns pieces ordered by `sort_order`." Not "The publication function will return…" and not "We should implement…". The tense holds whether the behaviour is currently built or still being specified; the `status` frontmatter carries the difference.
73
-
74
- The stance is observational. A Regardio document is not a pitch. It notices how the system fits together and what follows from that. Reliability, safety, transparency, usefulness, and care for the people the software serves show up through how the reasoning is laid out, not by being claimed. A reader who finishes a document should be able to make their own judgement about whether the system is sound — that is what the prose is for.
75
-
76
- ### What shows up where
77
-
78
- - **Code snippets** appear where they clarify a contract, a data shape, or a naming pattern. Reference catalogues quite properly carry several; decision records rarely need any. A snippet never stands in for the reasoning around it.
79
- - **Names** (files, functions, columns, handles) appear where they are contracts readers rely on. They do not appear as a substitute for describing what something does.
80
- - **Procedural steps** belong in runbooks and READMEs. A domain spec does not read like a cookbook.
81
-
82
- ### Cross-references
83
-
84
- Links carry a short descriptor of what the link leads to, not just a filename:
85
-
86
- ```markdown
87
- The [Channel](../entities/channel.md) is the publication destination;
88
- the [Publishing Architecture](../architecture/publishing-architecture.md)
89
- describes how callers reach it.
90
- ```
91
-
92
- `## Related` at the end of a document lists the next pages a reader is likely to want.
93
-
94
- ### Voice
95
-
96
- The [Writing](./writing.md) standard covers voice, tone, and language. This document relies on it rather than repeating it.
97
-
98
- ## Alternatives Considered
99
-
100
- ### A single ADR skeleton for every document
101
-
102
- **Dismissed because** it presses reference catalogues and tool introductions into a shape that does not suit them. The skeleton adds ceremony where the content is already clear, and readers learn to skim past sections that carry no weight. The skeleton remains available for documents whose content earns it.
103
-
104
- ### No shared shape at all
105
-
106
- **Dismissed because** agents and tooling need something predictable to index against, and readers benefit from landing on any document and knowing roughly where to look. A thin shared surface — frontmatter, opening line, closing references — is enough.
107
-
108
- ### Separate templates per document kind
109
-
110
- **Dismissed because** the kinds blur at the edges. An entity note sometimes carries a decision; a use case sometimes carries a catalogue. A small set of recognisable shapes that documents can borrow from works better than a closed list of templates.
111
-
112
- ## Operational Rules
113
-
114
- ### Frontmatter is complete
115
-
116
- Every document carries `title`, `description`, `publishedAt`, `status`, and `language`. Tooling that indexes or lists documents relies on these five.
117
-
118
- ### Opening names the subject
119
-
120
- Before the first sub-heading, a reader can tell what the document is for. If the opening does not make this clear, the document is not ready.
121
-
122
- ### Shape follows content
123
-
124
- The body takes the shape the content asks for. A decision record uses the ADR skeleton if that skeleton helps the reasoning; a reference uses a catalogue; an introduction stays short. Where a document borrows from more than one shape, it does so in service of the reader, not in service of the template.
125
-
126
- ### Tense is present, stance is observational
127
-
128
- Documents describe the system as it is, in the present tense. Not-yet-built behaviour is flagged through `status`, not through hedged tense. The prose observes rather than promotes.
129
-
130
- ### Reasoning is preserved, not rewritten
131
-
132
- When a decision is revisited, the existing document is superseded. The old reasoning stays readable so that future readers can see what was known at the time. An in-place rewrite that changes direction without supersession loses the history.
133
-
134
- ### Code and names earn their place
135
-
136
- A snippet appears because it clarifies a contract the prose cannot carry alone. A specific name appears because callers rely on it. Both are tools for the reader, not decoration.
137
-
138
- ### Tests can point at a document
139
-
140
- A behaviour worth testing has a place in a document that names it. The document does not need a section labelled "Operational Rules" for this — it needs prose clear enough that a test can quote it and both the test author and the reviewer know what is being verified.
141
-
142
- ### One subject per document
143
-
144
- A document names one entity, one concept, one decision, one scenario. When a draft sprawls across several, the move is to split it.
145
-
146
- ## Consequences
147
-
148
- ### Positive
149
-
150
- - Documents read naturally for their content. ADRs feel like ADRs; reference catalogues feel like reference catalogues; introductions stay short.
151
- - Agents and humans find a predictable frontmatter and opening, and the body of each document carries its reasoning in the form that fits.
152
- - The docs stay honest. Observational prose about what the system does leaves room for the reader to form a judgement, rather than prescribing one.
153
- - Tests bind to the prose that describes behaviour, wherever in the document that prose lives.
154
-
155
- ### Negative
156
-
157
- - "Shape follows content" asks for judgement. Contributors unsure of the right shape need a reference document to look at; the existing documents serve that role.
158
- - Without a single template, reviewers sometimes have to say "this would read better as a catalogue" or "this would read better as an ADR". That conversation is part of the standard, not a cost around it.
159
-
160
- ### Mitigations
161
-
162
- - New documents are often patterned on a nearby existing one. A contributor writing a new entity note copies the shape of an adjacent entity note; a contributor writing an ADR copies an adjacent ADR.
163
- - Reviewers point at this document when a draft has picked a shape that resists its content, and help the author find the form the content already has.
164
-
165
- ## Related
166
-
167
- - [Writing](./writing.md) — Voice, tone, language
168
- - [AI Agent Guidelines](../agents.md) — How agents use these documents
169
- - [Principles](./principles.md) — Shared development principles
170
-
171
- ---
172
-
173
- **License**: [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) © Regardio
@@ -1,84 +0,0 @@
1
- ---
2
-
3
- title: "Principles"
4
- description: "The shared ground Regardio projects stand on — six clusters of principles that carry across languages and repos."
5
- publishedAt: 2026-04-17
6
- order: 3
7
- language: "en"
8
- status: "published"
9
- kind: "reference"
10
- area: "dev"
11
- ---
12
-
13
- Regardio spans several codebases and several languages. What keeps them legible to each other is a short list of principles held in common — enough shared ground that a contributor moving between projects finds the same habits in force, and enough room left for each codebase to speak its own idiom.
14
-
15
- Six clusters, a handful of items each.
16
-
17
- ## Code quality
18
-
19
- - Readable code over clever code
20
- - Consistent naming within each language — `camelCase` in TypeScript, `snake_case` in SQL
21
- - Small functions with a single responsibility
22
- - Explicit choices over implicit defaults
23
-
24
- ## Architecture
25
-
26
- - Modules decouple from each other; dependencies are deliberate
27
- - Duplication resolves into an abstraction only when the pattern is clear
28
- - Interfaces describe what a module does, not how it does it
29
- - Concerns separate along the seams the domain suggests
30
-
31
- ## Error handling
32
-
33
- - Input is validated early; failures surface with a clear message
34
- - Validation covers correctness and security in the same pass
35
- - Logic stays separated from side effects so it remains testable
36
- - Dependencies can fail; the code degrades gracefully when they do
37
-
38
- ## Performance
39
-
40
- - Data structures match the shape of the work
41
- - Measurement comes before optimisation
42
- - Resources — memory, connections, file handles — are released on the path that acquired them
43
- - Scale is considered at design time, not retrofitted
44
-
45
- ## Security
46
-
47
- - Client data is untrusted by default; server-side validation is the line
48
- - Privileges stay narrow; access is opened deliberately
49
- - Defence is layered; a single check never stands alone
50
- - Openness is an opt-in, not the default posture
51
-
52
- ## Maintainability
53
-
54
- - Patterns repeat across the codebase so that reading one teaches reading the rest
55
- - Commits are atomic and speak to one change at a time
56
- - Refactoring is continuous; debt is paid down rather than accumulated
57
-
58
- ## Implementation workflow
59
-
60
- Non-trivial work tends to follow this sequence — not as a ritual, but because skipping a step usually costs more later than it saves now:
61
-
62
- 1. **Understand the business logic first.** The deepest defects come from misunderstood requirements. Read the relevant domain document; know what is needed now rather than what might be needed later.
63
- 2. **Look for existing solutions.** Well-maintained libraries are evaluated before custom code is written. Dependencies are vetted for design quality, test coverage, and recent activity.
64
- 3. **Write the tests as specification.** The behaviour a change produces is described as tests before the change is written. Tests are the contract; the code is measured against them.
65
- 4. **Implement with reusability in mind, not reusability as the goal.** Duplicate until the pattern is clear, then extract. Wrong abstractions cost more than duplication.
66
- 5. **Stop and reconsider when complexity grows.** Difficulty that keeps growing despite good preparation is a signal. Back out, simplify, or question the approach.
67
- 6. **Document intent, not mechanics.** Comments explain *why*; the code explains *what*. Existing context is checked before new prose is added.
68
-
69
- ## Collaboration
70
-
71
- - Every change passes through review
72
- - Code quality is shared, not owned
73
- - Decisions that involve a real trade-off leave a trace in the project's `docs/en` tree
74
-
75
- ## Related
76
-
77
- - [Coding](./coding.md) — TypeScript and general patterns
78
- - [Testing](./testing.md) — Testing philosophy
79
- - [Documentation Standard](./documentation.md) — How documents are shaped
80
- - [Writing](./writing.md) — Voice, tone, language
81
-
82
- ---
83
-
84
- **License**: [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) © Regardio
@@ -1,119 +0,0 @@
1
- ---
2
-
3
- title: "Writing"
4
- description: "Voice, tone, and language Regardio content carries, in English and German."
5
- publishedAt: 2026-04-17
6
- order: 2
7
- language: "en"
8
- status: "published"
9
- kind: "concept"
10
- area: "dev"
11
- ---
12
-
13
- The voice in which Regardio writes about itself and its tools.
14
-
15
- ## What you are doing
16
-
17
- You write *from within* the System, not *about* it. Your aim is to trigger recognition. The reader you are writing for should be able to think *Yes, that's how it is.*
18
-
19
- Two trains of thought carry everything the System does — and everything you write about it.
20
-
21
- **Any one object can be observed from two sides.** Front and back, inside and outside, past and future, still and moving, question and answer, start and finish. A thing that looks complete from one angle shows something new from the other. Writing that only shows one side flattens what it describes. Writing that acknowledges both gives the reader room to stand where they already stand.
22
-
23
- **A whole becomes graspable when it is cut into a few distinct parts.** Six is the number to return to: enough variety to cover what matters, few enough to hold in the head at once, clear enough to name and locate each piece. A pie cut into six slices is something anyone can picture. When a subject resists clarity, the move is not more words — it is better cuts.
24
-
25
- These two habits are the grammar underneath the System. Carry them quietly. You rarely name them. They are just the shape of the thinking.
26
-
27
- ## How to meet the reader
28
-
29
- Every reader comes with their own life and their own pursuit. Assume they notice things for themselves. Trust them to do their own connecting. Address them directly, without talking up or down.
30
-
31
- The ground under the writing is careful observation of how people actually feel, think, and act — not advice about how they should. When an idea becomes personally recognizable while staying broadly true, it has landed. When it only flatters or only instructs, it hasn't.
32
-
33
- ## Stance
34
-
35
- Six movements carry every piece.
36
-
37
- 1. **Derive, don't declare.** One thought leads to the next. "The System recognizes…" speaks from above. Better: the observation that leads to the structure. Readers follow a line of thought, not an instruction.
38
- 2. **Observe, don't instruct.** Write like someone who has listened carefully and is sharing an observation, not like someone explaining a method.
39
- 3. **Structure offers freedom, not rules.** The cuts exist to widen a view that has become too narrow, not to discipline one that is already broad.
40
- 4. **Suggest possibilities to choose from.** Offer angles, not answers. Let the reader decide what fits. Suggest questions that people have, not riddles to solve.
41
- 5. **Turned toward what could be, without promises.** Warm, attentive, spacious. Curious about people rather than diagnostic. No salvation talk, no coaching register.
42
- 6. **Good humor makes the deepest thought approachable.** Lightness when it fits. Not forced, not absent. When the moment is right, a small wink can carry weight without claiming it.
43
-
44
- ## Before and after
45
-
46
- **Instead of:** *"Apply this framework to align your team."*
47
- **Try:** *"What does the decision we made last week have to do with what's slowing us down now?"*
48
-
49
- **Instead of:** *"The System helps you gain clarity."*
50
- **Try:** *"A few angles worth looking at, whatever the pursuit."*
51
-
52
- **Instead of:** *"Pursuits flourish with a clear core."*
53
- **Try:** *"How will we know when we've arrived?"*
54
-
55
- The System's questions are not headers. They are real questions, worth sitting with.
56
-
57
- ## Language
58
-
59
- Language that leaves room lets readers think. Language that pushes does the thinking for them. Given the choice, choose room.
60
-
61
- **Favor:** notice, explore, find, might, could, pattern, rhythm, carry, hold — words that leave room.
62
-
63
- **Avoid:** must, potential, resources, values, purpose, sustainability, growth, leverage, empower, ownership, good, bad. These either push or have been worn down to noise.
64
-
65
- **No method jargon.** Not from business, not from coaching, not from therapy, not from spirituality. If a term has a clear everyday word behind it, use the everyday word.
66
-
67
- **People are not categories.** Describe what people do and bring about, not what they are. This is also how gendered forms are handled — name actions, not groups.
68
-
69
- **The System is humane.** Equal, free cooperation is built in. Avoid connotations of hierarchy, ownership, dominance, control, or force. Reflect that without announcing it.
70
-
71
- **Complexity earns its place or goes.** Make hard ideas reachable without flattening them. If a sentence has to be read twice, shorten it. If an idea has been reduced past recognition, let it breathe again.
72
-
73
- ## System terms
74
-
75
- System terms carry precisely defined concepts. Use them as they are; don't swap in synonyms for variety. When tempted to reach for a buzzword, reach for a System term instead — if it fits. If no System term fits, the buzzword probably isn't earning its place either.
76
-
77
- In every language the System is written in, the terms are chosen to capture the spirit of each concept in that language — not to translate literally from another. Don't import words from other languages into the prose. Let each language stand on its own.
78
-
79
- ## Roots, kept in the background
80
-
81
- The System draws from many traditions of thought. Reference intents and ideas, not names or schools. The sources show themselves in the structure, not in citation. This is working craft carried by collective intelligence, not an elaborate treatise.
82
-
83
- ## Format and craft
84
-
85
- **Headers** for orientation. **Prose** for connected thought. **Bold** for System terms at first introduction. *Italics* for genuine emphasis. No emojis. Lists only when the content is genuinely a list — bullets never replace a thought.
86
-
87
- ## Language-specific caveats
88
-
89
- ### German
90
-
91
- - Address the reader with *du* unless the context clearly calls for *Sie* (formal contracts, legal notices). Keep it direct, without affectation.
92
- - No gendering artifacts: no *:innen*, no asterisks, no *(m/w/d)*. Prefer action-based descriptions over group labels: *wer etwas vorhat*, *ein Mensch, der …*, *die Person, die …*, *Mitwirkende*, *Beteiligte*.
93
- - Quotation marks: German low-high („…") in body text.
94
-
95
- ### English
96
-
97
- - American English: *organize*, *color*, *toward*, *behavior*, *center*. Periods and commas inside quotation marks.
98
- - No gendered forms. Name actions: *the person pursuing this*, *contributors*, *those involved*. Singular *they* is fine where a pronoun is unavoidable.
99
- - Quotation marks: straight double quotes (") in Markdown source; typographic quotes ("…") in rendered prose.
100
-
101
- ## Check before publishing
102
-
103
- - Does it sound like a conversation the reader would want to be in?
104
- - Does the text derive rather than declare?
105
- - Are abstract thoughts grounded in concrete examples?
106
- - Are System terms used consistently, in their precise meaning?
107
- - Is it free of coaching register, pigeonholing, and tired buzzwords?
108
- - Could the honest response be *"Yes, that's how it is"*?
109
-
110
- *This guide is itself a living text. When in doubt: would you enjoy reading this?*
111
-
112
- ## Related
113
-
114
- - [Documentation Standard](./documentation.md) — How Regardio shapes its documents
115
- - [Principles](./principles.md) — Shared development principles
116
-
117
- ---
118
-
119
- **License**: [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) © Regardio