@carecard/auth-util 3.28.0 → 3.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/carecard-must-do/SKILL.md +117 -0
- package/.agents/skills/carecard-workspace-standards/SKILL.md +46 -33
- package/.agents/skills/github-pr-create-update/SKILL.md +140 -167
- package/.agents/skills/github-pr-merge-cleanup/SKILL.md +214 -205
- package/.agents/skills/pkg-auth-util-auth-crypto-library/SKILL.md +42 -32
- package/.agents/skills/pkg-auth-util-coding-standards-and-best-practices/SKILL.md +39 -3
- package/.agents/skills/pkg-publish/SKILL.md +66 -7
- package/AGENTS.md +13 -1
- package/CLAUDE.md +43 -0
- package/package.json +4 -4
- package/readme.md +14 -0
|
@@ -54,30 +54,89 @@ Always publish packages in this order, one repository at a time:
|
|
|
54
54
|
5. `@carecard/telemetry`
|
|
55
55
|
|
|
56
56
|
Publish by pushing the package release branch, creating or reusing a pull
|
|
57
|
-
request into `
|
|
57
|
+
request into `main`, marking it ready, waiting for checks, squash-merging
|
|
58
58
|
with administrator privileges, and verifying npm publication with:
|
|
59
59
|
|
|
60
60
|
```sh
|
|
61
61
|
npm view <package-name>@<target-version> version
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
The package GitHub
|
|
65
|
-
|
|
64
|
+
The package GitHub workflows accept pushes to `main` and `development` and
|
|
65
|
+
publish an unpublished version. Use the `main` squash merge as the release
|
|
66
|
+
path and verify npm publication before continuing. Subsequent development
|
|
67
|
+
synchronization must reuse the same version; it is not a second release.
|
|
68
|
+
|
|
69
|
+
## Default Git Policy
|
|
70
|
+
|
|
71
|
+
Reuse the current working branch for every follow-up request, even when the
|
|
72
|
+
subject changes or the working tree is clean. Create a branch only when no
|
|
73
|
+
working branch exists or the checkout is on `main` or `development`. Otherwise,
|
|
74
|
+
fetch remote `main` HEAD and rebase the same working branch onto that fetched
|
|
75
|
+
commit, preserving its commits and uncommitted work.
|
|
76
|
+
|
|
77
|
+
Apply these defaults unless the user explicitly specifies otherwise. The
|
|
78
|
+
prohibition on deleting or force-pushing `main` always applies.
|
|
79
|
+
|
|
80
|
+
1. Use `main` as the PR base and freshly fetched `origin/main` as the source of
|
|
81
|
+
truth. `origin/HEAD`, a stale local `main`, and the presence of `development`
|
|
82
|
+
do not change this default. If remote `main` is missing or cannot be fetched,
|
|
83
|
+
report the blocker instead of selecting another base.
|
|
84
|
+
2. At task start, fetch `origin/main`. Create `<agent-name>/<branch-name>`
|
|
85
|
+
from that commit only when no working branch exists or the current branch is
|
|
86
|
+
`main` or `development`.
|
|
87
|
+
Otherwise keep and rebase the current branch onto that commit, preserving
|
|
88
|
+
its existing commits and building subsequent task commits on top. Honor an
|
|
89
|
+
explicit working-branch instruction; it changes branch selection, not
|
|
90
|
+
freshness.
|
|
91
|
+
3. Fetch again before every source-branch push. Rebase when the working branch
|
|
92
|
+
does not already contain the latest `origin/main`; a clean mergeability
|
|
93
|
+
check is not proof that rebasing is unnecessary. If it already contains that
|
|
94
|
+
commit, no rebase is needed. The direct `development` replacement below is a
|
|
95
|
+
ref synchronization, not a source-branch rebase.
|
|
96
|
+
4. Squash-merge into remote `main` after the applicable validation passes.
|
|
97
|
+
Administrator privileges may be used to merge without GitHub reviews; they
|
|
98
|
+
do not authorize bypassing required checks. Verify the merge, then delete
|
|
99
|
+
the merged source branch remotely and locally.
|
|
100
|
+
5. Fetch the latest remote `main` after merging and fast-forward local `main`
|
|
101
|
+
to that commit. Preserve divergent local work and report a blocked update
|
|
102
|
+
rather than discarding it.
|
|
103
|
+
6. Replace branches named exactly `development`, locally and remotely, with
|
|
104
|
+
the latest remote `main` commit. Use an explicit, observed-commit
|
|
105
|
+
`--force-with-lease` for a non-fast-forward remote update. Create a missing
|
|
106
|
+
counterpart when local or remote `development` exists; leave repositories
|
|
107
|
+
with neither unchanged. If `development` was the merged source, recreate
|
|
108
|
+
it from the new `main` after deleting it. Other working branches are not
|
|
109
|
+
development synchronization targets.
|
|
110
|
+
7. Never delete local or remote `main`, and never force-push to remote `main`,
|
|
111
|
+
including with `--force-with-lease`, a forced refspec, or a mirror push.
|
|
112
|
+
Check the exact destination ref before every deletion or forced update.
|
|
113
|
+
|
|
114
|
+
Fetches needed to establish a fresh `origin/main` at task start and before a
|
|
115
|
+
source-branch push are authorized without a separate approval question. Commits,
|
|
116
|
+
pushes, PR mutations, and branch cleanup require an authorized task; a request
|
|
117
|
+
for local work alone does not authorize publication. An authorized squash merge
|
|
118
|
+
into `main` includes the merged-source cleanup, local `main` update, and
|
|
119
|
+
`development` synchronization below unless the user explicitly says otherwise.
|
|
120
|
+
Never delete local or remote `main`, or force-push to remote `main`, including
|
|
121
|
+
with `--force-with-lease`.
|
|
66
122
|
|
|
67
123
|
## Deferred Package Push
|
|
68
124
|
|
|
69
125
|
Commit coordinated version and dependency updates locally as the release sequence
|
|
70
126
|
progresses. Do not push a `pkg-*` release branch until that package is the next
|
|
71
|
-
package being published by merge into `
|
|
127
|
+
package being published by merge into `main`.
|
|
72
128
|
|
|
73
129
|
Immediately before each package's publishing turn:
|
|
74
130
|
|
|
75
131
|
1. Verify the repository is on the intended release branch and has a clean
|
|
76
132
|
working tree.
|
|
77
133
|
2. Run required validation and every direct `.husky` script for that repository.
|
|
78
|
-
3.
|
|
79
|
-
|
|
80
|
-
|
|
134
|
+
3. Fetch `origin/main` again, rebase the release branch when it does not already
|
|
135
|
+
contain that commit, and push with hooks enabled. Use an explicit observed-commit
|
|
136
|
+
lease if a rebase requires rewriting an already-pushed source branch.
|
|
137
|
+
4. Create or reuse the pull request into `main`, merge it, and wait for
|
|
138
|
+
npm publication before continuing to dependency fanout. Complete merged-source
|
|
139
|
+
cleanup and main/development synchronization under the default Git policy.
|
|
81
140
|
|
|
82
141
|
## Dependency Fanout
|
|
83
142
|
|
package/AGENTS.md
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Agent Instructions
|
|
2
|
+
|
|
3
|
+
## Mandatory startup for every agent
|
|
4
|
+
|
|
5
|
+
Every agent, including Codex, Claude, other assistants, and delegated agents,
|
|
6
|
+
must read and follow [carecard-must-do](.agents/skills/carecard-must-do/SKILL.md)
|
|
7
|
+
before beginning or resuming any task. This includes planning, questions,
|
|
8
|
+
read-only investigation, coding, review, documentation, and validation.
|
|
9
|
+
|
|
10
|
+
Then load the [repository engineering standards](.agents/skills/pkg-auth-util-coding-standards-and-best-practices/SKILL.md)
|
|
11
|
+
and the specialist skills relevant to the task.
|
|
12
|
+
An agent without automatic skill discovery must open the skill explicitly;
|
|
13
|
+
the requirement applies regardless of the agent platform.
|
|
2
14
|
|
|
3
15
|
## Non-negotiable Codex banked-reset requirement
|
|
4
16
|
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Repository Agent Instructions
|
|
2
|
+
|
|
3
|
+
## Mandatory startup for every agent
|
|
4
|
+
|
|
5
|
+
Every agent, including Codex, Claude, other assistants, and delegated agents,
|
|
6
|
+
must read and follow [carecard-must-do](.agents/skills/carecard-must-do/SKILL.md)
|
|
7
|
+
before beginning or resuming any task. This includes planning, questions,
|
|
8
|
+
read-only investigation, coding, review, documentation, and validation.
|
|
9
|
+
|
|
10
|
+
Then load the [repository engineering standards](.agents/skills/pkg-auth-util-coding-standards-and-best-practices/SKILL.md)
|
|
11
|
+
and the specialist skills relevant to the task.
|
|
12
|
+
An agent without automatic skill discovery must open the skill explicitly;
|
|
13
|
+
the requirement applies regardless of the agent platform.
|
|
14
|
+
|
|
15
|
+
Also read [AGENTS.md](AGENTS.md) for the full repository instructions.
|
|
16
|
+
|
|
17
|
+
## Existing repository isolation contract
|
|
18
|
+
|
|
19
|
+
Non-negotiable repository isolation rule: Every repository must run its Husky
|
|
20
|
+
hooks and tests using only files, code, fixtures, dependencies, and services
|
|
21
|
+
contained within that repository. Tests and Husky scripts must not import,
|
|
22
|
+
require, read, execute, or otherwise depend on sibling repositories or paths
|
|
23
|
+
outside the repository root. app-e2e-tests is the only exception because
|
|
24
|
+
cross-repository end-to-end testing is its explicit responsibility.
|
|
25
|
+
|
|
26
|
+
## Existing test-preservation policy
|
|
27
|
+
|
|
28
|
+
The TDD and validation requirements are non-negotiable and cannot be
|
|
29
|
+
overridden. The separate pre-existing-test protection still requires the
|
|
30
|
+
user's fresh, explicit permission for each exact proposed test modification.
|
|
31
|
+
|
|
32
|
+
A pre-existing test—defined as any test present before work on the current task
|
|
33
|
+
begins—must not be deleted, disabled, skipped, weakened, excluded from execution,
|
|
34
|
+
or otherwise removed. A pre-existing test must not be modified without the
|
|
35
|
+
user's explicit approval for the exact proposed change. If changing a
|
|
36
|
+
pre-existing test is believed necessary, stop before making the change and
|
|
37
|
+
request approval. The request must identify every affected test, describe the
|
|
38
|
+
precise proposed modification, provide detailed technical justification, and
|
|
39
|
+
explain all known or reasonably foreseeable regression risks. Until approval is
|
|
40
|
+
granted, leave every pre-existing test unchanged.
|
|
41
|
+
|
|
42
|
+
Also apply [$carecard-workspace-standards](.agents/skills/carecard-workspace-standards/SKILL.md)
|
|
43
|
+
for the mandatory TDD and code organization rules.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carecard/auth-util",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.30.0",
|
|
4
4
|
"repository": "https://github.com/CareCard-ca/pkg-auth-util.git",
|
|
5
5
|
"description": "Auth utility functions",
|
|
6
6
|
"main": "index.js",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"typescript": "6.0.3"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@carecard/common-util": "3.
|
|
54
|
-
"@carecard/validate": "3.
|
|
53
|
+
"@carecard/common-util": "3.30.0",
|
|
54
|
+
"@carecard/validate": "3.30.0",
|
|
55
55
|
"@types/express": "5.0.6"
|
|
56
56
|
},
|
|
57
57
|
"overrides": {
|
|
@@ -60,6 +60,6 @@
|
|
|
60
60
|
"brace-expansion": "5.0.9",
|
|
61
61
|
"minimatch": "10.2.6",
|
|
62
62
|
"serialize-javascript": "7.0.5",
|
|
63
|
-
"js-yaml": "4.3.
|
|
63
|
+
"js-yaml": "4.3.2"
|
|
64
64
|
}
|
|
65
65
|
}
|
package/readme.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @carecard/auth-util
|
|
2
2
|
|
|
3
|
+
## Release 1.1.1 and production data
|
|
4
|
+
|
|
5
|
+
CareCard Release 1.1.1 is the production baseline. Seeding with
|
|
6
|
+
`--seed-release-data` is complete. Production cluster data, database rows,
|
|
7
|
+
and stored user files will be preserved going forward. There will be no
|
|
8
|
+
complete user-data wipeout and re-creation.
|
|
9
|
+
|
|
10
|
+
Future production changes must use data-preserving migrations. Do not replay
|
|
11
|
+
the completed initialization or run reset, rollback, or seed workflows as part
|
|
12
|
+
of ordinary production deployment.
|
|
13
|
+
|
|
14
|
+
The [completed seed inventory and verification record](https://github.com/CareCard-ca/cc-seed-data/blob/main/plans/production-seed-result.md)
|
|
15
|
+
documents the accepted release baseline and verification limitations.
|
|
16
|
+
|
|
3
17
|
Non-negotiable test order invariance rule: Every test must pass independently of which tests run before or after it, and the suite must pass in every execution order. Each test must establish the state it needs, isolate mutable state, and clean up state it owns; it must never rely on another test's setup, mutations, or cleanup. Default test, CI, and Husky commands must use the test framework's ordinary ordering and must not force randomized ordering. Random-order execution is an explicit diagnostic only, and every failure it exposes must be fixed at the root cause.
|
|
4
18
|
|
|
5
19
|
Non-negotiable root-cause solution rule: Always identify and solve the verified root cause, use the stronger solution, and deliver a correct, durable, production-quality result. Never treat a temporary workaround, resource increase, retry, suppression, bypass, or symptom-only patch as completion. Validate the root-cause fix against the real failing workflow and prove the end state.
|