Skip to content

SLOT-FCP-FACTORY: real pipeline authoring system (library + CLI + official template) - #6

Merged
Gio2050 merged 6 commits into
mainfrom
mission/afi-factory-configurable-pipelines-v1
Jul 17, 2026
Merged

SLOT-FCP-FACTORY: real pipeline authoring system (library + CLI + official template)#6
Gio2050 merged 6 commits into
mainfrom
mission/afi-factory-configurable-pipelines-v1

Conversation

@Gio2050

@Gio2050 Gio2050 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Slot: SLOT-FCP-FACTORY (decision: factory-configurable-pipelines-v1).

Replaces the 3-file placeholder with the real authoring system: byte-pinned vendored governed-schema closure (afi-config @ e462c4e8, sha256 MANIFEST + non-skippable drift test), codegen'd contract types (no hand-written mirrors), strict-AJV + semantic graph validation (parity-proven against all 22 afi-config pipeline vectors), template instantiation, canonical-json-hashing.v1 (6/6 KATs byte-exact), Kahn-wave inspection, plugin scaffolding, and the full commander CLI (init / template create|validate|inspect|instantiate / pipeline validate|inspect / analyst-config create|validate / plugin scaffold / hash) — nonzero on invalid, JSON-pointer errors, works from a clean clone with no sibling checkouts.

Official artifacts: the froggy-trend-pullback template + instantiated 7-node manifest + 7 plugin manifests + analyst-config + committed canonical hashes (manifestHash b8d9b734…, analystConfigHash 269ae355…, pluginSetHash 6d54c8b7…), plus the 8 conformance proof graphs. Two byte-verbatim TEMPORARY SEQUENCING SHIMS (schemas/index.ts, template_registry.ts) keep afi-reactor main compiling until SLOT-FCP-CLEANUP.

127/127 tests green three ways (with/without pinned checkout + true clean clone); adversarially verified (independent Python hash recomputation, drift-test mutation proof, 15+ CLI probes).

🤖 Generated with Claude Code

Gio2050 and others added 6 commits July 16, 2026 22:06
…ng shims

Remove the phase-1 placeholder surface (factory_intro.md, agent_manifest.json,
agent-prompts/, init_repo.sh, schemas/README.md, schemas/__tests__) — git
history is the archive. Keep schemas/index.ts and template_registry.ts
byte-verbatim from origin/main plus an explicit TEMPORARY SEQUENCING SHIM
header: they exist only so afi-reactor main compiles (type import
'afi-factory/schemas/index' + dormant dynamic 'afi-factory/template_registry'
import in src/dag tests) until SLOT-FCP-REACTOR/CLEANUP; removal is scheduled
under SLOT-FCP-CLEANUP.

