pi-evalset-lab 0.1.0 → 0.2.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/CHANGELOG.md +11 -0
- package/README.md +59 -1
- package/examples/evalset-compare-sample-embedded.html +142 -0
- package/examples/evalset-compare-sample.png +0 -0
- package/package.json +38 -6
- package/scripts/export-evalset-report-html.mjs +356 -0
- package/.copier-answers.yml +0 -5
- package/.githooks/pre-commit +0 -12
- package/.github/CODEOWNERS +0 -12
- package/.github/ISSUE_TEMPLATE/bug-report.yml +0 -63
- package/.github/ISSUE_TEMPLATE/config.yml +0 -5
- package/.github/ISSUE_TEMPLATE/docs.yml +0 -39
- package/.github/ISSUE_TEMPLATE/feature-request.yml +0 -41
- package/.github/VOUCHED.td +0 -8
- package/.github/dependabot.yml +0 -13
- package/.github/pull_request_template.md +0 -34
- package/.github/workflows/ci.yml +0 -37
- package/.github/workflows/publish.yml +0 -60
- package/.github/workflows/release-please.yml +0 -25
- package/.github/workflows/vouch-check-pr.yml +0 -29
- package/.github/workflows/vouch-manage.yml +0 -34
- package/.pi/extensions/startup-intake-router.ts +0 -151
- package/.pi/prompts/init-project-docs.md +0 -32
- package/.release-please-config.json +0 -11
- package/.release-please-manifest.json +0 -3
- package/AGENTS.md +0 -39
- package/CODE_OF_CONDUCT.md +0 -50
- package/CONTRIBUTING.md +0 -28
- package/NEXT_SESSION_PROMPT.md +0 -14
- package/SECURITY.md +0 -34
- package/SUPPORT.md +0 -37
- package/docs/dev/CONTRIBUTING.md +0 -37
- package/docs/dev/EXTENSION_SOP.md +0 -43
- package/docs/dev/next_steps.md +0 -17
- package/docs/dev/plans/001-initial-plan.md +0 -24
- package/docs/dev/status.md +0 -21
- package/docs/org/operating_model.md +0 -39
- package/docs/org/project-docs-intake.questions.json +0 -60
- package/docs/project/foundation.md +0 -28
- package/docs/project/incentives.md +0 -17
- package/docs/project/resources.md +0 -26
- package/docs/project/skills.md +0 -17
- package/docs/project/strategic_goals.md +0 -18
- package/docs/project/tactical_goals.md +0 -39
- package/docs/project/vision.md +0 -21
- package/external/.gitkeep +0 -0
- package/ontology/.gitkeep +0 -0
- package/policy/security-policy.json +0 -10
- package/prek.toml +0 -15
- package/scripts/docs-list.sh +0 -50
- package/scripts/init-project-docs.sh +0 -56
- package/scripts/install-hooks.sh +0 -13
- package/scripts/sync-to-live.sh +0 -91
- package/scripts/validate-structure.sh +0 -325
- package/src/.gitkeep +0 -0
- package/tests/.gitkeep +0 -0
package/docs/dev/status.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
summary: "Current project status snapshot."
|
|
3
|
-
read_when:
|
|
4
|
-
- "Checking project health or preparing handoff updates."
|
|
5
|
-
system4d:
|
|
6
|
-
container: "State report for current branch/project."
|
|
7
|
-
compass: "Keep stakeholders aligned on progress and blockers."
|
|
8
|
-
engine: "Update status after meaningful implementation slices."
|
|
9
|
-
fog: "Status can stale quickly without disciplined updates."
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Status
|
|
13
|
-
|
|
14
|
-
- Scaffold: complete
|
|
15
|
-
- Extension behavior: `/evalset` MVP implemented (`init`, `run`, `compare`)
|
|
16
|
-
- Example datasets: smoke + `fixed-task-set-v2.json` + `fixed-task-set-v3.json`
|
|
17
|
-
- Invocation docs: clarified non-interactive usage via `pi -p` / `pi -e ... -p`
|
|
18
|
-
- GitHub publish: `tryingET/pi-evalset-lab` created with release `v0.1.0`
|
|
19
|
-
- npm publish: pending (`npm` auth + registry set to `https://registry.npmjs.org/`)
|
|
20
|
-
- Validation hooks: installed
|
|
21
|
-
- Tests: pending
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
summary: "Compact organization operating model and terminology."
|
|
3
|
-
read_when:
|
|
4
|
-
- "Aligning organization-level purpose, mission, and strategy."
|
|
5
|
-
system4d:
|
|
6
|
-
container: "Organization-level concepts shared across projects."
|
|
7
|
-
compass: "Keep strategy and culture aligned with organization purpose."
|
|
8
|
-
engine: "Purpose -> mission -> vision -> strategic objectives."
|
|
9
|
-
fog: "Terminology drift can create cross-project confusion."
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Organization operating model
|
|
13
|
-
|
|
14
|
-
## Organization purpose
|
|
15
|
-
Enable teams to build and operate AI-assisted software workflows that are reliable, auditable, and easy to improve.
|
|
16
|
-
|
|
17
|
-
## Organization mission (current)
|
|
18
|
-
Provide practical tooling, standards, and documentation that make safe AI engineering the default path.
|
|
19
|
-
|
|
20
|
-
## Organization vision
|
|
21
|
-
A trusted ecosystem where AI coding workflows are reproducible, understandable, and continuously improving.
|
|
22
|
-
|
|
23
|
-
## Organization strategic objectives
|
|
24
|
-
1. Standardize evaluation workflows across active projects.
|
|
25
|
-
2. Improve run traceability and reproducibility metadata.
|
|
26
|
-
3. Keep onboarding friction low through concise, current documentation.
|
|
27
|
-
4. Maintain secure-by-default release and dependency hygiene.
|
|
28
|
-
5. Reduce ambiguity between interactive and non-interactive execution modes.
|
|
29
|
-
|
|
30
|
-
## Core values
|
|
31
|
-
- Clarity first
|
|
32
|
-
- Evidence over assumption
|
|
33
|
-
- Small, verifiable increments
|
|
34
|
-
- Safety for high-impact changes
|
|
35
|
-
- Respectful collaboration
|
|
36
|
-
|
|
37
|
-
## Boundary
|
|
38
|
-
Organization purpose is cross-project.
|
|
39
|
-
Project-specific purpose is defined in [Project foundation model](../project/foundation.md).
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Initialize organization and project documents",
|
|
3
|
-
"questions": [
|
|
4
|
-
{
|
|
5
|
-
"id": "org_purpose",
|
|
6
|
-
"type": "text",
|
|
7
|
-
"question": "What is the organization purpose?"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"id": "org_mission",
|
|
11
|
-
"type": "text",
|
|
12
|
-
"question": "What is the current organization mission?"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"id": "org_vision",
|
|
16
|
-
"type": "text",
|
|
17
|
-
"question": "What is the organization vision?"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"id": "org_strategic_objectives",
|
|
21
|
-
"type": "text",
|
|
22
|
-
"question": "List 3-5 organization strategic objectives."
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"id": "org_core_values",
|
|
26
|
-
"type": "text",
|
|
27
|
-
"question": "List the core values that should drive ethics and culture."
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"id": "project_purpose",
|
|
31
|
-
"type": "text",
|
|
32
|
-
"question": "What is this project purpose (distinct from organization purpose)?"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"id": "project_mission",
|
|
36
|
-
"type": "text",
|
|
37
|
-
"question": "What is the project mission for the next delivery cycle?"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"id": "project_vision",
|
|
41
|
-
"type": "text",
|
|
42
|
-
"question": "What is the project vision?"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"id": "project_strategic_objectives",
|
|
46
|
-
"type": "text",
|
|
47
|
-
"question": "List 3-5 project strategic objectives."
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"id": "project_constraints",
|
|
51
|
-
"type": "text",
|
|
52
|
-
"question": "List hard constraints (time, quality, security, scope)."
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"id": "project_success_criteria",
|
|
56
|
-
"type": "text",
|
|
57
|
-
"question": "How will success be measured?"
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
summary: "Compact project model with explicit project-purpose framing."
|
|
3
|
-
read_when:
|
|
4
|
-
- "Aligning project purpose, strategy, and delivery behavior."
|
|
5
|
-
system4d:
|
|
6
|
-
container: "Project-level concepts and boundaries for this repository."
|
|
7
|
-
compass: "Translate project purpose into executable outcomes."
|
|
8
|
-
engine: "Project purpose -> mission -> vision -> strategic objectives."
|
|
9
|
-
fog: "Project scope and priorities can drift without explicit review."
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Project foundation model
|
|
13
|
-
|
|
14
|
-
## Project purpose
|
|
15
|
-
Build and maintain `pi-evalset-lab` as a practical extension package for fixed-task-set evaluations in pi.
|
|
16
|
-
|
|
17
|
-
## Project mission (current cycle)
|
|
18
|
-
Stabilize `/evalset` workflows, clarify execution behavior (especially `pi -e` and non-interactive mode), and keep reports reproducible.
|
|
19
|
-
|
|
20
|
-
## Scope boundary
|
|
21
|
-
- Organization purpose lives in [Organization operating model](../org/operating_model.md).
|
|
22
|
-
- This project purpose is repository-specific and narrower.
|
|
23
|
-
|
|
24
|
-
## Project operating principles
|
|
25
|
-
- Keep changes small and reviewable.
|
|
26
|
-
- Prefer explicit run metadata over implicit assumptions.
|
|
27
|
-
- Document behavior when UX is surprising.
|
|
28
|
-
- Validate structure after meaningful changes.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
summary: "Why this project matters and what outcomes are rewarded."
|
|
3
|
-
read_when:
|
|
4
|
-
- "Prioritizing roadmap work or evaluating tradeoffs."
|
|
5
|
-
system4d:
|
|
6
|
-
container: "Motivators and value model."
|
|
7
|
-
compass: "Favor changes that improve reliability and operator confidence."
|
|
8
|
-
engine: "Map work to measurable maintenance and delivery wins."
|
|
9
|
-
fog: "Incentives can drift if outcomes are not tracked."
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Incentives
|
|
13
|
-
|
|
14
|
-
- Faster extension delivery.
|
|
15
|
-
- Lower regression risk.
|
|
16
|
-
- Clear docs for handoffs.
|
|
17
|
-
- Repeatable release and maintenance workflow.
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
summary: "Key resources for building and maintaining the extension."
|
|
3
|
-
read_when:
|
|
4
|
-
- "Looking up references, docs, or operational artifacts."
|
|
5
|
-
system4d:
|
|
6
|
-
container: "Reference catalog for the project."
|
|
7
|
-
compass: "Centralize discovery paths for maintainers."
|
|
8
|
-
engine: "Link docs, scripts, and examples used in execution."
|
|
9
|
-
fog: "External links may become stale over time."
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Resources
|
|
13
|
-
|
|
14
|
-
- [Extension entrypoint](../../extensions/evalset.ts)
|
|
15
|
-
- [Prompt templates](../../prompts)
|
|
16
|
-
- [Smoke dataset](../../examples/fixed-task-set.json)
|
|
17
|
-
- [Larger dataset v2](../../examples/fixed-task-set-v2.json)
|
|
18
|
-
- [Recommended dataset v3](../../examples/fixed-task-set-v3.json)
|
|
19
|
-
- [Baseline system prompt](../../examples/system-baseline.txt)
|
|
20
|
-
- [Candidate system prompt](../../examples/system-candidate.txt)
|
|
21
|
-
- Local report artifacts path: `.evalset/reports/*.json` (and optional `*.html` exports)
|
|
22
|
-
- [Project-local router extension](../../.pi/extensions/startup-intake-router.ts)
|
|
23
|
-
- [Organization operating model](../org/operating_model.md)
|
|
24
|
-
- [Interview questions](../org/project-docs-intake.questions.json)
|
|
25
|
-
- [Security policy](../../policy/security-policy.json)
|
|
26
|
-
- [Validation script](../../scripts/validate-structure.sh)
|
package/docs/project/skills.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
summary: "Skills needed to maintain and extend this package."
|
|
3
|
-
read_when:
|
|
4
|
-
- "Onboarding maintainers or planning implementation work."
|
|
5
|
-
system4d:
|
|
6
|
-
container: "Capability map for project contributors."
|
|
7
|
-
compass: "Build confidence in extension APIs, testing, and release hygiene."
|
|
8
|
-
engine: "Assess gaps and train through small delivery cycles."
|
|
9
|
-
fog: "Skill requirements change as scope expands."
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Skills
|
|
13
|
-
|
|
14
|
-
- TypeScript extension development
|
|
15
|
-
- Shell scripting and git hooks
|
|
16
|
-
- Prompt template design
|
|
17
|
-
- Security review and dependency hygiene
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
summary: "Long-horizon goals for extension package maturity."
|
|
3
|
-
read_when:
|
|
4
|
-
- "Roadmapping quarterly or milestone-level outcomes."
|
|
5
|
-
system4d:
|
|
6
|
-
container: "Strategic objective set."
|
|
7
|
-
compass: "Reliability, maintainability, and team adoption."
|
|
8
|
-
engine: "Sequence milestones with measurable checks."
|
|
9
|
-
fog: "Long-term assumptions may need periodic resets."
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Strategic goals
|
|
13
|
-
|
|
14
|
-
1. Reach stable, documented `/evalset` behavior across interactive and non-interactive usage.
|
|
15
|
-
2. Improve reproducibility signals (dataset hash, case hash, variant hash, run lineage) in all report paths.
|
|
16
|
-
3. Keep extension docs concise and discoverable for new maintainers.
|
|
17
|
-
4. Maintain secure, low-friction release and validation workflow.
|
|
18
|
-
5. Expand confidence with focused tests for command parsing and report generation.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
summary: "Near-term execution goals tied to current sprint cycles."
|
|
3
|
-
read_when:
|
|
4
|
-
- "Planning immediate tasks and delivery scope."
|
|
5
|
-
system4d:
|
|
6
|
-
container: "Tactical work queue framing."
|
|
7
|
-
compass: "Ship the next smallest valuable increment safely."
|
|
8
|
-
engine: "Break work into verifiable, low-risk tasks."
|
|
9
|
-
fog: "Unexpected integration constraints may reprioritize tasks."
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Tactical goals
|
|
13
|
-
|
|
14
|
-
## Current cycle status
|
|
15
|
-
|
|
16
|
-
### Completed
|
|
17
|
-
- Added troubleshooting notes for `/evalset` invocation (interactive vs `pi -p` non-interactive).
|
|
18
|
-
- Kept run/compare reports discoverable under `.evalset/reports/`.
|
|
19
|
-
- Added stronger example datasets (`fixed-task-set-v2.json`, `fixed-task-set-v3.json`).
|
|
20
|
-
- Synchronized docs and changelog with behavior updates.
|
|
21
|
-
|
|
22
|
-
### Remaining
|
|
23
|
-
1. Add smoke tests for argument parsing and report/scoring behavior.
|
|
24
|
-
2. Add a repeatable JSON -> HTML report export helper.
|
|
25
|
-
3. Complete npm publish after npmjs auth/registry setup.
|
|
26
|
-
|
|
27
|
-
## Hard constraints
|
|
28
|
-
- Time: keep work in small slices that can be reviewed quickly.
|
|
29
|
-
- Quality: no regressions in existing `/evalset` commands.
|
|
30
|
-
- Security: no insecure defaults in scripts or extension loading.
|
|
31
|
-
- Scope: prioritize reproducibility and UX clarity over feature breadth.
|
|
32
|
-
|
|
33
|
-
## Success criteria
|
|
34
|
-
- [x] `npm run check` passes.
|
|
35
|
-
- [x] Documented troubleshooting path for `pi -e` confusion exists.
|
|
36
|
-
- [x] Reports include stable run metadata and are easy to locate.
|
|
37
|
-
- [x] New maintainers can execute a compare workflow from README without intervention.
|
|
38
|
-
- [ ] Automated tests cover parser/scoring basics.
|
|
39
|
-
- [ ] Package is published on npm.
|
package/docs/project/vision.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
summary: "Product and technical vision for pi-evalset-lab."
|
|
3
|
-
read_when:
|
|
4
|
-
- "Defining or revisiting project direction."
|
|
5
|
-
system4d:
|
|
6
|
-
container: "Project north-star statement."
|
|
7
|
-
compass: "Build a reliable pi extension package with low maintenance overhead."
|
|
8
|
-
engine: "Translate goals into concrete implementation slices."
|
|
9
|
-
fog: "Real user workflows may reshape priorities."
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Vision
|
|
13
|
-
|
|
14
|
-
Make `pi-evalset-lab` the lightweight default for comparing prompt/system variants with reproducible, inspectable reports.
|
|
15
|
-
|
|
16
|
-
The project should feel predictable for maintainers:
|
|
17
|
-
- clear command behavior in both interactive and `-p` modes,
|
|
18
|
-
- clear report locations and run identity metadata,
|
|
19
|
-
- clear docs for troubleshooting common setup confusion.
|
|
20
|
-
|
|
21
|
-
Project vision is intentionally separate from organization vision in [Organization operating model](../org/operating_model.md).
|
package/external/.gitkeep
DELETED
|
File without changes
|
package/ontology/.gitkeep
DELETED
|
File without changes
|
package/prek.toml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
minimum_prek_version = "0.3.0"
|
|
2
|
-
|
|
3
|
-
[[repos]]
|
|
4
|
-
repo = "local"
|
|
5
|
-
hooks = [
|
|
6
|
-
{
|
|
7
|
-
id = "validate-structure",
|
|
8
|
-
name = "validate structure",
|
|
9
|
-
language = "system",
|
|
10
|
-
entry = "bash ./scripts/validate-structure.sh",
|
|
11
|
-
pass_filenames = false,
|
|
12
|
-
always_run = true,
|
|
13
|
-
stages = ["pre-commit"]
|
|
14
|
-
}
|
|
15
|
-
]
|
package/scripts/docs-list.sh
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
|
-
DEFAULT_SCRIPT="$HOME/ai-society/core/agent-scripts/scripts/docs-list.mjs"
|
|
6
|
-
LOCAL_FALLBACK_SCRIPT="$ROOT_DIR/scripts/docs-list.mjs"
|
|
7
|
-
|
|
8
|
-
usage() {
|
|
9
|
-
cat <<'USAGE'
|
|
10
|
-
Usage: ./scripts/docs-list.sh [docs-list args]
|
|
11
|
-
|
|
12
|
-
Resolves docs-list script in this order:
|
|
13
|
-
1) DOCS_LIST_SCRIPT env var (absolute/relative path)
|
|
14
|
-
2) Local fallback: ./scripts/docs-list.mjs
|
|
15
|
-
3) Default global path: ~/ai-society/core/agent-scripts/scripts/docs-list.mjs
|
|
16
|
-
|
|
17
|
-
Examples:
|
|
18
|
-
./scripts/docs-list.sh
|
|
19
|
-
./scripts/docs-list.sh --workspace --discover
|
|
20
|
-
./scripts/docs-list.sh --json
|
|
21
|
-
USAGE
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
|
|
25
|
-
usage
|
|
26
|
-
exit 0
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
if ! command -v node >/dev/null 2>&1; then
|
|
30
|
-
echo "Error: node is required to run docs-list." >&2
|
|
31
|
-
exit 1
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
SCRIPT_PATH=""
|
|
35
|
-
|
|
36
|
-
if [[ -n "${DOCS_LIST_SCRIPT:-}" ]]; then
|
|
37
|
-
SCRIPT_PATH="${DOCS_LIST_SCRIPT}"
|
|
38
|
-
elif [[ -f "$LOCAL_FALLBACK_SCRIPT" ]]; then
|
|
39
|
-
SCRIPT_PATH="$LOCAL_FALLBACK_SCRIPT"
|
|
40
|
-
else
|
|
41
|
-
SCRIPT_PATH="$DEFAULT_SCRIPT"
|
|
42
|
-
fi
|
|
43
|
-
|
|
44
|
-
if [[ ! -f "$SCRIPT_PATH" ]]; then
|
|
45
|
-
echo "Error: docs-list script not found: $SCRIPT_PATH" >&2
|
|
46
|
-
echo "Set DOCS_LIST_SCRIPT to your docs-list.mjs path, or install agent-scripts at: $DEFAULT_SCRIPT" >&2
|
|
47
|
-
exit 1
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
node "$SCRIPT_PATH" "$@"
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
|
-
QUESTIONS_FILE="$ROOT_DIR/docs/org/project-docs-intake.questions.json"
|
|
6
|
-
ROUTER_FILE="$ROOT_DIR/.pi/extensions/startup-intake-router.ts"
|
|
7
|
-
PROMPT_FILE="$ROOT_DIR/.pi/prompts/init-project-docs.md"
|
|
8
|
-
|
|
9
|
-
INSTALL_INTERVIEW=false
|
|
10
|
-
|
|
11
|
-
while [[ $# -gt 0 ]]; do
|
|
12
|
-
case "$1" in
|
|
13
|
-
--install-interview)
|
|
14
|
-
INSTALL_INTERVIEW=true
|
|
15
|
-
;;
|
|
16
|
-
-h|--help)
|
|
17
|
-
echo "Usage: ./scripts/init-project-docs.sh [--install-interview]"
|
|
18
|
-
exit 0
|
|
19
|
-
;;
|
|
20
|
-
*)
|
|
21
|
-
echo "Unknown arg: $1" >&2
|
|
22
|
-
echo "Usage: ./scripts/init-project-docs.sh [--install-interview]" >&2
|
|
23
|
-
exit 1
|
|
24
|
-
;;
|
|
25
|
-
esac
|
|
26
|
-
shift
|
|
27
|
-
done
|
|
28
|
-
|
|
29
|
-
for required in "$QUESTIONS_FILE" "$ROUTER_FILE" "$PROMPT_FILE"; do
|
|
30
|
-
if [[ ! -f "$required" ]]; then
|
|
31
|
-
echo "Missing required file: $required" >&2
|
|
32
|
-
exit 1
|
|
33
|
-
fi
|
|
34
|
-
done
|
|
35
|
-
|
|
36
|
-
if [[ "$INSTALL_INTERVIEW" == "true" ]]; then
|
|
37
|
-
if command -v pi-interview >/dev/null 2>&1; then
|
|
38
|
-
pi-interview
|
|
39
|
-
else
|
|
40
|
-
echo "pi-interview command not found. Install the interactive-interview extension first, then rerun with --install-interview." >&2
|
|
41
|
-
fi
|
|
42
|
-
fi
|
|
43
|
-
|
|
44
|
-
echo "Interview-first document setup"
|
|
45
|
-
echo ""
|
|
46
|
-
echo "0) Optional: run npm run docs:list to review docs + read_when hints."
|
|
47
|
-
echo "1) Ensure the interview extension is installed and loaded in pi."
|
|
48
|
-
echo "2) Open this repository in pi."
|
|
49
|
-
echo "3) Send a natural-language intent as the first non-command message in a session."
|
|
50
|
-
echo "4) Router will prefill: /init-project-docs \"<intent>\""
|
|
51
|
-
echo "5) Review/edit and run that command."
|
|
52
|
-
echo ""
|
|
53
|
-
echo "Fallback: run /init-project-docs manually."
|
|
54
|
-
echo "Questions source: $QUESTIONS_FILE"
|
|
55
|
-
echo ""
|
|
56
|
-
echo "After updates, run: bash ./scripts/validate-structure.sh"
|
package/scripts/install-hooks.sh
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
|
-
|
|
6
|
-
git -C "$ROOT_DIR" config core.hooksPath .githooks
|
|
7
|
-
echo "Configured git hooks path: .githooks"
|
|
8
|
-
|
|
9
|
-
if command -v prek >/dev/null 2>&1; then
|
|
10
|
-
echo "prek detected: pre-commit hook will run prek.toml"
|
|
11
|
-
else
|
|
12
|
-
echo "prek not found: pre-commit hook will fallback to scripts/validate-structure.sh"
|
|
13
|
-
fi
|
package/scripts/sync-to-live.sh
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
WITH_POLICY=false
|
|
5
|
-
WITH_PROMPTS=false
|
|
6
|
-
|
|
7
|
-
usage() {
|
|
8
|
-
cat <<'USAGE'
|
|
9
|
-
Usage: ./scripts/sync-to-live.sh [--with-policy] [--with-prompts] [--all]
|
|
10
|
-
|
|
11
|
-
Copies all package extension entrypoints from ./extensions into ~/.pi/agent/extensions/.
|
|
12
|
-
Optional flags also sync policy and prompt templates.
|
|
13
|
-
USAGE
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
while [[ $# -gt 0 ]]; do
|
|
17
|
-
case "$1" in
|
|
18
|
-
--with-policy)
|
|
19
|
-
WITH_POLICY=true
|
|
20
|
-
;;
|
|
21
|
-
--with-prompts)
|
|
22
|
-
WITH_PROMPTS=true
|
|
23
|
-
;;
|
|
24
|
-
--all)
|
|
25
|
-
WITH_POLICY=true
|
|
26
|
-
WITH_PROMPTS=true
|
|
27
|
-
;;
|
|
28
|
-
-h|--help)
|
|
29
|
-
usage
|
|
30
|
-
exit 0
|
|
31
|
-
;;
|
|
32
|
-
*)
|
|
33
|
-
echo "Unknown arg: $1" >&2
|
|
34
|
-
usage
|
|
35
|
-
exit 1
|
|
36
|
-
;;
|
|
37
|
-
esac
|
|
38
|
-
shift
|
|
39
|
-
done
|
|
40
|
-
|
|
41
|
-
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
42
|
-
SOURCE_DIR="$ROOT_DIR/extensions"
|
|
43
|
-
TARGET_DIR="$HOME/.pi/agent/extensions"
|
|
44
|
-
|
|
45
|
-
mkdir -p "$TARGET_DIR"
|
|
46
|
-
|
|
47
|
-
shopt -s nullglob
|
|
48
|
-
extension_files=("$SOURCE_DIR"/*.ts)
|
|
49
|
-
if (( ${#extension_files[@]} == 0 )); then
|
|
50
|
-
echo "No extension files found in: $SOURCE_DIR" >&2
|
|
51
|
-
exit 1
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
for source_file in "${extension_files[@]}"; do
|
|
55
|
-
target_file="$TARGET_DIR/$(basename "$source_file")"
|
|
56
|
-
cp "$source_file" "$target_file"
|
|
57
|
-
echo "Synced extension: $source_file -> $target_file"
|
|
58
|
-
done
|
|
59
|
-
shopt -u nullglob
|
|
60
|
-
|
|
61
|
-
if [[ "$WITH_PROMPTS" == "true" ]]; then
|
|
62
|
-
PROMPT_SOURCE_DIR="$ROOT_DIR/prompts"
|
|
63
|
-
PROMPT_TARGET_DIR="$HOME/.pi/agent/prompts"
|
|
64
|
-
mkdir -p "$PROMPT_TARGET_DIR"
|
|
65
|
-
|
|
66
|
-
shopt -s nullglob
|
|
67
|
-
prompt_files=("$PROMPT_SOURCE_DIR"/*.md)
|
|
68
|
-
if (( ${#prompt_files[@]} == 0 )); then
|
|
69
|
-
echo "No prompt templates found in: $PROMPT_SOURCE_DIR"
|
|
70
|
-
else
|
|
71
|
-
for prompt_file in "${prompt_files[@]}"; do
|
|
72
|
-
cp "$prompt_file" "$PROMPT_TARGET_DIR/"
|
|
73
|
-
echo "Synced prompt: $prompt_file -> $PROMPT_TARGET_DIR/$(basename "$prompt_file")"
|
|
74
|
-
done
|
|
75
|
-
fi
|
|
76
|
-
shopt -u nullglob
|
|
77
|
-
fi
|
|
78
|
-
|
|
79
|
-
if [[ "$WITH_POLICY" == "true" ]]; then
|
|
80
|
-
POLICY_SOURCE="$ROOT_DIR/policy/security-policy.json"
|
|
81
|
-
POLICY_TARGET="$HOME/.pi/agent/security-policy.json"
|
|
82
|
-
|
|
83
|
-
if [[ -f "$POLICY_SOURCE" ]]; then
|
|
84
|
-
cp "$POLICY_SOURCE" "$POLICY_TARGET"
|
|
85
|
-
echo "Synced policy: $POLICY_SOURCE -> $POLICY_TARGET"
|
|
86
|
-
else
|
|
87
|
-
echo "Policy file not found: $POLICY_SOURCE (skipped)"
|
|
88
|
-
fi
|
|
89
|
-
fi
|
|
90
|
-
|
|
91
|
-
echo "Done. In pi, run /reload to pick up changes."
|