tiredize 0.1.0__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.
- tiredize-0.1.0/.context/tracker/backlog.md +522 -0
- tiredize-0.1.0/.context/wiki/README.md +65 -0
- tiredize-0.1.0/.context/wiki/architecture/pipeline.md +90 -0
- tiredize-0.1.0/.context/wiki/components/autolinks.md +330 -0
- tiredize-0.1.0/.context/wiki/components/cli.md +295 -0
- tiredize-0.1.0/.context/wiki/components/frontmatter-schema-validator.md +279 -0
- tiredize-0.1.0/.context/wiki/components/linter-engine.md +412 -0
- tiredize-0.1.0/.context/wiki/components/markdown-parser.md +655 -0
- tiredize-0.1.0/.context/wiki/components/markdown-schema-validator.md +388 -0
- tiredize-0.1.0/.context/wiki/components/rule-elements.md +46 -0
- tiredize-0.1.0/.context/wiki/components/rule-line-length.md +56 -0
- tiredize-0.1.0/.context/wiki/components/rule-links.md +126 -0
- tiredize-0.1.0/.context/wiki/components/rule-tabs.md +29 -0
- tiredize-0.1.0/.context/wiki/components/rule-trailing-whitespace.md +42 -0
- tiredize-0.1.0/.context/wiki/components/rule-unicode.md +55 -0
- tiredize-0.1.0/.context/wiki/glossary.md +19 -0
- tiredize-0.1.0/.context/wiki/operations/installing-and-running.md +65 -0
- tiredize-0.1.0/.context/wiki/operations/releasing.md +258 -0
- tiredize-0.1.0/.context/wiki/overview/scope.md +53 -0
- tiredize-0.1.0/.context/wiki/practices/ci.md +51 -0
- tiredize-0.1.0/.context/wiki/practices/contributing.md +28 -0
- tiredize-0.1.0/.context/wiki/practices/testing.md +78 -0
- tiredize-0.1.0/.context/wiki/repository/layout.md +56 -0
- tiredize-0.1.0/.github/dependabot.yml +16 -0
- tiredize-0.1.0/.github/workflows/ci.yaml +41 -0
- tiredize-0.1.0/.github/workflows/release.yaml +309 -0
- tiredize-0.1.0/.gitignore +214 -0
- tiredize-0.1.0/AGENTS.md +34 -0
- tiredize-0.1.0/LICENSE +674 -0
- tiredize-0.1.0/PKG-INFO +1226 -0
- tiredize-0.1.0/README.md +539 -0
- tiredize-0.1.0/pyproject.toml +40 -0
- tiredize-0.1.0/tests/__init__.py +0 -0
- tiredize-0.1.0/tests/linter/__init__.py +0 -0
- tiredize-0.1.0/tests/linter/rules/__init__.py +0 -0
- tiredize-0.1.0/tests/linter/rules/test_elements.py +298 -0
- tiredize-0.1.0/tests/linter/rules/test_engine.py +261 -0
- tiredize-0.1.0/tests/linter/rules/test_line_length.py +337 -0
- tiredize-0.1.0/tests/linter/rules/test_links.py +986 -0
- tiredize-0.1.0/tests/linter/rules/test_loader.py +184 -0
- tiredize-0.1.0/tests/linter/rules/test_tabs.py +268 -0
- tiredize-0.1.0/tests/linter/rules/test_trailing_whitespace.py +294 -0
- tiredize-0.1.0/tests/linter/rules/test_unicode.py +321 -0
- tiredize-0.1.0/tests/linter/test_utils.py +780 -0
- tiredize-0.1.0/tests/markdown/__init__.py +0 -0
- tiredize-0.1.0/tests/markdown/test_utils.py +276 -0
- tiredize-0.1.0/tests/markdown/types/__init__.py +0 -0
- tiredize-0.1.0/tests/markdown/types/test_codeblock.py +374 -0
- tiredize-0.1.0/tests/markdown/types/test_codeinline.py +309 -0
- tiredize-0.1.0/tests/markdown/types/test_document.py +354 -0
- tiredize-0.1.0/tests/markdown/types/test_frontmatter.py +331 -0
- tiredize-0.1.0/tests/markdown/types/test_header.py +469 -0
- tiredize-0.1.0/tests/markdown/types/test_image.py +401 -0
- tiredize-0.1.0/tests/markdown/types/test_link.py +1291 -0
- tiredize-0.1.0/tests/markdown/types/test_link_gfm_autolinks.py +561 -0
- tiredize-0.1.0/tests/markdown/types/test_list.py +38 -0
- tiredize-0.1.0/tests/markdown/types/test_quoteblock.py +319 -0
- tiredize-0.1.0/tests/markdown/types/test_reference.py +582 -0
- tiredize-0.1.0/tests/markdown/types/test_schema.py +660 -0
- tiredize-0.1.0/tests/markdown/types/test_section.py +204 -0
- tiredize-0.1.0/tests/markdown/types/test_table.py +494 -0
- tiredize-0.1.0/tests/test_cases/__init__.py +0 -0
- tiredize-0.1.0/tests/test_cases/markdown/__init__.py +0 -0
- tiredize-0.1.0/tests/test_cases/markdown/good-frontmatter-and-markdown.md +161 -0
- tiredize-0.1.0/tests/test_cases/rules/00_no_rule/__init__.py +0 -0
- tiredize-0.1.0/tests/test_cases/rules/01_simple_rule/__init__.py +0 -0
- tiredize-0.1.0/tests/test_cases/rules/01_simple_rule/simple_rule.py +26 -0
- tiredize-0.1.0/tests/test_cases/rules/02_private_rule/__init__.py +0 -0
- tiredize-0.1.0/tests/test_cases/rules/02_private_rule/_private_test.py +15 -0
- tiredize-0.1.0/tests/test_cases/rules/03_with_subpackage/__init__.py +0 -0
- tiredize-0.1.0/tests/test_cases/rules/03_with_subpackage/nested_pkg/__init__.py +0 -0
- tiredize-0.1.0/tests/test_cases/rules/03_with_subpackage/nested_pkg/hidden_rule.py +15 -0
- tiredize-0.1.0/tests/test_cases/rules/03_with_subpackage/top_rule.py +15 -0
- tiredize-0.1.0/tests/test_cases/rules/__init__.py +0 -0
- tiredize-0.1.0/tests/test_cli.py +520 -0
- tiredize-0.1.0/tests/test_main_module.py +754 -0
- tiredize-0.1.0/tests/test_versioning.py +110 -0
- tiredize-0.1.0/tests/validators/__init__.py +0 -0
- tiredize-0.1.0/tests/validators/test_frontmatter_schema.py +1217 -0
- tiredize-0.1.0/tests/validators/test_markdown_schema.py +1289 -0
- tiredize-0.1.0/tiredize/__init__.py +0 -0
- tiredize-0.1.0/tiredize/__main__.py +19 -0
- tiredize-0.1.0/tiredize/cli.py +238 -0
- tiredize-0.1.0/tiredize/core_types.py +21 -0
- tiredize-0.1.0/tiredize/linter/__init__.py +0 -0
- tiredize-0.1.0/tiredize/linter/engine.py +73 -0
- tiredize-0.1.0/tiredize/linter/rules/__init__.py +107 -0
- tiredize-0.1.0/tiredize/linter/rules/_elements.py +32 -0
- tiredize-0.1.0/tiredize/linter/rules/elements.py +71 -0
- tiredize-0.1.0/tiredize/linter/rules/line_length.py +131 -0
- tiredize-0.1.0/tiredize/linter/rules/links.py +240 -0
- tiredize-0.1.0/tiredize/linter/rules/tabs.py +73 -0
- tiredize-0.1.0/tiredize/linter/rules/trailing_whitespace.py +71 -0
- tiredize-0.1.0/tiredize/linter/rules/unicode.py +110 -0
- tiredize-0.1.0/tiredize/linter/utils.py +263 -0
- tiredize-0.1.0/tiredize/markdown/__init__.py +0 -0
- tiredize-0.1.0/tiredize/markdown/types/__init__.py +0 -0
- tiredize-0.1.0/tiredize/markdown/types/code.py +107 -0
- tiredize-0.1.0/tiredize/markdown/types/document.py +88 -0
- tiredize-0.1.0/tiredize/markdown/types/frontmatter.py +67 -0
- tiredize-0.1.0/tiredize/markdown/types/header.py +122 -0
- tiredize-0.1.0/tiredize/markdown/types/image.py +67 -0
- tiredize-0.1.0/tiredize/markdown/types/link.py +544 -0
- tiredize-0.1.0/tiredize/markdown/types/list.py +19 -0
- tiredize-0.1.0/tiredize/markdown/types/quoteblock.py +79 -0
- tiredize-0.1.0/tiredize/markdown/types/reference.py +170 -0
- tiredize-0.1.0/tiredize/markdown/types/schema.py +195 -0
- tiredize-0.1.0/tiredize/markdown/types/section.py +179 -0
- tiredize-0.1.0/tiredize/markdown/types/table.py +102 -0
- tiredize-0.1.0/tiredize/markdown/utils.py +29 -0
- tiredize-0.1.0/tiredize/validators/__init__.py +0 -0
- tiredize-0.1.0/tiredize/validators/frontmatter_schema.py +458 -0
- tiredize-0.1.0/tiredize/validators/markdown_schema.py +490 -0
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
# Backlog
|
|
2
|
+
|
|
3
|
+
<!-- Work not yet started. Rules are in dotclaude knowledge/planning.md.
|
|
4
|
+
Ranked is in the user's order and its top entry is next. New ideas go
|
|
5
|
+
under Unranked, where order means nothing. An entry leaves this file
|
|
6
|
+
when its issue file is created. -->
|
|
7
|
+
|
|
8
|
+
## Ranked
|
|
9
|
+
|
|
10
|
+
### ci-secrets-in-aws
|
|
11
|
+
|
|
12
|
+
Keep no long-lived secret for this repo in GitHub: the credentials
|
|
13
|
+
tiredize's workflows use should live in AWS, not in GitHub Actions
|
|
14
|
+
secrets.
|
|
15
|
+
|
|
16
|
+
Changes: [releasing](../wiki/operations/releasing.md), [CI](../wiki/practices/ci.md)
|
|
17
|
+
|
|
18
|
+
### contribution-guide
|
|
19
|
+
|
|
20
|
+
Write `CONTRIBUTING.md` for outside contributors, as promised in the
|
|
21
|
+
PR #44 review. Open first: which tracker contributors use, since GitHub
|
|
22
|
+
cannot link a pull request to a file in `.context/tracker/`, and where
|
|
23
|
+
the minor-fix exemption ends.
|
|
24
|
+
|
|
25
|
+
Changes: [contributing](../wiki/practices/contributing.md), [README](../../README.md)
|
|
26
|
+
|
|
27
|
+
### schema-finding-taxonomy
|
|
28
|
+
|
|
29
|
+
Rework the markdown schema validator's findings so a section is
|
|
30
|
+
identified by name and heading level together, and give findings about
|
|
31
|
+
absent sections a useful position instead of line 1. Where
|
|
32
|
+
`missing_section` should point is still open.
|
|
33
|
+
|
|
34
|
+
Changes: [markdown schema validator](../wiki/components/markdown-schema-validator.md)
|
|
35
|
+
|
|
36
|
+
- A section's identity is its name and level together: `wrong_level`
|
|
37
|
+
goes, and its cases become `missing_section` plus
|
|
38
|
+
`unexpected_section`.
|
|
39
|
+
|
|
40
|
+
### free-form-subsections
|
|
41
|
+
|
|
42
|
+
Assess how usable the markdown schema is for documents with free-form
|
|
43
|
+
subsections. The TRR schema as written fails about half of the real
|
|
44
|
+
reports, because free-form `####` sections sit beside a required named
|
|
45
|
+
one, a `pattern: ".+"` sibling of a named entry is refused as
|
|
46
|
+
ambiguous, and the only working schema needs a negative lookahead.
|
|
47
|
+
|
|
48
|
+
Changes: [markdown schema validator](../wiki/components/markdown-schema-validator.md)
|
|
49
|
+
|
|
50
|
+
## Unranked
|
|
51
|
+
|
|
52
|
+
### acceptance-test-commit-hook
|
|
53
|
+
|
|
54
|
+
Acceptance Test Design commits tests that must fail, but the local
|
|
55
|
+
pre-commit hook runs pytest, so every such commit needs `--no-verify`,
|
|
56
|
+
which also skips the branch-name and commit-message checks. Settle a
|
|
57
|
+
convention, such as the hook skipping known acceptance-test paths
|
|
58
|
+
until implementation. Raised by the qa-engineer on `pypi-release`.
|
|
59
|
+
|
|
60
|
+
Changes: [testing](../wiki/practices/testing.md)
|
|
61
|
+
|
|
62
|
+
### add-docstrings
|
|
63
|
+
|
|
64
|
+
Finish docstrings on the public API and settle their format. Most
|
|
65
|
+
linter code and the autolink classes have plain-prose docstrings; most
|
|
66
|
+
element classes, the schema types, the validators' `validate()`,
|
|
67
|
+
`core_types` and nearly every module docstring are missing.
|
|
68
|
+
|
|
69
|
+
Changes: [repository layout](../wiki/repository/layout.md)
|
|
70
|
+
|
|
71
|
+
### ambiguity-coverage
|
|
72
|
+
|
|
73
|
+
Detect ambiguous schema matches everywhere: today sections under an
|
|
74
|
+
unexpected section, and duplicates in unordered mode, are never checked
|
|
75
|
+
for ambiguity.
|
|
76
|
+
|
|
77
|
+
Changes: [markdown schema validator](../wiki/components/markdown-schema-validator.md)
|
|
78
|
+
|
|
79
|
+
### anchor-and-fragment-checks
|
|
80
|
+
|
|
81
|
+
Make anchor and fragment checks match GitHub: anchors compare case-
|
|
82
|
+
sensitively, `#section` passes in a document with no headings, and a
|
|
83
|
+
`#fragment` or `?query` on a relative path makes the check fail.
|
|
84
|
+
|
|
85
|
+
Changes: [linter engine](../wiki/components/linter-engine.md)
|
|
86
|
+
|
|
87
|
+
### block-pattern-line-bugs
|
|
88
|
+
|
|
89
|
+
Stop block patterns crossing lines: a line holding only `#` becomes a
|
|
90
|
+
heading titled with the next non-blank line, a line holding only `>`
|
|
91
|
+
pulls the next paragraph into the quote, and a closing code fence
|
|
92
|
+
accepts trailing text.
|
|
93
|
+
|
|
94
|
+
Changes: [markdown parser](../wiki/components/markdown-parser.md)
|
|
95
|
+
|
|
96
|
+
### check-url-valid-raises
|
|
97
|
+
|
|
98
|
+
Make `check_url_valid()` return every failure instead of raising: a
|
|
99
|
+
timeout of 0 or less, a malformed `valid_status_codes` entry from a
|
|
100
|
+
Python caller, and non-requests exceptions all raise today.
|
|
101
|
+
|
|
102
|
+
Changes: [linter engine](../wiki/components/linter-engine.md)
|
|
103
|
+
|
|
104
|
+
### cli-empty-flag-value
|
|
105
|
+
|
|
106
|
+
Reject an empty flag value: `--rules ""` silently skips the rules check,
|
|
107
|
+
or alone gives a usage error saying the flag must be provided.
|
|
108
|
+
|
|
109
|
+
Changes: [CLI](../wiki/components/cli.md)
|
|
110
|
+
|
|
111
|
+
### cli-uncaught-errors
|
|
112
|
+
|
|
113
|
+
Report every runtime error as an `error:` line: a non-UTF-8 or
|
|
114
|
+
unreadable input document, and a directory or unreadable configuration
|
|
115
|
+
file, end the run with a traceback, and a directory given as a path is
|
|
116
|
+
reported as missing.
|
|
117
|
+
|
|
118
|
+
Changes: [CLI](../wiki/components/cli.md)
|
|
119
|
+
|
|
120
|
+
### configuration-strategy
|
|
121
|
+
|
|
122
|
+
Decide whether the markdown schema, frontmatter schema and rules stay
|
|
123
|
+
three files or become one, and whether tiredize should discover a
|
|
124
|
+
configuration file such as `.tiredize.yaml`.
|
|
125
|
+
|
|
126
|
+
Changes: [CLI](../wiki/components/cli.md)
|
|
127
|
+
|
|
128
|
+
### container-element-model
|
|
129
|
+
|
|
130
|
+
Parse the content of container elements (block quotes, table cells,
|
|
131
|
+
list items) into child elements with document-root positions. Lists
|
|
132
|
+
are not parsed at all yet.
|
|
133
|
+
|
|
134
|
+
Changes: [markdown parser](../wiki/components/markdown-parser.md)
|
|
135
|
+
|
|
136
|
+
### context-validation-ci
|
|
137
|
+
|
|
138
|
+
Validate `.context/` in CI with tiredize itself, against dotclaude's
|
|
139
|
+
canonical schemas for wiki pages, the backlog, tracker issues and
|
|
140
|
+
relative links, replacing the removed `validate-issues` job and the
|
|
141
|
+
hand-synced schema copies it used.
|
|
142
|
+
|
|
143
|
+
Changes: [CI](../wiki/practices/ci.md)
|
|
144
|
+
|
|
145
|
+
### disallow-duplicate-names
|
|
146
|
+
|
|
147
|
+
Stop a name listed twice in `elements.disallow` from doubling its
|
|
148
|
+
findings.
|
|
149
|
+
|
|
150
|
+
Changes: [elements rule](../wiki/components/rule-elements.md)
|
|
151
|
+
|
|
152
|
+
### element-field-types
|
|
153
|
+
|
|
154
|
+
Tidy the element types' public fields: `InlineLink` has no link text
|
|
155
|
+
while `InlineImage` has, and `InlineLink.title`,
|
|
156
|
+
`ReferenceDefinition.title` and `FrontMatter.content` can hold values
|
|
157
|
+
their annotations exclude.
|
|
158
|
+
|
|
159
|
+
Changes: [markdown parser](../wiki/components/markdown-parser.md)
|
|
160
|
+
|
|
161
|
+
### empty-rules-file
|
|
162
|
+
|
|
163
|
+
Decide what an empty `--rules` file means: today it enables no rule and
|
|
164
|
+
exits clean, a silent no-op of the kind configuration validation
|
|
165
|
+
otherwise forbids.
|
|
166
|
+
|
|
167
|
+
Changes: [CLI](../wiki/components/cli.md), [linter engine](../wiki/components/linter-engine.md)
|
|
168
|
+
|
|
169
|
+
### error-discards-findings
|
|
170
|
+
|
|
171
|
+
Keep findings already produced when a later check or rule raises a
|
|
172
|
+
runtime error on the same path; today they are thrown away.
|
|
173
|
+
|
|
174
|
+
Changes: [CLI](../wiki/components/cli.md), [linter engine](../wiki/components/linter-engine.md)
|
|
175
|
+
|
|
176
|
+
### frontmatter-duplicate-key-checks
|
|
177
|
+
|
|
178
|
+
Compare duplicate frontmatter and schema keys as YAML keys, not Python
|
|
179
|
+
values (`1` and `true` are reported as duplicates), and fix the schema
|
|
180
|
+
error prefix that names frontmatter and calls an unhashable key a
|
|
181
|
+
duplicate.
|
|
182
|
+
|
|
183
|
+
Changes: [frontmatter schema validator](../wiki/components/frontmatter-schema-validator.md)
|
|
184
|
+
|
|
185
|
+
### frontmatter-heading-offset
|
|
186
|
+
|
|
187
|
+
Fix the parser dropping the first character after frontmatter: a
|
|
188
|
+
heading on the line right after the closing `---` loses its `#`, and
|
|
189
|
+
every position in such a document is one off.
|
|
190
|
+
|
|
191
|
+
Changes: [markdown parser](../wiki/components/markdown-parser.md)
|
|
192
|
+
|
|
193
|
+
- The code is wrong, not the documentation.
|
|
194
|
+
|
|
195
|
+
### gfm-parity
|
|
196
|
+
|
|
197
|
+
Bring the remaining elements to GFM parity one element at a time, using
|
|
198
|
+
the skipped `gfm-parity:` tests as the register. Includes CRLF line
|
|
199
|
+
endings and balanced parentheses in link URLs. The remaining non-GFM
|
|
200
|
+
element names (`code_inline`, `quoteblock`, `header`,
|
|
201
|
+
`reference_definition`) wait for the planned GFM compliance audit.
|
|
202
|
+
|
|
203
|
+
Changes: [markdown parser](../wiki/components/markdown-parser.md), [testing](../wiki/practices/testing.md)
|
|
204
|
+
|
|
205
|
+
### images-not-link-checked
|
|
206
|
+
|
|
207
|
+
Decide whether the `links` rule checks image targets; inline images are
|
|
208
|
+
never checked today.
|
|
209
|
+
|
|
210
|
+
Changes: [links rule](../wiki/components/rule-links.md)
|
|
211
|
+
|
|
212
|
+
### invalid-frontmatter-yaml
|
|
213
|
+
|
|
214
|
+
Report frontmatter whose YAML does not parse, instead of silently
|
|
215
|
+
treating the document as having no frontmatter and reporting every
|
|
216
|
+
required field missing.
|
|
217
|
+
|
|
218
|
+
Changes: [markdown parser](../wiki/components/markdown-parser.md), [frontmatter schema validator](../wiki/components/frontmatter-schema-validator.md)
|
|
219
|
+
|
|
220
|
+
- It should fail loudly.
|
|
221
|
+
|
|
222
|
+
### line-ending-handling
|
|
223
|
+
|
|
224
|
+
Handle line endings consistently: CR-only files make `line_length` count
|
|
225
|
+
the `\r` and `trailing_whitespace` report every line, and CRLF is
|
|
226
|
+
normalised when a file is read but not for `load(text=...)`.
|
|
227
|
+
|
|
228
|
+
Changes: [markdown parser](../wiki/components/markdown-parser.md), [line_length rule](../wiki/components/rule-line-length.md), [trailing_whitespace rule](../wiki/components/rule-trailing-whitespace.md)
|
|
229
|
+
|
|
230
|
+
### link-reference-overmatch
|
|
231
|
+
|
|
232
|
+
Stop `LinkReference` matching any bracketed text, such as task-list
|
|
233
|
+
boxes and footnote markers, which then count as `link_reference`
|
|
234
|
+
elements.
|
|
235
|
+
|
|
236
|
+
Changes: [markdown parser](../wiki/components/markdown-parser.md)
|
|
237
|
+
|
|
238
|
+
### links-config-checks
|
|
239
|
+
|
|
240
|
+
Check `links` configuration fully: `valid_status_codes: []` is accepted
|
|
241
|
+
and fails every link, header values are not validated, and with
|
|
242
|
+
`validate: false` malformed entries go unreported.
|
|
243
|
+
|
|
244
|
+
Changes: [links rule](../wiki/components/rule-links.md)
|
|
245
|
+
|
|
246
|
+
### links-exclude-malformed-url-crash
|
|
247
|
+
|
|
248
|
+
Stop a malformed URL such as `http://[::1` from aborting the whole run
|
|
249
|
+
when the `links` rule has `exclude` set. A skipped test in
|
|
250
|
+
`tests/linter/rules/test_links.py` already pins one answer: hand the
|
|
251
|
+
URL to `check_url_valid()` and report it.
|
|
252
|
+
|
|
253
|
+
Changes: [links rule](../wiki/components/rule-links.md)
|
|
254
|
+
|
|
255
|
+
### links-rule-cleanup
|
|
256
|
+
|
|
257
|
+
Tidy `links.py`: fold its four per-kind loops into one, and rename
|
|
258
|
+
`_has_checkable_scheme`, which returns true when there is no scheme.
|
|
259
|
+
|
|
260
|
+
Changes: [links rule](../wiki/components/rule-links.md)
|
|
261
|
+
|
|
262
|
+
### links-timeout
|
|
263
|
+
|
|
264
|
+
Give `links.timeout` a default, so an unresponsive host cannot stall a
|
|
265
|
+
run, and reject 0 or a negative value, which passes configuration checks
|
|
266
|
+
and then stops the run.
|
|
267
|
+
|
|
268
|
+
Changes: [links rule](../wiki/components/rule-links.md)
|
|
269
|
+
|
|
270
|
+
### load-empty-text
|
|
271
|
+
|
|
272
|
+
Let `Document.load(text="")` load an empty document, as an empty file
|
|
273
|
+
does, instead of raising `ValueError`.
|
|
274
|
+
|
|
275
|
+
Changes: [markdown parser](../wiki/components/markdown-parser.md)
|
|
276
|
+
|
|
277
|
+
### markdown-schema-duplicate-keys
|
|
278
|
+
|
|
279
|
+
Reject duplicate keys in a markdown schema file, as the frontmatter
|
|
280
|
+
schema does; today the last one silently wins.
|
|
281
|
+
|
|
282
|
+
Changes: [markdown schema validator](../wiki/components/markdown-schema-validator.md)
|
|
283
|
+
|
|
284
|
+
### negative-maximum-length
|
|
285
|
+
|
|
286
|
+
Reject a negative or zero `line_length.maximum_length`; a negative value
|
|
287
|
+
reports every line at negative offsets.
|
|
288
|
+
|
|
289
|
+
Changes: [line_length rule](../wiki/components/rule-line-length.md)
|
|
290
|
+
|
|
291
|
+
### null-rule-config-message
|
|
292
|
+
|
|
293
|
+
Name the missing required key when a rule block is empty
|
|
294
|
+
(`line_length:` with nothing under it), the likeliest way a required
|
|
295
|
+
key is omitted.
|
|
296
|
+
|
|
297
|
+
Changes: [linter engine](../wiki/components/linter-engine.md)
|
|
298
|
+
|
|
299
|
+
### parser-sanitization-audit
|
|
300
|
+
|
|
301
|
+
Audit every extractor for regex backtracking and sanitize-chain gaps,
|
|
302
|
+
with timing thresholds. `ExtendedAutolink` is already known to be
|
|
303
|
+
quadratic on long whitespace-free runs.
|
|
304
|
+
|
|
305
|
+
Changes: [markdown parser](../wiki/components/markdown-parser.md), [autolinks](../wiki/components/autolinks.md)
|
|
306
|
+
|
|
307
|
+
### preamble-sections
|
|
308
|
+
|
|
309
|
+
Make text before the first heading part of the document's sections, so
|
|
310
|
+
links and elements there are extracted and checked.
|
|
311
|
+
|
|
312
|
+
Changes: [markdown parser](../wiki/components/markdown-parser.md)
|
|
313
|
+
|
|
314
|
+
- The code is wrong, not the documentation.
|
|
315
|
+
|
|
316
|
+
### pypi-org-transfer
|
|
317
|
+
|
|
318
|
+
Transfer the `tiredize` project on pypi.org and test.pypi.org from the
|
|
319
|
+
personal `daemorgue` account to the `tired-labs` organization once PyPI
|
|
320
|
+
approves the organization requests on each.
|
|
321
|
+
|
|
322
|
+
Changes: [releasing](../wiki/operations/releasing.md)
|
|
323
|
+
|
|
324
|
+
### python-310-ci
|
|
325
|
+
|
|
326
|
+
Test the declared minimum, Python 3.10, in CI; no workflow runs it.
|
|
327
|
+
|
|
328
|
+
Changes: [CI](../wiki/practices/ci.md), [installing and running](../wiki/operations/installing-and-running.md)
|
|
329
|
+
|
|
330
|
+
### relative-url-prefix-handling
|
|
331
|
+
|
|
332
|
+
Resolve relative link targets without a leading `.` (`sibling.md`) as
|
|
333
|
+
local files instead of HTTP requests. Once done, dotclaude's rule that
|
|
334
|
+
wiki links start with `./` can be dropped.
|
|
335
|
+
|
|
336
|
+
Changes: [linter engine](../wiki/components/linter-engine.md), [links rule](../wiki/components/rule-links.md)
|
|
337
|
+
|
|
338
|
+
### repeat-min-null
|
|
339
|
+
|
|
340
|
+
Reject `repeat: {min: null}`, which silently makes the entry non-
|
|
341
|
+
repeating and ignores `max`.
|
|
342
|
+
|
|
343
|
+
Changes: [markdown schema validator](../wiki/components/markdown-schema-validator.md)
|
|
344
|
+
|
|
345
|
+
### repeat-required-false
|
|
346
|
+
|
|
347
|
+
Make `required: false` on a repeating schema entry mean it may be
|
|
348
|
+
absent, as `repeat: {min: 0}` does now.
|
|
349
|
+
|
|
350
|
+
Changes: [markdown schema validator](../wiki/components/markdown-schema-validator.md)
|
|
351
|
+
|
|
352
|
+
- `required: false` should mean a minimum of 0.
|
|
353
|
+
|
|
354
|
+
### rule-allowed-true-noop
|
|
355
|
+
|
|
356
|
+
Decide whether `allowed: true` on `tabs` and `trailing_whitespace`, and
|
|
357
|
+
on `unicode` with no `exclude`, should be allowed: each leaves an
|
|
358
|
+
enabled rule checking nothing.
|
|
359
|
+
|
|
360
|
+
Changes: [tabs rule](../wiki/components/rule-tabs.md), [trailing_whitespace rule](../wiki/components/rule-trailing-whitespace.md), [unicode rule](../wiki/components/rule-unicode.md)
|
|
361
|
+
|
|
362
|
+
### rule-convention-enforcement
|
|
363
|
+
|
|
364
|
+
Enforce the rule module convention at discovery: a custom rule that
|
|
365
|
+
skips `validate_config()` loads fine, and `test_loader.py` demands at
|
|
366
|
+
least one key although a keyless rule is allowed.
|
|
367
|
+
|
|
368
|
+
Changes: [linter engine](../wiki/components/linter-engine.md)
|
|
369
|
+
|
|
370
|
+
### schema-child-elements
|
|
371
|
+
|
|
372
|
+
Let a schema require content inside a section, such as a table or a
|
|
373
|
+
list. Checking values inside that content stays out of scope.
|
|
374
|
+
|
|
375
|
+
Changes: [markdown schema validator](../wiki/components/markdown-schema-validator.md), [scope](../wiki/overview/scope.md)
|
|
376
|
+
|
|
377
|
+
### schema-empty-name
|
|
378
|
+
|
|
379
|
+
Reject `name: ""` in a markdown schema, which is accepted and renders as
|
|
380
|
+
`'None'` in messages.
|
|
381
|
+
|
|
382
|
+
Changes: [markdown schema validator](../wiki/components/markdown-schema-validator.md)
|
|
383
|
+
|
|
384
|
+
### schema-nonstring-key-crash
|
|
385
|
+
|
|
386
|
+
Report an unknown schema key that YAML reads as a non-string (`1: x`) as
|
|
387
|
+
a schema error; both schema loaders raise `TypeError` today, which the
|
|
388
|
+
CLI does not catch.
|
|
389
|
+
|
|
390
|
+
Changes: [markdown schema validator](../wiki/components/markdown-schema-validator.md), [frontmatter schema validator](../wiki/components/frontmatter-schema-validator.md)
|
|
391
|
+
|
|
392
|
+
### schema-out-of-order-findings
|
|
393
|
+
|
|
394
|
+
Make out-of-order findings consistent: a non-repeating section reported
|
|
395
|
+
`out_of_order` is never level-checked, and a skipped optional entry
|
|
396
|
+
whose section appears later reports `unexpected_section` instead of
|
|
397
|
+
`out_of_order`.
|
|
398
|
+
|
|
399
|
+
Changes: [markdown schema validator](../wiki/components/markdown-schema-validator.md)
|
|
400
|
+
|
|
401
|
+
### stale-context-references
|
|
402
|
+
|
|
403
|
+
Update code and test comments that point at removed `.context/issues/`
|
|
404
|
+
and `.context/specifications/` files, so they point at the wiki or say
|
|
405
|
+
what they mean without a reference.
|
|
406
|
+
|
|
407
|
+
Changes: [testing](../wiki/practices/testing.md)
|
|
408
|
+
|
|
409
|
+
### test-suite-audit
|
|
410
|
+
|
|
411
|
+
Review the whole test suite (1,128 tests) for tests that only check a
|
|
412
|
+
one-time change, such as a file deleted, a value set or a structure
|
|
413
|
+
built, rather than behavior that can regress, and remove them. Found on
|
|
414
|
+
`pypi-release`, where 29 of 40 acceptance tests were of this kind.
|
|
415
|
+
|
|
416
|
+
Changes: [testing](../wiki/practices/testing.md)
|
|
417
|
+
|
|
418
|
+
### test-file-layout
|
|
419
|
+
|
|
420
|
+
Rename the test files that break dotclaude's one-test-file-per-module
|
|
421
|
+
rule, or record an override.
|
|
422
|
+
|
|
423
|
+
Changes: [repository layout](../wiki/repository/layout.md)
|
|
424
|
+
|
|
425
|
+
### tooling-migration
|
|
426
|
+
|
|
427
|
+
Evaluate Ruff in place of flake8, declare development dependencies in
|
|
428
|
+
`pyproject.toml` (`.[dev]`), and finish the import-grouping comments in
|
|
429
|
+
the seven test files that lack them.
|
|
430
|
+
|
|
431
|
+
Changes: [CI](../wiki/practices/ci.md), [testing](../wiki/practices/testing.md)
|
|
432
|
+
|
|
433
|
+
### unicode-bom
|
|
434
|
+
|
|
435
|
+
Stop the `unicode` rule reporting a UTF-8 byte-order mark.
|
|
436
|
+
|
|
437
|
+
Changes: [unicode rule](../wiki/components/rule-unicode.md)
|
|
438
|
+
|
|
439
|
+
### user-doc-wording
|
|
440
|
+
|
|
441
|
+
Correct the README's "regex-based parser" claim and the history wording
|
|
442
|
+
("no longer", "now") in its `links` section, and the stale header
|
|
443
|
+
comment in `tests/markdown/types/test_link_gfm_autolinks.py`.
|
|
444
|
+
|
|
445
|
+
Changes: [README](../../README.md)
|
|
446
|
+
|
|
447
|
+
### venv-path-for-tests
|
|
448
|
+
|
|
449
|
+
The local test command (`.venv/bin/pytest`, and the pre-commit hook's
|
|
450
|
+
`.venv/bin/python -m pytest`) does not put `.venv/bin` on PATH, so a
|
|
451
|
+
test that finds the `tiredize` console script with `shutil.which` can
|
|
452
|
+
pick up an unrelated install elsewhere on PATH. Run tests in an
|
|
453
|
+
activated venv, or have such tests look beside `sys.executable`.
|
|
454
|
+
Raised by the software-engineer on `pypi-release`.
|
|
455
|
+
|
|
456
|
+
Changes: [testing](../wiki/practices/testing.md)
|
|
457
|
+
|
|
458
|
+
### specifications-knowledge-mapping
|
|
459
|
+
|
|
460
|
+
`AGENTS.md` maps a `specifications` knowledge file to the
|
|
461
|
+
technical-reference and architecture-review steps, but dotclaude has no
|
|
462
|
+
`knowledge/specifications.md`. Create it or drop the mapping. Raised by
|
|
463
|
+
the technical-architect on `pypi-release`.
|
|
464
|
+
|
|
465
|
+
Changes: `AGENTS.md`
|
|
466
|
+
|
|
467
|
+
### readme-style-pass
|
|
468
|
+
|
|
469
|
+
The README predates the markdown-style rules: most prose paragraphs
|
|
470
|
+
wrap near 72 columns instead of filling to 79, and it uses em dashes
|
|
471
|
+
and `--` separators. Bring the whole file into line in one pass.
|
|
472
|
+
Raised by the proofreader on `pypi-release`.
|
|
473
|
+
|
|
474
|
+
Changes: [README](../../README.md)
|
|
475
|
+
|
|
476
|
+
### documentation-review-knowledge
|
|
477
|
+
|
|
478
|
+
The documentation-review step names markdown-style and
|
|
479
|
+
ai-prose-hygiene as its mapped knowledge, but tiredize's `AGENTS.md`
|
|
480
|
+
maps nothing to `user-documentation` or `documentation-review`, so the
|
|
481
|
+
lens comes only from the step file's Inputs line. Add the mapping or
|
|
482
|
+
make the step file state its default knowledge. Raised by the
|
|
483
|
+
proofreader on `pypi-release`.
|
|
484
|
+
|
|
485
|
+
Changes: `AGENTS.md`
|
|
486
|
+
|
|
487
|
+
### fill-rule-code-spans
|
|
488
|
+
|
|
489
|
+
dotclaude's markdown-style "fill to 79" rule does not say whether a
|
|
490
|
+
line may break early to keep an inline code span whole. Settle it in
|
|
491
|
+
the knowledge file. Raised by the proofreader on `pypi-release`.
|
|
492
|
+
|
|
493
|
+
Changes: dotclaude `knowledge/markdown-style.md`
|
|
494
|
+
|
|
495
|
+
### regression-only-acceptance-tests
|
|
496
|
+
|
|
497
|
+
Put the rule settled on `pypi-release` into dotclaude's
|
|
498
|
+
acceptance-test-design guidance: committed acceptance tests cover only
|
|
499
|
+
behavior that can regress, and one-time criteria get evidence at
|
|
500
|
+
Acceptance Verification. On `pypi-release`, 30 of 40 first-draft tests
|
|
501
|
+
were thrown away. Raised by the workflow-owner.
|
|
502
|
+
|
|
503
|
+
Changes: dotclaude `knowledge/testing.md` or the step 2 file
|
|
504
|
+
|
|
505
|
+
### unexercised-reference-text
|
|
506
|
+
|
|
507
|
+
When a technical reference describes operational behavior nobody has
|
|
508
|
+
run, such as re-runs and approval expiry, step 6 should mark it as
|
|
509
|
+
unexercised and keep it minimal. Speculative recovery text drove most
|
|
510
|
+
of `pypi-release`'s three architecture-review iterations. Raised by
|
|
511
|
+
the workflow-owner.
|
|
512
|
+
|
|
513
|
+
Changes: dotclaude step 6 file
|
|
514
|
+
|
|
515
|
+
### pm-deliverable-edits
|
|
516
|
+
|
|
517
|
+
Say whether the PM may edit a deliverable directly, as it did to a
|
|
518
|
+
wiki sentence on `pypi-release` (0e11632), or must route the edit to
|
|
519
|
+
the producing step; if it may, the next review gate should check the
|
|
520
|
+
edit by name. Raised by the workflow-owner.
|
|
521
|
+
|
|
522
|
+
Changes: dotclaude PM function or workflow overview
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# tiredize Wiki
|
|
2
|
+
|
|
3
|
+
Tiredize is a schema-driven markdown validator and linter. It parses
|
|
4
|
+
markdown into typed elements and checks documents against user-defined
|
|
5
|
+
YAML: a markdown schema for section structure, a frontmatter schema for
|
|
6
|
+
YAML fields, and linter rules for style. It was built for TIRED Labs'
|
|
7
|
+
Technique Research Reports and works for any structured markdown. This
|
|
8
|
+
wiki describes how tiredize works now, why, and how it is changed. The
|
|
9
|
+
user guide is the repository's `README.md`.
|
|
10
|
+
|
|
11
|
+
## Pages
|
|
12
|
+
|
|
13
|
+
- [Glossary](./glossary.md): terms used across the wiki.
|
|
14
|
+
|
|
15
|
+
### Overview
|
|
16
|
+
|
|
17
|
+
- [Scope](./overview/scope.md): the problem, the users, and what each
|
|
18
|
+
kind of check owns.
|
|
19
|
+
|
|
20
|
+
### Repository
|
|
21
|
+
|
|
22
|
+
- [Repository layout](./repository/layout.md): where code, tests,
|
|
23
|
+
configuration and workflows live, and file conventions.
|
|
24
|
+
|
|
25
|
+
### Architecture
|
|
26
|
+
|
|
27
|
+
- [Pipeline](./architecture/pipeline.md): how a run flows through the
|
|
28
|
+
components, the shared result types, and findings versus errors.
|
|
29
|
+
|
|
30
|
+
### Components
|
|
31
|
+
|
|
32
|
+
- [Command-line interface](./components/cli.md): arguments, exit
|
|
33
|
+
status, output streams and processing order.
|
|
34
|
+
- [Markdown parser](./components/markdown-parser.md): the document
|
|
35
|
+
model, element patterns, the sanitize chain and known GFM gaps.
|
|
36
|
+
- [Autolinks](./components/autolinks.md): the GFM autolink rules, the
|
|
37
|
+
readings where GFM is silent, and divergences from `cmark-gfm`.
|
|
38
|
+
- [Linter engine](./components/linter-engine.md): rule discovery,
|
|
39
|
+
configuration validation, the element vocabulary and URL checking.
|
|
40
|
+
- Linter rules, one page each with its configuration contract:
|
|
41
|
+
[elements](./components/rule-elements.md),
|
|
42
|
+
[line_length](./components/rule-line-length.md),
|
|
43
|
+
[links](./components/rule-links.md),
|
|
44
|
+
[tabs](./components/rule-tabs.md),
|
|
45
|
+
[trailing_whitespace](./components/rule-trailing-whitespace.md),
|
|
46
|
+
[unicode](./components/rule-unicode.md).
|
|
47
|
+
- [Markdown schema validator](./components/markdown-schema-validator.md):
|
|
48
|
+
the schema format and the ordered and unordered algorithms.
|
|
49
|
+
- [Frontmatter schema validator](./components/frontmatter-schema-validator.md):
|
|
50
|
+
the frontmatter schema format and its checks.
|
|
51
|
+
|
|
52
|
+
### Operations
|
|
53
|
+
|
|
54
|
+
- [Installing and running](./operations/installing-and-running.md):
|
|
55
|
+
installing, invoking, and gating hooks and CI on the exit status.
|
|
56
|
+
- [Releasing](./operations/releasing.md): versions from git tags, the
|
|
57
|
+
release workflow through TestPyPI to PyPI, and how to cut a release.
|
|
58
|
+
|
|
59
|
+
### Practices
|
|
60
|
+
|
|
61
|
+
- [Testing](./practices/testing.md): how to run the tests and the rules
|
|
62
|
+
every test follows.
|
|
63
|
+
- [Continuous integration](./practices/ci.md): what GitHub Actions runs.
|
|
64
|
+
- [Contributing](./practices/contributing.md): what a pull request needs
|
|
65
|
+
and how it is reviewed.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Pipeline
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
How one run of tiredize flows from the command line to its findings,
|
|
6
|
+
and the types and principles every component shares. Each component's
|
|
7
|
+
own contract is on its page under `components/`.
|
|
8
|
+
|
|
9
|
+
## Data Flow
|
|
10
|
+
|
|
11
|
+
```mermaid
|
|
12
|
+
flowchart LR
|
|
13
|
+
CLI[CLI] -->|path| Parser[Markdown parser]
|
|
14
|
+
Parser -->|Document| Linter[Linter engine and rules]
|
|
15
|
+
Parser -->|Document| MS[Markdown schema validator]
|
|
16
|
+
Parser -->|Document| FS[Frontmatter schema validator]
|
|
17
|
+
Linter -->|findings| CLI
|
|
18
|
+
MS -->|findings| CLI
|
|
19
|
+
FS -->|findings| CLI
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
1. The [CLI](../components/cli.md) takes the paths and up to three
|
|
23
|
+
configuration files, one per check.
|
|
24
|
+
2. For each path, the [markdown parser](../components/markdown-parser.md)
|
|
25
|
+
builds a `Document`: frontmatter, sections and the elements in each.
|
|
26
|
+
3. The [linter engine](../components/linter-engine.md) runs the enabled
|
|
27
|
+
[rules](../components/linter-engine.md); the [markdown schema
|
|
28
|
+
validator](../components/markdown-schema-validator.md) checks the
|
|
29
|
+
section tree; the [frontmatter schema
|
|
30
|
+
validator](../components/frontmatter-schema-validator.md) checks the
|
|
31
|
+
frontmatter. Each runs only when its flag was given a non-empty
|
|
32
|
+
value (see [CLI](../components/cli.md)).
|
|
33
|
+
4. The CLI prints each path's findings and returns the exit status.
|
|
34
|
+
|
|
35
|
+
The checks never call each other. They share only the parsed
|
|
36
|
+
`Document` and the result types below.
|
|
37
|
+
|
|
38
|
+
## Shared Types
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
# tiredize/core_types.py
|
|
42
|
+
@dataclass(frozen=True)
|
|
43
|
+
class Position:
|
|
44
|
+
offset: int # character index from the start of the document
|
|
45
|
+
length: int # characters the finding covers, starting at offset
|
|
46
|
+
|
|
47
|
+
@dataclass(frozen=False)
|
|
48
|
+
class RuleResult:
|
|
49
|
+
position: Position
|
|
50
|
+
rule_id: str | None
|
|
51
|
+
message: str
|
|
52
|
+
|
|
53
|
+
class RuleNotFoundError(Exception): ...
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Every check reports a finding as a `RuleResult`. Offsets count
|
|
57
|
+
characters from the start of the file, frontmatter included, so the CLI
|
|
58
|
+
can turn any finding into a line and column with
|
|
59
|
+
`Document.line_col()`. The CLI prints only the start of a finding;
|
|
60
|
+
`length` is for Python callers.
|
|
61
|
+
|
|
62
|
+
Linter findings carry the rule id (`line_length`); validator findings
|
|
63
|
+
carry a dotted id (`schema.markdown.missing_section`,
|
|
64
|
+
`schema.frontmatter.wrong_type`). `rule_id` is `None` only on a result
|
|
65
|
+
a rule function returns: rules leave it unset and the [linter
|
|
66
|
+
engine](../components/linter-engine.md) stamps the rule id on every
|
|
67
|
+
result before returning it, so every finding the CLI prints has one.
|
|
68
|
+
|
|
69
|
+
## Findings and Errors
|
|
70
|
+
|
|
71
|
+
Across every component, a problem in the **document** is a finding and
|
|
72
|
+
a problem in the **configuration** is an error. A bad rules file, an
|
|
73
|
+
invalid schema, an unknown rule or an ambiguous schema raises, and the
|
|
74
|
+
CLI stops the run (see [CLI](../components/cli.md)). Two configuration
|
|
75
|
+
mistakes do not raise: an empty rules file enables no rule, and a flag
|
|
76
|
+
given an empty value skips its check; both are open questions on the
|
|
77
|
+
[CLI](../components/cli.md) page.
|
|
78
|
+
|
|
79
|
+
## Design Decisions
|
|
80
|
+
|
|
81
|
+
- **Configuration mistakes fail loudly.** A typo that switched a check
|
|
82
|
+
off while the run exited clean would be worse than no check, because
|
|
83
|
+
it looks like a pass. This is why rule configuration, both schema
|
|
84
|
+
loaders and the CLI all treat a configuration fault as an error.
|
|
85
|
+
- **Errors abort, findings continue.** One rule for the whole run, so
|
|
86
|
+
the exit status can be stated in one sentence; the trade-off is on
|
|
87
|
+
the [CLI](../components/cli.md) page.
|
|
88
|
+
- **One parse, many checks.** Every check reads the same `Document`, so
|
|
89
|
+
a parser fix reaches every check at once and no check re-parses
|
|
90
|
+
markdown.
|