hardness 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.
- package/AGENTS.md +129 -0
- package/CHANGELOG.md +27 -0
- package/LICENSE +21 -0
- package/README.md +269 -0
- package/node_modules/@hardness/analyzers/README.md +31 -0
- package/node_modules/@hardness/analyzers/dist/generic.d.ts +6 -0
- package/node_modules/@hardness/analyzers/dist/generic.js +13 -0
- package/node_modules/@hardness/analyzers/dist/generic.js.map +1 -0
- package/node_modules/@hardness/analyzers/dist/index.d.ts +26 -0
- package/node_modules/@hardness/analyzers/dist/index.js +40 -0
- package/node_modules/@hardness/analyzers/dist/index.js.map +1 -0
- package/node_modules/@hardness/analyzers/dist/typescript-node.d.ts +6 -0
- package/node_modules/@hardness/analyzers/dist/typescript-node.js +110 -0
- package/node_modules/@hardness/analyzers/dist/typescript-node.js.map +1 -0
- package/node_modules/@hardness/analyzers/package.json +47 -0
- package/node_modules/@hardness/core/README.md +20 -0
- package/node_modules/@hardness/core/dist/agent/adapter.d.ts +12 -0
- package/node_modules/@hardness/core/dist/agent/adapter.js +32 -0
- package/node_modules/@hardness/core/dist/agent/adapter.js.map +1 -0
- package/node_modules/@hardness/core/dist/agent/context-gen.d.ts +7 -0
- package/node_modules/@hardness/core/dist/agent/context-gen.js +12 -0
- package/node_modules/@hardness/core/dist/agent/context-gen.js.map +1 -0
- package/node_modules/@hardness/core/dist/common/logger.d.ts +17 -0
- package/node_modules/@hardness/core/dist/common/logger.js +59 -0
- package/node_modules/@hardness/core/dist/common/logger.js.map +1 -0
- package/node_modules/@hardness/core/dist/common/paths.d.ts +22 -0
- package/node_modules/@hardness/core/dist/common/paths.js +72 -0
- package/node_modules/@hardness/core/dist/common/paths.js.map +1 -0
- package/node_modules/@hardness/core/dist/common/preflight.d.ts +9 -0
- package/node_modules/@hardness/core/dist/common/preflight.js +69 -0
- package/node_modules/@hardness/core/dist/common/preflight.js.map +1 -0
- package/node_modules/@hardness/core/dist/common/subprocess.d.ts +18 -0
- package/node_modules/@hardness/core/dist/common/subprocess.js +79 -0
- package/node_modules/@hardness/core/dist/common/subprocess.js.map +1 -0
- package/node_modules/@hardness/core/dist/common/types.d.ts +77 -0
- package/node_modules/@hardness/core/dist/common/types.js +2 -0
- package/node_modules/@hardness/core/dist/common/types.js.map +1 -0
- package/node_modules/@hardness/core/dist/config/manager.d.ts +31 -0
- package/node_modules/@hardness/core/dist/config/manager.js +97 -0
- package/node_modules/@hardness/core/dist/config/manager.js.map +1 -0
- package/node_modules/@hardness/core/dist/config/schema.d.ts +210 -0
- package/node_modules/@hardness/core/dist/config/schema.js +41 -0
- package/node_modules/@hardness/core/dist/config/schema.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/analyzer-gate.d.ts +6 -0
- package/node_modules/@hardness/core/dist/gates/analyzer-gate.js +37 -0
- package/node_modules/@hardness/core/dist/gates/analyzer-gate.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/dependency.d.ts +5 -0
- package/node_modules/@hardness/core/dist/gates/dependency.js +71 -0
- package/node_modules/@hardness/core/dist/gates/dependency.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/engine.d.ts +26 -0
- package/node_modules/@hardness/core/dist/gates/engine.js +68 -0
- package/node_modules/@hardness/core/dist/gates/engine.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/execution.d.ts +9 -0
- package/node_modules/@hardness/core/dist/gates/execution.js +88 -0
- package/node_modules/@hardness/core/dist/gates/execution.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/generic.d.ts +21 -0
- package/node_modules/@hardness/core/dist/gates/generic.js +204 -0
- package/node_modules/@hardness/core/dist/gates/generic.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/import-resolver.d.ts +6 -0
- package/node_modules/@hardness/core/dist/gates/import-resolver.js +78 -0
- package/node_modules/@hardness/core/dist/gates/import-resolver.js.map +1 -0
- package/node_modules/@hardness/core/dist/index.d.ts +23 -0
- package/node_modules/@hardness/core/dist/index.js +30 -0
- package/node_modules/@hardness/core/dist/index.js.map +1 -0
- package/node_modules/@hardness/core/dist/locks/harness-guard.d.ts +32 -0
- package/node_modules/@hardness/core/dist/locks/harness-guard.js +121 -0
- package/node_modules/@hardness/core/dist/locks/harness-guard.js.map +1 -0
- package/node_modules/@hardness/core/dist/locks/sprint-lock.d.ts +39 -0
- package/node_modules/@hardness/core/dist/locks/sprint-lock.js +143 -0
- package/node_modules/@hardness/core/dist/locks/sprint-lock.js.map +1 -0
- package/node_modules/@hardness/core/dist/orchestrator.d.ts +8 -0
- package/node_modules/@hardness/core/dist/orchestrator.js +160 -0
- package/node_modules/@hardness/core/dist/orchestrator.js.map +1 -0
- package/node_modules/@hardness/core/dist/security/policy.d.ts +10 -0
- package/node_modules/@hardness/core/dist/security/policy.js +32 -0
- package/node_modules/@hardness/core/dist/security/policy.js.map +1 -0
- package/node_modules/@hardness/core/dist/security/redactor.d.ts +5 -0
- package/node_modules/@hardness/core/dist/security/redactor.js +40 -0
- package/node_modules/@hardness/core/dist/security/redactor.js.map +1 -0
- package/node_modules/@hardness/core/dist/sprint/context.d.ts +27 -0
- package/node_modules/@hardness/core/dist/sprint/context.js +119 -0
- package/node_modules/@hardness/core/dist/sprint/context.js.map +1 -0
- package/node_modules/@hardness/core/dist/sprint/scorer.d.ts +20 -0
- package/node_modules/@hardness/core/dist/sprint/scorer.js +109 -0
- package/node_modules/@hardness/core/dist/sprint/scorer.js.map +1 -0
- package/node_modules/@hardness/core/dist/sprint/status.d.ts +20 -0
- package/node_modules/@hardness/core/dist/sprint/status.js +81 -0
- package/node_modules/@hardness/core/dist/sprint/status.js.map +1 -0
- package/node_modules/@hardness/core/dist/sprint/validator.d.ts +17 -0
- package/node_modules/@hardness/core/dist/sprint/validator.js +239 -0
- package/node_modules/@hardness/core/dist/sprint/validator.js.map +1 -0
- package/node_modules/@hardness/core/package.json +53 -0
- package/node_modules/@hardness/prompts/README.md +30 -0
- package/node_modules/@hardness/prompts/dist/index.d.ts +21 -0
- package/node_modules/@hardness/prompts/dist/index.js +63 -0
- package/node_modules/@hardness/prompts/dist/index.js.map +1 -0
- package/node_modules/@hardness/prompts/package.json +46 -0
- package/node_modules/picocolors/LICENSE +15 -0
- package/node_modules/picocolors/README.md +21 -0
- package/node_modules/picocolors/package.json +25 -0
- package/node_modules/picocolors/picocolors.browser.js +4 -0
- package/node_modules/picocolors/picocolors.d.ts +5 -0
- package/node_modules/picocolors/picocolors.js +75 -0
- package/node_modules/picocolors/types.d.ts +51 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/package.json +118 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5136 -0
- package/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1594 -0
- package/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +134 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/node_modules/zod/src/v4/core/function.ts +176 -0
- package/node_modules/zod/src/v4/core/index.ts +15 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/node_modules/zod/src/v4/core/util.ts +775 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +125 -0
- package/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +111 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3775 -0
- package/node_modules/zod/v3/types.d.cts +1031 -0
- package/node_modules/zod/v3/types.d.ts +1031 -0
- package/node_modules/zod/v3/types.js +3693 -0
- package/node_modules/zod/v4/classic/checks.cjs +32 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +57 -0
- package/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/node_modules/zod/v4/classic/compat.js +27 -0
- package/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +41 -0
- package/node_modules/zod/v4/classic/external.cjs +70 -0
- package/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/node_modules/zod/v4/classic/external.js +18 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/node_modules/zod/v4/classic/parse.js +6 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/node_modules/zod/v4/core/api.cjs +1039 -0
- package/node_modules/zod/v4/core/api.d.cts +284 -0
- package/node_modules/zod/v4/core/api.d.ts +284 -0
- package/node_modules/zod/v4/core/api.js +906 -0
- package/node_modules/zod/v4/core/checks.cjs +591 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +565 -0
- package/node_modules/zod/v4/core/core.cjs +67 -0
- package/node_modules/zod/v4/core/core.d.cts +49 -0
- package/node_modules/zod/v4/core/core.d.ts +49 -0
- package/node_modules/zod/v4/core/core.js +61 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +226 -0
- package/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/node_modules/zod/v4/core/errors.js +195 -0
- package/node_modules/zod/v4/core/function.cjs +102 -0
- package/node_modules/zod/v4/core/function.d.cts +52 -0
- package/node_modules/zod/v4/core/function.d.ts +52 -0
- package/node_modules/zod/v4/core/function.js +75 -0
- package/node_modules/zod/v4/core/index.cjs +44 -0
- package/node_modules/zod/v4/core/index.d.cts +15 -0
- package/node_modules/zod/v4/core/index.d.ts +15 -0
- package/node_modules/zod/v4/core/index.js +15 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/parse.cjs +87 -0
- package/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/node_modules/zod/v4/core/parse.js +57 -0
- package/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/node_modules/zod/v4/core/regexes.js +95 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +1748 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/node_modules/zod/v4/core/schemas.js +1717 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/node_modules/zod/v4/core/util.cjs +539 -0
- package/node_modules/zod/v4/core/util.d.cts +183 -0
- package/node_modules/zod/v4/core/util.d.ts +183 -0
- package/node_modules/zod/v4/core/util.js +493 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +116 -0
- package/node_modules/zod/v4/locales/az.cjs +141 -0
- package/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +115 -0
- package/node_modules/zod/v4/locales/be.cjs +190 -0
- package/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +164 -0
- package/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +118 -0
- package/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +135 -0
- package/node_modules/zod/v4/locales/de.cjs +142 -0
- package/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +116 -0
- package/node_modules/zod/v4/locales/en.cjs +145 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/node_modules/zod/v4/locales/en.js +117 -0
- package/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/node_modules/zod/v4/locales/eo.js +116 -0
- package/node_modules/zod/v4/locales/es.cjs +143 -0
- package/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +117 -0
- package/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +122 -0
- package/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +122 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +116 -0
- package/node_modules/zod/v4/locales/he.cjs +143 -0
- package/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +117 -0
- package/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +117 -0
- package/node_modules/zod/v4/locales/id.cjs +142 -0
- package/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +116 -0
- package/node_modules/zod/v4/locales/index.cjs +84 -0
- package/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/node_modules/zod/v4/locales/index.js +39 -0
- package/node_modules/zod/v4/locales/it.cjs +143 -0
- package/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +117 -0
- package/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +115 -0
- package/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/node_modules/zod/v4/locales/kh.js +117 -0
- package/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +121 -0
- package/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +118 -0
- package/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +116 -0
- package/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +117 -0
- package/node_modules/zod/v4/locales/no.cjs +142 -0
- package/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +116 -0
- package/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +117 -0
- package/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +117 -0
- package/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +122 -0
- package/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +116 -0
- package/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +164 -0
- package/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +117 -0
- package/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +118 -0
- package/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +143 -0
- package/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +117 -0
- package/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/node_modules/zod/v4/locales/tr.js +115 -0
- package/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/node_modules/zod/v4/locales/ua.js +117 -0
- package/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +117 -0
- package/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +116 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +47 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +17 -0
- package/node_modules/zod/v4/mini/external.cjs +62 -0
- package/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/node_modules/zod/v4/mini/external.js +13 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +60 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +30 -0
- package/node_modules/zod/v4/mini/parse.cjs +8 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +839 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/node_modules/zod/v4/mini/schemas.js +732 -0
- package/node_modules/zod/v4-mini/index.cjs +17 -0
- package/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/zod/v4-mini/index.js +1 -0
- package/package.json +80 -0
- package/packages/analyzers/README.md +31 -0
- package/packages/analyzers/dist/generic.d.ts +6 -0
- package/packages/analyzers/dist/generic.js +13 -0
- package/packages/analyzers/dist/generic.js.map +1 -0
- package/packages/analyzers/dist/index.d.ts +26 -0
- package/packages/analyzers/dist/index.js +40 -0
- package/packages/analyzers/dist/index.js.map +1 -0
- package/packages/analyzers/dist/typescript-node.d.ts +6 -0
- package/packages/analyzers/dist/typescript-node.js +110 -0
- package/packages/analyzers/dist/typescript-node.js.map +1 -0
- package/packages/analyzers/package.json +47 -0
- package/packages/cli/README.md +27 -0
- package/packages/cli/dist/commands/audit.d.ts +2 -0
- package/packages/cli/dist/commands/audit.js +36 -0
- package/packages/cli/dist/commands/audit.js.map +1 -0
- package/packages/cli/dist/commands/discover.d.ts +2 -0
- package/packages/cli/dist/commands/discover.js +12 -0
- package/packages/cli/dist/commands/discover.js.map +1 -0
- package/packages/cli/dist/commands/dry-run.d.ts +2 -0
- package/packages/cli/dist/commands/dry-run.js +47 -0
- package/packages/cli/dist/commands/dry-run.js.map +1 -0
- package/packages/cli/dist/commands/init.d.ts +2 -0
- package/packages/cli/dist/commands/init.js +93 -0
- package/packages/cli/dist/commands/init.js.map +1 -0
- package/packages/cli/dist/commands/plan.d.ts +2 -0
- package/packages/cli/dist/commands/plan.js +12 -0
- package/packages/cli/dist/commands/plan.js.map +1 -0
- package/packages/cli/dist/commands/run.d.ts +2 -0
- package/packages/cli/dist/commands/run.js +23 -0
- package/packages/cli/dist/commands/run.js.map +1 -0
- package/packages/cli/dist/commands/score.d.ts +2 -0
- package/packages/cli/dist/commands/score.js +51 -0
- package/packages/cli/dist/commands/score.js.map +1 -0
- package/packages/cli/dist/commands/spec.d.ts +2 -0
- package/packages/cli/dist/commands/spec.js +12 -0
- package/packages/cli/dist/commands/spec.js.map +1 -0
- package/packages/cli/dist/commands/status.d.ts +2 -0
- package/packages/cli/dist/commands/status.js +48 -0
- package/packages/cli/dist/commands/status.js.map +1 -0
- package/packages/cli/dist/commands/validate.d.ts +2 -0
- package/packages/cli/dist/commands/validate.js +57 -0
- package/packages/cli/dist/commands/validate.js.map +1 -0
- package/packages/cli/dist/dispatcher.d.ts +1 -0
- package/packages/cli/dist/dispatcher.js +128 -0
- package/packages/cli/dist/dispatcher.js.map +1 -0
- package/packages/cli/dist/index.d.ts +3 -0
- package/packages/cli/dist/index.js +60 -0
- package/packages/cli/dist/index.js.map +1 -0
- package/packages/cli/package.json +58 -0
- package/packages/core/README.md +20 -0
- package/packages/core/dist/agent/adapter.d.ts +12 -0
- package/packages/core/dist/agent/adapter.js +32 -0
- package/packages/core/dist/agent/adapter.js.map +1 -0
- package/packages/core/dist/agent/context-gen.d.ts +7 -0
- package/packages/core/dist/agent/context-gen.js +12 -0
- package/packages/core/dist/agent/context-gen.js.map +1 -0
- package/packages/core/dist/common/logger.d.ts +17 -0
- package/packages/core/dist/common/logger.js +59 -0
- package/packages/core/dist/common/logger.js.map +1 -0
- package/packages/core/dist/common/paths.d.ts +22 -0
- package/packages/core/dist/common/paths.js +72 -0
- package/packages/core/dist/common/paths.js.map +1 -0
- package/packages/core/dist/common/preflight.d.ts +9 -0
- package/packages/core/dist/common/preflight.js +69 -0
- package/packages/core/dist/common/preflight.js.map +1 -0
- package/packages/core/dist/common/subprocess.d.ts +18 -0
- package/packages/core/dist/common/subprocess.js +79 -0
- package/packages/core/dist/common/subprocess.js.map +1 -0
- package/packages/core/dist/common/types.d.ts +77 -0
- package/packages/core/dist/common/types.js +2 -0
- package/packages/core/dist/common/types.js.map +1 -0
- package/packages/core/dist/config/manager.d.ts +31 -0
- package/packages/core/dist/config/manager.js +97 -0
- package/packages/core/dist/config/manager.js.map +1 -0
- package/packages/core/dist/config/schema.d.ts +210 -0
- package/packages/core/dist/config/schema.js +41 -0
- package/packages/core/dist/config/schema.js.map +1 -0
- package/packages/core/dist/gates/analyzer-gate.d.ts +6 -0
- package/packages/core/dist/gates/analyzer-gate.js +37 -0
- package/packages/core/dist/gates/analyzer-gate.js.map +1 -0
- package/packages/core/dist/gates/dependency.d.ts +5 -0
- package/packages/core/dist/gates/dependency.js +71 -0
- package/packages/core/dist/gates/dependency.js.map +1 -0
- package/packages/core/dist/gates/engine.d.ts +26 -0
- package/packages/core/dist/gates/engine.js +68 -0
- package/packages/core/dist/gates/engine.js.map +1 -0
- package/packages/core/dist/gates/execution.d.ts +9 -0
- package/packages/core/dist/gates/execution.js +88 -0
- package/packages/core/dist/gates/execution.js.map +1 -0
- package/packages/core/dist/gates/generic.d.ts +21 -0
- package/packages/core/dist/gates/generic.js +204 -0
- package/packages/core/dist/gates/generic.js.map +1 -0
- package/packages/core/dist/gates/import-resolver.d.ts +6 -0
- package/packages/core/dist/gates/import-resolver.js +78 -0
- package/packages/core/dist/gates/import-resolver.js.map +1 -0
- package/packages/core/dist/index.d.ts +23 -0
- package/packages/core/dist/index.js +30 -0
- package/packages/core/dist/index.js.map +1 -0
- package/packages/core/dist/locks/harness-guard.d.ts +32 -0
- package/packages/core/dist/locks/harness-guard.js +121 -0
- package/packages/core/dist/locks/harness-guard.js.map +1 -0
- package/packages/core/dist/locks/sprint-lock.d.ts +39 -0
- package/packages/core/dist/locks/sprint-lock.js +143 -0
- package/packages/core/dist/locks/sprint-lock.js.map +1 -0
- package/packages/core/dist/orchestrator.d.ts +8 -0
- package/packages/core/dist/orchestrator.js +160 -0
- package/packages/core/dist/orchestrator.js.map +1 -0
- package/packages/core/dist/security/policy.d.ts +10 -0
- package/packages/core/dist/security/policy.js +32 -0
- package/packages/core/dist/security/policy.js.map +1 -0
- package/packages/core/dist/security/redactor.d.ts +5 -0
- package/packages/core/dist/security/redactor.js +40 -0
- package/packages/core/dist/security/redactor.js.map +1 -0
- package/packages/core/dist/sprint/context.d.ts +27 -0
- package/packages/core/dist/sprint/context.js +119 -0
- package/packages/core/dist/sprint/context.js.map +1 -0
- package/packages/core/dist/sprint/scorer.d.ts +20 -0
- package/packages/core/dist/sprint/scorer.js +109 -0
- package/packages/core/dist/sprint/scorer.js.map +1 -0
- package/packages/core/dist/sprint/status.d.ts +20 -0
- package/packages/core/dist/sprint/status.js +81 -0
- package/packages/core/dist/sprint/status.js.map +1 -0
- package/packages/core/dist/sprint/validator.d.ts +17 -0
- package/packages/core/dist/sprint/validator.js +239 -0
- package/packages/core/dist/sprint/validator.js.map +1 -0
- package/packages/core/package.json +53 -0
- package/packages/prompts/README.md +30 -0
- package/packages/prompts/dist/index.d.ts +21 -0
- package/packages/prompts/dist/index.js +63 -0
- package/packages/prompts/dist/index.js.map +1 -0
- package/packages/prompts/package.json +46 -0
- package/schemas/config.schema.json +62 -0
- package/schemas/context.schema.json +36 -0
- package/schemas/index.schema.json +29 -0
- package/schemas/sprint.schema.json +109 -0
- package/templates/PRD-TEMPLATE.md +36 -0
- package/templates/SPEC-TEMPLATE.md +59 -0
- package/templates/SPRINT-TEMPLATE.json +62 -0
- package/templates/config.example.json +30 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Computes the quality score (0-10) of a Sprint.
|
|
3
|
+
*/
|
|
4
|
+
export function scoreSprint(sprint) {
|
|
5
|
+
const totalFeatures = sprint.features.length;
|
|
6
|
+
if (totalFeatures === 0) {
|
|
7
|
+
return {
|
|
8
|
+
totalScore: 10,
|
|
9
|
+
breakdown: {
|
|
10
|
+
granularity: { score: 10, maxScore: 10, description: 'No features to evaluate' },
|
|
11
|
+
grepGates: { score: 10, maxScore: 10, description: 'No features to evaluate' },
|
|
12
|
+
smokeTests: { score: 10, maxScore: 10, description: 'No features to evaluate' },
|
|
13
|
+
criteriaAndHints: { score: 10, maxScore: 10, description: 'No features to evaluate' },
|
|
14
|
+
titleClarity: { score: 10, maxScore: 10, description: 'No features to evaluate' },
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
// 1. Granularity: target is 1-5 files per feature
|
|
19
|
+
let granularityScore = 10;
|
|
20
|
+
for (const feat of sprint.features) {
|
|
21
|
+
const fileCount = feat.files.length;
|
|
22
|
+
if (fileCount > 5) {
|
|
23
|
+
granularityScore -= (fileCount - 5) * 2; // -2 per extra file
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
granularityScore = Math.max(0, granularityScore);
|
|
27
|
+
// 2. Grep Gates: features should have at least one grepMustMatch or grepMustNotMatch
|
|
28
|
+
let grepGatesScore = 10;
|
|
29
|
+
let featuresWithoutGrep = 0;
|
|
30
|
+
for (const feat of sprint.features) {
|
|
31
|
+
const hasGrepMatch = feat.verification.grepMustMatch && feat.verification.grepMustMatch.length > 0;
|
|
32
|
+
const hasGrepNotMatch = feat.verification.grepMustNotMatch && feat.verification.grepMustNotMatch.length > 0;
|
|
33
|
+
if (!hasGrepMatch && !hasGrepNotMatch) {
|
|
34
|
+
featuresWithoutGrep++;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
grepGatesScore -= (featuresWithoutGrep / totalFeatures) * 10;
|
|
38
|
+
grepGatesScore = Math.max(0, Math.round(grepGatesScore * 10) / 10);
|
|
39
|
+
// 3. Smoke Tests: bonus for having a smoke test (smoke.command)
|
|
40
|
+
let smokeTestsScore = 0;
|
|
41
|
+
let featuresWithSmoke = 0;
|
|
42
|
+
for (const feat of sprint.features) {
|
|
43
|
+
if (feat.verification.smoke && feat.verification.smoke.command) {
|
|
44
|
+
featuresWithSmoke++;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
smokeTestsScore = (featuresWithSmoke / totalFeatures) * 10;
|
|
48
|
+
smokeTestsScore = Math.min(10, Math.round(smokeTestsScore * 10) / 10);
|
|
49
|
+
// 4. Criteria & Hints: AC >= 2, Hints >= 1
|
|
50
|
+
let critHintsScore = 10;
|
|
51
|
+
let invalidFeats = 0;
|
|
52
|
+
for (const feat of sprint.features) {
|
|
53
|
+
const acCount = feat.acceptanceCriteria.length;
|
|
54
|
+
const hintCount = feat.hints.length;
|
|
55
|
+
if (acCount < 2 || hintCount < 1) {
|
|
56
|
+
invalidFeats++;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
critHintsScore -= (invalidFeats / totalFeatures) * 10;
|
|
60
|
+
critHintsScore = Math.max(0, Math.round(critHintsScore * 10) / 10);
|
|
61
|
+
// 5. Title Clarity: title should have >= 3 words
|
|
62
|
+
let titleClarityScore = 10;
|
|
63
|
+
let shortTitles = 0;
|
|
64
|
+
for (const feat of sprint.features) {
|
|
65
|
+
const wordCount = feat.title.trim().split(/\s+/).length;
|
|
66
|
+
if (wordCount < 3) {
|
|
67
|
+
shortTitles++;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
titleClarityScore -= (shortTitles / totalFeatures) * 10;
|
|
71
|
+
titleClarityScore = Math.max(0, Math.round(titleClarityScore * 10) / 10);
|
|
72
|
+
// Weighted average
|
|
73
|
+
const totalScore = (granularityScore * 0.3 +
|
|
74
|
+
grepGatesScore * 0.3 +
|
|
75
|
+
smokeTestsScore * 0.1 +
|
|
76
|
+
critHintsScore * 0.2 +
|
|
77
|
+
titleClarityScore * 0.1);
|
|
78
|
+
return {
|
|
79
|
+
totalScore: Math.min(10, Math.round(totalScore * 10) / 10),
|
|
80
|
+
breakdown: {
|
|
81
|
+
granularity: {
|
|
82
|
+
score: granularityScore,
|
|
83
|
+
maxScore: 10,
|
|
84
|
+
description: granularityScore === 10 ? 'Excellent granularity' : 'Features with too many files'
|
|
85
|
+
},
|
|
86
|
+
grepGates: {
|
|
87
|
+
score: grepGatesScore,
|
|
88
|
+
maxScore: 10,
|
|
89
|
+
description: `${featuresWithoutGrep} of ${totalFeatures} features without grep gates`
|
|
90
|
+
},
|
|
91
|
+
smokeTests: {
|
|
92
|
+
score: smokeTestsScore,
|
|
93
|
+
maxScore: 10,
|
|
94
|
+
description: `${featuresWithSmoke} of ${totalFeatures} features with smoke test`
|
|
95
|
+
},
|
|
96
|
+
criteriaAndHints: {
|
|
97
|
+
score: critHintsScore,
|
|
98
|
+
maxScore: 10,
|
|
99
|
+
description: invalidFeats > 0 ? 'Missing AC or hints in some features' : 'All criteria and hints filled'
|
|
100
|
+
},
|
|
101
|
+
titleClarity: {
|
|
102
|
+
score: titleClarityScore,
|
|
103
|
+
maxScore: 10,
|
|
104
|
+
description: shortTitles > 0 ? 'Titles too short detected' : 'Descriptive, clear titles'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=scorer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scorer.js","sourceRoot":"","sources":["../../src/sprint/scorer.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC7C,IAAI,aAAa,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO;YACL,UAAU,EAAE,EAAE;YACd,SAAS,EAAE;gBACT,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE;gBAChF,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE;gBAC9E,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE;gBAC/E,gBAAgB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE;gBACrF,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE;aAClF;SACF,CAAC;IACJ,CAAC;IAED,kDAAkD;IAClD,IAAI,gBAAgB,GAAG,EAAE,CAAC;IAC1B,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACnC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QACpC,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;YA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/types.js';
|
|
2
|
+
import { HardnessConfig } from '../config/schema.js';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the next feature to work on.
|
|
5
|
+
* Prioritizes 'in-progress' features over 'pending' to avoid silent abandonment.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getNextFeature(sprint: Sprint): Feature | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Updates the status and start/end timestamps of a feature.
|
|
10
|
+
*/
|
|
11
|
+
export declare function updateFeatureStatus(sprint: Sprint, featureId: string, status: FeatureStatus, timestamp?: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* Computes the overall sprint status based on its features' statuses.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getSprintStatus(sprint: Sprint): SprintStatus;
|
|
16
|
+
/**
|
|
17
|
+
* Closes the sprint if all features are done and there are no gate/lock errors.
|
|
18
|
+
* Saves the updated sprint to the specified path.
|
|
19
|
+
*/
|
|
20
|
+
export declare function closeSprint(sprint: Sprint, filePath: string, config: HardnessConfig, customRoot?: string): void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { validateSprint } from './validator.js';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the next feature to work on.
|
|
5
|
+
* Prioritizes 'in-progress' features over 'pending' to avoid silent abandonment.
|
|
6
|
+
*/
|
|
7
|
+
export function getNextFeature(sprint) {
|
|
8
|
+
const inProgress = sprint.features.find(f => f.status === 'in-progress');
|
|
9
|
+
if (inProgress) {
|
|
10
|
+
return inProgress;
|
|
11
|
+
}
|
|
12
|
+
return sprint.features.find(f => f.status === 'pending');
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Updates the status and start/end timestamps of a feature.
|
|
16
|
+
*/
|
|
17
|
+
export function updateFeatureStatus(sprint, featureId, status, timestamp) {
|
|
18
|
+
const feat = sprint.features.find(f => f.id === featureId);
|
|
19
|
+
if (!feat) {
|
|
20
|
+
throw new Error(`Feature with ID "${featureId}" not found in the sprint.`);
|
|
21
|
+
}
|
|
22
|
+
feat.status = status;
|
|
23
|
+
const timeStr = timestamp || new Date().toISOString();
|
|
24
|
+
if (status === 'in-progress') {
|
|
25
|
+
if (!feat.startedAt) {
|
|
26
|
+
feat.startedAt = timeStr;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else if (status === 'done') {
|
|
30
|
+
if (!feat.startedAt) {
|
|
31
|
+
feat.startedAt = timeStr;
|
|
32
|
+
}
|
|
33
|
+
feat.completedAt = timeStr;
|
|
34
|
+
}
|
|
35
|
+
else if (status === 'pending') {
|
|
36
|
+
feat.startedAt = undefined;
|
|
37
|
+
feat.completedAt = undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Computes the overall sprint status based on its features' statuses.
|
|
42
|
+
*/
|
|
43
|
+
export function getSprintStatus(sprint) {
|
|
44
|
+
const total = sprint.features.length;
|
|
45
|
+
if (total === 0)
|
|
46
|
+
return 'done';
|
|
47
|
+
const doneCount = sprint.features.filter(f => f.status === 'done').length;
|
|
48
|
+
const inProgressCount = sprint.features.filter(f => f.status === 'in-progress').length;
|
|
49
|
+
if (doneCount === total) {
|
|
50
|
+
return 'done';
|
|
51
|
+
}
|
|
52
|
+
if (inProgressCount > 0 || doneCount > 0) {
|
|
53
|
+
return 'in-progress';
|
|
54
|
+
}
|
|
55
|
+
return 'pending';
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Closes the sprint if all features are done and there are no gate/lock errors.
|
|
59
|
+
* Saves the updated sprint to the specified path.
|
|
60
|
+
*/
|
|
61
|
+
export function closeSprint(sprint, filePath, config, customRoot) {
|
|
62
|
+
const incomplete = sprint.features.filter(f => f.status !== 'done');
|
|
63
|
+
if (incomplete.length > 0) {
|
|
64
|
+
const list = incomplete.map(f => f.id).join(', ');
|
|
65
|
+
throw new Error(`Cannot close sprint "${sprint.name}": there are incomplete features (${list})`);
|
|
66
|
+
}
|
|
67
|
+
// Mechanically validate the sprint before closing
|
|
68
|
+
const errors = validateSprint(sprint, filePath, config, customRoot);
|
|
69
|
+
if (errors.length > 0) {
|
|
70
|
+
const errorMsgs = errors.map(e => `[${e.field || 'general'}] ${e.message}`).join('\n');
|
|
71
|
+
throw new Error(`Cannot close the sprint due to validation errors:\n${errorMsgs}`);
|
|
72
|
+
}
|
|
73
|
+
sprint.status = 'done';
|
|
74
|
+
try {
|
|
75
|
+
fs.writeFileSync(filePath, JSON.stringify(sprint, null, 2), 'utf-8');
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
throw new Error(`Error writing the completed sprint to "${filePath}": ${error.message}`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/sprint/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAGpB,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC;IACzE,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAc,EACd,SAAiB,EACjB,MAAqB,EACrB,SAAkB;IAElB,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;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AI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,0CAA0C,QAAQ,MAAO,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Sprint, SprintIndex } from '../common/types.js';
|
|
2
|
+
import { HardnessConfig } from '../config/schema.js';
|
|
3
|
+
export interface ValidationError {
|
|
4
|
+
file: string;
|
|
5
|
+
field?: string;
|
|
6
|
+
message: string;
|
|
7
|
+
severity: 'error' | 'warning';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Checks whether a string contains template placeholders.
|
|
11
|
+
*/
|
|
12
|
+
export declare function hasPlaceholder(text: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Validates the 00-index.json file.
|
|
15
|
+
*/
|
|
16
|
+
export declare function validateIndex(indexJson: SprintIndex, filePath: string): ValidationError[];
|
|
17
|
+
export declare function validateSprint(sprint: Sprint, filePath: string, config: HardnessConfig, customRoot?: string): ValidationError[];
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { isPathProtected } from '../common/paths.js';
|
|
3
|
+
const SPRINT_FILE_RE = /^\d{2}-[a-z0-9-]+.json$/;
|
|
4
|
+
const FEAT_ID_RE = /^feat-\d{3}[a-z]?$/;
|
|
5
|
+
const PLACEHOLDER_RE = /<[A-Z_]+>|<<[A-Za-z0-9_-]+>>|<FILL:.*?>/;
|
|
6
|
+
/**
|
|
7
|
+
* Checks whether a string contains template placeholders.
|
|
8
|
+
*/
|
|
9
|
+
export function hasPlaceholder(text) {
|
|
10
|
+
return PLACEHOLDER_RE.test(text);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Validates the 00-index.json file.
|
|
14
|
+
*/
|
|
15
|
+
export function validateIndex(indexJson, filePath) {
|
|
16
|
+
const errors = [];
|
|
17
|
+
const fileBasename = path.basename(filePath);
|
|
18
|
+
if (!indexJson.projectName || indexJson.projectName.trim().length === 0) {
|
|
19
|
+
errors.push({ file: fileBasename, field: 'projectName', message: 'projectName cannot be empty', severity: 'error' });
|
|
20
|
+
}
|
|
21
|
+
else if (hasPlaceholder(indexJson.projectName)) {
|
|
22
|
+
errors.push({ file: fileBasename, field: 'projectName', message: 'projectName contains placeholders', severity: 'error' });
|
|
23
|
+
}
|
|
24
|
+
if (!indexJson.specPath || indexJson.specPath.trim().length === 0) {
|
|
25
|
+
errors.push({ file: fileBasename, field: 'specPath', message: 'specPath cannot be empty', severity: 'error' });
|
|
26
|
+
}
|
|
27
|
+
// Validate totalSprints matches the sprints array length
|
|
28
|
+
if (typeof indexJson.totalSprints === 'number' && indexJson.totalSprints !== indexJson.sprints.length) {
|
|
29
|
+
errors.push({ file: fileBasename, field: 'sprints', message: `totalSprints (${indexJson.totalSprints}) does not match sprints array length (${indexJson.sprints.length})`, severity: 'error' });
|
|
30
|
+
}
|
|
31
|
+
// Validate each sprint entry
|
|
32
|
+
const SPRINT_FILE_RE_INDEX = /^\d{2}-[a-z0-9-]+\.json$/;
|
|
33
|
+
for (const entry of indexJson.sprints) {
|
|
34
|
+
if (!SPRINT_FILE_RE_INDEX.test(entry.file)) {
|
|
35
|
+
errors.push({ file: fileBasename, field: `sprints[file=${entry.file}]`, message: `Sprint file name must follow NN-kebab-case.json (received: ${entry.file})`, severity: 'error' });
|
|
36
|
+
}
|
|
37
|
+
if (!entry.name || entry.name.trim().length === 0) {
|
|
38
|
+
errors.push({ file: fileBasename, field: `sprints[file=${entry.file}].name`, message: 'sprint name cannot be empty', severity: 'error' });
|
|
39
|
+
}
|
|
40
|
+
if (typeof entry.featuresCount !== 'number' || entry.featuresCount < 1) {
|
|
41
|
+
errors.push({ file: fileBasename, field: `sprints[file=${entry.file}].featuresCount`, message: 'featuresCount must be a number >= 1', severity: 'error' });
|
|
42
|
+
}
|
|
43
|
+
if (!['pending', 'in-progress', 'done'].includes(entry.status)) {
|
|
44
|
+
errors.push({ file: fileBasename, field: `sprints[file=${entry.file}].status`, message: `invalid status: ${entry.status}`, severity: 'error' });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return errors;
|
|
48
|
+
}
|
|
49
|
+
export function validateSprint(sprint, filePath, config, customRoot) {
|
|
50
|
+
const errors = [];
|
|
51
|
+
const fileBasename = path.basename(filePath);
|
|
52
|
+
if (!SPRINT_FILE_RE.test(fileBasename)) {
|
|
53
|
+
errors.push({
|
|
54
|
+
file: fileBasename,
|
|
55
|
+
message: `File name must follow the format NN-kebab-case.json (received: ${fileBasename})`,
|
|
56
|
+
severity: 'error'
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (typeof sprint.index !== 'number' || sprint.index < 0) {
|
|
60
|
+
errors.push({ file: fileBasename, field: 'index', message: 'sprint index must be a number >= 0', severity: 'error' });
|
|
61
|
+
}
|
|
62
|
+
if (!sprint.name || sprint.name.trim().length === 0) {
|
|
63
|
+
errors.push({ file: fileBasename, field: 'name', message: 'sprint name cannot be empty', severity: 'error' });
|
|
64
|
+
}
|
|
65
|
+
if (!['pending', 'in-progress', 'done'].includes(sprint.status)) {
|
|
66
|
+
errors.push({ file: fileBasename, field: 'status', message: `invalid status: ${sprint.status}`, severity: 'error' });
|
|
67
|
+
}
|
|
68
|
+
if (!Array.isArray(sprint.features)) {
|
|
69
|
+
errors.push({ file: fileBasename, field: 'features', message: 'features must be an array', severity: 'error' });
|
|
70
|
+
return errors;
|
|
71
|
+
}
|
|
72
|
+
let inProgressCount = 0;
|
|
73
|
+
const featIds = new Set();
|
|
74
|
+
for (const feat of sprint.features) {
|
|
75
|
+
const fId = feat.id;
|
|
76
|
+
if (!FEAT_ID_RE.test(fId)) {
|
|
77
|
+
errors.push({
|
|
78
|
+
file: fileBasename,
|
|
79
|
+
field: `features[${fId}].id`,
|
|
80
|
+
message: `ID '${fId}' must follow the format feat-NNN[a-z]? (e.g. feat-001)`,
|
|
81
|
+
severity: 'error'
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
if (featIds.has(fId)) {
|
|
85
|
+
errors.push({ file: fileBasename, field: `features[${fId}]`, message: `Duplicate ID: ${fId}`, severity: 'error' });
|
|
86
|
+
}
|
|
87
|
+
featIds.add(fId);
|
|
88
|
+
// Basic required-field validations
|
|
89
|
+
if (!feat.title || feat.title.trim().length < 3) {
|
|
90
|
+
errors.push({ file: fileBasename, field: `features[${fId}].title`, message: 'title must be at least 3 characters', severity: 'error' });
|
|
91
|
+
}
|
|
92
|
+
if (!feat.description || feat.description.trim().length === 0) {
|
|
93
|
+
errors.push({ file: fileBasename, field: `features[${fId}].description`, message: 'description cannot be empty', severity: 'error' });
|
|
94
|
+
}
|
|
95
|
+
if (!feat.specLines || feat.specLines.trim().length === 0) {
|
|
96
|
+
errors.push({ file: fileBasename, field: `features[${fId}].specLines`, message: 'specLines cannot be empty', severity: 'error' });
|
|
97
|
+
}
|
|
98
|
+
if (!Array.isArray(feat.acceptanceCriteria) || feat.acceptanceCriteria.length < 2) {
|
|
99
|
+
errors.push({
|
|
100
|
+
file: fileBasename,
|
|
101
|
+
field: `features[${fId}].acceptanceCriteria`,
|
|
102
|
+
message: 'must contain at least 2 acceptance criteria',
|
|
103
|
+
severity: 'error'
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (!Array.isArray(feat.hints) || feat.hints.length < 1) {
|
|
107
|
+
errors.push({ file: fileBasename, field: `features[${fId}].hints`, message: 'must contain at least 1 hint', severity: 'error' });
|
|
108
|
+
}
|
|
109
|
+
// Validate status and dates
|
|
110
|
+
if (!['pending', 'in-progress', 'done'].includes(feat.status)) {
|
|
111
|
+
errors.push({ file: fileBasename, field: `features[${fId}].status`, message: `invalid status: ${feat.status}`, severity: 'error' });
|
|
112
|
+
}
|
|
113
|
+
if (feat.status === 'in-progress') {
|
|
114
|
+
inProgressCount++;
|
|
115
|
+
if (!feat.startedAt) {
|
|
116
|
+
errors.push({ file: fileBasename, field: `features[${fId}].startedAt`, message: 'in-progress status requires startedAt', severity: 'error' });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (feat.status === 'done') {
|
|
120
|
+
if (!feat.completedAt) {
|
|
121
|
+
errors.push({ file: fileBasename, field: `features[${fId}].completedAt`, message: 'done status requires completedAt', severity: 'error' });
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// Placeholders check
|
|
125
|
+
const checkPlaceholders = (text, fieldName) => {
|
|
126
|
+
if (hasPlaceholder(text)) {
|
|
127
|
+
errors.push({ file: fileBasename, field: `features[${fId}].${fieldName}`, message: `Contains unfilled placeholders`, severity: 'error' });
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
checkPlaceholders(feat.title, 'title');
|
|
131
|
+
checkPlaceholders(feat.description, 'description');
|
|
132
|
+
feat.acceptanceCriteria.forEach((ac, idx) => checkPlaceholders(ac, `acceptanceCriteria[${idx}]`));
|
|
133
|
+
feat.hints.forEach((hint, idx) => checkPlaceholders(hint, `hints[${idx}]`));
|
|
134
|
+
// Files validation
|
|
135
|
+
if (!Array.isArray(feat.files)) {
|
|
136
|
+
errors.push({ file: fileBasename, field: `features[${fId}].files`, message: 'files must be an array', severity: 'error' });
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
let hasTsFiles = false;
|
|
140
|
+
for (const fileEntry of feat.files) {
|
|
141
|
+
const filePathStr = typeof fileEntry === 'string' ? fileEntry : fileEntry.file;
|
|
142
|
+
if (hasPlaceholder(filePathStr)) {
|
|
143
|
+
errors.push({ file: fileBasename, field: `features[${fId}].files`, message: `File path contains placeholder: ${filePathStr}`, severity: 'error' });
|
|
144
|
+
}
|
|
145
|
+
if (isPathProtected(filePathStr, customRoot)) {
|
|
146
|
+
errors.push({
|
|
147
|
+
file: fileBasename,
|
|
148
|
+
field: `features[${fId}].files`,
|
|
149
|
+
message: `File in protected area not allowed: ${filePathStr}`,
|
|
150
|
+
severity: 'error'
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
if (/\.(ts|tsx|cts|mts)$/.test(filePathStr)) {
|
|
154
|
+
hasTsFiles = true;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
// TypeScript parsing vs typecheck check
|
|
158
|
+
if (hasTsFiles && feat.verification.parseable && !feat.verification.typecheck) {
|
|
159
|
+
errors.push({
|
|
160
|
+
file: fileBasename,
|
|
161
|
+
field: `features[${fId}].verification`,
|
|
162
|
+
message: 'TypeScript files with parseable=true require typecheck=true',
|
|
163
|
+
severity: 'error'
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
// grepFiles validation
|
|
168
|
+
if (feat.verification.grepFiles) {
|
|
169
|
+
for (const grepFile of feat.verification.grepFiles) {
|
|
170
|
+
if (isPathProtected(grepFile, customRoot)) {
|
|
171
|
+
errors.push({
|
|
172
|
+
file: fileBasename,
|
|
173
|
+
field: `features[${fId}].verification.grepFiles`,
|
|
174
|
+
message: `grepFile path in protected area not allowed: ${grepFile}`,
|
|
175
|
+
severity: 'error'
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// Dependencies manifest validation
|
|
181
|
+
if (feat.verification.dependencies) {
|
|
182
|
+
for (const dep of feat.verification.dependencies) {
|
|
183
|
+
if (dep.manifest && isPathProtected(dep.manifest, customRoot)) {
|
|
184
|
+
errors.push({
|
|
185
|
+
file: fileBasename,
|
|
186
|
+
field: `features[${fId}].verification.dependencies`,
|
|
187
|
+
message: `Dependencies manifest in protected area not allowed: ${dep.manifest}`,
|
|
188
|
+
severity: 'error'
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
// Smoke command validation
|
|
194
|
+
if (feat.verification.smoke) {
|
|
195
|
+
const smoke = feat.verification.smoke;
|
|
196
|
+
if (smoke.executedBy !== 'workflow') {
|
|
197
|
+
errors.push({
|
|
198
|
+
file: fileBasename,
|
|
199
|
+
field: `features[${fId}].verification.smoke.executedBy`,
|
|
200
|
+
message: 'executedBy in smoke command must be "workflow"',
|
|
201
|
+
severity: 'error'
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
// Security validation of the smoke command
|
|
205
|
+
const command = smoke.command;
|
|
206
|
+
if (hasPlaceholder(command)) {
|
|
207
|
+
errors.push({
|
|
208
|
+
file: fileBasename,
|
|
209
|
+
field: `features[${fId}].verification.smoke.command`,
|
|
210
|
+
message: 'Smoke command contains placeholders',
|
|
211
|
+
severity: 'error'
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
// Check command against config security
|
|
215
|
+
const blockPatterns = config.security.blockedPatterns;
|
|
216
|
+
for (const pattern of blockPatterns) {
|
|
217
|
+
const regex = new RegExp(pattern);
|
|
218
|
+
if (regex.test(command)) {
|
|
219
|
+
errors.push({
|
|
220
|
+
file: fileBasename,
|
|
221
|
+
field: `features[${fId}].verification.smoke.command`,
|
|
222
|
+
message: `Smoke command blocked by security policy (pattern: "${pattern}")`,
|
|
223
|
+
severity: 'error'
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (inProgressCount > 1) {
|
|
230
|
+
errors.push({
|
|
231
|
+
file: fileBasename,
|
|
232
|
+
field: 'features',
|
|
233
|
+
message: `Maximum of 1 in-progress feature per sprint (found: ${inProgressCount})`,
|
|
234
|
+
severity: 'error'
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
return errors;
|
|
238
|
+
}
|
|
239
|
+
//# sourceMappingURL=validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/sprint/validator.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAuB,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA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,CAAC;oBACV,IAAI,EAAE,YAAY;oBAClB,KAAK,EAAE,YAAY,GAAG,8BAA8B;oBACpD,OAAO,EAAE,qCAAqC;oBAC9C,QAAQ,EAAE,OAAO;iBAClB,CAAC,CAAC;YACL,CAAC;YAED,wCAAwC;YACxC,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC;YACtD,KAAK,MAAM,OAAO,IAAI,aAAa,EAAE,CAAC;gBACpC,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;gBAClC,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;oBACxB,MAAM,CAAC,IAAI,CAAC;wBACV,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,YAAY,GAAG,8BAA8B;wBACpD,OAAO,EAAE,uDAAuD,OAAO,IAAI;wBAC3E,QAAQ,EAAE,OAAO;qBAClB,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,eAAe,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,uDAAuD,eAAe,GAAG;YAClF,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hardness/core",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Hardness Core — orchestrator, gates, locks, config and security",
|
|
5
|
+
"author": "cmt-t",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc --build",
|
|
22
|
+
"clean": "tsc --build --clean"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@hardness/analyzers": "*",
|
|
26
|
+
"@hardness/prompts": "*",
|
|
27
|
+
"picocolors": "^1.0.0",
|
|
28
|
+
"zod": "^3.22.4"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/node": "^20.12.7"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=20.0.0"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/cmt-t/HardNess.git",
|
|
39
|
+
"directory": "packages/core"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/cmt-t/HardNess/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/cmt-t/HardNess#readme",
|
|
45
|
+
"keywords": [
|
|
46
|
+
"ai",
|
|
47
|
+
"agent",
|
|
48
|
+
"orchestrator",
|
|
49
|
+
"gates",
|
|
50
|
+
"locks",
|
|
51
|
+
"validation"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @hardness/prompts
|
|
2
|
+
|
|
3
|
+
Role-based prompt templates and renderer for [Hardness](https://github.com/cmt-t/HardNess).
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { renderPrompt, IMPLEMENTER_TEMPLATE } from '@hardness/prompts';
|
|
9
|
+
|
|
10
|
+
const prompt = renderPrompt(IMPLEMENTER_TEMPLATE, {
|
|
11
|
+
projectName: 'my-app',
|
|
12
|
+
sprintIndex: '0',
|
|
13
|
+
featureId: 'feat-001',
|
|
14
|
+
featureTitle: 'Bootstrap',
|
|
15
|
+
featureDescription: 'Set up the monorepo',
|
|
16
|
+
acceptanceCriteria: '- npm install runs without errors',
|
|
17
|
+
hints: '- Use npm workspaces',
|
|
18
|
+
specExcerpt: '...',
|
|
19
|
+
existingFiles: '- package.json (new)',
|
|
20
|
+
rules: '- No deps without review',
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Templates: `IMPLEMENTER_TEMPLATE`, `REVIEWER_TEMPLATE`, `AUDITOR_TEMPLATE`.
|
|
25
|
+
|
|
26
|
+
See the [main repo](https://github.com/cmt-t/HardNess#readme) for full documentation.
|
|
27
|
+
|
|
28
|
+
## License
|
|
29
|
+
|
|
30
|
+
MIT © 2026 cmt-t
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const name = "@hardness/prompts";
|
|
2
|
+
export interface PromptVariables {
|
|
3
|
+
rules?: string;
|
|
4
|
+
context?: string;
|
|
5
|
+
projectName?: string;
|
|
6
|
+
sprintIndex?: string;
|
|
7
|
+
featureId?: string;
|
|
8
|
+
featureTitle?: string;
|
|
9
|
+
featureDescription?: string;
|
|
10
|
+
acceptanceCriteria?: string;
|
|
11
|
+
hints?: string;
|
|
12
|
+
specExcerpt?: string;
|
|
13
|
+
existingFiles?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Renders a template by substituting the provided variables.
|
|
17
|
+
*/
|
|
18
|
+
export declare function renderPrompt(template: string, vars: Record<string, string>): string;
|
|
19
|
+
export declare const IMPLEMENTER_TEMPLATE = "\n# AGENT IMPLEMENTATION INSTRUCTIONS\nYou are an elite software development agent operating under the **Hardness** orchestrator.\nYour task is to implement the current feature, strictly following the security, quality and constraint rules below.\n\n## Project Information\n- Project: {projectName}\n- Active sprint: Sprint {sprintIndex}\n- Feature: {featureId} - {featureTitle}\n- Feature description: {featureDescription}\n\n## Acceptance Criteria\n{acceptanceCriteria}\n\n## Development Hints\n{hints}\n\n## Related excerpt from SPEC.md\n{specExcerpt}\n\n## Editable Files\nOnly the files listed in the feature above may be created or modified:\n{existingFiles}\n\n## Global Rules and Policies\n{rules}\n\n---\nIMPORTANT:\n1. DO NOT modify files that are not listed in the feature above (violation triggers a critical gate failure).\n2. Do not add dependencies not listed without authorization.\n3. Do not use console.log without necessity; prefer a formal logger.\n";
|
|
20
|
+
export declare const REVIEWER_TEMPLATE = "\n# CODE REVIEW (REVIEWER)\nReview the code changes made for feature {featureId} - {featureTitle}.\nEnsure that the acceptance criteria have been fully met.\n\nCriteria:\n{acceptanceCriteria}\n\nCheck:\n1. Whether formatting rules were maintained.\n2. Whether there are leaked keys or secrets.\n3. Whether unit tests cover the new behavior.\n";
|
|
21
|
+
export declare const AUDITOR_TEMPLATE = "\n# FINAL CONSISTENCY AUDIT (AUDITOR)\nAnalyze the overall state of project {projectName} after the implementations of sprint {sprintIndex}.\nEnsure the code is clean, that there are no pending circular imports and that the project conventions are consistent.\n";
|