Skip to content

Commit c230d73

Browse files
authored
Merge branch 'main' into dependabot/cargo/sha2-0.11
2 parents 4cc9150 + 8551935 commit c230d73

93 files changed

Lines changed: 9065 additions & 69 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Don't include development artifacts in the Docker image
2+
.git
3+
.gitignore
4+
.pytest_cache
5+
.playwright-mcp
6+
__pycache__
7+
*.pyc
8+
*.pyo
9+
*.egg-info
10+
dist/
11+
build/
12+
target/
13+
tests/
14+
examples/
15+
docs/
16+
dispatches/
17+
sessions/
18+
scripts/
19+
crates/
20+
*.cod
21+
*.png
22+
*.jpeg
23+
*.svg
24+
Cargo.toml
25+
Cargo.lock
26+
fly.toml

.github/FUNDING.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Funding links for the Codifide project
2+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository
3+
4+
# GitHub Sponsors (if/when set up)
5+
# github: [codifide]
6+
7+
# Custom sponsorship URL
8+
custom: ["https://www.codifide.com/#contact"]
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Agent feedback
3+
about: You are an AI agent and something about the language confused you, failed, or could be better
4+
title: '[agent-feedback] '
5+
labels: agent-feedback
6+
assignees: ''
7+
---
8+
9+
## What you were trying to do
10+
11+
<!-- Describe the program you were writing or the task you were attempting. -->
12+
13+
## What went wrong
14+
15+
<!-- Exact error message, unexpected behavior, or point of confusion. -->
16+
17+
## What you tried
18+
19+
<!-- The code you wrote before you hit the problem. -->
20+
21+
```codifide
22+
# your first attempt
23+
```
24+
25+
## What fixed it (if you found a fix)
26+
27+
```codifide
28+
# the working version
29+
```
30+
31+
## What the docs said (or didn't say)
32+
33+
<!-- Which document did you read? What did it say? What was missing or misleading? -->
34+
35+
## Suggested improvement
36+
37+
<!-- What would have helped? A better error message, a docs update, a new primitive? -->
38+
39+
---
40+
41+
*Agent feedback is the most valuable input this project receives.
42+
Every friction point you document may become a cookbook entry or a language fix.*
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Bug report
3+
about: Something in the interpreter, parser, store, or CLI is not working correctly
4+
title: '[bug] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## What happened
10+
11+
<!-- A clear description of the bug. -->
12+
13+
## Expected behavior
14+
15+
<!-- What you expected to happen. -->
16+
17+
## Reproduction
18+
19+
<!-- Minimal .cod program or CLI command that reproduces the issue. -->
20+
21+
```codifide
22+
# paste your .cod program here
23+
```
24+
25+
```bash
26+
# or the CLI command
27+
python3 -m codifide run ...
28+
```
29+
30+
## Error output
31+
32+
```
33+
# paste the full error message here
34+
```
35+
36+
## Environment
37+
38+
- Codifide version: <!-- run: python3 -m codifide capability | python3 -c "import sys,json; print(json.load(sys.stdin)['generator'])" -->
39+
- Python version: <!-- run: python3 --version -->
40+
- OS:
41+
42+
## Additional context
43+
44+
<!-- Anything else that might be relevant. -->
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Feature request / language proposal
3+
about: Propose a new primitive, AST kind, effect, or language behavior
4+
title: '[proposal] '
5+
labels: proposal
6+
assignees: ''
7+
---
8+
9+
## Problem statement
10+
11+
<!-- What problem does this solve? What agent use case does it enable?
12+
Codifide is evidence-driven — proposals without a concrete use case
13+
are unlikely to be accepted. -->
14+
15+
## Proposed solution
16+
17+
<!-- What would the new primitive / syntax / behavior look like?
18+
Show a .cod example if possible. -->
19+
20+
```codifide
21+
# example usage
22+
```
23+
24+
## Adoption evidence
25+
26+
<!-- Has any agent session produced evidence that this is needed?
27+
A concrete failure mode, a program that couldn't be written, or
28+
a friction point from a case study carries more weight than
29+
a theoretical argument. -->
30+
31+
## Alternatives considered
32+
33+
<!-- What other approaches did you consider? Why is this one better? -->
34+
35+
## Acceptance criteria
36+
37+
<!-- How would we know this is done correctly?
38+
What tests would pass? What programs would now work? -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## What this PR does
2+
3+
<!-- One paragraph summary of the change. -->
4+
5+
## Type of change
6+
7+
- [ ] Bug fix (no observable behavior change)
8+
- [ ] New example or test (additive, no dispatch required)
9+
- [ ] Documentation fix (no spec change)
10+
- [ ] Language change (new primitive / AST kind / effect / syntax — dispatch required)
11+
- [ ] Spec change (changes to CANONICAL.md, CAPABILITY.md, or conforming behavior)
12+
13+
## Checklist
14+
15+
- [ ] `python3 -m pytest tests/ -q` — all tests pass, 0 skipped
16+
- [ ] `python3 -m codifide dispatch-check` exits 0 (if dispatches were filed)
17+
- [ ] Capability manifest regenerated if public surface changed (`python3 -m codifide capability > docs/capability-0.1.json`)
18+
- [ ] New behavior has tests
19+
- [ ] Commit messages are imperative mood
20+
21+
## For language changes
22+
23+
- [ ] G0 problem statement filed in `.kiro/specs/`
24+
- [ ] G1 requirements with acceptance criteria
25+
- [ ] Paired Quill readout + Glyph dispatch in `dispatches/`
26+
- [ ] Sable audit completed (if security-adjacent)
27+
28+
## Related issues / dispatches
29+
30+
<!-- Link any related issues, discussions, or dispatch files. -->

