@tduyng/pi-devos 0.13.6 → 0.14.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.
Files changed (100) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +26 -33
  3. package/package.json +1 -2
  4. package/plugins/devos/agents/verifier.md +4 -30
  5. package/plugins/devos/pi/extension/devos.ts +16 -26
  6. package/plugins/devos/scripts/check-evidence-router.sh +7 -1
  7. package/plugins/devos/scripts/evidence-router.py +5 -3
  8. package/plugins/devos/scripts/gates/check-dod-core.sh +5 -3
  9. package/plugins/devos/scripts/gates/check-port-source.sh +1 -1
  10. package/plugins/devos/scripts/gates/check-scenario-coverage.sh +10 -8
  11. package/plugins/devos/scripts/gates/phase-gate.sh +6 -6
  12. package/plugins/devos/scripts/gates/plan-template-check.py +6 -12
  13. package/plugins/devos/scripts/gates/spec-contract.sh +19 -0
  14. package/plugins/devos/scripts/gates/spec-template-check.py +8 -21
  15. package/plugins/devos/scripts/gates/suite/01-dod.sh +485 -0
  16. package/plugins/devos/scripts/gates/suite/02-integrity.sh +310 -0
  17. package/plugins/devos/scripts/gates/suite/03-archetype.sh +255 -0
  18. package/plugins/devos/scripts/gates/suite/04-spec-validator.sh +183 -0
  19. package/plugins/devos/scripts/gates/suite/05-requires.sh +360 -0
  20. package/plugins/devos/scripts/gates/suite/06-clarify-adapters.sh +435 -0
  21. package/plugins/devos/scripts/gates/suite/07-lint-evals.sh +350 -0
  22. package/plugins/devos/scripts/gates/suite/08-converge.sh +591 -0
  23. package/plugins/devos/scripts/gates/suite/09-quality.sh +516 -0
  24. package/plugins/devos/scripts/gates/suite/10-eval-harness.sh +679 -0
  25. package/plugins/devos/scripts/gates/test-gates.sh +23 -4253
  26. package/plugins/devos/scripts/gates/test-integrity-rubric.sh +1 -1
  27. package/plugins/devos/scripts/gates/test-phase-gate.sh +5 -5
  28. package/plugins/devos/skills/build/SKILL.md +3 -3
  29. package/plugins/devos/skills/build/references/refactor.md +1 -1
  30. package/plugins/devos/skills/build/references/routes.md +4 -4
  31. package/plugins/devos/skills/frame/SKILL.md +22 -39
  32. package/plugins/devos/skills/frame/references/template.md +115 -0
  33. package/plugins/devos/skills/implement/SKILL.md +4 -4
  34. package/plugins/devos/skills/implement/references/dod.md +6 -1
  35. package/plugins/devos/skills/implement/references/implement.md +3 -1
  36. package/plugins/devos/skills/implement/references/plan.md +9 -27
  37. package/plugins/devos/skills/implement/references/resume.md +1 -1
  38. package/plugins/devos/skills/implement/references/verify-close.md +4 -3
  39. package/plugins/devos/skills/implement/scripts/ops-log.sh +2 -2
  40. package/plugins/devos/skills/implement/scripts/validate-spec.sh +17 -65
  41. package/plugins/devos/skills/init/references/context.md +1 -1
  42. package/plugins/devos/skills/review/SKILL.md +24 -47
  43. package/plugins/devos/skills/review/references/comments.md +13 -0
  44. package/plugins/devos/skills/review/references/reviewer.md +124 -0
  45. package/plugins/devos/skills/review/references/routing.md +35 -0
  46. package/plugins/devos/skills/review/scripts/__pycache__/prepare.cpython-313.pyc +0 -0
  47. package/plugins/devos/skills/review/scripts/prepare.py +763 -0
  48. package/plugins/devos/skills/spec/SKILL.md +5 -6
  49. package/plugins/devos/skills/spec/references/write-spec.md +36 -51
  50. package/plugins/devos/skills/spec/scripts/clarify.sh +4 -4
  51. package/plugins/devos/skills/status/SKILL.md +4 -4
  52. package/plugins/devos/skills/status/scripts/check-requires.py +4 -4
  53. package/plugins/devos/skills/status/scripts/convention-usage.sh +1 -1
  54. package/plugins/devos/skills/status/scripts/quality-correlation.sh +2 -25
  55. package/plugins/devos/scripts/gates/check-handoff.sh +0 -215
  56. package/plugins/devos/skills/design-taste/SKILL.md +0 -55
  57. package/plugins/devos/skills/design-taste/references/tells.md +0 -85
  58. package/plugins/devos/skills/design-taste/scripts/slop-scan.py +0 -305
  59. package/plugins/devos/skills/docs/SKILL.md +0 -22
  60. package/plugins/devos/skills/docs/references/backfill.md +0 -54
  61. package/plugins/devos/skills/docs/references/init.md +0 -43
  62. package/plugins/devos/skills/docs/references/status.md +0 -71
  63. package/plugins/devos/skills/docs/references/update.md +0 -80
  64. package/plugins/devos/skills/explain/SKILL.md +0 -45
  65. package/plugins/devos/skills/explain/references/quiz.md +0 -21
  66. package/plugins/devos/skills/frame/references/boundaries.md +0 -53
  67. package/plugins/devos/skills/frame/references/decompose.md +0 -96
  68. package/plugins/devos/skills/frame/references/impact.md +0 -43
  69. package/plugins/devos/skills/frame/references/interrogate.md +0 -68
  70. package/plugins/devos/skills/product/SKILL.md +0 -40
  71. package/plugins/devos/skills/product/references/planner.md +0 -54
  72. package/plugins/devos/skills/surgical-diff/SKILL.md +0 -23
  73. package/plugins/devos/skills/test-integrity/SKILL.md +0 -26
  74. package/plugins/devos/skills/verification-evidence/SKILL.md +0 -17
  75. package/plugins/devos/workflows/common/backlog-file-structure.md +0 -44
  76. package/plugins/devos/workflows/common/category-file-structure.md +0 -41
  77. package/plugins/devos/workflows/common/feature-line-format.md +0 -10
  78. package/plugins/devos/workflows/common/roadmap-file-structure.md +0 -51
  79. package/plugins/devos/workflows/common/suggest-categories.md +0 -76
  80. package/plugins/devos/workflows/common/suggest-milestones.md +0 -92
  81. package/plugins/devos/workflows/doc/doc-health.md +0 -137
  82. package/plugins/devos/workflows/doc/doc-writer.md +0 -44
  83. package/plugins/devos/workflows/doc/init-documentation.md +0 -196
  84. package/plugins/devos/workflows/doc/retro-documentation.md +0 -304
  85. package/plugins/devos/workflows/doc/templates/library.md +0 -58
  86. package/plugins/devos/workflows/doc/templates/service.md +0 -61
  87. package/plugins/devos/workflows/doc/update-documentation.md +0 -194
  88. package/plugins/devos/workflows/doc/write-documentation.md +0 -137
  89. package/plugins/devos/workflows/product/create-product-mission.md +0 -45
  90. package/plugins/devos/workflows/product/create-product-roadmap.md +0 -106
  91. package/plugins/devos/workflows/product/create-product-tech-stack.md +0 -19
  92. package/plugins/devos/workflows/product/gather-product-info.md +0 -25
  93. package/plugins/devos/workflows/product/resume-detection.md +0 -70
  94. package/plugins/devos/workflows/product/reverse-backlog.md +0 -118
  95. package/plugins/devos/workflows/product/reverse-domain-model.md +0 -86
  96. package/plugins/devos/workflows/product/reverse-product-plan.md +0 -81
  97. package/plugins/devos/workflows/product/reverse-tech-stack.md +0 -73
  98. package/plugins/devos/workflows/product/scan-deep.md +0 -113
  99. package/plugins/devos/workflows/product/scan-git.md +0 -122
  100. package/plugins/devos/workflows/product/scan-light.md +0 -154
