Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 37 additions & 64 deletions .forge/README.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,47 @@
# Numinous Forge on Darkbloom

Forge takes an issue, a requested change, or a pull request through isolated execution and verification. This fork shows the resulting code and the evidence behind it. [Upstream Darkbloom](https://github.com/Layr-Labs/d-inference) and its production systems are unchanged.

| Work | Result to inspect |
|---|---|
| Maintain: repair reconnect reputation | [PR #4](https://github.com/numinous-technology/d-inference/pull/4), [regression proof](evidence/issue-regression-proof.json), [task history](evidence/issue-task.json) |
| Repair CI findings: remove streaming lock dependency | [PR #5](https://github.com/numinous-technology/d-inference/pull/5), [regression proof](evidence/streaming-regression-proof.json), [task history](evidence/streaming-task.json) |
| Build: add protocol fuzz coverage | [PR #2](https://github.com/numinous-technology/d-inference/pull/2), [task history](evidence/prompted-task.json) |
| Review: reject broken code | [Closed PR #1](https://github.com/numinous-technology/d-inference/pull/1), [failing CI evidence](evidence/rejected-ci-task.json) |
| Stabilize verification: repair asynchronous test fixtures | [PR #6](https://github.com/numinous-technology/d-inference/pull/6), [before/after proof](evidence/fixture-regression-proof.json), [PR CI](evidence/fixture-ci-task.json) |
| Repeat: run a scheduled check | [Verified occurrence](evidence/scheduled-task.json), [both policy-bound occurrences](evidence/schedule-promotion.json); schedule paused after verification |
Forge works alongside contributors and maintainers in GitHub. Open a PR and
follow the verification conversation there. For assigned engineering work, the
issue records the plan and findings; the resulting PR explains the change and
its independently recorded checks.

## Follow the work

- **Contributor PR:** Your description starts the conversation. Forge responds
with the behaviors it will check, reports findings, and explains the result.
New commits trigger a new verification run.
- **Requested change:** The issue describes the desired outcome. An assigned
agent reports its plan and useful discoveries as it works. A verified candidate
becomes a draft PR for review, with separate checks on the proposed merge.
- **Scheduled check:** Each new occurrence reports in its tracking issue. The
current overview shows the latest result; milestone comments preserve the
history of individual occurrences.

```mermaid
flowchart TB
People[Maintainers and contributors] --> Request[Issue or requested improvement]
People --> PR[Pull request]
Clock[Configured schedule] --> Checks
Request --> Work[Implementation worker]
Work --> Checks[Fresh verification workers]
PR --> Checks
Checks --> Evidence[Tests, patch, source identity and task history]
Evidence --> Review[Maintainer review]
Review --> Feedback[Recorded feedback and revision]
Feedback --> Work
Review --> Merge[Merge and release decisions]
Review --> Policy[Reviewed skills and check updates]
Policy --> Work
Policy --> Checks
flowchart LR
Human[Contributor PR] --> Checks[Independent checks]
Request[Assigned issue] --> Agent[Agent work and observations]
Agent --> Checks
Schedule[Scheduled occurrence] --> Checks
Agent --> Conversation[Context and milestones in GitHub]
Checks --> Conversation
Conversation --> Review[Maintainer review and next decision]
```

Maintainers choose scope, resolve behavior questions, and review merges and releases. Contributors bring issues, improvements, and PRs. Forge implements scoped work, runs accepted checks, records attempts, and cleans up workers. Agent output is a candidate until separate verification passes.

The repair demonstrates review as part of the process: the first candidate passed its initial tests but review found a history-selection flaw. Recorded feedback led to a revised candidate and additional tests against memory and real PostgreSQL. Those lessons become versioned checks and skills for future tasks; existing tasks retain their original policy.

CI also exposed a separate pre-existing streaming lock dependency. We retained the failed CI result, reproduced the lock ordering, and submitted a focused repair through the prompted-work lane. When the fork advanced during that task, an explicit continuation carried its reviewed patch and feedback onto the new source; [the superseded task](evidence/streaming-superseded-task.json) remains recorded. A later implementation timed out before exporting its candidate; [the recovery record](evidence/streaming-recovery.json) identifies the successful edits reconstructed from its retained transcript and the new task that verifies them. The platform now preserves unfinished patches on agent deadlines, with a deployed timeout regression in its qualification. CI does not automatically rewrite arbitrary failed PRs; an operator scopes the repair.

## Review the checks and agent instructions

The [accepted policy snapshot](policy/darkbloom.json) lists profiles and required checks. [Engineering instructions](policy/skills/engineering.md) and [reputation instructions](policy/skills/reputation.md) carry reviewed lessons into future tasks. Their [manifest](policy/manifest.json) binds the files to the qualified deployment. Changes can be proposed in this fork; Numinous reviews and deploys them before they affect future work. A candidate PR cannot replace its own accepted checks.

## Inspect the evidence

[Repair PR CI](evidence/issue-ci-task.json) and [prompted PR CI](evidence/prompted-ci-task.json) record verification of each PR's merge with the target branch.

With operator access to the installed CLI:

```sh
numinous-forge task list
numinous-forge task get 66257843079c685ec7a310c33395c780
numinous-forge task export 66257843079c685ec7a310c33395c780 ./repair-evidence
numinous-forge schedule runs qualification-protocol
```

Public receipts omit credentials and private infrastructure details. Operator exports contain the complete input, review notes, attempts, logs, and artifact manifests.

## Demonstrated work

The examples cover coordinator and protocol improvements in this fork. Each linked result records the checks that ran and the revision they verified. Maintainers review the proposed behavior and decide what to merge.
A current-work comment answers **where are we now?** Separate milestone comments
explain discoveries, failures, changes of direction, and completion. Each result
identifies its source revision. Agent observations are distinguished from
recorded verification; a proposed patch is not a passing result.

## Follow work on a pull request
Maintainers choose scope, resolve behavior questions, and decide what merges.
CI verifies a contributor's code without automatically modifying it. Ordinary
comments do not trigger additional engineering work.

The Numinous Forge verification comment updates when checks are queued, running,
or complete. It identifies the revision and links to the workflow and results.
New commits trigger verification again and update the same comment.
## How Forge communicates

If a check fails, open the linked run to inspect the failure, then fix the change
and push a new commit. Forge reruns verification and updates the existing comment.
A passing check provides evidence for human review; maintainers decide what to
merge and release.
The [communication guide](communication.md) defines what an update should explain.
Its purpose is to make the PR conversation sufficient for review: what changed,
why, what the checks proved, and what still needs a decision. Logs and
[machine-readable records](evidence/) support deeper investigation when needed.

An engineering task attached to the PR has its own progress comment so you can
distinguish an agent preparing a change from the independent checks on the PR. The task comment
shows reproduction, implementation, verification, and review readiness.
The integration is installed in this fork. Upstream Darkbloom is unchanged.
24 changes: 24 additions & 0 deletions .forge/communication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Communication during engineering work

Write for a maintainer who wants to understand the work without reconstructing
it from logs. Use concrete behavior and ordinary language. An update normally
explains what is being investigated, what was learned, and what happens next.

At the start, respond to the actual request and explain the planned checks.
During work, report findings and changes of approach that matter to review.
When a candidate is ready, explain the change and remaining concerns. When
independent checks finish, distinguish observed results from untested claims.

Keep one updated overview and a short history of meaningful milestones.
Do not post tool-by-tool narration or repeat an unchanged status. When a run
fails or is interrupted, say what remains unresolved. Never invent a finding
just to make an uneventful run sound productive.

An agent's own observations do not establish independent verification.
Recorded check results determine whether verification passed. A passing result
still needs human review of behavior, test quality, and the merge decision.

A requested change starts in its issue; the generated PR carries the request,
implementation explanation, actual checks, review focus, and a before/after
code-flow diagram. Scheduled occurrences retain separate results in their
tracking issue. Contributor PR descriptions remain the contributor's own words.
6 changes: 5 additions & 1 deletion .github/workflows/forge-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
FORGE_BUCKET: ${{ vars.FORGE_BUCKET }}
FORGE_CLI_KEY: ${{ vars.FORGE_CLI_KEY }}
FORGE_CLI_SHA256: ${{ vars.FORGE_CLI_SHA256 }}
FORGE_CONVERSATIONS: ${{ vars.FORGE_CONVERSATIONS }}
shell: python
run: |
"""Trusted GitHub runner. This file is embedded in the installed workflow."""
Expand Down Expand Up @@ -270,7 +271,7 @@ jobs:
def status(state, description):
github("/statuses/" + head, {"state": state, "context": status_context, "description": description, "target_url": url})

reporter = ProgressComment(pr, head, url, api=github) if pr else None
reporter = ProgressComment(pr, head, url, api=github) if pr and os.environ.get("FORGE_CONVERSATIONS") != "true" else None
task = {"lane": "ci", "state": "queued"}
status("pending", "Verification queued in Numinous Forge")
try:
Expand Down Expand Up @@ -337,6 +338,7 @@ jobs:
if: ${{ always() && steps.forge.outcome != 'success' }}
env:
GH_TOKEN: ${{ github.token }}
FORGE_CONVERSATIONS: ${{ vars.FORGE_CONVERSATIONS }}
shell: python
run: |
"""Close an interrupted progress report when the Actions job can still finalize."""
Expand Down Expand Up @@ -510,6 +512,8 @@ jobs:
raise ValueError("untrusted workflow context")
if os.environ["GITHUB_EVENT_NAME"] != "pull_request_target":
return
if os.environ.get("FORGE_CONVERSATIONS") == "true":
return
event = json.loads(Path(os.environ["GITHUB_EVENT_PATH"]).read_text())
head, pr = event["pull_request"]["head"]["sha"], event["number"]
url = f"https://github.com/{REPOSITORY}/actions/runs/{os.environ['GITHUB_RUN_ID']}"
Expand Down
Loading