Worked Examples
Developer reference for recovery milestones — Catalyst Grit
Develop and validate evidence-linked recovery milestones in Catalyst Grit using executable Python, versioned baseline and threshold definitions, source-reviewed engineering contracts, and reproducible tests. This developer reference covers milestone persistence, evidence provenance, idempotency, revision conflicts, project permissions, audit integrity, missing observations, psychometric safeguards, and human-reviewed publication while distinguishing operational progress from psychological recovery.
Application: Catalyst Grit
Article type: Developer reference / Recovery planning
Last source-reviewed version: v2.0.0 (f9617160ffd276c6a6fd847b1e846bb5f73b07ae)
Last verified version: Not established — installed deployment not verified
Status: Published guidance — verification pending
Estimated reading time: 27–36 minutes
1. Goal and intended behavior
Build and audit a measurable, evidence-backed recovery milestone without turning an operational threshold into a psychological diagnosis, a character score, a clinical recovery conclusion, or an automatically approved decision. The engineering criterion is a reproducible, clearly versioned milestone rule with baseline conditions, measurement units, observation scheduling, documented uncertainty, source provenance, controlled review and scoped access.
This guide distinguishes confirmed Catalyst Grit repository contracts from a proposed standalone research adapter. No deployed milestone threshold endpoint, database column, authenticated web control or psychometric instrument is inferred from the examples.
2. Requirements
- Python 3.10+ for the local reference package; Git is optional for reviewing the actual product source. No production credentials are needed.
- Use the bundled fictional observations, synthetic evidence ledger, and proposed JSON contract; never put private person-level observations into public tickets.
- Define the construct, unit, baseline period, target threshold, direction, consecutive observations, eligibility, and handling of missing weeks before calculating attainment.
- Identify project and actor scope, record revision, evidence, consent/lawful basis, data retention, human reviewer and publishability.
- Maintain separate scientific validity and software-verification decisions.
Last source-reviewed Catalyst Grit version: v2.0.0, commit f9617160ffd276c6a6fd847b1e846bb5f73b07ae. Last verified installed version: Not established. No deployed integration or independent psychological validation is certified.
3. Repository-verified functionality versus proposed adapter
| Existing source-reviewed capability | What it supports | What it does not prove |
|---|---|---|
| Recovery planning and checkpoints | Actions with statuses, owner, target date, evidence for completion, dated checkpoint and reassessment triggers | That this article’s three-week threshold algorithm is built into production |
| Persistent workspace | Revision snapshots with digest, authorship and append-only audit | That an external research JSON contract is an API request body |
| Monitoring and trends | Version-linked snapshots; sparse data disclosed; at least two observations for directional trend statements | That monitoring snapshots are validated psychometric measures |
| Methodology profile | Source-linked evidence, assumptions and human review | That review can be bypassed through successful computation |
| Recovery record contract | Canonical metadata, findings, human review and linked evidence | That arbitrary participant-wave fields or milestone REST routes exist |
| Institutional API | Documented scoped tokens and auditing for private routes | That a recovery-milestone write endpoint was verified here |
The reference adapter in this package is separate, offline Python. Its status checks are proposed safeguards for development review, not measured security guarantees of the installed site.
4. Example data and milestone definition
The package uses fictional service-continuity observations dated September 1 through October 6, 2026. A team has a baseline of two completed support tasks per week. The proposed milestone is at least three evidence-backed tasks in each of three consecutive scheduled observed weeks. The observations are 2, 3, 4, 4, 3 and one missing week. First attainment is September 22. Continued attainment on October 6 cannot be inferred from a blank response.
| Field | Reference value | Reason |
|---|---|---|
| Baseline | 2 tasks/week (September 1) | Defined reference observation |
| Threshold | 3 tasks/week | Observable performance criterion, not a psychological score |
| Persistence | 3 consecutive observed scheduled weeks | Prevents a one-week change being mislabeled sustained progress |
| Missing policy | Unknown breaks the demonstrated streak | Does not convert missing into zero or success |
| Evidence | Synthetic evidence ID per observed week | Separates recorded observation from unsupported assertion |
| Approval | Draft, human review pending | Computation never automatically authorizes publication |
For an operational process, milestone attainment is a descriptive demonstration, not a causal intervention effect, validated trait, employee performance rating, or evidence of clinical recovery.
5. Proposed data and access contract
data/developer_write_contract.example.json is an illustrative schema instance, not a deployed Catalyst Grit request contract. Its required fields include:
| Contract area | Fields | Checks |
|---|---|---|
| Identity and scope | project_id, milestone_id, actor_id, actor_project_scope |
Cross-project requests rejected |
| Write safety | idempotency_key, expected_revision, current_revision |
Replay and stale update detection |
| Measurement definition | baseline_value, threshold, consecutive_weeks, instrument_type |
Version drift and unsupported construct claims rejected |
| Observation and provenance | observed_at, observation_value, evidence_id, source_sha256 |
Observation must match source and reviewed evidence |
| Governance | consent_authorized, visibility, review_state, audit_sink_healthy, retention_policy |
Restricted visibility, audit availability and human approval maintained |
6. Procedure
- Pin the product reference: Review the known Catalyst Grit commit and note that production release and permissions are unverified.
- Establish purpose: Define the operational construct and why the chosen baseline, target and observation windows are meaningful.
- Inspect fixtures: Verify six scheduled weekly rows, distinct IDs and synthetic evidence origins; record the source SHA-256.
- Run the evaluator: Check attainment and missingness policy with the packaged Python tools.
- Validate the proposed write contract: Confirm actor scope, expected/current revisions, idempotency, evidence and audit state.
- Run negative cases: Inject incorrect consent, source changes, duplicate writes, stale revisions and unsupported publication.
- Review research meaning: Ask whether measurement error, response burden, scoring drift, access or environmental changes could explain the observed pattern.
- Document a human decision: Archive source hash, calculation output, reviewer, caveats and requested corrections; retain the draft state until authorized review.
- Verify staging separately: Repeat access, retention, workflow, redaction and integration checks on a permitted staging installation.
7. Terminal setup and official source review
# From the extracted ZIP package root:
python3 --version
python3 code/recovery_milestone.py audit
python3 code/recovery_milestone.py evaluate
python3 code/apply_recovery_milestone.py audit
python3 code/scientific_milestone_validation.py validate
# Review the actual source repository in a separate directory:
git clone https://github.com/Content-Catalyst-LLC/catalyst-grit.git
cd catalyst-grit
git checkout f9617160ffd276c6a6fd847b1e846bb5f73b07ae
python3 scripts/release_contract.py
# Repository tests require the repository's declared test dependencies:
python3 -m pytest tests/test_recovery_planning.py -q
The final test command is a source-review suggestion and must be checked against the files and dependencies in the pinned checkout before execution. It is not included in the packaged offline-test results. Do not use a live service token in this tutorial.
8. Executable developer reference
# From the package root: no dependencies beyond Python standard library
python3 code/developer_recovery_milestone.py audit
python3 code/developer_recovery_milestone.py evaluate
python3 code/developer_recovery_milestone.py contract
python3 code/developer_recovery_milestone.py manifest
python3 code/developer_recovery_milestone.py scientific
python3 -m unittest discover -s tests -v
Expected: "passed": true, "date_of_first_attainment": "2026-09-22", and "production_verified": false. The scientific review retains a pending/nonpublication state. The final October 6 observation remains missing.
9. Python API walkthrough
# Save as exploratory_check.py in the extracted package root
import sys
sys.path.insert(0, "code")
from developer_recovery_milestone import read_contract, check_write
from apply_recovery_milestone import inputs
from recovery_milestone import evaluate
milestone, rows, evidence, events = inputs()
proposed_write = read_contract()
issues = check_write(proposed_write, milestone, rows, evidence, events)
assert issues == [], issues
result = evaluate(milestone, rows)
assert result["achieved_at"] == "2026-09-22"
assert rows[-1]["observation_status"] == "missing"
print("Descriptive milestone attained:", result["achieved_at"])
print("Scientific and publication approval: NOT established")
Do not use this local Python module name as a purported installed Catalyst Grit API. The check is an illustrative preflight, not real authentication, a persistent transaction, or publication authorization.
10. Negative tests and expected rejection
# Each command deliberately introduces one failed contract invariant
python3 code/developer_recovery_milestone.py inject --case duplicate_submission
python3 code/developer_recovery_milestone.py inject --case stale_revision
python3 code/developer_recovery_milestone.py inject --case cross_project
python3 code/developer_recovery_milestone.py inject --case bad_hash
python3 code/developer_recovery_milestone.py inject --case audit_outage
python3 code/developer_recovery_milestone.py inject --case public_export
python3 code/developer_recovery_milestone.py inject --case clinical_claim
python3 code/developer_recovery_milestone.py inject --case wrong_observation
The package tests 30 fault types. Fault injection should report a nonempty detected_issues list; those failures are the expected outcome. Passing a reference check does not prove a live system enforces that invariant.
11. Troubleshooting
| Symptom or code | Likely failure | Debugging action |
|---|---|---|
REVISION_CONFLICT |
Stale write or invalid revision | Reload latest accepted revision; reconcile rather than overwrite history |
DUPLICATE_IDEMPOTENCY_KEY |
Repeated submission | Return the existing result or reject replay according to approved transaction rules |
ENTITY_SCOPE_MISMATCH or ACTOR_SCOPE_MISMATCH |
Wrong project or actor scope | Stop access, inspect nonsecret audit IDs, retest tenancy in staging |
SOURCE_INTEGRITY_FAILED |
Input hash differs from reviewed source | Quarantine altered input; preserve both versions for reconciliation |
OBSERVATION_REFERENCE_MISMATCH |
Unknown date or evidence ID | Rebuild the authorized schedule and trace evidence references |
INVALID_MEASURE_CONSTRUCT |
Operational count labeled psychometric scale | Correct the construct; seek actual instrument-validation evidence if appropriate |
PUBLICATION_HANDOFF_BYPASS |
Unreviewed export/handoff | Block export and require authorized scientific and privacy review |
AUDIT_GUARD_FAILED |
Audit logging missing or unhealthy | Fail closed for consequential writes in an implementation designed to require audit durability |
These diagnostic codes belong to the bundled Python adapter, not verified Catalyst Grit server errors.
12. Resolution
- Preserve the original milestone definition, participant privacy boundary (if applicable), dataset digest, status history and failed evidence.
- Correct a wrong baseline, unit, evidence ID or sampling window using a new reviewed version; do not rewrite past accepted observations.
- For absent weeks, record missing; do not carry forward values or infer continued attainment without a declared and justified model.
- For consent, scope or export failures, disable the affected path and escalate under the approved security/incident process.
- For unsupported psychological interpretations, replace them with descriptive operational statements and flag independent scientific review.
- Rerun local tests, then staging regression tests, then obtain explicit human approval before any public release.
13. Psychology, psychometrics and human-systems interpretation
Operational recovery milestones may be valuable as structured context and planning signals. They should not be mistaken for psychological recovery, resilience, grit or well-being. A defensible psychological outcome would require a precisely defined construct, appropriate instrument rights and scoring, construct validity, measurement reliability, change responsiveness, plausible minimally important difference, language/cultural comparability and longitudinal invariance where relevant.
Check environmental explanations such as staffing, task complexity, resource availability, task reclassification and concurrent interventions. A 3-week sequence does not establish a causal improvement, a normal distribution, or independent repeated observations. Do not perform person-level ranking or automatic employment decisions based on milestone indicators.
Useful external methodology: COSMIN guidance on outcome measurement and applicable study-design/reporting standards. The fictional task-count fixture is not a COSMIN-validated instrument and does not include clinical observations.
14. Safety, security and review boundaries
The reference preflight checks consent and role markers, but actual authorization must be enforced server-side at each read/write/export/handoff. Apply project/tenant isolation, least privilege, verified retention policy, source digests, append-only audit, race-safe idempotency and transactional revision checks. Reject or redact direct identifiers in logs, public summaries and bug reports. A self-declared Boolean is not a substitute for genuine consent/legal authorization.
Publication requires substantive human scientific/ethical review and a separate approved release action. Do not convert a draft into approval because local validation returned success.
15. Verification and acceptance criteria
| Check | Evidence expected | Current state |
|---|---|---|
| Source data and demonstration | 6 fictional scheduled weeks; first milestone on September 22; last week missing | Offline tested |
| Developer contract and negative cases | Version, scope, idempotency, hash, audit, publication and input validation | Offline tested |
| Repository implementation | Tagged source files, actual schema/test names and installed version evidence | Source-reviewed only |
| Psychometric recovery claims | Validated construct, instrument, meaningful change and external reviewers | Not established |
| Production data safety | Tenant isolation, consent, audit, retention, exports, redaction, restore | Staging NOT_RUN |
| Publication | Human science/privacy sign-off and product release evidence | Not approved |
Acceptance principle: an operational milestone can be verified in an offline fixture without validating an individual’s psychological recovery or a deployed application.
16. Related code, release evidence and references
- Catalyst Grit v2.0.0 README (source-reviewed version)
- Recovery planning, completion evidence and checkpoints
- Monitoring provenance and sparse trends
- Canonical record and evidence links
- Workspace repository source
- Recovery planning test path — verify against pinned checkout
- COSMIN — measurement-property standards and tools
No linked, article-specific known issue or reviewed product suggestion was established. The release-description README is an appropriate source reference, but it is not proof of the installed deployment.
17. Limitations and next steps
All examples are fictional, private-data-free fixtures. The milestone evaluator, proposed write contract, JSON fixture fields and diagnostic codes are standalone references and must not be presented as current production interfaces. The adapter does not open a database, enforce real OAuth/authentication, test network races or determine clinical recovery. Its “scientific” validation tests structured assumptions; they are not independent peer review.
Before production integration: inspect the installed plugin/service version; map the reference fields to supported repository entities; add server-side transaction, authorization and audit tests; verify retention and deletion; obtain appropriate research, privacy and organizational approval; record results in the staging acceptance matrix.
