Instructions
- Resolve source and pin. From the jeo-skills repo root, run
python3 .agent-skills/cocoindex/scripts/preflight.py --repo /absolute/upstream --json; from an installed skill root call itsscripts/preflight.py. Omitting--repois inventory only. Hash checks cover selected pinned files, not Git HEAD, the whole tree, dependency state, or runtime. Read pinned behavior and effects. - Model the pipeline, not a database. CocoIndex declares source state, transformations/processing components, and target state, then incrementally propagates changes. It maintains its own internal state database, but the chosen target (for example a relational DB, vector store, file tree, or graph store) remains a separate system. A knowledge-graph example is a pipeline to a graph target, not evidence that CocoIndex is an ontology/database.
- Map the flow before running it. Inspect the app target, source connector, transforms and memoization, target connector, environment variables/secrets, internal state path, and side effects. Identify deletes/updates and whether the app runs catch-up or live mode.
- Request approval for effects. Ask before installing packages/extras; ingesting private or third-party source data; contacting external connectors or paid embedding/model APIs; creating/updating target state; running
update,--full-reprocess,--reset,drop, or live processing; starting services or opening non-loopback ports; or deleting/rebuilding target data.--previewcan plan target actions, but confirm the exact pinned implementation before treating it as effect-free. - Use the actual CLI contract and verify. Check
cocoindex --helpandcocoindex update --helpin the inspected checkout. Start with a small authorized fixture, compare target rows/files and internal state, and confirm incremental changes/deletions. Do not report pipeline execution based on source preflight or a green build.
Examples
# Read-only provenance check; absolute, non-symlink checkout.
python3 .agent-skills/cocoindex/scripts/preflight.py --repo /work/cocoindex --json
After install, connector, data, and target-write approval:
pip install -U cocoindex cocoindex update --preview main.py
Review planned actions before an approved run:cocoindex update main.py
## Best practices
- Use the documented app target forms (`path/to/app.py`, module, or app-qualified target); do not guess at connector-specific options.
- Treat `--full-reprocess` as potentially expensive: the pinned CLI says it bypasses memoization and re-runs external calls such as embeddings. `--reset` delegates to a drop first.
- A drop can reverse target state (for example deleting rows/tables) and clear CocoIndex's internal database. Never use it as generic troubleshooting.
- Set up a disposable local fixture first; verify source additions, edits, deletions, target changes, and state location independently.
- Keep upstream latency, freshness, token, and cache claims tied to an identified benchmark/environment; do not repeat promotional percentages as universal guarantees.
## References
- [Pinned upstream behavior, CLI, and effects](references/upstream.md)
- [Pin, license and source hashes](references/source.json)
- [Authored routing scenarios](evals/evals.json)
- Helper contract: `python3 .agent-skills/cocoindex/scripts/preflight.py --help`; helper supports Python 3.10+ on POSIX Linux/macOS/WSL2 and fails closed when secure directory traversal is unavailable, including unsupported native Windows.