@@ -1,73 +0,0 @@
1
- # Workflow: Reverse Tech Stack (Phase 3)
2
-
3
- **Goal:** Consolidate tech stack detection to generate `tech-stack.md` in the standard DevOS format. Reverse equivalent of `/devos:product` (phase 4).
4
-
5
- **Input:** Tech stack detection (Phase 1), consolidated findings
6
-
7
- **Output:** `devos/product/tech-stack.md`
8
-
9
- ---
10
-
11
- ## Step 1: Consolidation
12
-
13
- From the light scan (Phase 1) and findings (Phase 2):
14
- 1. Detected languages with versions
15
- 2. Frameworks with versions
16
- 3. Build tools
17
- 4. Test frameworks
18
- 5. Databases
19
- 6. Infrastructure (Docker, CI, etc.)
20
- 7. Main libraries
21
-
22
- ---
23
-
24
- ## Step 2: Build the Draft
25
-
26
- ```markdown
27
- # Tech Stack
28
-
29
- ## Overview
30
- [General description of the project and its main technologies]
31
-
32
- ## Core Technologies
33
-
34
- ### [Language/Framework]
35
- - **Version:** [version]
36
- - **Purpose:** [usage in the project]
37
- - **Key Libraries:** [main libs]
38
-
39
- ### [Database]
40
- - **Type:** [SQL/NoSQL/...]
41
- - **ORM:** [if applicable]
42
-
43
- ## Testing Framework
44
- - **Unit:** [framework]
45
- - **Integration:** [framework]
46
- - **E2E:** [framework]
47
-
48
- ## Development Environment
49
-
50
- ### Runtime Requirements
51
- | Requirement | Version | Notes |
52
- |-------------|---------|-------|
53
- | [tech] | [version] | [notes] |
54
-
55
- ### Build & Deploy
56
- - **Build:** [tool]
57
- - **CI/CD:** [tool]
58
- - **Container:** [Docker/etc.]
59
- ```
60
-
61
- ---
62
-
63
- ## Step 3: Interactive Validation
64
-
65
- Present the draft to you for validation. You can correct versions, add missing technologies, or clarify usages.
66
-
67
- **WAIT** for validation.
68
-
69
- ---
70
-
71
- ## Step 4: Write
72
-
73
- `Write` the file `devos/product/tech-stack.md` with the validated content.
@@ -1,113 +0,0 @@
1
- # Workflow: Deep Scan (Phase 2: Agent)
2
-
3
- **Goal:** Deep-analyze a specific domain/layer of the project. Extract architectural patterns, business entities, business rules, and test-derived information. A read-only scan prompt.
4
-
5
- **Role:** read-only domain scanner
6
-
7
- **Input:** Scope (paths), Git hotspots, doc-confrontation option
8
-
9
- **Output:** Findings file in `devos/onboarding/findings/`
10
-
11
- ---
12
-
13
- ## Step 1: Map the scope
14
-
15
- 1. `Glob` to list all source files in the assigned paths
16
- 2. Classify by type:
17
-
18
- | Type | Extensions |
19
- |------|-----------|
20
- | Source | `.ts`, `.tsx`, `.js`, `.jsx`, `.py`, `.go`, `.java`, `.kt`, `.swift`, `.rb`, `.rs`, `.php` |
21
- | Test | `*.test.*`, `*.spec.*`, `*_test.*`, `test_*.*`, `*Test.*` |
22
- | Config | `*.config.*`, `*.json`, `*.yml`, `*.yaml`, `*.toml` |
23
- | Types | `*.d.ts`, `*.types.*`, `**/types/`, `**/interfaces/` |
24
-
25
- 3. Prioritize Git hotspot files (if provided)
26
-
27
- ---
28
-
29
- ## Step 2: Detect architectural patterns
30
-
31
- `Grep` and `Read` to detect patterns:
32
-
33
- | Pattern | Clues |
34
- |---------|-------|
35
- | **MVC** | `controllers/`, `models/`, `views/` folders |
36
- | **Clean Architecture** | `use-cases/`, `repositories/`, `entities/`, `adapters/` |
37
- | **Hexagonal** | `ports/`, `adapters/`, `domain/` |
38
- | **CQRS** | `commands/`, `queries/`, `handlers/` |
39
- | **Event-driven** | `events/`, `listeners/`, `subscribers/`, `sagas/` |
40
- | **Layered** | `api/`, `service/`, `dao/`, `repository/` |
41
-
42
- Analyze folder structure, naming conventions, and imports.
43
-
44
- ---
45
-
46
- ## Step 3: Extract business entities
47
-
48
- 1. `Grep` for class/interface/type definitions:
49
- - TypeScript/JS: `class`, `interface`, `type`, `enum`
50
- - Python: `class`, `dataclass`, `TypedDict`
51
- - Java/Kotlin: `class`, `interface`, `enum`, `record`
52
- - Go: `type ... struct`
53
- 2. For each entity found, `Read` the file and extract:
54
- - Name and description (comments, docstrings)
55
- - Attributes/fields
56
- - Relations (imports, references to other entities)
57
- 3. Distinguish business entities (User, Order, Invoice) from technical ones (Repository, Service, Controller)
58
-
59
- ---
60
-
61
- ## Step 4: Business rules
62
-
63
- ### 4.1 From source code
64
-
65
- `Grep` for business-rule patterns:
66
- - Validations: `validate`, `check`, `assert`, `require`, `guard`
67
- - Business conditions: `if`, `switch` in services/use cases
68
- - Constraints: min/max, formats, permissions
69
-
70
- ### 4.2 From tests
71
-
72
- `Grep` for test descriptions:
73
- - `describe(`, `it(`, `test(`, `@Test`, `def test_`
74
- - `Read` test files to extract:
75
- - Expected behaviors (assertions)
76
- - Tested edge cases
77
- - Fixtures and test data (reveal entities and their states)
78
-
79
- ---
80
-
81
- ## Step 5: Services and interactions
82
-
83
- 1. Identify services/controllers and their responsibilities
84
- 2. Detect APIs:
85
- - HTTP routes: `@Get`, `@Post`, `app.get`, `router.`
86
- - GraphQL: `@Query`, `@Mutation`, `@Resolver`
87
- - Events: `emit`, `publish`, `dispatch`, `on(`
88
- 3. Map inter-component dependencies via imports
89
-
90
- ---
91
-
92
- ## Step 6: Doc vs code confrontation (conditional)
93
-
94
- **Run only if CONFRONT_DOC=true.**
95
-
96
- 1. `Read` the provided documentation (DOC_PATH)
97
- 2. For each documented element:
98
- - Find the corresponding implementation in the code
99
- - Mark: Confirmed / Obsolete / Undocumented
100
- 3. For each undocumented code element:
101
- - Add to the "Undocumented" section
102
-
103
- ---
104
-
105
- ## Step 7: Produce the findings file
106
-
107
- Write the file in the format defined below:
108
- - `devos/onboarding/findings/domain-[DOMAIN].md`
109
-
110
- The file must be:
111
- - Structured and parseable (headings, tables)
112
- - Concise (respect size limits)
113
- - Usable by Phase 3 reverse workflows
@@ -1,122 +0,0 @@
1
- # Workflow: Git Scan (Phase 1)
2
-
3
- **Goal:** Analyze the project's Git history to identify hot zones, contributors per area, and evolution patterns. Runs alongside the structural scan.
4
-
5
- **Role:** Git scan
6
-
7
- **Input:** Project Git repository
8
-
9
- **Output:** Structured Git report (hot zones, contributors, evolution)
10
-
11
- ---
12
-
13
- ## Step 1: Git check
14
-
15
- ```bash
16
- git rev-parse --is-inside-work-tree 2>/dev/null && echo "GIT_OK" || echo "NO_GIT"
17
- ```
18
-
19
- If no Git repo: return an empty report with a "No Git repository detected" note.
20
-
21
- ---
22
-
23
- ## Step 2: Hot zones (most modified files)
24
-
25
- ### 2.1 Top modified files (last 6 months)
26
-
27
- ```bash
28
- git log --since="6 months ago" --pretty=format: --name-only | sort | uniq -c | sort -rn | head -50
29
- ```
30
-
31
- ### 2.2 Top modified files (all history)
32
-
33
- ```bash
34
- git log --pretty=format: --name-only | sort | uniq -c | sort -rn | head -30
35
- ```
36
-
37
- ### 2.3 Files with the most contributors
38
-
39
- ```bash
40
- git log --pretty=format:"%an" --name-only | awk '/^$/{next} /^[^[:space:]]/{author=$0; next} {print $0 "|" author}' | sort -u | awk -F'|' '{files[$1]++} END {for (f in files) print files[f], f}' | sort -rn | head -30
41
- ```
42
-
43
- ---
44
-
45
- ## Step 3: Contributors per area
46
-
47
- ### 3.1 Contributors per top-level folder
48
-
49
- ```bash
50
- for dir in $(find . -maxdepth 2 -type d -not -path './.git*' -not -path './node_modules*' | head -20); do
51
- echo "=== $dir ==="
52
- git log --pretty=format:"%an" -- "$dir" | sort | uniq -c | sort -rn | head -5
53
- done
54
- ```
55
-
56
- ### 3.2 Commits per contributor
57
-
58
- ```bash
59
- git shortlog -sn --no-merges | head -15
60
- ```
61
-
62
- ---
63
-
64
- ## Step 4: Evolution patterns
65
-
66
- ### 4.1 Activity per month (last 12 months)
67
-
68
- ```bash
69
- git log --since="12 months ago" --pretty=format:"%ad" --date=format:"%Y-%m" | sort | uniq -c
70
- ```
71
-
72
- ### 4.2 Recently active folders
73
-
74
- ```bash
75
- git log --since="3 months ago" --pretty=format: --name-only | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20
76
- ```
77
-
78
- ### 4.3 Stable folders (few recent changes)
79
-
80
- Compare recent activity (3 months) vs total history to identify stable areas.
81
-
82
- ---
83
-
84
- ## Step 5: Output
85
-
86
- Produce a structured report:
87
-
88
- ```markdown
89
- # Git Analysis
90
-
91
- > Repository: [name] | Commits: [N] | Contributors: [N] | Period: [first-commit] to [last-commit]
92
-
93
- ## Hot zones (last 6 months)
94
-
95
- | # | File | Commits | Contributors |
96
- |---|------|---------|--------------|
97
- | 1 | [path] | [N] | [N] |
98
-
99
- ## Contributors per area
100
-
101
- | Area | Main contributor | Others | Total commits |
102
- |------|-----------------|--------|---------------|
103
- | [dir] | [name] ([N]) | [name] ([N]) | [N] |
104
-
105
- ## Evolution
106
-
107
- | Month | Commits |
108
- |-------|---------|
109
- | [YYYY-MM] | [N] |
110
-
111
- ## Stable areas (little recent activity)
112
-
113
- | Area | Last modified | Total historical commits |
114
- |------|---------------|--------------------------|
115
- | [dir] | [date] | [N] |
116
-
117
- ## Prioritization recommendations
118
-
119
- These areas deserve deep analysis first:
120
- 1. [area]: [N] recent commits, [N] contributors (very active)
121
- 2. [area]: [N] recent commits (evolving)
122
- ```
@@ -1,154 +0,0 @@
1
- # Workflow: Light Scan (Phase 1)
2
-
3
- **Goal:** Analyze an existing project's structure to produce a first map of domains/layers and detect the tech stack. This output drives the deep-scan split.
4
-
5
- **Role:** Main agent
6
-
7
- **Input:** Project codebase
8
-
9
- **Output:** Domain map, detected tech stack, proposed split
10
-
11
- ---
12
-
13
- ## Step 1: Structural analysis
14
-
15
- ### 1.1 Project tree
16
-
17
- 1. `Bash`: `find . -type f -not -path './.git/*' -not -path './node_modules/*' -not -path './vendor/*' -not -path './.next/*' -not -path './dist/*' -not -path './build/*' -not -path './target/*' | head -500`
18
- 2. `Bash`: `find . -type d -maxdepth 3 -not -path './.git/*' -not -path './node_modules/*' | sort`
19
- 3. Identify the main structure (src/, lib/, apps/, services/, packages/, etc.)
20
-
21
- ### 1.2 Dependencies and package managers
22
-
23
- Detect and read dependency files:
24
-
25
- | File | Ecosystem |
26
- |------|-----------|
27
- | `package.json` | Node.js/JavaScript |
28
- | `pom.xml` / `build.gradle` | Java/Kotlin |
29
- | `go.mod` | Go |
30
- | `requirements.txt` / `pyproject.toml` / `Pipfile` | Python |
31
- | `Gemfile` | Ruby |
32
- | `Cargo.toml` | Rust |
33
- | `composer.json` | PHP |
34
- | `Package.swift` | Swift |
35
-
36
- For each file found: `Read` and extract the main dependencies.
37
-
38
- ### 1.3 Entry points
39
-
40
- - `Grep` for `main`, `index`, `app`, `server`, `bootstrap`
41
- - Detect startup scripts (npm scripts, Makefile, docker-compose)
42
-
43
- ### 1.4 Existing configuration
44
-
45
- - `Glob` for config files: `*.config.*`, `.env*`, `docker-compose*`, `Dockerfile*`
46
- - `Read` the main configuration files
47
-
48
- ---
49
-
50
- ## Step 2: Tech stack detection
51
-
52
- From dependencies and structure, identify:
53
-
54
- | Category | Detection examples |
55
- |----------|-------------------|
56
- | **Languages** | File extensions, package managers |
57
- | **Frameworks** | Dependencies (react, express, spring, django, rails...) |
58
- | **Build tools** | webpack, vite, gradle, maven, cargo |
59
- | **Test frameworks** | jest, pytest, junit, rspec, go test |
60
- | **Databases** | ORM configs, migration files, connection strings |
61
- | **Infrastructure** | Dockerfile, docker-compose, terraform, k8s manifests |
62
-
63
- ---
64
-
65
- ## Step 3: Existing documentation
66
-
67
- ### 3.1 Scan documentation
68
-
69
- 1. `Glob` for docs: `*.md`, `docs/**/*`, `wiki/**/*`, `documentation/**/*`
70
- 2. `Read` the main README.md (if present)
71
- 3. Identify potentially useful docs
72
-
73
- ### 3.2 Mandatory user question
74
-
75
- **BLOCK and ask via AskUserQuestion:**
76
-
77
- ```
78
- Existing documentation detected:
79
- - README.md: [present/absent]
80
- - docs/ folder: [N files]
81
- - Other: [list]
82
-
83
- Do you consider this documentation:
84
- A) Relevant: it will be checked against the code to identify what's still valid
85
- B) Obsolete: it will be ignored, we rebuild from scratch
86
- ```
87
-
88
- **WAIT** for the answer before continuing.
89
-
90
- ---
91
-
92
- ## Step 4: External MCP sources (optional)
93
-
94
- If MCP sources (Jira/Confluence/Notion/...) are configured, ask:
95
-
96
- ```
97
- External sources detected:
98
- - [MCP-1: Jira/Confluence/Notion/...]
99
-
100
- Scan these sources to enrich the analysis?
101
- - Yes: scan recent tickets/docs
102
- - No: rely on code only
103
- ```
104
-
105
- If accepted, extract: recent tickets (in-progress features, bugs), existing product docs, planning data (roadmap, sprints).
106
-
107
- ---
108
-
109
- ## Step 5: First map
110
-
111
- ### 5.1 Identify domains/layers
112
-
113
- From the structural analysis, Git (convergence with scan-git), and optionally MCP:
114
-
115
- 1. Identify **functional domains** (auth, billing, users, notifications...)
116
- 2. Identify **technical layers** (API, services, data access, UI)
117
- 3. Cross with Git hot zones (if available) to prioritize
118
-
119
- ### 5.2 Proposed split
120
-
121
- Present to the user:
122
-
123
- ```
124
- Project map:
125
-
126
- Detected tech stack:
127
- - Languages: [list]
128
- - Frameworks: [list]
129
- - Databases: [list]
130
-
131
- Identified domains/layers:
132
- | # | Domain/Layer | Paths | Files | Priority |
133
- |---|--------------|-------|-------|----------|
134
- | 1 | [name] | [paths] | [N] | High (hot zone) |
135
- | 2 | [name] | [paths] | [N] | Medium |
136
- | 3 | [name] | [paths] | [N] | Low |
137
-
138
- Proposal: launch [N] deep-scan agents in parallel.
139
-
140
- Validate this split? (yes/modify)
141
- ```
142
-
143
- **Mandatory validation** before continuing.
144
-
145
- ---
146
-
147
- ## Step 6: Output
148
-
149
- Return to the orchestrator:
150
- - Detected tech stack
151
- - Validated split (list of domains with paths)
152
- - Existing docs: relevant or obsolete (+ paths if relevant)
153
- - MCP data (if scanned)
154
- - Git hot zones (if converged with scan-git)