@@ -62,3 +62,48 @@ Reads `#[Serialize]` attributes:
6262$result = $serializer->serialize($dto, 'json', ['public']);
6363$object = $serializer->deserialize($json, UserDto::class, 'json');
6464```
65+
66+ ## Quality Gate (kcode DevKit)
67+
68+ This component uses ` kcode ` (KaririCode DevKit global binary) for all quality checks.
69+ See [ ARFA Spec V4.0 §16] ( https://github.com/KaririCode-Framework/kariricode-devkit ) for the full infrastructure standard.
70+
71+ ### Bootstrap (once per machine/CI)
72+
73+ ``` bash
74+ # Install kcode globally
75+ curl -L https://github.com/KaririCode-Framework/kariricode-devkit/releases/latest/download/kcode.phar \
76+ -o /usr/local/bin/kcode && chmod +x /usr/local/bin/kcode
77+
78+ # Bootstrap project toolchain
79+ kcode init
80+ ```
81+
82+ ### Common Commands
83+
84+ | Command | Description |
85+ | ---------| -------------|
86+ | ` kcode quality ` | Full pipeline: cs-fix → analyse → test |
87+ | ` kcode test ` | PHPUnit + pcov coverage |
88+ | ` kcode analyse ` | PHPStan L9 + Psalm L1 |
89+ | ` kcode cs:fix ` | Apply KaririCode code style |
90+ | ` kcode cs:fix --check ` | Dry-run style check |
91+ | ` kcode security ` | ` composer audit ` vulnerability scan |
92+
93+ ### Internal Tool Direct Access
94+
95+ After ` kcode init ` , tools are under ` .kcode/vendor/bin/ ` :
96+
97+ ``` bash
98+ # PHPStan with custom flags
99+ .kcode/vendor/bin/phpstan analyse --level=9 --configuration=.kcode/phpstan.neon src/
100+
101+ # Psalm — auto-add #[Override]
102+ .kcode/vendor/bin/psalm --config=.kcode/psalm.xml --alter --issues=MissingOverrideAttribute
103+
104+ # php-cs-fixer — preview diff
105+ .kcode/vendor/bin/php-cs-fixer fix --config=.kcode/php-cs-fixer.php --dry-run --diff
106+
107+ # PHPUnit — single test filter
108+ .kcode/vendor/bin/phpunit --configuration=.kcode/phpunit.xml.dist --filter=testMyMethod
109+ ```
0 commit comments