Status: Active Updated: 2026-02-28
This file is the root-level canonical record of ForgeOps core concepts. It documents:
- What exists now (implementation truth).
- How core concepts relate to each other.
- Which concepts are vision-only and not scheduled for delivery.
This file is a concept map, not a replacement for detailed design docs.
- In scope: control-plane concepts, data model, execution loop, runtime abstraction, governance and skill evolution chain.
- Out of scope: full API details, full CLI reference, frontend interaction details.
ForgeOps is an AI R&D control plane. Its core value is: orchestrate multi-step delivery with observability, constraints, and recoverability.
Concept anchors:
- Architecture overview:
docs/architecture/00-overview.md - Runtime boundary:
docs/runtime-adapter-design.md - Harness philosophy:
docs/harness-engineering-guidelines.md
| Concept | Definition | Primary storage / source |
|---|---|---|
Project |
A managed repository root with product metadata and governance context. | projects table in src/core/store.js |
Issue |
GitHub requirement entry that drives run creation in issue-driven flow. | GitHub + github_issue_id in runs |
Run |
One workflow execution instance bound to a project (and typically an issue). | runs table |
Step |
One execution node in a run DAG with retry/runtime metadata. | steps table |
Session |
Runtime session record for step execution (pid/thread/turn/model/tokens). | sessions table |
Event |
Immutable structured event stream for run/step lifecycle and diagnostics. | events table |
Artifact |
Structured output evidence from steps (reports, issue markdown, candidates). | artifacts table |
Lock |
Concurrency control for critical operations. | locks table |
Data-model anchors:
src/core/store.jsmigration block (CREATE TABLE ...)
High-level loop:
- Precheck runtime/tooling and credentials.
- Initialize/register project.
- Create run from project + issue + workflow + context snapshot.
- Create worktree/branch isolation for run.
- Worker claims runnable pending steps by DAG dependency.
- Runtime adapter executes step and emits structured events.
- Engine enforces mechanical gates (platform, invariants, docs).
- Store updates state, artifacts, and final status.
- API/SSE streams state to UI/consumers.
- Scheduler performs periodic maintenance and automation tasks.
Anchor:
docs/architecture/00-overview.md
| Concept | Definition | Notes |
|---|---|---|
Workflow |
Project-level DAG definition loaded from .forgeops/workflow.yaml. |
Defaults exist when not customized. |
Default steps |
architect -> issue -> implement -> test -> review -> cleanup. |
Linear default form of DAG. |
Step template |
Built-in step contract including role, prompt contract, retries, output schema. | Defined in src/core/workflow.js. |
Output contract |
Runtime must return strict JSON object with fixed keys and status enum. | STEP_OUTPUT_SCHEMA. |
Workflow controls |
Project-level controls for auto merge, merge method, issue auto-close, conflict retries. | Parsed/validated in workflow/store. |
Run mode concepts:
standard: run project workflow as configured.quick: reduced workflow for lower-cost/short-cycle execution (fallbacks if not applicable).
Anchors:
src/core/workflow.jssrc/core/store.js(resolveRunWorkflowByMode)docs/user-guide.md(run mode semantics)
| Concept | Definition |
|---|---|
Runtime Adapter |
Stable interface between control plane and model runtime process. |
Runtime Registry |
Runtime factory/lookup that decouples orchestration from runtime implementation. |
codex-exec-json |
Default runtime implementation using codex exec --json. |
codex-app-server |
Experimental runtime path, non-default in v1. |
Resume semantics |
Step execution can attempt thread resume, with fallback to fresh execution when resume is invalid. |
Runtime contract:
- Input:
{ cwd, prompt, model, outputSchema, onRuntimeEvent } - Output:
{ status, summary, rawOutput, structured, runtime }
Anchors:
docs/runtime-adapter-design.mdsrc/runtime/index.jssrc/runtime/codex-exec-json.js
| Concept | Definition |
|---|---|
Claim-next pending |
Engine pulls executable steps while respecting DAG and concurrency. |
Retry-or-fail |
Step failure route with bounded retries; exhausted retries fail run. |
Orphan recovery |
Engine recovers unfinished running steps after restart. |
Session resume risk |
Long-session resume failures produce risk events and rotation recommendation. |
Tracked codex thread |
CLI tracks workspace session thread ids for deterministic resume behavior. |
Anchors:
src/worker/engine.jssrc/core/store.jssrc/cli/index.js(forgeops codex session|project)
Gate model is not optional narrative, it is executable enforcement.
| Gate | Scope | Trigger point |
|---|---|---|
Platform Gate |
Product runtime readiness (platform-preflight + platform-smoke) |
test step |
Invariant Gate |
Structural/architecture constraints from .forgeops/invariants.json |
implement, test, review |
Docs Gate |
Documentation freshness/structure checks | cleanup step |
Follow-up issue |
Auto-issue for invariant warnings based on policy | usually review |
Anchors:
src/worker/engine.jsdocs/design/platform-toolchain-quality-gate.mddocs/harness-engineering-guidelines.md
Context is layered and explicit.
| Layer | Typical files | Usage |
|---|---|---|
| Project base context | .forgeops/context.md, .forgeops/governance.md |
Seeded into project assistant and step prompts |
| Step-scoped context | docs/context/*.md + registry in docs/context/index.md |
Selected by step (architect, issue, implement, test, review, cleanup) |
| Agent/skills context | .forgeops/agent-skills.json + skills content |
Role capability shaping |
Important rule:
- Files in
docs/context/are not automatically managed for you; they are consumed when registered.
Anchors:
src/core/store.js(loadProjectContext,loadProjectGovernance,loadStepScopedContextDocs)docs/context/index.md
Skill is the execution capability unit bound to roles.
project-local(<projectRoot>/.forgeops/skills/...)user-global($FORGEOPS_HOME/skills-global/skills/...)official(official-skills/skills/...)
Anchor:
src/core/skills.js(resolveSkillDescriptorByPriority)
- Official template as initial capability.
- Run execution produces reusable methods/evidence.
- Cleanup emits
skill-candidateartifacts. - Candidates are promoted through independent PR (human review).
- Candidate can be promoted to project-local or user-global skill library.
- Scheduler can automate candidate promotion proposal generation.
Anchor docs:
docs/design/skill-evolution-closed-loop.mddocs/design/issue-driven-taste-and-skill-loop.mddocs/design/skill-promotion-pr-review-loop.mddocs/design/skill-auto-promotion-scheduler.mddocs/design/user-global-skill-library.md
Scheduler is project-scoped periodic automation orchestrator.
Managed job families:
cleanupperiodic governance runs.issueAutoRunfrom GitHub issue labels/rules.skillPromotionproject skill candidate auto-promotion.globalSkillPromotionuser-global candidate auto-promotion.- Mainline sync related maintenance.
Anchor:
src/worker/scheduler.js- Project config:
.forgeops/scheduler.yaml
| Surface | Purpose |
|---|---|
API snapshots (/api/events) |
Pull recent event history for debugging or UI replay. |
SSE stream (/api/events/stream) |
Real-time event feed with replay and heartbeat. |
| Run-step-session linkage | Every event/artifact can be traced back to run and step context. |
| Attach terminal | Controlled way to observe runtime thread behavior in terminal. |
Anchor:
src/server/app.js
ForgeOps exposes two codex entry roles:
forgeops codex session
- ForgeOps usage coach (platform-oriented).
- Default workspace is ForgeOps repo root.
forgeops codex project
- Managed project copilot (project-oriented).
- Resolves managed project by cwd or
--project. - Supports
--local-onlyand--fresh.
Both use tracked thread semantics for deterministic resume.
Anchor:
src/cli/index.js(commandCodex)
From Harness Engineering:
- Context Engineering
- Architectural Constraints
- Observability
- Garbage Collection
Operational meaning:
- Not only fix outcomes once.
- Add mechanism so similar failures are less likely to recur.
Anchor:
docs/harness-engineering-guidelines.mddocs/design/core-beliefs.md
These concepts are recorded as direction only. They are not active implementation commitments.
- Existing project managed onboarding and continuous auto-evolution:
- See
docs/design/existing-project-managed-onboarding-vision.md
- Skill-as-App model:
- Skill as installable/governable/distributable app unit.
- See
docs/design/skill-as-app-vision.md
- Multi-runtime smart scheduler optimization.
- Distributed worker cluster.
- Fully autonomous release pipeline.
Anchor:
docs/architecture/00-overview.md
Project -> Issue -> Run -> Steps(DAG) -> Runtime Session -> Events/Artifacts -> Gates -> Review/Cleanup -> Skill Candidates -> Promotion(Project/User-Global) -> Reuse/Evolution