red-methodology 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.
@@ -0,0 +1,21 @@
1
+ node_modules/
2
+ dist/
3
+ build/
4
+ *.egg-info/
5
+ __pycache__/
6
+ *.py[cod]
7
+ .pytest_cache/
8
+ .coverage
9
+ .venv/
10
+ cli/node/bundled/
11
+ cli/python/src/red_cli/bundled/
12
+ cli/node/LICENSE
13
+ cli/node/NOTICE
14
+ cli/python/LICENSE
15
+ cli/python/NOTICE
16
+ .tmp/
17
+ /.agents/
18
+
19
+ # This repository keeps its RED working state local.
20
+ /research/
21
+ /evolve/
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 exoticknight
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,2 @@
1
+ RED
2
+ Copyright 2026 exoticknight
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.5
2
+ Name: red-methodology
3
+ Version: 0.1.0
4
+ Summary: Deterministic project operations for the RED methodology
5
+ Project-URL: Homepage, https://github.com/exoticknight/red
6
+ Project-URL: Repository, https://github.com/exoticknight/red
7
+ Project-URL: Issues, https://github.com/exoticknight/red/issues
8
+ Author: exoticknight
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ License-File: NOTICE
12
+ Keywords: agent,ai,documentation,methodology,red
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Requires-Python: >=3.11
20
+ Requires-Dist: jsonschema<5,>=4.25
21
+ Description-Content-Type: text/markdown
22
+
23
+ # RED CLI for Python
24
+
25
+ This package is the Python distribution of the RED methodology CLI. It provides deterministic project initialization, artifact creation and promotion, structural validation, Skill lifecycle management, and lightweight instruction export.
26
+
27
+ ```sh
28
+ pipx run --spec red-methodology red version
29
+ pipx run --spec red-methodology red skill install --scope repo
30
+ pipx run --spec red-methodology red init
31
+ pipx run --spec red-methodology red check --json
32
+ ```
33
+
34
+ The CLI handles deterministic project files and validation. A human or project-authorized process decides when Research enters Evolve and when Evolve enters Document; promotion flags record that decision.
35
+
36
+ The Node distribution exposes the same command contract. See the [CLI specification](https://github.com/exoticknight/red/blob/main/spec/cli-interface.md).
@@ -0,0 +1,14 @@
1
+ # RED CLI for Python
2
+
3
+ This package is the Python distribution of the RED methodology CLI. It provides deterministic project initialization, artifact creation and promotion, structural validation, Skill lifecycle management, and lightweight instruction export.
4
+
5
+ ```sh
6
+ pipx run --spec red-methodology red version
7
+ pipx run --spec red-methodology red skill install --scope repo
8
+ pipx run --spec red-methodology red init
9
+ pipx run --spec red-methodology red check --json
10
+ ```
11
+
12
+ The CLI handles deterministic project files and validation. A human or project-authorized process decides when Research enters Evolve and when Evolve enters Document; promotion flags record that decision.
13
+
14
+ The Node distribution exposes the same command contract. See the [CLI specification](https://github.com/exoticknight/red/blob/main/spec/cli-interface.md).
@@ -0,0 +1,36 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27,<2"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "red-methodology"
7
+ version = "0.1.0"
8
+ description = "Deterministic project operations for the RED methodology"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "Apache-2.0"
12
+ authors = [{ name = "exoticknight" }]
13
+ dependencies = ["jsonschema>=4.25,<5"]
14
+ keywords = ["ai", "agent", "documentation", "methodology", "red"]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "License :: OSI Approved :: Apache Software License",
18
+ "Programming Language :: Python :: 3 :: Only",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ ]
23
+
24
+ [project.urls]
25
+ Homepage = "https://github.com/exoticknight/red"
26
+ Repository = "https://github.com/exoticknight/red"
27
+ Issues = "https://github.com/exoticknight/red/issues"
28
+
29
+ [project.scripts]
30
+ red = "red_cli.cli:main"
31
+
32
+ [tool.hatch.build.targets.wheel]
33
+ packages = ["src/red_cli"]
34
+
35
+ [tool.hatch.build.targets.sdist]
36
+ include = ["src/red_cli", "README.md", "LICENSE", "NOTICE"]
@@ -0,0 +1,4 @@
1
+ """RED methodology command-line interface."""
2
+
3
+ __version__ = "0.1.0"
4
+ PROTOCOL_VERSION = 1
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/exoticknight/red/blob/main/spec/artifact-schema.json",
4
+ "title": "RED Protocol 1 artifact metadata",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["id", "state", "status", "title", "created"],
8
+ "properties": {
9
+ "id": { "type": "string" },
10
+ "state": { "enum": ["research", "evolve"] },
11
+ "status": { "enum": ["open", "closed", "accepted", "rejected"] },
12
+ "title": { "type": "string", "minLength": 1 },
13
+ "created": {
14
+ "type": "string",
15
+ "format": "date",
16
+ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-([0-2][0-9]|3[01])$"
17
+ },
18
+ "based_on": {
19
+ "type": "array",
20
+ "uniqueItems": true,
21
+ "items": { "type": "string", "pattern": "^[RE]-(?:[1-9][0-9]*|0[0-9]{3})$" }
22
+ },
23
+ "document_paths": {
24
+ "type": "array",
25
+ "minItems": 1,
26
+ "uniqueItems": true,
27
+ "items": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "allOf": [
31
+ { "not": { "pattern": "^(?:[A-Za-z]:|/|\\\\)" } },
32
+ { "not": { "pattern": "(^|[\\\\/])\\.\\.([\\\\/]|$)" } }
33
+ ]
34
+ }
35
+ },
36
+ "verified": { "type": "boolean" }
37
+ },
38
+ "allOf": [
39
+ {
40
+ "if": { "properties": { "state": { "const": "research" } }, "required": ["state"] },
41
+ "then": {
42
+ "properties": {
43
+ "id": { "type": "string", "pattern": "^R-(?:[1-9][0-9]*|0[0-9]{3})$" },
44
+ "status": { "enum": ["open", "closed"] }
45
+ }
46
+ }
47
+ },
48
+ {
49
+ "if": { "properties": { "state": { "const": "evolve" } }, "required": ["state"] },
50
+ "then": { "properties": { "id": { "type": "string", "pattern": "^E-(?:[1-9][0-9]*|0[0-9]{3})$" } } }
51
+ },
52
+ {
53
+ "if": { "properties": { "status": { "const": "accepted" } }, "required": ["status"] },
54
+ "then": {
55
+ "required": ["document_paths", "verified"],
56
+ "properties": { "verified": { "const": true } }
57
+ }
58
+ }
59
+ ]
60
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/exoticknight/red/blob/main/spec/config-schema.json",
4
+ "title": "RED Protocol 1 configuration",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["version", "document", "research", "evolve", "policy"],
8
+ "properties": {
9
+ "version": {
10
+ "type": "integer",
11
+ "minimum": 1,
12
+ "maximum": 9007199254740991
13
+ },
14
+ "document": { "$ref": "#/$defs/document" },
15
+ "research": { "$ref": "#/$defs/artifactDirectory" },
16
+ "evolve": { "$ref": "#/$defs/artifactDirectory" },
17
+ "policy": { "$ref": "#/$defs/policy" }
18
+ },
19
+ "$defs": {
20
+ "relativePath": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "allOf": [
24
+ { "not": { "pattern": "^(?:[A-Za-z]:|/|\\\\)" } },
25
+ { "not": { "pattern": "(^|[\\\\/])\\.\\.([\\\\/]|$)" } }
26
+ ]
27
+ },
28
+ "document": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["paths"],
32
+ "properties": {
33
+ "paths": {
34
+ "type": "array",
35
+ "minItems": 1,
36
+ "uniqueItems": true,
37
+ "items": { "$ref": "#/$defs/relativePath" }
38
+ }
39
+ }
40
+ },
41
+ "artifactDirectory": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": ["path"],
45
+ "properties": { "path": { "$ref": "#/$defs/relativePath" } }
46
+ },
47
+ "policy": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["document_requires_approval", "report_document_implementation_conflicts"],
51
+ "properties": {
52
+ "document_requires_approval": { "type": "boolean" },
53
+ "report_document_implementation_conflicts": { "type": "boolean" }
54
+ }
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: red
3
+ description: Manage project knowledge and engineering changes with Research, Evolve, and Document. Use when the user requests RED, or when a repository declares RED through red.toml, RED.md, or AGENTS.md. Do not impose RED on undeclared projects.
4
+ metadata:
5
+ red-protocol: "1"
6
+ ---
7
+
8
+ # RED
9
+
10
+ Keep accepted knowledge, unresolved research, and ongoing change distinct.
11
+
12
+ ## Knowledge and authority
13
+
14
+ - Document is the normative baseline for people and agents using, maintaining, or changing the project. Organize accepted knowledge and necessary rationale around their tasks; keep R/E record references, provenance, and work history on the R/E side. Use the Document writing guidance in `references/artifacts.md` when drafting or updating it.
15
+ - Research holds unverified evidence, claims, and questions. Evolve holds proposed or ongoing change and unresolved alternatives.
16
+ - Code, tests, configuration, and runtime output are implementation evidence. Investigate and report conflicts with Document before choosing a side.
17
+ - At an R/E boundary, present the reviewable result and wait for a separately authorized transition. A broad earlier request does not supply that decision. Update Document only after acceptance.
18
+ - Preserve existing documentation structure and project storage/version-control policy. Keep small, resolved work in the task; persist consequential or shared work using the criteria in `references/work.md`.
19
+
20
+ ## Load context on demand
21
+
22
+ 1. Follow applicable repository instructions. Read `red.toml` when present; otherwise locate likely Document sources. Create configuration only for requested adoption or deterministic operations needing a mapping.
23
+ 2. Read the reference for the current route below. Load additional references only when their operation becomes necessary; links are lookup targets, not a recursive reading list.
24
+ 3. Find relevant Document sections, active E items, R evidence, and implementation with filenames, headings, or scoped search before reading bodies. Widen the search when dependencies or conflicts require it.
25
+ 4. Reuse instructions and evidence already available in context. Re-read changed sections, or missing material after compaction, rather than restarting discovery each turn. Keep tool output focused on relevant excerpts and results.
26
+
27
+ ## Routes
28
+
29
+ - Engineering work and E maintenance: [work.md](references/work.md).
30
+ - First-time or brownfield adoption: [adopt.md](references/adopt.md).
31
+ - Project health checks: [inspect.md](references/inspect.md).
32
+ - Creating/promoting artifacts or drafting/updating Document: [artifacts.md](references/artifacts.md).
33
+ - Using, enabling, or falling back from the CLI: [cli.md](references/cli.md).
34
+ - Unclear state semantics: [protocol.md](references/protocol.md); unfamiliar routing cases: [scenarios.md](references/scenarios.md).
35
+
36
+ ## Finish
37
+
38
+ Reconcile active E with current decisions, evidence, remaining work, and open alternatives. Report verification, conflicts, and unknowns; apply the transition boundary above. Run `red check --json` when the CLI is available, and state when it could not run.
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "RED"
3
+ short_description: "Manage project knowledge through RED states"
4
+ default_prompt: "Use $red to handle this project task with the RED methodology."
5
+
6
+ policy:
7
+ allow_implicit_invocation: true
@@ -0,0 +1,5 @@
1
+ <!-- red:start protocol=1 -->
2
+ ## RED workflow
3
+
4
+ Use Research for unresolved evidence and questions, Evolve for proposed or ongoing changes, and Document for accepted project knowledge. A clear change may enter Evolve directly. After Research, report findings and wait for explicit authority before Evolve. After Evolve passes verification, report evidence and proposed Document changes, then wait for separate acceptance before updating Document. Do not treat Research as a requirement or silently resolve open Evolve alternatives. Follow the project's version-control policy for Research and Evolve; RED does not choose one. Report conflicts between Document and implementation evidence.
5
+ <!-- red:end -->
@@ -0,0 +1,33 @@
1
+ # RED Agent Instructions
2
+
3
+ This project uses RED Protocol 1 to separate unresolved research, ongoing change, and accepted project knowledge.
4
+
5
+ ## Knowledge states
6
+
7
+ ### Research
8
+
9
+ Research contains unresolved questions, evidence, hypotheses, experiments, and conflicting claims. Do not treat it as accepted requirements.
10
+
11
+ ### Evolve
12
+
13
+ Evolve contains proposed or active changes, their rationale, affected areas, acceptance conditions, and open questions. Preserve unresolved alternatives until the user or project policy decides them.
14
+
15
+ ### Document
16
+
17
+ Document contains accepted project goals, terminology, interfaces, architecture rules, operating instructions, and contribution rules. Treat it as the normative baseline.
18
+
19
+ Code, tests, configuration, and runtime output provide implementation evidence. Report conflicts with Document and investigate them through Research. A resulting decision may repair the implementation or create an Evolve item that changes Document.
20
+
21
+ ## Workflow
22
+
23
+ 1. Read repository instructions and `red.toml` when present.
24
+ 2. Load only the Document, active Evolve, Research, and implementation evidence relevant to the task.
25
+ 3. Implement directly when accepted knowledge specifies the work.
26
+ 4. Use Research when an unknown can change the decision. Report findings and wait for explicit authority before entering Evolve.
27
+ 5. Use Evolve when the task changes accepted behavior, data, public interfaces, architecture, or engineering rules. A clear change may enter Evolve directly.
28
+ 6. Design, implement, test, and revise inside the authorized Evolve scope.
29
+ 7. When acceptance conditions pass, report evidence and proposed Document changes. Wait for separate acceptance before updating Document.
30
+ 8. Persist R or E when work crosses tasks, needs review, presents alternatives, or leaves an unresolved conflict.
31
+ 9. Run `red check --json` when the CLI is available.
32
+
33
+ Prefer the RED CLI for deterministic operations. If it is unavailable, follow the same protocol by hand. CLI promotion records a decision supplied by the user or project; it does not authorize the transition. Follow the project's version-control policy for Research and Evolve; RED does not require tracked files, local files, or an external tracker. Do not reorganize existing documentation or install tools globally without authorization.
@@ -0,0 +1,14 @@
1
+ version = 1
2
+
3
+ [document]
4
+ paths = ["README.md", "docs/**"]
5
+
6
+ [research]
7
+ path = "research"
8
+
9
+ [evolve]
10
+ path = "evolve"
11
+
12
+ [policy]
13
+ document_requires_approval = true
14
+ report_document_implementation_conflicts = true
@@ -0,0 +1,15 @@
1
+ # Adopt RED
2
+
3
+ Adopt RED without reorganizing the repository.
4
+
5
+ 1. Inventory existing README files, maintained docs, ADRs, proposals, investigations, issues, and contribution rules.
6
+ 2. Propose a mapping for Document, Evolve, and Research. Explain ambiguous locations.
7
+ 3. Prefer the RED CLI. Run `red init` only after the task authorizes project setup.
8
+ 4. Edit the generated `red.toml` to reflect the accepted mapping.
9
+ 5. Run `red check --json`.
10
+
11
+ Do not migrate old documents or reconstruct historical decisions. Classify current sources and use RED for work from this point forward.
12
+
13
+ Choose whether the project tracks Research and Evolve files, keeps them local, or uses its issue or pull-request system. Record the choice in repository guidance or ignore rules; RED supplies no default.
14
+
15
+ For agents without Skill support, use `red instructions install --target AGENTS.md` or `red instructions export --output RED.md`.
@@ -0,0 +1,69 @@
1
+ # RED artifacts
2
+
3
+ Use UTF-8 Markdown with TOML front matter delimited by `+++` for Research and Evolve artifacts. Document follows the project's documentation format and the writing guidance below.
4
+
5
+ ## Research
6
+
7
+ ```md
8
+ +++
9
+ id = "R-1"
10
+ state = "research"
11
+ status = "open"
12
+ title = "Tag semantics"
13
+ created = "2026-09-05"
14
+ +++
15
+
16
+ # R-1: Tag semantics
17
+
18
+ ## Question
19
+
20
+ ## Evidence
21
+
22
+ ## Unknowns
23
+ ```
24
+
25
+ ## Evolve
26
+
27
+ ```md
28
+ +++
29
+ id = "E-1"
30
+ state = "evolve"
31
+ status = "open"
32
+ title = "Add tags"
33
+ created = "2026-09-05"
34
+ based_on = ["R-1"]
35
+ +++
36
+
37
+ # E-1: Add tags
38
+
39
+ ## Change
40
+
41
+ ## Rationale
42
+
43
+ ## Acceptance
44
+
45
+ ## Open questions
46
+ ```
47
+
48
+ Create new artifacts with sequential positive integers without leading zeros within each state. Identifiers have no fixed digit width. Accept legacy four-digit, zero-padded identifiers when reading an existing project, and count them during allocation. Filenames start with the identifier and a readable slug. Keep source artifacts in the working environment while their history remains useful.
49
+
50
+ Version control is project policy. Inspect repository guidance and ignore rules before staging Research or Evolve. A project may track the files, keep them local, or represent shared work in issues or pull requests.
51
+
52
+ The CLI may validate promotion readiness and record an accepted decision. The agent presents Research findings before Research-to-Evolve promotion and presents Evolve evidence plus proposed Document changes before Evolve-to-Document promotion. It must not invent agreement or rewrite Document content without an authorized decision.
53
+
54
+ ## Write Document for its readers
55
+
56
+ Document serves people and agents who need accepted project knowledge while using a feature, implementing a change, reviewing behavior, or diagnosing a problem. Assume they arrive through a search or a direct link without the originating conversation.
57
+
58
+ Before writing, identify the intended reader, the situation that brings them here, and the question or action the page should support. Use those answers to choose the scope and presentation: procedures for performing tasks, contracts and examples for implementing against interfaces, or boundaries and rationale for making design decisions. Fit the existing documentation structure; these are choices, not mandatory sections.
59
+
60
+ When drafting proposed Document content or applying an accepted change:
61
+
62
+ 1. Lead with the answer the reader needs. Extract the accepted definitions, behavior, rules, boundaries, and necessary rationale, and state them directly. Use descriptive headings and concrete examples where they help the reader act. Update the relevant explanation in place when behavior changes.
63
+ 2. Keep working history and unresolved alternatives in R/E. Remove R/E record identifiers, links, citations, provenance footnotes, and narratives about how those records produced the result. This includes optional history or source links. Record any traceability from R/E to the relevant Document paths instead.
64
+ 3. Omit authoring dates, last-updated stamps, implementation commit hashes, completion reports, and verification logs from ordinary knowledge pages. Keep delivery evidence in E or version-control history. Include a date, version, or revision only when it changes how the reader interprets or uses the content, or a project-required document format calls for it; explain its role. Examples include an effective date, a supported version range, or an exact revision required for a reproducible procedure. Preserve purposeful metadata in established ADR, release, or audit formats without spreading that format to other pages.
65
+ 4. Review the page as its intended reader with R/E, task history, and commit history unavailable. Can they find the answer, understand its scope and rationale, and take the intended action? Remove metadata that does not help those tasks. Fill gaps from accepted knowledge; if a gap needs a new decision, keep it open in E and obtain that decision before presenting it as accepted content.
66
+
67
+ For example, replace “Implemented retry handling in commit abc123 on 2026-09-11; verification passed” with the accepted contract: “Transient failures are retried up to three times. Authentication failures return immediately.” Add the rationale or usage detail the reader needs. Keep a migration deadline when it determines when the reader must act.
68
+
69
+ Completion requires both independent readability and absence of references to R/E working records. Existing Document-to-Document organization may be preserved. A document whose subject is RED may explain Research and Evolve as concepts; that does not make a particular working record part of Document.