SLOT-FCP-FACTORY (afi-governance decisions/factory-configurable-pipelines-v1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d contract types

- package.json: real build/typecheck/test scripts (vitest; pretest builds),
  minimal deps (ajv + ajv-formats + commander), bin wiring for the CLI,
  exports for the new library alongside exactly the two legacy shim paths,
  files list; no dependency on afi-config as a package and no sibling file:
  links — the repo works from a clean clone.
- src/governed-schema/: byte-identical vendored copies of the afi-config
  contracts this repo consumes (pipeline/v1, pipeline-template/v1,
  analysis-plugin/v1, analyst-strategy-config/v1,
  analyst-strategy-registration/v1, provider-strategy-binding/v1,
  composition-ref/v1, provenance/v1 canonical-hash, the
  canonical-json-hashing.v1 spec, and the hashing KAT vectors), pinned in
  MANIFEST.json to afi-config e462c4e8bef5fda946ca19a826f5c53c6d202151 with
  per-file sha256 (afi-infra governed-schema discipline).
- scripts/codegen{-lib,}.mjs + src/generated/: contract TypeScript types
  derived from the vendored schemas via json-schema-to-typescript (committed;
  freshness test-enforced) — no hand-written type mirrors.
- scripts/copy-assets.mjs: ships the schema closure into dist for runtime.

SLOT-FCP-FACTORY (afi-governance decisions/factory-configurable-pipelines-v1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Library (src/): canonical-json-hashing.v1 implemented exactly per the vendored
governed spec (KAT-proven) with the D-FCP-7 domain-tagged helpers
(manifestHash afi.d2.composition-manifest, analystConfigHash
afi.d2.analyst-config, pluginSetHash afi.d2.plugin-set over
{schema:'afi.plugin-set.v1', plugins sorted by pluginId}); strict AJV
validation with the whole vendored closure preloaded and JSON-pointer errors;
the afi-config-mirrored semantic graph layer (unique ids, known endpoints,
Kahn acyclicity, exactly-one non-bypassable scorer sink, join-iff-indegree>1,
prefer:-parent, condition-path well-formedness, timeout/retry bounds) plus
fail-closed plugin-binding checks (unknown pluginId/version = error,
paramsSchema config validation, permittedFailurePolicies, multiInstance,
mayFeedScorer, category-level ordering constraints); template instantiation
per the x-afiConstraints.instantiation algorithm (fail closed end-to-end);
analyst-config semantic + cross-artifact checks (strategyId major agreement,
manifestHash pin, scorer agreement, bounded overrides); resolved-graph
inspector (execution order, Kahn waves, node table, join/condition summary;
text and JSON); plugin manifest + implementation-contract scaffolding.

CLI (bin afi-factory, commander): init; template create|validate|inspect|
instantiate; pipeline validate|inspect; analyst-config create|validate;
plugin scaffold; hash <file> [--kind pipeline|analyst-config|plugin-set].
All commands exit nonzero on invalid input, support --json, carry
JSON-pointer error paths, and never report validity without executing real
validation (hash refuses invalid artifacts).

SLOT-FCP-FACTORY (afi-governance decisions/factory-configurable-pipelines-v1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e proof graphs

templates/official/froggy-trend-pullback/: the program's fixed 7-node design —
technical entry (candleLimit 100, fail-soft) fanning out to pattern (via the
'candles' port), sentiment, and news (windowHours 4) branches; deterministic
namespace-by-node merge with conflictRule error and all four join edges
optional:true (degraded parents contribute empty namespaces); aiMl
augmentation of the merged view; single afi-scorer-froggy-trend-pullback sink.
Authored as afi.pipeline-template.v1 (candleLimit/newsWindowHours parameters)
plus the INSTANTIATED canonical afi.pipeline.v1 manifest; the SEVEN official
afi.analysis-plugin.v1 manifests (determinism, capabilities incl.
provider:price-feed / provider:coinalyze+secret:COINALYZE_API_KEY /
provider:newsdata+secret:NEWSDATA_API_KEY / service:tiny-brains, failure
policies, multiInstance:true for analysis categories, mayFeedScorer flags);
the official analyst-strategy-config for froggy (froggy/trend_pullback_v1/
1.0.0, hash-pinned pipelineRef, scorerRef, uwr-weighted-lifts-v0.1,
decay-swing-v1); and hashes.json with the committed canonical hashes
(manifestHash/analystConfigHash/pluginSetHash) downstream waves pin.

Design adaptations, per contract: plugin ids use hyphens
(afi-analysis-technical, ...) because the governed pluginId pattern is
^[a-z0-9-]+$ (dots are not representable); sentiment/news 'additional roots'
are expressed as fan-out edges from the single technical entry because the
governed contract requires one entry with full reachability — they still
execute concurrently (Kahn wave 1).

fixtures/conformance/: the eight configurability proof graphs (one-category;
sequential; parallel; branch+deterministic join; conditional node; repeated
same-category with different params; fail-soft optional category; critical
category failure) as valid, clearly non-production manifest documents.

SLOT-FCP-FACTORY (afi-governance decisions/factory-configurable-pipelines-v1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…n, official pins, CLI, codegen freshness, no-dangling-references

- governed-schema-drift: sha256 pins verified on EVERY run; byte-equality
  against a pinned afi-config checkout whenever AFI_CONFIG_DIR is provided
  (CI always provides it); pinned commit + closure-coverage asserted.
- hashing-kat: all six vendored KAT vectors byte-exact (canonical form +
  sha256); manifestHash/analystConfigHash agree with the KAT digests under
  the D-FCP-7 domain tags; pluginSetHash composition rule + order
  insensitivity.
- validation: the afi-config-mirrored graph-semantic layer (duplicates,
  endpoints, cycles, scorer cardinality/terminality/bypass, join rules,
  prefer-parent, condition paths, bounds) at both layers, plugin-binding
  fail-closed checks, analyst-config cross-artifact checks, registration and
  provider-binding cross-field rules.
- template: declaredSlots + fail-closed instantiation (missing required,
  ill-typed, unknown params, inadmissible results).
- official-artifacts: the exact 7-node design graph, template->manifest
  reproduction, hashes.json recomputed equal (hash stability across runs).
- conformance-fixtures: the eight proof graphs drift-guarded and fully
  admissible with per-proof shape assertions.
- cli: built-bin behaviour via child_process — nonzero on invalid, --json
  output, JSON-pointer errors, refuse-to-hash-invalid, hash stability,
  init/scaffold round-trips.
- codegen-freshness: committed src/generated byte-equal to a fresh
  generation from the vendored schemas.
- no-dangling-references: every path referenced by package.json,
  .afi-codex.json, MANIFEST.json, hashes.json, and doc links exists.

SLOT-FCP-FACTORY (afi-governance decisions/factory-configurable-pipelines-v1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…al CI

README: what Factory does/does not do, registration vs configuration, local
validation walkthrough, pipeline identity + canonical hashing including the
pluginSetHash composition rule and the D-FCP-7 afi.d2.* domain-tag choice,
failure surfacing (fail-closed posture), graph inspection, the official
froggy template (with the single-entry adaptation recorded), and the
sequencing-shim notice. No visual-editor or untrusted-code claims.

docs/onboarding/: quant authoring, plugin developer, provider binding, and
operator installation personas — accurate to the shipped tooling.

AGENTS.md rewritten honestly (layout, commands, vendoring/codegen/hash-pin
rules). .afi-codex.json corrected: real entrypoints (src/index.ts,
src/cli/index.ts), consumers none-yet (afi-reactor arrives with
SLOT-FCP-REACTOR; its file: link touches only the sequencing shims), and the
vendored afi-config-contracts relationship.

CI (.github/workflows/ci.yml): clean-clone npm ci (no sibling checkouts),
typecheck, build, and the full test run with AFI_CONFIG_DIR pointing at an
explicitly pinned afi-config checkout so the governed-schema drift guard
byte-compares in CI.

SLOT-FCP-FACTORY (afi-governance decisions/factory-configurable-pipelines-v1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 17, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Gio2050
Gio2050 merged commit 9f88ede into main Jul 17, 2026
1 of 2 checks passed
@Gio2050
Gio2050 deleted the mission/afi-factory-configurable-pipelines-v1 branch July 17, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant