This workflow defines how ACR-reasoner should be developed locally using GitHub Desktop and then synchronised with the online GitHub repository. It is designed to keep reasoning-engine work separate from ACR-platform, while still supporting controlled promotion of validated changes into the working ACRAgent demo platform.
ACR-reasoner is the source of truth for:
- ontology assets
- SWRL rules
- SQWRL queries
- Bayesian enhancement
- CDS schemas
- Bayesian test harness
- interim
acr_pathwaybridge logic
ACR-platform remains the demo platform and web application.
Reasoning logic should be developed and validated in ACR-reasoner first, then selectively integrated into ACR-platform.
Recommended local toolchain:
- GitHub Desktop
- VS Code or another code editor
- local terminal
- browser developer tools
- DB Browser for SQLite where relevant
- local PHP server when testing integration with the platform
- optional Node or Python tooling for scripts and validation
Create the GitHub repository:
KY-BChain/ACR-reasoner
Clone it locally using GitHub Desktop.
Create the agreed folder structure.
Import the baseline files:
- SWRL and SQWRL assets
- Bayes engine files
- Bayesian test harness files
- CDS schemas
- current
acr_pathway.html - Bayes-modified
acr_pathway_bayes_modified.html - mapping and notes files
Commit the initial repository baseline and push it.
Recommended branches:
main— stable, validated reasoning assetsdevelop— active integration and pre-release work- feature branches for focused changes
Examples:
feature/import-current-assetsfeature/bayes-enginefeature/cds-schemafeature/pathway-bridgefeature/harness-uifeature/swrl-coverage
- Open GitHub Desktop.
- Select
ACR-reasoner. - Pull latest changes.
- Switch to the correct branch or create a new feature branch.
Edit only the files relevant to the workstream:
- ontology updates in
ontology/ - Bayesian logic in
bayes/ - harness changes in
harness/ - interim pathway bridge changes in
integration/ - documentation in
docs/
Before committing, run the relevant local checks:
- JSON syntax validation
- schema validation
- Bayes calculation checks
- harness case execution
- coverage table updates
- pathway before/after inspection where applicable
Use GitHub Desktop to inspect diffs before committing.
Use focused commit messages.
Examples:
Add posterior regression cases for Luminal B and HER2-positive cohortsRevise Bayes-aware CDS schemaMap SWRL rules 11-16 into coverage tableAdd Bayes ON/OFF harness UI layout
Push the feature branch to GitHub.
After local validation, merge feature branches into develop.
Only merge develop into main when the changes are stable and validated.
Used for:
- SWRL revisions
- SQWRL revisions
- native rule and query files
- language variants
- ontology rationale documentation
Process:
- update rule/query assets
- update JSON mirrors if required
- update rule/query rationale
- update coverage files
- run harness cases affected by the change
- commit and push
Used for:
- priors
- likelihood ratios
- evidence mapping
- posterior calculation logic
- Bayes debug outputs
Process:
- edit Bayes config or code
- run Bayes unit checks
- run representative posterior regression cases
- verify expected output ranges
- update schema if output changed
- commit and push
Used for:
- case library
- before/after comparison cases
- pass/fail reporting
- coverage matrices
- harness UI
Process:
- add or revise case
- map to intended SWRL/SQWRL coverage
- define expected deterministic result
- define expected Bayes posterior range
- run harness
- review pass/fail status
- commit and push
Used for:
- interim
acr_pathwaylogic - Bayes integration bridge
- CDS schema adapter
- packaging notes for
ACR-platform
Process:
- update
integration/acr_pathway/ - keep baseline and Bayes-modified copies
- document what is mirrored from ontology
- document what remains unimplemented
- validate against harness cases
- prepare integration bundle if ready
Every meaningful change should pass these four levels.
Check:
- valid JSON
- valid schema structure
- correct file references
- no broken paths
Check:
- Bayes math correctness
- evidence mapper correctness
- schema validation
Check:
- deterministic result matches expectation
- Bayes posterior lies within expected tolerance
- explanation trace is present
- pass/fail output is intelligible
Check:
- interim
acr_pathwayfiles still behave correctly - export bundle for
ACR-platformis coherent - local platform integration does not introduce regressions
ACR-reasoner should not directly become the live demo platform.
Promotion path:
- finalise reasoning changes in
ACR-reasoner - validate locally
- prepare an integration bundle
- open the local working copy of
ACR-platform - replace only intended files
- run local platform regression tests
- only then promote to the hosted demo environment
When testing reasoning changes inside the local ACR-platform working copy:
- take a backup snapshot of the local platform tree
- copy only the required files from
ACR-reasoner - run the local PHP server from the platform root
- test:
index.htmlacr_pathway.htmlacr_test_data.html- login/auth flow
- control panel
- relevant API endpoints
- inspect browser console and network output
- confirm no regression before any hosted update
- always pull before starting work
- keep commits small and focused
- do not mix ontology changes, Bayes changes, and platform-bridge changes in one large commit if avoidable
- write meaningful commit messages
- push feature branches frequently
- merge only after local pass
Every non-trivial change should also update at least one of:
- mapping documentation
- coverage files
- validation notes
- schema notes
- release or integration notes
Nothing should move from ACR-reasoner into ACR-platform unless it is:
- versioned
- documented
- locally tested
- reversible
Initial repository structure for ACR-reasonerImport current SWRL and SQWRL assetsImport Bayes engine and CDS schemasAdd acr_pathway baseline and Bayes-modified filesAdd rule/query coverage and validation documentsAdd local development and release workflow
A healthy local development cycle means:
ACR-reasonerremains the reasoning-engine source of truthACR-platformremains the demo platform- integration is controlled
- the hosted demo platform is updated only from validated local releases