Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f8b7790
feat: establish baseline telemetry contracts
oigorbrito Sep 22, 2026
bc5a46c
feat: add deterministic task characterization
oigorbrito Sep 22, 2026
e64b9c4
feat: add deterministic progress detection
oigorbrito Sep 22, 2026
0f5ba5f
feat: add bounded routing and escalation policy
oigorbrito Sep 23, 2026
ce2a8b4
feat: add repository planning verification and handoff accounting
oigorbrito Sep 23, 2026
f7e1228
fix: harden verification and core contracts
oigorbrito Sep 23, 2026
3378d19
feat: add experimental composition harness
oigorbrito Sep 23, 2026
218b68c
feat: add executor qualification contracts
oigorbrito Sep 23, 2026
74f73a8
test: preserve advertised executor capabilities
oigorbrito Sep 23, 2026
2e1da84
feat: add p8.2 minimal mechanism trial harness
oigorbrito Sep 23, 2026
b34842b
feat: add minimal mechanism trial harness
oigorbrito Sep 23, 2026
a9885c3
feat: add p8.2 baseline execution path
oigorbrito Sep 23, 2026
370319b
feat: add p8.2 SWE-bench authority
oigorbrito Sep 23, 2026
bb5d8ad
fix: qualify p8.2 baseline execution environment
oigorbrito Sep 23, 2026
aef1df4
chore: record p8.2 modal qualification blockers
oigorbrito Sep 23, 2026
cf7de11
feat: strengthen executor-agnostic architecture and evidence harness
oigorbrito Sep 23, 2026
fcba750
feat: require budget enforcement at legacy runner boundary
oigorbrito Sep 23, 2026
d54262a
feat: propagate typed configuration snapshots through planning
oigorbrito Sep 23, 2026
a19dbf3
docs: reconcile audit metadata and local artifacts
oigorbrito Sep 23, 2026
2b36e89
docs: define audit-based persistence scope
oigorbrito Sep 23, 2026
0eff3dc
docs: align architecture audit with verified gates
oigorbrito Sep 23, 2026
acd90a2
docs: bind final audit to verified source revision
oigorbrito Sep 23, 2026
7e4b510
feat: package chassis and expose minimal cli
oigorbrito Sep 24, 2026
2206e3c
docs: record clean archive validation
oigorbrito Sep 24, 2026
b75c875
docs: record external ci billing block
oigorbrito Sep 24, 2026
5e7a6f3
ci: validate release artifacts and dependencies
oigorbrito Sep 24, 2026
3d2c173
docs: defer external cli integration
oigorbrito Sep 24, 2026
c78bb3b
docs: define release blocker decision plan
oigorbrito Sep 24, 2026
f2949d4
docs: set private operational release target
oigorbrito Sep 24, 2026
74f86da
docs: make chassis a required operational gate
oigorbrito Sep 24, 2026
dd1bd05
docs: narrow product to operational mvp
oigorbrito Sep 24, 2026
f3c5989
docs: constrain mvp compromises to infrastructure cost
oigorbrito Sep 24, 2026
9194ea6
docs: define mvp vertical execution contract
oigorbrito Sep 24, 2026
8ca443d
docs: record executor candidate as unqualified
oigorbrito Sep 24, 2026
31b3390
feat: require reproducible task environment identity
oigorbrito Sep 24, 2026
fecba9d
feat: preserve verifier execution metadata
oigorbrito Sep 24, 2026
91470ae
feat: add neutral verifier command boundary
oigorbrito Sep 24, 2026
45520b8
feat: persist verifier evidence at orchestration boundary
oigorbrito Sep 24, 2026
d4fc0a6
test: cover persisted verifier in routed pipeline
oigorbrito Sep 24, 2026
820640d
feat: add paired executor qualification protocol
oigorbrito Sep 24, 2026
97f5162
docs: record second executor enablement gate
oigorbrito Sep 24, 2026
4a68e31
docs: align product identity as Codepro
oigorbrito Sep 24, 2026
88aeb3a
evidence: record blocked second executor preflight
oigorbrito Sep 24, 2026
c6bdd3a
docs: define empirical cost tier escalation protocol
oigorbrito Sep 24, 2026
37a68ae
docs: separate tier termination and context evidence
oigorbrito Sep 24, 2026
22e22d0
evidence: audit blocked OpenCode headless execution
oigorbrito Sep 24, 2026
ad5f1b5
evidence: audit OpenHands free headless candidate
oigorbrito Sep 24, 2026
aa17024
evidence: record unavailable Antigravity executor
oigorbrito Sep 24, 2026
b3a89ec
evidence: record OpenHands profile and gcloud blockers
oigorbrito Sep 24, 2026
86b3822
docs: define auditable agent execution workflow
oigorbrito Sep 25, 2026
38ca615
docs: record PR30 conflict decomposition
oigorbrito Sep 25, 2026
a1a6535
feat: introduce canonical codepro namespace facade
oigorbrito Oct 5, 2026
b4b9c95
fix: preserve legacy public api manifest
oigorbrito Oct 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions .github/workflows/foundation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,38 @@ jobs:
python-version: "3.x"
- name: Check foundation contract
run: python tools/check_foundation.py
- name: Run baseline fixture
run: python -m arkx.baseline
env:
PYTHONPATH: src
- name: Run unit tests
run: python -m unittest discover -s tests -t . -v
env:
PYTHONPATH: src
- name: Compile Python sources
run: python -m compileall -q src tests tools

