@longtable/setup 0.1.19 → 0.1.20

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/README.md CHANGED
@@ -8,7 +8,7 @@ Researchers should use the unified CLI:
8
8
 
9
9
  ```bash
10
10
  npm install -g @longtable/cli
11
- longtable init --flow interview
11
+ longtable setup --provider codex
12
12
  ```
13
13
 
14
14
  This package exists so the setup flow can also be consumed programmatically or tested in isolation during development.
@@ -23,14 +23,15 @@ The generated runtime config does not overwrite platform-native config files dir
23
23
 
24
24
  ## Package Role
25
25
 
26
- The setup contract combines technical setup with researcher-profile calibration rather than treating installation as a purely technical step.
26
+ The setup contract stores runtime permission and intervention defaults. It
27
+ should not front-load researcher-profile calibration.
27
28
 
28
29
  Global setup should answer:
29
30
 
30
- - who the researcher is
31
- - how much challenge or slowdown they want
32
- - what makes writing still feel like theirs
33
- - how visible disagreement should be by default
31
+ - which provider is being configured
32
+ - where LongTable may install runtime support
33
+ - which provider surfaces are approved
34
+ - how strongly LongTable may interrupt research decisions
34
35
 
35
36
  Project and session intake belongs to `longtable start`, not library-level setup helpers.
36
37
 
@@ -1,92 +1,7 @@
1
1
  import { createEmptyResearchState } from "@longtable/memory";
2
2
  export function buildQuickSetupFlow(flow = "quickstart") {
3
- const baseQuestions = [
4
- {
5
- id: "careerStage",
6
- prompt: "What kind of researcher role best fits you today?",
7
- required: true,
8
- kind: "single_choice",
9
- choices: buildCareerStageChoices()
10
- },
11
- {
12
- id: "experienceLevel",
13
- prompt: "How comfortable are you making independent research design decisions right now?",
14
- required: true,
15
- kind: "single_choice",
16
- choices: [
17
- { id: "novice", label: "Novice", description: "Needs stronger checkpoint guidance." },
18
- { id: "intermediate", label: "Intermediate", description: "Wants balanced guidance." },
19
- { id: "advanced", label: "Advanced", description: "Prefers lighter intervention." }
20
- ]
21
- },
22
- {
23
- id: "preferredCheckpointIntensity",
24
- prompt: "How strongly should LongTable challenge or slow you down by default?",
25
- required: true,
26
- kind: "single_choice",
27
- choices: [
28
- { id: "low", label: "Low", description: "Mostly lightweight logging and advisory prompts." },
29
- { id: "balanced", label: "Balanced", description: "Recommended by default." },
30
- { id: "high", label: "High", description: "Frequent structured commitment prompts." }
31
- ]
32
- },
33
- {
34
- id: "humanAuthorshipSignal",
35
- prompt: "When a piece of writing still feels like yours, what usually makes that true?",
36
- required: false,
37
- kind: "single_choice",
38
- choices: [
39
- { id: "personal experience in the narrative", label: "Personal experience", description: "Humanity appears through lived experience and situated voice." },
40
- { id: "visible judgment and reasoning path", label: "Judgment trail", description: "Humanity appears through explicit choices and reasoning history." },
41
- { id: "contextual nuance that avoids generic fluency", label: "Contextual nuance", description: "Humanity appears through specificity and non-generic framing." },
42
- { id: "a distinctive voice that still sounds like the researcher", label: "Distinctive voice", description: "Humanity appears through authorial tone and cadence." },
43
- { id: "other", label: "None of the above", description: "Enter a custom authorship signal.", fallbackToText: true }
44
- ]
45
- }
46
- ];
47
- if (flow === "quickstart") {
48
- return baseQuestions;
49
- }
50
- return [
51
- ...baseQuestions,
52
- {
53
- id: "preferredEntryMode",
54
- prompt: "When you first open LongTable, where do you want it to begin?",
55
- required: false,
56
- kind: "single_choice",
57
- choices: [
58
- { id: "explore", label: "Explore", description: "Open the problem, surface tensions, and ask better questions." },
59
- { id: "review", label: "Review", description: "Critically inspect a claim, plan, or draft." },
60
- { id: "critique", label: "Critique", description: "Stress-test weak assumptions and generate counterarguments." },
61
- { id: "draft", label: "Draft", description: "Write while preserving narrative trace and authorship." },
62
- { id: "commit", label: "Commit", description: "Slow down and make an explicit research decision." }
63
- ]
64
- },
65
- {
66
- id: "weakestDomain",
67
- prompt: "Where do you most want LongTable to push back on you first?",
68
- required: false,
69
- kind: "single_choice",
70
- choices: [
71
- { id: "theory", label: "Theory", description: "Sharpen framing, constructs, and theoretical defensibility." },
72
- { id: "methodology", label: "Methodology", description: "Question design fit, sampling, and study structure." },
73
- { id: "measurement", label: "Measurement", description: "Challenge scales, validity, and operationalization." },
74
- { id: "analysis", label: "Analysis", description: "Probe analytic logic, interpretation, and evidence claims." },
75
- { id: "writing", label: "Writing", description: "Preserve voice while improving clarity and argument flow." }
76
- ]
77
- },
78
- {
79
- id: "panelPreference",
80
- prompt: "How visible should disagreement between roles be by default?",
81
- required: false,
82
- kind: "single_choice",
83
- choices: [
84
- { id: "synthesis_only", label: "Synthesis only", description: "Show one LongTable answer unless I ask for more." },
85
- { id: "show_on_conflict", label: "Show on conflict", description: "Surface panel disagreement when roles materially diverge." },
86
- { id: "always_visible", label: "Always visible", description: "Keep panel opinions visible by default." }
87
- ]
88
- }
89
- ];
3
+ void flow;
4
+ return [];
90
5
  }
