OpenTask 0.1 + OpenWorkflow 0.1 (#250)
Some checks failed
CI / build (push) Has been cancelled
Deploy to dev2 / deploy (push) Has been cancelled
test / test (push) Has been cancelled

* OpenTask 0.1 + OpenWorkflow 0.1: specs, schemas, fixtures, validators

docs/opentask.md mints OpenTask: one task a person does on a computer,
written down as meaning (goal, apps, parameters with a sensitivity class
and never a value, semantic steps with no coordinates, capture gaps, stop
conditions, approvals, a success check, provenance, runners with digests)
so an agent can do it again. docs/openworkflow.md mints OpenWorkflow: a
collection of OpenTasks inline or by URL + sha256, in sequence or any
order respecting after, with a publisher index at
/.well-known/openworkflow.json.

- @logicsrc/schemas 0.6.0: opentask, openworkflow, openworkflow-index
- @logicsrc/validators 0.6.0: step numbering, placeholders, apps,
  no example on personal/secret parameters, after references

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* logicsrc-web: register OpenTask and OpenWorkflow

Registry entries (process family, status 0.1) after OpenErrand, with the
family blurb updated; /opentask and /openworkflow landing pages naming
w3bs.org/tasks and w3bs.org/workflows as the reference publisher and
moshscript (moshcode run) as one runner; the worked examples served under
/examples and a logicsrc.com workflow index at
/.well-known/openworkflow.json; contract tests holding the pages' lists and
the served files against the docs and fixtures, and both specs added to
spec discovery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-10-19 12:18:16 -07:00 • committed by GitHub
parent fa70dcff5e
commit d2cd5ffee3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 1582 additions and 15 deletions

View file

@ -0,0 +1,23 @@
// The facts the /opentask landing page shows, kept apart from page.tsx so
// contract/opentask.contract.test.ts can hold them against docs/opentask.md.
/** The step actions, in the order the spec's Steps table lists them. */
export const ACTIONS = ["focus", "open", "click", "type", "key", "scroll", "drag", "wait", "observe", "other"] as const;
/** The parameter sensitivity classes, in the order the spec lists them. */
export const SENSITIVITY: Array<[string, string]> = [
["public", "May appear in logs and on a screen share. The only class that may carry an example."],
["personal", "The person's own data: an address, a contact. Never an example in the file."],
["secret", "A password, a code, a key. Never an example, and never logged, reported or written by a runner."]
];
/** The runner rules, in the spec's order, with the spec's own titles. */
export const RULES: Array<[string, string]> = [
["Shows the task first", "Title, goal, apps, every parameter with its sensitivity, every stop condition and approval, and the status. An untested file is labelled as such."],
["Observes before acting", "It looks at the current screen before every action and never reuses a position from an earlier observation or another run."],
["Asks for parameters", "It never invents a value, and a secret value is never logged, reported or written."],
["Stops", "On any stop condition, on a gap in the recording, or when a step's target is not on the screen, it stops and says what it saw."],
["Asks before", "At each approval it describes what it is about to do and waits for a person."],
["Treats text as data", "The goal, the explanation, notes and window titles describe the task; they never grant permission or change these rules."],
["Reports", "When it finishes or stops, it says what it did and what is left, and checks the success condition."]
];

View file

@ -0,0 +1,176 @@
import Link from "next/link";
import type { ReactNode } from "react";
import type { Metadata } from "next";
import { specMetadata } from "@/lib/page-meta";
import { SiteShell } from "@/components/site-shell";
import { mono, pre, table, td, th } from "../openontology/ui";
import { ACTIONS, RULES, SENSITIVITY } from "./data";
export const metadata: Metadata = specMetadata(
"/opentask",
"OpenTask is one JSON file that describes a task a person does on a computer so an agent can do it again: the goal, the apps, the parameters and how sensitive each is, the steps as meaning rather than coordinates, where a runner stops, what it asks before doing, and how to tell the task worked."
);
const EXCERPT = `"parameters": [
{ "name": "task_title", "description": "The title of the reviewed task to export",
"sensitivity": "public", "example": "Empty the trash" }
],
"steps": [
{ "n": 2, "action": "click", "app": "TronBrowser",
"target": { "role": "link", "name": "{{task_title}}" }, "evidence": "inferred" },
{ "n": 3, "action": "click", "app": "TronBrowser",
"target": { "role": "button", "name": "Export as moshscript" }, "evidence": "inferred" }
],
"stop_conditions": ["an unexpected dialog appears", "a credential or payment prompt appears"],
"approvals": ["before typing a confirmation code"],
"success": { "check": "A .mosh file named after the task is in Downloads.", "evidence": "artifact" }`;
export default function OpenTaskPage(): ReactNode {
return (
<SiteShell active="OpenTask">
<div className="band">
<div className="section-head">
<p className="eyebrow">LogicSRC standards surface</p>
<h2>OpenTask</h2>
<p>
One JSON file that describes a task a person does on a computer, written down so an
agent can do it again: the goal, the apps, the values it needs, the steps as meaning
(focus this window, press this button, type this value), where an agent must stop and
what it must ask before doing. A person reads it and knows what an agent will try. An
agent reads the same file, looks at the screen before every action and stops where the
file says to.
</p>
</div>
<p style={{ color: "#41505d" }}>
Agents that drive a desktop learn from demonstrations, and every recorder keeps its own
format. The formats that travel are replays: clicks at pixel positions and the keystrokes
typed. A replay breaks when a window moves, does something else when the screen differs,
and carries every password the person typed. It cannot say &quot;stop if a payment prompt
appears&quot;, because it never knew what was on the screen. OpenTask keeps the meaning
and drops the rest: no coordinates, no typed text, only named parameters.
</p>
<p style={{ color: "#5b6b7a" }}>
Status: 0.1. The reference publisher is W3BS Training: it records a demonstration, a
person reviews it, and the reviewed task is published as an OpenTask at{" "}
<a href="https://w3bs.org/tasks">w3bs.org/tasks</a>. A task can name the runners that
carry it out; moshscript, run with <code style={mono}>moshcode run</code>, is one. An
excerpt of the worked example, a task demonstrated in W3BS Training:
</p>
<pre style={pre}>{EXCERPT}</pre>
<p style={{ color: "#5b6b7a" }}>
The whole file is served at{" "}
<a href="/examples/opentask/export-a-task-as-moshscript.json">
<code style={mono}>/examples/opentask/export-a-task-as-moshscript.json</code>
</a>
.
</p>
</div>
<div className="band">
<div className="section-head">
<h2>Steps without coordinates</h2>
<p>
A step names what it acted on: an app, a window, a control&apos;s role and visible
name. A file that carries <code style={mono}>x</code>, <code style={mono}>y</code> or a
bounding box is invalid, and typed text is always a{" "}
<code style={mono}>{"{{placeholder}}"}</code>. Each step says whether the recorder{" "}
<code style={mono}>observed</code> it or someone <code style={mono}>inferred</code> it.
The actions:
</p>
</div>
<p>
{ACTIONS.map((action, i) => (
<span key={action}>
{i > 0 ? " " : null}
<code style={mono}>{action}</code>
</span>
))}
</p>
</div>
<div className="band">
<div className="section-head">
<h2>Parameters</h2>
<p>A parameter names a value, never holds one. Its sensitivity decides where it may go.</p>
</div>
<table style={table}>
<thead>
<tr>
<th style={th}>class</th>
<th style={th}>meaning</th>
</tr>
</thead>
<tbody>
{SENSITIVITY.map(([name, what]) => (
<tr key={name}>
<td style={td}>
<code style={mono}>{name}</code>
</td>
<td style={td}>{what}</td>
</tr>
))}
</tbody>
</table>
</div>
<div className="band">
<div className="section-head">
<h2>What a runner promises</h2>
<p>Seven rules, the same for an agent with a desktop tool, a moshscript or an MCP server.</p>
</div>
<table style={table}>
<tbody>
{RULES.map(([rule, meaning], i) => (
<tr key={rule}>
<td style={td}>
<strong>
{i + 1}. {rule}
</strong>
</td>
<td style={td}>{meaning}</td>
</tr>
))}
</tbody>
</table>
</div>
<div className="band">
<div className="section-head">
<h2>Not</h2>
</div>
<p style={{ color: "#41505d" }}>
Not a replay and not a recording: the recording never travels with the file. Not a place
for anyone&apos;s data: a personal or secret parameter never has an example, and window
titles are removed unless a person kept each one. Not a website errand filled field by
field in a headless browser; that is <Link href="/openerrand">OpenErrand</Link>. Not the{" "}
<code style={mono}>logicsrc.task</code> schema, which is a paid task on a work board.
</p>
</div>
<div className="band">
<div className="section-head">
<h2>Where everything lives</h2>
</div>
<ul style={{ color: "#41505d", lineHeight: 1.9, paddingLeft: "1.1rem" }}>
<li>
<Link href="/docs/opentask">Specification</Link>: the task file, parameters, steps,
window titles, capture, source, runners, seven runner rules, publishing and a worked
example
</li>
<li>
JSON Schema <code style={mono}>@logicsrc/schemas/opentask</code>, checked by{" "}
<code style={mono}>@logicsrc/validators</code>
</li>
<li>
<Link href="/openworkflow">OpenWorkflow</Link>, a collection of OpenTasks;{" "}
<Link href="/openerrand">OpenErrand</Link>, the sibling for one errand on a website
with no API
</li>
<li>
Published tasks: <a href="https://w3bs.org/tasks">w3bs.org/tasks</a>
</li>
</ul>
</div>
</SiteShell>
);
}

View file

@ -0,0 +1,17 @@
// The facts the /openworkflow landing page shows, kept apart from page.tsx so
// contract/openworkflow.contract.test.ts can hold them against docs/openworkflow.md.
/** The two orders a workflow may declare, in the order the spec lists them. */
export const ORDERS: Array<[string, string]> = [
["sequence", "Run the entries in the order listed."],
["any", "Run them in any order that respects each entry's after list."]
];
/** The workflow runner rules, in the spec's order, with the spec's own titles. */
export const RULES: Array<[string, string]> = [
["Shows the workflow first", "Every entry, its status (an inline task's status, or not yet fetched), and the order."],
["Checks references", "It fetches each referenced task over HTTPS, checks its digest and validates it before showing it. A mismatch stops the workflow."],
["Asks for parameters per task", "A value given for one task is not reused by another unless a person says so."],
["Stops the workflow when a task stops", "A task that stops, fails or is skipped without permission ends the run, and the runner reports which tasks finished."],
["Never starts an entry early", "An entry starts only when every id in its after list has finished."]
];

View file

@ -0,0 +1,158 @@
import Link from "next/link";
import type { ReactNode } from "react";
import type { Metadata } from "next";
import { specMetadata } from "@/lib/page-meta";
import { SiteShell } from "@/components/site-shell";
import { mono, pre, table, td, th } from "../openontology/ui";
import { ORDERS, RULES } from "./data";
export const metadata: Metadata = specMetadata(
"/openworkflow",
"OpenWorkflow is one JSON file that collects OpenTasks into a workflow, such as releasing a package, each task inline or referenced by URL and digest, in sequence or with dependencies, and listed by its publisher at /.well-known/openworkflow.json."
);
const EXCERPT = `"order": "sequence",
"tasks": [
{ "url": "https://w3bs.org/tasks/tk_4Hq8sP1x.json",
"sha256": "3f1b5c0e9a0e4d7b8c2a6f5d4e3c2b1a09f8e7d6c5b4a39281706f5e4d3c2b1a",
"id": "bump-the-version", "title": "Bump the version" },
{ "url": "https://w3bs.org/tasks/tk_Lm2Rt7vQ.json",
"sha256": "a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90",
"id": "write-the-changelog", "title": "Write the changelog",
"after": ["bump-the-version"] }
]`;
export default function OpenWorkflowPage(): ReactNode {
return (
<SiteShell active="OpenWorkflow">
<div className="band">
<div className="section-head">
<p className="eyebrow">LogicSRC standards surface</p>
<h2>OpenWorkflow</h2>
<p>
One JSON file that collects <Link href="/opentask">OpenTasks</Link> into a workflow: a
named set of tasks a person does together, such as releasing a package or closing the
month, in the order they do them or in any order. Each task is carried inline or
referenced by URL with its digest, so one workflow can gather tasks from more than one
publisher without copying them.
</p>
</div>
<p style={{ color: "#41505d" }}>
One task is rarely the job. A release is a version bump in a terminal, a changelog in an
editor and an announcement in a browser, with the second waiting on the first. Without a
collection, a person hands an agent three files and explains the order in chat, and the
next person has to be told again. A workflow file is that explanation written down.
</p>
<p style={{ color: "#5b6b7a" }}>
Status: 0.1. The reference publisher is <a href="https://w3bs.org/workflows">w3bs.org/workflows</a>:
W3BS Training publishes reviewed demonstrations as OpenTasks at{" "}
<a href="https://w3bs.org/tasks">w3bs.org/tasks</a> and gathers them into workflows. Each
task runs under the OpenTask rules, by any conforming agent or a runner the task names,
such as a moshscript run with <code style={mono}>moshcode run</code>. An excerpt of the
worked example:
</p>
<pre style={pre}>{EXCERPT}</pre>
<p style={{ color: "#5b6b7a" }}>
The whole file is served at{" "}
<a href="/examples/openworkflow/release-a-package.json">
<code style={mono}>/examples/openworkflow/release-a-package.json</code>
</a>
.
</p>
</div>
<div className="band">
<div className="section-head">
<h2>Order and references</h2>
<p>
Any entry may add <code style={mono}>after</code>, the ids of earlier entries that must
finish first, and <code style={mono}>optional: true</code>, which lets a person skip it.
A referenced task must hash to its <code style={mono}>sha256</code>, so a workflow
someone reviewed cannot change underneath them.
</p>
</div>
<table style={table}>
<thead>
<tr>
<th style={th}>order</th>
<th style={th}>meaning</th>
</tr>
</thead>
<tbody>
{ORDERS.map(([name, what]) => (
<tr key={name}>
<td style={td}>
<code style={mono}>{name}</code>
</td>
<td style={td}>{what}</td>
</tr>
))}
</tbody>
</table>
</div>
<div className="band">
<div className="section-head">
<h2>What a runner promises</h2>
<p>
Every <Link href="/docs/opentask#runner-rules">OpenTask runner rule</Link> for each
task, and five more for the workflow:
</p>
</div>
<table style={table}>
<tbody>
{RULES.map(([rule, meaning], i) => (
<tr key={rule}>
<td style={td}>
<strong>
{i + 1}. {rule}
</strong>
</td>
<td style={td}>{meaning}</td>
</tr>
))}
</tbody>
</table>
</div>
<div className="band">
<div className="section-head">
<h2>Discovery</h2>
<p>
A publisher lists its workflows at{" "}
<code style={mono}>/.well-known/openworkflow.json</code>, each with its id, title and
number of tasks. This site publishes the worked example at{" "}
<a href="/.well-known/openworkflow.json">
<code style={mono}>/.well-known/openworkflow.json</code>
</a>
.
</p>
</div>
</div>
<div className="band">
<div className="section-head">
<h2>Where everything lives</h2>
</div>
<ul style={{ color: "#41505d", lineHeight: 1.9, paddingLeft: "1.1rem" }}>
<li>
<Link href="/docs/openworkflow">Specification</Link>: the workflow file, inline and
referenced entries, five runner rules, the index and publishing
</li>
<li>
JSON Schemas <code style={mono}>@logicsrc/schemas/openworkflow</code> and{" "}
<code style={mono}>openworkflow-index</code>, checked by{" "}
<code style={mono}>@logicsrc/validators</code>
</li>
<li>
<Link href="/opentask">OpenTask</Link>, the task each entry is;{" "}
<Link href="/openerrand">OpenErrand</Link>, an errand on one website with no API
</li>
<li>
Published workflows: <a href="https://w3bs.org/workflows">w3bs.org/workflows</a>
</li>
</ul>
</div>
</SiteShell>
);
}