@pipemd-core/pipemd 1.0.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 (96) hide show
  1. package/AI_SETUP_PIPEMD.md +184 -0
  2. package/CHANGELOG.md +47 -0
  3. package/LICENSE +15 -0
  4. package/README.md +535 -0
  5. package/dist/index.js +6647 -0
  6. package/dist/plugins/opencode-server.js +235 -0
  7. package/dist/plugins/opencode-tui.js +914 -0
  8. package/dist/templates/agent-decision-tree.md +113 -0
  9. package/dist/templates/static-rules.md +7 -0
  10. package/package.json +68 -0
  11. package/scripts/C-CPP/architecture/arch.sh +229 -0
  12. package/scripts/C-CPP/lib/limit.sh +146 -0
  13. package/scripts/C-CPP/project/class-diagram.sh +96 -0
  14. package/scripts/C-CPP/project/cmake-targets.sh +68 -0
  15. package/scripts/C-CPP/project/deps.sh +44 -0
  16. package/scripts/C-CPP/project/find-todos.sh +6 -0
  17. package/scripts/C-CPP/project/include-graph.sh +110 -0
  18. package/scripts/C-CPP/project/interfaces.sh +108 -0
  19. package/scripts/C-CPP/project/tree.sh +5 -0
  20. package/scripts/C-CPP/quality/lint.sh +14 -0
  21. package/scripts/C-CPP/quality/test-summary.sh +22 -0
  22. package/scripts/C-CPP/quality/type-check.sh +26 -0
  23. package/scripts/DevOps/architecture/arch.sh +186 -0
  24. package/scripts/DevOps/devops/aws-context.sh +34 -0
  25. package/scripts/DevOps/devops/docker-stats.sh +42 -0
  26. package/scripts/DevOps/devops/k8s-unhealthy.sh +41 -0
  27. package/scripts/DevOps/devops/tf-state.sh +65 -0
  28. package/scripts/DevOps/lib/limit.sh +143 -0
  29. package/scripts/Generic/architecture/arch.sh +570 -0
  30. package/scripts/Generic/lib/limit.sh +140 -0
  31. package/scripts/Go/architecture/arch.sh +79 -0
  32. package/scripts/Go/lib/limit.sh +142 -0
  33. package/scripts/Go/project/deps.sh +35 -0
  34. package/scripts/Go/project/find-todos.sh +6 -0
  35. package/scripts/Go/project/go-interfaces.sh +18 -0
  36. package/scripts/Go/project/go-packages.sh +28 -0
  37. package/scripts/Go/project/tree.sh +5 -0
  38. package/scripts/Go/quality/lint.sh +16 -0
  39. package/scripts/Go/quality/test-summary.sh +16 -0
  40. package/scripts/Go/quality/type-check.sh +16 -0
  41. package/scripts/Node-TypeScript/api/express-routes.sh +14 -0
  42. package/scripts/Node-TypeScript/api/nest-controllers.sh +18 -0
  43. package/scripts/Node-TypeScript/architecture/arch.sh +174 -0
  44. package/scripts/Node-TypeScript/frontend/angular-routes.sh +15 -0
  45. package/scripts/Node-TypeScript/frontend/nextjs-app-router.sh +13 -0
  46. package/scripts/Node-TypeScript/frontend/react-components.sh +20 -0
  47. package/scripts/Node-TypeScript/lib/limit.sh +146 -0
  48. package/scripts/Node-TypeScript/project/deps.sh +15 -0
  49. package/scripts/Node-TypeScript/project/find-todos.sh +6 -0
  50. package/scripts/Node-TypeScript/quality/lint.sh +10 -0
  51. package/scripts/Node-TypeScript/quality/test-summary.sh +39 -0
  52. package/scripts/Node-TypeScript/quality/type-check.sh +10 -0
  53. package/scripts/Python/api/fastapi-routes.sh +12 -0
  54. package/scripts/Python/architecture/arch.sh +220 -0
  55. package/scripts/Python/db/django-models.sh +12 -0
  56. package/scripts/Python/db/sqlalchemy.sh +17 -0
  57. package/scripts/Python/lib/limit.sh +144 -0
  58. package/scripts/Python/project/deps.sh +28 -0
  59. package/scripts/Python/project/find-todos.sh +6 -0
  60. package/scripts/Python/quality/lint.sh +13 -0
  61. package/scripts/Python/quality/test-summary.sh +11 -0
  62. package/scripts/Python/quality/type-check.sh +10 -0
  63. package/scripts/Rust/architecture/arch.sh +176 -0
  64. package/scripts/Rust/lib/limit.sh +142 -0
  65. package/scripts/Rust/project/cargo-deps.sh +42 -0
  66. package/scripts/Rust/project/cargo-features.sh +26 -0
  67. package/scripts/Rust/project/find-todos.sh +6 -0
  68. package/scripts/Rust/project/tree.sh +5 -0
  69. package/scripts/Rust/quality/lint.sh +16 -0
  70. package/scripts/Rust/quality/test-summary.sh +16 -0
  71. package/scripts/Rust/quality/type-check.sh +16 -0
  72. package/scripts/Shared/api/express-routes.sh +11 -0
  73. package/scripts/Shared/api/fastapi-routes.sh +10 -0
  74. package/scripts/Shared/api/nest-controllers.sh +22 -0
  75. package/scripts/Shared/architecture/normalize.sh +178 -0
  76. package/scripts/Shared/crew/crew.sh +15 -0
  77. package/scripts/Shared/db/django-models.sh +11 -0
  78. package/scripts/Shared/db/prisma.sh +33 -0
  79. package/scripts/Shared/db/sqlalchemy.sh +12 -0
  80. package/scripts/Shared/frontend/angular-routes.sh +11 -0
  81. package/scripts/Shared/frontend/nextjs-app-router.sh +13 -0
  82. package/scripts/Shared/frontend/react-components.sh +11 -0
  83. package/scripts/Shared/git/diff-stat.sh +6 -0
  84. package/scripts/Shared/git/git-branch.sh +16 -0
  85. package/scripts/Shared/git/git-log.sh +6 -0
  86. package/scripts/Shared/git/git-status.sh +6 -0
  87. package/scripts/Shared/lib/limit.sh +144 -0
  88. package/scripts/Shared/project/compose-md.sh +182 -0
  89. package/scripts/Shared/project/deps.sh +69 -0
  90. package/scripts/Shared/project/find-todos.sh +6 -0
  91. package/scripts/Shared/project/tree.sh +5 -0
  92. package/scripts/Shared/quality/lint.sh +81 -0
  93. package/scripts/Shared/quality/test-summary.sh +103 -0
  94. package/scripts/Shared/quality/type-check.sh +114 -0
  95. package/scripts/copy-plugins.mjs +4 -0
  96. package/scripts/copy-templates.mjs +5 -0
