@organon-methodology/tools 0.3.0
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/LICENSE +21 -0
- package/README.md +152 -0
- package/dist/cli/commands/coverage.d.ts +12 -0
- package/dist/cli/commands/coverage.d.ts.map +1 -0
- package/dist/cli/commands/coverage.js +80 -0
- package/dist/cli/commands/coverage.js.map +1 -0
- package/dist/cli/commands/find.d.ts +15 -0
- package/dist/cli/commands/find.d.ts.map +1 -0
- package/dist/cli/commands/find.js +81 -0
- package/dist/cli/commands/find.js.map +1 -0
- package/dist/cli/commands/generate-tests.d.ts +14 -0
- package/dist/cli/commands/generate-tests.d.ts.map +1 -0
- package/dist/cli/commands/generate-tests.js +87 -0
- package/dist/cli/commands/generate-tests.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +15 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +77 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/commands/health.d.ts +13 -0
- package/dist/cli/commands/health.d.ts.map +1 -0
- package/dist/cli/commands/health.js +79 -0
- package/dist/cli/commands/health.js.map +1 -0
- package/dist/cli/commands/init.d.ts +14 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +132 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +11 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +26 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/query.d.ts +19 -0
- package/dist/cli/commands/query.d.ts.map +1 -0
- package/dist/cli/commands/query.js +103 -0
- package/dist/cli/commands/query.js.map +1 -0
- package/dist/cli/commands/upgrade.d.ts +13 -0
- package/dist/cli/commands/upgrade.d.ts.map +1 -0
- package/dist/cli/commands/upgrade.js +162 -0
- package/dist/cli/commands/upgrade.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +13 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +89 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/commands/verify.d.ts +12 -0
- package/dist/cli/commands/verify.d.ts.map +1 -0
- package/dist/cli/commands/verify.js +67 -0
- package/dist/cli/commands/verify.js.map +1 -0
- package/dist/cli/index.d.ts +19 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +59 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/add-protocols-array.d.ts +17 -0
- package/dist/core/add-protocols-array.d.ts.map +1 -0
- package/dist/core/add-protocols-array.js +95 -0
- package/dist/core/add-protocols-array.js.map +1 -0
- package/dist/core/add-protocols-array.test.d.ts +2 -0
- package/dist/core/add-protocols-array.test.d.ts.map +1 -0
- package/dist/core/add-protocols-array.test.js +86 -0
- package/dist/core/add-protocols-array.test.js.map +1 -0
- package/dist/core/config.d.ts +44 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +130 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/config.test.d.ts +2 -0
- package/dist/core/config.test.d.ts.map +1 -0
- package/dist/core/config.test.js +88 -0
- package/dist/core/config.test.js.map +1 -0
- package/dist/core/find.d.ts +29 -0
- package/dist/core/find.d.ts.map +1 -0
- package/dist/core/find.js +191 -0
- package/dist/core/find.js.map +1 -0
- package/dist/core/find.test.d.ts +2 -0
- package/dist/core/find.test.d.ts.map +1 -0
- package/dist/core/find.test.js +91 -0
- package/dist/core/find.test.js.map +1 -0
- package/dist/core/frontmatter-parser.d.ts +45 -0
- package/dist/core/frontmatter-parser.d.ts.map +1 -0
- package/dist/core/frontmatter-parser.js +122 -0
- package/dist/core/frontmatter-parser.js.map +1 -0
- package/dist/core/frontmatter-parser.test.d.ts +2 -0
- package/dist/core/frontmatter-parser.test.d.ts.map +1 -0
- package/dist/core/frontmatter-parser.test.js +200 -0
- package/dist/core/frontmatter-parser.test.js.map +1 -0
- package/dist/core/generate-frontmatter.d.ts +27 -0
- package/dist/core/generate-frontmatter.d.ts.map +1 -0
- package/dist/core/generate-frontmatter.js +219 -0
- package/dist/core/generate-frontmatter.js.map +1 -0
- package/dist/core/generate-frontmatter.test.d.ts +2 -0
- package/dist/core/generate-frontmatter.test.d.ts.map +1 -0
- package/dist/core/generate-frontmatter.test.js +161 -0
- package/dist/core/generate-frontmatter.test.js.map +1 -0
- package/dist/core/generate-tests.d.ts +41 -0
- package/dist/core/generate-tests.d.ts.map +1 -0
- package/dist/core/generate-tests.js +191 -0
- package/dist/core/generate-tests.js.map +1 -0
- package/dist/core/generate-tests.test.d.ts +2 -0
- package/dist/core/generate-tests.test.d.ts.map +1 -0
- package/dist/core/generate-tests.test.js +205 -0
- package/dist/core/generate-tests.test.js.map +1 -0
- package/dist/core/health.d.ts +16 -0
- package/dist/core/health.d.ts.map +1 -0
- package/dist/core/health.js +156 -0
- package/dist/core/health.js.map +1 -0
- package/dist/core/health.test.d.ts +2 -0
- package/dist/core/health.test.d.ts.map +1 -0
- package/dist/core/health.test.js +97 -0
- package/dist/core/health.test.js.map +1 -0
- package/dist/core/init.d.ts +25 -0
- package/dist/core/init.d.ts.map +1 -0
- package/dist/core/init.js +100 -0
- package/dist/core/init.js.map +1 -0
- package/dist/core/init.test.d.ts +8 -0
- package/dist/core/init.test.d.ts.map +1 -0
- package/dist/core/init.test.js +203 -0
- package/dist/core/init.test.js.map +1 -0
- package/dist/core/invariant-coverage.d.ts +41 -0
- package/dist/core/invariant-coverage.d.ts.map +1 -0
- package/dist/core/invariant-coverage.js +181 -0
- package/dist/core/invariant-coverage.js.map +1 -0
- package/dist/core/invariant-coverage.test.d.ts +2 -0
- package/dist/core/invariant-coverage.test.d.ts.map +1 -0
- package/dist/core/invariant-coverage.test.js +188 -0
- package/dist/core/invariant-coverage.test.js.map +1 -0
- package/dist/core/meta-invariants.test.d.ts +17 -0
- package/dist/core/meta-invariants.test.d.ts.map +1 -0
- package/dist/core/meta-invariants.test.js +191 -0
- package/dist/core/meta-invariants.test.js.map +1 -0
- package/dist/core/node-fs.d.ts +22 -0
- package/dist/core/node-fs.d.ts.map +1 -0
- package/dist/core/node-fs.js +47 -0
- package/dist/core/node-fs.js.map +1 -0
- package/dist/core/organon-invariants.test.d.ts +15 -0
- package/dist/core/organon-invariants.test.d.ts.map +1 -0
- package/dist/core/organon-invariants.test.js +149 -0
- package/dist/core/organon-invariants.test.js.map +1 -0
- package/dist/core/query.d.ts +35 -0
- package/dist/core/query.d.ts.map +1 -0
- package/dist/core/query.js +139 -0
- package/dist/core/query.js.map +1 -0
- package/dist/core/query.test.d.ts +2 -0
- package/dist/core/query.test.d.ts.map +1 -0
- package/dist/core/query.test.js +97 -0
- package/dist/core/query.test.js.map +1 -0
- package/dist/core/suggest-tools.d.ts +15 -0
- package/dist/core/suggest-tools.d.ts.map +1 -0
- package/dist/core/suggest-tools.js +139 -0
- package/dist/core/suggest-tools.js.map +1 -0
- package/dist/core/suggest-tools.test.d.ts +2 -0
- package/dist/core/suggest-tools.test.d.ts.map +1 -0
- package/dist/core/suggest-tools.test.js +122 -0
- package/dist/core/suggest-tools.test.js.map +1 -0
- package/dist/core/test-helpers.d.ts +63 -0
- package/dist/core/test-helpers.d.ts.map +1 -0
- package/dist/core/test-helpers.js +265 -0
- package/dist/core/test-helpers.js.map +1 -0
- package/dist/core/types.d.ts +277 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +9 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/upgrade.d.ts +46 -0
- package/dist/core/upgrade.d.ts.map +1 -0
- package/dist/core/upgrade.js +227 -0
- package/dist/core/upgrade.js.map +1 -0
- package/dist/core/upgrade.test.d.ts +8 -0
- package/dist/core/upgrade.test.d.ts.map +1 -0
- package/dist/core/upgrade.test.js +370 -0
- package/dist/core/upgrade.test.js.map +1 -0
- package/dist/core/validate-frontmatter.d.ts +20 -0
- package/dist/core/validate-frontmatter.d.ts.map +1 -0
- package/dist/core/validate-frontmatter.js +529 -0
- package/dist/core/validate-frontmatter.js.map +1 -0
- package/dist/core/validate-frontmatter.test.d.ts +2 -0
- package/dist/core/validate-frontmatter.test.d.ts.map +1 -0
- package/dist/core/validate-frontmatter.test.js +366 -0
- package/dist/core/validate-frontmatter.test.js.map +1 -0
- package/dist/core/validate-workflow.d.ts +17 -0
- package/dist/core/validate-workflow.d.ts.map +1 -0
- package/dist/core/validate-workflow.js +233 -0
- package/dist/core/validate-workflow.js.map +1 -0
- package/dist/core/validate-workflow.test.d.ts +2 -0
- package/dist/core/validate-workflow.test.d.ts.map +1 -0
- package/dist/core/validate-workflow.test.js +205 -0
- package/dist/core/validate-workflow.test.js.map +1 -0
- package/dist/core/verify-tier4-tests.d.ts +34 -0
- package/dist/core/verify-tier4-tests.d.ts.map +1 -0
- package/dist/core/verify-tier4-tests.js +106 -0
- package/dist/core/verify-tier4-tests.js.map +1 -0
- package/dist/core/verify-tier4-tests.test.d.ts +2 -0
- package/dist/core/verify-tier4-tests.test.d.ts.map +1 -0
- package/dist/core/verify-tier4-tests.test.js +140 -0
- package/dist/core/verify-tier4-tests.test.js.map +1 -0
- package/dist/core/verify-triplets.d.ts +17 -0
- package/dist/core/verify-triplets.d.ts.map +1 -0
- package/dist/core/verify-triplets.js +217 -0
- package/dist/core/verify-triplets.js.map +1 -0
- package/dist/core/verify-triplets.test.d.ts +2 -0
- package/dist/core/verify-triplets.test.d.ts.map +1 -0
- package/dist/core/verify-triplets.test.js +147 -0
- package/dist/core/verify-triplets.test.js.map +1 -0
- package/dist/core/verify.d.ts +19 -0
- package/dist/core/verify.d.ts.map +1 -0
- package/dist/core/verify.js +162 -0
- package/dist/core/verify.js.map +1 -0
- package/dist/core/verify.test.d.ts +2 -0
- package/dist/core/verify.test.d.ts.map +1 -0
- package/dist/core/verify.test.js +147 -0
- package/dist/core/verify.test.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/prompts.d.ts +9 -0
- package/dist/mcp/prompts.d.ts.map +1 -0
- package/dist/mcp/prompts.js +265 -0
- package/dist/mcp/prompts.js.map +1 -0
- package/dist/mcp/resources.d.ts +7 -0
- package/dist/mcp/resources.d.ts.map +1 -0
- package/dist/mcp/resources.js +111 -0
- package/dist/mcp/resources.js.map +1 -0
- package/dist/mcp/server.d.ts +7 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +31 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +7 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +130 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/templates/config.d.ts +6 -0
- package/dist/templates/config.d.ts.map +1 -0
- package/dist/templates/config.js +30 -0
- package/dist/templates/config.js.map +1 -0
- package/dist/templates/index.d.ts +7 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +7 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/organon/claude-md.d.ts +7 -0
- package/dist/templates/organon/claude-md.d.ts.map +1 -0
- package/dist/templates/organon/claude-md.js +32 -0
- package/dist/templates/organon/claude-md.js.map +1 -0
- package/dist/templates/organon/ethos.d.ts +5 -0
- package/dist/templates/organon/ethos.d.ts.map +1 -0
- package/dist/templates/organon/ethos.js +69 -0
- package/dist/templates/organon/ethos.js.map +1 -0
- package/dist/templates/organon/index.d.ts +10 -0
- package/dist/templates/organon/index.d.ts.map +1 -0
- package/dist/templates/organon/index.js +10 -0
- package/dist/templates/organon/index.js.map +1 -0
- package/dist/templates/organon/observations-readme.d.ts +5 -0
- package/dist/templates/organon/observations-readme.d.ts.map +1 -0
- package/dist/templates/organon/observations-readme.js +25 -0
- package/dist/templates/organon/observations-readme.js.map +1 -0
- package/dist/templates/organon/philosophy.d.ts +5 -0
- package/dist/templates/organon/philosophy.d.ts.map +1 -0
- package/dist/templates/organon/philosophy.js +75 -0
- package/dist/templates/organon/philosophy.js.map +1 -0
- package/dist/templates/organon/protocols.d.ts +7 -0
- package/dist/templates/organon/protocols.d.ts.map +1 -0
- package/dist/templates/organon/protocols.js +197 -0
- package/dist/templates/organon/protocols.js.map +1 -0
- package/dist/templates/organon/readme.d.ts +5 -0
- package/dist/templates/organon/readme.d.ts.map +1 -0
- package/dist/templates/organon/readme.js +40 -0
- package/dist/templates/organon/readme.js.map +1 -0
- package/dist/templates/skills/domain-feature-design.d.ts +9 -0
- package/dist/templates/skills/domain-feature-design.d.ts.map +1 -0
- package/dist/templates/skills/domain-feature-design.js +123 -0
- package/dist/templates/skills/domain-feature-design.js.map +1 -0
- package/dist/templates/skills/index.d.ts +15 -0
- package/dist/templates/skills/index.d.ts.map +1 -0
- package/dist/templates/skills/index.js +35 -0
- package/dist/templates/skills/index.js.map +1 -0
- package/dist/templates/skills/organon-file-creation.d.ts +9 -0
- package/dist/templates/skills/organon-file-creation.d.ts.map +1 -0
- package/dist/templates/skills/organon-file-creation.js +138 -0
- package/dist/templates/skills/organon-file-creation.js.map +1 -0
- package/dist/templates/skills/quality-review.d.ts +9 -0
- package/dist/templates/skills/quality-review.d.ts.map +1 -0
- package/dist/templates/skills/quality-review.js +127 -0
- package/dist/templates/skills/quality-review.js.map +1 -0
- package/dist/templates/skills/session-compounding.d.ts +9 -0
- package/dist/templates/skills/session-compounding.d.ts.map +1 -0
- package/dist/templates/skills/session-compounding.js +118 -0
- package/dist/templates/skills/session-compounding.js.map +1 -0
- package/dist/templates/skills/verify-and-health.d.ts +9 -0
- package/dist/templates/skills/verify-and-health.d.ts.map +1 -0
- package/dist/templates/skills/verify-and-health.js +99 -0
- package/dist/templates/skills/verify-and-health.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH,wBAAsB,WAAW,CAC/B,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Server — Organon methodology tools exposed via Model Context Protocol.
|
|
3
|
+
*
|
|
4
|
+
* Runs on stdio transport. Started via `organon mcp` command.
|
|
5
|
+
*/
|
|
6
|
+
import { createRequire } from 'module';
|
|
7
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
8
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
9
|
+
import { resolveConfig } from '../core/config.js';
|
|
10
|
+
import { NodeFileSystem } from '../core/node-fs.js';
|
|
11
|
+
import { registerTools } from './tools.js';
|
|
12
|
+
import { registerResources } from './resources.js';
|
|
13
|
+
import { registerPrompts } from './prompts.js';
|
|
14
|
+
const require = createRequire(import.meta.url);
|
|
15
|
+
const { version } = require('../../package.json');
|
|
16
|
+
export async function startServer(projectRoot, configPath) {
|
|
17
|
+
const fs = new NodeFileSystem();
|
|
18
|
+
const config = await resolveConfig(projectRoot, fs, configPath);
|
|
19
|
+
const server = new McpServer({
|
|
20
|
+
name: 'organon',
|
|
21
|
+
version,
|
|
22
|
+
});
|
|
23
|
+
// Register all MCP capabilities
|
|
24
|
+
registerTools(server, projectRoot, config, fs);
|
|
25
|
+
registerResources(server, projectRoot, config, fs);
|
|
26
|
+
registerPrompts(server);
|
|
27
|
+
// Connect via stdio
|
|
28
|
+
const transport = new StdioServerTransport();
|
|
29
|
+
await server.connect(transport);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,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sdk/server/mcp.js';
|
|
5
|
+
import type { FileSystem, OrganonConfig } from '../core/types.js';
|
|
6
|
+
export declare function registerTools(server: McpServer, projectRoot: string, config: OrganonConfig, fs: FileSystem): void;
|
|
7
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAUlE,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,UAAU,GACb,IAAI,CAmKN"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool registrations — 8 tools wrapping core functions.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { validateFrontmatter } from '../core/validate-frontmatter.js';
|
|
6
|
+
import { generateFrontmatter, serializeFrontmatter } from '../core/generate-frontmatter.js';
|
|
7
|
+
import { query } from '../core/query.js';
|
|
8
|
+
import { health } from '../core/health.js';
|
|
9
|
+
import { find } from '../core/find.js';
|
|
10
|
+
import { verifyTriplets } from '../core/verify-triplets.js';
|
|
11
|
+
import { suggestTools } from '../core/suggest-tools.js';
|
|
12
|
+
import { verify } from '../core/verify.js';
|
|
13
|
+
export function registerTools(server, projectRoot, config, fs) {
|
|
14
|
+
// 1. Validate frontmatter
|
|
15
|
+
server.tool('organon_validate_frontmatter', 'Validate organon YAML frontmatter (4-stage: schema, references, truthfulness, consistency)', {
|
|
16
|
+
files: z.array(z.string()).optional().describe('Specific files to validate (all if omitted)'),
|
|
17
|
+
stages: z.array(z.number().int().min(1).max(4)).optional().describe('Stages: 1=schema, 2=refs, 3=truth, 4=consistency'),
|
|
18
|
+
}, async (args) => {
|
|
19
|
+
const result = await validateFrontmatter({
|
|
20
|
+
projectRoot,
|
|
21
|
+
config,
|
|
22
|
+
fs,
|
|
23
|
+
files: args.files,
|
|
24
|
+
stages: args.stages,
|
|
25
|
+
});
|
|
26
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
27
|
+
});
|
|
28
|
+
// 2. Generate frontmatter
|
|
29
|
+
server.tool('organon_generate_frontmatter', 'Auto-generate YAML frontmatter for an organon file by analyzing its content', {
|
|
30
|
+
file: z.string().describe('File path (project-relative)'),
|
|
31
|
+
type: z.enum(['navigation', 'constraints', 'rationale', 'procedures', 'mapping']).optional(),
|
|
32
|
+
scope: z.enum(['product', 'domain', 'feature', 'component', 'meta', 'methodology']).optional(),
|
|
33
|
+
}, async (args) => {
|
|
34
|
+
const result = await generateFrontmatter({
|
|
35
|
+
projectRoot,
|
|
36
|
+
config,
|
|
37
|
+
fs,
|
|
38
|
+
file: args.file,
|
|
39
|
+
type: args.type,
|
|
40
|
+
scope: args.scope,
|
|
41
|
+
});
|
|
42
|
+
const yaml = serializeFrontmatter(result.generated);
|
|
43
|
+
return {
|
|
44
|
+
content: [
|
|
45
|
+
{ type: 'text', text: `Generated frontmatter for ${args.file}:\n\n${yaml}` },
|
|
46
|
+
{ type: 'text', text: JSON.stringify(result, null, 2) },
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
// 3. Query
|
|
51
|
+
server.tool('organon_query', 'Query organon files by metadata (scope, type, priority, task, budget, name)', {
|
|
52
|
+
scope: z.enum(['product', 'domain', 'feature', 'component', 'meta', 'methodology']).optional(),
|
|
53
|
+
type: z.enum(['navigation', 'constraints', 'rationale', 'procedures', 'mapping']).optional(),
|
|
54
|
+
priority: z.enum(['high', 'medium', 'low']).optional(),
|
|
55
|
+
task: z.string().optional().describe('Filter by required_for task'),
|
|
56
|
+
budget: z.number().optional().describe('Maximum total token budget'),
|
|
57
|
+
name: z.string().optional().describe('Filter by name (substring)'),
|
|
58
|
+
related: z.string().optional().describe('Filter by related domain or feature'),
|
|
59
|
+
verbose: z.boolean().optional().describe('Include full file content'),
|
|
60
|
+
}, async (args) => {
|
|
61
|
+
const result = await query({
|
|
62
|
+
projectRoot,
|
|
63
|
+
config,
|
|
64
|
+
fs,
|
|
65
|
+
scope: args.scope,
|
|
66
|
+
type: args.type,
|
|
67
|
+
priority: args.priority,
|
|
68
|
+
task: args.task,
|
|
69
|
+
budget: args.budget,
|
|
70
|
+
namePattern: args.name,
|
|
71
|
+
relatedDomain: args.related,
|
|
72
|
+
relatedFeature: args.related,
|
|
73
|
+
verbose: args.verbose,
|
|
74
|
+
});
|
|
75
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
76
|
+
});
|
|
77
|
+
// 4. Health
|
|
78
|
+
server.tool('organon_health', 'Show organon health dashboard (coverage, validation, tokens, freshness, score)', {
|
|
79
|
+
fixSuggestions: z.boolean().optional().describe('Include fix suggestions'),
|
|
80
|
+
}, async (args) => {
|
|
81
|
+
const result = await health({
|
|
82
|
+
projectRoot,
|
|
83
|
+
config,
|
|
84
|
+
fs,
|
|
85
|
+
fixSuggestions: args.fixSuggestions,
|
|
86
|
+
});
|
|
87
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
88
|
+
});
|
|
89
|
+
// 5. Find
|
|
90
|
+
server.tool('organon_find', 'Cross-domain discovery — find organons by file path, scope, type, or name', {
|
|
91
|
+
file: z.string().optional().describe('Find organons governing this file'),
|
|
92
|
+
scope: z.enum(['product', 'domain', 'feature', 'component', 'meta', 'methodology']).optional(),
|
|
93
|
+
type: z.enum(['navigation', 'constraints', 'rationale', 'procedures', 'mapping']).optional(),
|
|
94
|
+
name: z.string().optional().describe('Search by name (substring)'),
|
|
95
|
+
}, async (args) => {
|
|
96
|
+
const result = await find({
|
|
97
|
+
projectRoot,
|
|
98
|
+
config,
|
|
99
|
+
fs,
|
|
100
|
+
file: args.file,
|
|
101
|
+
scope: args.scope,
|
|
102
|
+
type: args.type,
|
|
103
|
+
name: args.name,
|
|
104
|
+
});
|
|
105
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
106
|
+
});
|
|
107
|
+
// 6. Verify triplets
|
|
108
|
+
server.tool('organon_verify_triplets', 'Verify protocol-workflow-tool binding integrity (3-layer architecture)', {}, async () => {
|
|
109
|
+
const result = await verifyTriplets({ projectRoot, config, fs });
|
|
110
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
111
|
+
});
|
|
112
|
+
// 7. Suggest tools
|
|
113
|
+
server.tool('organon_suggest_tools', 'Analyze protocols and suggest automation tier upgrades', {}, async () => {
|
|
114
|
+
const result = await suggestTools({ projectRoot, config, fs });
|
|
115
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
116
|
+
});
|
|
117
|
+
// 8. Verify (orchestrator)
|
|
118
|
+
server.tool('organon_verify', 'Run verification gates (frontmatter, triplets, freshness — or custom subset)', {
|
|
119
|
+
gates: z.array(z.string()).optional().describe('Specific gates to run (all if omitted)'),
|
|
120
|
+
}, async (args) => {
|
|
121
|
+
const result = await verify({
|
|
122
|
+
projectRoot,
|
|
123
|
+
config,
|
|
124
|
+
fs,
|
|
125
|
+
gates: args.gates,
|
|
126
|
+
});
|
|
127
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,mBAAm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,EAChB,8EAA8E,EAC9E;QACE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;KACzF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC;YAC1B,WAAW;YACX,MAAM;YACN,EAAE;YACF,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACzF,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* organon.config.json template for organon init.
|
|
3
|
+
*/
|
|
4
|
+
export declare const CONFIG_TEMPLATE = "{\n \"methodology_version\": \"0.3.0\",\n \"organonPaths\": [\"organon\", \".\"],\n \"organonGlobs\": [\n \"**/ETHOS.md\",\n \"**/PHILOSOPHY.md\",\n \"**/PROTOCOL.md\",\n \"**/PROTOCOLS.md\",\n \"**/README.md\",\n \"**/components.md\"\n ],\n \"ignorePatterns\": [\n \"**/node_modules/**\",\n \"**/dist/**\",\n \"**/.git/**\",\n \"**/coverage/**\"\n ],\n \"workflowPaths\": {\n \"claudeCode\": \".claude/skills\",\n \"cursor\": \".cursor/rules\",\n \"generic\": \"organon/workflows\"\n },\n \"freshnessThresholdHours\": 720\n}\n";
|
|
5
|
+
export declare const METHODOLOGY_VERSION = "0.3.0";
|
|
6
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/templates/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,eAAe,okBAwB3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAAU,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* organon.config.json template for organon init.
|
|
3
|
+
*/
|
|
4
|
+
export const CONFIG_TEMPLATE = `{
|
|
5
|
+
"methodology_version": "0.3.0",
|
|
6
|
+
"organonPaths": ["organon", "."],
|
|
7
|
+
"organonGlobs": [
|
|
8
|
+
"**/ETHOS.md",
|
|
9
|
+
"**/PHILOSOPHY.md",
|
|
10
|
+
"**/PROTOCOL.md",
|
|
11
|
+
"**/PROTOCOLS.md",
|
|
12
|
+
"**/README.md",
|
|
13
|
+
"**/components.md"
|
|
14
|
+
],
|
|
15
|
+
"ignorePatterns": [
|
|
16
|
+
"**/node_modules/**",
|
|
17
|
+
"**/dist/**",
|
|
18
|
+
"**/.git/**",
|
|
19
|
+
"**/coverage/**"
|
|
20
|
+
],
|
|
21
|
+
"workflowPaths": {
|
|
22
|
+
"claudeCode": ".claude/skills",
|
|
23
|
+
"cursor": ".cursor/rules",
|
|
24
|
+
"generic": "organon/workflows"
|
|
25
|
+
},
|
|
26
|
+
"freshnessThresholdHours": 720
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
export const METHODOLOGY_VERSION = '0.3.0';
|
|
30
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/templates/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwB9B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All templates — entry point for init and upgrade commands.
|
|
3
|
+
*/
|
|
4
|
+
export { getSkillTemplates } from './skills/index.js';
|
|
5
|
+
export { ETHOS_TEMPLATE, PHILOSOPHY_TEMPLATE, README_TEMPLATE, PROTOCOLS_TEMPLATE, CLAUDE_MD_TEMPLATE, OBSERVATIONS_README_TEMPLATE, } from './organon/index.js';
|
|
6
|
+
export { CONFIG_TEMPLATE, METHODOLOGY_VERSION } from './config.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All templates — entry point for init and upgrade commands.
|
|
3
|
+
*/
|
|
4
|
+
export { getSkillTemplates } from './skills/index.js';
|
|
5
|
+
export { ETHOS_TEMPLATE, PHILOSOPHY_TEMPLATE, README_TEMPLATE, PROTOCOLS_TEMPLATE, CLAUDE_MD_TEMPLATE, OBSERVATIONS_README_TEMPLATE, } from './organon/index.js';
|
|
6
|
+
export { CONFIG_TEMPLATE, METHODOLOGY_VERSION } from './config.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-md.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/claude-md.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,QAyBnB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLAUDE.md scaffold template for organon init.
|
|
3
|
+
*
|
|
4
|
+
* This is the standard Claude Code project instructions file.
|
|
5
|
+
*/
|
|
6
|
+
export const CLAUDE_MD_TEMPLATE = [
|
|
7
|
+
'# Project Instructions',
|
|
8
|
+
'',
|
|
9
|
+
'> Agent guidance for this project. Loaded automatically by Claude Code.',
|
|
10
|
+
'',
|
|
11
|
+
'---',
|
|
12
|
+
'',
|
|
13
|
+
'## Quick Reference',
|
|
14
|
+
'',
|
|
15
|
+
'- Read `organon/ETHOS.md` before working in this codebase',
|
|
16
|
+
'- Run `organon verify` before committing changes',
|
|
17
|
+
'- Run `organon health` to check project integrity',
|
|
18
|
+
'',
|
|
19
|
+
'---',
|
|
20
|
+
'',
|
|
21
|
+
'## Decision Heuristics',
|
|
22
|
+
'',
|
|
23
|
+
'| Situation | Action |',
|
|
24
|
+
'|-----------|--------|',
|
|
25
|
+
'| Starting a work session | Run `organon verify` for baseline check |',
|
|
26
|
+
'| Before committing | Run `organon verify` to ensure nothing is broken |',
|
|
27
|
+
'| Adding a new domain | Use `/domain-feature-design` skill |',
|
|
28
|
+
'| Creating organon files | Use `/organon-file-creation` skill |',
|
|
29
|
+
'| End of work session | Use `/session-compounding` skill |',
|
|
30
|
+
'',
|
|
31
|
+
].join('\n');
|
|
32
|
+
//# sourceMappingURL=claude-md.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../../../src/templates/organon/claude-md.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,wBAAwB;IACxB,EAAE;IACF,yEAAyE;IACzE,EAAE;IACF,KAAK;IACL,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,2DAA2D;IAC3D,kDAAkD;IAClD,mDAAmD;IACnD,EAAE;IACF,KAAK;IACL,EAAE;IACF,wBAAwB;IACxB,EAAE;IACF,wBAAwB;IACxB,wBAAwB;IACxB,uEAAuE;IACvE,0EAA0E;IAC1E,8DAA8D;IAC9D,iEAAiE;IACjE,4DAA4D;IAC5D,EAAE;CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ETHOS.md scaffold template for organon init.
|
|
3
|
+
*/
|
|
4
|
+
export declare const ETHOS_TEMPLATE = "---\ntype: constraints\nscope: product\nname: my-project\nversion: \"1.0\"\nsummary: Behavioral constraints for this project \u2014 edit this to define your product's identity and invariants\ntoken_estimate: 850\ninvariants_count: 3\nprinciples_count: 3\nheuristics_count: 3\ninherits_from: []\nload_priority: high\naudience: [llm, human]\n---\n\n# Project Ethos\n\n> Behavioral constraints for agents working on this project. Edit this file to define your product's identity and rules.\n\n---\n\n## Identity\n\n### What This Project IS\n\n- [Describe what your project does \u2014 be specific]\n- [What problem does it solve?]\n- [What technology does it use?]\n\n### What This Project IS NOT\n\n- [What does it explicitly NOT do?]\n- [What is out of scope?]\n- [What should developers NOT build here?]\n\n---\n\n## Invariants\n\n1. **[Invariant name].** [Describe a hard constraint that must always hold. What breaks if this is violated?]\n\n2. **[Invariant name].** [Another constraint. Each invariant should be testable and enforceable.]\n\n3. **[Invariant name].** [A third constraint. Enforced by: specify how (tests, gates, reviews).]\n\n---\n\n## Principles (Prioritized)\n\n1. **[Priority 1] over [alternative].** [One-line explanation. This wins when principles conflict.]\n\n2. **[Priority 2] over [alternative].** [Second priority. Yields to principle 1 in conflicts.]\n\n3. **[Priority 3] over [alternative].** [Third priority.]\n\n---\n\n## Decision Heuristics\n\n| Situation | Action |\n|-----------|--------|\n| [Common decision 1] | [What to do] |\n| [Common decision 2] | [What to do] |\n| [Common decision 3] | [What to do] |\n";
|
|
5
|
+
//# sourceMappingURL=ethos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ethos.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/ethos.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,cAAc,mnDAgE1B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ETHOS.md scaffold template for organon init.
|
|
3
|
+
*/
|
|
4
|
+
export const ETHOS_TEMPLATE = `---
|
|
5
|
+
type: constraints
|
|
6
|
+
scope: product
|
|
7
|
+
name: my-project
|
|
8
|
+
version: "1.0"
|
|
9
|
+
summary: Behavioral constraints for this project — edit this to define your product's identity and invariants
|
|
10
|
+
token_estimate: 850
|
|
11
|
+
invariants_count: 3
|
|
12
|
+
principles_count: 3
|
|
13
|
+
heuristics_count: 3
|
|
14
|
+
inherits_from: []
|
|
15
|
+
load_priority: high
|
|
16
|
+
audience: [llm, human]
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Project Ethos
|
|
20
|
+
|
|
21
|
+
> Behavioral constraints for agents working on this project. Edit this file to define your product's identity and rules.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Identity
|
|
26
|
+
|
|
27
|
+
### What This Project IS
|
|
28
|
+
|
|
29
|
+
- [Describe what your project does — be specific]
|
|
30
|
+
- [What problem does it solve?]
|
|
31
|
+
- [What technology does it use?]
|
|
32
|
+
|
|
33
|
+
### What This Project IS NOT
|
|
34
|
+
|
|
35
|
+
- [What does it explicitly NOT do?]
|
|
36
|
+
- [What is out of scope?]
|
|
37
|
+
- [What should developers NOT build here?]
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Invariants
|
|
42
|
+
|
|
43
|
+
1. **[Invariant name].** [Describe a hard constraint that must always hold. What breaks if this is violated?]
|
|
44
|
+
|
|
45
|
+
2. **[Invariant name].** [Another constraint. Each invariant should be testable and enforceable.]
|
|
46
|
+
|
|
47
|
+
3. **[Invariant name].** [A third constraint. Enforced by: specify how (tests, gates, reviews).]
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Principles (Prioritized)
|
|
52
|
+
|
|
53
|
+
1. **[Priority 1] over [alternative].** [One-line explanation. This wins when principles conflict.]
|
|
54
|
+
|
|
55
|
+
2. **[Priority 2] over [alternative].** [Second priority. Yields to principle 1 in conflicts.]
|
|
56
|
+
|
|
57
|
+
3. **[Priority 3] over [alternative].** [Third priority.]
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Decision Heuristics
|
|
62
|
+
|
|
63
|
+
| Situation | Action |
|
|
64
|
+
|-----------|--------|
|
|
65
|
+
| [Common decision 1] | [What to do] |
|
|
66
|
+
| [Common decision 2] | [What to do] |
|
|
67
|
+
| [Common decision 3] | [What to do] |
|
|
68
|
+
`;
|
|
69
|
+
//# sourceMappingURL=ethos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ethos.js","sourceRoot":"","sources":["../../../src/templates/organon/ethos.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgE7B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Organon scaffold templates index.
|
|
3
|
+
*/
|
|
4
|
+
export { ETHOS_TEMPLATE } from './ethos.js';
|
|
5
|
+
export { PHILOSOPHY_TEMPLATE } from './philosophy.js';
|
|
6
|
+
export { README_TEMPLATE } from './readme.js';
|
|
7
|
+
export { PROTOCOLS_TEMPLATE } from './protocols.js';
|
|
8
|
+
export { CLAUDE_MD_TEMPLATE } from './claude-md.js';
|
|
9
|
+
export { OBSERVATIONS_README_TEMPLATE } from './observations-readme.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Organon scaffold templates index.
|
|
3
|
+
*/
|
|
4
|
+
export { ETHOS_TEMPLATE } from './ethos.js';
|
|
5
|
+
export { PHILOSOPHY_TEMPLATE } from './philosophy.js';
|
|
6
|
+
export { README_TEMPLATE } from './readme.js';
|
|
7
|
+
export { PROTOCOLS_TEMPLATE } from './protocols.js';
|
|
8
|
+
export { CLAUDE_MD_TEMPLATE } from './claude-md.js';
|
|
9
|
+
export { OBSERVATIONS_README_TEMPLATE } from './observations-readme.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/organon/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observations-readme.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/observations-readme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,4BAA4B,QAoB7B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* organon/observations/README.md scaffold for organon init.
|
|
3
|
+
*/
|
|
4
|
+
export const OBSERVATIONS_README_TEMPLATE = [
|
|
5
|
+
'---',
|
|
6
|
+
'type: navigation',
|
|
7
|
+
'scope: product',
|
|
8
|
+
'name: observations',
|
|
9
|
+
'version: "1.0"',
|
|
10
|
+
'summary: Index of empirical observations from work sessions',
|
|
11
|
+
'token_estimate: 50',
|
|
12
|
+
'provides: [observation-index]',
|
|
13
|
+
'audience: [llm, human]',
|
|
14
|
+
'---',
|
|
15
|
+
'',
|
|
16
|
+
'# Observations',
|
|
17
|
+
'',
|
|
18
|
+
'> Empirical observations recorded during work sessions. Use the `/session-compounding` skill to add entries.',
|
|
19
|
+
'',
|
|
20
|
+
'## Files',
|
|
21
|
+
'',
|
|
22
|
+
'(No observations recorded yet)',
|
|
23
|
+
'',
|
|
24
|
+
].join('\n');
|
|
25
|
+
//# sourceMappingURL=observations-readme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observations-readme.js","sourceRoot":"","sources":["../../../src/templates/organon/observations-readme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,KAAK;IACL,kBAAkB;IAClB,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,6DAA6D;IAC7D,oBAAoB;IACpB,+BAA+B;IAC/B,wBAAwB;IACxB,KAAK;IACL,EAAE;IACF,gBAAgB;IAChB,EAAE;IACF,8GAA8G;IAC9G,EAAE;IACF,UAAU;IACV,EAAE;IACF,gCAAgC;IAChC,EAAE;CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PHILOSOPHY.md scaffold template for organon init.
|
|
3
|
+
*/
|
|
4
|
+
export declare const PHILOSOPHY_TEMPLATE = "---\ntype: rationale\nscope: product\nname: my-project\nversion: \"1.0\"\nsummary: Design rationale for this project \u2014 edit this to explain WHY your project is designed the way it is\ntoken_estimate: 400\ndecision_count: 3\ninherits_from: []\nload_priority: medium\naudience: [llm, human]\n---\n\n# Project Philosophy\n\n> Explains WHY this project is designed the way it is. Constraints go in ETHOS.md; reasoning goes here.\n\n---\n\n## The Problem\n\n[Describe the problem your project solves. Why does it exist? What pain point does it address?]\n\n---\n\n## The Bet\n\n**Bet:** [State the core assumption your design rests on. This should be falsifiable.]\n\n**Why this works:**\n- [Evidence point 1]\n- [Evidence point 2]\n\n---\n\n## Design Decisions\n\n### 1. [Decision Name]\n\n**Choice:** [What you decided]\n\n**Rationale:** [Why you chose this]\n\n**Trade-off:** [What you gave up]\n\n### 2. [Decision Name]\n\n**Choice:** [What you decided]\n\n**Rationale:** [Why you chose this]\n\n**Trade-off:** [What you gave up]\n\n### 3. [Decision Name]\n\n**Choice:** [What you decided]\n\n**Rationale:** [Why you chose this]\n\n**Trade-off:** [What you gave up]\n\n---\n\n## Trade-offs\n\n| Decision | Benefit | Cost |\n|----------|---------|------|\n| [Choice 1] | [What you gain] | [What you give up] |\n| [Choice 2] | [What you gain] | [What you give up] |\n| [Choice 3] | [What you gain] | [What you give up] |\n";
|
|
5
|
+
//# sourceMappingURL=philosophy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"philosophy.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/philosophy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,mBAAmB,q5CAsE/B,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PHILOSOPHY.md scaffold template for organon init.
|
|
3
|
+
*/
|
|
4
|
+
export const PHILOSOPHY_TEMPLATE = `---
|
|
5
|
+
type: rationale
|
|
6
|
+
scope: product
|
|
7
|
+
name: my-project
|
|
8
|
+
version: "1.0"
|
|
9
|
+
summary: Design rationale for this project — edit this to explain WHY your project is designed the way it is
|
|
10
|
+
token_estimate: 400
|
|
11
|
+
decision_count: 3
|
|
12
|
+
inherits_from: []
|
|
13
|
+
load_priority: medium
|
|
14
|
+
audience: [llm, human]
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Project Philosophy
|
|
18
|
+
|
|
19
|
+
> Explains WHY this project is designed the way it is. Constraints go in ETHOS.md; reasoning goes here.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## The Problem
|
|
24
|
+
|
|
25
|
+
[Describe the problem your project solves. Why does it exist? What pain point does it address?]
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## The Bet
|
|
30
|
+
|
|
31
|
+
**Bet:** [State the core assumption your design rests on. This should be falsifiable.]
|
|
32
|
+
|
|
33
|
+
**Why this works:**
|
|
34
|
+
- [Evidence point 1]
|
|
35
|
+
- [Evidence point 2]
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Design Decisions
|
|
40
|
+
|
|
41
|
+
### 1. [Decision Name]
|
|
42
|
+
|
|
43
|
+
**Choice:** [What you decided]
|
|
44
|
+
|
|
45
|
+
**Rationale:** [Why you chose this]
|
|
46
|
+
|
|
47
|
+
**Trade-off:** [What you gave up]
|
|
48
|
+
|
|
49
|
+
### 2. [Decision Name]
|
|
50
|
+
|
|
51
|
+
**Choice:** [What you decided]
|
|
52
|
+
|
|
53
|
+
**Rationale:** [Why you chose this]
|
|
54
|
+
|
|
55
|
+
**Trade-off:** [What you gave up]
|
|
56
|
+
|
|
57
|
+
### 3. [Decision Name]
|
|
58
|
+
|
|
59
|
+
**Choice:** [What you decided]
|
|
60
|
+
|
|
61
|
+
**Rationale:** [Why you chose this]
|
|
62
|
+
|
|
63
|
+
**Trade-off:** [What you gave up]
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Trade-offs
|
|
68
|
+
|
|
69
|
+
| Decision | Benefit | Cost |
|
|
70
|
+
|----------|---------|------|
|
|
71
|
+
| [Choice 1] | [What you gain] | [What you give up] |
|
|
72
|
+
| [Choice 2] | [What you gain] | [What you give up] |
|
|
73
|
+
| [Choice 3] | [What you gain] | [What you give up] |
|
|
74
|
+
`;
|
|
75
|
+
//# sourceMappingURL=philosophy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"philosophy.js","sourceRoot":"","sources":["../../../src/templates/organon/philosophy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsElC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocols.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/protocols.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,QA8LnB,CAAC"}
|