feat(FN-3076): add automatic completion documentation mode for tasks
Merged FN-3076 introducing an auto completion-doc mode that automates task completion documentation. The feature adds a new setting to the settings schema and types, surfaces it in the dashboard Settings UI, provides triage-stage guidance to suggest completion documentation, and is documented in the Fusion-Task-Id: FN-3076
This commit is contained in:
@@ -237,6 +237,14 @@ describe("settings-export", () => {
|
||||
const result = await exportSettings(store, { source: "my-laptop" });
|
||||
expect(result.source).toBe("my-laptop");
|
||||
});
|
||||
|
||||
it("should export completionDocumentationMode in project scope", async () => {
|
||||
await store.updateSettings({ completionDocumentationMode: "changelog" });
|
||||
|
||||
const result = await exportSettings(store, { scope: "project" });
|
||||
|
||||
expect(result.project?.completionDocumentationMode).toBe("changelog");
|
||||
});
|
||||
});
|
||||
|
||||
describe("importSettings", () => {
|
||||
@@ -284,6 +292,24 @@ describe("settings-export", () => {
|
||||
expect(settings.maxWorktrees).toBe(10);
|
||||
});
|
||||
|
||||
it("should import completionDocumentationMode in project merge mode", async () => {
|
||||
await store.updateSettings({ completionDocumentationMode: "off" });
|
||||
|
||||
const importData: SettingsExportData = {
|
||||
version: 1,
|
||||
exportedAt: new Date().toISOString(),
|
||||
project: { completionDocumentationMode: "changeset" },
|
||||
};
|
||||
|
||||
const result = await importSettings(store, importData, { scope: "project", merge: true });
|
||||
|
||||
expect(result.success).toBe(true);
|
||||
expect(result.projectCount).toBe(1);
|
||||
|
||||
const settings = await store.getSettings();
|
||||
expect(settings.completionDocumentationMode).toBe("changeset");
|
||||
});
|
||||
|
||||
it("should import both scopes", async () => {
|
||||
const importData: SettingsExportData = {
|
||||
version: 1,
|
||||
|
||||
@@ -50,6 +50,7 @@ describe("settings key parity", () => {
|
||||
expect(isGlobalSettingsKey("maxConcurrent")).toBe(false);
|
||||
expect(isProjectSettingsKey("maxConcurrent")).toBe(true);
|
||||
expect(isProjectSettingsKey("heartbeatMultiplier")).toBe(true);
|
||||
expect(isProjectSettingsKey("completionDocumentationMode")).toBe(true);
|
||||
expect(isProjectSettingsKey("remoteAccess")).toBe(false);
|
||||
expect(isProjectSettingsKey("researchSettings")).toBe(true);
|
||||
expect(isGlobalSettingsKey("researchGlobalDefaults")).toBe(true);
|
||||
@@ -64,6 +65,10 @@ describe("settings key parity", () => {
|
||||
expect(DEFAULT_PROJECT_SETTINGS.heartbeatMultiplier).toBe(1);
|
||||
});
|
||||
|
||||
it("defaults completionDocumentationMode to off", () => {
|
||||
expect(DEFAULT_PROJECT_SETTINGS.completionDocumentationMode).toBe("off");
|
||||
});
|
||||
|
||||
it("keeps remoteAccess scoped to global settings only", () => {
|
||||
const globalKeys = GLOBAL_SETTINGS_KEYS as readonly string[];
|
||||
const projectKeys = PROJECT_SETTINGS_KEYS as readonly string[];
|
||||
|
||||
@@ -181,6 +181,7 @@ export const DEFAULT_PROJECT_SETTINGS = {
|
||||
validatorFallbackModelId: undefined,
|
||||
modelPresets: [],
|
||||
autoSelectModelPreset: false,
|
||||
completionDocumentationMode: "off",
|
||||
defaultPresetBySize: {},
|
||||
autoResolveConflicts: true,
|
||||
smartConflictResolution: true,
|
||||
|
||||
@@ -27,6 +27,10 @@ export type ExecutionMode = (typeof EXECUTION_MODES)[number];
|
||||
/** Default execution mode for new tasks */
|
||||
export const DEFAULT_EXECUTION_MODE: ExecutionMode = "standard";
|
||||
|
||||
/** Controls whether triage should require completion documentation artifacts in task specs. */
|
||||
export const COMPLETION_DOCUMENTATION_MODES = ["off", "changeset", "changelog"] as const;
|
||||
export type CompletionDocumentationMode = (typeof COMPLETION_DOCUMENTATION_MODES)[number];
|
||||
|
||||
/** Theme mode for light/dark/system preference */
|
||||
export const THEME_MODES = ["dark", "light", "system"] as const;
|
||||
export type ThemeMode = (typeof THEME_MODES)[number];
|
||||
@@ -1736,6 +1740,12 @@ export interface ProjectSettings {
|
||||
modelPresets?: ModelPreset[];
|
||||
/** When true, task creation UIs automatically recommend/apply a preset based on task size. */
|
||||
autoSelectModelPreset?: boolean;
|
||||
/** Controls whether planning specs should require release documentation artifacts on completion.
|
||||
* - "off": do not inject any release-documentation requirement
|
||||
* - "changeset": require a `.changeset/*.md` entry when relevant
|
||||
* - "changelog": require updating an existing changelog file (do not invent a new one)
|
||||
* Default: "off" */
|
||||
completionDocumentationMode?: CompletionDocumentationMode;
|
||||
/** Mapping of task sizes to preset IDs used for auto-selection during task creation. */
|
||||
defaultPresetBySize?: { S?: string; M?: string; L?: string };
|
||||
/** When true, auto-merge will automatically resolve common conflict patterns
|
||||
|
||||
Reference in New Issue
Block a user