@@ -0,0 +1,114 @@
1
+ #!/usr/bin/env bash
2
+ set -uo pipefail
3
+ # Auto-detect type checker and run, prioritizing detected ecosystem
4
+ source "$(dirname "$0")/../lib/limit.sh"
5
+
6
+ eco="${PMD_ECOSYSTEM:-}"
7
+
8
+ case "$eco" in
9
+ Node-TypeScript)
10
+ if [ -f tsconfig.json ] && command -v npx &>/dev/null; then
11
+ out=$(npx tsc --noEmit 2>&1 | head -20)
12
+ if [ -z "$out" ]; then
13
+ echo "No type errors"
14
+ exit 0
15
+ fi
16
+ limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -5 && echo '... more type errors')"
17
+ exit 0
18
+ fi
19
+ echo "No TypeScript compiler found"
20
+ exit 0
21
+ ;;
22
+ Python)
23
+ if command -v mypy &>/dev/null || command -v python &>/dev/null; then
24
+ out=$(python -m mypy . 2>&1 | head -20)
25
+ if [ -z "$out" ]; then
26
+ echo "No type errors"
27
+ exit 0
28
+ fi
29
+ limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -5 && echo '... more mypy errors')"
30
+ exit 0
31
+ fi
32
+ echo "No mypy found"
33
+ exit 0
34
+ ;;
35
+ C-CPP)
36
+ if [ -f CMakeLists.txt ] && [ -d build ]; then
37
+ out=$(cmake --build build 2>&1 | grep -E 'warning:|error:' | head -20)
38
+ if [ -z "$out" ]; then
39
+ echo "No compiler warnings"
40
+ exit 0
41
+ fi
42
+ limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more compiler warnings')"
43
+ exit 0
44
+ fi
45
+ echo "No CMake build directory found"
46
+ exit 0
47
+ ;;
48
+ Rust)
49
+ if command -v cargo &>/dev/null && [ -f Cargo.toml ]; then
50
+ out=$(cargo check 2>&1 | grep -E '^error' | head -20)
51
+ if [ -z "$out" ]; then
52
+ echo "No type errors"
53
+ exit 0
54
+ fi
55
+ limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more type errors')"
56
+ exit 0
57
+ fi
58
+ echo "No cargo found"
59
+ exit 0
60
+ ;;
61
+ Go)
62
+ if command -v go &>/dev/null && [ -f go.mod ]; then
63
+ out=$(go build ./... 2>&1 | head -20)
64
+ if [ -z "$out" ]; then
65
+ echo "No build errors"
66
+ exit 0
67
+ fi
68
+ limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more build errors')"
69
+ exit 0
70
+ fi
71
+ echo "No go found"
72
+ exit 0
73
+ ;;
74
+ esac
75
+
76
+ # Generic: auto-detect
77
+ if [ -f tsconfig.json ] && command -v npx &>/dev/null; then
78
+ out=$(npx tsc --noEmit 2>&1 | head -20)
79
+ if [ -z "$out" ]; then
80
+ echo "No type errors"
81
+ exit 0
82
+ fi
83
+ limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -5 && echo '... more type errors')"
84
+ elif command -v mypy &>/dev/null || [ -f pyproject.toml ]; then
85
+ out=$(python -m mypy . 2>&1 | head -20)
86
+ if [ -z "$out" ]; then
87
+ echo "No type errors"
88
+ exit 0
89
+ fi
90
+ limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -5 && echo '... more mypy errors')"
91
+ elif [ -f CMakeLists.txt ] && [ -d build ]; then
92
+ out=$(cmake --build build 2>&1 | grep -E 'warning:|error:' | head -20)
93
+ if [ -z "$out" ]; then
94
+ echo "No compiler warnings"
95
+ exit 0
96
+ fi
97
+ limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more compiler warnings')"
98
+ elif command -v cargo &>/dev/null && [ -f Cargo.toml ]; then
99
+ out=$(cargo check 2>&1 | grep -E '^error' | head -20)
100
+ if [ -z "$out" ]; then
101
+ echo "No type errors"
102
+ exit 0
103
+ fi
104
+ limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more type errors')"
105
+ elif command -v go &>/dev/null && [ -f go.mod ]; then
106
+ out=$(go build ./... 2>&1 | head -20)
107
+ if [ -z "$out" ]; then
108
+ echo "No build errors"
109
+ exit 0
110
+ fi
111
+ limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more build errors')"
112
+ else
113
+ echo "No type checker configured for this ecosystem"
114
+ fi
@@ -0,0 +1,4 @@
1
+ import { mkdirSync, copyFileSync } from "node:fs";
2
+ mkdirSync("dist/plugins", { recursive: true });
3
+ copyFileSync("src/plugins/opencode-server.js", "dist/plugins/opencode-server.js");
4
+ copyFileSync("src/plugins/opencode-tui.js", "dist/plugins/opencode-tui.js");
@@ -0,0 +1,5 @@
1
+ import { mkdirSync, readdirSync, copyFileSync } from "node:fs";
2
+ mkdirSync("dist/templates", { recursive: true });
3
+ for (const f of readdirSync("templates")) {
4
+ if (f.endsWith(".md")) copyFileSync(`templates/${f}`, `dist/templates/${f}`);
5
+ }