aw-spec-cli 0.1.4 → 0.1.6
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/assets/.agents/agent.json +28 -0
- package/assets/.agents/skills/appweaver/SKILL.md +56 -0
- package/assets/.agents/skills/appweaver-demo/SKILL.md +59 -0
- package/assets/.claude/agent.json +27 -0
- package/assets/.claude/skills/appweaver/SKILL.md +55 -0
- package/assets/.claude/skills/appweaver-demo/SKILL.md +59 -0
- package/assets/.kilocode/agent.json +28 -0
- package/assets/.kilocode/workflows/appweaver-demo.md +59 -0
- package/assets/.kilocode/workflows/appweaver.md +55 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +7 -54
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/assets/.agents/skills/aw-spec-addcomponent/SKILL.md +0 -129
- package/assets/.agents/skills/aw-spec-agent-context-update/SKILL.md +0 -31
- package/assets/.agents/skills/aw-spec-analyze/SKILL.md +0 -296
- package/assets/.agents/skills/aw-spec-checklist/SKILL.md +0 -374
- package/assets/.agents/skills/aw-spec-clarify/SKILL.md +0 -320
- package/assets/.agents/skills/aw-spec-constitution/SKILL.md +0 -194
- package/assets/.agents/skills/aw-spec-fast-implement/SKILL.md +0 -268
- package/assets/.agents/skills/aw-spec-foundation/SKILL.md +0 -358
- package/assets/.agents/skills/aw-spec-implement/SKILL.md +0 -279
- package/assets/.agents/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
- package/assets/.agents/skills/aw-spec-plan/SKILL.md +0 -221
- package/assets/.agents/skills/aw-spec-select-domain/SKILL.md +0 -73
- package/assets/.agents/skills/aw-spec-specify/SKILL.md +0 -382
- package/assets/.agents/skills/aw-spec-tasks/SKILL.md +0 -259
- package/assets/.agents/skills/aw-spec-taskstoissues/SKILL.md +0 -107
- package/assets/.aw-spec/domain.json +0 -3
- package/assets/.aw-spec/extensions/.registry +0 -19
- package/assets/.aw-spec/extensions/agent-context/README.md +0 -57
- package/assets/.aw-spec/extensions/agent-context/agent-context-config.yml +0 -4
- package/assets/.aw-spec/extensions/agent-context/commands/aw-spec.agent-context.update.md +0 -26
- package/assets/.aw-spec/extensions/agent-context/extension.yml +0 -34
- package/assets/.aw-spec/extensions/agent-context/scripts/bash/update-agent-context.sh +0 -201
- package/assets/.aw-spec/extensions/agent-context/scripts/powershell/update-agent-context.ps1 +0 -237
- package/assets/.aw-spec/extensions.yml +0 -23
- package/assets/.aw-spec/feature.json +0 -3
- package/assets/.aw-spec/init-options.json +0 -9
- package/assets/.aw-spec/integration.json +0 -15
- package/assets/.aw-spec/integrations/aw-spec.manifest.json +0 -17
- package/assets/.aw-spec/integrations/claude.manifest.json +0 -17
- package/assets/.aw-spec/memory/constitution.md +0 -50
- package/assets/.aw-spec/scripts/bash/check-prerequisites.sh +0 -189
- package/assets/.aw-spec/scripts/bash/common.sh +0 -582
- package/assets/.aw-spec/scripts/bash/create-new-feature.sh +0 -299
- package/assets/.aw-spec/scripts/bash/setup-plan.sh +0 -84
- package/assets/.aw-spec/scripts/bash/setup-tasks.sh +0 -91
- package/assets/.aw-spec/templates/checklist-template.md +0 -40
- package/assets/.aw-spec/templates/constitution-template.md +0 -57
- package/assets/.aw-spec/templates/plan-template.md +0 -113
- package/assets/.aw-spec/templates/spec-template.md +0 -131
- package/assets/.aw-spec/templates/tasks-template.md +0 -252
- package/assets/.aw-spec/workflows/aw-spec/workflow.yml +0 -77
- package/assets/.aw-spec/workflows/workflow-registry.json +0 -13
- package/assets/.claude/skills/aw-spec-addcomponent/SKILL.md +0 -129
- package/assets/.claude/skills/aw-spec-agent-context-update/SKILL.md +0 -31
- package/assets/.claude/skills/aw-spec-analyze/SKILL.md +0 -296
- package/assets/.claude/skills/aw-spec-checklist/SKILL.md +0 -374
- package/assets/.claude/skills/aw-spec-clarify/SKILL.md +0 -320
- package/assets/.claude/skills/aw-spec-constitution/SKILL.md +0 -194
- package/assets/.claude/skills/aw-spec-fast-implement/SKILL.md +0 -268
- package/assets/.claude/skills/aw-spec-foundation/SKILL.md +0 -358
- package/assets/.claude/skills/aw-spec-implement/SKILL.md +0 -279
- package/assets/.claude/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
- package/assets/.claude/skills/aw-spec-plan/SKILL.md +0 -221
- package/assets/.claude/skills/aw-spec-select-domain/SKILL.md +0 -73
- package/assets/.claude/skills/aw-spec-specify/SKILL.md +0 -382
- package/assets/.claude/skills/aw-spec-tasks/SKILL.md +0 -259
- package/assets/.claude/skills/aw-spec-taskstoissues/SKILL.md +0 -107
- package/assets/.kilocode/rules/specify-rules.md +0 -4
- package/assets/.kilocode/workflows/aw-spec-addcomponent.md +0 -129
- package/assets/.kilocode/workflows/aw-spec-agent-context.update.md +0 -31
- package/assets/.kilocode/workflows/aw-spec-analyze.md +0 -296
- package/assets/.kilocode/workflows/aw-spec-checklist.md +0 -374
- package/assets/.kilocode/workflows/aw-spec-clarify.md +0 -320
- package/assets/.kilocode/workflows/aw-spec-constitution.md +0 -194
- package/assets/.kilocode/workflows/aw-spec-fast-implement.md +0 -263
- package/assets/.kilocode/workflows/aw-spec-foundation.md +0 -358
- package/assets/.kilocode/workflows/aw-spec-implement.md +0 -279
- package/assets/.kilocode/workflows/aw-spec-minimal-implementation.md +0 -204
- package/assets/.kilocode/workflows/aw-spec-plan.md +0 -221
- package/assets/.kilocode/workflows/aw-spec-select-domain.md +0 -73
- package/assets/.kilocode/workflows/aw-spec-specify.md +0 -382
- package/assets/.kilocode/workflows/aw-spec-tasks.md +0 -259
- package/assets/.kilocode/workflows/aw-spec-taskstoissues.md +0 -107
- package/assets/docs/ModularMonolith/ModularMonolith.Reference.pack.txt +0 -25248
- package/assets/docs/ModularMonolith/ModularMonolith.pack.txt +0 -5726
- package/assets/docs/ModularMonolith/pack-foundation.ps1 +0 -145
- package/assets/docs/ModularMonolith/pack-foundation.sh +0 -196
- package/assets/docs/ModularMonolith/pack-reference-foundation.ps1 +0 -157
- package/assets/docs/ModularMonolith/pack-reference-foundation.sh +0 -209
- package/assets/docs/ModularMonolith/unpack-foundation.ps1 +0 -126
- package/assets/docs/ModularMonolith/unpack-foundation.sh +0 -217
- package/assets/docs/ModularMonolith/unpack-reference-foundation.ps1 +0 -129
- package/assets/docs/ModularMonolith/unpack-reference-foundation.sh +0 -218
- package/assets/docs/README.md +0 -106
- package/assets/docs/UI.Visualization/PACKAGING.md +0 -191
- package/assets/docs/UI.Visualization/UI.Visualization.Reference.pack.txt +0 -11768
- package/assets/docs/UI.Visualization/UI.Visualization.pack.txt +0 -11214
- package/assets/docs/UI.Visualization/pack-foundation.ps1 +0 -165
- package/assets/docs/UI.Visualization/pack-foundation.sh +0 -206
- package/assets/docs/UI.Visualization/pack-reference-foundation.ps1 +0 -159
- package/assets/docs/UI.Visualization/pack-reference-foundation.sh +0 -205
- package/assets/docs/UI.Visualization/unpack-foundation.ps1 +0 -126
- package/assets/docs/UI.Visualization/unpack-foundation.sh +0 -217
- package/assets/docs/UI.Visualization/unpack-reference-foundation.ps1 +0 -129
- package/assets/docs/UI.Visualization/unpack-reference-foundation.sh +0 -218
- package/assets/docs/VerticalSlice/PACKAGING.md +0 -185
- package/assets/docs/VerticalSlice/VerticalSlice.Reference.pack.txt +0 -19318
- package/assets/docs/VerticalSlice/VerticalSlice.pack.txt +0 -2833
- package/assets/docs/VerticalSlice/pack-foundation.ps1 +0 -145
- package/assets/docs/VerticalSlice/pack-foundation.sh +0 -196
- package/assets/docs/VerticalSlice/pack-reference-foundation.ps1 +0 -157
- package/assets/docs/VerticalSlice/pack-reference-foundation.sh +0 -209
- package/assets/docs/VerticalSlice/unpack-foundation.ps1 +0 -126
- package/assets/docs/VerticalSlice/unpack-foundation.sh +0 -217
- package/assets/docs/VerticalSlice/unpack-reference-foundation.ps1 +0 -129
- package/assets/docs/VerticalSlice/unpack-reference-foundation.sh +0 -218
- package/assets/docs/architecture/clean-architecture.md +0 -71
- package/assets/docs/architecture/cqrs.md +0 -141
- package/assets/docs/architecture/eventing.md +0 -83
- package/assets/docs/architecture/folder-structure.md +0 -61
- package/assets/docs/architecture/modular-monolith.md +0 -47
- package/assets/docs/architecture/persistence.md +0 -269
- package/assets/docs/architecture/testing.md +0 -55
- package/assets/docs/architecture/vertical-slices.md +0 -201
- package/assets/docs/command.txt +0 -295
- package/assets/docs/components/Email/README.md +0 -119
- package/assets/docs/components/Email/ReferenceEndpoints/SendEmailEndpoint.cs +0 -84
- package/assets/docs/components/Email/integration.md +0 -300
- package/assets/docs/components/Jobs/README.md +0 -113
- package/assets/docs/components/Jobs/integration.md +0 -259
- package/assets/docs/components/QrGenerator/README.md +0 -85
- package/assets/docs/components/QrGenerator/ReferenceEndpoints/GenerateQrEndpoint.cs +0 -57
- package/assets/docs/components/QrGenerator/integration.md +0 -230
- package/assets/docs/components/README.md +0 -74
- package/assets/docs/domain/domain-driven-design.md +0 -212
- package/assets/docs/domainspecs/UIVisualization/chart-bubble.md +0 -70
- package/assets/docs/domainspecs/UIVisualization/chart-dimred.md +0 -58
- package/assets/docs/domainspecs/UIVisualization/chart-heatmap.md +0 -62
- package/assets/docs/domainspecs/UIVisualization/chart-network.md +0 -69
- package/assets/docs/domainspecs/UIVisualization/chart-parallel.md +0 -75
- package/assets/docs/domainspecs/UIVisualization/chart-scurve.md +0 -66
- package/assets/docs/domainspecs/UIVisualization/chart-survival.md +0 -69
- package/assets/docs/domainspecs/UIVisualization/chart-trellis.md +0 -68
- package/assets/docs/domainspecs/UIVisualization/chart-violin.md +0 -61
- package/assets/docs/domainspecs/UIVisualization/chart-volcano.md +0 -63
- package/assets/docs/domainspecs/UIVisualization/charting-standards.domain.md +0 -80
- package/assets/docs/domainspecs/UIVisualization/clean-architecture.domain.md +0 -87
- package/assets/docs/domainspecs/UIVisualization/coding-standards.domain.md +0 -47
- package/assets/docs/domainspecs/UIVisualization/comandrulemap.md +0 -130
- package/assets/docs/domainspecs/UIVisualization/component-contracts.domain.md +0 -67
- package/assets/docs/domainspecs/UIVisualization/data-source.domain.md +0 -68
- package/assets/docs/domainspecs/UIVisualization/domain-requirements.md +0 -110
- package/assets/docs/domainspecs/UIVisualization/folder-structure.domain.md +0 -55
- package/assets/docs/domainspecs/UIVisualization/state-management.domain.md +0 -67
- package/assets/docs/domainspecs/UIVisualization/testing.domain.md +0 -52
- package/assets/docs/domainspecs/UIVisualization/ui-viz-terms.md +0 -39
- package/assets/docs/domainspecs/healthcare/ai-rules.domain.md +0 -34
- package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +0 -17
- package/assets/docs/domainspecs/healthcare/auditing.domain.md +0 -29
- package/assets/docs/domainspecs/healthcare/authorization.domain.md +0 -26
- package/assets/docs/domainspecs/healthcare/clinical-terms.md +0 -20
- package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +0 -26
- package/assets/docs/domainspecs/healthcare/comandrulemap.md +0 -166
- package/assets/docs/domainspecs/healthcare/consent.md +0 -19
- package/assets/docs/domainspecs/healthcare/cqrs.domain.md +0 -12
- package/assets/docs/domainspecs/healthcare/data-classification.domain.md +0 -28
- package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +0 -11
- package/assets/docs/domainspecs/healthcare/dicom.md +0 -15
- package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +0 -28
- package/assets/docs/domainspecs/healthcare/domain-requirements.md +0 -55
- package/assets/docs/domainspecs/healthcare/eventing.domain.md +0 -18
- package/assets/docs/domainspecs/healthcare/fhir.md +0 -36
- package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +0 -23
- package/assets/docs/domainspecs/healthcare/hipaa.md +0 -34
- package/assets/docs/domainspecs/healthcare/hl7.md +0 -15
- package/assets/docs/domainspecs/healthcare/integration-terms.md +0 -21
- package/assets/docs/domainspecs/healthcare/persistence.domain.md +0 -20
- package/assets/docs/domainspecs/healthcare/terminology.md +0 -30
- package/assets/docs/domainspecs/healthcare/testing.domain.md +0 -15
- package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +0 -18
- package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +0 -12
- package/assets/docs/domainspecs/pharma/ai-rules.domain.md +0 -32
- package/assets/docs/domainspecs/pharma/api-versioning.domain.md +0 -20
- package/assets/docs/domainspecs/pharma/atc.md +0 -22
- package/assets/docs/domainspecs/pharma/auditing.domain.md +0 -26
- package/assets/docs/domainspecs/pharma/authorization.domain.md +0 -25
- package/assets/docs/domainspecs/pharma/coding-standards.domain.md +0 -28
- package/assets/docs/domainspecs/pharma/comandrulemap.md +0 -186
- package/assets/docs/domainspecs/pharma/cqrs.domain.md +0 -16
- package/assets/docs/domainspecs/pharma/data-classification.domain.md +0 -24
- package/assets/docs/domainspecs/pharma/data-provenance.md +0 -21
- package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +0 -11
- package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +0 -36
- package/assets/docs/domainspecs/pharma/domain-requirements.md +0 -99
- package/assets/docs/domainspecs/pharma/eventing.domain.md +0 -18
- package/assets/docs/domainspecs/pharma/fhir.md +0 -31
- package/assets/docs/domainspecs/pharma/folder-structure.domain.md +0 -24
- package/assets/docs/domainspecs/pharma/hl7.md +0 -17
- package/assets/docs/domainspecs/pharma/idmp.md +0 -26
- package/assets/docs/domainspecs/pharma/integration-terms.md +0 -21
- package/assets/docs/domainspecs/pharma/ndc.md +0 -28
- package/assets/docs/domainspecs/pharma/persistence.domain.md +0 -23
- package/assets/docs/domainspecs/pharma/pharma-terms.md +0 -27
- package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +0 -30
- package/assets/docs/domainspecs/pharma/regulatory-compliance.md +0 -19
- package/assets/docs/domainspecs/pharma/terminology.md +0 -32
- package/assets/docs/domainspecs/pharma/testing.domain.md +0 -19
- package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +0 -17
- package/assets/docs/domainspecs/pharma/zero-trust.domain.md +0 -12
- package/assets/docs/glossary/ai-rules.md +0 -59
- package/assets/docs/governance/api-versioning.md +0 -99
- package/assets/docs/governance/coding-standards.md +0 -87
- package/assets/docs/governance/dependency-policy.md +0 -40
- package/assets/docs/interop/ihe-conformance.md +0 -31
- package/assets/docs/security/auditing.md +0 -117
- package/assets/docs/security/authorization-matrix.md +0 -14
- package/assets/docs/security/authorization.md +0 -87
- package/assets/docs/security/data-classification.md +0 -38
- package/assets/docs/security/zero-trust.md +0 -76
- package/assets/docs/technology-constitution.md +0 -172
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# unpack-reference-foundation.sh — bash/macOS port of unpack-reference-foundation.ps1
|
|
4
|
-
#
|
|
5
|
-
# SYNOPSIS
|
|
6
|
-
# Unpack an AW-Spec reference pack file into a target project, renaming the
|
|
7
|
-
# sentinel app name to the caller's app name.
|
|
8
|
-
#
|
|
9
|
-
# DESCRIPTION
|
|
10
|
-
# Reads --pack-file (produced by pack-reference-foundation.sh/.ps1), takes the sentinel
|
|
11
|
-
# from its header (override with --sentinel), derives four case forms of the target app
|
|
12
|
-
# name, and writes every file block to --out-dir with the sentinel rewritten in both file
|
|
13
|
-
# CONTENTS and file/dir PATHS. Text blocks are rewritten and written as UTF-8; base64
|
|
14
|
-
# blocks are decoded as-is. Refuses to overwrite existing files unless --force.
|
|
15
|
-
#
|
|
16
|
-
# EXAMPLE
|
|
17
|
-
# ./unpack-reference-foundation.sh \
|
|
18
|
-
# --pack-file ./VerticalSlice.Reference.pack.txt \
|
|
19
|
-
# --target-app-name AppWeaver.Pharma \
|
|
20
|
-
# --out-dir ../../
|
|
21
|
-
#
|
|
22
|
-
set -euo pipefail
|
|
23
|
-
|
|
24
|
-
# ------------------------------------------------------------------ defaults ---
|
|
25
|
-
PACK_FILE=''
|
|
26
|
-
TARGET_APP_NAME=''
|
|
27
|
-
OUT_DIR='.'
|
|
28
|
-
SENTINEL=''
|
|
29
|
-
FORCE=0
|
|
30
|
-
DRYRUN=0
|
|
31
|
-
|
|
32
|
-
usage() {
|
|
33
|
-
cat >&2 <<'EOF'
|
|
34
|
-
Usage: unpack-reference-foundation.sh --pack-file <file> --target-app-name <name>
|
|
35
|
-
[--out-dir <dir>] [--sentinel <name>]
|
|
36
|
-
[--force] [--dry-run]
|
|
37
|
-
|
|
38
|
-
-p, --pack-file <file> Reference pack file to unpack (required)
|
|
39
|
-
-t, --target-app-name <name> New app name to rename the sentinel into (required)
|
|
40
|
-
-o, --out-dir <dir> Output root (default: .)
|
|
41
|
-
--sentinel <name> Override the sentinel from the pack header
|
|
42
|
-
--force Overwrite files that already exist
|
|
43
|
-
--dry-run List what would be written, write nothing
|
|
44
|
-
-h, --help Show this help
|
|
45
|
-
|
|
46
|
-
Positional fallback: unpack-reference-foundation.sh <pack-file> <target-app-name> [out-dir]
|
|
47
|
-
EOF
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
# -------------------------------------------------------------- arg parsing ---
|
|
51
|
-
while [ $# -gt 0 ]; do
|
|
52
|
-
case "$1" in
|
|
53
|
-
-p|--pack-file) PACK_FILE="${2:?--pack-file needs a value}"; shift 2 ;;
|
|
54
|
-
-t|--target-app-name) TARGET_APP_NAME="${2:?--target-app-name needs a value}"; shift 2 ;;
|
|
55
|
-
-o|--out-dir) OUT_DIR="${2:?--out-dir needs a value}"; shift 2 ;;
|
|
56
|
-
--sentinel) SENTINEL="${2:?--sentinel needs a value}"; shift 2 ;;
|
|
57
|
-
--force) FORCE=1; shift ;;
|
|
58
|
-
--dry-run) DRYRUN=1; shift ;;
|
|
59
|
-
-h|--help) usage; exit 0 ;;
|
|
60
|
-
--) shift; break ;;
|
|
61
|
-
-*) echo "Error: unknown option: $1" >&2; usage; exit 2 ;;
|
|
62
|
-
*)
|
|
63
|
-
if [ -z "$PACK_FILE" ]; then PACK_FILE="$1"
|
|
64
|
-
elif [ -z "$TARGET_APP_NAME" ]; then TARGET_APP_NAME="$1"
|
|
65
|
-
else OUT_DIR="$1"
|
|
66
|
-
fi
|
|
67
|
-
shift ;;
|
|
68
|
-
esac
|
|
69
|
-
done
|
|
70
|
-
|
|
71
|
-
[ -n "$PACK_FILE" ] || { echo "Error: --pack-file is required." >&2; usage; exit 2; }
|
|
72
|
-
[ -n "$TARGET_APP_NAME" ] || { echo "Error: --target-app-name is required." >&2; usage; exit 2; }
|
|
73
|
-
[ -f "$PACK_FILE" ] || { echo "Error: pack file not found: $PACK_FILE" >&2; exit 1; }
|
|
74
|
-
|
|
75
|
-
case "$TARGET_APP_NAME" in
|
|
76
|
-
*[!A-Za-z0-9._-]*)
|
|
77
|
-
echo "Error: --target-app-name may contain only letters, digits, '.', '_' or '-': $TARGET_APP_NAME" >&2
|
|
78
|
-
exit 2 ;;
|
|
79
|
-
esac
|
|
80
|
-
|
|
81
|
-
# ------------------------------------------------ sentinel from header --------
|
|
82
|
-
if [ -z "$SENTINEL" ]; then
|
|
83
|
-
SENTINEL="$(LC_ALL=C sed -n 's/^#[[:space:]]*sentinel:[[:space:]]*\(.*[^[:space:]]\)[[:space:]]*$/\1/p' "$PACK_FILE" | head -n1)"
|
|
84
|
-
fi
|
|
85
|
-
[ -n "$SENTINEL" ] || { echo "Error: Sentinel not found in pack header; supply it with --sentinel." >&2; exit 1; }
|
|
86
|
-
|
|
87
|
-
# ------------------------------------------------ derive case forms -----------
|
|
88
|
-
to_lower() { printf '%s' "$1" | LC_ALL=C tr '[:upper:]' '[:lower:]'; }
|
|
89
|
-
|
|
90
|
-
S_DOT="$SENTINEL"; T_DOT="$TARGET_APP_NAME"
|
|
91
|
-
S_UND="${SENTINEL//./_}"; T_UND="${TARGET_APP_NAME//./_}"
|
|
92
|
-
s_low="$(to_lower "$SENTINEL")"; t_low="$(to_lower "$TARGET_APP_NAME")"
|
|
93
|
-
S_HYP="${s_low//./-}"; T_HYP="${t_low//./-}"
|
|
94
|
-
S_LDOT="$s_low"; T_LDOT="$t_low"
|
|
95
|
-
|
|
96
|
-
FROM=(); TO=()
|
|
97
|
-
add_form() {
|
|
98
|
-
local from="$1" to="$2" e
|
|
99
|
-
[ -n "$from" ] || return 0
|
|
100
|
-
[ "$from" = "$to" ] && return 0
|
|
101
|
-
if [ "${#FROM[@]}" -gt 0 ]; then
|
|
102
|
-
for e in "${FROM[@]}"; do [ "$e" = "$from" ] && return 0; done
|
|
103
|
-
fi
|
|
104
|
-
FROM+=("$from"); TO+=("$to")
|
|
105
|
-
}
|
|
106
|
-
add_form "$S_DOT" "$T_DOT"
|
|
107
|
-
add_form "$S_UND" "$T_UND"
|
|
108
|
-
add_form "$S_HYP" "$T_HYP"
|
|
109
|
-
add_form "$S_LDOT" "$T_LDOT"
|
|
110
|
-
|
|
111
|
-
# Sort indices by FROM length descending
|
|
112
|
-
ORDER=()
|
|
113
|
-
{
|
|
114
|
-
local_n="${#FROM[@]}"
|
|
115
|
-
used=(); for ((k = 0; k < local_n; k++)); do used[$k]=0; done
|
|
116
|
-
for ((pass = 0; pass < local_n; pass++)); do
|
|
117
|
-
best=-1; bestlen=-1
|
|
118
|
-
for ((j = 0; j < local_n; j++)); do
|
|
119
|
-
if [ "${used[$j]}" -eq 0 ] && [ "${#FROM[$j]}" -gt "$bestlen" ]; then
|
|
120
|
-
bestlen="${#FROM[$j]}"; best="$j"
|
|
121
|
-
fi
|
|
122
|
-
done
|
|
123
|
-
used[$best]=1; ORDER+=("$best")
|
|
124
|
-
done
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
REPL_OUT=''
|
|
128
|
-
apply_repl() {
|
|
129
|
-
local text="$1" idx from to
|
|
130
|
-
if [ "${#ORDER[@]}" -gt 0 ]; then
|
|
131
|
-
for idx in "${ORDER[@]}"; do
|
|
132
|
-
from="${FROM[$idx]}"; to="${TO[$idx]}"
|
|
133
|
-
text="${text//"$from"/$to}"
|
|
134
|
-
done
|
|
135
|
-
fi
|
|
136
|
-
REPL_OUT="$text"
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
# ------------------------------------------------ output root ----------------
|
|
140
|
-
[ -d "$OUT_DIR" ] || mkdir -p "$OUT_DIR"
|
|
141
|
-
OUT_ROOT="$(cd "$OUT_DIR" && pwd -P)"
|
|
142
|
-
|
|
143
|
-
# ------------------------------------------------ base64 decoder (portable) --
|
|
144
|
-
B64D=()
|
|
145
|
-
if printf 'aGk=' | base64 -d >/dev/null 2>&1; then B64D=(base64 -d)
|
|
146
|
-
elif printf 'aGk=' | base64 -D >/dev/null 2>&1; then B64D=(base64 -D)
|
|
147
|
-
elif printf 'aGk=' | base64 --decode >/dev/null 2>&1; then B64D=(base64 --decode)
|
|
148
|
-
else B64D=(openssl base64 -d -A)
|
|
149
|
-
fi
|
|
150
|
-
|
|
151
|
-
# ------------------------------------------------ parse file blocks ----------
|
|
152
|
-
rels=(); encs=(); contents=()
|
|
153
|
-
in_block=0; cur_rel=''; cur_enc=''; cur_content=''; first_line=1
|
|
154
|
-
file_re='^<<<FILE path="([^"]+)"( encoding="([^"]+)")?>>>[[:space:]]*$'
|
|
155
|
-
|
|
156
|
-
while IFS= read -r line || [ -n "$line" ]; do
|
|
157
|
-
line="${line%$'\r'}"
|
|
158
|
-
if [ "$in_block" -eq 0 ]; then
|
|
159
|
-
if [[ "$line" =~ $file_re ]]; then
|
|
160
|
-
cur_rel="${BASH_REMATCH[1]}"
|
|
161
|
-
cur_enc="${BASH_REMATCH[3]:-}"
|
|
162
|
-
in_block=1; first_line=1; cur_content=''
|
|
163
|
-
fi
|
|
164
|
-
else
|
|
165
|
-
if [ "$line" = '<<<ENDFILE>>>' ]; then
|
|
166
|
-
rels+=("$cur_rel"); encs+=("$cur_enc"); contents+=("$cur_content")
|
|
167
|
-
in_block=0
|
|
168
|
-
elif [ "$first_line" -eq 1 ]; then
|
|
169
|
-
cur_content="$line"; first_line=0
|
|
170
|
-
else
|
|
171
|
-
cur_content="$cur_content"$'\n'"$line"
|
|
172
|
-
fi
|
|
173
|
-
fi
|
|
174
|
-
done < "$PACK_FILE"
|
|
175
|
-
|
|
176
|
-
[ "${#rels[@]}" -gt 0 ] || { echo "Error: No <<<FILE>>> blocks found in pack: $PACK_FILE" >&2; exit 1; }
|
|
177
|
-
|
|
178
|
-
# ------------------------------------------------ resolve destinations -------
|
|
179
|
-
dests=()
|
|
180
|
-
for ((i = 0; i < ${#rels[@]}; i++)); do
|
|
181
|
-
apply_repl "${rels[$i]}"
|
|
182
|
-
dests+=("$OUT_ROOT/$REPL_OUT")
|
|
183
|
-
done
|
|
184
|
-
|
|
185
|
-
# ------------------------------------------------ conflict guard -------------
|
|
186
|
-
if [ "$FORCE" -eq 0 ] && [ "$DRYRUN" -eq 0 ]; then
|
|
187
|
-
conflicts=()
|
|
188
|
-
for d in "${dests[@]}"; do [ -e "$d" ] && conflicts+=("$d"); done
|
|
189
|
-
if [ "${#conflicts[@]}" -gt 0 ]; then
|
|
190
|
-
echo "Error: Refusing to overwrite existing files (re-run with --force):" >&2
|
|
191
|
-
printf ' %s\n' "${conflicts[@]}" >&2
|
|
192
|
-
exit 1
|
|
193
|
-
fi
|
|
194
|
-
fi
|
|
195
|
-
|
|
196
|
-
# ------------------------------------------------ write ----------------------
|
|
197
|
-
written=0
|
|
198
|
-
for ((i = 0; i < ${#rels[@]}; i++)); do
|
|
199
|
-
rel="${rels[$i]}"; enc="${encs[$i]}"; dest="${dests[$i]}"
|
|
200
|
-
if [ "$DRYRUN" -eq 1 ]; then
|
|
201
|
-
echo "WOULD WRITE $rel -> $dest"
|
|
202
|
-
continue
|
|
203
|
-
fi
|
|
204
|
-
mkdir -p "$(dirname "$dest")"
|
|
205
|
-
if [ "$enc" = 'base64' ]; then
|
|
206
|
-
printf '%s' "${contents[$i]}" | tr -d '[:space:]' | "${B64D[@]}" > "$dest"
|
|
207
|
-
else
|
|
208
|
-
apply_repl "${contents[$i]}"
|
|
209
|
-
printf '%s' "$REPL_OUT" > "$dest"
|
|
210
|
-
fi
|
|
211
|
-
written=$((written + 1))
|
|
212
|
-
done
|
|
213
|
-
|
|
214
|
-
if [ "$DRYRUN" -eq 1 ]; then
|
|
215
|
-
echo "DryRun: ${#rels[@]} file(s) would be written to $OUT_ROOT (sentinel '$SENTINEL' -> '$TARGET_APP_NAME')."
|
|
216
|
-
else
|
|
217
|
-
echo "Unpacked $written file(s) to $OUT_ROOT (sentinel '$SENTINEL' -> '$TARGET_APP_NAME')."
|
|
218
|
-
fi
|
package/assets/docs/README.md
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
# Engineering Standards — Index & Context-Loading Map
|
|
2
|
-
|
|
3
|
-
These docs are the detailed engineering standards expanded from the slim constitution inputs
|
|
4
|
-
(`docs/technology-constitution.md` composed with a domain addenda such as
|
|
5
|
-
`docs/healthcare-constitution.md` or `docs/pharma-constitution.md`, ratified into
|
|
6
|
-
`.aw-spec/memory/constitution.md`). The constitution remains supreme; these files expand each
|
|
7
|
-
principle into a focused, includable reference.
|
|
8
|
-
|
|
9
|
-
The **technology** standards are loaded **automatically** by each AW-Spec command (see each
|
|
10
|
-
`.claude/skills/aw-spec-*/SKILL.md`). The **domain** standards live under
|
|
11
|
-
`domainspecs/<domain>/` and are added per project; a `healthcare` set is provided.
|
|
12
|
-
|
|
13
|
-
## Naming convention: technology vs. domain
|
|
14
|
-
|
|
15
|
-
- **`<area>/<name>.md`** — **pure technology**, domain-agnostic. Reusable across all projects.
|
|
16
|
-
Auto-loaded by the commands.
|
|
17
|
-
- **`domainspecs/healthcare/<name>.md` and `<name>.domain.md`** — **healthcare domain-specific**
|
|
18
|
-
rules, all collected under one folder. A `.domain.md` extends the matching technology file
|
|
19
|
-
(FHIR, HL7, DICOM, PHI/HIPAA, ATNA, ICD/SNOMED/LOINC, consent, clinical aggregates, etc.);
|
|
20
|
-
the plain `.md` files there (fhir, hl7, dicom, terminology, consent, hipaa, clinical-terms,
|
|
21
|
-
integration-terms, domain-requirements) are inherently healthcare.
|
|
22
|
-
|
|
23
|
-
> **To reuse on a non-healthcare project:** keep every technology `*.md` as-is and create a
|
|
24
|
-
> sibling `domainspecs/<your-domain>/` folder with your own domain rule files. Select the active
|
|
25
|
-
> domain with `/aw-spec-select-domain` (stored in `.aw-spec/domain.json`); commands resolve
|
|
26
|
-
> `domainspecs/<active-domain>/comandrulemap.md` from it.
|
|
27
|
-
|
|
28
|
-
Note: `domain/domain-driven-design.md` is generic DDD tactical guidance and is treated as
|
|
29
|
-
pure technology (auto-loaded); its healthcare companion lives at
|
|
30
|
-
`domainspecs/healthcare/domain-driven-design.domain.md`.
|
|
31
|
-
|
|
32
|
-
## Files — technology (auto-loaded)
|
|
33
|
-
|
|
34
|
-
### `architecture/`
|
|
35
|
-
- [clean-architecture.md](architecture/clean-architecture.md) — dependency rule, layers, infra boundaries
|
|
36
|
-
- [modular-monolith.md](architecture/modular-monolith.md) — module boundaries, cross-module rules, extraction
|
|
37
|
-
- [folder-structure.md](architecture/folder-structure.md) — mandatory `src/tests/helm/docs` tree (templated with `<SampleProjectName>`)
|
|
38
|
-
- [cqrs.md](architecture/cqrs.md) — mediator, Result pattern, transactions
|
|
39
|
-
- [vertical-slices.md](architecture/vertical-slices.md) — feature & folder structure
|
|
40
|
-
- [persistence.md](architecture/persistence.md) — EF Core, specs, concurrency, tenancy
|
|
41
|
-
- [testing.md](architecture/testing.md) — unit/integration/Testcontainers/coverage
|
|
42
|
-
- [eventing.md](architecture/eventing.md) — CloudEvents, versioning, broker
|
|
43
|
-
|
|
44
|
-
### `security/`
|
|
45
|
-
- [zero-trust.md](security/zero-trust.md) — TLS, identity, secrets
|
|
46
|
-
- [authorization.md](security/authorization.md) — role+scope model, cache policy
|
|
47
|
-
- [authorization-matrix.md](security/authorization-matrix.md) — role/scope matrix
|
|
48
|
-
- [auditing.md](security/auditing.md) — observability, structured logging, immutable audit
|
|
49
|
-
- [data-classification.md](security/data-classification.md) — classification framework, encryption
|
|
50
|
-
|
|
51
|
-
### `governance/`
|
|
52
|
-
- [coding-standards.md](governance/coding-standards.md) — naming, forbidden patterns, CI gates
|
|
53
|
-
- [dependency-policy.md](governance/dependency-policy.md) — package governance, banned packages
|
|
54
|
-
- [api-versioning.md](governance/api-versioning.md) — REST versioning, ETag, OpenAPI/AsyncAPI
|
|
55
|
-
|
|
56
|
-
### `domain/`
|
|
57
|
-
- [domain-driven-design.md](domain/domain-driven-design.md) — generic DDD tactical patterns *(reusable tech, lives here by topic)*
|
|
58
|
-
|
|
59
|
-
### `glossary/`
|
|
60
|
-
- [ai-rules.md](glossary/ai-rules.md) — generic AI agent rules
|
|
61
|
-
|
|
62
|
-
## Files — healthcare domain (`domainspecs/healthcare/`, add per project)
|
|
63
|
-
|
|
64
|
-
**Architecture overlays**
|
|
65
|
-
- [folder-structure.domain.md](domainspecs/healthcare/folder-structure.domain.md) — healthcare Interop, conformance tests, PHI fixtures
|
|
66
|
-
- [cqrs.domain.md](domainspecs/healthcare/cqrs.domain.md) — PHI-audit behavior
|
|
67
|
-
- [vertical-slices.domain.md](domainspecs/healthcare/vertical-slices.domain.md) — FHIR-HL7-DICOM Interop slice
|
|
68
|
-
- [persistence.domain.md](domainspecs/healthcare/persistence.domain.md) — PHI retention & encryption-at-rest
|
|
69
|
-
- [testing.domain.md](domainspecs/healthcare/testing.domain.md) — FHIR validation & synthetic PHI
|
|
70
|
-
- [eventing.domain.md](domainspecs/healthcare/eventing.domain.md) — healthcare feeds & protocol tracing
|
|
71
|
-
|
|
72
|
-
**Domain (clinical)**
|
|
73
|
-
- [domain-driven-design.domain.md](domainspecs/healthcare/domain-driven-design.domain.md) — healthcare canonical aggregates & invariants
|
|
74
|
-
- [domain-requirements.md](domainspecs/healthcare/domain-requirements.md) — project bounded contexts / aggregates *(project-specific)*
|
|
75
|
-
- [fhir.md](domainspecs/healthcare/fhir.md) — projectors, CapabilityStatement, profiles, Bundle/search, SMART, Bulk Data
|
|
76
|
-
- [terminology.md](domainspecs/healthcare/terminology.md) — ICD/LOINC/SNOMED/RxNorm, coded value objects, terminology service
|
|
77
|
-
- [hl7.md](domainspecs/healthcare/hl7.md) — HL7 v2 ingestion/egress, adapters, MLLP
|
|
78
|
-
- [dicom.md](domainspecs/healthcare/dicom.md) — DICOMweb, PACS/VNA boundary, metadata-only persistence
|
|
79
|
-
- [consent.md](domainspecs/healthcare/consent.md) — consent enforcement, break-the-glass, restriction-of-processing, FHIR Consent
|
|
80
|
-
- [hipaa.md](domainspecs/healthcare/hipaa.md) — PHI handling, audit, retention, minimum-necessary, breach handling
|
|
81
|
-
|
|
82
|
-
**Security overlays**
|
|
83
|
-
- [zero-trust.domain.md](domainspecs/healthcare/zero-trust.domain.md) — PHI transport, SMART tokens, ATNA node auth
|
|
84
|
-
- [authorization.domain.md](domainspecs/healthcare/authorization.domain.md) — clinical roles, SMART scopes, consent, break-the-glass
|
|
85
|
-
- [auditing.domain.md](domainspecs/healthcare/auditing.domain.md) — ATNA, FHIR AuditEvent, PHI audit
|
|
86
|
-
- [data-classification.domain.md](domainspecs/healthcare/data-classification.domain.md) — PHI/PII/PCI taxonomy, de-identification
|
|
87
|
-
|
|
88
|
-
**Governance overlays**
|
|
89
|
-
- [coding-standards.domain.md](domainspecs/healthcare/coding-standards.domain.md) — FHIR & PHI patterns and gates
|
|
90
|
-
- [dependency-policy.domain.md](domainspecs/healthcare/dependency-policy.domain.md) — HIPAA suitability, healthcare libs
|
|
91
|
-
- [api-versioning.domain.md](domainspecs/healthcare/api-versioning.domain.md) — FHIR versioning, CapabilityStatement
|
|
92
|
-
|
|
93
|
-
**Glossary**
|
|
94
|
-
- [clinical-terms.md](domainspecs/healthcare/clinical-terms.md) — MRN, Encounter, Observation, Coverage, etc.
|
|
95
|
-
- [integration-terms.md](domainspecs/healthcare/integration-terms.md) — HL7, FHIR, DICOM, PIX/PDQ, ATNA, MHD, XDS
|
|
96
|
-
- [ai-rules.domain.md](domainspecs/healthcare/ai-rules.domain.md) — PHI masking, codes, FHIR, security-edit limits
|
|
97
|
-
|
|
98
|
-
## Context-loading map (which docs to include per AW-Spec command)
|
|
99
|
-
|
|
100
|
-
Technology standards auto-load per command. The per-command mappings are single-sourced:
|
|
101
|
-
|
|
102
|
-
- **Technical defaults** (auto-loaded) — the `Auto-Loaded Engineering Standards` section
|
|
103
|
-
inside each `.claude/skills/aw-spec-<command>/SKILL.md`.
|
|
104
|
-
- **Domain rule files** (selectable) — the active domain's `comandrulemap.md` (e.g.
|
|
105
|
-
[domainspecs/healthcare/comandrulemap.md](domainspecs/healthcare/comandrulemap.md)),
|
|
106
|
-
resolved at runtime from `.aw-spec/domain.json`.
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
# UI.Visualization — Foundation Packaging Rules
|
|
2
|
-
|
|
3
|
-
> **Why this exists.** This packaging model replaces reconstruction with a
|
|
4
|
-
> **byte-for-byte bundle of the real, verified Next.js template**.
|
|
5
|
-
>
|
|
6
|
-
> You author the UI foundation **once** (a Next.js app that actually builds and runs),
|
|
7
|
-
> pack it into a single text file, and the scaffolder **unpacks + renames** it.
|
|
8
|
-
> No regeneration, no drift — the same guarantee that `VerticalSlice` provides for the backend.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## The single artifact
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
docs/UI.Visualization/
|
|
16
|
-
├── UI.Visualization.pack.txt ← THE BUNDLE: every source file in one text file
|
|
17
|
-
├── PACKAGING.md ← this file
|
|
18
|
-
├── pack-foundation.ps1 ← produces the pack from the template folder (Windows)
|
|
19
|
-
├── pack-foundation.sh ← produces the pack from the template folder (macOS/Linux)
|
|
20
|
-
├── pack-reference-foundation.ps1 ← produces a reference/sample pack
|
|
21
|
-
├── pack-reference-foundation.sh
|
|
22
|
-
├── unpack-foundation.ps1 ← extracts + renames into a target app (used by skill)
|
|
23
|
-
├── unpack-foundation.sh
|
|
24
|
-
├── unpack-reference-foundation.ps1
|
|
25
|
-
└── unpack-reference-foundation.sh
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
The source template lives at:
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
templates/UI.Visualization/
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## The sentinel convention
|
|
37
|
-
|
|
38
|
-
The template is authored under the sentinel app name:
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
UI.Visualization
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
The scaffolder rewrites the sentinel in **four case forms** (ordinal, case-sensitive, longest-first),
|
|
45
|
-
applied to **file contents and to file/folder paths**:
|
|
46
|
-
|
|
47
|
-
| Form | Sentinel | Example target (`PharmaViz`) | Where it appears |
|
|
48
|
-
|--------------|--------------------------------|---------------------------------|-------------------------------------------|
|
|
49
|
-
| dotted | `UI.Visualization` | `PharmaViz` | `package.json` name (dotted form), README |
|
|
50
|
-
| underscored | `UI_Visualization` | `PharmaViz` | any underscored identifiers |
|
|
51
|
-
| lower-hyphen | `ui-visualization` | `pharmaviz` | npm package name, Docker image tag |
|
|
52
|
-
| lower-dot | `ui.visualization` | `pharmaviz` | any lowercased identifiers |
|
|
53
|
-
|
|
54
|
-
### What does NOT get renamed
|
|
55
|
-
|
|
56
|
-
- `AppWeaver.*` framework package references in `package.json` (there are none in this UI template — all deps are third-party).
|
|
57
|
-
- The generic sample pages (`/heatmap`, `/bubble`, etc.) — these are example content the caller replaces with their own pages.
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## How to author the template (do this once per change)
|
|
62
|
-
|
|
63
|
-
1. Work in `templates/UI.Visualization/`.
|
|
64
|
-
|
|
65
|
-
2. Use `UI.Visualization` as the sentinel wherever the app name belongs:
|
|
66
|
-
- `package.json` → `"name": "ui-visualization"` (lower-hyphen form)
|
|
67
|
-
- `README.md` → title
|
|
68
|
-
- `src/app/layout.tsx` → `<title>UI.Visualization</title>` and metadata
|
|
69
|
-
- Any other branding strings
|
|
70
|
-
|
|
71
|
-
3. Verify the template builds and runs clean:
|
|
72
|
-
```bash
|
|
73
|
-
cd templates/UI.Visualization
|
|
74
|
-
npm install
|
|
75
|
-
npm run build # must exit 0, no TypeScript errors
|
|
76
|
-
npm run dev # browse to http://localhost:3000, all 10 chart pages render
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
4. Fix every error here, in the real template, where the compiler tells you exactly what's wrong.
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## How to build the bundle
|
|
84
|
-
|
|
85
|
-
From `docs/UI.Visualization/`:
|
|
86
|
-
|
|
87
|
-
**macOS / Linux:**
|
|
88
|
-
```bash
|
|
89
|
-
./pack-foundation.sh \
|
|
90
|
-
--source-dir ../../../../templates/UI.Visualization \
|
|
91
|
-
--out-file ./UI.Visualization.pack.txt
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
**Windows (PowerShell):**
|
|
95
|
-
```powershell
|
|
96
|
-
./pack-foundation.ps1 `
|
|
97
|
-
-SourceDir ../../../../templates/UI.Visualization `
|
|
98
|
-
-OutFile ./UI.Visualization.pack.txt
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
The packer:
|
|
102
|
-
- Walks the template, **excluding** build/IDE and JS output artifacts:
|
|
103
|
-
- dirs: `node_modules .next .turbo dist out coverage .cache bin obj .vs .git logs`
|
|
104
|
-
- files: `*.tsbuildinfo next-env.d.ts *.log .env.* *.pem *.key secrets.json`
|
|
105
|
-
- **Fails closed on detected secrets** — scans file contents for credential markers and refuses to pack unless `--allow-secrets` / `-AllowSecrets` is passed.
|
|
106
|
-
- Stores text files **verbatim** and binary files (e.g. `.xlsx`) **base64-encoded**.
|
|
107
|
-
- Writes a header containing `foundation`, `sentinel`, file count, format version, and the replacement contract.
|
|
108
|
-
- **Warns** if the sentinel token appears in zero files.
|
|
109
|
-
|
|
110
|
-
Re-run it whenever the template changes; commit the regenerated `UI.Visualization.pack.txt`.
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## How to build the reference pack
|
|
115
|
-
|
|
116
|
-
The reference pack is used by `/aw-spec-addcomponent` and `/aw-spec-implement` unpack workflows
|
|
117
|
-
when a feature reference example exists under `templates/features/`.
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
./pack-reference-foundation.sh \
|
|
121
|
-
--source-dir ../../../../templates/features/UIVisualization.SimpleSample \
|
|
122
|
-
--out-file ./UI.Visualization.Reference.pack.txt
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
*(Create the `SimpleSample` folder when you have a working feature example to bundle.)*
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Pack file format (`aw-spec-pack/v1`)
|
|
130
|
-
|
|
131
|
-
Same format as `VerticalSlice.pack.txt`:
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
# AW-SPEC FOUNDATION PACK
|
|
135
|
-
# foundation: UI.Visualization
|
|
136
|
-
# sentinel: UI.Visualization
|
|
137
|
-
# generated: 2026-06-26T10:00:00.0000000Z
|
|
138
|
-
# files: 32
|
|
139
|
-
# format: aw-spec-pack/v1
|
|
140
|
-
# --- replacement contract ... ---
|
|
141
|
-
# ============================================================
|
|
142
|
-
|
|
143
|
-
<<<FILE path="package.json">>>
|
|
144
|
-
...verbatim file content...
|
|
145
|
-
<<<ENDFILE>>>
|
|
146
|
-
<<<FILE path="src/app/layout.tsx">>>
|
|
147
|
-
...
|
|
148
|
-
<<<ENDFILE>>>
|
|
149
|
-
<<<FILE path="public/sample-data.xlsx" encoding="base64">>>
|
|
150
|
-
AAABAAE...
|
|
151
|
-
<<<ENDFILE>>>
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## How scaffolding consumes the bundle
|
|
157
|
-
|
|
158
|
-
`/aw-spec-foundation UI.Visualization <AppName> [OutputDir]`
|
|
159
|
-
runs `unpack-foundation.sh` (or `.ps1`), which reads the sentinel from the pack header,
|
|
160
|
-
derives the four target case forms, and writes the renamed files to the output directory.
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
# macOS / Linux
|
|
164
|
-
./unpack-foundation.sh \
|
|
165
|
-
--pack-file ./UI.Visualization.pack.txt \
|
|
166
|
-
--target-app-name PharmaViz \
|
|
167
|
-
--out-dir ~/projects/
|
|
168
|
-
|
|
169
|
-
# Windows
|
|
170
|
-
./unpack-foundation.ps1 `
|
|
171
|
-
-PackFile ./UI.Visualization.pack.txt `
|
|
172
|
-
-TargetAppName PharmaViz `
|
|
173
|
-
-OutDir ~/projects/
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
After unpacking:
|
|
177
|
-
```bash
|
|
178
|
-
cd ~/projects/PharmaViz # or wherever OutDir puts it
|
|
179
|
-
npm install
|
|
180
|
-
npm run dev # → http://localhost:3000
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## Maintenance checklist
|
|
186
|
-
|
|
187
|
-
- [ ] Template builds clean (`npm run build`, no TypeScript errors).
|
|
188
|
-
- [ ] Sentinel `UI.Visualization` appears in `package.json`, `README.md`, `layout.tsx`.
|
|
189
|
-
- [ ] No `node_modules/`, `.next/`, or generated files committed into the pack.
|
|
190
|
-
- [ ] `pack-foundation.sh` reported a non-zero sentinel hit count.
|
|
191
|
-
- [ ] `UI.Visualization.pack.txt` regenerated and committed after any change.
|