mirror of
https://github.com/openprose/prose.git
synced 2026-09-19 05:55:05 +08:00
63c8ce4b23
Move the standard library (previously `github.com/openprose/std`) and
the company-as-prose library (previously local dir
`/Users/sl/code/openprose/company-as-prose`) into this repository
under `packages/std/` and `packages/co/` respectively.
Motivation: concentrate attention on one repository so stars,
discussions, and issues aggregate. `openprose/std` was a genuinely
useful asset nobody could find because ~50 stars on its own repo
told a much worse story than 1,106 stars on `openprose/prose`
would have. Same logic applies to co.
Layout choice: `packages/{std,co}/` rather than `std/` + `co/` at
the repo root. Root siblings accumulate over time, and a flat
top-level made future libraries (hub, kit, dev, etc.) compete with
spec infrastructure. `packages/` is bounded — new libraries land
there without cluttering root. Matches pnpm/Deno/monorepo tooling
conventions.
Changes:
- New: `packages/std/` (copied from openprose/std, `.git` excluded)
- New: `packages/co/` (copied from company-as-prose, README updated
for new name and location)
- `packages/std/README.md`: updated shorthand expansion reference
- `packages/co/README.md`: renamed "company-as-prose" to "co" in
self-references, added std-vs-co split heuristic, updated
`prose run` examples to use `co/` shorthand
- `skills/open-prose/deps.md`:
- `std/` shorthand now expands to
`github.com/openprose/prose/packages/std/`
- `co/` shorthand added, expands to
`github.com/openprose/prose/packages/co/`
- Both shorthands resolve into the same clone of
`openprose/prose` under `.deps/github.com/openprose/prose/`;
`packages/std/` and `packages/co/` are sibling subdirectories
- `prose.lock` format row updated to `host/owner/repo sha`
(matches the explicit-host resolution that landed in #35)
- `.deps/` directory structure example redrawn to show the
`{host}/{owner}/{repo}/packages/{std,co}/...` shape
- Error message and Interaction tables refreshed accordingly
- Resolution Algorithm step 1 now documents both shorthands
- `skills/open-prose/forme.md`: Step 2 resolution list updated to
include co/ shorthand and the host-keyed `.deps/` layout
- `skills/open-prose/help.md`: Q&A "How do dependencies work?"
rewritten to name both shorthands and the new explicit-host model
- `skills/open-prose/state/filesystem.md`: `.deps/` directory
tree re-drawn to include the `{host}/` layer with std/co as
sibling packages inside the clone
- `skills/open-prose/guidance/patterns.md`,
`skills/open-prose/guidance/antipatterns.md`: examples now use
the `std/` shorthand or explicit `github.com/...` rather than
the deprecated bare `openprose/std/` form
- `skills/open-prose/examples/registry-import/index.md`: sample
service reference switched to `std/evals/inspector`
- `README.md`: Stdlib badge replaced with internal `packages/std/`
link plus new `packages/co/` link; "Standard Library" section
rewritten as "Libraries" with both packages described
Out of scope for this PR (deliberately):
- Tooling changes to `prose install` and Forme's `.deps/` writer
to adopt the `{host}/{owner}/{repo}/` layout in practice — this
PR is spec-only. Existing tooling continues to work against
whatever layout it currently implements; the spec now describes
the target.
- Retiring the `openprose/std` GitHub repo. Delete that repo
separately after this merges.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7.7 KiB
7.7 KiB
name, kind
| name | kind |
|---|---|
| company-repo-checker | program |
Services
repo-structure-inspectorcontract-eval-drift-inspectordependency-graph-inspectorrepo-readiness-reporter
Company Repo Checker
Ensures a company-as-prose repository is still organized as an OpenProse-native package before runtime evals or fleet monitors do more expensive work.
This is a reusable public contract. It describes what a company-native repo
should preserve; the agent host executing prose run supplies the concrete
read/search operations.
Requires
repo_path: local path to the company-as-prose repository rootsource_roots: optional list of source roots; default["systems","shared"]legacy_roots: optional list of deprecated flat roots; default["responsibilities","services","delivery","evals","planning"]ignored_roots: optional list of roots ignored by the default check; default[".prose","customers"]external_prefixes: optional service-reference prefixes that are resolved outside this package; default["std/","github.com/","gitlab.com/"]
Ensures
report: structured readiness report containing:source_layout: legacy source roots empty, source under declared rootscontract_surface: executable components declare Requires and Ensureseval_pairing: every program or service has a paired eval subjecteval_metadata: evals declare subject, tier, contract_version, Expects, Expects Not, and Performance Tracked Over Timedependency_graph: Services references resolve and do not cross system-private boundariescounts: executable component count, eval count, dependency edge count
passed: boolean true only when all hard failures are emptyfailures: array of specific file-grounded failures, empty when passed
Strategies
- inspect the repo as a bounded package walk rooted at
repo_path - ignore
.prose/runs/and nested customer packages unless explicitly asked; runtime traces and customer packages have their own migration tracks - fail on stale architecture vocabulary when it affects executable metadata,
such as
kind: deliveryortier: delivery - treat cross-system private dependencies as source ownership bugs; promote the shared primitive or keep the helper local
- produce file-grounded failures that a maintainer can act on directly
- avoid quality scoring here; runtime fleet evals own probabilistic and semantic judgments
Errors
parse_failed: a Contract Markdown file cannot be read or parsedunresolved_service: a Services entry does not resolve in the package walkeval_drift: a component lacks a paired eval or an eval subject does not resolvesource_layout_violation: source appears under a deprecated flat rootownership_violation: shared code depends on system-private code, or one system depends directly on another system's private source
Execution
parallel:
let source_layout = call repo-structure-inspector
repo_path: repo_path
source_roots: source_roots
legacy_roots: legacy_roots
ignored_roots: ignored_roots
let contract_surface = call contract-eval-drift-inspector
repo_path: repo_path
source_roots: source_roots
ignored_roots: ignored_roots
let dependency_graph = call dependency-graph-inspector
repo_path: repo_path
source_roots: source_roots
ignored_roots: ignored_roots
external_prefixes: external_prefixes
let report = call repo-readiness-reporter
source_layout: source_layout
contract_surface: contract_surface
dependency_graph: dependency_graph
return report
repo-structure-inspector
Requires
repo_path: local path to inspectsource_roots: source roots to treat as package-owned sourcelegacy_roots: deprecated roots that should not accumulate source filesignored_roots: roots to skip in default scope
Ensures
source_layout: report with:legacy_roots: status for each deprecated rootsource_roots: status for each declared source rootstale_vocabulary: file-grounded findings for source metadata that uses obsolete executable vocabulary
failures: array of source layout violations
Strategies
- use the package root as the boundary
- allow historical migration maps in docs to mention old roots; fail only when executable source or eval metadata reintroduces old roots or kinds
- flag any committed source file under a deprecated flat root
contract-eval-drift-inspector
Requires
repo_path: local path to inspectsource_roots: source roots to treat as package-owned sourceignored_roots: roots to skip in default scope
Ensures
contract_surface: report with:executable_components: every top-levelkind: programandkind: servicefound under source rootsmissing_contract_sections: components missing### Requiresor### Ensureseval_pairing: paired eval subject status for each executable componenteval_metadata: subject, tier, contract_version, Expects, Expects Not, and Performance Tracked Over Time status for each evalcounts: executable component count and eval count
failures: array of contract or eval drift violations
Strategies
- parse Contract Markdown according to the OpenProse spec: frontmatter for
identity,
###sections for contracts,#headings as human titles - treat
kind: serviceplus### Servicesas a kind mismatch; the component should be a program or inline components should be used - require workflow evals to use
tier: workflow, nottier: delivery - require eval subjects to resolve to a component in the same system or shared package
- allow shared capabilities to use
tier: service,tier: responsibility, ortier: capabilitydepending on the component's role
dependency-graph-inspector
Requires
repo_path: local path to inspectsource_roots: source roots to treat as package-owned sourceignored_roots: roots to skip in default scopeexternal_prefixes: service-reference prefixes resolved outside this package
Ensures
dependency_graph: report with:component_names: globally unique component names under source rootsedges: resolved### Servicesdependency edgesunresolved: service references that do not resolve by component name or explicit external pathownership_violations: shared-to-system-private or system-to-system-private dependenciescounts: dependency edge count
failures: array of dependency graph violations
Strategies
- resolve plain service names by component
name:across the bounded package walk - treat
std/..., host-qualified dependency paths, explicit relative paths, and explicit.mdpaths as external references rather than unresolved local names - fail when a shared component depends on a system-private component
- fail when one system depends directly on another system's private source
- if a cross-system dependency is intentional, require promotion into shared or an explicit path plus TODO naming the promotion condition
repo-readiness-reporter
Requires
source_layout: output from repo-structure-inspectorcontract_surface: output from contract-eval-drift-inspectordependency_graph: output from dependency-graph-inspector
Ensures
report: merged readiness report with sections for source_layout, contract_surface, eval_pairing, eval_metadata, dependency_graph, and countspassed: boolean true only when all failure arrays are emptyfailures: concatenated file-grounded failures from all inspectors
Strategies
- keep the summary short enough for CI or PR review
- list failures before counts
- preserve exact file paths and component names from inspector outputs
- do not downgrade hard failures to warnings