@niwa-labs/pstack 0.0.0-stage → 0.0.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/LICENSE +21 -0
- package/README.md +260 -2
- package/package.json +28 -4
- package/scripts/upstream-map.ts +90 -0
- package/src/author.ts +57 -0
- package/src/binding.ts +32 -0
- package/src/catalog.ts +86 -0
- package/src/composition.ts +66 -0
- package/src/index.ts +50 -0
- package/src/mapping/analyze.ts +223 -0
- package/src/mapping/assemble.ts +96 -0
- package/src/mapping/diff.ts +139 -0
- package/src/mapping/format.ts +67 -0
- package/src/mapping/git.ts +69 -0
- package/src/mapping/index.ts +18 -0
- package/src/mapping/maintain.ts +36 -0
- package/src/mapping/schema.ts +50 -0
- package/src/mapping/sources.ts +108 -0
- package/src/mapping/tool.ts +77 -0
- package/src/mapping/verify.ts +130 -0
- package/src/plugin.ts +136 -0
- package/src/policy.ts +115 -0
- package/src/ports.ts +184 -0
- package/src/pr-binding.ts +88 -0
- package/src/records.ts +61 -0
- package/src/roles.ts +49 -0
- package/src/trunk.ts +59 -0
- package/src/upstream-actions.ts +135 -0
- package/src/upstream-records.ts +71 -0
- package/src/upstream.ts +151 -0
- package/src/workflows/adapted.md +780 -0
- package/src/workflows/authoring-a-skill.ts +52 -0
- package/src/workflows/autonomous-run.ts +56 -0
- package/src/workflows/autopilot-full.ts +90 -0
- package/src/workflows/autopilot-stack.ts +125 -0
- package/src/workflows/babysit.ts +124 -0
- package/src/workflows/benny-reproduce.ts +122 -0
- package/src/workflows/benny-triage.ts +89 -0
- package/src/workflows/bug-fix.ts +54 -0
- package/src/workflows/entry.ts +130 -0
- package/src/workflows/eval.ts +63 -0
- package/src/workflows/feature.ts +54 -0
- package/src/workflows/hillclimb.ts +78 -0
- package/src/workflows/investigation.ts +41 -0
- package/src/workflows/lib/catalog.ts +45 -0
- package/src/workflows/lib/change.ts +70 -0
- package/src/workflows/lib/forensics.ts +37 -0
- package/src/workflows/lib/git.ts +30 -0
- package/src/workflows/lib/go.ts +58 -0
- package/src/workflows/lib/inputs.ts +34 -0
- package/src/workflows/lib/lane.ts +170 -0
- package/src/workflows/lib/measure.ts +34 -0
- package/src/workflows/lib/plan.ts +24 -0
- package/src/workflows/lib/script.ts +79 -0
- package/src/workflows/lib/ship.ts +110 -0
- package/src/workflows/lib/texts.ts +18 -0
- package/src/workflows/lib/trunk.ts +91 -0
- package/src/workflows/multi-phase-plan.ts +83 -0
- package/src/workflows/opening-a-pr.ts +62 -0
- package/src/workflows/pause-safely.ts +50 -0
- package/src/workflows/perf-issue.ts +87 -0
- package/src/workflows/prototype.ts +76 -0
- package/src/workflows/refactoring.ts +54 -0
- package/src/workflows/runtime-forensics.ts +26 -0
- package/src/workflows/scenarios.ts +380 -0
- package/src/workflows/session-pickup.ts +57 -0
- package/src/workflows/shipping.ts +63 -0
- package/src/workflows/suite.ts +129 -0
- package/src/workflows/texts/authoring-a-skill.json +5 -0
- package/src/workflows/texts/autonomous-run.json +5 -0
- package/src/workflows/texts/autopilot-full.json +5 -0
- package/src/workflows/texts/autopilot-stack.json +5 -0
- package/src/workflows/texts/babysit.json +5 -0
- package/src/workflows/texts/benny-reproduce.json +5 -0
- package/src/workflows/texts/benny-triage.json +5 -0
- package/src/workflows/texts/bug-fix.json +5 -0
- package/src/workflows/texts/bugbot-triage.json +5 -0
- package/src/workflows/texts/eval.json +5 -0
- package/src/workflows/texts/feature.json +5 -0
- package/src/workflows/texts/hillclimb.json +5 -0
- package/src/workflows/texts/investigation.json +5 -0
- package/src/workflows/texts/multi-phase-plan.json +5 -0
- package/src/workflows/texts/opening-a-pr.json +5 -0
- package/src/workflows/texts/pause-safely.json +5 -0
- package/src/workflows/texts/perf-issue.json +5 -0
- package/src/workflows/texts/prototype.json +5 -0
- package/src/workflows/texts/refactoring.json +5 -0
- package/src/workflows/texts/runtime-forensics.json +5 -0
- package/src/workflows/texts/session-pickup.json +5 -0
- package/src/workflows/texts/trace-forensics.json +5 -0
- package/src/workflows/texts/visual-parity.json +5 -0
- package/src/workflows/texts/worker.json +5 -0
- package/src/workflows/trace-forensics.ts +27 -0
- package/src/workflows/upstream-sync.ts +182 -0
- package/src/workflows/visual-parity.ts +52 -0
- package/src/workflows/worktree-cleanup.ts +57 -0
- package/test/author.test.ts +61 -0
- package/test/benny.test.ts +138 -0
- package/test/binding.test.ts +54 -0
- package/test/catalog-helpers.test.ts +49 -0
- package/test/closure.test.ts +45 -0
- package/test/composition.test.ts +23 -0
- package/test/eval.test.ts +23 -0
- package/test/lanes.test.ts +334 -0
- package/test/mapping-diff.test.ts +64 -0
- package/test/mapping-support.ts +110 -0
- package/test/mapping-texts.test.ts +106 -0
- package/test/mapping.test.ts +276 -0
- package/test/package-layout.ts +68 -0
- package/test/policy.test.ts +98 -0
- package/test/ports.test.ts +45 -0
- package/test/ports.ts +173 -0
- package/test/roles.test.ts +21 -0
- package/test/suite.test.ts +167 -0
- package/test/support.ts +541 -0
- package/test/texts.test.ts +174 -0
- package/test/tool.test.ts +48 -0
- package/test/trunk-helpers.test.ts +149 -0
- package/test/trunk.test.ts +24 -0
- package/test/upstream-sync.test.ts +246 -0
- package/test/upstream.test.ts +106 -0
- package/test/worktree-cleanup.test.ts +107 -0
- package/tsconfig.json +7 -0
- package/upstream/LICENSE +21 -0
- package/upstream/SOURCE.json +5 -0
- package/upstream/benny/FOR_AGENTS.md +89 -0
- package/upstream/benny/README.md +23 -0
- package/upstream/benny/skills/reproduce-and-fix-issues/SKILL.md +310 -0
- package/upstream/benny/skills/reproduce-and-fix-issues/references/control-adapter.md +169 -0
- package/upstream/benny/skills/reproduce-and-fix-issues/references/feature-map.example.md +205 -0
- package/upstream/benny/skills/reproduce-and-fix-issues/references/verify-existing-fix.md +93 -0
- package/upstream/benny/skills/setup-benny/SKILL.md +265 -0
- package/upstream/benny/skills/triage-issue-reports/SKILL.md +240 -0
- package/upstream/benny/skills/triage-issue-reports/references/routing.example.md +61 -0
- package/upstream/benny/templates/configuration.example.yaml +84 -0
- package/upstream/benny/templates/reproduce-automation-prompt.md +33 -0
- package/upstream/benny/templates/triage-automation-prompt.md +39 -0
- package/upstream/mapping.json +699 -0
- package/upstream/poteto-mode/SKILL.md +110 -0
- package/upstream/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/upstream/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/upstream/poteto-mode/playbooks/autopilot-full.md +25 -0
- package/upstream/poteto-mode/playbooks/autopilot-stack.md +8 -0
- package/upstream/poteto-mode/playbooks/babysit.md +10 -0
- package/upstream/poteto-mode/playbooks/bug-fix.md +15 -0
- package/upstream/poteto-mode/playbooks/eval.md +25 -0
- package/upstream/poteto-mode/playbooks/feature.md +21 -0
- package/upstream/poteto-mode/playbooks/hillclimb.md +21 -0
- package/upstream/poteto-mode/playbooks/investigation.md +14 -0
- package/upstream/poteto-mode/playbooks/multi-phase-plan.md +11 -0
- package/upstream/poteto-mode/playbooks/opening-a-pr.md +9 -0
- package/upstream/poteto-mode/playbooks/pause-safely.md +10 -0
- package/upstream/poteto-mode/playbooks/perf-issue.md +25 -0
- package/upstream/poteto-mode/playbooks/prototype.md +14 -0
- package/upstream/poteto-mode/playbooks/refactoring.md +16 -0
- package/upstream/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/upstream/poteto-mode/playbooks/session-pickup.md +11 -0
- package/upstream/poteto-mode/playbooks/shipping.md +12 -0
- package/upstream/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/upstream/poteto-mode/playbooks/visual-parity.md +11 -0
- package/upstream/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/upstream/poteto-mode/references/bugbot-triage.md +142 -0
- package/upstream/poteto-mode/worker.md +11 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
|
|
3
|
+
automations:
|
|
4
|
+
triage_name: "benny-triage"
|
|
5
|
+
reproduce_name: "benny-reproduce"
|
|
6
|
+
|
|
7
|
+
slack:
|
|
8
|
+
source_channel_id: "SOURCE_CHANNEL_ID"
|
|
9
|
+
operations_channel_id: ""
|
|
10
|
+
triage_identity_user_id: "TRIAGE_IDENTITY_USER_ID"
|
|
11
|
+
read_action: "configured-slack-read-action"
|
|
12
|
+
thread_post_action: "configured-slack-thread-post-action"
|
|
13
|
+
file_download_action: "configured-slack-file-download-action"
|
|
14
|
+
operations_edit_action: "configured-slack-edit-action"
|
|
15
|
+
prefer_cursor_actions: true
|
|
16
|
+
optional_bot_token_env: "BENNY_SLACK_BOT_TOKEN"
|
|
17
|
+
allow_source_root_posts: false
|
|
18
|
+
allow_worker_slack_writes: false
|
|
19
|
+
|
|
20
|
+
repository:
|
|
21
|
+
url: "https://github.com/example-org/example-repo"
|
|
22
|
+
default_branch: "main"
|
|
23
|
+
pull_request_action: "configured-draft-pull-request-action"
|
|
24
|
+
pull_request_url_format: "https://github.com/{owner}/{repo}/pull/{number}"
|
|
25
|
+
draft_only: true
|
|
26
|
+
|
|
27
|
+
tracker:
|
|
28
|
+
type: "linear"
|
|
29
|
+
adapter_skill_name: "issue-tracker-adapter-placeholder"
|
|
30
|
+
team: "team-placeholder"
|
|
31
|
+
project: "project-placeholder"
|
|
32
|
+
labels:
|
|
33
|
+
bug: "bug-label-placeholder"
|
|
34
|
+
performance: "performance-label-placeholder"
|
|
35
|
+
intake: "intake-label-placeholder"
|
|
36
|
+
needs_repro: "needs-repro-label-placeholder"
|
|
37
|
+
status: "intake-status-placeholder"
|
|
38
|
+
source_link_title: "Slack report"
|
|
39
|
+
require_compensation_action: true
|
|
40
|
+
|
|
41
|
+
routing:
|
|
42
|
+
map_path: ".cursor/benny/routing.md"
|
|
43
|
+
owner_pings_default: false
|
|
44
|
+
allow_feature_owner_ping: false
|
|
45
|
+
allow_confirmed_regression_author_ping: false
|
|
46
|
+
|
|
47
|
+
control:
|
|
48
|
+
skill_name: "control-target-app"
|
|
49
|
+
feature_map_path: ".cursor/benny/feature-map.md"
|
|
50
|
+
environment: "safe-test-environment-placeholder"
|
|
51
|
+
artifact_directory: "/tmp/benny-artifacts"
|
|
52
|
+
artifact_retention_hours: 24
|
|
53
|
+
|
|
54
|
+
verdict_markers:
|
|
55
|
+
bug: "[benny:bug]"
|
|
56
|
+
performance: "[benny:performance]"
|
|
57
|
+
other: "[benny:other]"
|
|
58
|
+
tracker_attribute: "tracker"
|
|
59
|
+
|
|
60
|
+
status_emoji:
|
|
61
|
+
seen: "👀"
|
|
62
|
+
reproducing: "🔎"
|
|
63
|
+
reproduced: "✅"
|
|
64
|
+
could_not_reproduce: "⚪"
|
|
65
|
+
blocked: "⛔"
|
|
66
|
+
fixing: "🛠️"
|
|
67
|
+
fix_failed: "❌"
|
|
68
|
+
pull_request_opened: "🔗"
|
|
69
|
+
|
|
70
|
+
budgets:
|
|
71
|
+
poll_seconds: 45
|
|
72
|
+
verdict_wait_minutes: 45
|
|
73
|
+
triage_follow_up_minutes: 10
|
|
74
|
+
triage_total_minutes: 30
|
|
75
|
+
repro_minutes: 60
|
|
76
|
+
rejection_window_minutes: 10
|
|
77
|
+
fix_minutes: 90
|
|
78
|
+
operations_follow_up_minutes: 45
|
|
79
|
+
|
|
80
|
+
models:
|
|
81
|
+
triage: "choose-an-available-public-model-slug"
|
|
82
|
+
reproduce: "choose-an-available-public-model-slug"
|
|
83
|
+
code: "choose-an-available-public-model-slug"
|
|
84
|
+
media_review: "choose-an-available-public-model-slug"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Reproduce automation prompt
|
|
2
|
+
|
|
3
|
+
> Source material for the copied setup workflow. Paraphrase this intent into a built-in `automate` draft after `automate` confirms that the copied pack is committed in the repository where the automation will run.
|
|
4
|
+
|
|
5
|
+
Read and follow `.cursor/automations/benny/skills/reproduce-and-fix-issues/SKILL.md` for this run.
|
|
6
|
+
|
|
7
|
+
Configuration source. Include this repository-relative path only when it is committed in the same target repository. Otherwise paraphrase the configured values. Never use a plugin source or cache path:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
{{BENNY_CONFIG_PATH}}
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Trigger:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"source_channel_id": "{{SLACK_CHANNEL_ID}}",
|
|
18
|
+
"message_ts": "{{SLACK_MESSAGE_TS}}",
|
|
19
|
+
"thread_ts": "{{SLACK_THREAD_TS_OR_EMPTY}}"
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The creation intent should describe this as a new top-level report in the configured source Slack channel. It should include the configured repository, default branch, issue tracker, control adapter, feature map, and draft pull request capability.
|
|
24
|
+
|
|
25
|
+
Treat the source channel and root thread timestamp as immutable. If either is missing or does not match configuration, stop without posting.
|
|
26
|
+
|
|
27
|
+
Wait for a configured triage marker from the configured triage identity in this exact thread. Proceed only for `[benny:bug]` or `[benny:performance]`.
|
|
28
|
+
|
|
29
|
+
Require the configured control-adapter skill before attempting a repro. Reproduce the exact discriminating symptom twice through the real UI. Verify existing pull requests or commits without authoring over them. Attempt a bounded fix only after a confirmed repro and the operational file's fix gate.
|
|
30
|
+
|
|
31
|
+
The coordinator is the only Slack poster. Every child prompt must forbid `SendSlackMessage`, `PostToSlack`, `chat.postMessage`, and all other Slack writes. Children return findings only.
|
|
32
|
+
|
|
33
|
+
Never post a root message in the source channel.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Triage automation prompt
|
|
2
|
+
|
|
3
|
+
> Source material for the copied setup workflow. Paraphrase this intent into a built-in `automate` draft after `automate` confirms that the copied pack is committed in the repository where the automation will run.
|
|
4
|
+
|
|
5
|
+
Read and follow `.cursor/automations/benny/skills/triage-issue-reports/SKILL.md` for this run.
|
|
6
|
+
|
|
7
|
+
Configuration source. Include this repository-relative path only when it is committed in the same target repository. Otherwise paraphrase the configured values. Never use a plugin source or cache path:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
{{BENNY_CONFIG_PATH}}
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Trigger:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"source_channel_id": "{{SLACK_CHANNEL_ID}}",
|
|
18
|
+
"message_ts": "{{SLACK_MESSAGE_TS}}",
|
|
19
|
+
"thread_ts": "{{SLACK_THREAD_TS_OR_EMPTY}}"
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The creation intent should describe this as a new top-level report in the configured source Slack channel.
|
|
24
|
+
|
|
25
|
+
Treat the source channel and root thread timestamp as immutable. If either is missing or does not match configuration, stop without posting or writing to the issue tracker.
|
|
26
|
+
|
|
27
|
+
The committed operational file owns classification, attachment review, cause tracing, routing, dedupe, tracker writes, and the final verdict. Post no progress messages. Never post a root message in the source channel.
|
|
28
|
+
|
|
29
|
+
The coordinator is the only Slack poster. Any delegated worker must be read-only, return findings only, and receive an explicit ban on every Slack write action.
|
|
30
|
+
|
|
31
|
+
End the single verdict with exactly one configured marker:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
[benny:bug]
|
|
35
|
+
[benny:performance]
|
|
36
|
+
[benny:other]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
A bug or performance marker may add `tracker=<URL>`.
|