@jskit-ai/agent-docs 0.1.32 → 0.1.34

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.
@@ -30,6 +30,19 @@ npm install
30
30
 
31
31
  After that promotion, the overwritten app `AGENTS.md` stays deliberately small. Use `jskit session` for issue-driven work; session state and prompts live under `.jskit/sessions/` in the target app.
32
32
 
33
+ Issue sessions are executable workflow state, not prose instructions. The important durable files are:
34
+
35
+ - `issue.md` and `issue_title` for the approved GitHub issue.
36
+ - `plan_details.md` for the confirmed implementation details gathered before planning.
37
+ - `plan.md` for the approved implementation plan.
38
+ - `agent_decisions.md` for concise decisions and why they were made.
39
+ - `.jskit/APP_BLUEPRINT.md` for durable app/product/architecture memory that grows across issues.
40
+ - `review_passes/`, `checks/`, `ui_checks/`, and `command_log.jsonl` for review, verification, UI check, and command receipts.
41
+
42
+ The Deep UI Check steps use the saved issue classification: server-only work can be skipped with a receipt, possible UI work can be skipped only with an explicit reason, and definite UI work must run. If the User Check fails, JSKIT starts a new cycle under `cycles/cycle_###/` and cycle-scoped receipts under `steps/cycle_###/`; do not delete older cycle receipts.
43
+
44
+ Studio and other tools should read `jskit session <session_id> --json` rather than scraping those files directly. Manual agents should follow the current `jskit session <session_id> step` output and avoid recreating the old workboard workflow.
45
+
33
46
  After creating the real app scaffolding (the base shell, not the seed wrapper), you will need to run `npm install` to install dependencies.
34
47
 
35
48
  If you already know you want a small non-workspace baseline right after the scaffold, this is the shortest reproducible path:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/agent-docs",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "Distributed JSKIT agent references, prompts, guides, and generated reference maps.",
5
5
  "type": "module",
