Initial addition of ms-ai-architect plugin to the open-source marketplace. Private content excluded: orchestrator/ (Linear tooling), docs/utredning/ (client investigation), generated test reports and PDF export script. skill-gen tooling moved from orchestrator/ to scripts/skill-gen/. Security scan: WARNING (risk 20/100) — no secrets, no injection found. False positive fixed: added gitleaks:allow to Python variable reference in output-validation-grounding-verification.md line 109. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
39 lines
1.4 KiB
Bash
Executable file
39 lines
1.4 KiB
Bash
Executable file
#!/bin/bash
|
|
# test-cost-output.sh — Validate cost-estimation-agent output structure
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
source "$SCRIPT_DIR/lib/e2e-helpers.sh"
|
|
|
|
FIXTURE="$SCRIPT_DIR/fixtures/cost-estimation/fixture.md"
|
|
|
|
if [ ! -f "$FIXTURE" ]; then
|
|
echo "ERROR: Fixture not found: $FIXTURE"
|
|
echo "Run: bash tests/capture-fixture.sh to generate fixtures"
|
|
exit 1
|
|
fi
|
|
|
|
init_suite "Cost Estimation Agent"
|
|
|
|
# Structure checks
|
|
assert_has_section "$FIXTURE" "Kostnad" "Has cost section header"
|
|
assert_has_section "$FIXTURE" "TCO" "Has TCO section"
|
|
assert_has_section "$FIXTURE" "Konfidens" "Has confidence grading section"
|
|
assert_has_section "$FIXTURE" "Gevinst" "Has benefit realization section"
|
|
|
|
# Content quality
|
|
assert_min_lines "$FIXTURE" 30 "Minimum 30 lines"
|
|
assert_min_tables "$FIXTURE" 2 "Minimum 2 tables (TCO, confidence)"
|
|
assert_has_nok_amounts "$FIXTURE" 3 "At least 3 NOK amounts"
|
|
|
|
# Encoding
|
|
assert_encoding_ok "$FIXTURE" "UTF-8 encoding valid"
|
|
assert_no_ascii_approximation "$FIXTURE" "No ASCII approximation of Norwegian chars"
|
|
|
|
# Domain-specific
|
|
assert_matches_pattern "$FIXTURE" "(Alt|Alternativ)\s*[0-9]" "References numbered alternatives"
|
|
assert_matches_pattern "$FIXTURE" "(Etablering|etablering)" "Has establishment cost section"
|
|
assert_matches_pattern "$FIXTURE" "(drift|Drift)" "Has operational cost section"
|
|
assert_matches_pattern "$FIXTURE" "(MCP-verifisert|Verifisert|verifisert)" "Has verification markers"
|
|
|
|
print_summary
|