davia 0.1.9 → 0.1.10

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.
Files changed (41) hide show
  1. package/dist/coding-agents-options/agents/claude-code/index.d.ts +3 -0
  2. package/dist/coding-agents-options/agents/claude-code/index.d.ts.map +1 -0
  3. package/dist/coding-agents-options/agents/claude-code/index.js +23 -0
  4. package/dist/coding-agents-options/agents/cursor/index.d.ts +3 -0
  5. package/dist/coding-agents-options/agents/cursor/index.d.ts.map +1 -0
  6. package/dist/coding-agents-options/agents/cursor/index.js +6 -0
  7. package/dist/coding-agents-options/agents/github-copilot/index.d.ts +3 -0
  8. package/dist/coding-agents-options/agents/github-copilot/index.d.ts.map +1 -0
  9. package/dist/coding-agents-options/agents/github-copilot/index.js +6 -0
  10. package/dist/coding-agents-options/agents/index.d.ts +10 -0
  11. package/dist/coding-agents-options/agents/index.d.ts.map +1 -0
  12. package/dist/coding-agents-options/agents/index.js +24 -0
  13. package/dist/coding-agents-options/agents/open-code/index.d.ts +3 -0
  14. package/dist/coding-agents-options/agents/open-code/index.d.ts.map +1 -0
  15. package/dist/coding-agents-options/agents/open-code/index.js +25 -0
  16. package/dist/coding-agents-options/agents/windsurf/index.d.ts +3 -0
  17. package/dist/coding-agents-options/agents/windsurf/index.d.ts.map +1 -0
  18. package/dist/coding-agents-options/agents/windsurf/index.js +6 -0
  19. package/dist/coding-agents-options/index.d.ts +11 -0
  20. package/dist/coding-agents-options/index.d.ts.map +1 -0
  21. package/dist/coding-agents-options/index.js +58 -0
  22. package/dist/coding-agents-options/json-config/handler.d.ts +8 -0
  23. package/dist/coding-agents-options/json-config/handler.d.ts.map +1 -0
  24. package/dist/coding-agents-options/json-config/handler.js +55 -0
  25. package/dist/coding-agents-options/json-config/index.d.ts +3 -0
  26. package/dist/coding-agents-options/json-config/index.d.ts.map +1 -0
  27. package/dist/coding-agents-options/json-config/index.js +1 -0
  28. package/dist/coding-agents-options/json-config/types.d.ts +10 -0
  29. package/dist/coding-agents-options/json-config/types.d.ts.map +1 -0
  30. package/dist/coding-agents-options/json-config/types.js +1 -0
  31. package/dist/coding-agents-options/json-config/utils.d.ts +9 -0
  32. package/dist/coding-agents-options/json-config/utils.d.ts.map +1 -0
  33. package/dist/coding-agents-options/json-config/utils.js +31 -0
  34. package/dist/coding-agents-options/template.d.ts +2 -0
  35. package/dist/coding-agents-options/template.d.ts.map +1 -0
  36. package/dist/coding-agents-options/template.js +33 -0
  37. package/dist/coding-agents-options/types.d.ts +9 -0
  38. package/dist/coding-agents-options/types.d.ts.map +1 -0
  39. package/dist/coding-agents-options/types.js +1 -0
  40. package/dist/projects.js +2 -2
  41. package/package.json +2 -2
