maurao-method 0.0.0-stage → 0.1.1

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 (80) hide show
  1. package/.clinerules/maurao-method.md +6 -0
  2. package/.cursor/rules/maurao-method.mdc +7 -0
  3. package/.github/copilot-instructions.md +6 -0
  4. package/.github/workflows/ci.yml +39 -0
  5. package/.github/workflows/publish.yml +34 -0
  6. package/.github/workflows/release-on-main.yml +86 -0
  7. package/.maurao/README.md +13 -0
  8. package/.maurao/config.json +17 -0
  9. package/AGENTS.md +30 -0
  10. package/CLAUDE.md +6 -0
  11. package/GEMINI.md +6 -0
  12. package/README.md +92 -2
  13. package/bin/maurao.mjs +218 -0
  14. package/commands/debug.md +4 -0
  15. package/commands/discover.md +4 -0
  16. package/commands/map.md +4 -0
  17. package/commands/plan.md +4 -0
  18. package/commands/pr.md +4 -0
  19. package/commands/review.md +4 -0
  20. package/commands/specify.md +4 -0
  21. package/commands/spike.md +4 -0
  22. package/commands/verify.md +4 -0
  23. package/docs/artifact-contract.md +22 -0
  24. package/docs/commands.md +32 -0
  25. package/docs/method-overview.md +32 -0
  26. package/docs/npm-release.md +66 -0
  27. package/docs/portable-adapters.md +26 -0
  28. package/docs/project-modes.md +33 -0
  29. package/docs/specification-standard.md +25 -0
  30. package/docs/tool-support.md +24 -0
  31. package/docs/workflow.md +45 -0
  32. package/package.json +42 -4
  33. package/skills/core/architecture/SKILL.md +16 -0
  34. package/skills/core/brownfield-analysis/SKILL.md +20 -0
  35. package/skills/core/debugging/SKILL.md +32 -0
  36. package/skills/core/planning/SKILL.md +18 -0
  37. package/skills/core/product-discovery/SKILL.md +20 -0
  38. package/skills/core/project-discovery/SKILL.md +32 -0
  39. package/skills/core/requirements/SKILL.md +13 -0
  40. package/skills/core/specification/SKILL.md +41 -0
  41. package/skills/core/spike/SKILL.md +30 -0
  42. package/skills/core/technology-discovery/SKILL.md +43 -0
  43. package/skills/practices/code-review/SKILL.md +21 -0
  44. package/skills/practices/data-migration/SKILL.md +14 -0
  45. package/skills/practices/observability/SKILL.md +28 -0
  46. package/skills/practices/observability/checklist.md +11 -0
  47. package/skills/practices/observability/references/dotnet.md +7 -0
  48. package/skills/practices/observability/references/java.md +9 -0
  49. package/skills/practices/observability/references/node.md +7 -0
  50. package/skills/practices/observability/references/python.md +7 -0
  51. package/skills/practices/observability/templates/logging-plan.md +16 -0
  52. package/skills/practices/observability/templates/metrics-plan.md +6 -0
  53. package/skills/practices/observability/templates/tracing-plan.md +14 -0
  54. package/skills/practices/pull-request/SKILL.md +17 -0
  55. package/skills/practices/release-readiness/SKILL.md +20 -0
  56. package/skills/practices/security/SKILL.md +11 -0
  57. package/skills/practices/testing/SKILL.md +37 -0
  58. package/skills/practices/verification/SKILL.md +15 -0
  59. package/skills/workflows/brownfield-change/SKILL.md +26 -0
  60. package/skills/workflows/bug-fix/SKILL.md +19 -0
  61. package/skills/workflows/feature-development/SKILL.md +35 -0
  62. package/skills/workflows/greenfield-product/SKILL.md +28 -0
  63. package/technology-packs/dotnet/README.md +6 -0
  64. package/technology-packs/java/README.md +34 -0
  65. package/technology-packs/node/README.md +6 -0
  66. package/technology-packs/python/README.md +6 -0
  67. package/templates/brownfield-map.md +38 -0
  68. package/templates/bug-fix.md +36 -0
  69. package/templates/change-proposal.md +40 -0
  70. package/templates/decision-record.md +33 -0
  71. package/templates/feature-spec.md +50 -0
  72. package/templates/implementation-plan.md +33 -0
  73. package/templates/product-brief.md +41 -0
  74. package/templates/pull-request.md +27 -0
  75. package/templates/spike-report.md +36 -0
  76. package/templates/system-context.md +36 -0
  77. package/templates/technology-inventory.md +38 -0
  78. package/templates/test-plan.md +23 -0
  79. package/templates/threat-model.md +31 -0
  80. package/templates/verification-report.md +26 -0
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: Apply the Maurao Method to software engineering work.
3
+ ---
4
+
5
+ Read `AGENTS.md` before working. Use the smallest applicable skill from `skills/` and the relevant technology pack from `technology-packs/`. Keep requirements, implementation, and verification evidence explicit.
6
+
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Apply the Maurao Method to software engineering work in this repository.
3
+ alwaysApply: true
4
+ ---
5
+
6
+ Read `AGENTS.md` before working. Use the smallest applicable skill from `skills/`, and use the relevant technology pack from `technology-packs/`. Keep requirements, implementation, and verification evidence explicit. Do not claim validation that was not executed.
7
+
@@ -0,0 +1,6 @@
1
+ # Maurao Method instructions
2
+
3
+ Follow the repository contract in [`AGENTS.md`](../AGENTS.md).
4
+
5
+ Before changing code, load the relevant skill from `skills/` and the matching technology pack from `technology-packs/` when applicable.
6
+
@@ -0,0 +1,39 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ validate:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout
16
+ uses: actions/checkout@v6
17
+
18
+ - name: Setup Node.js
19
+ uses: actions/setup-node@v6
20
+ with:
21
+ node-version: 24
22
+ cache: npm
23
+
24
+ - name: Install dependencies
25
+ run: npm ci
26
+
27
+ - name: Validate package
28
+ run: npm run validate
29
+
30
+ - name: Run CLI tests
31
+ run: npm test
32
+
33
+ - name: Test CLI help and package listing
34
+ run: |
35
+ node bin/maurao.mjs help
36
+ node bin/maurao.mjs list
37
+
38
+ - name: Check package contents
39
+ run: npm pack --dry-run
@@ -0,0 +1,34 @@
1
+ name: Publish npm package
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ publish:
14
+ runs-on: ubuntu-latest
15
+ environment: npm
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v6
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v6
22
+ with:
23
+ node-version: 24
24
+ registry-url: https://registry.npmjs.org
25
+ package-manager-cache: false
26
+
27
+ - name: Install dependencies
28
+ run: npm ci
29
+
30
+ - name: Validate package
31
+ run: npm run validate
32
+
33
+ - name: Publish with npm trusted publishing
34
+ run: npm publish
@@ -0,0 +1,86 @@
1
+ name: Release on main
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - 'AGENTS.md'
8
+ - 'CLAUDE.md'
9
+ - 'GEMINI.md'
10
+ - 'README.md'
11
+ - '.clinerules/**'
12
+ - '.cursor/**'
13
+ - '.github/copilot-instructions.md'
14
+ - '.maurao/**'
15
+ - 'bin/**'
16
+ - 'commands/**'
17
+ - 'docs/**'
18
+ - 'skills/**'
19
+ - 'technology-packs/**'
20
+ - 'templates/**'
21
+ - 'package.json'
22
+ - 'package-lock.json'
23
+
24
+ permissions:
25
+ contents: write
26
+
27
+ concurrency:
28
+ group: release-on-main
29
+ cancel-in-progress: false
30
+
31
+ jobs:
32
+ release:
33
+ if: github.actor != 'github-actions[bot]'
34
+ runs-on: ubuntu-latest
35
+ environment: npm
36
+ steps:
37
+ - name: Checkout
38
+ uses: actions/checkout@v6
39
+ with:
40
+ fetch-depth: 0
41
+
42
+ - name: Setup Node.js
43
+ uses: actions/setup-node@v6
44
+ with:
45
+ node-version: 24
46
+ registry-url: https://registry.npmjs.org
47
+ package-manager-cache: false
48
+
49
+ - name: Install dependencies
50
+ run: npm ci
51
+
52
+ - name: Validate package
53
+ run: npm run validate
54
+
55
+ - name: Run tests
56
+ run: npm test
57
+
58
+ - name: Increment patch version
59
+ id: version
60
+ shell: bash
61
+ run: |
62
+ npm version patch --no-git-tag-version
63
+ VERSION="$(node -p "require('./package.json').version")"
64
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
65
+
66
+ - name: Publish package
67
+ env:
68
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
69
+ run: npm publish
70
+
71
+ - name: Create release commit and tag
72
+ env:
73
+ VERSION: ${{ steps.version.outputs.version }}
74
+ run: |
75
+ git config user.name "github-actions[bot]"
76
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
77
+ git add package.json package-lock.json
78
+ git commit -m "chore(release): v${VERSION}"
79
+ git tag "v${VERSION}"
80
+ git push origin HEAD:main --follow-tags
81
+
82
+ - name: Create GitHub Release
83
+ env:
84
+ GH_TOKEN: ${{ github.token }}
85
+ VERSION: ${{ steps.version.outputs.version }}
86
+ run: gh release create "v${VERSION}" --title "v${VERSION}" --generate-notes
@@ -0,0 +1,13 @@
1
+ # Maurao project artifacts
2
+
3
+ This directory stores the durable artifacts produced by the Maurao Method for the host project.
4
+
5
+ - `product-brief.md`: product problem, users, outcome, and smallest useful slice.
6
+ - `system-context.md`: current system, boundaries, dependencies, and invariants.
7
+ - `technology-inventory.md`: detected technology and confirmed commands.
8
+ - `specifications/`: approved change specifications.
9
+ - `decisions/`: architecture and product decisions.
10
+ - `plans/`: implementation plans.
11
+ - `reports/`: verification, spike, review, and release reports.
12
+
13
+ Artifacts are evidence and decision records. They should evolve with the product and must not claim checks that were not executed.
@@ -0,0 +1,17 @@
1
+ {
2
+ "method": "maurao-method",
3
+ "version": "0.1",
4
+ "projectMode": "auto",
5
+ "rigor": "adaptive",
6
+ "technologyDiscovery": "required",
7
+ "artifacts": {
8
+ "root": ".maurao",
9
+ "productBrief": ".maurao/product-brief.md",
10
+ "systemContext": ".maurao/system-context.md",
11
+ "technologyInventory": ".maurao/technology-inventory.md",
12
+ "specifications": ".maurao/specifications",
13
+ "decisions": ".maurao/decisions",
14
+ "plans": ".maurao/plans",
15
+ "reports": ".maurao/reports"
16
+ }
17
+ }
package/AGENTS.md ADDED
@@ -0,0 +1,30 @@
1
+ # Maurao Method
2
+
3
+ This repository defines a portable, specification-driven engineering method for AI coding agents.
4
+
5
+ ## Repository contract
6
+
7
+ - Read the relevant skill before executing a workflow.
8
+ - Start with `technology-discovery` when the project stack, runtime, or validation commands are unknown.
9
+ - Classify work as greenfield, brownfield, or hybrid before choosing a workflow.
10
+ - Select rigor L0–L3 from `docs/workflow.md` based on ambiguity, blast radius, and risk.
11
+ - Keep the core technology-agnostic; put stack-specific behavior in `technology-packs/`.
12
+ - Treat `templates/` as normative starting points, not mandatory ceremony for trivial changes.
13
+ - Use `.maurao/` as the durable artifact root when working in a host project; follow `docs/artifact-contract.md`.
14
+ - Every implementation must have an explicit verification outcome.
15
+ - Never claim a command, test, review, or deployment was performed unless it was actually performed.
16
+ - Preserve user changes and do not create commits unless explicitly requested.
17
+
18
+ ## Skill discovery
19
+
20
+ The canonical skills live under `skills/`. Use the smallest composition that covers the task:
21
+
22
+ - `skills/core/` — reasoning and lifecycle skills.
23
+ - `skills/practices/` — testing, observability, review, and delivery practices.
24
+ - `skills/workflows/` — end-to-end work modes.
25
+ - `technology-packs/` — Node.js, .NET, and Python guidance.
26
+ - `commands/` — tool-independent command entry points.
27
+ - `.maurao/` — host-project configuration and durable engineering artifacts.
28
+
29
+ Tool-specific entry points may point here, but must not duplicate the method.
30
+
package/CLAUDE.md ADDED
@@ -0,0 +1,6 @@
1
+ # Maurao Method
2
+
3
+ Read and follow the repository contract in [`AGENTS.md`](AGENTS.md).
4
+
5
+ Canonical skills are under `skills/`. Load only the skill relevant to the current task and its required references.
6
+
package/GEMINI.md ADDED
@@ -0,0 +1,6 @@
1
+ # Maurao Method
2
+
3
+ Read and follow the repository contract in [`AGENTS.md`](AGENTS.md).
4
+
5
+ Canonical skills are under `skills/`. Load only the skill relevant to the current task and its required references.
6
+
package/README.md CHANGED
@@ -1,3 +1,93 @@
1
- # Temporary Holding Version
1
+ # Maurao Method
2
+
3
+ ## Modular engineering for AI-assisted software development
4
+
5
+ Maurao Method is a technology-agnostic engineering method for building reliable software with AI agents.
6
+
7
+ It combines specification-driven development with disciplined implementation, testing, observability, debugging, review, and verifiable delivery evidence.
8
+
9
+ ## Principles
10
+
11
+ - Understand the problem before changing the code.
12
+ - Treat specifications and acceptance criteria as shared contracts.
13
+ - Prefer the smallest safe change that satisfies the contract.
14
+ - Make tests, observability, and review part of implementation—not afterthoughts.
15
+ - Report evidence separately from assumptions.
16
+ - Keep the core generic and move technology-specific knowledge into focused skills.
17
+
18
+ ## Repository structure
19
+
20
+ ```text
21
+ skills/
22
+ ├── core/ # Technology-agnostic engineering capabilities
23
+ ├── practices/ # Reusable engineering practices
24
+ ├── technology-packs/ # Node.js, .NET, Python, and other stacks
25
+ └── workflows/ # Composable end-to-end work modes
26
+ commands/ # Tool-independent command entry points
27
+ templates/ # Specifications, plans, tests, reviews, and reports
28
+ docs/ # Method documentation and design decisions
29
+ ```
30
+
31
+ ## Initial skills
32
+
33
+ - `core/specification`: define intent, behavior, constraints, and acceptance criteria.
34
+ - `core/debugging`: reproduce failures, test hypotheses, identify root cause, and prevent regression.
35
+ - `core/spike`: answer technical questions through bounded experiments and recorded evidence.
36
+ - `core/architecture`: make proportionate architecture decisions.
37
+ - `core/project-discovery`: establish a baseline for greenfield, brownfield, and hybrid projects.
38
+ - `core/technology-discovery`: detect the real stack and select applicable technology packs.
39
+ - `core/product-discovery`: frame new product problems and the smallest useful slice.
40
+ - `core/requirements`: structure functional and non-functional requirements.
41
+ - `core/planning`: create ordered, verifiable implementation tasks.
42
+ - `practices/testing`: design tests from behavior and preserve regression coverage.
43
+ - `practices/observability`: define useful logs, metrics, traces, and operational signals.
44
+ - `practices/code-review`: review correctness, risk, security, and maintainability.
45
+ - `practices/pull-request`: prepare focused, evidence-based pull requests.
46
+ - `practices/verification`: map acceptance criteria to executed evidence.
47
+ - `practices/security`: analyze security, privacy, abuse, and supply-chain risks.
48
+ - `practices/data-migration`: plan safe schema and data changes.
49
+ - `practices/release-readiness`: decide whether a change can be delivered safely.
50
+ - `workflows/feature-development`: compose the core loop for a production change.
51
+ - `workflows/bug-fix`: diagnose and fix defects with regression protection.
52
+ - `workflows/greenfield-product`: create a new product through a validated vertical slice.
53
+ - `workflows/brownfield-change`: safely change an existing product.
54
+
55
+ ## Portability
56
+
57
+ The method uses a canonical `AGENTS.md`, portable `SKILL.md` files, tool-independent commands, and thin adapters for Codex, Claude Code, Cursor, GitHub Copilot, Gemini CLI, and Cline. Run `scripts/install.ps1` from PowerShell to install the method into another project without overwriting existing files unless `-Force` is supplied.
58
+
59
+ The canonical structure is independent of a model provider, editor, CLI, or programming language. Technology packs provide focused guidance for Node.js, .NET, Python, and Java.
60
+
61
+ Validate the repository and installer with:
62
+
63
+ ```powershell
64
+ .\scripts\validate.ps1 -TestInstaller
65
+ ```
66
+
67
+ See [tool support](docs/tool-support.md) for the distinction between GPT as a model and Codex as the coding-agent environment.
68
+
69
+ ## npm CLI
70
+
71
+ When published, the recommended installation will be:
72
+
73
+ ```powershell
74
+ npm install -g maurao-method
75
+ maurao init . --tool all
76
+ ```
77
+
78
+ Available commands:
79
+
80
+ ```text
81
+ maurao init [directory] Install the method in a project
82
+ maurao validate Validate the packaged skills and required files
83
+ maurao list List commands and skills
84
+ maurao doctor [directory] Check whether a project is installed correctly
85
+ maurao inspect [directory] Detect technology evidence and write the inventory
86
+ ```
87
+
88
+ The npm CI/CD setup is documented in [docs/npm-release.md](docs/npm-release.md). Pull requests run validation automatically, and package changes merged into `main` create a patch release, npm publication, version tag, and GitHub Release.
89
+
90
+ ## Status
91
+
92
+ Early development. The method and skill contracts are expected to evolve before the first stable release.
2
93
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
package/bin/maurao.mjs ADDED
@@ -0,0 +1,218 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { existsSync, cpSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
4
+ import { dirname, join, resolve } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const packageRoot = resolve(fileURLToPath(new URL('..', import.meta.url)));
8
+ const commonEntries = [
9
+ 'AGENTS.md',
10
+ '.maurao',
11
+ 'commands',
12
+ 'docs',
13
+ 'skills',
14
+ 'technology-packs',
15
+ 'templates'
16
+ ];
17
+
18
+ const adapters = {
19
+ codex: ['AGENTS.md'],
20
+ claude: ['CLAUDE.md', '.claude-skills'],
21
+ cursor: ['.cursor'],
22
+ copilot: ['.github/copilot-instructions.md', '.agents-skills'],
23
+ gemini: ['GEMINI.md'],
24
+ cline: ['.clinerules']
25
+ };
26
+
27
+ function usage() {
28
+ console.log(`Maurao Method CLI
29
+
30
+ Usage:
31
+ maurao init [directory] [--tool all|codex|claude|cursor|copilot|gemini|cline] [--force]
32
+ maurao validate
33
+ maurao list
34
+ maurao doctor [directory]
35
+ maurao inspect [directory]
36
+ maurao help
37
+
38
+ Examples:
39
+ maurao init .
40
+ maurao init C:\\projects\\my-app --tool codex
41
+ maurao init . --tool all --force
42
+ `);
43
+ }
44
+
45
+ function parseOptions(args) {
46
+ const options = { force: false, tool: 'all', positional: [] };
47
+ for (let index = 0; index < args.length; index += 1) {
48
+ const value = args[index];
49
+ if (value === '--force') options.force = true;
50
+ else if (value === '--tool') options.tool = args[++index] ?? '';
51
+ else if (value === '--help' || value === '-h') options.help = true;
52
+ else options.positional.push(value);
53
+ }
54
+ return options;
55
+ }
56
+
57
+ function copyEntry(sourceRelative, targetRoot, force) {
58
+ const source = join(packageRoot, sourceRelative);
59
+ const destination = join(targetRoot, sourceRelative);
60
+ if (!existsSync(source)) throw new Error(`Package entry not found: ${sourceRelative}`);
61
+ if (existsSync(destination) && !force) {
62
+ console.log(`Skipped existing path: ${destination}`);
63
+ return;
64
+ }
65
+ mkdirSync(dirname(destination), { recursive: true });
66
+ cpSync(source, destination, { recursive: true, force });
67
+ console.log(`Installed: ${destination}`);
68
+ }
69
+
70
+ function copyAdapter(adapter, targetRoot, force) {
71
+ for (const entry of adapters[adapter]) {
72
+ if (entry === '.claude-skills') {
73
+ copyEntry('skills', targetRoot + '/.claude', force);
74
+ } else if (entry === '.agents-skills') {
75
+ copyEntry('skills', targetRoot + '/.agents', force);
76
+ } else {
77
+ copyEntry(entry, targetRoot, force);
78
+ }
79
+ }
80
+ }
81
+
82
+ function init(args) {
83
+ const options = parseOptions(args);
84
+ if (options.help) return usage();
85
+ const allowedTools = ['all', ...Object.keys(adapters)];
86
+ if (!allowedTools.includes(options.tool)) throw new Error(`Invalid tool. Use: ${allowedTools.join(', ')}`);
87
+ const targetRoot = resolve(options.positional[0] ?? '.');
88
+ mkdirSync(targetRoot, { recursive: true });
89
+ for (const entry of commonEntries) copyEntry(entry, targetRoot, options.force);
90
+ const selected = options.tool === 'all' ? Object.keys(adapters) : [options.tool];
91
+ for (const adapter of selected) copyAdapter(adapter, targetRoot, options.force);
92
+ console.log(`Maurao Method installed in ${targetRoot}`);
93
+ }
94
+
95
+ function list() {
96
+ const skills = [];
97
+ for (const category of readdirSync(join(packageRoot, 'skills'))) {
98
+ const categoryPath = join(packageRoot, 'skills', category);
99
+ if (!existsSync(categoryPath)) continue;
100
+ for (const skill of readdirSync(categoryPath)) {
101
+ if (existsSync(join(categoryPath, skill, 'SKILL.md'))) skills.push(`${category}/${skill}`);
102
+ }
103
+ }
104
+ console.log('Commands:');
105
+ for (const command of readdirSync(join(packageRoot, 'commands')).filter((entry) => entry.endsWith('.md'))) {
106
+ console.log(` maurao ${command.replace(/\.md$/, '')}`);
107
+ }
108
+ console.log('\nSkills:');
109
+ for (const skill of skills.sort()) console.log(` ${skill}`);
110
+ }
111
+
112
+ function validate() {
113
+ const skillsRoot = join(packageRoot, 'skills');
114
+ const skills = [];
115
+ for (const category of readdirSync(skillsRoot)) {
116
+ const categoryPath = join(skillsRoot, category);
117
+ for (const skill of readdirSync(categoryPath)) {
118
+ const file = join(categoryPath, skill, 'SKILL.md');
119
+ if (!existsSync(file)) continue;
120
+ const content = readFileSync(file, 'utf8');
121
+ if (!/^---\s*\nname: .+\ndescription: .+\n---/s.test(content)) {
122
+ throw new Error(`Invalid skill frontmatter: ${file}`);
123
+ }
124
+ skills.push(skill);
125
+ }
126
+ }
127
+ if (new Set(skills).size !== skills.length) throw new Error('Duplicate skill directory name detected');
128
+ for (const required of ['AGENTS.md', 'templates/feature-spec.md', 'technology-packs/java/README.md']) {
129
+ if (!existsSync(join(packageRoot, required))) throw new Error(`Missing required entry: ${required}`);
130
+ }
131
+ console.log(`Validation passed: ${skills.length} skills.`);
132
+ }
133
+
134
+ function doctor(args) {
135
+ const targetRoot = resolve(args[0] ?? '.');
136
+ const checks = ['AGENTS.md', '.maurao/config.json', 'skills', 'technology-packs', 'templates', 'commands'];
137
+ const missing = checks.filter((entry) => !existsSync(join(targetRoot, entry)));
138
+ if (missing.length > 0) {
139
+ console.error(`Maurao Method is not installed correctly in ${targetRoot}`);
140
+ for (const entry of missing) console.error(`Missing: ${entry}`);
141
+ process.exitCode = 1;
142
+ return;
143
+ }
144
+ console.log(`Maurao Method is installed in ${targetRoot}`);
145
+ }
146
+
147
+ const ignoredDirectories = new Set(['.git', '.maurao', 'node_modules', 'target', 'build', 'dist', '.venv', 'venv', '__pycache__']);
148
+ const evidence = [
149
+ ['package.json', 'Node.js', 'package manifest'],
150
+ ['tsconfig.json', 'TypeScript', 'TypeScript configuration'],
151
+ ['pom.xml', 'Java / Maven', 'Maven build descriptor'],
152
+ ['build.gradle', 'Java or Kotlin / Gradle', 'Gradle build descriptor'],
153
+ ['build.gradle.kts', 'Kotlin or Java / Gradle', 'Kotlin Gradle build descriptor'],
154
+ ['gradlew', 'Java or Kotlin / Gradle', 'Gradle wrapper'],
155
+ ['pyproject.toml', 'Python', 'Python project manifest'],
156
+ ['requirements.txt', 'Python', 'Python dependency file'],
157
+ ['go.mod', 'Go', 'Go module manifest'],
158
+ ['Cargo.toml', 'Rust', 'Cargo manifest'],
159
+ ['composer.json', 'PHP', 'Composer manifest'],
160
+ ['Gemfile', 'Ruby', 'Ruby dependency manifest'],
161
+ ['Package.swift', 'Swift', 'Swift package manifest']
162
+ ];
163
+
164
+ function walkFiles(root, depth = 0, result = []) {
165
+ if (depth > 3) return result;
166
+ for (const entry of readdirSync(root, { withFileTypes: true })) {
167
+ if (entry.isDirectory() && !ignoredDirectories.has(entry.name)) {
168
+ walkFiles(join(root, entry.name), depth + 1, result);
169
+ } else if (entry.isFile()) {
170
+ result.push(join(root, entry.name));
171
+ }
172
+ }
173
+ return result;
174
+ }
175
+
176
+ function inspect(args) {
177
+ const targetRoot = resolve(args[0] ?? '.');
178
+ if (!existsSync(targetRoot) || !statSync(targetRoot).isDirectory()) throw new Error(`Directory not found: ${targetRoot}`);
179
+ const files = walkFiles(targetRoot);
180
+ const findings = [];
181
+ for (const [fileName, technology, reason] of evidence) {
182
+ const matches = files.filter((file) => file.endsWith(`\\${fileName}`) || file.endsWith(`/${fileName}`));
183
+ if (matches.length > 0) findings.push({ technology, reason, files: matches.map((file) => file.slice(targetRoot.length + 1)) });
184
+ }
185
+ const lines = [
186
+ '# Technology Inventory',
187
+ '',
188
+ `- Project: ${targetRoot}`,
189
+ '- Mode: To be classified as greenfield, brownfield, or hybrid',
190
+ '',
191
+ '## Detected technologies',
192
+ '',
193
+ '| Technology | Evidence | Confidence |',
194
+ '|---|---|---|'
195
+ ];
196
+ if (findings.length === 0) lines.push('| No known technology detected | Inspect repository manually | Low |');
197
+ for (const finding of findings) lines.push(`| ${finding.technology} | ${finding.reason}: ${finding.files.join(', ')} | Medium |`);
198
+ lines.push('', '## Commands to confirm', '', '| Purpose | Command | Confirmed? |', '|---|---|---|', '| Install | | No |', '| Run | | No |', '| Test | | No |', '| Lint | | No |', '| Build | | No |', '', '## Unknowns', '', '- Confirm versions, active modules, and project-specific commands before implementation.');
199
+ const artifactRoot = join(targetRoot, '.maurao');
200
+ mkdirSync(artifactRoot, { recursive: true });
201
+ const output = join(artifactRoot, 'technology-inventory.md');
202
+ writeFileSync(output, `${lines.join('\n')}\n`, 'utf8');
203
+ console.log(`Technology inventory written to ${output}`);
204
+ for (const finding of findings) console.log(`Detected: ${finding.technology}`);
205
+ }
206
+
207
+ const [command = 'help', ...args] = process.argv.slice(2);
208
+ try {
209
+ if (command === 'init') init(args);
210
+ else if (command === 'validate') validate();
211
+ else if (command === 'list') list();
212
+ else if (command === 'doctor') doctor(args);
213
+ else if (command === 'inspect') inspect(args);
214
+ else usage();
215
+ } catch (error) {
216
+ console.error(`Error: ${error.message}`);
217
+ process.exitCode = 1;
218
+ }
@@ -0,0 +1,4 @@
1
+ # maurao debug
2
+
3
+ Load `skills/core/debugging`, `skills/practices/testing`, and `skills/practices/observability` when relevant. Reproduce, hypothesize, collect evidence, identify root cause, apply the smallest fix, and verify regression protection.
4
+
@@ -0,0 +1,4 @@
1
+ # maurao discover
2
+
3
+ Load `skills/core/project-discovery`, `skills/core/technology-discovery`, and `skills/core/product-discovery` when the request concerns a new product. Determine greenfield, brownfield, or hybrid mode, then create the appropriate baseline artifacts.
4
+
@@ -0,0 +1,4 @@
1
+ # maurao map
2
+
3
+ Load `skills/core/project-discovery`, `skills/core/technology-discovery`, and `skills/core/brownfield-analysis`. Inspect the existing product before proposing a change and create `templates/brownfield-map.md` from repository evidence.
4
+
@@ -0,0 +1,4 @@
1
+ # maurao plan
2
+
3
+ Load `skills/core/planning`, `skills/core/architecture`, and the active technology pack. Convert an approved specification into ordered tasks with dependencies and independent completion evidence.
4
+
package/commands/pr.md ADDED
@@ -0,0 +1,4 @@
1
+ # maurao pr
2
+
3
+ Load `skills/practices/pull-request` and `templates/pull-request.md`. Prepare a focused, reviewable pull request with exact validation evidence, risks, rollout, rollback, and reviewer focus.
4
+
@@ -0,0 +1,4 @@
1
+ # maurao review
2
+
3
+ Load `skills/practices/code-review`. Review the complete change against the specification, surrounding code, risk boundaries, tests, security, observability, and maintainability. Report findings by severity.
4
+
@@ -0,0 +1,4 @@
1
+ # maurao specify
2
+
3
+ Load `skills/core/specification` and `skills/core/requirements`. Create or refine a specification with requirements, acceptance criteria, risks, non-goals, and a verification plan.
4
+
@@ -0,0 +1,4 @@
1
+ # maurao spike
2
+
3
+ Load `skills/core/spike` and the relevant technology pack. Run a bounded experiment, record evidence and limitations, and produce a decision or an explicit inconclusive result.
4
+
@@ -0,0 +1,4 @@
1
+ # maurao verify
2
+
3
+ Load `skills/practices/verification`, `skills/practices/testing`, and `skills/practices/release-readiness` when delivery is involved. Map every acceptance criterion to actual evidence and classify unexecuted checks honestly.
4
+
@@ -0,0 +1,22 @@
1
+ # Artifact contract
2
+
3
+ The project-local `.maurao/` directory is the durable state of the method. Tool adapters and chat history are transport layers; they are not the source of truth.
4
+
5
+ ## Required artifacts by depth
6
+
7
+ | Depth | Required artifacts |
8
+ |---|---|
9
+ | L0 | Verification note in the final response |
10
+ | L1 | Specification, implementation plan, test plan, verification report |
11
+ | L2 | System context, change proposal, decision records, test plan, observability plan, verification report |
12
+ | L3 | Product brief, system context, technology inventory, requirements, architecture decisions, delivery increments, threat model, verification and release reports |
13
+
14
+ ## Naming
15
+
16
+ - Specifications: `.maurao/specifications/<change-id>.md`
17
+ - Decisions: `.maurao/decisions/ADR-<number>-<slug>.md`
18
+ - Plans: `.maurao/plans/<change-id>.md`
19
+ - Reports: `.maurao/reports/<change-id>-<report-type>.md`
20
+
21
+ Use stable IDs such as `REQ-001`, `AC-001`, `TASK-001`, `TEST-001`, and `THR-001` to preserve traceability.
22
+