Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .cursor/rules/ascii-source.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
description: Tracked source and docs must be ASCII only
alwaysApply: true
---

# ASCII source

Every file you **add or edit** must be **ASCII only** (bytes 0x00-0x7F). Scan touched paths before finishing.

Replace:

| Non-ASCII | ASCII |
| ------------------ | ----------- |
| em/en dash, minus | `-` |
| ellipsis | `...` |
| curly quotes | `'` / `"` |
| arrows | `->` / `<-` |
| non-breaking space | space |

Do not introduce Unicode symbols, emoji, or locale punctuation in code, comments, XML, or docs.

WSDL/XSD copied from the licensed toolkit may contain non-ASCII. Do not add more. Prefer ASCII in files you author.
20 changes: 12 additions & 8 deletions .cursor/rules/documentation-standards.mdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Documentation and build scripts implementor-first, Maven Central default, no secrets
description: Documentation and build scripts - implementor-first, Maven Central default, no secrets
alwaysApply: true
---

Expand All @@ -10,13 +10,13 @@ Applies when writing or editing **README**, **CONTRIBUTING**, integrator guides,
## Priority: implementors

- Primary audience: developers **consuming** published Maven artifacts.
- Contributor/maintainer workflow lives in **CONTRIBUTING.md**, **MAINTAINERS.md**, or labelled subsections not mixed into the integrator main flow.
- Do not duplicate agent workflow in README or CONTRIBUTING (**AGENTS.md** `.cursor/rules/`).
- Contributor/maintainer workflow lives in **CONTRIBUTING.md**, **MAINTAINERS.md**, or labelled subsections - not mixed into the integrator main flow.
- Do not duplicate agent workflow in README or CONTRIBUTING (**AGENTS.md** -> `.cursor/rules/`).

## Default narrative: Maven Central

- Write as if **released** coordinates are on Maven Central (no SNAPSHOT, sibling-repo checkout, or `-P` profiles in the main integrator path).
- Use **version numbers** in integrator docs not Git branch names.
- Write as if **released** coordinates are on Maven Central (no SNAPSHOT, sibling-repo checkout, or `-P...` profiles in the main integrator path).
- Use **version numbers** in integrator docs - not Git branch names.
- SNAPSHOT installs, optional Maven profiles, licensed WSDL for source builds, and sibling `mvn install` belong under **Local development** / **Local builds** only.

## Structure
Expand All @@ -30,21 +30,25 @@ Applies when writing or editing **README**, **CONTRIBUTING**, integrator guides,
## Paths

