@jskit-ai/jskit-cli 0.2.81 → 0.2.82
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/package.json +6 -4
- package/src/server/appBlueprint.js +1 -1
- package/src/server/commandHandlers/helperMap.js +104 -0
- package/src/server/commandHandlers/session.js +110 -3
- package/src/server/commandHandlers/show.js +169 -34
- package/src/server/core/argParser.js +8 -0
- package/src/server/core/commandCatalog.js +58 -2
- package/src/server/core/createCommandHandlers.js +4 -1
- package/src/server/helperMap.js +463 -0
- package/src/server/helperMapPaths.js +7 -0
- package/src/server/sessionRuntime/appReadiness.js +55 -0
- package/src/server/sessionRuntime/constants.js +217 -78
- package/src/server/sessionRuntime/preconditions.js +382 -5
- package/src/server/sessionRuntime/promptRenderer.js +15 -2
- package/src/server/sessionRuntime/prompts/automated_checks.md +42 -0
- package/src/server/sessionRuntime/prompts/deep_ui_check.md +53 -0
- package/src/server/sessionRuntime/prompts/doctor_failure.md +11 -2
- package/src/server/sessionRuntime/prompts/execute_plan.md +32 -6
- package/src/server/sessionRuntime/prompts/final_comment.md +3 -1
- package/src/server/sessionRuntime/prompts/issue_details.md +52 -0
- package/src/server/sessionRuntime/prompts/new_issue.md +15 -2
- package/src/server/sessionRuntime/prompts/plan_issue.md +40 -9
- package/src/server/sessionRuntime/prompts/review_changes.md +46 -5
- package/src/server/sessionRuntime/prompts/update_blueprint.md +36 -0
- package/src/server/sessionRuntime/prompts/user_check.md +15 -1
- package/src/server/sessionRuntime/responses.js +776 -56
- package/src/server/sessionRuntime.js +1658 -123
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Gather exact issue details for JSKIT session {{session_id}}.
|
|
2
|
+
|
|
3
|
+
GitHub issue: {{issue_url}}
|
|
4
|
+
Issue number: {{issue_number}}
|
|
5
|
+
Issue title: {{issue_title}}
|
|
6
|
+
Issue body file: {{issue_file}}
|
|
7
|
+
Issue details file JSKIT will write after user approval (`issue_details.md`): {{issue_details_file}}
|
|
8
|
+
Worktree: {{worktree}}
|
|
9
|
+
|
|
10
|
+
This step exists before planning. Do not edit files, create session receipts, create or overwrite the issue details file, create commits, create branches, create issues, create pull requests, merge, or clean worktrees. JSKIT will save the approved details to the issue details file after the user reviews them.
|
|
11
|
+
|
|
12
|
+
No stones unturned:
|
|
13
|
+
|
|
14
|
+
- Read the issue and inspect the app enough to understand the implementation surface.
|
|
15
|
+
- Read `.jskit/APP_BLUEPRINT.md` and `.jskit/helper-map.md` when present.
|
|
16
|
+
- Read package.json, `.jskit/lock.json`, `config/public.js`, relevant `src/`, relevant `packages/`, and relevant package docs or `npx --no-install jskit show ... --details`.
|
|
17
|
+
- Ask follow-up questions until all important issue details are known.
|
|
18
|
+
- Ask for final confirmation before emitting final details.
|
|
19
|
+
|
|
20
|
+
When you are ready to discuss details with the user, output this marker exactly once:
|
|
21
|
+
|
|
22
|
+
[issue_details_conversation_ready]
|
|
23
|
+
ready
|
|
24
|
+
[/issue_details_conversation_ready]
|
|
25
|
+
|
|
26
|
+
Then ask the user for whatever is still needed. Do not output the final markers below until the user has confirmed the details.
|
|
27
|
+
|
|
28
|
+
For CRUD or persisted data, confirm entity/table name, fields, field types, nullability, defaults, uniqueness, indexes, relationships, ownership, allowed operations, list/view/form shape, validation, permissions, migration/generator lane, and exact CRUD generator command or exact reason no CRUD generator applies.
|
|
29
|
+
|
|
30
|
+
For UI, confirm route path, surface/placement target, navigation expectations, responsive layout, loading/empty/error/disabled/success states, Material/Vuetify expectations, Playwright verification path, and auth/bootstrap strategy if needed.
|
|
31
|
+
|
|
32
|
+
For server-only work, confirm endpoint/command/job shape, request/response shape, validation, auth/permission behavior, persistence ownership, error behavior, and verification path.
|
|
33
|
+
|
|
34
|
+
For package/generator work, confirm exact `npx --no-install jskit add` or `npx --no-install jskit generate` command, why it applies, expected generated files, and follow-up custom code areas.
|
|
35
|
+
|
|
36
|
+
When the details are confirmed, output only the final classification, details, and decision notes surrounded by these exact markers:
|
|
37
|
+
|
|
38
|
+
[issue_category]
|
|
39
|
+
<client | server | client_server | tooling | unknown>
|
|
40
|
+
[/issue_category]
|
|
41
|
+
|
|
42
|
+
[ui_impact]
|
|
43
|
+
<none | possible | definite | unknown>
|
|
44
|
+
[/ui_impact]
|
|
45
|
+
|
|
46
|
+
[issue_details]
|
|
47
|
+
<confirmed issue details in Markdown>
|
|
48
|
+
[/issue_details]
|
|
49
|
+
|
|
50
|
+
[agent_decisions]
|
|
51
|
+
<concise decision entries with reasons>
|
|
52
|
+
[/agent_decisions]
|
|
@@ -2,13 +2,26 @@ Create a GitHub issue from this user request:
|
|
|
2
2
|
|
|
3
3
|
{{user_input}}
|
|
4
4
|
|
|
5
|
-
First inspect the local app enough to understand the request in context.
|
|
5
|
+
First inspect the local app enough to understand the request in context. App setup has already passed before this prompt is rendered; treat this as a ready JSKIT app. This issue-drafting step is read-only.
|
|
6
|
+
|
|
7
|
+
Allowed inspection:
|
|
8
|
+
|
|
9
|
+
- Read files with commands such as `pwd`, `ls`, `find`, `rg`, `cat`, `sed`, and `git status`.
|
|
10
|
+
- Read package.json, `.jskit/lock.json`, config, routes, packages, source files, `.jskit/APP_BLUEPRINT.md`, and `.jskit/helper-map.md` when available.
|
|
11
|
+
- Use non-mutating JSKIT inspection commands when available and relevant: `npx --no-install jskit list`, `npx --no-install jskit show <package> --details`, and `npx --no-install jskit list-placements`.
|
|
12
|
+
- If the filesystem contradicts a ready JSKIT app, stop and report that app setup must be rerun. Do not draft a recovery issue inside this session.
|
|
13
|
+
|
|
14
|
+
Do not run workflow, repair, or mutation commands during issue drafting:
|
|
15
|
+
|
|
16
|
+
- Do not run `npx --no-install jskit session`, `npx --no-install jskit session step`, or any command that advances a JSKIT session.
|
|
17
|
+
- Do not run `gh`, `git add`, `git commit`, `git push`, `npm install`, generators, tests, verification, devlinks, or doctor commands.
|
|
18
|
+
- Do not try to fix missing PATH entries or missing command shims. If a tool is unavailable, continue with read-only file inspection.
|
|
19
|
+
- Do not edit files.
|
|
6
20
|
|
|
7
21
|
Draft an implementation-ready issue, not a broad product essay.
|
|
8
22
|
|
|
9
23
|
Preserve these JSKIT boundaries:
|
|
10
24
|
|
|
11
|
-
- If the app is empty or a partial JSKIT app, the issue should be about bootstrap or recovery before feature implementation.
|
|
12
25
|
- If platform choices are still provisional, make the issue resolve those choices before installing tenancy-sensitive packages.
|
|
13
26
|
- Do not ask the developer to redesign standard JSKIT package-owned workflows from scratch. Treat selected package workflows as defaults unless the request asks for overrides, restrictions, or custom additions.
|
|
14
27
|
- For persisted app-owned data, prefer generated/package ownership over direct hand-built persistence. A new ordinary table should usually become a server CRUD-owned entity before CRUD UI or route work.
|
|
@@ -1,18 +1,43 @@
|
|
|
1
1
|
Create an implementation plan for JSKIT session {{session_id}}.
|
|
2
2
|
|
|
3
|
+
Active cycle: {{active_cycle}}
|
|
4
|
+
Plan source: {{plan_source}}
|
|
5
|
+
|
|
3
6
|
GitHub issue: {{issue_url}}
|
|
4
7
|
Issue number: {{issue_number}}
|
|
5
8
|
Issue title: {{issue_title}}
|
|
6
9
|
Issue body file: {{issue_file}}
|
|
7
10
|
Issue title file: {{issue_title_file}}
|
|
8
|
-
|
|
11
|
+
Issue details file (`issue_details.md`): {{issue_details_file}}
|
|
12
|
+
Agent decisions file (`agent_decisions.md`): {{agent_decisions_file}}
|
|
13
|
+
App blueprint file (`.jskit/APP_BLUEPRINT.md`): {{app_blueprint_file}}
|
|
14
|
+
Plan file JSKIT will write after user approval: {{plan_file}}
|
|
9
15
|
Worktree: {{worktree}}
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
This planning step is read-only. Do not edit files, create session receipts, create or overwrite the plan file, create commits, create branches, create issues, create pull requests, merge, or clean worktrees. JSKIT will save the approved plan to the plan file after the user reviews it.
|
|
18
|
+
|
|
19
|
+
If Plan source is `issue`, create the plan from the issue and confirmed issue details.
|
|
20
|
+
|
|
21
|
+
If Plan source is `rework`, create a revised plan from the user's rework request for this cycle. Preserve the original issue constraints, but focus the plan on fixing the reported problem.
|
|
22
|
+
|
|
23
|
+
Rework request file: {{rework_request_file}}
|
|
24
|
+
|
|
25
|
+
Rework request:
|
|
26
|
+
|
|
27
|
+
{{rework_request}}
|
|
12
28
|
|
|
13
|
-
|
|
29
|
+
Read the issue, confirmed issue details, rework request when present, agent decisions, and local app before planning. Use the issue files, issue details file, package.json, .jskit metadata, config, packages, routes, generated references, package docs, any saved app blueprint, and `.jskit/helper-map.md` when available.
|
|
30
|
+
|
|
31
|
+
Confirmed issue details:
|
|
32
|
+
|
|
33
|
+
{{issue_details_text}}
|
|
34
|
+
|
|
35
|
+
Known decisions:
|
|
36
|
+
|
|
37
|
+
{{agent_decisions_text}}
|
|
38
|
+
|
|
39
|
+
Start by identifying the implementation lane:
|
|
14
40
|
|
|
15
|
-
- empty, non_jskit_repo, partial_jskit_app, or jskit_app
|
|
16
41
|
- package install
|
|
17
42
|
- generator scaffolding
|
|
18
43
|
- custom local code
|
|
@@ -21,16 +46,18 @@ Start by identifying the app state and the implementation lane:
|
|
|
21
46
|
Planning rules:
|
|
22
47
|
|
|
23
48
|
- Keep the plan scoped to the issue. Avoid "while I am here" work.
|
|
49
|
+
- Follow the confirmed issue details and preserve the issue category and UI impact in the plan. If details are insufficient, say exactly what is missing instead of inventing foundational details.
|
|
24
50
|
- Prefer vertical slices that produce visible or end-to-end progress.
|
|
25
51
|
- If the work is too broad to review confidently, split it into clear chunks.
|
|
26
|
-
- Make generator decisions concrete. Name the exact `jskit` commands to run when a generator or package install applies.
|
|
27
|
-
- For non-CRUD route page work, plan to check `jskit show ui-generator --details` and `jskit list-placements` before hand-writing pages or placement entries.
|
|
28
|
-
- For CRUD work, plan server ownership first. Name the `jskit generate crud-server-generator scaffold ...` command before any CRUD UI plan.
|
|
52
|
+
- Make generator decisions concrete. Name the exact `npx --no-install jskit` commands to run when a generator or package install applies.
|
|
53
|
+
- For non-CRUD route page work, plan to check `npx --no-install jskit show ui-generator --details` and `npx --no-install jskit list-placements` before hand-writing pages or placement entries.
|
|
54
|
+
- For CRUD work, plan server ownership first. Name the `npx --no-install jskit generate crud-server-generator scaffold ...` command before any CRUD UI plan.
|
|
29
55
|
- For CRUD-owned tables, plan around the real database table shape. Do not plan a separate hand-written migration for a table that `crud-server-generator` will own.
|
|
30
56
|
- Every persisted app-owned table should have generated/package CRUD ownership unless there is a narrow explicit exception.
|
|
31
57
|
- Do not hand-build CRUD routes, CRUD endpoints, or CRUD page trees before the server CRUD package and shared resource file exist.
|
|
32
58
|
- `feature-server-generator` is for non-CRUD workflows and orchestration, not ordinary persisted entity tables.
|
|
33
59
|
- Keep runtime, UI, and data concerns separated.
|
|
60
|
+
- Before planning new helpers, composables, service functions, maps, or package glue, check `.jskit/helper-map.md` when it exists and prefer existing entries.
|
|
34
61
|
- Keep direct knex exceptional and minimal. Prefer internal json-rest-api seams outside generated CRUD packages and explicit weird-custom feature lanes.
|
|
35
62
|
- For package-owned baseline workflows, plan to install and verify the baseline before inventing custom code around it.
|
|
36
63
|
- For user-facing UI, include Material/Vuetify quality expectations and a Playwright verification path.
|
|
@@ -41,10 +68,14 @@ If setup values are needed, ask plainly using exact env var or option names. For
|
|
|
41
68
|
|
|
42
69
|
If the issue is not clear enough to plan safely, ask the user concise follow-up questions first.
|
|
43
70
|
|
|
44
|
-
When the plan is ready, output only the final plan surrounded by these exact markers:
|
|
71
|
+
When the plan is ready, output only the final plan for this cycle and any new decisions surrounded by these exact markers:
|
|
45
72
|
|
|
46
73
|
[plan]
|
|
47
74
|
<implementation plan in Markdown>
|
|
48
75
|
[/plan]
|
|
49
76
|
|
|
50
|
-
|
|
77
|
+
[agent_decisions]
|
|
78
|
+
<new planning decisions with reasons, or "No new decisions.">
|
|
79
|
+
[/agent_decisions]
|
|
80
|
+
|
|
81
|
+
Keep the plan concrete and implementation-oriented. Include the issue category, UI impact, likely files or areas to touch, ordered steps, generator commands to consider, review expectations, and checks that should be run.
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
Review changes for session {{session_id}}.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Review pass: {{review_pass_number}}.
|
|
4
|
+
|
|
5
|
+
Changed files in the current session worktree:
|
|
4
6
|
|
|
5
7
|
{{changed_files}}
|
|
6
8
|
|
|
7
|
-
Review the
|
|
9
|
+
Review the current worktree changes, but do not silently fix everything you find unless Studio explicitly asks you to resolve selected findings.
|
|
10
|
+
|
|
11
|
+
First, inspect the worktree and produce a short, prioritized list of important findings. The answer should be conversational and useful for the user to read. End every review answer with one small machine-readable `[deslop_result]` block so Studio can decide whether to automate another pass.
|
|
12
|
+
|
|
13
|
+
Use priorities this way:
|
|
14
|
+
|
|
15
|
+
- `high`: correctness, broken flow, data loss, security, route/runtime breakage, or serious JSKIT ownership/generator mistake.
|
|
16
|
+
- `medium`: maintainability, meaningful duplication, missing required state, weak JSKIT reuse, important verification gap, or visible UI quality issue inside the requested scope.
|
|
17
|
+
- `low`: polish, optional cleanup, copy tuning, minor test expansion, or judgment-call improvements the user should decide on.
|
|
18
|
+
|
|
19
|
+
If Studio later sends a `[resolve_deslop_findings]` block, fix only the listed findings in the current worktree. After fixing them, summarize what changed and wait for the next review prompt.
|
|
20
|
+
|
|
21
|
+
If there are no important findings, say so explicitly and do not make cosmetic churn.
|
|
8
22
|
|
|
9
23
|
Use four passes:
|
|
10
24
|
|
|
11
25
|
1. Deslop review
|
|
12
26
|
- repeated functions or duplicated local helpers
|
|
13
27
|
- helpers reimplemented locally when a kernel/runtime seam already exists
|
|
28
|
+
- helpers reimplemented locally when `.jskit/helper-map.md` already lists a usable app-local helper or JSKIT export
|
|
14
29
|
- placeholder, fake-complete, or vague UI/copy/code structure
|
|
15
30
|
- dead code, unused props/imports, TODO-shaped gaps, or accidental abstractions
|
|
16
31
|
- missing loading, empty, error, permission, or ownership states
|
|
@@ -18,8 +33,9 @@ Use four passes:
|
|
|
18
33
|
- surface or entity ownership mistakes: public, user, workspace, workspace_user
|
|
19
34
|
2. JSKIT review
|
|
20
35
|
- existing helper/runtime seam available?
|
|
36
|
+
- was `.jskit/helper-map.md` checked before introducing helper-like code?
|
|
21
37
|
- should this have been a package install, generator step, or scaffold extension instead of hand code?
|
|
22
|
-
- if a generator existed, was the exact `jskit` command used or was the gap documented?
|
|
38
|
+
- if a generator existed, was the exact `npx --no-install jskit` command used or was the gap documented?
|
|
23
39
|
- for CRUD work, was `crud-server-generator scaffold` used before CRUD UI or CRUD route hand-coding?
|
|
24
40
|
- for CRUD-owned tables, did the change avoid a separate hand-written CRUD migration?
|
|
25
41
|
- does every live app-owned table have generated/package CRUD ownership or a narrow explicit exception?
|
|
@@ -34,10 +50,35 @@ Use four passes:
|
|
|
34
50
|
4. Verification review
|
|
35
51
|
- run the smallest relevant verification commands for the changed scope
|
|
36
52
|
- any changed user-facing UI should be exercised with Playwright when possible
|
|
37
|
-
- UI verification should normally be recorded through `jskit app verify-ui`
|
|
53
|
+
- UI verification should normally be recorded through `npx --no-install jskit app verify-ui`
|
|
38
54
|
- if login is required, use the chosen local test-auth path instead of live external auth
|
|
39
55
|
- if there is no usable local auth bootstrap path, record it as a blocking testability gap
|
|
40
56
|
|
|
41
57
|
Do not create commits, branches, pull requests, merges, or worktree cleanup yourself. JSKIT session owns those steps.
|
|
42
58
|
|
|
43
|
-
When finished, report findings
|
|
59
|
+
When finished, report the findings considered, fixes made during this pass if any, changed files, checks run, and anything still unverified. If there are no important findings, say so explicitly and list residual risk.
|
|
60
|
+
|
|
61
|
+
At the very end of each review answer, include this block. Keep it plain text, not JSON:
|
|
62
|
+
|
|
63
|
+
[deslop_result]
|
|
64
|
+
priority: high | medium | low
|
|
65
|
+
category: bug | maintainability | jskit | ui | verification | content | other
|
|
66
|
+
title: Short finding title
|
|
67
|
+
files:
|
|
68
|
+
- path/to/file
|
|
69
|
+
reason: Why this matters
|
|
70
|
+
recommended_action: What should be done
|
|
71
|
+
|
|
72
|
+
priority: low
|
|
73
|
+
category: other
|
|
74
|
+
title: Another optional finding
|
|
75
|
+
files:
|
|
76
|
+
- path/to/file
|
|
77
|
+
reason: Why this is optional
|
|
78
|
+
recommended_action: What the user may choose to do
|
|
79
|
+
[/deslop_result]
|
|
80
|
+
|
|
81
|
+
If there are no findings, return an empty result block:
|
|
82
|
+
|
|
83
|
+
[deslop_result]
|
|
84
|
+
[/deslop_result]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Update the durable JSKIT app blueprint for session {{session_id}}.
|
|
2
|
+
|
|
3
|
+
GitHub issue: {{issue_url}}
|
|
4
|
+
Issue number: {{issue_number}}
|
|
5
|
+
Issue title: {{issue_title}}
|
|
6
|
+
Issue body file: {{issue_file}}
|
|
7
|
+
Issue details file (`issue_details.md`): {{issue_details_file}}
|
|
8
|
+
Plan file: {{plan_file}}
|
|
9
|
+
Agent decisions file (`agent_decisions.md`): {{agent_decisions_file}}
|
|
10
|
+
Current blueprint file (`.jskit/APP_BLUEPRINT.md`): {{app_blueprint_file}}
|
|
11
|
+
Worktree: {{worktree}}
|
|
12
|
+
|
|
13
|
+
Use the accepted issue work to update only durable app/product/architecture memory. Read the current blueprint when present, issue title/body, issue details, approved plan, agent decisions, helper map, package/app metadata, and changed files.
|
|
14
|
+
|
|
15
|
+
Changed files since the session base:
|
|
16
|
+
|
|
17
|
+
{{changed_files}}
|
|
18
|
+
|
|
19
|
+
Rules:
|
|
20
|
+
|
|
21
|
+
- Do not use this as task tracking.
|
|
22
|
+
- Do not recreate `.jskit/WORKBOARD.md`.
|
|
23
|
+
- Do not over-expand tiny issues into broad product rewrites.
|
|
24
|
+
- Preserve useful existing blueprint content.
|
|
25
|
+
- If `.jskit/APP_BLUEPRINT.md` does not exist, create it.
|
|
26
|
+
- Edit `.jskit/APP_BLUEPRINT.md` directly in the worktree.
|
|
27
|
+
- Add durable facts, architecture decisions, surfaces, routes, data ownership, package choices, and verification-relevant app behavior that future sessions should know.
|
|
28
|
+
- Keep the result concise enough to remain useful over many issues.
|
|
29
|
+
- Do not edit files other than `.jskit/APP_BLUEPRINT.md`.
|
|
30
|
+
- Do not commit, branch, push, create PRs, merge, or clean up worktrees.
|
|
31
|
+
|
|
32
|
+
When finished, summarize the blueprint result normally, then end with this exact marker:
|
|
33
|
+
|
|
34
|
+
[jskit_step_result]
|
|
35
|
+
Blueprint updated.
|
|
36
|
+
[/jskit_step_result]
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
User check for session {{session_id}}.
|
|
2
2
|
|
|
3
|
+
Issue: {{issue_url}}
|
|
4
|
+
Issue title: {{issue_title}}
|
|
5
|
+
Issue body file: {{issue_file}}
|
|
6
|
+
Issue details file (`issue_details.md`): {{issue_details_file}}
|
|
7
|
+
Plan file: {{plan_file}}
|
|
8
|
+
|
|
3
9
|
The code should already be built or runnable according to the implementation instructions.
|
|
4
10
|
|
|
11
|
+
Confirmed issue details:
|
|
12
|
+
|
|
13
|
+
{{issue_details_text}}
|
|
14
|
+
|
|
15
|
+
Approved plan:
|
|
16
|
+
|
|
17
|
+
{{plan_text}}
|
|
18
|
+
|
|
5
19
|
Ask the user to test the changed behavior in the app and report whether it works as intended. Be specific about the user-visible behavior, route, command, or workflow to inspect.
|
|
6
20
|
|
|
7
21
|
If the user finds a problem, diagnose the root cause and fix it in this worktree. Keep the fix scoped. Reuse JSKIT helpers, generated seams, and package workflows where they apply.
|
|
8
22
|
|
|
9
23
|
If the behavior works, tell the user to run:
|
|
10
24
|
|
|
11
|
-
jskit session {{session_id}} step --user-check passed
|
|
25
|
+
npx --no-install jskit session {{session_id}} step --user-check passed
|
|
12
26
|
|
|
13
27
|
Do not commit, push, create a PR, merge, or clean up the worktree yourself. JSKIT session owns those steps.
|