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>
41 lines
1.1 KiB
Bash
Executable file
41 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
# capture-fixture.sh — Extract agent output fixture from a document
|
|
# Usage: bash tests/capture-fixture.sh <source-file> <section-header> <output-dir>
|
|
#
|
|
# Example:
|
|
# bash tests/capture-fixture.sh docs/utredning/.../utredning.md "S5: Sikkerhetsvurdering" tests/fixtures/security-assessment/
|
|
set -euo pipefail
|
|
|
|
if [ $# -lt 3 ]; then
|
|
echo "Usage: $0 <source-file> <section-header> <output-dir>"
|
|
echo ""
|
|
echo "Extracts a section from source file and saves as fixture.md"
|
|
echo ""
|
|
echo "Example:"
|
|
echo " $0 docs/utredning/file.md 'S5: Sikkerhetsvurdering' tests/fixtures/security-assessment/"
|
|
exit 1
|
|
fi
|
|
|
|
SOURCE="$1"
|
|
HEADER="$2"
|
|
OUTPUT_DIR="$3"
|
|
|
|
if [ ! -f "$SOURCE" ]; then
|
|
echo "Error: Source file not found: $SOURCE"
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$OUTPUT_DIR"
|
|
|
|
# Extract section from ## header to next ## header (or EOF)
|
|
awk -v header="$HEADER" '
|
|
BEGIN { found=0 }
|
|
/^## / {
|
|
if (found) exit
|
|
if (index($0, header)) found=1
|
|
}
|
|
found { print }
|
|
' "$SOURCE" > "$OUTPUT_DIR/fixture.md"
|
|
|
|
LINES=$(wc -l < "$OUTPUT_DIR/fixture.md" | tr -d ' ')
|
|
echo "Captured $LINES lines to $OUTPUT_DIR/fixture.md"
|