@@ -0,0 +1,3 @@
1
+ import type { AgentConfig } from "../../types.js";
2
+ export declare const claudeCodeConfig: AgentConfig;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/coding-agents-options/agents/claude-code/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,gBAAgB,EAAE,WAuB9B,CAAC"}
@@ -0,0 +1,23 @@
1
+ export const claudeCodeConfig = {
2
+ name: "Claude Code",
3
+ folderPath: ".claude/skills/davia-documentation",
4
+ fileName: "SKILL.md",
5
+ frontmatter: "---\nname: davia-documentation\ndescription: Use whenever the user asks you to create, update, or read *documentation*/*Wiki* (docs, specs, design notes, API docs, etc.).\n---\n\n",
6
+ jsonConfigs: [
7
+ {
8
+ folderPath: ".claude",
9
+ fileName: "settings.local.json",
10
+ defaultContent: {
11
+ permissions: {
12
+ allow: [],
13
+ deny: [],
14
+ ask: [],
15
+ },
16
+ },
17
+ appendTo: {
18
+ path: "permissions.allow",
19
+ value: "Skill(davia-documentation)",
20
+ },
21
+ },
22
+ ],
23
+ };
@@ -0,0 +1,3 @@
1
+ import type { AgentConfig } from "../../types.js";
2
+ export declare const cursorConfig: AgentConfig;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/coding-agents-options/agents/cursor/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,YAAY,EAAE,WAK1B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export const cursorConfig = {
2
+ name: "Cursor",
3
+ folderPath: ".cursor/rules",
4
+ fileName: "davia-documentation.mdc",
5
+ frontmatter: "---\nalwaysApply: true\n---\n\n",
6
+ };
@@ -0,0 +1,3 @@
1
+ import type { AgentConfig } from "../../types.js";
2
+ export declare const githubCopilotConfig: AgentConfig;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/coding-agents-options/agents/github-copilot/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,mBAAmB,EAAE,WAKjC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export const githubCopilotConfig = {
2
+ name: "GitHub Copilot",
3
+ folderPath: ".github/instructions",
4
+ fileName: "davia.instructions.md",
5
+ frontmatter: '---\napplyTo: "**"\nexcludeAgent: "code-review"\n---\n\n',
6
+ };
@@ -0,0 +1,10 @@
1
+ import type { AgentConfig } from "../types.js";
2
+ export declare const SUPPORTED_AGENTS: Record<string, AgentConfig>;
3
+ export declare function isValidAgent(agentType: string): boolean;
4
+ export declare function getSupportedAgentsList(): string;
5
+ export { cursorConfig } from "./cursor/index.js";
6
+ export { windsurfConfig } from "./windsurf/index.js";
7
+ export { githubCopilotConfig } from "./github-copilot/index.js";
8
+ export { claudeCodeConfig } from "./claude-code/index.js";
9
+ export { openCodeConfig } from "./open-code/index.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coding-agents-options/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO/C,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAMxD,CAAC;AAEF,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAGD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { cursorConfig } from "./cursor/index.js";
2
+ import { windsurfConfig } from "./windsurf/index.js";
3
+ import { githubCopilotConfig } from "./github-copilot/index.js";
4
+ import { claudeCodeConfig } from "./claude-code/index.js";
5
+ import { openCodeConfig } from "./open-code/index.js";
6
+ export const SUPPORTED_AGENTS = {
7
+ cursor: cursorConfig,
8
+ windsurf: windsurfConfig,
9
+ "github-copilot": githubCopilotConfig,
10
+ "claude-code": claudeCodeConfig,
11
+ "open-code": openCodeConfig,
12
+ };
13
+ export function isValidAgent(agentType) {
14
+ return agentType in SUPPORTED_AGENTS;
15
+ }
16
+ export function getSupportedAgentsList() {
17
+ return Object.keys(SUPPORTED_AGENTS).join(", ");
18
+ }
19
+ // Re-export individual configs for direct access if needed
20
+ export { cursorConfig } from "./cursor/index.js";
21
+ export { windsurfConfig } from "./windsurf/index.js";
22
+ export { githubCopilotConfig } from "./github-copilot/index.js";
23
+ export { claudeCodeConfig } from "./claude-code/index.js";
24
+ export { openCodeConfig } from "./open-code/index.js";
@@ -0,0 +1,3 @@
1
+ import type { AgentConfig } from "../../types.js";
2
+ export declare const openCodeConfig: AgentConfig;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/coding-agents-options/agents/open-code/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,cAAc,EAAE,WAwB5B,CAAC"}
@@ -0,0 +1,25 @@
1
+ export const openCodeConfig = {
2
+ name: "Open Code",
3
+ folderPath: ".davia",
4
+ fileName: "davia-documentation.md",
5
+ frontmatter: `<!--
6
+ name: davia-documentation
7
+ description: Use whenever the user asks you to create, update, or read documentation/Wiki (docs, specs, design notes, API docs, etc.).
8
+ -->
9
+
10
+ `,
11
+ jsonConfigs: [
12
+ {
13
+ folderPath: "",
14
+ fileName: "opencode.json",
15
+ defaultContent: {
16
+ $schema: "https://opencode.ai/config.json",
17
+ instructions: [],
18
+ },
19
+ appendTo: {
20
+ path: "instructions",
21
+ value: ".davia/davia-documentation.md",
22
+ },
23
+ },
24
+ ],
25
+ };
@@ -0,0 +1,3 @@
1
+ import type { AgentConfig } from "../../types.js";
2
+ export declare const windsurfConfig: AgentConfig;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/coding-agents-options/agents/windsurf/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,cAAc,EAAE,WAK5B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export const windsurfConfig = {
2
+ name: "Windsurf",
3
+ folderPath: ".windsurf/rules",
4
+ fileName: "davia-documentation.md",
5
+ frontmatter: "---\ntrigger: always_on\n---\n\n",
6
+ };
@@ -0,0 +1,11 @@
1
+ export { SUPPORTED_AGENTS, isValidAgent, getSupportedAgentsList, } from "./agents/index.js";
2
+ export { getTemplateContent } from "./template.js";
3
+ export type { AgentConfig } from "./types.js";
4
+ export type { JsonConfigFile } from "./json-config/index.js";
5
+ /**
6
+ * Writes agent-specific configuration file to the project root
7
+ * @param projectRoot - The root directory of the user's project
8
+ * @param agentType - The type of agent (cursor, windsurf, github-copilot, claude-code, open-code)
9
+ */
10
+ export declare function writeAgentConfig(projectRoot: string, agentType: string): Promise<void>;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/coding-agents-options/index.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAmEf"}
@@ -0,0 +1,58 @@
1
+ import fs from "fs-extra";
2
+ import path from "node:path";
3
+ import chalk from "chalk";
4
+ import { SUPPORTED_AGENTS, isValidAgent, getSupportedAgentsList, } from "./agents/index.js";
5
+ import { handleJsonConfigFile } from "./json-config/handler.js";
6
+ import { getTemplateContent } from "./template.js";
7
+ // Re-export for external consumers
8
+ export { SUPPORTED_AGENTS, isValidAgent, getSupportedAgentsList, } from "./agents/index.js";
9
+ export { getTemplateContent } from "./template.js";
10
+ /**
11
+ * Writes agent-specific configuration file to the project root
12
+ * @param projectRoot - The root directory of the user's project
13
+ * @param agentType - The type of agent (cursor, windsurf, github-copilot, claude-code, open-code)
14
+ */
15
+ export async function writeAgentConfig(projectRoot, agentType) {
16
+ // Validate agent type
17
+ if (!isValidAgent(agentType)) {
18
+ console.log(chalk.red(`❌ Invalid agent type: "${agentType}". Supported agents: ${getSupportedAgentsList()}`));
19
+ return;
20
+ }
21
+ const agentConfig = SUPPORTED_AGENTS[agentType];
22
+ const targetDir = path.join(projectRoot, agentConfig.folderPath);
23
+ const targetFile = path.join(targetDir, agentConfig.fileName);
24
+ // Check if the file already exists
25
+ const docFileExists = await fs.pathExists(targetFile);
26
+ if (docFileExists) {
27
+ console.log(chalk.yellow(`⚠️ ${agentConfig.name} configuration already exists at ${path.relative(projectRoot, targetFile)}`));
28
+ console.log(chalk.yellow(" Skipping agent configuration generation."));
29
+ // Still handle JSON configs if specified (e.g., for open-code, claude-code)
30
+ // This allows updating config files even if davia-documentation.md exists
31
+ if (agentConfig.jsonConfigs) {
32
+ for (const jsonConfig of agentConfig.jsonConfigs) {
33
+ await handleJsonConfigFile(projectRoot, jsonConfig);
34
+ }
35
+ }
36
+ return;
37
+ }
38
+ try {
39
+ // Get the template content
40
+ const templateContent = getTemplateContent();
41
+ // Combine frontmatter with template content
42
+ const fileContent = agentConfig.frontmatter + templateContent;
43
+ // Ensure the target directory exists
44
+ await fs.ensureDir(targetDir);
45
+ // Write the configuration file
46
+ await fs.writeFile(targetFile, fileContent, "utf-8");
47
+ console.log(chalk.green(`✓ Created ${agentConfig.name} configuration at ${path.relative(projectRoot, targetFile)}`));
48
+ // Handle JSON config files if specified (e.g., for open-code, claude-code)
49
+ if (agentConfig.jsonConfigs) {
50
+ for (const jsonConfig of agentConfig.jsonConfigs) {
51
+ await handleJsonConfigFile(projectRoot, jsonConfig);
52
+ }
53
+ }
54
+ }
55
+ catch (error) {
56
+ console.error(chalk.red(`❌ Failed to create ${agentConfig.name} configuration: ${error instanceof Error ? error.message : String(error)}`));
57
+ }
58
+ }
@@ -0,0 +1,8 @@
1
+ import type { JsonConfigFile } from "./types.js";
2
+ /**
3
+ * Handles JSON config file creation/update with append logic
4
+ * @param projectRoot - The root directory of the user's project
5
+ * @param jsonConfig - The JSON config file configuration
6
+ */
7
+ export declare function handleJsonConfigFile(projectRoot: string, jsonConfig: JsonConfigFile): Promise<void>;
8
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/coding-agents-options/json-config/handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,cAAc,GACzB,OAAO,CAAC,IAAI,CAAC,CA6Ef"}
@@ -0,0 +1,55 @@
1
+ import fs from "fs-extra";
2
+ import path from "node:path";
3
+ import chalk from "chalk";
4
+ import { getNestedValue, setNestedValue } from "./utils.js";
5
+ /**
6
+ * Handles JSON config file creation/update with append logic
7
+ * @param projectRoot - The root directory of the user's project
8
+ * @param jsonConfig - The JSON config file configuration
9
+ */
10
+ export async function handleJsonConfigFile(projectRoot, jsonConfig) {
11
+ const configDir = path.join(projectRoot, jsonConfig.folderPath);
12
+ const configFile = path.join(configDir, jsonConfig.fileName);
13
+ const { path: appendPath, value: appendValue } = jsonConfig.appendTo;
14
+ try {
15
+ let configContent;
16
+ if (await fs.pathExists(configFile)) {
17
+ // File exists - read and append to the target array
18
+ const existingContent = await fs.readFile(configFile, "utf-8");
19
+ configContent = JSON.parse(existingContent);
20
+ // Get or initialize the target array using dot-notation path
21
+ let targetArray = getNestedValue(configContent, appendPath);
22
+ if (!targetArray) {
23
+ targetArray = [];
24
+ setNestedValue(configContent, appendPath, targetArray);
25
+ }
26
+ // Check if the value is already in the array
27
+ if (!targetArray.includes(appendValue)) {
28
+ targetArray.push(appendValue);
29
+ setNestedValue(configContent, appendPath, targetArray);
30
+ await fs.writeFile(configFile, JSON.stringify(configContent, null, 2), "utf-8");
31
+ console.log(chalk.green(`✓ Updated ${jsonConfig.fileName} - added "${appendValue}" to ${appendPath}`));
32
+ }
33
+ else {
34
+ console.log(chalk.yellow(`⚠️ ${jsonConfig.fileName} already contains "${appendValue}" in ${appendPath}`));
35
+ }
36
+ }
37
+ else {
38
+ // File doesn't exist - create with default content and the value
39
+ configContent = JSON.parse(JSON.stringify(jsonConfig.defaultContent)); // deep clone
40
+ // Get or initialize the target array and add the value
41
+ let targetArray = getNestedValue(configContent, appendPath);
42
+ if (!targetArray) {
43
+ targetArray = [];
44
+ }
45
+ targetArray.push(appendValue);
46
+ setNestedValue(configContent, appendPath, targetArray);
47
+ await fs.ensureDir(configDir);
48
+ await fs.writeFile(configFile, JSON.stringify(configContent, null, 2), "utf-8");
49
+ console.log(chalk.green(`✓ Created ${jsonConfig.fileName} at ${path.relative(projectRoot, configFile)}`));
50
+ }
51
+ }
52
+ catch (error) {
53
+ console.error(chalk.red(`❌ Failed to handle ${jsonConfig.fileName}: ${error instanceof Error ? error.message : String(error)}`));
54
+ }
55
+ }
@@ -0,0 +1,3 @@
1
+ export { handleJsonConfigFile } from "./handler.js";
2
+ export type { JsonConfigFile } from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coding-agents-options/json-config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ export { handleJsonConfigFile } from "./handler.js";
@@ -0,0 +1,10 @@
1
+ export interface JsonConfigFile {
2
+ folderPath: string;
3
+ fileName: string;
4
+ defaultContent: Record<string, unknown>;
5
+ appendTo: {
6
+ path: string;
7
+ value: string;
8
+ };
9
+ }
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/coding-agents-options/json-config/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Gets a nested value from an object using dot-notation path
3
+ */
4
+ export declare function getNestedValue(obj: Record<string, unknown>, path: string): unknown;
5
+ /**
6
+ * Sets a nested value in an object using dot-notation path
7
+ */
8
+ export declare function setNestedValue(obj: Record<string, unknown>, path: string, value: unknown): void;
9
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/coding-agents-options/json-config/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,EAAE,MAAM,GACX,OAAO,CAWT;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,GACb,IAAI,CAWN"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Gets a nested value from an object using dot-notation path
3
+ */
4
+ export function getNestedValue(obj, path) {
5
+ const keys = path.split(".");
6
+ let current = obj;
7
+ for (const key of keys) {
8
+ if (current && typeof current === "object" && key in current) {
9
+ current = current[key];
10
+ }
11
+ else {
12
+ return undefined;
13
+ }
14
+ }
15
+ return current;
16
+ }
17
+ /**
18
+ * Sets a nested value in an object using dot-notation path
19
+ */
20
+ export function setNestedValue(obj, path, value) {
21
+ const keys = path.split(".");
22
+ let current = obj;
23
+ for (let i = 0; i < keys.length - 1; i++) {
24
+ const key = keys[i];
25
+ if (!(key in current) || typeof current[key] !== "object") {
26
+ current[key] = {};
27
+ }
28
+ current = current[key];
29
+ }
30
+ current[keys[keys.length - 1]] = value;
31
+ }
@@ -0,0 +1,2 @@
1
+ export declare function getTemplateContent(): string;
2
+ //# sourceMappingURL=template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/coding-agents-options/template.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,IAAI,MAAM,CAgC3C"}
@@ -0,0 +1,33 @@
1
+ export function getTemplateContent() {
2
+ return `# Davia Documentation Rules
3
+
4
+ You are working in a project that uses **Davia** for all internal documentation.
5
+
6
+ ## Core rule
7
+
8
+ Whenever the user asks you to create, update, or read *documentation* (docs, specs, design notes, API docs, READMEs, etc.), you **must** handle it using the Davia paradigm:
9
+
10
+ - Treat the .davia folder at the repository root as the single source of truth for project documentation.
11
+ - Prefer creating or updating Davia wiki entries inside .davia instead of creating or editing README files or other ad-hoc docs.
12
+
13
+ ## Davia wiki vs README
14
+
15
+ - If the user asks for a general documentation, interpret that as a request for a **Davia wiki page** inside .davia, and implement it there instead of creating a traditional README.
16
+ - Only touch existing README files when the user explicitly instructs you to.
17
+
18
+ ## Safety and instructions
19
+
20
+ Before you create, edit, or delete any files inside .davia, you **must first read** the instruction file in that folder and strictly follow its conventions when manipulating documentation files.
21
+ The instructions are in the .davia/AGENTS.md file, you **must** read it completely.
22
+
23
+ ## Helpful CLI commands (for the user)
24
+
25
+ The user has access to these Davia terminal commands:
26
+
27
+ - davia open — start the Davia web server to browse and edit documentation.
28
+ - davia login — log the user into their Davia profile.
29
+
30
+ After you have generated documentation, you should **run the \`davia open\` command** to display the documentation in the user's browser.
31
+
32
+ Always keep all documentation work aligned with the Davia wiki structure and conventions in .davia.`;
33
+ }
@@ -0,0 +1,9 @@
1
+ import type { JsonConfigFile } from "./json-config/types.js";
2
+ export interface AgentConfig {
3
+ name: string;
4
+ folderPath: string;
5
+ fileName: string;
6
+ frontmatter: string;
7
+ jsonConfigs?: JsonConfigFile[];
8
+ }
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/coding-agents-options/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;CAChC"}
@@ -0,0 +1 @@
1
+ export {};
package/dist/projects.js CHANGED
@@ -5,8 +5,8 @@ import chalk from "chalk";
5
5
  import { confirm } from "@inquirer/prompts";
6
6
  import { getProjectsPath } from "./paths.js";
7
7
  import { createAgentsMd } from "./ide-agent-instruction/index.js";
8
- import { writeAgentConfig } from "./agentic-ide-options/index.js";
9
- import { SUPPORTED_AGENTS } from "./agentic-ide-options/agent-rule.js";
8
+ import { writeAgentConfig } from "./coding-agents-options/index.js";
9
+ import { SUPPORTED_AGENTS } from "./coding-agents-options/index.js";
10
10
  /**
11
11
  * Reads projects.json, creates it with empty array if it doesn't exist
12
12
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "davia",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "license": "MIT",
5
5
  "description": "Interactive, editable docs designed for coding agents",
6
6
  "homepage": "https://davia.ai",
@@ -45,7 +45,7 @@
45
45
  "ora": "^9.0.0",
46
46
  "slug": "^11.0.1",
47
47
  "@davia/agent": "^0.1.3",
48
- "@davia/web": "^0.1.8"
48
+ "@davia/web": "^0.1.9"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/archiver": "^7.0.0",