- **Relative paths only** (e.g. `wsdls/xml`, `./certs/<folder>/`, `pom.xml` beside repo root).
- **Never** hardcode machine paths (`C:\`, `/Users/`, `~/`, worktree folders) in tracked docs.
- Override only when strictly required to remove ambiguity say why.
- **Never** hardcode machine paths (`C:\...`, `/Users/...`, `~/`, worktree folders) in tracked docs.
- Override only when strictly required to remove ambiguity - say why.

## Current state only

- No migration, legacy, or branch-history commentary in user-facing docs.
- Describe **what is true now**; omit "removed", "used to", and repo archaeology in integrator material.
- **CHANGELOG** entries: current release capabilities; avoid branch names and migration essays in new notes.

## Secrets MUST NOT
## Secrets - MUST NOT

- **Never** put real or plausible **passwords**, **tokens**, **API keys**, **private keys**, or **keystore passphrases** in tracked files (code, comments, examples, docs).
- Use placeholders (`<pkcs12-password>`), empty values in `.example` files, or "from your registration pack".
- See **SECURITY.md**.

## ASCII source

All tracked files you add or change must be **ASCII only**. See **`ascii-source.mdc`**.

## Override

These rules may be overridden **only when necessary** to clear ambiguity (e.g. maintainer branch mapping in **MAINTAINERS.md** or `.cursor/rules/`, clearly labelled maintainer-only).
55 changes: 42 additions & 13 deletions .cursor/rules/hi-b2b-project.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,61 @@ alwaysApply: true

# hi-b2b-client-java

Healthcare Identifiers (HI) B2B facade client **not** MHR/PCEHR.
Healthcare Identifiers (HI) B2B facade client - **not** MHR/PCEHR.

## Release lines (integrator docs use Maven Central versions only)
## Documentation

| Version | Java | APIs | Facades |
| ------- | ---- | ---- | ------- |
| **1.6.3** | 8 | javax | **14** |
| **1.6.5** | 11 | Jakarta | **14** |
| **1.7.0** | 11 | Jakarta | **26** (full MCA) |
Follow **`documentation-standards.mdc`**. Integrator docs use **version numbers** - not Git branch names.

**This checkout:** **`1.6.3-SNAPSHOT`** — **`au.gov.nehta:hi-wsdl`** from Maven Central (or matching **`mvn install`** for SNAPSHOT), Java **8** / **`javax.*`**.
The **first number** of the Maven version is the **Java SE** target. **`hi-b2b-client`** and **`hi-wsdl`** always share the **same** version.

| Version | Java | APIs | Facades |
| ------------ | ---- | ----------- | ------------------------ |
| **8.0.0** | 8 | **javax** | **14** (standard HI B2B) |
| **11.0.0** | 11 | **Jakarta** | **26** (full MCA) |
| **17.0.0.1** | 17 | **Jakarta** | **26** (full MCA) |
| **21.0.0.1** | 21 | **Jakarta** | **26** (full MCA) |
| **24.0.0.1** | 24 | **Jakarta** | **26** (full MCA) |

**Git branch mapping (maintainers only - never in integrator docs):**

| Version | Official Git branch |
| ------------ | ------------------- |
| **8.0.0** | `java-8` |
| **11.0.0** | `java-11` |
| **17.0.0.1** | `java-17` |
| **21.0.0.1** | `java-21` |
| **24.0.0.1** | `java-24` |

## This 11.0.0 line

**`11.0.0-SNAPSHOT`**: Java **11**, **Jakarta**, **26** facades, in-repo **`wsimport`** when building from source (licensed tree at **`wsdls/xml/`**), or **`-Phi-wsdl-artifact`** with **`au.gov.nehta:hi-wsdl`** at **`${project.version}`**. See **MAINTAINERS.md**.

## Build from source

- JDK **8**: `mvn -B "-Dgpg.skip=true" clean verify`
- **Local / unpublished:** install **`hi-wsdl`** at **`${project.version}`** then **`verify`** see **`CONTRIBUTING.md`**
- **`jaxws-rt` 2.3.7**
- JDK **11**: `mvn -B "-Dgpg.skip=true" clean verify` (quote `-D` on PowerShell). Licensed **`wsdls/xml/`** required unless **`-Phi-wsdl-artifact`**.
- **Local / unpublished:** install matching **`hi-wsdl`** then **`-Phi-wsdl-artifact verify`** - see **`CONTRIBUTING.md`**
- **`jaxws-rt` 4.0.5**
- Default Surefire: offline tests; **`-Pintegration`** for mutual-TLS

## Consumer Search IHI

- `basicSearch` requires **IHI number**; demographics-only = `detailedSearch`.
- Messages `searchIHI`: `electronicCommunication` before `dateOfBirth`.
- Interface `searchIHI`: optional `electronicCommunication` before `dateOfBirth`; unstructured address before international.

## vs hi-wsdl-java

| | **hi-wsdl-java** | **hi-b2b-client-java** |
| -------- | ----------------------------------- | ---------------------------- |
| Delivers | WSDL on classpath + generated types | Facade clients, TLS, signing |
| Artifact | `hi-wsdl` | `hi-b2b-client` |

Align **`hi-wsdl`** and **`hi-b2b-client`** at the **same version** per release line (**8.0.0** with **8.0.0**, **11.0.0** with **11.0.0**, and so on).

## Doc split

- **`documentation-standards.mdc`**: implementor-first, Maven Central default, local/OS sections, relative paths, no secrets
- **`README.md`**: integrators (Maven Central default)
- **`README.md`**, **`CLIENT-FEATURES.md`**: integrators (Maven Central default)
- **`CONTRIBUTING.md`**: build from source, local SNAPSHOT, OS wrappers
- **`MAINTAINERS.md`**: POM / dependency internals
- **`MAINTAINERS.md`**: POM / wsimport internals
22 changes: 8 additions & 14 deletions .cursor/rules/multi-branch-worktrees.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ description: Use git worktree when editing multiple branches of the same reposit
alwaysApply: true
---

# Multi-branch work use git worktree
# Multi-branch work - use git worktree

When a task requires **changes on two or more branches of the same Git repository**, use **`git worktree`** do **not** hop branches with `git checkout` while carrying uncommitted edits or stashes.
When a task requires **changes on two or more branches of the same Git repository**, use **`git worktree`** - do **not** hop branches with `git checkout` while carrying uncommitted edits or stashes.

## When this applies

- Same-repo edits across release lines (e.g. `java-8-javax`, `java-11-jakarta`, `master`)
- Same-repo edits across release lines (e.g. `java-8`, `java-11`)
- Applying the same fix to several branches before commit
- Comparing or building two branches side by side

Expand All @@ -22,7 +22,7 @@ When a task requires **changes on two or more branches of the same Git repositor
## Workflow

1. **Primary clone** stays on the main working branch; do not stash-and-hop to edit other branches.
2. **Add a worktree per extra branch** (paths are local never commit them to tracked docs):
2. **Add a worktree per extra branch** (paths are local - never commit them to tracked docs):

```bash
git worktree add ../<repo>-<branch-slug> <branch>
Expand All @@ -34,18 +34,12 @@ When a task requires **changes on two or more branches of the same Git repositor
## Do not

- `git checkout` other branches with uncommitted changes (Git will block or force stash churn).
- Stash the same files across multiple branch switches causes merge conflicts on `stash pop`.
- Stash the same files across multiple branch switches - causes merge conflicts on `stash pop`.
- Put worktree directory paths in README, CONTRIBUTING, or other tracked docs (see repo **`worktrees.mdc`** / **`documentation-standards.mdc`**).

## Example (maintainer-local paths only)

```bash
# In hi-wsdl-java primary clone (on java-11-jakarta-full-wsdl)
git worktree add ../hi-wsdl-java-java-8-javax java-8-javax
git worktree add ../hi-wsdl-java-java-11-jakarta java-11-jakarta

# Apply edits in each ../hi-wsdl-java-* folder; commit per branch
# When finished:
git worktree remove ../hi-wsdl-java-java-8-javax
git worktree remove ../hi-wsdl-java-java-11-jakarta
```
git worktree add <path> java-8
git worktree add <path> java-11
```
8 changes: 4 additions & 4 deletions .cursor/rules/worktrees.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ Follow **`documentation-standards.mdc`** (implementor-first, Maven Central defau

| Doc | Audience | Use |
| --- | -------- | --- |
| **README**, integrator guides | Implementors | **Maven version** (`1.7.0`), Central coordinates, runtime config |
| **README**, integrator guides | Implementors | **Maven version** (`11.0.0`), Central coordinates, runtime config |
| **CONTRIBUTING** | Contributors | Build from source, **Local builds**, OS-specific steps |
| **MAINTAINERS**, **`.cursor/rules/`** | Maintainers | POM/wsimport internals; **branch mapping** only when labelled maintainer-only |

Integrator docs: **version numbers**, not Git branch names. Local/SNAPSHOT/profile flows: **CONTRIBUTING** only.

## Do not put in tracked docs

- Hardcoded worktree or machine paths (`wt/`, `C:\`, `/Users/`, `~/`, `this worktree`, `primary clone`)
- Hardcoded worktree or machine paths (`wt/`, `C:\...`, `/Users/...`, `~/`, `this worktree`, `primary clone`)
- References to **`wt/README.md`** or other local-only layout files
- Open folder X to switch branches” — IDE/local workflow, not repo documentation
- "Open folder X to switch branches" - IDE/local workflow, not repo documentation

## Allowed (maintainer-only, when labelled)

- **Git branch mapping** table (version branch) in **MAINTAINERS.md** or agent rules
- **Git branch mapping** table (version -> branch) in **MAINTAINERS.md** or agent rules
- Generic worktree example only: `git worktree add <path> <branch>` (placeholder **`<path>`**, never a committed example)
- Optional **untracked** local notes outside the repo

Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
# Runs default unit tests + Javadoc/sources attach (verify), then compiles sample sources.
# Default unit tests + Javadoc/sources (verify), then sample profile compile.
# Full wsimport verify when licensed HI WSDL is present under wsdls/xml/.
# Without licensed tree: validate only (public CI) or -Phi-wsdl-artifact locally (see CONTRIBUTING.md).
name: CI

on:
push:
branches: [ java-11 ]
pull_request:
branches: [ java-11 ]

permissions:
contents: read

# Plain mvn keeps contributor ~/.m2/settings.xml behaviour; this line does not require a project settings.xml.

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 8
java-version: "11"
cache: maven
- name: Maven verify
run: mvn -B -Dgpg.skip=true clean verify
- name: Compile sample sources (sample profile)
run: mvn -B -Psample -Dgpg.skip=true -DskipTests=true clean compile
- name: Maven verify (when licensed WSDL present)
run: |
if [ -f wsdls/xml/wsdl/consumer/20100731/HI_ConsumerSearchIHI-3.0.wsdl ]; then
mvn -B -Dgpg.skip=true clean verify
mvn -B -Psample -Dgpg.skip=true -DskipTests=true clean compile
else
echo "Licensed HI WSDL not in tree; running validate only (expected on public GitHub CI)."
mvn -B -Dgpg.skip=true validate
fi
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ wsdls/target/
wsdls/dist/
wsdls/lib/

# Licensed HI WSDL/XSD bundle: not redistributed in this Git repository (see wsdls/readme.txt,
# Licensed HI WSDL/XSD bundle: not redistributed in this Git repository (see wsdls/README.md,
# README.md -> Licensed WSDL and XSD). The build resolves hi.wsdl.tree.root (default wsdls/xml).
# Bindings under wsdls/xml/binding/ stay tracked (they are project-authored fragments).
/wsdls/xml/wsdl/*
!/wsdls/xml/wsdl/README.md
/wsdls/xml/schema/*
!/wsdls/xml/schema/README.md
/wsdls/xml/documents/*
!/wsdls/xml/documents/README.md
libs/*
9 changes: 6 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"java.configuration.updateBuildConfiguration": "automatic",
"files.eol": "\n"
}
"java.import.maven.enabled": true,
"java.configuration.updateBuildConfiguration": "automatic",
"[java]": {
"editor.defaultFormatter": "redhat.java"
}
}
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ Rules: `.cursor/rules/*.mdc`. Do not duplicate in README or CONTRIBUTING.

| Concern | Rule |
|---------|------|
| ASCII only in authored files | `ascii-source.mdc` |
| Documentation and build scripts (implementor-first, Central, local, OS, paths, no secrets) | `documentation-standards.mdc` |
| HI scope, WSDL, build, Java 8 / javax | `hi-b2b-project.mdc` |
| HI scope, WSDL, build, Java 11 / Jakarta | `hi-b2b-project.mdc` |
| Worktrees local only; versions in integrator docs | `worktrees.mdc` |
| Multi-branch edits in one repo use worktree, not checkout/stash | `multi-branch-worktrees.mdc` |
| Multi-branch edits in one repo - use worktree, not checkout/stash | `multi-branch-worktrees.mdc` |

Contributors (humans): README, CONTRIBUTING, MAINTAINERS, SECURITY.
Loading