6
6
  "files": [
@@ -453,6 +453,14 @@ Local functions
453
453
  Exports
454
454
  - `createHealthCommands(ctx = {})`
455
455
 
456
+ ### `src/server/commandHandlers/helperMap.js`
457
+ Exports
458
+ - `createHelperMapCommands(ctx = {})`
459
+ Local functions
460
+ - `writeJson(stdout, payload)`
461
+ - `writeErrors(stdout, payload)`
462
+ - `writeHelperMapText(stdout, payload)`
463
+
456
464
  ### `src/server/commandHandlers/list.js`
457
465
  Exports
458
466
  - `createListCommands(ctx = {})`
@@ -673,6 +681,7 @@ Local functions
673
681
  - `resolveTextInput({ codePrefix, fileOption, inlineOptions = {}, io = {}, repairCommand, cwd, stdinOption, textOption, sessionId })`
674
682
  - `resolveStepInputs({ inlineOptions = {}, io = {}, cwd, sessionId })`
675
683
  - `normalizeStepOptions(inlineOptions = {})`
684
+ - `resolveListArchiveOption(options = {})`
676
685
 
677
686
  ### `src/server/commandHandlers/shared.js`
678
687
  Exports
@@ -764,6 +773,36 @@ Local functions
764
773
  - `printTopLevelHelp(stream = process.stderr)`
765
774
  - `printCommandHelp(stream = process.stderr, command = "")`
766
775
 
776
+ ### `src/server/helperMap.js`
777
+ Exports
778
+ - `HELPER_MAP_JSON_RELATIVE_PATH`
779
+ - `HELPER_MAP_MARKDOWN_RELATIVE_PATH`
780
+ - `buildHelperMap({ targetRoot })`
781
+ - `readHelperMap({ targetRoot })`
782
+ - `updateHelperMap({ targetRoot })`
783
+ Local functions
784
+ - `pathExists(filePath)`
785
+ - `readJsonFile(filePath)`
786
+ - `normalizePackageDependencies(packageJson = {})`
787
+ - `classifySymbol(name = "")`
788
+ - `createExportAnalysisProject()`
789
+ - `kindFromDeclaration(declaration, exportName = "")`
790
+ - `addSymbol(symbols, symbol)`
791
+ - `extractExportedSymbols(sourceFile)`
792
+ - `extractVueScriptSource(source = "", filePath = "")`
793
+ - `addCodeFileToProject(project, file)`
794
+ - `walkCodeFiles(rootPath, relativeRoot = "")`
795
+ - `collectAppExports(targetRoot)`
796
+ - `flattenPackageExports(exportsField)`
797
+ - `collectJskitPackageExports(targetRoot, packageJson = {})`
798
+ - `renderExportList(symbols = [])`
799
+ - `renderHelperMapMarkdown(map)`
800
+
801
+ ### `src/server/helperMapPaths.js`
802
+ Exports
803
+ - `HELPER_MAP_JSON_RELATIVE_PATH`
804
+ - `HELPER_MAP_MARKDOWN_RELATIVE_PATH`
805
+
767
806
  ### `src/server/index.js`
768
807
  Exports
769
808
  - `runCli`
@@ -775,17 +814,23 @@ Exports
775
814
  - `STEP_IDS`
776
815
  - `STEP_PRECONDITION_NAMES`
777
816
  - `abandonSession({ targetRoot = process.cwd(), sessionId } = {})`
817
+ - `adoptDependenciesInstalled({ targetRoot = process.cwd(), sessionId, message = "" } = {})`
778
818
  - `adoptCodexThreadId({ targetRoot = process.cwd(), sessionId, codexThreadId } = {})`
779
819
  - `buildSessionResponse`
780
820
  - `buildSessionErrorResponse`
781
821
  - `createSession({ targetRoot = process.cwd(), sessionId = "", now = new Date() } = {})`
782
822
  - `createSessionId`
823
+ - `extractIssueTitle(value = "")`
783
824
  - `extractIssueText(value = "")`
825
+ - `extractPlanDetails(value = "")`
826
+ - `extractPlanText(value = "")`
784
827
  - `inspectSession({ targetRoot = process.cwd(), sessionId } = {})`
828
+ - `inspectSessionDiff({ targetRoot = process.cwd(), sessionId } = {})`
785
829
  - `inspectSessionDetails({ targetRoot = process.cwd(), sessionId } = {})`
786
830
  - `isValidSessionId`
787
- - `listSessions({ targetRoot = process.cwd() } = {})`
831
+ - `listSessions({ targetRoot = process.cwd(), archive = "active" } = {})`
788
832
  - `renderTemplate`
833
+ - `recordDependenciesInstalled(paths, { message = "Installed Node dependencies in the session worktree.", preconditions = [] } = {})`
789
834
  - `resolveSessionPaths`
790
835
  - `runSessionStep({ targetRoot = process.cwd(), sessionId, options = {} } = {})`
791
836
  Local functions
@@ -793,44 +838,133 @@ Local functions
793
838
  - `invalidSessionIdResponse({ targetRoot, sessionId })`
794
839
  - `existingSessionContext({ targetRoot = process.cwd(), sessionId } = {})`
795
840
  - `withExistingSession(input, handler)`
841
+ - `extractMarkedText(value = "", marker = "")`
842
+ - `extractIssueCategory(value = "")`
843
+ - `extractUiImpact(value = "")`
844
+ - `extractAgentDecisions(value = "")`
845
+ - `normalizeIssueCategory(value = "")`
846
+ - `normalizeUiImpact(value = "")`
847
+ - `writePromptArtifact(paths, fileName, prompt)`
848
+ - `commandText(command, args = [])`
849
+ - `commandOutputSummary(output = "")`
850
+ - `appendCommandLog(paths, { args = [], command, cwd = "", kind = "command", result } = {})`
851
+ - `runLoggedCommand(paths, kind, command, args = [], options = {})`
852
+ - `readIssueMetadata(paths)`
853
+ - `writeIssueMetadata(paths, metadata = {})`
854
+ - `readGithubComments(paths)`
855
+ - `writeGithubComments(paths, comments = {})`
856
+ - `commentOnIssueOnce(paths, { bodyFile, issueUrl, purpose })`
857
+ - `appendAgentDecisions(paths, decisions = "")`
858
+ - `appendAgentDecisionsInput(paths, options = {})`
859
+ - `recordIssueInAgentDecisions(paths, issueUrl = "")`
860
+ - `issueMetadataFromUrl(issueUrl = "")`
861
+ - `nextCycleNumber(cycle = "001")`
862
+ - `normalizeArchiveFilter(archive = "active")`
796
863
  - `emptySessionDetails(response)`
864
+ - `removeEmptyStaleWorktreeDirectory(paths)`
797
865
  - `createWorktree(paths, _options = {}, context = {})`
866
+ - `parsePackageManager(value = "")`
867
+ - `hasWorktreeFile(worktree, fileName)`
868
+ - `dependencyInstallCommandForWorktree(worktree)`
869
+ - `installDependencies(paths, _options = {}, context = {})`
798
870
  - `renderIssuePrompt(paths, options = {})`
799
871
  - `draftIssue(paths, options = {})`
800
872
  - `titleFromIssue(issueText)`
801
873
  - `createIssue(paths, _options = {}, context = {})`
802
- - `renderImplementationPrompt(paths)`
874
+ - `renderPlanDetailsPrompt(paths, _options = {}, context = {})`
875
+ - `savePlanDetails(paths, options = {}, context = {})`
876
+ - `makePlan(paths, options = {}, context = {})`
877
+ - `renderPlanExecutionPrompt(paths, _options = {}, context = {})`
878
+ - `renderPlanFineTuningPrompt(paths, _options = {}, context = {})`
803
879
  - `worktreeStatus(worktree)`
804
- - `detectChanges(paths)`
880
+ - `untrackedFiles(worktree)`
881
+ - `untrackedFileDiff(worktree, filePath)`
882
+ - `untrackedFilesDiff(worktree)`
883
+ - `acceptImplementationChanges(paths)`
805
884
  - `commitWorktree(paths, { message, allowNoChanges = false } = {})`
806
885
  - `commitImplementation(paths)`
807
886
  - `changedFilesFromLastCommit(paths)`
808
- - `reviewPromptStepId(passNumber)`
809
- - `renderReviewPrompt(paths, passNumber)`
810
- - `reviewChangesStepId(passNumber)`
811
- - `detectAndCommitReviewChanges(paths, passNumber)`
812
- - `userCheckStepId(passNumber)`
813
- - `userCheck(paths, passNumber, options = {})`
887
+ - `changedFilesSinceBase(paths)`
888
+ - `nextReviewPassNumber(pass = "")`
889
+ - `readCurrentReviewPass(paths)`
890
+ - `writeCurrentReviewPass(paths, pass)`
891
+ - `resolveReviewPassForPrompt(paths)`
892
+ - `writeReviewPassJson(paths, pass, fileName, payload)`
893
+ - `currentHead(paths)`
894
+ - `renderReviewPrompt(paths)`
895
+ - `acceptReviewChanges(paths, options = {})`
896
+ - `commitReviewChanges(paths)`
897
+ - `runAutomatedChecks(paths, { stepId, label })`
898
+ - `readCheckResult(paths, stepId)`
899
+ - `maybeCommitCheckRepair(paths, { label, stepId })`
900
+ - `uiCheckAcceptStepId(stepId)`
901
+ - `uiCheckCommitStepId(stepId)`
902
+ - `uiCheckSourceStepId(stepId)`
903
+ - `uiCheckLabelForStep(stepId)`
904
+ - `writeUiCheckJson(paths, fileName, payload)`
905
+ - `runDeepUiCheck(paths, { stepId, label, phase }, options = {}, context = {})`
906
+ - `acceptUiCheckChanges(paths, { stepId }, _options = {}, context = {})`
907
+ - `commitUiCheckChanges(paths, { stepId }, _options = {}, context = {})`
908
+ - `userCheck(paths, options = {})`
909
+ - `updateBlueprint(paths, options = {}, context = {})`
814
910
  - `readPackageJson(root)`
815
911
  - `doctorCommandForWorktree(worktree)`
816
912
  - `runDoctor(paths)`
817
- - `pushBranch(paths)`
913
+ - `maybeCommitDoctorRepair(paths)`
914
+ - `commitLinesSinceBase(paths)`
915
+ - `readCheckSummaries(paths)`
916
+ - `readUiCheckSummaries(paths)`
917
+ - `readReviewPassSummaries(paths)`
918
+ - `createFinalReport(paths, _options = {}, context = {})`
818
919
  - `issueNumberFromUrl(issueUrl)`
920
+ - `parseJsonObject(value)`
921
+ - `readPrState(paths, prUrl)`
922
+ - `readCurrentBranchPrState(paths)`
923
+ - `prStateIsMerged(prState)`
924
+ - `prStateIsClosed(prState)`
925
+ - `currentTargetBranch(targetRoot)`
926
+ - `assertTargetRootCleanForBaseUpdate(paths)`
927
+ - `removeSessionWorktree(paths)`
928
+ - `writePrOutcome(paths, outcome)`
929
+ - `assertTargetRootCanUpdateBase(paths, branch)`
930
+ - `assertTargetBaseCanFastForward(paths, branch)`
931
+ - `updateLocalBaseBranch(paths, baseBranch = "")`
932
+ - `updateHelperMapBeforePr(paths)`
819
933
  - `createPr(paths)`
820
- - `mergePr(paths)`
821
- - `removeWorktree(paths)`
934
+ - `closePrWithoutMerge(paths, prUrl, options = {})`
935
+ - `finalizePr(paths, options = {})`
822
936
  - `finishSession(paths)`
823
937
  - `runNamedPreconditions(paths, names = [])`
824
938
 
939
+ ### `src/server/sessionRuntime/appReadiness.js`
940
+ Exports
941
+ - `inspectReadyJskitAppRoot(rootPath)`
942
+ Local functions
943
+ - `pathExists(filePath)`
944
+ - `directoryExists(filePath)`
945
+
825
946
  ### `src/server/sessionRuntime/constants.js`
826
947
  Exports
827
948
  - `PROMPT_DIRECTORY`
828
949
  - `SESSION_ID_PATTERN`
829
950
  - `SESSION_STATUS`
951
+ - `SESSION_WORKFLOW_VERSION`
952
+ - `REVIEW_PASS_LIMIT`
953
+ - `CYCLE_STEP_IDS`
954
+ - `STEP_DEFINITION_BY_ID`
830
955
  - `STEP_DEFINITIONS`
831
956
  - `STEP_IDS`
832
957
  - `STEP_LABEL_BY_ID`
958
+ - `STEP_PRECONDITION_NAMES`
959
+ - `PLAN_EXECUTION_CODEX_HANDOFF`
960
+ - `PLAN_FINE_TUNING_CODEX_HANDOFF`
961
+ - `REVIEW_EXECUTION_CODEX_HANDOFF`
962
+ - `DEEP_UI_CHECK_CODEX_HANDOFF`
963
+ - `BLUEPRINT_CODEX_HANDOFF`
833
964
  - `SESSION_STATE_RELATIVE_PATH`
965
+ Local functions
966
+ - `codexHandoff(expectedOutput, { autoInject = false, promptActionLabel = "" } = {})`
967
+ - `defineStep({ buttonLabel, codex = undefined, description, id, input = INPUT_NONE, kind = "automatic", label, nextCommandTemplate = "jskit session {{session_id}} step", preconditions = [], utilityActions = [], displayGroupId = "", displayGroupLabel = "" })`
834
968
 
835
969
  ### `src/server/sessionRuntime/io.js`
836
970
  Exports
@@ -860,20 +994,35 @@ Local functions
860
994
  ### `src/server/sessionRuntime/preconditions.js`
861
995
  Exports
862
996
  - `applyPreconditions(paths, checks = [])`
997
+ - `assertActiveCycleExists(paths)`
998
+ - `assertActiveCycleUserCheckPassed(paths)`
999
+ - `assertBlueprintUpdateSatisfied(paths)`
1000
+ - `assertDeepUiCheckSatisfied(paths)`
1001
+ - `assertDeepUiRecheckSatisfied(paths)`
1002
+ - `assertDependenciesInstalled(paths)`
1003
+ - `assertFinalReportExists(paths)`
863
1004
  - `assertGhAuth(targetRoot)`
864
1005
  - `assertGitCurrentBranch(targetRoot)`
865
1006
  - `assertGitRepository(targetRoot)`
866
1007
  - `assertGithubOrigin(targetRoot)`
867
- - `assertIssueArtifacts(paths)`
1008
+ - `assertIssueMetadataExists(paths)`
868
1009
  - `assertIssueTextExists(paths)`
1010
+ - `assertIssueUrlExists(paths)`
1011
+ - `assertPostReviewChecksPassed(paths)`
1012
+ - `assertPreReviewChecksPassed(paths)`
1013
+ - `assertPlanDetailsExists(paths)`
1014
+ - `assertPlanTextExists(paths)`
869
1015
  - `assertPrUrlExists(paths)`
1016
+ - `assertReadyJskitApp(paths)`
870
1017
  - `assertSessionExists(paths)`
871
1018
  - `assertTargetRootWritable(targetRoot)`
872
1019
  - `assertWorktreeExists(paths)`
873
1020
  - `ensureStudioGitExclude(targetRoot)`
874
- - `hasWorktree(paths)`
1021
+ - `hasWorktree`
875
1022
  Local functions
876
1023
  - `resolveGitCommonDirectory(targetRoot)`
1024
+ - `pathExists(filePath)`
1025
+ - `assertActiveCycleStepReceipt(paths, { code, id, message, stepId })`
877
1026
 
878
1027
  ### `src/server/sessionRuntime/promptRenderer.js`
879
1028
  Exports
@@ -884,20 +1033,61 @@ Exports
884
1033
  ### `src/server/sessionRuntime/responses.js`
885
1034
  Exports
886
1035
  - `buildSessionErrorResponse({ targetRoot = process.cwd(), sessionId = "", code, message, repairCommand = "", status = SESSION_STATUS.BLOCKED, preconditions = [], errors = undefined } = {})`
887
- - `buildSessionResponse(paths, { ok = true, errors = [], preconditions = [], prompt = undefined, status = undefined } = {})`
1036
+ - `buildSessionResponse(paths, { codex = undefined, ok = true, errors = [], preconditions = [], prompt = undefined, status = undefined } = {})`
1037
+ - `buildStepDefinitions()`
888
1038
  - `createError({ code, message, repairCommand = "" })`
889
1039
  - `createPrecondition({ id, ok, message })`
890
1040
  - `failSession(paths, { code, message, repairCommand = "", preconditions = [], status = SESSION_STATUS.BLOCKED, prompt = "" })`
891
1041
  - `markCurrentStep(paths, stepId)`
892
1042
  - `markStatus(paths, status)`
1043
+ - `normalizeReviewPassNumber(value = "")`
1044
+ - `readActiveCycle(paths)`
893
1045
  - `readReceiptSteps(paths)`
1046
+ - `readReviewPasses(paths)`
894
1047
  - `readSessionArtifacts(paths)`
1048
+ - `reviewPassDirectoryName(pass = DEFAULT_REVIEW_PASS)`
1049
+ - `reviewPassRoot(paths, pass)`
1050
+ - `writeActiveCycle(paths, cycle)`
1051
+ - `writeCycleReceipt(paths, receiptName, message, { cycle = "" } = {})`
895
1052
  - `writeReceipt(paths, stepId, message)`
896
1053
  Local functions
897
- - `readCompletedSteps(sessionRoot)`
1054
+ - `normalizeStepId(stepId)`
1055
+ - `stepIndex(stepId)`
1056
+ - `normalizeKnownStepIds(stepIds = [])`
1057
+ - `stepCanExposeStoredPrompt(stepId)`
1058
+ - `normalizeCycleNumber(value = "")`
1059
+ - `cycleDirectoryName(cycle = DEFAULT_ACTIVE_CYCLE)`
1060
+ - `isCycleStepId(stepId = "")`
1061
+ - `readWorkflowVersion(paths)`
1062
+ - `cycleStepsRoot(paths, cycle)`
1063
+ - `cycleRoot(paths, cycle)`
1064
+ - `parseJsonFileIfExists(filePath)`
1065
+ - `readReviewPassNumbers(paths)`
1066
+ - `readReviewPassInfo(paths, pass)`
1067
+ - `readPromptForStep(paths, stepId)`
1068
+ - `readStepFileNames(stepsRoot)`
1069
+ - `readCompletedSteps(paths)`
1070
+ - `applyReviewPassCompletionOverlay(paths, completedSteps = [])`
1071
+ - `readCycleInfo(paths, cycle)`
1072
+ - `readCycles(paths, activeCycle)`
1073
+ - `readStructuredChecks(paths)`
1074
+ - `readStructuredUiChecks(paths)`
1075
+ - `readWorktreeStatus(paths, worktreeReady)`
898
1076
  - `resolveNextStep(completedSteps = [])`
1077
+ - `cloneContractValue(value)`
1078
+ - `publicStepDefinition(step, index)`
1079
+ - `stepIsRetryableWhenBlocked(stepId)`
1080
+ - `stepIsConditional(stepId)`
1081
+ - `skipReasonForStep(stepId, artifacts = {})`
1082
+ - `buildCurrentStepAction(stepId, artifacts = {})`
1083
+ - `buildCodexHandoff(stepId)`
899
1084
  - `buildNextCommand(sessionId, stepId)`
900
1085
 
1086
+ ### `src/server/sessionRuntime/worktrees.js`
1087
+ Exports
1088
+ - `hasWorktree(paths = {})`
1089
+ - `parseGitWorktreeList(output = "")`
1090
+
901
1091
  ### `src/server/shared/cliError.js`
902
1092
  Exports
903
1093
  - `createCliError(message, { showUsage = false, exitCode = 1, renderUsage = null } = {})`
@@ -1,17 +1,13 @@
1
1
  # App Agent Instructions
2
2
 
3
- JSKIT issue work is driven by the executable session workflow.
3
+ Use JSKIT sessions for issue work.
4
4
 
5
5
  Use:
6
6
 
7
- - `jskit session` to list existing sessions.
8
- - `jskit session create` to start a new issue session.
9
- - `jskit session <session_id>` to inspect durable session state.
10
- - `jskit session <session_id> step` to run the next workflow step or get the next prompt.
11
- - `jskit session <session_id> step --json` when a tool or UI needs machine-readable state.
7
+ - `jskit session`
8
+ - `jskit session create`
9
+ - `jskit session <session_id>`
10
+ - `jskit session <session_id> step`
11
+ - `jskit session <session_id> step --json` for tools and UIs
12
12
 
13
- Do not invent a parallel manual issue workflow. Follow the current session step output.
14
-
15
- If dependencies are missing, install them first. If `npm install` is run while this app uses local JSKIT checkout links, run `npm run devlinks` immediately afterward.
16
-
17
- For JSKIT implementation details, use package docs, generated references, and `node_modules/@jskit-ai/agent-docs/patterns/INDEX.md` only as technical references. They are not the issue workflow source of truth.
13
+ Follow the current session step output and prompt. Do not invent a parallel manual issue workflow.