packaged-cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Build and install wheel
run: |
python -m pip install --upgrade pip
python -m pip install build twine
python -m build
twine check dist/*
python -m venv .venv-release-check
. .venv-release-check/bin/activate
python -m pip install --no-index --find-links dist codepro
- name: Verify packaged public boundary
run: |
. .venv-release-check/bin/activate
test "$(codepro --version)" = "codepro 0.3.0.dev0"
codepro doctor --json
codepro baseline
python -m pip check
python -m unittest discover -s tests -t .
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ __pycache__/
.mypy_cache/
.coverage
htmlcov/
*.egg-info/

# IDE and operating-system files
.idea/
Expand All @@ -18,3 +19,6 @@ Thumbs.db
experiments/**/runs/
experiments/**/artifacts/

# Local preflight workspaces and temporary virtual environment
.p82-local-preflight-*-workspace/
.venv-mini/
120 changes: 120 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Codepro agent operating rules

The product identity is Codepro. `arkx` is the current Python namespace and
must not be treated as a separate product identity.

## Scope

Treat this repository as an evidence-oriented software-engineering project.
The presence of a module, adapter, test, or document does not prove that the
corresponding capability is qualified for adoption.

## Required implementation standard

Every material capability change must have:

1. an explicit contract or decision record;
2. a falsifiable hypothesis and empirical acceptance criteria;
3. executable tests for deterministic behavior and failure boundaries;
4. recorded raw evidence, including environment and identity where relevant;
5. an independent acceptance decision before promotion.

Local unit-test success is local evidence only. It must not be reported as
upstream, scientific, benchmark, or provider evidence.

## Harness rules

- Preserve provider, model, version, configuration, budget, runtime, and
treatment identity in every execution record.
- Distinguish identity levels: `experiment_id` identifies the protocol,
`trial_id` identifies a frozen comparison cell, and `attempt_id` identifies
one execution attempt. A verifier `run_id` must be unique for every
control, patch, and retry that can produce a distinct result; it must never
be reused merely because the task is the same.
- Use stable identity for equivalent frozen protocol inputs, but include the
control role, patch/diff identity, and attempt semantics wherever a provider
or verifier can cache results.
- Execute serially when the experiment requires controlled comparison.
- Never silently overwrite an attempt directory or select a fallback executor.
- Persist execution artifacts atomically and keep execution, verification,
acceptance, and promotion as separate states.
- A qualification record must identify the dataset revision or fingerprint,
task/base revision, environment image and digest when applicable,
OS/architecture, executor/provider/model/configuration, verifier identity,
budget, treatment, control role, and whether the provider was called.
- A provider-free verifier qualification requires both controls: an empty or
no-op patch must fail as expected and an official gold/oracle patch must
resolve as expected. A missing control is `NOT_EXECUTED` or `BLOCKED`, never
a successful qualification.
- Represent missing identity, missing evidence, blocked infrastructure, and
indeterminate outcomes explicitly; none may become success by inference.
- A failure must retain enough raw output and environment facts to support
diagnosis and reproducibility.

## Routing and promotion

Route the request before selecting an executor. Simple, localized, and
repository-wide paths are treatment regimes, not implicit executor cascades.
Fallbacks, executor switches, scope expansion, acceptance, and promotion must
be explicit and evidence-backed.

Do not promote a provider, model, executor, or treatment until the declared
authority has accepted the required evidence. A Gold or infrastructure
qualification validates its stated authority and does not by itself prove
mechanism effectiveness or general model quality.

## Agent execution in local repositories

The execution agent is a task worker, not an implicit release manager.

- Start each task by recording the workspace, branch/worktree, base revision,
and pre-existing working-tree changes.
- Treat one task, one workspace, and one attempt as the default unit. Retries
receive new attempt identity and preserve the previous artifacts.
- Preserve unrelated local changes. Never use broad `git add -A`, reset, clean,
checkout, stash, or file deletion to make a workspace look clean unless the
user explicitly authorizes that exact operation.
- The default deliverable is a verified patch plus evidence. Do not create a
commit, branch, tag, merge, or pull request unless the request explicitly
authorizes it.
- When a commit is authorized, make at most the task-scoped commit after the
declared checks pass. Do not create checkpoint or speculative commits.
- When a pull request is authorized, first locate the task's existing branch
or open PR and update it when appropriate. Do not create duplicate PRs for
retries, blocked attempts, or the same task. A blocked, failed, or
indeterminate attempt is not PR-ready.
- Never infer completion from a clean diff, a created commit, or an open PR.
Completion requires the declared verification and acceptance evidence.

