@multileaf/ai-workflow 0.1.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/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/README.md +32 -0
- package/dist/adapter-contract.d.ts +13 -0
- package/dist/adapter-contract.js +50 -0
- package/dist/adapter.d.ts +15 -0
- package/dist/adapter.js +62 -0
- package/dist/claude-layout.d.ts +9 -0
- package/dist/claude-layout.js +23 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.js +30 -0
- package/dist/codex-layout.d.ts +10 -0
- package/dist/codex-layout.js +24 -0
- package/dist/confirmation.d.ts +9 -0
- package/dist/confirmation.js +41 -0
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +10 -0
- package/dist/context-cache.d.ts +8 -0
- package/dist/context-cache.js +17 -0
- package/dist/context-quality.d.ts +11 -0
- package/dist/context-quality.js +27 -0
- package/dist/context-retrieval.d.ts +3 -0
- package/dist/context-retrieval.js +13 -0
- package/dist/context-store.d.ts +9 -0
- package/dist/context-store.js +18 -0
- package/dist/copilot-layout.d.ts +9 -0
- package/dist/copilot-layout.js +24 -0
- package/dist/cursor-layout.d.ts +9 -0
- package/dist/cursor-layout.js +25 -0
- package/dist/dashboard.d.ts +37 -0
- package/dist/dashboard.js +251 -0
- package/dist/drift.d.ts +2 -0
- package/dist/drift.js +10 -0
- package/dist/evidence.d.ts +20 -0
- package/dist/evidence.js +32 -0
- package/dist/files.d.ts +2 -0
- package/dist/files.js +58 -0
- package/dist/gemini-layout.d.ts +9 -0
- package/dist/gemini-layout.js +23 -0
- package/dist/generator.d.ts +3 -0
- package/dist/generator.js +16 -0
- package/dist/intelligence.d.ts +2 -0
- package/dist/intelligence.js +13 -0
- package/dist/interpreter.d.ts +23 -0
- package/dist/interpreter.js +117 -0
- package/dist/lockfile.d.ts +12 -0
- package/dist/lockfile.js +59 -0
- package/dist/manifest.d.ts +15 -0
- package/dist/manifest.js +35 -0
- package/dist/migration.d.ts +22 -0
- package/dist/migration.js +50 -0
- package/dist/orchestration.d.ts +30 -0
- package/dist/orchestration.js +172 -0
- package/dist/organization-policy.d.ts +14 -0
- package/dist/organization-policy.js +47 -0
- package/dist/package-audit.d.ts +19 -0
- package/dist/package-audit.js +28 -0
- package/dist/package-contract.d.ts +30 -0
- package/dist/package-contract.js +93 -0
- package/dist/package-integrity.d.ts +8 -0
- package/dist/package-integrity.js +15 -0
- package/dist/package-updates.d.ts +11 -0
- package/dist/package-updates.js +32 -0
- package/dist/plugin-sdk.d.ts +20 -0
- package/dist/plugin-sdk.js +243 -0
- package/dist/policy-gate.d.ts +6 -0
- package/dist/policy-gate.js +20 -0
- package/dist/profile.d.ts +23 -0
- package/dist/profile.js +123 -0
- package/dist/providers.d.ts +20 -0
- package/dist/providers.js +67 -0
- package/dist/quality-gates.d.ts +2 -0
- package/dist/quality-gates.js +40 -0
- package/dist/recommendations.d.ts +12 -0
- package/dist/recommendations.js +63 -0
- package/dist/registry.d.ts +11 -0
- package/dist/registry.js +27 -0
- package/dist/scanner.d.ts +9 -0
- package/dist/scanner.js +83 -0
- package/dist/selection.d.ts +3 -0
- package/dist/selection.js +11 -0
- package/dist/self-validation.d.ts +9 -0
- package/dist/self-validation.js +9 -0
- package/dist/services.d.ts +42 -0
- package/dist/services.js +1 -0
- package/dist/team-configuration.d.ts +23 -0
- package/dist/team-configuration.js +104 -0
- package/dist/telemetry.d.ts +20 -0
- package/dist/telemetry.js +95 -0
- package/dist/token-usage.d.ts +9 -0
- package/dist/token-usage.js +38 -0
- package/dist/traceability.d.ts +23 -0
- package/dist/traceability.js +51 -0
- package/dist/types.d.ts +22 -0
- package/dist/types.js +1 -0
- package/dist/universal-layout.d.ts +9 -0
- package/dist/universal-layout.js +21 -0
- package/dist/vercel-skills.d.ts +17 -0
- package/dist/vercel-skills.js +49 -0
- package/dist/workflow.d.ts +4 -0
- package/dist/workflow.js +1130 -0
- package/docs/README.md +20 -0
- package/docs/adapter-model.md +16 -0
- package/docs/architecture.md +66 -0
- package/docs/backlog.md +93 -0
- package/docs/orchestration.md +50 -0
- package/docs/package-model.md +53 -0
- package/docs/plugin-authoring.md +31 -0
- package/docs/product-requirements.md +57 -0
- package/docs/product-vision.md +26 -0
- package/docs/project-intelligence.md +59 -0
- package/docs/quality.md +32 -0
- package/docs/release-backlog.md +7 -0
- package/docs/release-process.md +38 -0
- package/docs/security.md +18 -0
- package/docs/telemetry.md +28 -0
- package/docs/token-efficiency.md +16 -0
- package/package.json +76 -0
- package/resources/README.md +4 -0
- package/resources/agents/adapter-engineer.md +4 -0
- package/resources/agents/documentation-writer.md +4 -0
- package/resources/agents/quality-reviewer.md +4 -0
- package/resources/agents/requirements-analyst.md +4 -0
- package/resources/agents/security-reviewer.md +4 -0
- package/resources/agents/technical-architect.md +4 -0
- package/resources/agents/test-engineer.md +4 -0
- package/resources/agents/typescript-engineer.md +4 -0
- package/resources/hooks/post-change.md +4 -0
- package/resources/hooks/post-implementation.md +4 -0
- package/resources/hooks/pre-commit.md +4 -0
- package/resources/hooks/pre-implementation.md +4 -0
- package/resources/hooks/pre-release.md +4 -0
- package/resources/package.yaml +36 -0
- package/resources/rules/architecture-policy.md +4 -0
- package/resources/rules/completion-validation.md +19 -0
- package/resources/rules/dependency-policy.md +4 -0
- package/resources/rules/documentation-policy.md +4 -0
- package/resources/rules/generated-files.md +4 -0
- package/resources/rules/language-policy.md +4 -0
- package/resources/rules/quality-gates.md +4 -0
- package/resources/rules/security-policy.md +4 -0
- package/resources/rules/self-validation.md +12 -0
- package/resources/rules/tdd-policy.md +4 -0
- package/resources/skills/adapter-development.md +9 -0
- package/resources/skills/brainstorming.md +9 -0
- package/resources/skills/code-review.md +9 -0
- package/resources/skills/documentation-maintenance.md +9 -0
- package/resources/skills/implementation-planning.md +9 -0
- package/resources/skills/project-init.md +9 -0
- package/resources/skills/requirements-specification.md +9 -0
- package/resources/skills/security-review.md +9 -0
- package/resources/skills/skill-authoring.md +9 -0
- package/resources/skills/tdd-development.md +9 -0
- package/resources/skills/technical-design.md +9 -0
- package/resources/skills/verification.md +9 -0
- package/resources/templates/brainstorm.md +16 -0
- package/resources/templates/decision-record.md +12 -0
- package/resources/templates/implementation-plan.md +12 -0
- package/resources/templates/migration-report.md +14 -0
- package/resources/templates/security-review.md +14 -0
- package/resources/templates/specification.md +23 -0
- package/resources/templates/task.md +14 -0
- package/resources/templates/technical-design.md +14 -0
- package/resources/templates/test-plan.md +12 -0
- package/resources/templates/verification-report.md +12 -0
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@multileaf/ai-workflow",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Portable spec-driven development workflow for AI coding agents",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/MultiLeaf/aiw.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/MultiLeaf/aiw#readme",
|
|
11
|
+
"bugs": "https://github.com/MultiLeaf/aiw/issues",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"ai",
|
|
14
|
+
"sdd",
|
|
15
|
+
"codex",
|
|
16
|
+
"claude",
|
|
17
|
+
"cursor",
|
|
18
|
+
"developer-tools"
|
|
19
|
+
],
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"resources",
|
|
23
|
+
"docs",
|
|
24
|
+
"README.md",
|
|
25
|
+
"CHANGELOG.md",
|
|
26
|
+
"LICENSE"
|
|
27
|
+
],
|
|
28
|
+
"type": "module",
|
|
29
|
+
"bin": {
|
|
30
|
+
"aiw": "dist/cli.js"
|
|
31
|
+
},
|
|
32
|
+
"exports": {
|
|
33
|
+
".": "./dist/cli.js",
|
|
34
|
+
"./plugin-sdk": {
|
|
35
|
+
"types": "./dist/plugin-sdk.d.ts",
|
|
36
|
+
"default": "./dist/plugin-sdk.js"
|
|
37
|
+
},
|
|
38
|
+
"./orchestration": {
|
|
39
|
+
"types": "./dist/orchestration.d.ts",
|
|
40
|
+
"default": "./dist/orchestration.js"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "node scripts/clean-dist.mjs && tsc",
|
|
45
|
+
"test": "vitest run",
|
|
46
|
+
"test:watch": "vitest",
|
|
47
|
+
"lint": "eslint .",
|
|
48
|
+
"typecheck": "tsc --noEmit",
|
|
49
|
+
"security:check": "npm audit --audit-level=high",
|
|
50
|
+
"policy:check": "node dist/cli.js policy-check --package=resources/package.yaml",
|
|
51
|
+
"format": "prettier --write \"src/**/*.{ts,js}\" \"docs/**/*.md\" \"*.{json,js}\"",
|
|
52
|
+
"format:check": "prettier --check \"src/**/*.{ts,js}\" \"docs/**/*.md\" \"*.{json,js}\"",
|
|
53
|
+
"check": "npm run format:check && npm run lint && npm run typecheck && npm run build && npm test && npm run security:check",
|
|
54
|
+
"start": "node dist/cli.js",
|
|
55
|
+
"release:check": "npm run check && npm run policy:check && npm run release:gate-test && node scripts/release-check.mjs",
|
|
56
|
+
"release:gate-test": "node --test scripts/*.node-test.mjs",
|
|
57
|
+
"release:publish-check": "node scripts/release-publish-check.mjs"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public",
|
|
61
|
+
"provenance": true
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">=18"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@eslint/js": "^10.0.1",
|
|
68
|
+
"@types/node": "^22.0.0",
|
|
69
|
+
"eslint": "^10.9.1",
|
|
70
|
+
"eslint-config-prettier": "^10.1.8",
|
|
71
|
+
"prettier": "^3.9.6",
|
|
72
|
+
"typescript": "^5.0.0",
|
|
73
|
+
"typescript-eslint": "^8.68.0",
|
|
74
|
+
"vitest": "^3.0.0"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
schema: 1
|
|
2
|
+
id: multileaf/aiw-self-hosting
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
description: Resources for developing AI Workflow with AI Workflow.
|
|
5
|
+
language: en
|
|
6
|
+
provider: local
|
|
7
|
+
source: ./resources
|
|
8
|
+
engines:
|
|
9
|
+
ai_workflow: ">=0.1.0"
|
|
10
|
+
dependencies: []
|
|
11
|
+
permissions: []
|
|
12
|
+
policies: []
|
|
13
|
+
provenance:
|
|
14
|
+
source: ./resources
|
|
15
|
+
checksum: sha256:pending
|
|
16
|
+
targets: [codex, claude, cursor, gemini, copilot, universal]
|
|
17
|
+
resources:
|
|
18
|
+
skills:
|
|
19
|
+
- { id: project-init, version: 0.1.0, path: skills/project-init.md }
|
|
20
|
+
- { id: brainstorming, version: 0.1.0, path: skills/brainstorming.md }
|
|
21
|
+
- { id: requirements-specification, version: 0.1.0, path: skills/requirements-specification.md }
|
|
22
|
+
rules:
|
|
23
|
+
- { id: language-policy, version: 0.1.0, path: rules/language-policy.md }
|
|
24
|
+
- { id: tdd-policy, version: 0.1.0, path: rules/tdd-policy.md }
|
|
25
|
+
agents:
|
|
26
|
+
- { id: requirements-analyst, version: 0.1.0, path: agents/requirements-analyst.md }
|
|
27
|
+
hooks:
|
|
28
|
+
- { id: pre-implementation, version: 0.1.0, path: hooks/pre-implementation.md }
|
|
29
|
+
templates:
|
|
30
|
+
- { id: specification, version: 0.1.0, path: templates/specification.md }
|
|
31
|
+
provides:
|
|
32
|
+
skills: [project-init, brainstorming, requirements-specification, technical-design, implementation-planning, tdd-development, verification, code-review, security-review, documentation-maintenance, adapter-development, skill-authoring]
|
|
33
|
+
rules: [language-policy, tdd-policy, architecture-policy, quality-gates, security-policy, dependency-policy, generated-files, documentation-policy, self-validation, completion-validation]
|
|
34
|
+
agents: [requirements-analyst, technical-architect, typescript-engineer, test-engineer, quality-reviewer, security-reviewer, adapter-engineer, documentation-writer]
|
|
35
|
+
hooks: [pre-implementation, post-implementation, pre-commit, post-change, pre-release]
|
|
36
|
+
templates: [brainstorm, specification, technical-design, decision-record, implementation-plan, task, test-plan, verification-report, security-review, migration-report]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Completion Validation Policy
|
|
2
|
+
|
|
3
|
+
A task is complete only when every affected layer has been validated.
|
|
4
|
+
|
|
5
|
+
Required validation levels, when applicable:
|
|
6
|
+
|
|
7
|
+
1. Domain and unit tests.
|
|
8
|
+
2. Module or service integration tests.
|
|
9
|
+
3. CLI or adapter integration tests.
|
|
10
|
+
4. Generated artifact inspection.
|
|
11
|
+
5. End-to-end execution against this repository.
|
|
12
|
+
6. Documentation and traceability updates.
|
|
13
|
+
7. Formatting, linting, type checking, tests, and security checks.
|
|
14
|
+
|
|
15
|
+
Passing domain tests alone is not sufficient for a feature that affects the CLI, filesystem, providers, adapters, generated artifacts, or project configuration.
|
|
16
|
+
|
|
17
|
+
For every externally visible task, run an isolated integration validation with an AI subagent in a separate worktree. The subagent must exercise the packaged or executable workflow, report the commands and outcomes, and confirm that its worktree is clean. The main worktree must not be used as a substitute for this validation.
|
|
18
|
+
|
|
19
|
+
When launching a subagent, explicitly instruct it to send a direct Orca orchestration message to the coordinator terminal when it finishes; a mailbox-only notification is insufficient. The direct notification must include the final status, validation summary, failures if any, and worktree cleanliness.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Self-Validation Policy
|
|
2
|
+
|
|
3
|
+
AI Workflow must validate every change against its own repository whenever the current capabilities support the task.
|
|
4
|
+
|
|
5
|
+
For each change:
|
|
6
|
+
|
|
7
|
+
1. Run the generated or affected CLI command against this repository.
|
|
8
|
+
2. Inspect the generated files and configuration.
|
|
9
|
+
3. Run the complete quality gate.
|
|
10
|
+
4. Record validation evidence and any limitations.
|
|
11
|
+
|
|
12
|
+
Unit tests alone are not sufficient when the change affects installation, scanning, generation, migration, adapters, or project configuration.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: adapter-development
|
|
3
|
+
description: Build and validate translations from neutral resources to an agent target.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Adapter Development
|
|
7
|
+
|
|
8
|
+
Implement adapters against the neutral contract. Declare supported resource types and lifecycle events. Preserve unsupported resources, emit warnings, and test rendering, conflicts, idempotency, and rollback.
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brainstorming
|
|
3
|
+
description: Turn an early product idea into structured goals, assumptions, constraints, and questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Brainstorming
|
|
7
|
+
|
|
8
|
+
Separate facts, hypotheses, decisions, and open questions. Identify users, desired outcomes, constraints, risks, and non-goals. Do not prematurely prescribe implementation. Produce a versioned brainstorm artifact in English.
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: Review code for correctness, maintainability, design quality, and regression risk.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review
|
|
7
|
+
|
|
8
|
+
Review behavior, boundaries, cohesion, naming, types, error handling, duplication, complexity, tests, and documentation. Prioritize actionable findings with severity and evidence.
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: documentation-maintenance
|
|
3
|
+
description: Keep product, architecture, and workflow documentation aligned with implementation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Documentation Maintenance
|
|
7
|
+
|
|
8
|
+
Update affected documentation in English. Prefer concise documents and tested examples. Flag stale claims instead of inventing behavior.
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implementation-planning
|
|
3
|
+
description: Break an approved design into independently verifiable implementation tasks.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Implementation Planning
|
|
7
|
+
|
|
8
|
+
Create small ordered tasks. Each task must reference requirements, affected modules, tests, commands, dependencies, and completion evidence.
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-init
|
|
3
|
+
description: Inspect a repository, build a project profile, and prepare AI Workflow configuration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Project Initialization
|
|
7
|
+
|
|
8
|
+
Inspect structure and configuration safely. Detect languages, frameworks, package managers, scripts, tests, quality tools, CI, and conventions. Record evidence and confidence in `.ai-workflow/profile.yaml`. Ask for confirmation before treating uncertain inferences as facts. Recommend capabilities with rationale, permissions, and conflicts.
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: requirements-specification
|
|
3
|
+
description: Convert a product idea into testable, traceable requirements.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Requirements Specification
|
|
7
|
+
|
|
8
|
+
Give each requirement a stable identifier. Define observable behavior, acceptance criteria, constraints, and unresolved questions. Link requirements to their source brainstorm and distinguish confirmed facts from assumptions. Do not approve ambiguous critical requirements.
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-review
|
|
3
|
+
description: Review code, packages, hooks, and adapters for security and supply-chain risks.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Security Review
|
|
7
|
+
|
|
8
|
+
Inspect trust boundaries, filesystem access, command execution, network access, secrets, dependencies, and generated instructions. Apply least privilege and report exploitable findings with affected files and safe remediation.
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-authoring
|
|
3
|
+
description: Create focused, portable AI Workflow skills and validate their contracts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill Authoring
|
|
7
|
+
|
|
8
|
+
Write concise English instructions with clear scope, constraints, and progressive disclosure. Avoid generic advice and hidden side effects. Validate frontmatter, naming, references, and representative behavior.
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd-development
|
|
3
|
+
description: Implement repository changes through test-first development.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TDD Development
|
|
7
|
+
|
|
8
|
+
Follow Red, Green, Refactor, Verify. Write a failing behavioral test first, implement the smallest change, refactor for clarity and design quality, then run the relevant quality gate. Never weaken a test to make an implementation pass.
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: technical-design
|
|
3
|
+
description: Design modular technical solutions from approved requirements.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Technical Design
|
|
7
|
+
|
|
8
|
+
Map requirements to components, interfaces, data flows, and validation strategy. Compare meaningful alternatives and record decisions with rationale, risks, and consequences. Prefer small cohesive modules, explicit contracts, dependency inversion, and reversible changes.
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification
|
|
3
|
+
description: Verify implementation against requirements and produce traceable evidence.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verification
|
|
7
|
+
|
|
8
|
+
Check every acceptance criterion, quality gate, security requirement, and affected adapter. Report passed checks, missing evidence, failures, and residual risks. A task is not complete when required evidence is missing.
|
|
9
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Specification
|
|
2
|
+
|
|
3
|
+
## Requirement ID
|
|
4
|
+
|
|
5
|
+
Use a stable identifier in the form `REQ-###`.
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
## Behavior
|
|
10
|
+
|
|
11
|
+
## Acceptance Criteria
|
|
12
|
+
|
|
13
|
+
- Given
|
|
14
|
+
- When
|
|
15
|
+
- Then
|
|
16
|
+
|
|
17
|
+
## Constraints
|
|
18
|
+
|
|
19
|
+
## Traceability
|
|
20
|
+
|
|
21
|
+
Link each requirement to its source brainstorm and related evidence.
|
|
22
|
+
|
|
23
|
+
## Open Questions
|