|
1 | 1 | # Contributing to Codifide |
2 | 2 |
|
3 | | -Codifide is MIT licensed and accepts contributions. This document covers the practical steps. |
4 | | - |
5 | | -For the full governance model — stewardship, spec-change process, personas, forks — see `GOVERNANCE.md`. |
| 3 | +Codifide is MIT licensed and welcomes contributions. This document covers |
| 4 | +the practical steps. For the full governance model — stewardship, spec-change |
| 5 | +process, personas, forks — see `GOVERNANCE.md`. |
6 | 6 |
|
7 | 7 | ## Before you start |
8 | 8 |
|
9 | 9 | - Read `README.md` and `GETTING_STARTED.md` to understand the project. |
10 | 10 | - If you are an AI agent, start with `docs/FOR_AGENTS.md` and `docs/AGENT_QUICKREF.md`. |
11 | 11 | - Run the test suite to confirm your environment is clean: |
12 | 12 | ```bash |
13 | | - python3 -m codifide test |
| 13 | + pip install -e . |
| 14 | + python3 -m pytest tests/ -q |
14 | 15 | ``` |
15 | | - All 289 tests should pass. |
| 16 | + All 450 tests should pass, 0 skipped. |
16 | 17 |
|
17 | 18 | ## Types of contributions |
18 | 19 |
|
19 | 20 | ### Additive contributions (no dispatch required) |
| 21 | + |
20 | 22 | - New example programs in `examples/` |
21 | 23 | - New tests in `tests/` |
22 | | -- Documentation fixes and clarifications that do not amend the spec |
| 24 | +- Documentation fixes that do not amend the spec |
23 | 25 | - Bug fixes that do not change observable language behavior |
24 | 26 |
|
25 | | -These merge on the usual basis: tests pass, code matches the house style, existing examples still run. |
| 27 | +These merge on the usual basis: tests pass, code matches the house style, |
| 28 | +existing examples still run. |
26 | 29 |
|
27 | 30 | ### Language changes (dispatch required) |
28 | | -Any change that affects the capability manifest — new primitives, new AST kinds, new error classes, new effect labels, new surface syntax — requires: |
29 | 31 |
|
30 | | -1. A proposal as a paired Quill readout (`.readout.md`) and Glyph dispatch (`.yaml`) in `dispatches/`. |
31 | | -2. An adversarial Sable audit if the change touches security-adjacent surface (the store, the parser, the effect checker). |
32 | | -3. Approval from Douglas Jones on the spec amendment. |
| 32 | +Any change that affects the capability manifest — new primitives, new AST |
| 33 | +kinds, new error classes, new effect labels, new surface syntax — requires: |
33 | 34 |
|
34 | | -See `GOVERNANCE.md §Decision-making` for the full process. |
| 35 | +1. A G0 problem statement (see `GOVERNANCE.md §Gates`) |
| 36 | +2. A G1 requirements document with acceptance criteria |
| 37 | +3. A paired Quill readout (`.readout.md`) and Glyph dispatch (`.yaml`) in |
| 38 | + `dispatches/` for each significant decision |
| 39 | +4. A Sable adversarial audit if the change touches security-adjacent surface |
| 40 | + (the store, the parser, the effect checker, the RPC server) |
| 41 | +5. All tests passing, 0 skipped |
| 42 | +6. `python3 -m codifide dispatch-check` exits 0 |
| 43 | + |
| 44 | +See `GOVERNANCE.md` for the full seven-gate process. |
35 | 45 |
|
36 | 46 | ### Spec changes |
37 | | -Changes to `docs/CANONICAL.md`, `docs/CAPABILITY.md`, or any other file that defines conforming behavior follow the same process as language changes above. |
| 47 | + |
| 48 | +Changes to `docs/CANONICAL.md`, `docs/CAPABILITY.md`, or any file that |
| 49 | +defines conforming behavior follow the same process as language changes. |
38 | 50 |
|
39 | 51 | ## How to submit |
40 | 52 |
|
41 | 53 | 1. Fork the repository. |
42 | 54 | 2. Create a branch from `main`. |
43 | | -3. Make your changes. Run `python3 -m codifide test` — all tests must pass. |
44 | | -4. If your change adds new language surface, run `python3 -m codifide dispatch-check` to confirm dispatch pairs are complete. |
45 | | -5. Open a pull request with a clear description of what changed and why. |
| 55 | +3. Make your changes. |
| 56 | +4. Run `python3 -m pytest tests/ -q` — all tests must pass. |
| 57 | +5. If your change adds new language surface, run |
| 58 | + `python3 -m codifide dispatch-check` to confirm dispatch pairs are complete. |
| 59 | +6. Open a pull request with a clear description of what changed and why. |
| 60 | + |
| 61 | +## Governance process |
| 62 | + |
| 63 | +Codifide uses a seven-gate stage-gate process for all language changes: |
| 64 | + |
| 65 | +| Gate | Question | |
| 66 | +|------|----------| |
| 67 | +| G0 | Is this worth exploring? | |
| 68 | +| G1 | Are the requirements strong enough? | |
| 69 | +| G2/G3 | Is the design ready? | |
| 70 | +| G4 | Build and verify. | |
| 71 | +| G5 | Release readiness. | |
| 72 | +| G6 | Post-release review. | |
| 73 | + |
| 74 | +Every gate requires evidence, not confidence. "We think it's fine" is not a |
| 75 | +gate pass. See `GOVERNANCE.md` and `.kiro/steering/01-governance-gates.md` |
| 76 | +for the full criteria. |
| 77 | + |
| 78 | +## Dispatch discipline |
| 79 | + |
| 80 | +Every significant decision is recorded as a paired dispatch: |
| 81 | + |
| 82 | +- `dispatches/<date>-<slug>.readout.md` — Quill (human-readable) |
| 83 | +- `dispatches/<date>-<slug>.yaml` — Glyph (agent-readable, structured) |
| 84 | + |
| 85 | +Run `python3 -m codifide dispatch-check` before ending any session that |
| 86 | +filed dispatches. It exits non-zero if any pairs are incomplete. |
46 | 87 |
|
47 | 88 | ## Code style |
48 | 89 |
|
49 | | -- Python: follow the existing style. No external formatter is enforced, but match the surrounding code. |
50 | | -- Rust: `cargo fmt` before committing. |
51 | | -- Documentation: plain, precise language. No marketing copy in spec files. |
52 | | -- Commit messages: imperative mood, one line summary, detail in the body if needed. |
| 90 | +- **Python:** match the surrounding code. No external formatter enforced. |
| 91 | +- **Rust:** `cargo fmt` before committing. |
| 92 | +- **Documentation:** plain, precise language. No marketing copy in spec files. |
| 93 | +- **Commit messages:** imperative mood, one-line summary, detail in body if needed. |
| 94 | +- **Tests:** every new primitive, AST kind, or behavior change needs a test. |
| 95 | + Look at `tests/` for the pattern. |
| 96 | + |
| 97 | +## Three-persona review |
| 98 | + |
| 99 | +Language changes go through three independent reviews: |
53 | 100 |
|
54 | | -## Tests |
| 101 | +- **Sable** (A-Team auditor) — adversarial soundness, security, conformance |
| 102 | +- **B-Team** (different AI model) — finds what the builders missed |
| 103 | +- **Zero-Context reviewer** — reads the artifact as a new contributor would |
55 | 104 |
|
56 | | -Every new primitive, AST kind, or behavior change needs a test. The test suite lives in `tests/`. Look at existing tests for the pattern — most are short `.cod` fixture programs run through the interpreter with an expected output or error. |
| 105 | +See `.kiro/steering/04-adversarial-review.md` for how to run each. |
57 | 106 |
|
58 | 107 | ## Questions |
59 | 108 |
|
60 | | -Open an issue in the repository. For trademark or commercial licensing questions, contact Codifide Inc. directly via [codifide.com](https://www.codifide.com). |
| 109 | +Open a [Discussion](https://github.com/codifide/codifide-programming-language/discussions) |
| 110 | +for questions, ideas, and show-and-tell. For security vulnerabilities, see |
| 111 | +`SECURITY.md`. For trademark or commercial licensing, contact Codifide Inc. |
| 112 | +via [codifide.com](https://www.codifide.com/#contact). |
0 commit comments