The complete workspace/patch/commit/PR protocol is in
[`docs/agent-execution-workflow.md`](docs/agent-execution-workflow.md).

## Change discipline

- Preserve unrelated working-tree changes.
- Prefer the smallest change that satisfies the contract.
- Add or update tests with behavioral changes.
- Update the relevant architecture, protocol, or decision documentation when
the boundary changes.
- Run the focused tests first, then the complete test suite when practical.
- Do not claim merge readiness or a green local baseline while required
evidence or acceptance records are missing, or while the declared local
suite is not green. Historical passing runs must retain their revision,
command, environment, and limitations.

## Documentation status

- Normative rules live in this file and in the current experimental protocol.
- Decision records explain why a boundary exists; they do not silently replace
the current protocol.
- Logs and manifests are evidence, not policy. A historical log must not be
presented as the current state without its revision and collection date.
- When a protocol boundary changes, update the protocol, the relevant
architecture page, and one decision record together. Avoid adding a new
document when an existing normative contract can be updated.

## Current baseline

The recorded external authority result is `resolved: true` for the official
SWE-bench Docker Gold path on the frozen tasks under `logs/evaluation/`. This
does not qualify a real provider/model or the A/B/C/D mechanism trial.
63 changes: 52 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,75 @@
# Arkx
# Codepro

Arkx is a greenfield project for empirical, incremental development of reliable capability.
Codepro is a repository for incremental implementation and empirical
evaluation of software capability.

The current Python import namespace is `arkx` for compatibility; the product,
distribution, CLI, and release identity are `codepro`.

> **MINIMUM SUFFICIENT ARCHITECTURE**
> **FOR MAXIMUM RELIABLE CAPABILITY**

This repository is the canonical root for the project. It intentionally contains only the foundation in this bootstrap: the project contract, experimental protocol, structural placeholders, and a minimal CI check.
This repository is the canonical root for the project. It contains runtime
contracts, an execution harness, the project contract, the experimental
protocol, and structural checks.

## Scope of this bootstrap
## Current scope

Included:

- explicit project invariants;
- a small, evidence-oriented experimental protocol;
- stable top-level boundaries for future work;
- a deterministic structural check and minimal CI.
- an evidence-oriented experimental protocol;
- stable top-level boundaries;
- a deterministic structural check, executable contracts, and a Treatment A
baseline harness.

Deferred:
Still deferred or unqualified:

- routing and planning;
- multi-agent orchestration;
- OpenHands, ReX, mini-SWE-agent, and SWE-agent integrations;
- OpenHands, ReX, and SWE-agent integrations;
- real provider/model adoption and the A/B/C/D mechanism trial;
- product dependencies or automatic migration from `smag-rex`.

## Development posture

Every capability must be introduced through a falsifiable hypothesis, an explicit implementation, an executed experiment, and recorded evidence. Local success is not scientific or upstream evidence. No fallback, executor switch, or scope expansion may be silent.

See [the project contract](docs/project-contract.md) and [the experimental protocol](docs/experimental-protocol.md).
Agent workspace, patch, commit, retry and pull-request behavior is governed by
[the agent execution workflow](docs/agent-execution-workflow.md).

## P0 baseline and telemetry

P0 provides executor-agnostic execution records, explicit event metrics, nullable resource measurements, and fail-closed status resolution. It does not implement performance optimization, routing, planning, or any executor. See [the P0 metrics contract](docs/baseline-metrics.md).

Install the development distribution in a clean environment and run the
deterministic fixture and tests:

```text
python -m pip install .
python -m arkx.baseline
python -m unittest discover -s tests -t . -v
```

The distribution is currently `codepro==0.3.0.dev0`; it is a packaged
pre-release chassis. The public commands are limited to health and the
deterministic baseline:

```text
codepro --version
codepro doctor --json
codepro baseline
```

There is intentionally no task-submission or executor command yet.

P1 adds deterministic task characterization from explicit signals only. See [the P1 contract](docs/task-characterization.md). It does not select executors or route work.

P2 adds deterministic progress/stagnation assessment from explicit snapshots only. See [the P2 contract](docs/progress-stagnation.md). It does not control execution or authorize retry/replan.

P3 adds bounded rule-based routing and evidence-based escalation decisions. See [the P3 contract](docs/routing-escalation.md). It does not invoke concrete executors.

Block B adds independently removable P4 repository planning/state, P5 patch verification, and P6 handoff/context accounting. P8.2a adds a Treatment A baseline runner and official SWE-bench acceptance adapter; neither owns general orchestration or promotion.

## Checks

Expand All @@ -36,4 +78,3 @@ The bootstrap check is dependency-free:
```text
python tools/check_foundation.py
```

Loading
Loading