Forge Engine

v0.2.0
app.forgeengine/forge Checked 3 days ago Published 4 months ago

Design spec + milestones AI coding agents read before building; drift flagged, changes reviewed.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_help

Forge how-to on demand (no project needed): propose→adopt, what a System is, Balance Lab formats, sign-in. Call when unsure.

get_workflow

Run FIRST in a new repo (no project): first-connect routine + the working-agreement block to ADD to AGENTS.md/CLAUDE.md now (tell the user in one line; remove if they object).

import_from_code

One-command codebase import: recipe + batch id — propose one Context overview + one System per real module; the owner adopts all at once.

ParameterTypeDescription
project_idstring

design_ui_from_systems

Recipe to design the UI from Systems (user request only): steps + batch id — confirm canvas aspect, then screens + PLACED elements + edges in one batch.

ParameterTypeDescription
project_idstring

post_log

Append a build-log entry to Activity — what you built/decided (commit-note style).

ParameterTypeDescription
text *stringWhat you did / decided (1–2 sentences)
entitystringSystem/screen/milestone it's about
project_idstring
versionstringe.g. "0.379.0"

get_project_context

FULL design dump — LARGE, last resort; prefer get_project_meta + list_*/get_*/search.

ParameterTypeDescription
project_idstring

list_projects

Projects your key reaches (id, name, role); pass an id as project_id to switch.

get_project_meta

START HERE. Tiny overview: counts, members, task claims + working_now (avoid collisions), forge_workflow_version.

ParameterTypeDescription
project_idstring

trace_ui_from_image

SECONDARY (user-driven UI): turn a screen's REFERENCE IMAGE into placed elements. Returns the image itself plus the recipe — the canvas resolution, the fraction→pixel conversion that stops coordinates landing wrong, and what is already on the screen so a second pass updates instead of duplicating. You look at the picture and send back propose_element / update_element with x/y/w/h; it all lands in the owner's Inbox. Use when the user wants the wireframe to match a screenshot or mockup they uploaded.

ParameterTypeDescription
screen *stringThe screen whose reference image to trace (name or id)
project_idstring

get_stale

What has drifted between the Idea lane and the System Specs — the design's own out-of-sync list, computed deterministically (no AI, no tokens). Three kinds: Idea notes edited since the systems were generated from them (with the systems each one touches), Idea notes whose prose the systems have moved past, and specs whose stamped source fingerprint no longer matches. Read this before assuming the design is coherent; fix the first kind with resync_from_idea.

ParameterTypeDescription
project_idstring

resync_from_idea

The recipe for re-syncing ONE changed Idea note into the specs that depend on it — the same scoped job the app's "Re-sync N systems" button does, minus the button. Returns the note, the affected specs in full, and exactly how to send the result back. You do the writing; it lands in the owner's Inbox to ADOPT. CRUCIAL: send updates with `resync:true`, or the owner adopts your fix and the design still reports it as stale.

ParameterTypeDescription
note *stringThe Idea note's title or id (from get_stale)
project_idstring

get_design_document