.github/workflows/ci.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
python-version: ${{ matrix.python-version }}
2626

2727
- name: Install package
28-
run: pip install -e ".[blob]"
28+
run: pip install -e "."
2929

3030
- name: Run test suite
3131
run: python3 -m pytest tests/ -q --tb=short
@@ -48,3 +48,29 @@ jobs:
4848
sys.exit(1)
4949
print('Capability manifest is current.')
5050
"
51+
52+
publish:
53+
name: Publish to PyPI
54+
runs-on: ubuntu-latest
55+
needs: test
56+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
57+
58+
steps:
59+
- uses: actions/checkout@v4
60+
61+
- name: Set up Python
62+
uses: actions/setup-python@v5
63+
with:
64+
python-version: "3.11"
65+
66+
- name: Install build tools
67+
run: pip install build twine
68+
69+
- name: Build distribution
70+
run: python3 -m build
71+
72+
- name: Publish to PyPI
73+
env:
74+
TWINE_USERNAME: __token__
75+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
76+
run: twine upload dist/*
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Codifide v4.0 — G0 Problem Statement
2+
3+
**Date:** 2026-05-14
4+
**Author:** Douglas Jones + Claude (Aegis/Harper)
5+
**Status:** G0 — approved, proceeding to G1
6+
7+
---
8+
9+
## Why v4.0?
10+
11+
The gap analysis from the "is this usable in the wild?" question identified
12+
four structural gaps between Codifide as a research prototype and Codifide
13+
as a usable tool. Each gap is a concrete, fixable problem. None requires
14+
rethinking the language design.
15+
16+
---
17+
18+
## Problem 1 — `sig` declarations are decorative, not enforced
19+
20+
**What breaks without this:** An agent can declare `sig (n: Int) -> String`
21+
and pass a `Float` or a `List`. The runtime either silently coerces, fails
22+
at the primitive level with a confusing error, or produces wrong output.
23+
The type system is a lie. Agents that trust it will be misled.
24+
25+
**Evidence:** Every case study agent wrote `sig` declarations. None of them
26+
were checked. The language claims to be designed for agents who need
27+
trustworthy contracts — but the most basic contract (type) is not enforced.
28+
29+
**Scope:** Runtime type checking at call boundaries. Not full static type
30+
inference. Check argument types against `sig` declarations when types are
31+
known. Raise a typed `TypeViolation` error on mismatch.
32+
33+
**Risk:** Medium. Touches the interpreter call path. Existing programs that
34+
accidentally pass wrong types will now fail loudly instead of silently.
35+
That is the correct behavior.
36+
37+
---
38+
39+
## Problem 2 — No standard library
40+
41+
**What breaks without this:** Agents cannot write programs that read files,
42+
make HTTP requests, parse JSON, or do date arithmetic. Every real-world
43+
agent pipeline needs at least one of these. The current primitive set covers
44+
string manipulation and arithmetic but nothing that touches the outside world
45+
beyond `io.say` and `clock.now`.
46+
47+
**Evidence:** The "usable in the wild" assessment identified this as a
48+
hard blocker for real-world use. The content-moderation pipeline task spec
49+
(the canonical test) uses only string primitives — it was designed to avoid
50+
this gap, not to demonstrate the language is complete.
51+
52+
**Scope:** Four new effect groups:
53+
- `io.read` — read a file by path, return string
54+
- `http.get` / `http.post` — HTTP client primitives
55+
- `json.parse` / `json.encode` — JSON round-trip
56+
- `clock.date` — structured date arithmetic beyond `clock.now.hm`
57+
58+
**Risk:** Medium. New effect declarations, new primitives, new error kinds.
59+
Does not touch existing primitives or the canonical form for existing programs.
60+
61+
---
62+
63+
## Problem 3 — No operated public registry
64+
65+
**What breaks without this:** V3-2 shipped remote symbol resolution
66+
infrastructure, but the registry at `codifide.com/symbols/<hash>` is empty.
67+
Two agents cannot exchange symbols without out-of-band coordination because
68+
there is nowhere to publish to. The multi-agent protocol story is
69+
infrastructure without content.
70+
71+
**Evidence:** V3-2 acceptance criterion was "agent on machine B resolves a
72+
symbol published by agent on machine A." That works mechanically but requires
73+
both agents to be running their own servers. A public registry with real
74+
symbols in it is the missing piece.
75+
76+
**Scope:** Operate the public registry endpoint. Seed it with the canonical
77+
pipeline task spec symbols (the five programs from the case studies). Document
78+
the publish workflow. Add `codifide store push --registry https://codifide.com`
79+
as the canonical publish path.
80+
81+
**Risk:** Low for the code (already exists). Medium for operations (requires
82+
a running server, storage, and uptime commitment).
83+
84+
---
85+
86+
## Problem 4 — Server is 127.0.0.1 only
87+
88+
**What breaks without this:** The RPC server cannot be used for multi-machine
89+
agent coordination without a reverse proxy, TLS, and auth — none of which are
90+
documented or provided. The V3-2 remote registry works around this by using
91+
the public endpoint, but any team wanting to run a private registry is on
92+
their own.
93+
94+
**Evidence:** The Sable audit of V2-1 flagged AUD-RPC-02 (no socket timeout,
95+
slow-loris risk) as P2. The server was explicitly documented as "local-only,
96+
trusted caller." That is the right call for v2.0 but not for v4.0 where
97+
multi-machine use is the goal.
98+
99+
**Scope:** Add an `--auth-token` flag for bearer token authentication. Add
100+
TLS support via `--cert` / `--key` flags (or document the reverse proxy
101+
pattern). Remove the "not safe to expose over a network" warning when auth
102+
is configured. Update `docs/RPC_API.md`.
103+
104+
**Risk:** Medium-high. Security-sensitive. Requires Sentinel review and
105+
Sable audit before shipping.
106+
107+
---
108+
109+
## Prioritization
110+
111+
| ID | Problem | Priority | Risk | Dependency |
112+
|----|---------|----------|------|------------|
113+
| V4-1 | Runtime type enforcement | P1 | Medium | None |
114+
| V4-2 | Standard library | P1 | Medium | None |
115+
| V4-3 | Public registry (operated) | P2 | Low/Medium | V3-2 (shipped) |
116+
| V4-4 | Network-safe server | P3 | Medium-High | V4-3 |
117+
118+
V4-1 and V4-2 are independent and can be implemented in parallel.
119+
V4-3 is mostly operational, not code. V4-4 depends on V4-3 being
120+
useful first.
121+
122+
---
123+
124+
## What is explicitly out of scope for v4.0
125+
126+
- **Full static type inference** — V4-1 is runtime checking only. Static
127+
inference requires a type system design that is not yet specified.
128+
- **Hosted runtime / cloud execution** — no adoption evidence.
129+
- **Time-indexed types (V3-4)** — still deferred, still no evidence.
130+
- **Editor integration** — still deferred.
131+
- **Structural diff and merge** — still deferred.
132+
133+
---
134+
135+
## G0 decision
136+
137+
**Approved.** All four problems are real, bounded, and worth solving.
138+
Evidence is direct (case study findings, Sable audit findings, gap analysis).
139+
Scope is honest. Proceeding to G1.
140+
141+
*Aegis sign-off: approved 2026-05-14*

0 commit comments

Comments
 (0)