91
6
  export function buildProviderChoices() {
92
7
  return [
@@ -137,9 +52,12 @@ export function normalizeProviderChoice(choice) {
137
52
  }
138
53
  export function createResearcherProfileSeed(answers) {
139
54
  return {
55
+ ...answers,
140
56
  field: answers.field ?? "unspecified",
57
+ careerStage: answers.careerStage ?? "unspecified",
58
+ experienceLevel: answers.experienceLevel ?? "advanced",
59
+ preferredCheckpointIntensity: answers.preferredCheckpointIntensity ?? "balanced",
141
60
  currentProjectType: answers.currentProjectType ?? "unspecified research task",
142
- ...answers,
143
61
  aiAutonomyPreference: answers.experienceLevel === "advanced"
144
62
  ? "balanced"
145
63
  : answers.experienceLevel === "intermediate"
@@ -23,10 +23,10 @@ export function renderSetupSummary(output) {
23
23
  `provider: ${output.providerSelection.provider}`,
24
24
  `checkpoint protocol: ${output.providerSelection.checkpointProtocol}`,
25
25
  `default mode: ${output.defaultInteractionMode}`,
26
- `field: ${output.profileSeed.field}`,
27
- `career stage: ${output.profileSeed.careerStage}`,
28
- `experience: ${output.profileSeed.experienceLevel}`,
29
- `checkpoint intensity: ${output.profileSeed.preferredCheckpointIntensity}`
26
+ `field: ${output.profileSeed.field ?? "unspecified"}`,
27
+ `career stage: ${output.profileSeed.careerStage ?? "unspecified"}`,
28
+ `experience: ${output.profileSeed.experienceLevel ?? "advanced"}`,
29
+ `checkpoint intensity: ${output.profileSeed.preferredCheckpointIntensity ?? "balanced"}`
30
30
  ];
31
31
  if (output.profileSeed.weakestDomain) {
32
32
  lines.push(`challenge first: ${output.profileSeed.weakestDomain}`);
@@ -96,9 +96,9 @@ function renderCodexRuntimeConfig(output, setupPath) {
96
96
  `setup_flow = "${output.setupFlow}"`,
97
97
  "",
98
98
  "[longtable.profile]",
99
- `field = "${output.profileSeed.field}"`,
100
- `career_stage = "${output.profileSeed.careerStage}"`,
101
- `experience_level = "${output.profileSeed.experienceLevel}"`,
99
+ `field = "${output.profileSeed.field ?? "unspecified"}"`,
100
+ `career_stage = "${output.profileSeed.careerStage ?? "unspecified"}"`,
101
+ `experience_level = "${output.profileSeed.experienceLevel ?? "advanced"}"`,
102
102
  ...(output.profileSeed.currentProjectType && output.profileSeed.currentProjectType !== "unspecified research task"
103
103
  ? [`current_project_type = "${output.profileSeed.currentProjectType}"`]
104
104
  : []),
@@ -125,9 +125,9 @@ function renderClaudeRuntimeConfig(output, setupPath) {
125
125
  defaultInteractionMode: output.defaultInteractionMode,
126
126
  setupFlow: output.setupFlow,
127
127
  profileSummary: {
128
- field: output.profileSeed.field,
129
- careerStage: output.profileSeed.careerStage,
130
- experienceLevel: output.profileSeed.experienceLevel,
128
+ field: output.profileSeed.field ?? "unspecified",
129
+ careerStage: output.profileSeed.careerStage ?? "unspecified",
130
+ experienceLevel: output.profileSeed.experienceLevel ?? "advanced",
131
131
  currentProjectType: output.profileSeed.currentProjectType && output.profileSeed.currentProjectType !== "unspecified research task"
132
132
  ? output.profileSeed.currentProjectType
133
133
  : undefined,
package/dist/types.d.ts CHANGED
@@ -15,10 +15,10 @@ export interface SetupQuestion {
15
15
  export type SetupFlow = "quickstart" | "interview";
16
16
  export interface SetupAnswers {
17
17
  field?: string;
18
- careerStage: string;
19
- experienceLevel: ExperienceLevel;
18
+ careerStage?: string;
19
+ experienceLevel?: ExperienceLevel;
20
20
  currentProjectType?: string;
21
- preferredCheckpointIntensity: CheckpointIntensity;
21
+ preferredCheckpointIntensity?: CheckpointIntensity;
22
22
  humanAuthorshipSignal?: string;
23
23
  preferredEntryMode?: Exclude<InteractionMode, "submit">;
24
24
  weakestDomain?: Extract<keyof ResearcherConfidenceByDomain, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longtable/setup",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "private": false,
5
5
  "description": "Researcher onboarding and setup flows for LongTable",
6
6
  "type": "module",
@@ -23,8 +23,8 @@
23
23
  "typecheck": "tsc -p tsconfig.json --noEmit"
24
24
  },
25
25
  "dependencies": {
26
- "@longtable/core": "0.1.19",
27
- "@longtable/memory": "0.1.19"
26
+ "@longtable/core": "0.1.20",
27
+ "@longtable/memory": "0.1.20"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "^22.0.0",