The WHOLE design as one readable document — Vision (+ Project DNA) → every System spec → reference notes, compiled deterministically from the current design. Read this to understand a project end-to-end instead of walking list_systems → get_system N times. Returns markdown plus the project `version` it was compiled from. Long designs come back PAGED — the header says 'part N of M', call again with `page: N+1` for the rest. Pass `for_summary: true` to get the condensed projection instead (every system's Goal + Boundary, tables stripped, one page) — that is what you should summarize…

ParameterTypeDescription
for_summarybooleanReturn the condensed summarization source (all system goals + boundaries, no tables) instead of the full document
pagenumberWhich part of the full document to return (default 1). The header tells you how many parts there are.
project_idstring

set_design_overview

Write the Design Document's Overview — the human-readable page a new team member reads first. WRITES DIRECTLY (no Inbox): it is a derived, clearly-labelled AI summary, not design truth, and the owner can clear or rewrite it in one click. HARD RULES, same as the in-app button: use ONLY facts stated in the design (call get_design_document with for_summary:true first); invent no mechanics, numbers or names; describe, never evaluate; write in the design's dominant language. Structure: `### What this is` · `### The core loop` · `### How the systems fit` (which system feeds which — the part a…

ParameterTypeDescription
summary *stringThe Overview in markdown, starting at `### What this is`
project_idstring

get_briefing

ONE-CALL orientation before you build: pass `files` you're about to edit (or a `task`) → the systems that own them, each with Goal + Acceptance + build status/files/last_commit/drift + coupled_systems (code neighbors an edit may break) + pending Inbox changes + recent decisions, plus open-rejection count, who's active, `recent_changes` (what happened since you were last here — a session handoff), and a task to claim. Replaces the get_project_meta→get_system→get_build_region dance.

ParameterTypeDescription
filesarrayRepo-relative paths you're about to touch — mapped to their systems
project_idstring
taskstringA task id or name — briefs its milestone's systems instead

get_system

ONE system's full spec (Goal/Boundary/Acceptance, markdown, sources, status) + pending Inbox changes touching it.

ParameterTypeDescription
idstringPreferred
namestringIf no id
project_idstring

list_systems

All systems, compact: id, name, status, 1-line goal.

ParameterTypeDescription
project_idstring

get_build_region

System→code map per built system: implementing files, status, drift flag, last_commit, and acceptance-evidence COUNTS. Mapped files gone from the repo? report_drift. Pass `system:"<name|id>"` for ONE system plus the full text of its acceptance criteria (omitted from the map — it is the bulk of the payload). Big projects come back paged: the body says 'page N of M', call again with `page: N+1`.

ParameterTypeDescription
pagenumberWhich page of the map (default 1); the body tells you how many there are
project_idstring
systemstringOne system by name or id — returns its acceptance-criteria detail too

report_drift

Flag CODE DRIFT — mapped files no longer match the repo. Advisory; a fresh report_build_status clears it.

ParameterTypeDescription
idstringPreferred
missing_filesarrayPaths that no longer exist
namestringIf no id
notestringOptional — what drifted
project_idstring

get_history

DESIGN MEMORY: recorded decisions/logs/rejections with who/when. Read BEFORE changing a system's direction; empty = no recorded WHY — don't invent one.

ParameterTypeDescription
limitnumberDefault 30, max 100
project_idstring
querystringKeyword filter
systemstringSystem id or exact name

get_impact

BLAST RADIUS of a system (deterministic): upstream context, siblings, dependent screens/milestones, files, code-coupled systems, pending Inbox, recent activity. Run BEFORE changing it.

ParameterTypeDescription
idstringPreferred
namestringIf no id
project_idstring

get_rejections

Owner's DECLINED list — check at session start; follow each entry's guidance, then resolve_rejection(title).

ParameterTypeDescription
project_idstring

resolve_rejection

Report you REVERTED a declined change (unlocks the owner's Clear). Call after realigning the build.

ParameterTypeDescription
title *stringExactly as get_rejections returned it
project_idstring

list_screens

All screens, compact: id, name, purpose, status.

ParameterTypeDescription
project_idstring

get_screen

ONE screen's layout: canvas `resolution` (use THESE px), elements x/y/w/h, links, popups. Read before editing a screen. has_reference_image:true → get_screen_image shows you the actual image.

ParameterTypeDescription
idstringPreferred
namestringIf no id
project_idstring

get_screen_image

A screen's reference image (HUD background) as an actual IMAGE you can see — reads the stored file inline (signed-URL fallback past 4MB).

ParameterTypeDescription
idstringPreferred
namestringIf no id
project_idstring

update_element

Move/resize/relabel an element — DIRECT, live. element_id (preferred) or screen+label; x+y also places an unplaced one.

ParameterTypeDescription
element_idstringFrom get_screen (preferred)
hnumber
labelstringCurrent label
new_labelstringRename (optional)
notestring"" clears
project_idstring
screenstringWith label, if no element_id
systemstringSystem it serves
typestringe.g. button/bar/panel (optional)
wnumber
xnumberpx on the screen's canvas
ynumber

withdraw_proposal

Remove YOUR OWN still-pending Inbox item (id from the propose response / get_inbox).

ParameterTypeDescription
id *stringThe pending item's id
project_idstring

delete_entity

PROPOSE a delete → Inbox (owner adopts; nothing deleted now). id preferred or exact name; flow_edge may use from+to.

ParameterTypeDescription
kind *stringWhat to delete
fromstringflow_edge: source screen
idstringEntity/task/element/edge id
namestringExact name/title (if no id)
project_idstring
tostringflow_edge: destination screen

dedupe

Remove duplicate-named entries (keep first) — DIRECT, destructive.

ParameterTypeDescription
kind *stringWhat to dedupe
project_idstring
screenstringFor kind=elements

reorder

Reorder milestones / tasks / elements — DIRECT. order = ids in new order; omitted keep relative order.

ParameterTypeDescription
kind *stringWhat to reorder
order *arrayIds in the new order
milestonestringFor kind=tasks (name)
milestone_idstringFor kind=tasks
project_idstring
screenstringFor kind=elements

list_milestones

All milestones, compact: id, name, weeks, order, done/total.

ParameterTypeDescription
project_idstring

get_milestone

ONE milestone: goal, weeks, difficulty, systems, every task (id/name/done/status/effort).

ParameterTypeDescription
idstringPreferred
namestringIf no id
project_idstring

list_activity

Change history {who, change, entity, kind, when}, newest first; filter kind/who/query.

ParameterTypeDescription
kindstringsystem | context | milestone | screen (optional)
limitnumberDefault 30, max 200
project_idstring
querystringKeyword filter (optional)
whostringAuthor email substring (optional)

get_inbox

PENDING Inbox (the owner's triage queue). Check BEFORE proposing — avoid duplicates. Read-only.

ParameterTypeDescription
project_idstring

propose_system

Propose a NEW system → Inbox. spec = ## Goal / ## Boundary (Owns · Doesn't own) / ## Acceptance. Exists? use update_system. (Alias: create_proposal.)

ParameterTypeDescription
spec *stringMarkdown: ## Goal / ## Boundary / ## Acceptance
title *stringSystem name (Title Case, English)
acknowledge_rejectionbooleanOnly after a DECLINED bounce AND asking the user
batchstringimport_from_code batch id
derives_fromarrayContext note title(s) this system derives from → wires provenance (upstream + siblings)
filesarrayImplementing paths, ONE file per entry
project_idstring

propose_context

Propose a new/updated Idea note → Inbox. Title-match to update; send the COMPLETE revised text. Set resync:true ONLY when you rewrote the note FROM the current systems (get_stale lists notes the systems have moved past) — it stops the adopted note from immediately nagging to re-generate the systems it was just written from.

ParameterTypeDescription
content *stringComplete text, not a delta
title *stringMatch existing to update, or new to add
acknowledge_rejectionbooleanOnly after a DECLINED bounce AND asking the user
batchstringimport_from_code batch id
project_idstring
resyncbooleanThis note was re-derived from the current systems — re-stamps both staleness signals on adopt

propose_dna

Propose Project DNA and/or Tech Notes → Inbox (at least one).

ParameterTypeDescription
batchstringimport_from_code batch id
dnastringOmit to leave unchanged
project_idstring
tech_notesstringOmit to leave unchanged

update_system

Propose a system UPDATE → Inbox diff. get_system first; send the FULL revised spec. new_title renames; context_title+context bundles the Idea update. Set resync:true ONLY when you rewrote this spec FROM its upstream Idea (see resync_from_idea) — it re-stamps the staleness signal on adopt.

ParameterTypeDescription
spec *stringFull revised spec markdown
acknowledge_rejectionbooleanOnly after a DECLINED bounce AND asking the user
contextstringFull revised Idea text
context_titlestringIdea section to also update
idstringPreferred
namestringIf no id
new_titlestringRename in the same card
project_idstring
resyncbooleanThis spec was re-derived from its upstream Idea — re-stamps sourceSig on adopt. Never set it on an ordinary edit.

get_balance

Read Balance Lab: stat tables, boards with EVALUATED values, scenarios.

ParameterTypeDescription
boardstringOne board (omit = all)
include_rowsbooleanfalse = schema only
project_idstring

propose_balance_table

Propose a stat-doc TABLE → Inbox. csv (header; `key%` = percent; first column = name) OR schema+rows. Adopting REPLACES same-named.

ParameterTypeDescription
title *stringTable name
csvstringHeader + rows; non-numeric = info
project_idstring
registrybooleantrue = the shared Stats registry
rowsarray[{name, atk: 350, …}]
schemaarray[{key, mode: flat|pct|text, base, min, max, desc}]

propose_balance_board

Propose a node board → Inbox. Kinds const|formula|item|sheet|loadout|picker|pool|process|note|frame; formulas reference blocks by NAME; omit x/y = auto-layout. Adopting REPLACES same-named.

ParameterTypeDescription
name *stringBoard name
nodes *arraye.g. {kind:"formula",name:"dmg",formula:"atk - mdef"}
project_idstring

propose_milestone

Propose a NEW milestone (+ optional tasks) → Inbox.

ParameterTypeDescription
name *stringMilestone name
acknowledge_rejectionbooleanOnly after a DECLINED bounce AND asking the user
goalstringOne-line goal (optional)
project_idstring
tasksarrayTask names (optional)

report_milestone_progress

Mark existing-milestone tasks done → Inbox progress card (owner adopts the ticks).

ParameterTypeDescription
done_tasks *arrayTask names that are done
idstringPreferred
milestonestringMilestone name (if no id)
project_idstring

report_build_status

Report a SYSTEM's status (todo|in-progress|implemented) — DIRECT, live. ALWAYS pass files (full list — it REPLACES); non-todo with no files shows done-but-EMPTY. 'implemented' counts as VERIFIED only when every UNIT-TESTABLE ## Acceptance bullet is backed via evidence[{criterion,proof}]; a bullet tagged [manual]/[e2e]/[ui]/[wip] is EXEMPT (verified by manual/e2e). Otherwise it's a CLAIM (verified:false) and the response names the unbacked criteria. TWO tiers: VERIFIED = a test is NAMED; GREEN (guarantee) = you RAN the test and reported `passed:true` on the evidence — green goes stale aft…

ParameterTypeDescription
status *stringtodo | in-progress | implemented
decisionsarrayDecisions/divergences (prose)
evidencearrayMap ## Acceptance bullets to a test/file: [{criterion, proof, passed?, at?}]. Re-send full set (replaces). proof-only = backed (claimed); passed:true = test-green (guarantee).
filesarrayONE file per entry (optional ' — function'); prose → decisions
idstringPreferred
namestringIf no id
project_idstring
versionstringe.g. "0.379.0"

propose_flow_edge

SECONDARY (user-driven UI): propose a link between two existing screens → Inbox.

ParameterTypeDescription
from *stringSource screen name
to *stringDestination screen name
labelstringTransition label (optional)
project_idstring

propose_element

SECONDARY (user-driven UI): propose an element onto a screen → Inbox. ALWAYS pass x/y/w/h (px on the screen's `resolution` from get_screen); no coords = unplaced pile.

ParameterTypeDescription
label *stringElement label, e.g. 'HP bar'
screen *stringExisting screen name
hnumberDefault 40
notestring
project_idstring
systemstringSystem it serves
typestringbutton/bar/panel/text (default box)
wnumberDefault 120
xnumberLeft px
ynumberTop px

propose_screen

SECONDARY (user-driven UI): propose a NEW screen → Inbox. parent = popup over that screen; purpose grounds AI suggestions. Whole UI? design_ui_from_systems first.

ParameterTypeDescription
name *stringScreen name (Title Case, English)
parentstringMake it a POPUP over this screen
project_idstring
purposestringWhat this screen is for

report_screen_status

Report a SCREEN's status (todo|in-progress|implemented) → Inbox.

ParameterTypeDescription
screen *stringScreen name
status *stringtodo | in-progress | implemented
project_idstring

rename_screen

Rename a screen IN PLACE — DIRECT; links/elements follow (id-referenced).

ParameterTypeDescription
name *stringExact CURRENT name
new_name *stringNew name (must not collide)
project_idstring

update_milestone

Edit milestone goal/weeks/difficulty/name — DIRECT. new_name renames (never delete+recreate).

ParameterTypeDescription
difficultystring"" clears
goalstring
idstringPreferred
namestringCurrent name (if no id)
new_namestringRename
project_idstring
weeksnumber

add_task

Add a task to a milestone — DIRECT. assignee:"me" claims on creation.

ParameterTypeDescription
name *stringTask name
assigneestring"me" claims it
doneboolean
effortstring
humanbooleanHuman-only (GTM/validation/people work) — next_task & get_briefing skip it
milestonestringIf no id
milestone_idstringPreferred
project_idstring
statusstring

next_task

DISPATCHER (multi-agent): atomically pick + claim the next task to build — walks milestones in order, skips human-only tasks and any task whose systems share code files with a task another agent already holds or is actively touching, so parallel agents spread out instead of colliding. Returns the claimed task + systems, or why none is free. dry_run:true peeks without claiming.

ParameterTypeDescription
dry_runbooleanPeek without claiming
project_idstring

update_task

Edit a task or CLAIM it — DIRECT. assignee:"me"+status:"in-progress" claims (errors if held; force:true for stale); done:true or assignee:"" releases.

ParameterTypeDescription
task_id *stringFrom get_milestone
assigneestring"me" claims; "" releases
donebooleantrue releases the claim
effortstring"" clears
forcebooleanTake over a STALE claim only
humanbooleantrue = human-only (next_task/get_briefing skip it); false clears
namestring
project_idstring
statusstring"" clears