karajan-code 3.5.0 → 3.5.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.
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
> **v3.5.
|
|
26
|
+
> **v3.5.1 released** — PHP joins the quality harness as a first-class language: `kj harden` now detects `composer.json`, installs PHP-native hooks (`phpstan` / `php-cs-fixer` / `phpunit`), a `phpstan.neon` config and a `setup-php` CI workflow — same as JS/Python/Go, no npm/Node imposed at commit time. Builds on v3.5.0's quality harness (`kj harden` + `kj check`): idempotent git hooks, config, CI gates and agent guidelines for any repo, behind `kj:managed` markers. Full notes in [CHANGELOG.md](CHANGELOG.md).
|
|
27
27
|
|
|
28
28
|
You describe what you want to build. Karajan orchestrates multiple AI agents to plan it, implement it, test it, review it with SonarQube, and iterate. No babysitting required.
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -103,10 +103,15 @@ export const JS_CONFIGS = [
|
|
|
103
103
|
export const PY_CONFIGS = [{ file: "ruff.toml", blockId: "ruff", style: "hash", body: RUFF_BODY }];
|
|
104
104
|
export const GO_CONFIGS = [{ file: ".golangci.yml", blockId: "golangci", style: "hash", body: GOLANGCI_BODY }];
|
|
105
105
|
|
|
106
|
+
// PHPStan static analysis — the PHP analogue of ruff/golangci.
|
|
107
|
+
export const PHPSTAN_BODY = ["parameters:", " level: 6", " paths:", " - src", " - tests"].join("\n");
|
|
108
|
+
export const PHP_CONFIGS = [{ file: "phpstan.neon", blockId: "phpstan", style: "hash", body: PHPSTAN_BODY }];
|
|
109
|
+
|
|
106
110
|
/** Lint/format configs by detected language. Unknown ⇒ universal only. */
|
|
107
111
|
export const CONFIGS_BY_LANGUAGE = {
|
|
108
112
|
javascript: JS_CONFIGS,
|
|
109
113
|
typescript: JS_CONFIGS,
|
|
110
114
|
python: PY_CONFIGS,
|
|
111
115
|
go: GO_CONFIGS,
|
|
116
|
+
php: PHP_CONFIGS,
|
|
112
117
|
};
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
export const COMMANDS_BY_LANGUAGE = {
|
|
13
13
|
python: { lint: "ruff check .", format: "ruff format --check .", test: "pytest" },
|
|
14
14
|
go: { lint: "go vet ./...", format: 'test -z "$(gofmt -l .)"', test: "go test ./..." },
|
|
15
|
+
php: {
|
|
16
|
+
lint: "vendor/bin/phpstan analyse --no-progress",
|
|
17
|
+
format: "vendor/bin/php-cs-fixer fix --dry-run --diff",
|
|
18
|
+
test: "vendor/bin/phpunit",
|
|
19
|
+
},
|
|
15
20
|
};
|
|
16
21
|
|
|
17
22
|
/** Native commands for a language, or {} when JS/TS or unknown. */
|
|
@@ -39,6 +39,7 @@ export function languageAt(dir) {
|
|
|
39
39
|
}
|
|
40
40
|
if (["pyproject.toml", "requirements.txt", "setup.py"].some((f) => existsSync(join(dir, f)))) return "python";
|
|
41
41
|
if (existsSync(join(dir, "go.mod"))) return "go";
|
|
42
|
+
if (existsSync(join(dir, "composer.json"))) return "php";
|
|
42
43
|
return null;
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -78,6 +78,14 @@ const QUALITY_BY_LANGUAGE = {
|
|
|
78
78
|
" - run: go vet ./...",
|
|
79
79
|
" - run: go test ./...",
|
|
80
80
|
]),
|
|
81
|
+
php: header([
|
|
82
|
+
" - uses: shivammathur/setup-php@v2",
|
|
83
|
+
" with:",
|
|
84
|
+
" php-version: '8.3'",
|
|
85
|
+
" - run: composer install --no-interaction --no-progress",
|
|
86
|
+
" - run: vendor/bin/phpstan analyse --no-progress",
|
|
87
|
+
" - run: vendor/bin/phpunit",
|
|
88
|
+
]),
|
|
81
89
|
};
|
|
82
90
|
QUALITY_BY_LANGUAGE.typescript = QUALITY_BY_LANGUAGE.javascript;
|
|
83
91
|
|