@webpieces/rules-config 0.4.768 → 0.4.769
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/package.json +1 -1
- package/src/home-config-keys.d.ts +6 -0
- package/src/home-config-keys.js +8 -2
- package/src/home-config-keys.js.map +1 -1
- package/src/home-config.d.ts +5 -2
- package/src/home-config.js +21 -5
- package/src/home-config.js.map +1 -1
- package/src/index.d.ts +2 -2
- package/src/index.js +9 -7
- package/src/index.js.map +1 -1
- package/src/review-json-data.d.ts +4 -1
- package/src/review-json-data.js +8 -2
- package/src/review-json-data.js.map +1 -1
- package/src/review-json-schema-renderer.d.ts +4 -0
- package/src/review-json-schema-renderer.js +25 -0
- package/src/review-json-schema-renderer.js.map +1 -0
- package/src/review-json.d.ts +6 -5
- package/src/review-json.js +26 -28
- package/src/review-json.js.map +1 -1
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iCAA0E;AAAjE,uGAAA,cAAc,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AAC3C,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AACtB,qDAA+F;AAAtF,gHAAA,aAAa,OAAA;AAAE,sHAAA,mBAAmB,OAAA;AAAE,yHAAA,sBAAsB,OAAA;AACnE,uGAAuG;AACvG,sFAAsF;AACtF,2CAAwD;AAA/C,oGAAA,MAAM,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AACjC,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,uCAAiF;AAAxE,oGAAA,QAAQ,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,qGAAA,SAAS,OAAA;AAAE,wGAAA,YAAY,OAAA;AAAE,mGAAA,OAAO,OAAA;AAC5D,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,uCAAqC;AA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AA,oBAAoB,OAAA;AAAE,4GAAA,eAAe,OAAA;AACxD,6DAAmF;AAA1E,wHAAA,iBAAiB,OAAA;AAAE,8HAAA,uBAAuB,OAAA;AACnD,mEAMkC;AAL9B,+HAAA,qBAAqB,OAAA;AACrB,oIAAA,0BAA0B,OAAA;AAC1B,sHAAA,YAAY,OAAA;AACZ,sHAAA,YAAY,OAAA;AACZ,8HAAA,oBAAoB,OAAA;AAExB,mEAOkC;AAN9B,6HAAA,mBAAmB,OAAA;AACnB,iIAAA,uBAAuB,OAAA;AACvB,gIAAA,sBAAsB,OAAA;AACtB,mIAAA,yBAAyB,OAAA;AACzB,uHAAA,aAAa,OAAA;AACb,oIAAA,0BAA0B,OAAA;AAE9B,iDAAyE;AAAhE,6GAAA,YAAY,OAAA;AAAE,2GAAA,UAAU,OAAA;AAAE,6GAAA,YAAY,OAAA;AAC/C,qDAAuF;AAA9E,iHAAA,cAAc,OAAA;AAAE,qHAAA,kBAAkB,OAAA;AAAE,iHAAA,cAAc,OAAA;AAE3D,6DAK+B;AAJ3B,0HAAA,mBAAmB,OAAA;AACnB,wHAAA,iBAAiB,OAAA;AACjB,4HAAA,qBAAqB,OAAA;AACrB,wHAAA,iBAAiB,OAAA;AAErB,qDAK2B;AAJvB,iHAAA,cAAc,OAAA;AACd,sHAAA,mBAAmB,OAAA;AACnB,4HAAA,yBAAyB,OAAA;AACzB,iIAAA,8BAA8B,OAAA;AAElC,qDAAsF;AAA7E,kHAAA,eAAe,OAAA;AAAE,kHAAA,eAAe,OAAA;AAAE,kHAAA,eAAe,OAAA","sourcesContent":["export { ResolvedConfig, ResolvedRuleConfig, RuleOptions } from './types';\nexport { InformAiError } from './inform-ai-error';\nexport { RuleFailError, renderRuleFailForAi, renderRuleFailForHuman } from './rule-fail-error';\n// THE one representation of a cure, shared by RuleFailError (build-time) and FixHint (edit-time), plus\n// the one renderer that owns the \"Fix Option N:\" numbering and the \"(preferred)\" tag.\nexport { Option, formatFixOptions } from './fix-option';\nexport { CliExitError } from './cli-exit-error';\nexport { CliUsage, CliFlag, CliArgSet, CliArgsCheck, CliArgs } from './cli-args';\nexport { runMain } from './run-main';\nexport { toError } from './to-error';\nexport { loadAndValidate, LoadedConfig, ConfigLoader } from './load-config';\n// The validation-failure banner: ONE cure (edit the file), plus the marker phrases the validator\n// messages embed rather than re-type.\nexport {\n formatConfigErrorsBanner,\n CONFIG_POLICY_DOC,\n RETIRED_KEY_MARKER,\n RETIRED_TOP_LEVEL_MARKER,\n SECTION_PLACEMENT_MARKER,\n} from './config-error-banner';\nexport {\n findConfigFile,\n CONFIG_FILENAME,\n ConfigFile,\n ConfigParseAttempt,\n CONFIG_PARSE_ATTEMPTS,\n CONFIG_PARSE_RETRY_MILLIS,\n} from './config-file';\n// The PARSED-BUT-UNVALIDATED config shape. Exported for readers that walk the file generically rather\n// than through the typed config (the pr-gate active-hatch dashboard section reads every rule's hatches).\nexport type { RawConfigFile } from './config-file';\nexport { RepoRootFinder, INSTRUCT_AI_DIR, INSTRUCT_AI_LEAF } from './repo-root';\n// The scoped `.webpieces` resolver. EVERY reader/writer of `.webpieces/...` goes through one of its two\n// named methods so the call site declares whether the state is repo-wide or worktree-private.\nexport {\n DotWebpieces,\n dotWebpieces,\n GitDirs,\n WORKTREE_STATE_DIR,\n LOGS_STATE_DIR,\n} from './state-dir';\nexport { StateDirMigrator, StateMigrationReport } from './state-dir-migration';\n// There is NO machine-global state root. `MachineStateHome`/`StateHome`/`WEBPIECES_STATE_HOME` and the\n// `PrBodyStore` that used them are DELETED: the one artifact that needed a scope above the clone was the\n// gated squash body, and GitHub holds it now (it IS the PR description). Every `.webpieces` path a\n// webpieces tool writes is `{repo}/.webpieces`, resolved through `DotWebpieces` above. See\n// `decisions/0005-the-pr-description-is-the-merge-body.md`.\nexport { AgedTreeSweeper, SweepCount, RETENTION_DAYS } from './aged-tree-sweep';\nexport {\n ClaudeEnv,\n claudeEnv,\n CLAUDE_PROJECT_DIR_ENV,\n CLAUDE_PROJECT_DIR_UNSET,\n} from './claude-env';\nexport { AtomicFile } from './atomic-file';\n// The ONE formatter for a remedy that must run in a named directory: `cd '<root>' && <command>`.\n// Single-quoted so a repo path containing a space is still runnable (and still un-smuggleable).\nexport { atRoot } from './at-root';\nexport { RulesConfigDesign } from './rules-config-design';\nexport { DocumentDesign, isDocumentDesign, DESIGN_METADATA_KEYS } from './di';\nexport { ExcludePaths, isWebpiecesStateDir } from './exclude-hook-paths';\nexport { isPathExcluded, matchesAnyGlob } from './exclude-paths';\n// The machine-generated trees a line-count rule never fires on. A FLOOR, not a default value:\n// `max-file-lines.allowedPaths` adds to it, so configuring your own tree cannot lose it.\nexport { GENERATED_CODE_PATHS } from './generated-code-paths';\n// THE one `no-custom-css` path exemption. Both engines that enforce the rule (the edit-time hook and the\n// CI validator) consult this class, so `allowGlobs` cannot be honoured by one half and ignored by the other.\nexport { NoCustomCssScope } from './no-custom-css-scope';\nexport { defaultRules, defaultRulesDir } from './default-rules';\nexport {\n loadTemplate,\n writeTemplateIfMissing,\n writeTemplate,\n TemplateWriter,\n} from './load-template';\n// The instruct-ai docs are delivered as a SET: writing one writes the transitive closure of the docs it\n// links to, so a doc and everything it points at always land together. See instruct-ai-docs.ts.\nexport {\n GIT_WORKFLOW_DOC,\n GitWorkflowDoc,\n InstructAiDoc,\n InstructAiDocSet,\n MergeProcessDoc,\n} from './instruct-ai-docs';\nexport {\n MERGE_PROCESS_DOC,\n MergeProcessText,\n MergeRun,\n ReferenceMergeRun,\n} from './merge-process-doc';\nexport { BUILD_LOG_DOC } from './build-log-doc';\nexport {\n validateWebpiecesConfig,\n validatePrGateSection,\n validateChecklistsSection,\n validateSectionPlacement,\n validateExcludePaths,\n validateMatchRulesSection,\n allRuleNames,\n recommendedSeedMode,\n recommendedSeedModeFor,\n seedEntryForRule,\n} from './validate-config';\nexport { validateCommandsSection } from './commands-section-validators';\nexport {\n unknownKeyErrors,\n isCommentKey,\n validateTopLevelKeys,\n COMMENT_KEY_SUFFIX,\n} from './config-key-rules';\n// The retired-key table + the no-back-compat policy it enforces. Exported so the installer can migrate\n// what the errors instruct, and so consumers can enumerate retirements.\nexport {\n RETIRED_CONFIG_KEYS,\n RETIRED_SCOPE_KEY,\n RETIRED_SCOPE_RULE,\n RetiredConfigKey,\n isRetiredKey,\n retiredEntry,\n retiredKeyError,\n retiredKeyErrorsIn,\n retiredRuleFor,\n} from './retired-config-keys';\n// The MECHANICAL cure the unknown-rule error and the banner both name: strip every key no validator has a\n// schema for, so cleanliness is one command rather than a judgement call made while every Bash call is\n// blocked. `PRUNE_UNKNOWN_COMMAND` (constants.ts) is the single spelling of that command.\nexport { ConfigPruner, PruneResult, PrunedKey } from './config-pruner';\nexport { validateChecklistDocs } from './checklist-docs-validator';\n// The OPTIONAL machine-local `~/.webpieces/config.json`: absent (the normal state for every consumer) means\n// each key's declared default, silently; present means STRICT about what it understands and FORWARD-COMPATIBLE\n// about what it does not. A retired key (its own retirement table), a known key of the wrong TYPE and an\n// unparseable document all REJECT; a key this release simply does not recognise is IGNORED with a warning,\n// because the file is machine-global and the repos reading it pin different releases — rejecting a newer\n// release's key would hard-block every repo on the machine that is not yet on it. See home-config.ts.\n// `isHomeConfigPath` is what grants the file its unconditional Write/Edit PASS in the hook guards, which is\n// what keeps a rejection repairable. Every `experimental.*` key is an OPT-IN that defaults OFF, including\n// `whole-repo-build-guard`: ON requires an explicit `true`, and there is no per-key default to export.\nexport {\n HomeConfig,\n HomeConfigService,\n RetiredHomeConfigKey,\n RETIRED_HOME_CONFIG_KEYS,\n HOME_CONFIG_DIR,\n HOME_CONFIG_FILE,\n HOME_EXPERIMENTAL_SECTION,\n HOME_KEY_ORPHAN_DIR_SWEEP,\n HOME_KEY_WHOLE_REPO_BUILD_GUARD,\n HOME_KEY_MAX_CONCURRENT_BUILDS,\n HOME_KEY_TURN_OFF_ALL_REVIEWERS,\n DEFAULT_MAX_CONCURRENT_BUILDS,\n HOME_KEY_DOC,\n HOME_KEY_AI_DOC,\n DOCUMENTATION_KEYS,\n} from './home-config';\n// The MACHINE-WIDE build ledger, `~/.webpieces/builds.log`. THE one carve-out from\n// `no-machine-global-state.spec.ts`'s rule that webpieces writes only under `{repo}/.webpieces` — the\n// argument is in `decisions/0006-the-build-ledger-is-machine-global.md`, and the short form is that \"how\n// many builds are burning this box's CPU\" is a fact about the MACHINE, is not a cache of anything a\n// remote owns, and cannot be answered from a per-repo file because every linked worktree has its own\n// `.webpieces/` and would be blind to the sibling it is contending with. See builds-log.ts.\nexport {\n BuildsLog,\n BuildTicket,\n BuildTermination,\n RunningBuild,\n BUILDS_LOG_FILE,\n BUILDS_LOCK_FILE,\n BUILD_START,\n BUILD_DONE_SUCCESS,\n BUILD_DONE_FAIL,\n MAX_BUILDS_LOG_BYTES,\n BUILDS_LOG_GENERATIONS,\n MAX_ROW_BYTES,\n} from './builds-log';\n// The orphan-directory sweep: the corpse an `nx g move` leaves on every clone, which git cannot remove\n// because an ignored dist/ or node_modules/ outlives every tracked file under it. See orphan-dir-scan.ts\n// for why the predicate is git's own `clean -Xdn` answer rather than a hand-rolled ignore walk.\nexport { OrphanDirScanner, OrphanCandidate } from './orphan-dir-scan';\nexport {\n OrphanDirArchiver,\n ArchivedOrphan,\n FailedOrphan,\n OrphanSweepResult,\n OrphanSweepManifest,\n TRASH_STATE_DIR,\n TRASH_MANIFEST_FILE,\n TRASH_RETENTION_DAYS,\n} from './orphan-dir-archive';\nexport { OrphanDirSweeper, OrphanSweepReport } from './orphan-dir-sweep';\nexport {\n MatchRuleConfig,\n MatchRuleViolation,\n findMatchRuleViolations,\n isMatchRuleAllowedPath,\n compileMatchRulePatterns,\n renderMatchRuleMessage,\n DEFAULT_MATCH_RULES,\n} from './match-rules-config';\nexport type { ConfigSection } from './sections';\nexport { schemaFieldNames } from './rule-schemas';\nexport {\n HOOK_GUARD_NAMES,\n BRANCH_STATE_GUARD_KEY,\n PR_LIFECYCLE_GUARD_KEY,\n isHookGuard,\n sectionForRule,\n} from './sections';\nexport { FieldDef } from './field-def';\nexport type { SchemaShape } from './field-def';\nexport { shouldSkipRule, getCurrentBranch } from './skip-rule';\nexport { SkipRuleResult } from './skip-rule';\nexport {\n detectBase,\n resolveBase,\n getChangedFiles,\n getFileDiff,\n getChangedLineNumbers,\n findNewMethodSignaturesInDiff,\n hasChangesInRange,\n isNewOrModified,\n DiffScope,\n DiffRange,\n ChangedFilesOptions,\n} from './diff-scope';\nexport { AbstractRule } from './abstract-rule';\nexport {\n WEBPIECES_DISABLE,\n RULE_NAMES,\n hasDisable,\n WEBPIECES_TMP_DIR,\n MERGE_INFO_DIR,\n PR_REVIEW_DIR,\n MERGE_IN_PROGRESS_FILE,\n MERGE_EXPLANATION_FILE,\n PUSH_DEV_STATE_FILE,\n PRUNE_UNKNOWN_COMMAND,\n} from './constants';\nexport { WebpiecesRulesConfig } from './WebpiecesRulesConfig';\nexport {\n SyncFlowGuidance,\n WP_START_UPDATE,\n WP_FINISH_UPDATE,\n WP_START_UPSERT_PR,\n WP_FINISH_UPSERT_PR,\n WP_PUSH_DEV,\n WP_FINISH_PUSH_DEV,\n} from './sync-flow-guidance';\nexport {\n MaxMethodLinesConfig,\n MaxFileLinesConfig,\n RequireReturnTypeConfig,\n NoInlineTypeLiteralsConfig,\n NoAnyUnknownConfig,\n NoImplicitAnyConfig,\n PrismaValidateDtosConfig,\n PrismaConverterConfig,\n NoDestructureConfig,\n NoUnmanagedExceptionsConfig,\n CatchErrorPatternConfig,\n ThrowCauseRequiredConfig,\n AngularNoDirectApiInResolverConfig,\n NoSymbolDiTokensConfig,\n NoCustomCssConfig,\n NoProcessExitOutsideMainConfig,\n NoFunctionOutsideClassConfig,\n InjectAnnotationNotNeededForConcreteClassConfig,\n FrameworkTagConfig,\n RoleTagConfig,\n EnsureWeAreSecureConfig,\n BranchCreationGuardConfig,\n PrLifecycleGuardConfig,\n NoFileImportCyclesConfig,\n RuntimeArchitectureConfig,\n NxWiringConfig,\n DiGraphConfig,\n NoJsFilesConfig,\n ValidateTsInSrcConfig,\n ValidateArchitectureUnchangedConfig,\n ValidateNoArchitectureCyclesConfig,\n ValidatePackageJsonConfig,\n ValidateVersionsLockedConfig,\n ValidateEslintSyncConfig,\n BaseRuleConfig,\n} from './rule-configs';\n// Mode unions + their value arrays — the single source of truth shared with code-rules.\nexport {\n METHOD_LIMIT_MODES,\n FILE_LIMIT_MODES,\n RETURN_TYPE_MODES,\n INLINE_TYPE_MODES,\n MODIFIED_CODE_MODES,\n PROJECT_MODES,\n PRISMA_DTOS_MODES,\n PRISMA_CONVERTER_MODES,\n DIRECT_API_RESOLVER_MODES,\n THROW_CAUSE_MODES,\n ON_OFF_MODES,\n STRUCTURAL_MODES,\n VALIDATE_TS_MODES,\n} from './rule-configs';\nexport {\n NoClientCreationOutsideServerOrClientConfig,\n CLIENT_CREATION_SEVERITIES,\n} from './no-client-creation-config';\nexport type { ClientCreationSeverity } from './no-client-creation-config';\n// The `no-state-paths-in-templates` config, in its own module for the same reason no-client-creation is:\n// rule-configs.ts is at its file-size cap and a rule that carries real defaults belongs beside them.\nexport {\n NoStatePathsInTemplatesConfig,\n DEFAULT_TEMPLATE_DIRS,\n DEFAULT_BANNED_STATE_PATH_PREFIXES,\n} from './no-state-paths-config';\nexport type {\n MethodLimitMode,\n FileLimitMode,\n ReturnTypeMode,\n InlineTypeMode,\n ModifiedCodeMode,\n ProjectMode,\n PrismaValidateDtosMode,\n PrismaConverterMode,\n DirectApiResolverMode,\n ThrowCauseMode,\n OnOffMode,\n StructuralMode,\n ValidateTsMode,\n} from './rule-configs';\nexport { BranchStateGuardConfig } from './main-sync-guard-configs';\nexport {\n GateDefinition,\n PrGateConfig,\n DEFAULT_BUILD_COMMAND,\n LandPrConfig,\n DevDeployConfig,\n DEFAULT_DEV_BRANCH_NAMESPACE,\n DEFAULT_DEV_BRANCH,\n ReviewContextEntry,\n defaultGates,\n defaultPrGateConfig,\n defaultLandPrConfig,\n defaultDevDeployConfig,\n buildPrGateConfig,\n buildLandPrConfig,\n buildDevDeployConfig,\n MERGE_MODE_AUTO,\n MERGE_MODE_NONE,\n MERGE_MODES,\n} from './pr-gate-config';\nexport {\n ChecklistDefinition,\n toChecklist,\n normalizeChecklistDoc,\n formatFileList,\n} from './checklist-config';\nexport type { RawChecklistItem } from './checklist-config';\nexport { ChecklistValidator } from './checklist-validator';\nexport { ChecklistInstructionsService } from './checklist-instructions';\nexport {\n ReviewerInstructionsService,\n ReviewerBriefing,\n BriefedFile,\n ContextEntry,\n READ_TRUNCATION_LINES,\n ALL_DIFF_ONE_READ_LINES,\n} from './reviewer-instructions';\nexport {\n GateTokenService,\n computeGateToken,\n gateTokenMarker,\n extractGateToken,\n verifyGateToken,\n} from './gate-token';\nexport {\n SubagentProvenanceService,\n ReviewerEvidence,\n ReviewerContext,\n TranscriptScan,\n ProvenanceResult,\n PROVENANCE_OK,\n PROVENANCE_MISSING,\n PROVENANCE_SKIPPED,\n} from './subagent-provenance';\nexport {\n ReviewProvenanceService,\n ReviewProvenance,\n ReviewerTranscript,\n ReviewerPaths,\n OfferedContext,\n ProvenanceWriteRequest,\n DEFAULT_RETENTION_DAYS,\n} from './review-provenance';\nexport {\n ReviewJson,\n PrContext,\n ChecklistResult,\n ChecklistVerdict,\n ChecklistOverride,\n ChecklistOverrideService,\n checklistOverrideService,\n CK_PASS,\n CK_WARN,\n CK_OVERRIDDEN,\n CK_FAIL,\n CK_MISSING,\n CK_BAD_FORMAT,\n VERDICT_GREEN,\n VERDICT_YELLOW,\n VERDICT_RED,\n VERDICT_STATUSES,\n RequiredChecklist,\n ChecklistReviewContext,\n ReviewJsonService,\n prDirFor,\n reviewJsonPath,\n reviewJsonSchemaHint,\n} from './review-json';\nexport {\n MainSyncStatus,\n MainSyncStatusFile,\n MainSyncFileStore,\n PullRequestIndex,\n MAIN_SYNC_STATUS_VERSION,\n} from './main-sync-file';\nexport {\n MainSyncLock,\n MainSyncStatusService,\n DEFAULT_HANG_TIMEOUT_MINUTES,\n mainSyncStatusPath,\n mainSyncLockPath,\n readMainSyncStatus,\n readMainSyncStatusFile,\n writeMainSyncStatus,\n writeMainSyncStatusFile,\n computeAllMainSyncStatuses,\n readMainSyncLock,\n writeMainSyncLock,\n isLockStale,\n isRefreshInProgress,\n tryAcquireMainSyncLock,\n inProcessLock,\n finishedLock,\n computeMainSyncStatus,\n stampCleanMainSyncStatus,\n squashRecoverySteps,\n} from './main-sync-status';\nexport {\n MergedBranch,\n DeletableBranch,\n DeletableWorktree,\n MergedBranchesCache,\n MergedBranchesService,\n CacheFreshness,\n CACHE_STALE_AFTER_MS,\n CLASSIFICATION_MERGED_PR,\n CLASSIFICATION_BACKUP_OF_MERGED,\n CLASSIFICATION_BACKUP_OF_LIVE,\n CLASSIFICATION_NO_COMMITS,\n CLASSIFICATION_SUPERSEDED,\n CLASSIFICATION_CONTENT_IN_MAIN,\n CLASSIFICATION_NEVER_PROPOSED,\n CLASSIFICATION_IN_USE,\n CLASSIFICATION_PRUNABLE,\n CLASSIFICATION_LOCKED,\n CLASSIFICATION_CURRENT,\n CLASSIFICATION_DETACHED,\n ADJUDICATED_CLASSIFICATIONS,\n} from './merged-branches';\nexport {\n BranchArchiver,\n ArchiveResult,\n ARCHIVE_TAG_PREFIX,\n BRANCH_RETENTIONS,\n BRANCH_RETENTION_DELETE,\n BRANCH_RETENTION_ARCHIVE_TAG,\n BRANCH_RETENTION_KEEP,\n} from './branch-archiver';\nexport { Worktree, WorktreeWorkInFlight, WorktreeService } from './worktrees';\nexport { AgentWorktreeLock, AgentWorktreeLockReader } from './agent-worktree-lock';\nexport {\n HARNESS_NOT_CONSULTED,\n LOCK_LIVENESS_UNVERIFIABLE,\n LockDecision,\n LockEvidence,\n WorktreeLockVerdicts,\n} from './worktree-lock-verdicts';\nexport {\n AGENT_ACTIVITY_LIVE,\n AGENT_ACTIVITY_RETURNED,\n AGENT_ACTIVITY_UNKNOWN,\n AGENT_TRANSCRIPT_QUIET_MS,\n AgentActivity,\n HarnessAgentActivityReader,\n} from './harness-agent-activity';\nexport { ReapedBranch, ReapResult, BranchReaper } from './branch-reaper';\nexport { ReapedWorktree, WorktreeReapResult, WorktreeReaper } from './worktree-reaper';\nexport type { MutationVerb, MutationPhase } from './branch-mutation-log';\nexport {\n BranchMutationEvent,\n BranchMutationLog,\n branchMutationLogPath,\n logBranchMutation,\n} from './branch-mutation-log';\nexport {\n CommandsConfig,\n buildCommandsConfig,\n DEFAULT_UPSERT_PR_COMMAND,\n DEFAULT_MERGE_COMPLETE_COMMAND,\n} from './commands-config';\nexport { StaleBinRemoval, StaleBinSweeper, staleBinSweeper } from './stale-bin-sweep';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iCAA0E;AAAjE,uGAAA,cAAc,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AAC3C,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AACtB,qDAA+F;AAAtF,gHAAA,aAAa,OAAA;AAAE,sHAAA,mBAAmB,OAAA;AAAE,yHAAA,sBAAsB,OAAA;AACnE,uGAAuG;AACvG,sFAAsF;AACtF,2CAAwD;AAA/C,oGAAA,MAAM,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AACjC,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,uCAAiF;AAAxE,oGAAA,QAAQ,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,qGAAA,SAAS,OAAA;AAAE,wGAAA,YAAY,OAAA;AAAE,mGAAA,OAAO,OAAA;AAC5D,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,6CAA4E;AAAnE,8GAAA,eAAe,OAAA;AAAE,2GAAA,YAAY,OAAA;AAAE,2GAAA,YAAY,OAAA;AACpD,iGAAiG;AACjG,sCAAsC;AACtC,6DAM+B;AAL3B,+HAAA,wBAAwB,OAAA;AACxB,wHAAA,iBAAiB,OAAA;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AACrB,oIAAA,0BAA0B,OAAA;AAC1B,sHAAA,YAAY,OAAA;AACZ,sHAAA,YAAY,OAAA;AACZ,8HAAA,oBAAoB,OAAA;AAExB,mEAOkC;AAN9B,6HAAA,mBAAmB,OAAA;AACnB,iIAAA,uBAAuB,OAAA;AACvB,gIAAA,sBAAsB,OAAA;AACtB,mIAAA,yBAAyB,OAAA;AACzB,uHAAA,aAAa,OAAA;AACb,oIAAA,0BAA0B,OAAA;AAE9B,iDAAyE;AAAhE,6GAAA,YAAY,OAAA;AAAE,2GAAA,UAAU,OAAA;AAAE,6GAAA,YAAY,OAAA;AAC/C,qDAAuF;AAA9E,iHAAA,cAAc,OAAA;AAAE,qHAAA,kBAAkB,OAAA;AAAE,iHAAA,cAAc,OAAA;AAE3D,6DAK+B;AAJ3B,0HAAA,mBAAmB,OAAA;AACnB,wHAAA,iBAAiB,OAAA;AACjB,4HAAA,qBAAqB,OAAA;AACrB,wHAAA,iBAAiB,OAAA;AAErB,qDAK2B;AAJvB,iHAAA,cAAc,OAAA;AACd,sHAAA,mBAAmB,OAAA;AACnB,4HAAA,yBAAyB,OAAA;AACzB,iIAAA,8BAA8B,OAAA;AAElC,qDAAsF;AAA7E,kHAAA,eAAe,OAAA;AAAE,kHAAA,eAAe,OAAA;AAAE,kHAAA,eAAe,OAAA","sourcesContent":["export { ResolvedConfig, ResolvedRuleConfig, RuleOptions } from './types';\nexport { InformAiError } from './inform-ai-error';\nexport { RuleFailError, renderRuleFailForAi, renderRuleFailForHuman } from './rule-fail-error';\n// THE one representation of a cure, shared by RuleFailError (build-time) and FixHint (edit-time), plus\n// the one renderer that owns the \"Fix Option N:\" numbering and the \"(preferred)\" tag.\nexport { Option, formatFixOptions } from './fix-option';\nexport { CliExitError } from './cli-exit-error';\nexport { CliUsage, CliFlag, CliArgSet, CliArgsCheck, CliArgs } from './cli-args';\nexport { runMain } from './run-main';\nexport { toError } from './to-error';\nexport { loadAndValidate, LoadedConfig, ConfigLoader } from './load-config';\n// The validation-failure banner: ONE cure (edit the file), plus the marker phrases the validator\n// messages embed rather than re-type.\nexport {\n formatConfigErrorsBanner,\n CONFIG_POLICY_DOC,\n RETIRED_KEY_MARKER,\n RETIRED_TOP_LEVEL_MARKER,\n SECTION_PLACEMENT_MARKER,\n} from './config-error-banner';\nexport {\n findConfigFile,\n CONFIG_FILENAME,\n ConfigFile,\n ConfigParseAttempt,\n CONFIG_PARSE_ATTEMPTS,\n CONFIG_PARSE_RETRY_MILLIS,\n} from './config-file';\n// The PARSED-BUT-UNVALIDATED config shape. Exported for readers that walk the file generically rather\n// than through the typed config (the pr-gate active-hatch dashboard section reads every rule's hatches).\nexport type { RawConfigFile } from './config-file';\nexport { RepoRootFinder, INSTRUCT_AI_DIR, INSTRUCT_AI_LEAF } from './repo-root';\n// The scoped `.webpieces` resolver. EVERY reader/writer of `.webpieces/...` goes through one of its two\n// named methods so the call site declares whether the state is repo-wide or worktree-private.\nexport {\n DotWebpieces,\n dotWebpieces,\n GitDirs,\n WORKTREE_STATE_DIR,\n LOGS_STATE_DIR,\n} from './state-dir';\nexport { StateDirMigrator, StateMigrationReport } from './state-dir-migration';\n// There is NO machine-global state root. `MachineStateHome`/`StateHome`/`WEBPIECES_STATE_HOME` and the\n// `PrBodyStore` that used them are DELETED: the one artifact that needed a scope above the clone was the\n// gated squash body, and GitHub holds it now (it IS the PR description). Every `.webpieces` path a\n// webpieces tool writes is `{repo}/.webpieces`, resolved through `DotWebpieces` above. See\n// `decisions/0005-the-pr-description-is-the-merge-body.md`.\nexport { AgedTreeSweeper, SweepCount, RETENTION_DAYS } from './aged-tree-sweep';\nexport {\n ClaudeEnv,\n claudeEnv,\n CLAUDE_PROJECT_DIR_ENV,\n CLAUDE_PROJECT_DIR_UNSET,\n} from './claude-env';\nexport { AtomicFile } from './atomic-file';\n// The ONE formatter for a remedy that must run in a named directory: `cd '<root>' && <command>`.\n// Single-quoted so a repo path containing a space is still runnable (and still un-smuggleable).\nexport { atRoot } from './at-root';\nexport { RulesConfigDesign } from './rules-config-design';\nexport { DocumentDesign, isDocumentDesign, DESIGN_METADATA_KEYS } from './di';\nexport { ExcludePaths, isWebpiecesStateDir } from './exclude-hook-paths';\nexport { isPathExcluded, matchesAnyGlob } from './exclude-paths';\n// The machine-generated trees a line-count rule never fires on. A FLOOR, not a default value:\n// `max-file-lines.allowedPaths` adds to it, so configuring your own tree cannot lose it.\nexport { GENERATED_CODE_PATHS } from './generated-code-paths';\n// THE one `no-custom-css` path exemption. Both engines that enforce the rule (the edit-time hook and the\n// CI validator) consult this class, so `allowGlobs` cannot be honoured by one half and ignored by the other.\nexport { NoCustomCssScope } from './no-custom-css-scope';\nexport { defaultRules, defaultRulesDir } from './default-rules';\nexport {\n loadTemplate,\n writeTemplateIfMissing,\n writeTemplate,\n TemplateWriter,\n} from './load-template';\n// The instruct-ai docs are delivered as a SET: writing one writes the transitive closure of the docs it\n// links to, so a doc and everything it points at always land together. See instruct-ai-docs.ts.\nexport {\n GIT_WORKFLOW_DOC,\n GitWorkflowDoc,\n InstructAiDoc,\n InstructAiDocSet,\n MergeProcessDoc,\n} from './instruct-ai-docs';\nexport {\n MERGE_PROCESS_DOC,\n MergeProcessText,\n MergeRun,\n ReferenceMergeRun,\n} from './merge-process-doc';\nexport { BUILD_LOG_DOC } from './build-log-doc';\nexport {\n validateWebpiecesConfig,\n validatePrGateSection,\n validateChecklistsSection,\n validateSectionPlacement,\n validateExcludePaths,\n validateMatchRulesSection,\n allRuleNames,\n recommendedSeedMode,\n recommendedSeedModeFor,\n seedEntryForRule,\n} from './validate-config';\nexport { validateCommandsSection } from './commands-section-validators';\nexport {\n unknownKeyErrors,\n isCommentKey,\n validateTopLevelKeys,\n COMMENT_KEY_SUFFIX,\n} from './config-key-rules';\n// The retired-key table + the no-back-compat policy it enforces. Exported so the installer can migrate\n// what the errors instruct, and so consumers can enumerate retirements.\nexport {\n RETIRED_CONFIG_KEYS,\n RETIRED_SCOPE_KEY,\n RETIRED_SCOPE_RULE,\n RetiredConfigKey,\n isRetiredKey,\n retiredEntry,\n retiredKeyError,\n retiredKeyErrorsIn,\n retiredRuleFor,\n} from './retired-config-keys';\n// The MECHANICAL cure the unknown-rule error and the banner both name: strip every key no validator has a\n// schema for, so cleanliness is one command rather than a judgement call made while every Bash call is\n// blocked. `PRUNE_UNKNOWN_COMMAND` (constants.ts) is the single spelling of that command.\nexport { ConfigPruner, PruneResult, PrunedKey } from './config-pruner';\nexport { validateChecklistDocs } from './checklist-docs-validator';\n// The OPTIONAL machine-local `~/.webpieces/config.json`: absent (the normal state for every consumer) means\n// each key's declared default, silently; present means STRICT about what it understands and FORWARD-COMPATIBLE\n// about what it does not. A retired key (its own retirement table), a known key of the wrong TYPE and an\n// unparseable document all REJECT; a key this release simply does not recognise is IGNORED with a warning,\n// because the file is machine-global and the repos reading it pin different releases — rejecting a newer\n// release's key would hard-block every repo on the machine that is not yet on it. See home-config.ts.\n// `isHomeConfigPath` is what grants the file its unconditional Write/Edit PASS in the hook guards, which is\n// what keeps a rejection repairable. Every `experimental.*` key is an OPT-IN that defaults OFF, including\n// `whole-repo-build-guard`: ON requires an explicit `true`, and there is no per-key default to export.\nexport {\n HomeConfig,\n HomeConfigService,\n RetiredHomeConfigKey,\n RETIRED_HOME_CONFIG_KEYS,\n HOME_CONFIG_DIR,\n HOME_CONFIG_FILE,\n HOME_EXPERIMENTAL_SECTION,\n HOME_KEY_ORPHAN_DIR_SWEEP,\n HOME_KEY_WHOLE_REPO_BUILD_GUARD,\n HOME_KEY_MAX_CONCURRENT_BUILDS,\n HOME_KEY_TURN_OFF_ALL_REVIEWERS,\n HOME_KEY_SINGLE_ROUND_REVIEW,\n DEFAULT_MAX_CONCURRENT_BUILDS,\n HOME_KEY_DOC,\n HOME_KEY_AI_DOC,\n DOCUMENTATION_KEYS,\n} from './home-config';\n// The MACHINE-WIDE build ledger, `~/.webpieces/builds.log`. THE one carve-out from\n// `no-machine-global-state.spec.ts`'s rule that webpieces writes only under `{repo}/.webpieces` — the\n// argument is in `decisions/0006-the-build-ledger-is-machine-global.md`, and the short form is that \"how\n// many builds are burning this box's CPU\" is a fact about the MACHINE, is not a cache of anything a\n// remote owns, and cannot be answered from a per-repo file because every linked worktree has its own\n// `.webpieces/` and would be blind to the sibling it is contending with. See builds-log.ts.\nexport {\n BuildsLog,\n BuildTicket,\n BuildTermination,\n RunningBuild,\n BUILDS_LOG_FILE,\n BUILDS_LOCK_FILE,\n BUILD_START,\n BUILD_DONE_SUCCESS,\n BUILD_DONE_FAIL,\n MAX_BUILDS_LOG_BYTES,\n BUILDS_LOG_GENERATIONS,\n MAX_ROW_BYTES,\n} from './builds-log';\n// The orphan-directory sweep: the corpse an `nx g move` leaves on every clone, which git cannot remove\n// because an ignored dist/ or node_modules/ outlives every tracked file under it. See orphan-dir-scan.ts\n// for why the predicate is git's own `clean -Xdn` answer rather than a hand-rolled ignore walk.\nexport { OrphanDirScanner, OrphanCandidate } from './orphan-dir-scan';\nexport {\n OrphanDirArchiver,\n ArchivedOrphan,\n FailedOrphan,\n OrphanSweepResult,\n OrphanSweepManifest,\n TRASH_STATE_DIR,\n TRASH_MANIFEST_FILE,\n TRASH_RETENTION_DAYS,\n} from './orphan-dir-archive';\nexport { OrphanDirSweeper, OrphanSweepReport } from './orphan-dir-sweep';\nexport {\n MatchRuleConfig,\n MatchRuleViolation,\n findMatchRuleViolations,\n isMatchRuleAllowedPath,\n compileMatchRulePatterns,\n renderMatchRuleMessage,\n DEFAULT_MATCH_RULES,\n} from './match-rules-config';\nexport type { ConfigSection } from './sections';\nexport { schemaFieldNames } from './rule-schemas';\nexport {\n HOOK_GUARD_NAMES,\n BRANCH_STATE_GUARD_KEY,\n PR_LIFECYCLE_GUARD_KEY,\n isHookGuard,\n sectionForRule,\n} from './sections';\nexport { FieldDef } from './field-def';\nexport type { SchemaShape } from './field-def';\nexport { shouldSkipRule, getCurrentBranch } from './skip-rule';\nexport { SkipRuleResult } from './skip-rule';\nexport {\n detectBase,\n resolveBase,\n getChangedFiles,\n getFileDiff,\n getChangedLineNumbers,\n findNewMethodSignaturesInDiff,\n hasChangesInRange,\n isNewOrModified,\n DiffScope,\n DiffRange,\n ChangedFilesOptions,\n} from './diff-scope';\nexport { AbstractRule } from './abstract-rule';\nexport {\n WEBPIECES_DISABLE,\n RULE_NAMES,\n hasDisable,\n WEBPIECES_TMP_DIR,\n MERGE_INFO_DIR,\n PR_REVIEW_DIR,\n MERGE_IN_PROGRESS_FILE,\n MERGE_EXPLANATION_FILE,\n PUSH_DEV_STATE_FILE,\n PRUNE_UNKNOWN_COMMAND,\n} from './constants';\nexport { WebpiecesRulesConfig } from './WebpiecesRulesConfig';\nexport {\n SyncFlowGuidance,\n WP_START_UPDATE,\n WP_FINISH_UPDATE,\n WP_START_UPSERT_PR,\n WP_FINISH_UPSERT_PR,\n WP_PUSH_DEV,\n WP_FINISH_PUSH_DEV,\n} from './sync-flow-guidance';\nexport {\n MaxMethodLinesConfig,\n MaxFileLinesConfig,\n RequireReturnTypeConfig,\n NoInlineTypeLiteralsConfig,\n NoAnyUnknownConfig,\n NoImplicitAnyConfig,\n PrismaValidateDtosConfig,\n PrismaConverterConfig,\n NoDestructureConfig,\n NoUnmanagedExceptionsConfig,\n CatchErrorPatternConfig,\n ThrowCauseRequiredConfig,\n AngularNoDirectApiInResolverConfig,\n NoSymbolDiTokensConfig,\n NoCustomCssConfig,\n NoProcessExitOutsideMainConfig,\n NoFunctionOutsideClassConfig,\n InjectAnnotationNotNeededForConcreteClassConfig,\n FrameworkTagConfig,\n RoleTagConfig,\n EnsureWeAreSecureConfig,\n BranchCreationGuardConfig,\n PrLifecycleGuardConfig,\n NoFileImportCyclesConfig,\n RuntimeArchitectureConfig,\n NxWiringConfig,\n DiGraphConfig,\n NoJsFilesConfig,\n ValidateTsInSrcConfig,\n ValidateArchitectureUnchangedConfig,\n ValidateNoArchitectureCyclesConfig,\n ValidatePackageJsonConfig,\n ValidateVersionsLockedConfig,\n ValidateEslintSyncConfig,\n BaseRuleConfig,\n} from './rule-configs';\n// Mode unions + their value arrays — the single source of truth shared with code-rules.\nexport {\n METHOD_LIMIT_MODES,\n FILE_LIMIT_MODES,\n RETURN_TYPE_MODES,\n INLINE_TYPE_MODES,\n MODIFIED_CODE_MODES,\n PROJECT_MODES,\n PRISMA_DTOS_MODES,\n PRISMA_CONVERTER_MODES,\n DIRECT_API_RESOLVER_MODES,\n THROW_CAUSE_MODES,\n ON_OFF_MODES,\n STRUCTURAL_MODES,\n VALIDATE_TS_MODES,\n} from './rule-configs';\nexport {\n NoClientCreationOutsideServerOrClientConfig,\n CLIENT_CREATION_SEVERITIES,\n} from './no-client-creation-config';\nexport type { ClientCreationSeverity } from './no-client-creation-config';\n// The `no-state-paths-in-templates` config, in its own module for the same reason no-client-creation is:\n// rule-configs.ts is at its file-size cap and a rule that carries real defaults belongs beside them.\nexport {\n NoStatePathsInTemplatesConfig,\n DEFAULT_TEMPLATE_DIRS,\n DEFAULT_BANNED_STATE_PATH_PREFIXES,\n} from './no-state-paths-config';\nexport type {\n MethodLimitMode,\n FileLimitMode,\n ReturnTypeMode,\n InlineTypeMode,\n ModifiedCodeMode,\n ProjectMode,\n PrismaValidateDtosMode,\n PrismaConverterMode,\n DirectApiResolverMode,\n ThrowCauseMode,\n OnOffMode,\n StructuralMode,\n ValidateTsMode,\n} from './rule-configs';\nexport { BranchStateGuardConfig } from './main-sync-guard-configs';\nexport {\n GateDefinition,\n PrGateConfig,\n DEFAULT_BUILD_COMMAND,\n LandPrConfig,\n DevDeployConfig,\n DEFAULT_DEV_BRANCH_NAMESPACE,\n DEFAULT_DEV_BRANCH,\n ReviewContextEntry,\n defaultGates,\n defaultPrGateConfig,\n defaultLandPrConfig,\n defaultDevDeployConfig,\n buildPrGateConfig,\n buildLandPrConfig,\n buildDevDeployConfig,\n MERGE_MODE_AUTO,\n MERGE_MODE_NONE,\n MERGE_MODES,\n} from './pr-gate-config';\nexport {\n ChecklistDefinition,\n toChecklist,\n normalizeChecklistDoc,\n formatFileList,\n} from './checklist-config';\nexport type { RawChecklistItem } from './checklist-config';\nexport { ChecklistValidator } from './checklist-validator';\nexport { ChecklistInstructionsService } from './checklist-instructions';\nexport {\n ReviewerInstructionsService,\n ReviewerBriefing,\n BriefedFile,\n ContextEntry,\n READ_TRUNCATION_LINES,\n ALL_DIFF_ONE_READ_LINES,\n} from './reviewer-instructions';\nexport {\n GateTokenService,\n computeGateToken,\n gateTokenMarker,\n extractGateToken,\n verifyGateToken,\n} from './gate-token';\nexport {\n SubagentProvenanceService,\n ReviewerEvidence,\n ReviewerContext,\n TranscriptScan,\n ProvenanceResult,\n PROVENANCE_OK,\n PROVENANCE_MISSING,\n PROVENANCE_SKIPPED,\n} from './subagent-provenance';\nexport {\n ReviewProvenanceService,\n ReviewProvenance,\n ReviewerTranscript,\n ReviewerPaths,\n OfferedContext,\n ProvenanceWriteRequest,\n DEFAULT_RETENTION_DAYS,\n} from './review-provenance';\nexport {\n ReviewJson,\n PrContext,\n ChecklistResult,\n ChecklistVerdict,\n ChecklistOverride,\n ChecklistOverrideService,\n checklistOverrideService,\n CK_PASS,\n CK_WARN,\n CK_OVERRIDDEN,\n CK_FAIL,\n CK_MISSING,\n CK_BAD_FORMAT,\n VERDICT_GREEN,\n VERDICT_YELLOW,\n VERDICT_RED,\n VERDICT_STATUSES,\n SINGLE_ROUND_MAIN_AGENT_INSTRUCTIONS,\n RequiredChecklist,\n ChecklistReviewContext,\n ReviewJsonService,\n prDirFor,\n reviewJsonPath,\n reviewJsonSchemaHint,\n} from './review-json';\nexport {\n MainSyncStatus,\n MainSyncStatusFile,\n MainSyncFileStore,\n PullRequestIndex,\n MAIN_SYNC_STATUS_VERSION,\n} from './main-sync-file';\nexport {\n MainSyncLock,\n MainSyncStatusService,\n DEFAULT_HANG_TIMEOUT_MINUTES,\n mainSyncStatusPath,\n mainSyncLockPath,\n readMainSyncStatus,\n readMainSyncStatusFile,\n writeMainSyncStatus,\n writeMainSyncStatusFile,\n computeAllMainSyncStatuses,\n readMainSyncLock,\n writeMainSyncLock,\n isLockStale,\n isRefreshInProgress,\n tryAcquireMainSyncLock,\n inProcessLock,\n finishedLock,\n computeMainSyncStatus,\n stampCleanMainSyncStatus,\n squashRecoverySteps,\n} from './main-sync-status';\nexport {\n MergedBranch,\n DeletableBranch,\n DeletableWorktree,\n MergedBranchesCache,\n MergedBranchesService,\n CacheFreshness,\n CACHE_STALE_AFTER_MS,\n CLASSIFICATION_MERGED_PR,\n CLASSIFICATION_BACKUP_OF_MERGED,\n CLASSIFICATION_BACKUP_OF_LIVE,\n CLASSIFICATION_NO_COMMITS,\n CLASSIFICATION_SUPERSEDED,\n CLASSIFICATION_CONTENT_IN_MAIN,\n CLASSIFICATION_NEVER_PROPOSED,\n CLASSIFICATION_IN_USE,\n CLASSIFICATION_PRUNABLE,\n CLASSIFICATION_LOCKED,\n CLASSIFICATION_CURRENT,\n CLASSIFICATION_DETACHED,\n ADJUDICATED_CLASSIFICATIONS,\n} from './merged-branches';\nexport {\n BranchArchiver,\n ArchiveResult,\n ARCHIVE_TAG_PREFIX,\n BRANCH_RETENTIONS,\n BRANCH_RETENTION_DELETE,\n BRANCH_RETENTION_ARCHIVE_TAG,\n BRANCH_RETENTION_KEEP,\n} from './branch-archiver';\nexport { Worktree, WorktreeWorkInFlight, WorktreeService } from './worktrees';\nexport { AgentWorktreeLock, AgentWorktreeLockReader } from './agent-worktree-lock';\nexport {\n HARNESS_NOT_CONSULTED,\n LOCK_LIVENESS_UNVERIFIABLE,\n LockDecision,\n LockEvidence,\n WorktreeLockVerdicts,\n} from './worktree-lock-verdicts';\nexport {\n AGENT_ACTIVITY_LIVE,\n AGENT_ACTIVITY_RETURNED,\n AGENT_ACTIVITY_UNKNOWN,\n AGENT_TRANSCRIPT_QUIET_MS,\n AgentActivity,\n HarnessAgentActivityReader,\n} from './harness-agent-activity';\nexport { ReapedBranch, ReapResult, BranchReaper } from './branch-reaper';\nexport { ReapedWorktree, WorktreeReapResult, WorktreeReaper } from './worktree-reaper';\nexport type { MutationVerb, MutationPhase } from './branch-mutation-log';\nexport {\n BranchMutationEvent,\n BranchMutationLog,\n branchMutationLogPath,\n logBranchMutation,\n} from './branch-mutation-log';\nexport {\n CommandsConfig,\n buildCommandsConfig,\n DEFAULT_UPSERT_PR_COMMAND,\n DEFAULT_MERGE_COMPLETE_COMMAND,\n} from './commands-config';\nexport { StaleBinRemoval, StaleBinSweeper, staleBinSweeper } from './stale-bin-sweep';\n"]}
|
|
@@ -11,6 +11,8 @@ export declare const VERDICT_GREEN = "green";
|
|
|
11
11
|
export declare const VERDICT_YELLOW = "yellow";
|
|
12
12
|
export declare const VERDICT_RED = "red";
|
|
13
13
|
export declare const VERDICT_STATUSES: readonly ["green", "yellow", "red"];
|
|
14
|
+
/** The durable instruction embedded in single-round review.json files for the fixing/coordinating AI. */
|
|
15
|
+
export declare const SINGLE_ROUND_MAIN_AGENT_INSTRUCTIONS: string;
|
|
14
16
|
export declare class ChecklistResult {
|
|
15
17
|
agent: string;
|
|
16
18
|
model: string;
|
|
@@ -71,7 +73,8 @@ export declare class ReviewJson {
|
|
|
71
73
|
risks: string[];
|
|
72
74
|
filesToReview: string[];
|
|
73
75
|
results: ChecklistResult[];
|
|
74
|
-
|
|
76
|
+
mainAgentInstructions: string;
|
|
77
|
+
constructor(agent: string, model: string, title: string, riskScore: number, riskLevel: string, riskEmoji: string, summary: string, violations: string[], risks: string[], filesToReview: string[], results?: ChecklistResult[], mainAgentInstructions?: string);
|
|
75
78
|
}
|
|
76
79
|
export declare const CK_PASS = "pass";
|
|
77
80
|
export declare const CK_WARN = "warn";
|
package/src/review-json-data.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* `from '@webpieces/rules-config'` keep resolving exactly as before and no consumer changes.
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.PrContext = exports.ChecklistVerdict = exports.CK_BAD_FORMAT = exports.CK_MISSING = exports.CK_FAIL = exports.CK_OVERRIDDEN = exports.CK_WARN = exports.CK_PASS = exports.ReviewJson = exports.ChecklistReviewContext = exports.RequiredChecklist = exports.ChecklistResult = exports.VERDICT_STATUSES = exports.VERDICT_RED = exports.VERDICT_YELLOW = exports.VERDICT_GREEN = void 0;
|
|
11
|
+
exports.PrContext = exports.ChecklistVerdict = exports.CK_BAD_FORMAT = exports.CK_MISSING = exports.CK_FAIL = exports.CK_OVERRIDDEN = exports.CK_WARN = exports.CK_PASS = exports.ReviewJson = exports.ChecklistReviewContext = exports.RequiredChecklist = exports.ChecklistResult = exports.SINGLE_ROUND_MAIN_AGENT_INSTRUCTIONS = exports.VERDICT_STATUSES = exports.VERDICT_RED = exports.VERDICT_YELLOW = exports.VERDICT_GREEN = void 0;
|
|
12
12
|
// The three colors a reviewer subagent may report in `review-<id>.json`. A TRI-state, not a boolean,
|
|
13
13
|
// because the boolean it replaced gave a reviewer no way to say "this passes, but a human should look at
|
|
14
14
|
// X" — the only way to raise a concern was to FAIL the PR and then override your own failure, which reads
|
|
@@ -17,6 +17,10 @@ exports.VERDICT_GREEN = 'green';
|
|
|
17
17
|
exports.VERDICT_YELLOW = 'yellow';
|
|
18
18
|
exports.VERDICT_RED = 'red';
|
|
19
19
|
exports.VERDICT_STATUSES = [exports.VERDICT_GREEN, exports.VERDICT_YELLOW, exports.VERDICT_RED];
|
|
20
|
+
/** The durable instruction embedded in single-round review.json files for the fixing/coordinating AI. */
|
|
21
|
+
exports.SINGLE_ROUND_MAIN_AGENT_INSTRUCTIONS = 'DO NOT RERUN this reviewer. If red, fix every finding and change each addressed red result to yellow; ' +
|
|
22
|
+
'yellow is acceptable. If you genuinely disagree, leave it red and flag the human for a decision BEFORE ' +
|
|
23
|
+
'posting the PR. A remaining red overrides any instruction to continue or land on main.';
|
|
20
24
|
// The verdict a reviewer SUBAGENT writes into `.webpieces/pr-review/<featureSlug>/review-<id>.json`, one per
|
|
21
25
|
// matched checklist. One file per checklist so N concurrent reviewer subagents never clobber a shared
|
|
22
26
|
// file. It records the OUTCOME:
|
|
@@ -137,8 +141,9 @@ class ReviewJson {
|
|
|
137
141
|
risks;
|
|
138
142
|
filesToReview;
|
|
139
143
|
results; // resolved per-checklist verdicts (from review-<id>.json); [] when none
|
|
144
|
+
mainAgentInstructions; // non-empty only for the opt-in single-round experiment
|
|
140
145
|
// eslint-disable-next-line @typescript-eslint/max-params
|
|
141
|
-
constructor(agent, model, title, riskScore, riskLevel, riskEmoji, summary, violations, risks, filesToReview, results = []) {
|
|
146
|
+
constructor(agent, model, title, riskScore, riskLevel, riskEmoji, summary, violations, risks, filesToReview, results = [], mainAgentInstructions = '') {
|
|
142
147
|
this.agent = agent;
|
|
143
148
|
this.model = model;
|
|
144
149
|
this.title = title;
|
|
@@ -150,6 +155,7 @@ class ReviewJson {
|
|
|
150
155
|
this.risks = risks;
|
|
151
156
|
this.filesToReview = filesToReview;
|
|
152
157
|
this.results = results;
|
|
158
|
+
this.mainAgentInstructions = mainAgentInstructions;
|
|
153
159
|
}
|
|
154
160
|
}
|
|
155
161
|
exports.ReviewJson = ReviewJson;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-json-data.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/review-json-data.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAIH,qGAAqG;AACrG,yGAAyG;AACzG,0GAA0G;AAC1G,4EAA4E;AAC/D,QAAA,aAAa,GAAG,OAAO,CAAC;AACxB,QAAA,cAAc,GAAG,QAAQ,CAAC;AAC1B,QAAA,WAAW,GAAG,KAAK,CAAC;AACpB,QAAA,gBAAgB,GAAG,CAAC,qBAAa,EAAE,sBAAc,EAAE,mBAAW,CAAU,CAAC;AAEtF,6GAA6G;AAC7G,sGAAsG;AACtG,gCAAgC;AAChC,gDAAgD;AAChD,iHAAiH;AACjH,uGAAuG;AACvG,uFAAuF;AACvF,EAAE;AACF,mGAAmG;AACnG,yGAAyG;AACzG,0GAA0G;AAC1G,gGAA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AM,GAAG,MAAM,CAAC;IACzB,CAAC;CACJ;AAVD,4CAUC;AAED,iHAAiH;AACjH,yGAAyG;AACzG,0GAA0G;AAC1G,yGAAyG;AACzG,MAAa,SAAS;IAClB,IAAI,CAAS,CAAU,oDAAoD;IAC3E;;;;OAIG;IACH,IAAI,CAAS;IACb,YAAY,CAAW,CAAC,iFAAiF;IACzG,KAAK,CAAU,CAAS,4DAA4D;IACpF,UAAU,CAAW,CAAG,sEAAsE;IAC9F,WAAW,CAAS,CAAI,iFAAiF;IACzG,OAAO,CAAS,CAAQ,mFAAmF;IAC3G,WAAW,CAAS,CAAI,+EAA+E;IACvG;;;;;;;;OAQG;IACH,YAAY,CAAS;IAErB,yDAAyD;IACzD,YACI,IAAY,EAAE,IAAY,EAAE,YAAsB,EAClD,KAAK,GAAG,KAAK,EAAE,aAAuB,EAAE,EAAE,WAAW,GAAG,EAAE,EAAE,OAAO,GAAG,EAAE,EAAE,WAAW,GAAG,EAAE,EAC1F,YAAY,GAAG,EAAE;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;CACJ;AAzCD,8BAyCC","sourcesContent":["/**\n * The DATA-ONLY classes and status constants of the PR review system — the verdict a reviewer writes, the\n * checklist that demanded it, the resolved outcome, and the diff context handed to reviewers.\n *\n * Split out of review-json.ts, which holds the SERVICE that reads and writes them. The split is purely by\n * kind (data vs behaviour): review-json.ts re-exports every name below, so `from './review-json'` and\n * `from '@webpieces/rules-config'` keep resolving exactly as before and no consumer changes.\n */\n\nimport { ChecklistOverride } from './checklist-override';\n\n// The three colors a reviewer subagent may report in `review-<id>.json`. A TRI-state, not a boolean,\n// because the boolean it replaced gave a reviewer no way to say \"this passes, but a human should look at\n// X\" — the only way to raise a concern was to FAIL the PR and then override your own failure, which reads\n// on the dashboard as a deliberately-accepted defect rather than as a note.\nexport const VERDICT_GREEN = 'green';\nexport const VERDICT_YELLOW = 'yellow';\nexport const VERDICT_RED = 'red';\nexport const VERDICT_STATUSES = [VERDICT_GREEN, VERDICT_YELLOW, VERDICT_RED] as const;\n\n// The verdict a reviewer SUBAGENT writes into `.webpieces/pr-review/<featureSlug>/review-<id>.json`, one per\n// matched checklist. One file per checklist so N concurrent reviewer subagents never clobber a shared\n// file. It records the OUTCOME:\n// status:'green' → PASS\n// status:'yellow' → WARN (passes; the concern is published on the PR, nothing is blocked)\n// status:'red' + an override-<id>.json → OVERRIDDEN (pass; the human's stated reason reaches the PR)\n// status:'red' + no override file → FAIL (refuse; `output` is printed verbatim)\n//\n// THE `override` FIELD IS GONE FROM THIS FILE, and there is no compatibility mode. The ship-anyway\n// justification used to live here as free text, which made the ONE participant who hears the human — the\n// coordinating agent — the one participant that could not record it, because editing a reviewer's verdict\n// file is (correctly) refused by the harness. It now lives in its own `override-<id>.json`; see\n// ChecklistOverride. A verdict file still carrying an `override` key is reported through `problem` with the\n// destination named, exactly as the removed `success` field is. Data-only (per CLAUDE.md).\nexport class ChecklistResult {\n agent: string;\n model: string;\n id: string;\n status: string; // one of VERDICT_STATUSES; anything else is reported via `problem`\n output: string; // what the reviewer found; printed verbatim when the checklist fails\n // The HUMAN's authorization loaded from `override-<id>.json` beside this verdict, or null when there is\n // none. Loaded alongside the verdict so `resolveVerdict` needs no second read of disk and every command\n // resolves the same outcome from the same bytes.\n override: ChecklistOverride | null;\n // '' = a well-formed verdict. Non-empty = the file exists and parses but its verdict cannot be READ\n // (most often: it still uses the removed `success` field, or the moved `override` field). Carried as\n // data rather than thrown so the complaint can be reported by BOTH wp-review-upsert-pr and\n // wp-finish-upsert-pr in identical words, and so a legacy file is never silently mistaken for a missing one.\n problem: string;\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(agent: string, model: string, id: string, status: string, output: string, override: ChecklistOverride | null, problem = '') {\n this.agent = agent;\n this.model = model;\n this.id = id;\n this.status = status;\n this.output = output;\n this.override = override;\n this.problem = problem;\n }\n}\n\n/**\n * What the pr-gate command computed from the diff: a checklist this branch MATCHED (its patterns hit the\n * diff, so its reviewer subagent is in scope). Drives review-<id>.json enforcement, provenance, the schema\n * hint, and the dashboard. Data-only.\n *\n * NAME NOTE: \"Required\" here means MATCHED, not mandatory — it predates `required` by a long way and is\n * the shared shape across review-json, the detector, the briefing builder, provenance and the dashboard.\n * Whether the reviewer must actually run is the {@link RequiredChecklist.required} field below.\n */\nexport class RequiredChecklist {\n id: string; // = subagent name; keys review-<id>.json\n subagent: string; // reviewer agent that must run (agentType the harness stamps)\n doc: string; // REPO-RELATIVE guidance doc the reviewer reads ('' → it just reads the diff)\n matchedFiles: string[]; // the changed files that matched it (for the dashboard + hint)\n // Which of the checklist's OWN globs actually fired. Printed so a reviewer can judge how coarse the\n // match was — a precise `db/migrations/**` hit means something different from a blanket `**` — and the\n // template tells reviewers that matching IS deliberately coarse. [] = no patterns (matches every PR).\n matchedPatterns: string[];\n // Straight from the checklist's config `required`. true = blocking; false = the human is offered it and\n // may decline. Carried on the MATCH rather than looked up from config downstream so the set that gates\n // and the set that is reported cannot disagree about which of the two a checklist is.\n required: boolean;\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(\n id: string, subagent: string, doc: string, matchedFiles: string[], matchedPatterns: string[] = [],\n // Defaulted to the BLOCKING value so any construction that forgets it fails closed — a test or a\n // future call site that silently produced an optional checklist would be a hole in the gate.\n required = true,\n ) {\n this.id = id;\n this.subagent = subagent;\n this.doc = doc;\n this.matchedFiles = matchedFiles;\n this.matchedPatterns = matchedPatterns;\n this.required = required;\n }\n}\n\n/**\n * The per-PR facts every reviewer subagent needs GIVEN to it, alongside its own checklist: the exact base\n * sha the gate diffs against and the file holding the complete changed-file set. Both used to live only in\n * a doc the printed instruction told the AI to go read, one indirection away from the instruction to hand\n * them over — so the printed block could not stand on its own. Data-only; empty = omit those lines.\n */\nexport class ChecklistReviewContext {\n baseSha: string; // the 3-point merge-base sha\n prContextPath: string; // path of pr-context.json — the AUTHORITATIVE full changed-file set\n /**\n * The exact command that reproduces ONE file's diff, with a `-- <file>` tail — NOT assembled by the\n * caller. This used to be hardcoded as `git diff <baseSha> HEAD -- <file>`, which returns NOTHING on a\n * dirty tree because the changed-file set is computed base→working-tree. See DiffBasis, which derives\n * this string from the same range the file set came from.\n */\n fileDiffCommand: string;\n diffDir: string; // dir of the MATERIALIZED diff (diff/ALL.diff + diff/files/…); '' when not written\n dirty: boolean; // true ⇒ the range includes uncommitted + untracked work, and must be said out loud\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(baseSha = '', prContextPath = '', fileDiffCommand = '', diffDir = '', dirty = false) {\n this.baseSha = baseSha;\n this.prContextPath = prContextPath;\n this.fileDiffCommand = fileDiffCommand;\n this.diffDir = diffDir;\n this.dirty = dirty;\n }\n}\n\n// The AI-authored review for a PR. The AI writes review.json itself between `wp-start-upsert-pr` (which\n// prints the schema) and `wp-finish-upsert-pr` (which reads it); reviewer subagents write the per-checklist\n// review-<id>.json files. Data-only (per CLAUDE.md).\nexport class ReviewJson {\n agent: string;\n model: string;\n title: string; // human PR title describing the change; used as the `gh pr` title (empty → caller falls back)\n riskScore: number; // 0–100, drives the risk bar\n riskLevel: string; // 'green' | 'yellow' | 'red'\n riskEmoji: string; // '🟢' | '🟡' | '🔴' — derived from riskLevel when omitted\n summary: string; // rendered in the dashboard Summary section\n violations: string[]; // pattern/architecture violations; length = the Pattern Violations count\n risks: string[];\n filesToReview: string[];\n results: ChecklistResult[]; // resolved per-checklist verdicts (from review-<id>.json); [] when none\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(agent: string, model: string,\n title: string,\n riskScore: number,\n riskLevel: string,\n riskEmoji: string,\n summary: string,\n violations: string[],\n risks: string[],\n filesToReview: string[],\n results: ChecklistResult[] = [],\n ) {\n this.agent = agent;\n this.model = model;\n this.title = title;\n this.riskScore = riskScore;\n this.riskLevel = riskLevel;\n this.riskEmoji = riskEmoji;\n this.summary = summary;\n this.violations = violations;\n this.risks = risks;\n this.filesToReview = filesToReview;\n this.results = results;\n }\n}\n\n// A checklist's resolved outcome, shared by review.json enforcement and the dashboard so both agree.\n// PASS, WARN and OVERRIDDEN all ship; FAIL, MISSING and BAD_FORMAT all refuse the PR.\nexport const CK_PASS = 'pass'; // review-<id>.json status:'green'\nexport const CK_WARN = 'warn'; // review-<id>.json status:'yellow' → 🟡 passes WITH concerns\nexport const CK_OVERRIDDEN = 'overridden'; // status:'red' + a human's override-<id>.json → 🟠\nexport const CK_FAIL = 'fail'; // review-<id>.json status:'red' + no override → refuse\nexport const CK_MISSING = 'missing'; // no review-<id>.json written → refuse\nexport const CK_BAD_FORMAT = 'bad-format'; // written, but its verdict is unreadable (e.g. legacy `success`)\n\nexport class ChecklistVerdict {\n id: string;\n status: string; // one of CK_PASS | CK_WARN | CK_OVERRIDDEN | CK_FAIL | CK_MISSING | CK_BAD_FORMAT\n detail: string; // reviewer output / override justification / format complaint (dashboard + errors)\n\n constructor(id: string, status: string, detail: string) {\n this.id = id;\n this.status = status;\n this.detail = detail;\n }\n}\n\n// The PR's diff context, written by wp-start-upsert-pr into `.webpieces/pr-review/<featureSlug>/pr-context.json`\n// so a reviewer subagent knows the exact 3-point base the gate used and the full changed-file set — then\n// reads any file's actual diff with `git diff <base> HEAD -- <file>`. This is what lets a checklist match\n// coarsely by path (in the config) while the subagent makes the fine, content-level judgment. Data-only.\nexport class PrContext {\n base: string; // the 3-point merge-base sha the gate diffs against\n /**\n * The real HEAD sha. This was once the literal string 'HEAD', which is not a fact — it cannot be\n * compared later to detect that the tree moved under a review, and it reads as a range that was never\n * actually diffed. Its only reader (reviewContextFor) takes `base`, so recording the sha is free.\n */\n head: string;\n changedFiles: string[]; // every file changed in the range (NOT tsOnly — includes .sql/.gql/Dockerfile/…)\n dirty: boolean; // true ⇒ changedFiles includes uncommitted + untracked work\n dirtyFiles: string[]; // exactly which paths are uncommitted/untracked — why `dirty` is true\n diffCommand: string; // the command that reproduces the WHOLE diff (see DiffBasis; correct when dirty)\n diffDir: string; // dir holding the materialized per-file diffs + ALL.diff; '' when not materialized\n generatedAt: string; // ISO timestamp, so a stale context is detectable rather than silently trusted\n /**\n * Main's head as this clone last saw it — the THIRD hash point, matching the trio the 3-point merge\n * records in `merge-info/<branch>/updatemain-hashes.json`. `base`/`head` above are points A and B\n * under the review side's older names.\n *\n * The review side used to record only A and B, so nothing could answer \"did main move while this was\n * under review?\" — the question you most want answered when a review looks stale. '' when origin/main\n * is unresolvable. Purely informational; nothing gates on it.\n */\n hashMainHead: string;\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(\n base: string, head: string, changedFiles: string[],\n dirty = false, dirtyFiles: string[] = [], diffCommand = '', diffDir = '', generatedAt = '',\n hashMainHead = '',\n ) {\n this.hashMainHead = hashMainHead;\n this.base = base;\n this.head = head;\n this.changedFiles = changedFiles;\n this.dirty = dirty;\n this.dirtyFiles = dirtyFiles;\n this.diffCommand = diffCommand;\n this.diffDir = diffDir;\n this.generatedAt = generatedAt;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"review-json-data.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/review-json-data.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAIH,qGAAqG;AACrG,yGAAyG;AACzG,0GAA0G;AAC1G,4EAA4E;AAC/D,QAAA,aAAa,GAAG,OAAO,CAAC;AACxB,QAAA,cAAc,GAAG,QAAQ,CAAC;AAC1B,QAAA,WAAW,GAAG,KAAK,CAAC;AACpB,QAAA,gBAAgB,GAAG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C,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;CACJ;AAzCD,8BAyCC","sourcesContent":["/**\n * The DATA-ONLY classes and status constants of the PR review system — the verdict a reviewer writes, the\n * checklist that demanded it, the resolved outcome, and the diff context handed to reviewers.\n *\n * Split out of review-json.ts, which holds the SERVICE that reads and writes them. The split is purely by\n * kind (data vs behaviour): review-json.ts re-exports every name below, so `from './review-json'` and\n * `from '@webpieces/rules-config'` keep resolving exactly as before and no consumer changes.\n */\n\nimport { ChecklistOverride } from './checklist-override';\n\n// The three colors a reviewer subagent may report in `review-<id>.json`. A TRI-state, not a boolean,\n// because the boolean it replaced gave a reviewer no way to say \"this passes, but a human should look at\n// X\" — the only way to raise a concern was to FAIL the PR and then override your own failure, which reads\n// on the dashboard as a deliberately-accepted defect rather than as a note.\nexport const VERDICT_GREEN = 'green';\nexport const VERDICT_YELLOW = 'yellow';\nexport const VERDICT_RED = 'red';\nexport const VERDICT_STATUSES = [VERDICT_GREEN, VERDICT_YELLOW, VERDICT_RED] as const;\n\n/** The durable instruction embedded in single-round review.json files for the fixing/coordinating AI. */\nexport const SINGLE_ROUND_MAIN_AGENT_INSTRUCTIONS =\n 'DO NOT RERUN this reviewer. If red, fix every finding and change each addressed red result to yellow; ' +\n 'yellow is acceptable. If you genuinely disagree, leave it red and flag the human for a decision BEFORE ' +\n 'posting the PR. A remaining red overrides any instruction to continue or land on main.';\n\n// The verdict a reviewer SUBAGENT writes into `.webpieces/pr-review/<featureSlug>/review-<id>.json`, one per\n// matched checklist. One file per checklist so N concurrent reviewer subagents never clobber a shared\n// file. It records the OUTCOME:\n// status:'green' → PASS\n// status:'yellow' → WARN (passes; the concern is published on the PR, nothing is blocked)\n// status:'red' + an override-<id>.json → OVERRIDDEN (pass; the human's stated reason reaches the PR)\n// status:'red' + no override file → FAIL (refuse; `output` is printed verbatim)\n//\n// THE `override` FIELD IS GONE FROM THIS FILE, and there is no compatibility mode. The ship-anyway\n// justification used to live here as free text, which made the ONE participant who hears the human — the\n// coordinating agent — the one participant that could not record it, because editing a reviewer's verdict\n// file is (correctly) refused by the harness. It now lives in its own `override-<id>.json`; see\n// ChecklistOverride. A verdict file still carrying an `override` key is reported through `problem` with the\n// destination named, exactly as the removed `success` field is. Data-only (per CLAUDE.md).\nexport class ChecklistResult {\n agent: string;\n model: string;\n id: string;\n status: string; // one of VERDICT_STATUSES; anything else is reported via `problem`\n output: string; // what the reviewer found; printed verbatim when the checklist fails\n // The HUMAN's authorization loaded from `override-<id>.json` beside this verdict, or null when there is\n // none. Loaded alongside the verdict so `resolveVerdict` needs no second read of disk and every command\n // resolves the same outcome from the same bytes.\n override: ChecklistOverride | null;\n // '' = a well-formed verdict. Non-empty = the file exists and parses but its verdict cannot be READ\n // (most often: it still uses the removed `success` field, or the moved `override` field). Carried as\n // data rather than thrown so the complaint can be reported by BOTH wp-review-upsert-pr and\n // wp-finish-upsert-pr in identical words, and so a legacy file is never silently mistaken for a missing one.\n problem: string;\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(agent: string, model: string, id: string, status: string, output: string, override: ChecklistOverride | null, problem = '') {\n this.agent = agent;\n this.model = model;\n this.id = id;\n this.status = status;\n this.output = output;\n this.override = override;\n this.problem = problem;\n }\n}\n\n/**\n * What the pr-gate command computed from the diff: a checklist this branch MATCHED (its patterns hit the\n * diff, so its reviewer subagent is in scope). Drives review-<id>.json enforcement, provenance, the schema\n * hint, and the dashboard. Data-only.\n *\n * NAME NOTE: \"Required\" here means MATCHED, not mandatory — it predates `required` by a long way and is\n * the shared shape across review-json, the detector, the briefing builder, provenance and the dashboard.\n * Whether the reviewer must actually run is the {@link RequiredChecklist.required} field below.\n */\nexport class RequiredChecklist {\n id: string; // = subagent name; keys review-<id>.json\n subagent: string; // reviewer agent that must run (agentType the harness stamps)\n doc: string; // REPO-RELATIVE guidance doc the reviewer reads ('' → it just reads the diff)\n matchedFiles: string[]; // the changed files that matched it (for the dashboard + hint)\n // Which of the checklist's OWN globs actually fired. Printed so a reviewer can judge how coarse the\n // match was — a precise `db/migrations/**` hit means something different from a blanket `**` — and the\n // template tells reviewers that matching IS deliberately coarse. [] = no patterns (matches every PR).\n matchedPatterns: string[];\n // Straight from the checklist's config `required`. true = blocking; false = the human is offered it and\n // may decline. Carried on the MATCH rather than looked up from config downstream so the set that gates\n // and the set that is reported cannot disagree about which of the two a checklist is.\n required: boolean;\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(\n id: string, subagent: string, doc: string, matchedFiles: string[], matchedPatterns: string[] = [],\n // Defaulted to the BLOCKING value so any construction that forgets it fails closed — a test or a\n // future call site that silently produced an optional checklist would be a hole in the gate.\n required = true,\n ) {\n this.id = id;\n this.subagent = subagent;\n this.doc = doc;\n this.matchedFiles = matchedFiles;\n this.matchedPatterns = matchedPatterns;\n this.required = required;\n }\n}\n\n/**\n * The per-PR facts every reviewer subagent needs GIVEN to it, alongside its own checklist: the exact base\n * sha the gate diffs against and the file holding the complete changed-file set. Both used to live only in\n * a doc the printed instruction told the AI to go read, one indirection away from the instruction to hand\n * them over — so the printed block could not stand on its own. Data-only; empty = omit those lines.\n */\nexport class ChecklistReviewContext {\n baseSha: string; // the 3-point merge-base sha\n prContextPath: string; // path of pr-context.json — the AUTHORITATIVE full changed-file set\n /**\n * The exact command that reproduces ONE file's diff, with a `-- <file>` tail — NOT assembled by the\n * caller. This used to be hardcoded as `git diff <baseSha> HEAD -- <file>`, which returns NOTHING on a\n * dirty tree because the changed-file set is computed base→working-tree. See DiffBasis, which derives\n * this string from the same range the file set came from.\n */\n fileDiffCommand: string;\n diffDir: string; // dir of the MATERIALIZED diff (diff/ALL.diff + diff/files/…); '' when not written\n dirty: boolean; // true ⇒ the range includes uncommitted + untracked work, and must be said out loud\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(baseSha = '', prContextPath = '', fileDiffCommand = '', diffDir = '', dirty = false) {\n this.baseSha = baseSha;\n this.prContextPath = prContextPath;\n this.fileDiffCommand = fileDiffCommand;\n this.diffDir = diffDir;\n this.dirty = dirty;\n }\n}\n\n// The AI-authored review for a PR. The AI writes review.json itself between `wp-start-upsert-pr` (which\n// prints the schema) and `wp-finish-upsert-pr` (which reads it); reviewer subagents write the per-checklist\n// review-<id>.json files. Data-only (per CLAUDE.md).\nexport class ReviewJson {\n agent: string;\n model: string;\n title: string; // human PR title describing the change; used as the `gh pr` title (empty → caller falls back)\n riskScore: number; // 0–100, drives the risk bar\n riskLevel: string; // 'green' | 'yellow' | 'red'\n riskEmoji: string; // '🟢' | '🟡' | '🔴' — derived from riskLevel when omitted\n summary: string; // rendered in the dashboard Summary section\n violations: string[]; // pattern/architecture violations; length = the Pattern Violations count\n risks: string[];\n filesToReview: string[];\n results: ChecklistResult[]; // resolved per-checklist verdicts (from review-<id>.json); [] when none\n mainAgentInstructions: string; // non-empty only for the opt-in single-round experiment\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(agent: string, model: string,\n title: string,\n riskScore: number,\n riskLevel: string,\n riskEmoji: string,\n summary: string,\n violations: string[],\n risks: string[],\n filesToReview: string[],\n results: ChecklistResult[] = [],\n mainAgentInstructions = '',\n ) {\n this.agent = agent;\n this.model = model;\n this.title = title;\n this.riskScore = riskScore;\n this.riskLevel = riskLevel;\n this.riskEmoji = riskEmoji;\n this.summary = summary;\n this.violations = violations;\n this.risks = risks;\n this.filesToReview = filesToReview;\n this.results = results;\n this.mainAgentInstructions = mainAgentInstructions;\n }\n}\n\n// A checklist's resolved outcome, shared by review.json enforcement and the dashboard so both agree.\n// PASS, WARN and OVERRIDDEN all ship; FAIL, MISSING and BAD_FORMAT all refuse the PR.\nexport const CK_PASS = 'pass'; // review-<id>.json status:'green'\nexport const CK_WARN = 'warn'; // review-<id>.json status:'yellow' → 🟡 passes WITH concerns\nexport const CK_OVERRIDDEN = 'overridden'; // status:'red' + a human's override-<id>.json → 🟠\nexport const CK_FAIL = 'fail'; // review-<id>.json status:'red' + no override → refuse\nexport const CK_MISSING = 'missing'; // no review-<id>.json written → refuse\nexport const CK_BAD_FORMAT = 'bad-format'; // written, but its verdict is unreadable (e.g. legacy `success`)\n\nexport class ChecklistVerdict {\n id: string;\n status: string; // one of CK_PASS | CK_WARN | CK_OVERRIDDEN | CK_FAIL | CK_MISSING | CK_BAD_FORMAT\n detail: string; // reviewer output / override justification / format complaint (dashboard + errors)\n\n constructor(id: string, status: string, detail: string) {\n this.id = id;\n this.status = status;\n this.detail = detail;\n }\n}\n\n// The PR's diff context, written by wp-start-upsert-pr into `.webpieces/pr-review/<featureSlug>/pr-context.json`\n// so a reviewer subagent knows the exact 3-point base the gate used and the full changed-file set — then\n// reads any file's actual diff with `git diff <base> HEAD -- <file>`. This is what lets a checklist match\n// coarsely by path (in the config) while the subagent makes the fine, content-level judgment. Data-only.\nexport class PrContext {\n base: string; // the 3-point merge-base sha the gate diffs against\n /**\n * The real HEAD sha. This was once the literal string 'HEAD', which is not a fact — it cannot be\n * compared later to detect that the tree moved under a review, and it reads as a range that was never\n * actually diffed. Its only reader (reviewContextFor) takes `base`, so recording the sha is free.\n */\n head: string;\n changedFiles: string[]; // every file changed in the range (NOT tsOnly — includes .sql/.gql/Dockerfile/…)\n dirty: boolean; // true ⇒ changedFiles includes uncommitted + untracked work\n dirtyFiles: string[]; // exactly which paths are uncommitted/untracked — why `dirty` is true\n diffCommand: string; // the command that reproduces the WHOLE diff (see DiffBasis; correct when dirty)\n diffDir: string; // dir holding the materialized per-file diffs + ALL.diff; '' when not materialized\n generatedAt: string; // ISO timestamp, so a stale context is detectable rather than silently trusted\n /**\n * Main's head as this clone last saw it — the THIRD hash point, matching the trio the 3-point merge\n * records in `merge-info/<branch>/updatemain-hashes.json`. `base`/`head` above are points A and B\n * under the review side's older names.\n *\n * The review side used to record only A and B, so nothing could answer \"did main move while this was\n * under review?\" — the question you most want answered when a review looks stale. '' when origin/main\n * is unresolvable. Purely informational; nothing gates on it.\n */\n hashMainHead: string;\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(\n base: string, head: string, changedFiles: string[],\n dirty = false, dirtyFiles: string[] = [], diffCommand = '', diffDir = '', generatedAt = '',\n hashMainHead = '',\n ) {\n this.hashMainHead = hashMainHead;\n this.base = base;\n this.head = head;\n this.changedFiles = changedFiles;\n this.dirty = dirty;\n this.dirtyFiles = dirtyFiles;\n this.diffCommand = diffCommand;\n this.diffDir = diffDir;\n this.generatedAt = generatedAt;\n }\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReviewJsonSchemaRenderer = void 0;
|
|
4
|
+
/** Pure renderer for the AI-authored review.json shape printed by the PR gate. */
|
|
5
|
+
class ReviewJsonSchemaRenderer {
|
|
6
|
+
render(filePath, mainAgentInstructions = '') {
|
|
7
|
+
const instructions = mainAgentInstructions === '' ? ''
|
|
8
|
+
: `,\n "main_agent_instructions": ${JSON.stringify(mainAgentInstructions)}\n`;
|
|
9
|
+
return (`Write your PR review to:\n ${filePath}\n\n` +
|
|
10
|
+
'with this exact JSON shape (riskEmoji optional — derived from riskLevel):\n\n' +
|
|
11
|
+
'{\n' +
|
|
12
|
+
' "title": "concise PR title describing the change (imperative, no branch names)",\n' +
|
|
13
|
+
' "agent": "claude | codex | unknown",\n' +
|
|
14
|
+
' "model": "opus | sonnet | actual readable model name | unknown",\n' +
|
|
15
|
+
' "riskScore": 0, // integer 0–100 (higher = riskier)\n' +
|
|
16
|
+
' "riskLevel": "green | yellow | red",\n' +
|
|
17
|
+
' "summary": "5–10 sentence review summary",\n' +
|
|
18
|
+
' "violations": ["pattern/architecture violations you found (empty array if none)"],\n' +
|
|
19
|
+
' "risks": ["notable risks (empty array if none)"],\n' +
|
|
20
|
+
` "filesToReview": ["paths a human should look at (empty array if none)"]${instructions}\n` +
|
|
21
|
+
'}');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.ReviewJsonSchemaRenderer = ReviewJsonSchemaRenderer;
|
|
25
|
+
//# sourceMappingURL=review-json-schema-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-json-schema-renderer.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/review-json-schema-renderer.ts"],"names":[],"mappings":";;;AAAA,kFAAkF;AAClF,MAAa,wBAAwB;IACjC,MAAM,CAAC,QAAgB,EAAE,qBAAqB,GAAG,EAAE;QAC/C,MAAM,YAAY,GAAG,qBAAqB,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;YAClD,CAAC,CAAC,mCAAmC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC;QACnF,OAAO,CACH,+BAA+B,QAAQ,MAAM;YAC7C,+EAA+E;YAC/E,KAAK;YACL,sFAAsF;YACtF,0CAA0C;YAC1C,sEAAsE;YACtE,+EAA+E;YAC/E,0CAA0C;YAC1C,gDAAgD;YAChD,wFAAwF;YACxF,uDAAuD;YACvD,4EAA4E,YAAY,IAAI;YAC5F,GAAG,CACN,CAAC;IACN,CAAC;CACJ;AApBD,4DAoBC","sourcesContent":["/** Pure renderer for the AI-authored review.json shape printed by the PR gate. */\nexport class ReviewJsonSchemaRenderer {\n render(filePath: string, mainAgentInstructions = ''): string {\n const instructions = mainAgentInstructions === '' ? ''\n : `,\\n \"main_agent_instructions\": ${JSON.stringify(mainAgentInstructions)}\\n`;\n return (\n `Write your PR review to:\\n ${filePath}\\n\\n` +\n 'with this exact JSON shape (riskEmoji optional — derived from riskLevel):\\n\\n' +\n '{\\n' +\n ' \"title\": \"concise PR title describing the change (imperative, no branch names)\",\\n' +\n ' \"agent\": \"claude | codex | unknown\",\\n' +\n ' \"model\": \"opus | sonnet | actual readable model name | unknown\",\\n' +\n ' \"riskScore\": 0, // integer 0–100 (higher = riskier)\\n' +\n ' \"riskLevel\": \"green | yellow | red\",\\n' +\n ' \"summary\": \"5–10 sentence review summary\",\\n' +\n ' \"violations\": [\"pattern/architecture violations you found (empty array if none)\"],\\n' +\n ' \"risks\": [\"notable risks (empty array if none)\"],\\n' +\n ` \"filesToReview\": [\"paths a human should look at (empty array if none)\"]${instructions}\\n` +\n '}'\n );\n }\n}\n"]}
|
package/src/review-json.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DotWebpieces } from './state-dir';
|
|
2
2
|
import { ChecklistOverride, ChecklistOverrideService, checklistOverrideService } from './checklist-override';
|
|
3
|
-
import { VERDICT_GREEN, VERDICT_YELLOW, VERDICT_RED, VERDICT_STATUSES, ChecklistResult, RequiredChecklist, ChecklistReviewContext, ReviewJson, CK_PASS, CK_WARN, CK_OVERRIDDEN, CK_FAIL, CK_MISSING, CK_BAD_FORMAT, ChecklistVerdict, PrContext } from './review-json-data';
|
|
3
|
+
import { VERDICT_GREEN, VERDICT_YELLOW, VERDICT_RED, VERDICT_STATUSES, SINGLE_ROUND_MAIN_AGENT_INSTRUCTIONS, ChecklistResult, RequiredChecklist, ChecklistReviewContext, ReviewJson, CK_PASS, CK_WARN, CK_OVERRIDDEN, CK_FAIL, CK_MISSING, CK_BAD_FORMAT, ChecklistVerdict, PrContext } from './review-json-data';
|
|
4
4
|
export { ChecklistOverride, ChecklistOverrideService, checklistOverrideService };
|
|
5
|
-
export { VERDICT_GREEN, VERDICT_YELLOW, VERDICT_RED, VERDICT_STATUSES, ChecklistResult, RequiredChecklist, ChecklistReviewContext, ReviewJson, CK_PASS, CK_WARN, CK_OVERRIDDEN, CK_FAIL, CK_MISSING, CK_BAD_FORMAT, ChecklistVerdict, PrContext, };
|
|
5
|
+
export { VERDICT_GREEN, VERDICT_YELLOW, VERDICT_RED, VERDICT_STATUSES, SINGLE_ROUND_MAIN_AGENT_INSTRUCTIONS, ChecklistResult, RequiredChecklist, ChecklistReviewContext, ReviewJson, CK_PASS, CK_WARN, CK_OVERRIDDEN, CK_FAIL, CK_MISSING, CK_BAD_FORMAT, ChecklistVerdict, PrContext, };
|
|
6
6
|
/** Locates + loads/validates the AI-authored review.json. `@injectable(bindingScopeValues.Singleton)` so it's drawn in the design. */
|
|
7
7
|
export declare class ReviewJsonService {
|
|
8
8
|
private readonly dotDir;
|
|
@@ -61,7 +61,7 @@ export declare class ReviewJsonService {
|
|
|
61
61
|
* is absent or unreadable — the block then just omits those lines.
|
|
62
62
|
*/
|
|
63
63
|
reviewContextFor(repoRoot: string, featureName: string): ChecklistReviewContext;
|
|
64
|
-
reviewJsonSchemaHint(filePath: string): string;
|
|
64
|
+
reviewJsonSchemaHint(filePath: string, mainAgentInstructions?: string): string;
|
|
65
65
|
/**
|
|
66
66
|
* The extra line the "no review.json" complaint carries when a PREVIOUS review was archived here. It
|
|
67
67
|
* turns a bare "not found" — which reads as data loss, and invites hunting for the file — into the fact:
|
|
@@ -101,7 +101,8 @@ export declare class ReviewJsonService {
|
|
|
101
101
|
* must have a well-formed, passing (or overridden) review-<id>.json or a validation error is raised
|
|
102
102
|
* alongside the usual ones so the AI gets ONE message.
|
|
103
103
|
*/
|
|
104
|
-
loadReviewJson(filePath: string, required?: readonly RequiredChecklist[]): ReviewJson;
|
|
104
|
+
loadReviewJson(filePath: string, required?: readonly RequiredChecklist[], expectedMainAgentInstructions?: string): ReviewJson;
|
|
105
|
+
private validateMainAgentInstructions;
|
|
105
106
|
/**
|
|
106
107
|
* The checklists that still OWE a verdict: no review-<id>.json at all, a malformed one, or one whose
|
|
107
108
|
* verdict is an un-overridden FAIL. This is the set every message lists — a checklist already PASSed or
|
|
@@ -207,4 +208,4 @@ export declare class ReviewJsonService {
|
|
|
207
208
|
}
|
|
208
209
|
export declare function prDirFor(repoRoot: string, featureName: string): string;
|
|
209
210
|
export declare function reviewJsonPath(repoRoot: string, featureName: string): string;
|
|
210
|
-
export declare function reviewJsonSchemaHint(filePath: string): string;
|
|
211
|
+
export declare function reviewJsonSchemaHint(filePath: string, mainAgentInstructions?: string): string;
|
package/src/review-json.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReviewJsonService = exports.PrContext = exports.ChecklistVerdict = exports.CK_BAD_FORMAT = exports.CK_MISSING = exports.CK_FAIL = exports.CK_OVERRIDDEN = exports.CK_WARN = exports.CK_PASS = exports.ReviewJson = exports.ChecklistReviewContext = exports.RequiredChecklist = exports.ChecklistResult = exports.VERDICT_STATUSES = exports.VERDICT_RED = exports.VERDICT_YELLOW = exports.VERDICT_GREEN = exports.checklistOverrideService = exports.ChecklistOverrideService = exports.ChecklistOverride = void 0;
|
|
3
|
+
exports.ReviewJsonService = exports.PrContext = exports.ChecklistVerdict = exports.CK_BAD_FORMAT = exports.CK_MISSING = exports.CK_FAIL = exports.CK_OVERRIDDEN = exports.CK_WARN = exports.CK_PASS = exports.ReviewJson = exports.ChecklistReviewContext = exports.RequiredChecklist = exports.ChecklistResult = exports.SINGLE_ROUND_MAIN_AGENT_INSTRUCTIONS = exports.VERDICT_STATUSES = exports.VERDICT_RED = exports.VERDICT_YELLOW = exports.VERDICT_GREEN = exports.checklistOverrideService = exports.ChecklistOverrideService = exports.ChecklistOverride = void 0;
|
|
4
4
|
exports.prDirFor = prDirFor;
|
|
5
5
|
exports.reviewJsonPath = reviewJsonPath;
|
|
6
6
|
exports.reviewJsonSchemaHint = reviewJsonSchemaHint;
|
|
@@ -12,6 +12,7 @@ const constants_1 = require("./constants");
|
|
|
12
12
|
const state_dir_1 = require("./state-dir");
|
|
13
13
|
const inform_ai_error_1 = require("./inform-ai-error");
|
|
14
14
|
const to_error_1 = require("./to-error");
|
|
15
|
+
const review_json_schema_renderer_1 = require("./review-json-schema-renderer");
|
|
15
16
|
const checklist_override_1 = require("./checklist-override");
|
|
16
17
|
Object.defineProperty(exports, "ChecklistOverride", { enumerable: true, get: function () { return checklist_override_1.ChecklistOverride; } });
|
|
17
18
|
Object.defineProperty(exports, "ChecklistOverrideService", { enumerable: true, get: function () { return checklist_override_1.ChecklistOverrideService; } });
|
|
@@ -21,6 +22,7 @@ Object.defineProperty(exports, "VERDICT_GREEN", { enumerable: true, get: functio
|
|
|
21
22
|
Object.defineProperty(exports, "VERDICT_YELLOW", { enumerable: true, get: function () { return review_json_data_1.VERDICT_YELLOW; } });
|
|
22
23
|
Object.defineProperty(exports, "VERDICT_RED", { enumerable: true, get: function () { return review_json_data_1.VERDICT_RED; } });
|
|
23
24
|
Object.defineProperty(exports, "VERDICT_STATUSES", { enumerable: true, get: function () { return review_json_data_1.VERDICT_STATUSES; } });
|
|
25
|
+
Object.defineProperty(exports, "SINGLE_ROUND_MAIN_AGENT_INSTRUCTIONS", { enumerable: true, get: function () { return review_json_data_1.SINGLE_ROUND_MAIN_AGENT_INSTRUCTIONS; } });
|
|
24
26
|
Object.defineProperty(exports, "ChecklistResult", { enumerable: true, get: function () { return review_json_data_1.ChecklistResult; } });
|
|
25
27
|
Object.defineProperty(exports, "RequiredChecklist", { enumerable: true, get: function () { return review_json_data_1.RequiredChecklist; } });
|
|
26
28
|
Object.defineProperty(exports, "ChecklistReviewContext", { enumerable: true, get: function () { return review_json_data_1.ChecklistReviewContext; } });
|
|
@@ -201,23 +203,9 @@ let ReviewJsonService = class ReviewJsonService {
|
|
|
201
203
|
return new review_json_data_1.ChecklistReviewContext('', p);
|
|
202
204
|
}
|
|
203
205
|
}
|
|
204
|
-
// Copy-paste schema
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
reviewJsonSchemaHint(filePath) {
|
|
208
|
-
return (`Write your PR review to:\n ${filePath}\n\n` +
|
|
209
|
-
`with this exact JSON shape (riskEmoji optional — derived from riskLevel):\n\n` +
|
|
210
|
-
`{\n` +
|
|
211
|
-
` "title": "concise PR title describing the change (imperative, no branch names)",\n` +
|
|
212
|
-
` "agent": "claude | codex | unknown",\n` +
|
|
213
|
-
` "model": "opus | sonnet | actual readable model name | unknown",\n` +
|
|
214
|
-
` "riskScore": 0, // integer 0–100 (higher = riskier)\n` +
|
|
215
|
-
` "riskLevel": "green | yellow | red",\n` +
|
|
216
|
-
` "summary": "5–10 sentence review summary",\n` +
|
|
217
|
-
` "violations": ["pattern/architecture violations you found (empty array if none)"],\n` +
|
|
218
|
-
` "risks": ["notable risks (empty array if none)"],\n` +
|
|
219
|
-
` "filesToReview": ["paths a human should look at (empty array if none)"]\n` +
|
|
220
|
-
`}`);
|
|
206
|
+
// Copy-paste review.json schema shared by every command that asks the coordinating AI to write it.
|
|
207
|
+
reviewJsonSchemaHint(filePath, mainAgentInstructions = '') {
|
|
208
|
+
return new review_json_schema_renderer_1.ReviewJsonSchemaRenderer().render(filePath, mainAgentInstructions);
|
|
221
209
|
}
|
|
222
210
|
/**
|
|
223
211
|
* The extra line the "no review.json" complaint carries when a PREVIOUS review was archived here. It
|
|
@@ -279,15 +267,15 @@ let ReviewJsonService = class ReviewJsonService {
|
|
|
279
267
|
* alongside the usual ones so the AI gets ONE message.
|
|
280
268
|
*/
|
|
281
269
|
// webpieces-disable max-lines-new-methods -- one cohesive load+validate pass over the review fields
|
|
282
|
-
loadReviewJson(filePath, required = []) {
|
|
270
|
+
loadReviewJson(filePath, required = [], expectedMainAgentInstructions = '') {
|
|
283
271
|
if (!fs.existsSync(filePath)) {
|
|
284
272
|
throw new inform_ai_error_1.InformAiError(`Required review.json not found.${this.archivedReviewHint(filePath)}\n\n` +
|
|
285
|
-
`${this.reviewJsonSchemaHint(filePath)}\n\n` +
|
|
273
|
+
`${this.reviewJsonSchemaHint(filePath, expectedMainAgentInstructions)}\n\n` +
|
|
286
274
|
`Then re-run: pnpm wp-finish-upsert-pr`);
|
|
287
275
|
}
|
|
288
|
-
const raw = this.parseReviewJson(fs.readFileSync(filePath, 'utf8'), filePath);
|
|
276
|
+
const raw = this.parseReviewJson(fs.readFileSync(filePath, 'utf8'), filePath, expectedMainAgentInstructions);
|
|
289
277
|
if (typeof raw !== 'object' || raw === null || Array.isArray(raw)) {
|
|
290
|
-
throw new inform_ai_error_1.InformAiError(`review.json must be a JSON object.\n\n${this.reviewJsonSchemaHint(filePath)}`);
|
|
278
|
+
throw new inform_ai_error_1.InformAiError(`review.json must be a JSON object.\n\n${this.reviewJsonSchemaHint(filePath, expectedMainAgentInstructions)}`);
|
|
291
279
|
}
|
|
292
280
|
const errors = [];
|
|
293
281
|
for (const field of ['agent', 'model']) {
|
|
@@ -307,20 +295,29 @@ let ReviewJsonService = class ReviewJsonService {
|
|
|
307
295
|
if (title === '') {
|
|
308
296
|
errors.push('"title" must be a non-empty, imperative PR title describing the change (no branch names).');
|
|
309
297
|
}
|
|
298
|
+
const mainAgentInstructions = this.validateMainAgentInstructions(raw, expectedMainAgentInstructions, errors);
|
|
310
299
|
const results = this.loadChecklistResults(filePath, required);
|
|
311
300
|
for (const err of this.requiredChecklistErrors(required, results, filePath))
|
|
312
301
|
errors.push(err);
|
|
313
302
|
if (errors.length > 0) {
|
|
314
303
|
throw new inform_ai_error_1.InformAiError(`review.json has ${errors.length} error(s) — fix ALL, then re-run pnpm wp-finish-upsert-pr:\n\n` +
|
|
315
304
|
errors.map((e) => ` • ${e}`).join('\n') +
|
|
316
|
-
`\n\n${this.reviewJsonSchemaHint(filePath)}`);
|
|
305
|
+
`\n\n${this.reviewJsonSchemaHint(filePath, expectedMainAgentInstructions)}`);
|
|
317
306
|
}
|
|
318
307
|
const level = riskLevel;
|
|
319
308
|
const emoji = typeof raw['riskEmoji'] === 'string' && raw['riskEmoji'] !== ''
|
|
320
309
|
? raw['riskEmoji']
|
|
321
310
|
: (EMOJI_FOR_LEVEL[level] ?? '🟡');
|
|
322
311
|
const summary = typeof raw['summary'] === 'string' ? raw['summary'] : '';
|
|
323
|
-
return new review_json_data_1.ReviewJson(raw['agent'].trim(), raw['model'].trim(), title, riskScore, level, emoji, summary, this.asStringArray(raw['violations']), this.asStringArray(raw['risks']), this.asStringArray(raw['filesToReview']), results);
|
|
312
|
+
return new review_json_data_1.ReviewJson(raw['agent'].trim(), raw['model'].trim(), title, riskScore, level, emoji, summary, this.asStringArray(raw['violations']), this.asStringArray(raw['risks']), this.asStringArray(raw['filesToReview']), results, mainAgentInstructions);
|
|
313
|
+
}
|
|
314
|
+
// webpieces-disable no-any-unknown -- AI-authored JSON boundary is validated before use
|
|
315
|
+
validateMainAgentInstructions(raw, expected, errors) {
|
|
316
|
+
const actual = typeof raw['main_agent_instructions'] === 'string'
|
|
317
|
+
? raw['main_agent_instructions'].trim() : '';
|
|
318
|
+
if (expected !== '' && actual !== expected)
|
|
319
|
+
errors.push('"main_agent_instructions" must exactly preserve the single-round instructions printed by stage ②.');
|
|
320
|
+
return actual;
|
|
324
321
|
}
|
|
325
322
|
/**
|
|
326
323
|
* The checklists that still OWE a verdict: no review-<id>.json at all, a malformed one, or one whose
|
|
@@ -608,7 +605,7 @@ let ReviewJsonService = class ReviewJsonService {
|
|
|
608
605
|
}
|
|
609
606
|
// Parse opaque AI-authored JSON, converting a SyntaxError into a readable InformAiError.
|
|
610
607
|
// webpieces-disable no-any-unknown -- returns the opaque parsed object; loadReviewJson narrows each field
|
|
611
|
-
parseReviewJson(raw, filePath) {
|
|
608
|
+
parseReviewJson(raw, filePath, expectedMainAgentInstructions = '') {
|
|
612
609
|
// webpieces-disable no-unmanaged-exceptions -- chokepoint: convert JSON.parse SyntaxError to an InformAiError for the AI
|
|
613
610
|
// eslint-disable-next-line @webpieces/no-unmanaged-exceptions
|
|
614
611
|
try {
|
|
@@ -617,7 +614,8 @@ let ReviewJsonService = class ReviewJsonService {
|
|
|
617
614
|
}
|
|
618
615
|
catch (err) {
|
|
619
616
|
const error = (0, to_error_1.toError)(err);
|
|
620
|
-
throw new inform_ai_error_1.InformAiError(`review.json is not valid JSON (${error.message}).\n\n
|
|
617
|
+
throw new inform_ai_error_1.InformAiError(`review.json is not valid JSON (${error.message}).\n\n` +
|
|
618
|
+
`${this.reviewJsonSchemaHint(filePath, expectedMainAgentInstructions)}\n\n` +
|
|
621
619
|
`Then re-run: pnpm wp-finish-upsert-pr`);
|
|
622
620
|
}
|
|
623
621
|
}
|
|
@@ -639,7 +637,7 @@ function reviewJsonPath(repoRoot, featureName) {
|
|
|
639
637
|
return reviewJsonSvc.reviewJsonPath(repoRoot, featureName);
|
|
640
638
|
}
|
|
641
639
|
// webpieces-disable no-function-outside-class -- temporary back-compat delegator to ReviewJsonService; removed once consumers inject it
|
|
642
|
-
function reviewJsonSchemaHint(filePath) {
|
|
643
|
-
return reviewJsonSvc.reviewJsonSchemaHint(filePath);
|
|
640
|
+
function reviewJsonSchemaHint(filePath, mainAgentInstructions = '') {
|
|
641
|
+
return reviewJsonSvc.reviewJsonSchemaHint(filePath, mainAgentInstructions);
|
|
644
642
|
}
|
|
645
643
|
//# sourceMappingURL=review-json.js.map
|