Goal
Provide Open Farming with a stable, bounded planning-only JSON interface to the existing owned agriculture planner. This is the first shared-library slice of the all-19-capability integration roadmap.
The app currently declares Stacks0.74.66 and has no installed runtime dependencies in the inspected checkout; the qualified shared library uses Stacks0.75.221 and is a private source project. Do not bridge this by copying algorithms, absolute developer source imports, incompatible dependency symlinks, installs or upgrades. Reuse the native standalone compiled drone CLI.
Scope
- A public module under resources/functions/drone accepts one bounded primitive JSON request with a closed versioned schema, explicit required metric AgricultureConfig and declared farm/field correlation identifiers.
- Delegate to existing createAgriculturePlan and preserve its bounds/validation. Never infer geometry from a normalized field ring, centroid or hectares, substitute an example fixture, enlarge simulator caps or silently choose another operation.
- Return a closed bounded versioned planning result with original request/configuration identity, explicit reference semantics and retained planner assumptions. Declared farm/field identifiers are not authenticated ownership.
- Expose the same implementation through native defineCommand, Buddy and bin/drone.ts so the existing build produces a standalone command. Preserve existing agriculture commands and their output/exit behavior.
- Planning performs no world/survey simulation, capture, observed NDVI/coverage, hardware/driver calls, ORM/Jobs or operational Mission/Detection/TreatmentMap writes. Future synthetic collection and native app authentication are separate tickets.
Acceptance
- Freeze the exact request/result/error schemas, raw/canonical hash semantics, deterministic snapshot behavior and finite input/output limits before implementation.
- Retain a genuine missing-public-interface RED and independently worked metric area/route/configuration checks through the public function.
- Test malformed/missing/extra fields, invalid identifiers, missing reference/configuration, unsupported operations, existing planner limit rejection, deterministic unchanged input and fixed errors without leaking request contents.
- Verify complete output/exit semantics through source CLI, native Buddy and an actual compiled binary from an outside empty directory with checkout/dependency/source-runtime access denied.
- Keep explicit planning-only and unverified physical/field/ownership status. No fabricated observed values or operational completion.
- Run Pickier/native lint, app/runtime type checks, focused/full tests and exact feature CI; publish the qualified change as Chris with conventional commits/no coauthors/normal main push.
- Document how the later app selects principal -> owned Farm -> Field and provisions a pinned binary/config; do not call app auth integrated until real native route/ORM tests pass on its matching runtime.
Related implemented prerequisites
Existing planning/sensing #21, survey collection #18 and native CLI/build are reusable software interfaces. This ticket does not close their remaining hardware/field acceptance gates and does not require those physical gates to be completed before a planning preview can be useful.
Published planning boundary
Implemented and published in 77b0ee0 with Chris Breuer as author and committer, a conventional commit, no coauthor trailers and a normal fast-forward push to main.
planFarmingObservation accepts the closed, bounded explicit declaration and retains the existing agriculture planner's complete result and assumptions. Native Buddy and the standalone CLI expose farming:plan <request>. The committed example is fictional; source hashes and farm/field declarations do not authenticate ownership or geometry. No collection, observed measurements, dispatch or operational database completion occurs.
Validation retained a genuine missing-interface RED, independently worked nominal/hole route calculations, boundary and CLI tests, Pickier and both type checks. The final local suite passed 1,377 tests with 24 skipped and 0 failures across 1,401 tests in 170 files. The exact feature CI run passed all five jobs; its standard suite passed 1,362 tests with 39 skipped and 0 failures. Source, native Buddy and the copied standalone command produced identical complete streams for the qualified cases under the recorded read-denial profile. Five unchanged agriculture/volume legacy command pairs also matched. Two real Chrome public-barrel cases passed the original independent numerical tolerances; their one-ULP distance difference is documented rather than called byte equality.
The first compiled qualifier's native-usage exit assumption failed in the helper. Its original receipt remains failed; a separate continuation accepted the retained actual native nonzero usage result and ran only the previously unrun legacy cases. Product outputs and source remained unchanged.
The integration document describes principal-to-owned-Farm-to-Field selection and pinned-binary provisioning for the later app adapter. Open Farming issue3, synthetic collection #38 and physical/field gates remain separate. This closes only the planning software boundary. The automatic main CI run was observed in progress after publication and is not yet claimed passed.
Post-publication CI completed successfully on exact main commit 77b0ee030d111d015e805ac3606e3a34d6e9a460: check, workspace-browser, execution-browser, purge-namespace and firmware all passed. Main run 39570794728. Raw logs were retained once locally with SHA256 c8b5daf523172981d404f6476afdd5803302e80d66c155a45270f3c1634758ba. This validates the declared planning preview slice and does not close physical or authenticated app integration gates.