@dynamicworks/br-openspec 2.0.0 → 2.1.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/README.md +11 -2
- package/README.pt-BR.md +11 -2
- package/dist/commands/config.js +4 -0
- package/dist/commands/schema.js +21 -21
- package/dist/core/artifact-graph/instruction-loader.js +4 -4
- package/dist/core/artifact-graph/schema.js +5 -4
- package/dist/core/completions/factory.js +3 -2
- package/dist/core/completions/installers/fish-installer.js +13 -12
- package/dist/core/completions/installers/powershell-installer.js +16 -17
- package/dist/core/completions/installers/zsh-installer.d.ts +0 -8
- package/dist/core/completions/installers/zsh-installer.js +4 -32
- package/dist/core/config.js +3 -2
- package/dist/core/global-config.d.ts +6 -1
- package/dist/core/global-config.js +15 -16
- package/dist/core/parsers/change-parser.js +7 -6
- package/dist/core/parsers/requirement-blocks.js +5 -5
- package/dist/core/parsers/spec-structure.js +1 -1
- package/dist/core/profile-sync-drift.js +1 -0
- package/dist/core/profiles.d.ts +2 -2
- package/dist/core/profiles.js +2 -1
- package/dist/core/project-config.js +12 -13
- package/dist/core/shared/skill-generation.js +3 -1
- package/dist/core/shared/tool-detection.d.ts +2 -2
- package/dist/core/shared/tool-detection.js +2 -0
- package/dist/core/specs-apply.js +38 -39
- package/dist/core/templates/skill-templates.d.ts +1 -1
- package/dist/core/templates/skill-templates.js +1 -1
- package/dist/core/templates/workflows/code-review.d.ts +10 -0
- package/dist/core/templates/workflows/code-review.js +21 -0
- package/dist/core/templates/workflows/sync-specs.js +2 -2
- package/dist/core/tools-manager.js +3 -2
- package/dist/core/update.d.ts +6 -0
- package/dist/core/update.js +21 -0
- package/dist/core/validation/validator.js +2 -2
- package/dist/messages/index.d.ts +145 -2
- package/dist/messages/index.js +320 -12
- package/dist/utils/change-metadata.js +8 -7
- package/dist/utils/change-utils.js +12 -11
- package/package.json +1 -1
- package/schemas/spec-driven/schema.yaml +78 -78
- package/schemas/spec-driven/templates/design.md +5 -5
- package/schemas/spec-driven/templates/proposal.md +9 -9
- package/schemas/spec-driven/templates/spec.md +5 -5
- package/schemas/spec-driven/templates/tasks.md +6 -6
- package/dist/core/templates/workflows/upstream-sync.d.ts +0 -10
- package/dist/core/templates/workflows/upstream-sync.js +0 -116
package/dist/core/update.js
CHANGED
|
@@ -24,6 +24,7 @@ import { WORKFLOW_TO_SKILL_DIR, getCommandConfiguredTools, getConfiguredToolsFor
|
|
|
24
24
|
import { scanInstalledWorkflows as scanInstalledWorkflowsShared, migrateIfNeeded as migrateIfNeededShared, } from './migration.js';
|
|
25
25
|
const require = createRequire(import.meta.url);
|
|
26
26
|
const { version: OPENSPEC_VERSION } = require('../../package.json');
|
|
27
|
+
const OLD_CORE_WORKFLOWS = ['propose', 'explore', 'apply', 'archive'];
|
|
27
28
|
/**
|
|
28
29
|
* Scans installed workflow artifacts (skills and managed commands) across all configured tools.
|
|
29
30
|
* Returns the union of detected workflow IDs that match ALL_WORKFLOWS.
|
|
@@ -96,6 +97,7 @@ export class UpdateCommand {
|
|
|
96
97
|
// Still check for new tool directories and extra workflows
|
|
97
98
|
this.detectNewTools(resolvedProjectPath, configuredTools);
|
|
98
99
|
this.displayExtraWorkflowsNote(resolvedProjectPath, configuredTools, desiredWorkflows);
|
|
100
|
+
this.displayOldCoreCustomProfileNote(profile, globalConfig.workflows);
|
|
99
101
|
return;
|
|
100
102
|
}
|
|
101
103
|
// 8. Display update plan
|
|
@@ -202,6 +204,7 @@ export class UpdateCommand {
|
|
|
202
204
|
this.detectNewTools(resolvedProjectPath, configuredAndNewTools);
|
|
203
205
|
// 14. Display note about extra workflows not in profile
|
|
204
206
|
this.displayExtraWorkflowsNote(resolvedProjectPath, configuredAndNewTools, desiredWorkflows);
|
|
207
|
+
this.displayOldCoreCustomProfileNote(profile, globalConfig.workflows);
|
|
205
208
|
// 15. List affected tools
|
|
206
209
|
if (updatedTools.length > 0) {
|
|
207
210
|
const toolDisplayNames = updatedTools;
|
|
@@ -265,6 +268,24 @@ export class UpdateCommand {
|
|
|
265
268
|
console.log(chalk.dim(UPDATE_MESSAGES.extraWorkflowsNote(extraWorkflows.length)));
|
|
266
269
|
}
|
|
267
270
|
}
|
|
271
|
+
/**
|
|
272
|
+
* Sugere voltar ao perfil core quando um perfil personalizado ainda
|
|
273
|
+
* corresponde ao conjunto core antigo (anterior ao sync). Mantém os perfis
|
|
274
|
+
* personalizados sob controle do usuário; não os altera.
|
|
275
|
+
*/
|
|
276
|
+
displayOldCoreCustomProfileNote(profile, workflows) {
|
|
277
|
+
if (profile !== 'custom' || !workflows) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
const workflowSet = new Set(workflows);
|
|
281
|
+
const matchesOldCore = workflowSet.size === OLD_CORE_WORKFLOWS.length &&
|
|
282
|
+
OLD_CORE_WORKFLOWS.every((workflow) => workflowSet.has(workflow));
|
|
283
|
+
if (!matchesOldCore) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
console.log(chalk.dim(UPDATE_MESSAGES.oldCoreProfileSyncNote));
|
|
287
|
+
console.log(chalk.dim(UPDATE_MESSAGES.oldCoreProfileSyncHint));
|
|
288
|
+
}
|
|
268
289
|
/**
|
|
269
290
|
* Removes skill directories for workflows when delivery changed to commands-only.
|
|
270
291
|
* Returns the number of directories removed.
|
|
@@ -151,7 +151,7 @@ export class Validator {
|
|
|
151
151
|
issues.push({ level: 'ERROR', path: entryPath, message: VALIDATOR_MESSAGES.missingRequirementTextAdded(block.name) });
|
|
152
152
|
}
|
|
153
153
|
else if (!this.containsShallOrMust(requirementText)) {
|
|
154
|
-
issues.push({ level: 'ERROR', path: entryPath, message: VALIDATOR_MESSAGES.missingShallOrMustAdded(block.name) });
|
|
154
|
+
issues.push({ level: 'ERROR', path: entryPath, message: VALIDATOR_MESSAGES.missingShallOrMustAdded(block.name, this.containsShallOrMust(block.name)) });
|
|
155
155
|
}
|
|
156
156
|
const scenarioCount = this.countScenarios(block.raw);
|
|
157
157
|
if (scenarioCount < 1) {
|
|
@@ -173,7 +173,7 @@ export class Validator {
|
|
|
173
173
|
issues.push({ level: 'ERROR', path: entryPath, message: VALIDATOR_MESSAGES.missingRequirementTextModified(block.name) });
|
|
174
174
|
}
|
|
175
175
|
else if (!this.containsShallOrMust(requirementText)) {
|
|
176
|
-
issues.push({ level: 'ERROR', path: entryPath, message: VALIDATOR_MESSAGES.missingShallOrMustModified(block.name) });
|
|
176
|
+
issues.push({ level: 'ERROR', path: entryPath, message: VALIDATOR_MESSAGES.missingShallOrMustModified(block.name, this.containsShallOrMust(block.name)) });
|
|
177
177
|
}
|
|
178
178
|
const scenarioCount = this.countScenarios(block.raw);
|
|
179
179
|
if (scenarioCount < 1) {
|
package/dist/messages/index.d.ts
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Este módulo reúne todas as mensagens exibidas ao usuário para facilitar
|
|
5
5
|
* manutenção, revisão e consistência linguística.
|
|
6
|
+
*
|
|
7
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
8
|
+
* ⚠️ TERMOS RESERVADOS — NÃO TRADUZIR
|
|
9
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
10
|
+
* O BR-OpenSpec é PT-BR first, mas o FORMATO de spec é um protocolo lido pelo
|
|
11
|
+
* parser e pelo validador. Os marcadores estruturais e as palavras-chave
|
|
12
|
+
* normativas DEVEM permanecer em inglês e em CAIXA ALTA. Só o conteúdo
|
|
13
|
+
* descritivo (nomes, descrições, prosa) é escrito em português.
|
|
14
|
+
*
|
|
15
|
+
* - Palavras-chave normativas (RFC 2119): MUST, MUST NOT, REQUIRED, SHALL,
|
|
16
|
+
* SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, OPTIONAL.
|
|
17
|
+
* - Cabeçalhos de delta/spec: "## ADDED Requirements", "## MODIFIED Requirements",
|
|
18
|
+
* "## REMOVED Requirements", "## RENAMED Requirements", "## Requirements",
|
|
19
|
+
* "### Requirement:", "#### Scenario:".
|
|
20
|
+
* - Cláusulas de cenário (Gherkin): WHEN, THEN, AND, GIVEN, ELSE.
|
|
21
|
+
* - Auxiliares de RENAMED: FROM, TO.
|
|
22
|
+
*
|
|
23
|
+
* Regra geral: qualquer palavra em CAIXA ALTA que represente uma regra, uma
|
|
24
|
+
* operação de delta (ADD/REMOVE/RENAME) ou uma cláusula de cenário fica em
|
|
25
|
+
* inglês. Traduzir esses termos quebra o parsing/validação dos specs.
|
|
26
|
+
* Ver também AGENTS.md ("Termos reservados em inglês").
|
|
27
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
6
28
|
*/
|
|
7
29
|
export declare const CLI_DESCRIPTIONS: {
|
|
8
30
|
root: string;
|
|
@@ -458,6 +480,8 @@ export declare const CONFIG_MESSAGES: {
|
|
|
458
480
|
workflowBulkArchiveDesc: string;
|
|
459
481
|
workflowVerifyName: string;
|
|
460
482
|
workflowVerifyDesc: string;
|
|
483
|
+
workflowCodeReviewName: string;
|
|
484
|
+
workflowCodeReviewDesc: string;
|
|
461
485
|
workflowOnboardName: string;
|
|
462
486
|
workflowOnboardDesc: string;
|
|
463
487
|
};
|
|
@@ -607,6 +631,35 @@ export declare const COMPLETION_MESSAGES: {
|
|
|
607
631
|
warningCouldNotRemoveLegacy: (path: string, err: string) => string;
|
|
608
632
|
powershellCompletionHeader: string;
|
|
609
633
|
powershellCompletionNote: string;
|
|
634
|
+
fishAlreadyInstalled: string;
|
|
635
|
+
fishAlreadyInstalledDetail: string;
|
|
636
|
+
fishAutoLoadsHint: string;
|
|
637
|
+
fishUpdatedWithBackup: string;
|
|
638
|
+
fishUpdated: string;
|
|
639
|
+
fishInstalled: string;
|
|
640
|
+
fishAutoLoadsDir: string;
|
|
641
|
+
fishAvailableImmediately: string;
|
|
642
|
+
fishFailedToInstall: (error: string) => string;
|
|
643
|
+
fishNotInstalled: string;
|
|
644
|
+
fishUninstalled: string;
|
|
645
|
+
fishFailedToUninstall: (error: string) => string;
|
|
646
|
+
powershellUtf16BEUnsupported: string;
|
|
647
|
+
powershellAlreadyInstalled: string;
|
|
648
|
+
powershellAlreadyInstalledDetail: string;
|
|
649
|
+
powershellAlreadyInstalledHint: string;
|
|
650
|
+
powershellUpdatedWithBackup: string;
|
|
651
|
+
powershellUpdated: string;
|
|
652
|
+
powershellInstalledWithProfile: string;
|
|
653
|
+
powershellInstalled: string;
|
|
654
|
+
powershellFailedToInstall: (error: string) => string;
|
|
655
|
+
powershellScriptInstalled: string;
|
|
656
|
+
powershellEnableCompletions: (profilePath: string) => string;
|
|
657
|
+
powershellSourceComment: string;
|
|
658
|
+
powershellThenRestart: string;
|
|
659
|
+
powershellNotInstalled: string;
|
|
660
|
+
powershellUninstalled: string;
|
|
661
|
+
powershellFailedToUninstall: (error: string) => string;
|
|
662
|
+
zshNotInstalled: string;
|
|
610
663
|
};
|
|
611
664
|
export declare const FEEDBACK_MESSAGES: {
|
|
612
665
|
submitFeedback: string;
|
|
@@ -690,6 +743,8 @@ export declare const UPDATE_MESSAGES: {
|
|
|
690
743
|
it: string;
|
|
691
744
|
them: string;
|
|
692
745
|
extraWorkflowsNote: (count: number) => string;
|
|
746
|
+
oldCoreProfileSyncNote: string;
|
|
747
|
+
oldCoreProfileSyncHint: string;
|
|
693
748
|
cleaningLegacy: string;
|
|
694
749
|
legacyCleaned: string;
|
|
695
750
|
forceLegacyHint: string;
|
|
@@ -723,11 +778,11 @@ export declare const VALIDATOR_MESSAGES: {
|
|
|
723
778
|
unknownError: string;
|
|
724
779
|
duplicateRequirementAdded: (name: string) => string;
|
|
725
780
|
missingRequirementTextAdded: (name: string) => string;
|
|
726
|
-
missingShallOrMustAdded: (name: string) => string;
|
|
781
|
+
missingShallOrMustAdded: (name: string, keywordInHeader?: boolean) => string;
|
|
727
782
|
missingScenarioAdded: (name: string) => string;
|
|
728
783
|
duplicateRequirementModified: (name: string) => string;
|
|
729
784
|
missingRequirementTextModified: (name: string) => string;
|
|
730
|
-
missingShallOrMustModified: (name: string) => string;
|
|
785
|
+
missingShallOrMustModified: (name: string, keywordInHeader?: boolean) => string;
|
|
731
786
|
missingScenarioModified: (name: string) => string;
|
|
732
787
|
duplicateRequirementRemoved: (name: string) => string;
|
|
733
788
|
duplicateFromRenamed: (name: string) => string;
|
|
@@ -861,7 +916,95 @@ export declare const VERIFY_CHANGE_TEMPLATE_MESSAGES: {
|
|
|
861
916
|
skillInstructions: string;
|
|
862
917
|
opsxContent: string;
|
|
863
918
|
};
|
|
919
|
+
export declare const CODE_REVIEW_TEMPLATE_MESSAGES: {
|
|
920
|
+
skillDescription: string;
|
|
921
|
+
skillCompatibility: string;
|
|
922
|
+
opsxDescription: string;
|
|
923
|
+
instructions: string;
|
|
924
|
+
};
|
|
864
925
|
export declare const TELEMETRY_MESSAGES: {
|
|
865
926
|
firstRunNotice: string;
|
|
866
927
|
};
|
|
928
|
+
export declare const CHANGE_PARSER_MESSAGES: {
|
|
929
|
+
mustHaveWhySection: string;
|
|
930
|
+
mustHaveWhatChangesSection: string;
|
|
931
|
+
addRequirement: (text: string) => string;
|
|
932
|
+
modifyRequirement: (text: string) => string;
|
|
933
|
+
removeRequirement: (text: string) => string;
|
|
934
|
+
renameRequirement: (from: string, to: string) => string;
|
|
935
|
+
};
|
|
936
|
+
export declare const SPECS_APPLY_MESSAGES: {
|
|
937
|
+
duplicateInSection: (specName: string, section: string, reqName: string) => string;
|
|
938
|
+
duplicateFromInRenamed: (specName: string, reqName: string) => string;
|
|
939
|
+
duplicateToInRenamed: (specName: string, reqName: string) => string;
|
|
940
|
+
renamedModifiedMustReferenceNew: (specName: string, toName: string) => string;
|
|
941
|
+
renamedToCollidesWithAdded: (specName: string, toName: string) => string;
|
|
942
|
+
requirementInMultipleSections: (specName: string, sectionA: string, sectionB: string, reqName: string) => string;
|
|
943
|
+
noDeltaOperations: (capability: string) => string;
|
|
944
|
+
targetSpecNotExists: (specName: string) => string;
|
|
945
|
+
targetSpecStructurallyInvalid: (specName: string, details: string) => string;
|
|
946
|
+
renamedFailedSourceNotFound: (specName: string, reqName: string) => string;
|
|
947
|
+
renamedFailedTargetExists: (specName: string, reqName: string) => string;
|
|
948
|
+
removedFailedNotFound: (specName: string, reqName: string) => string;
|
|
949
|
+
modifiedFailedNotFound: (specName: string, reqName: string) => string;
|
|
950
|
+
modifiedFailedHeaderMismatch: (specName: string, reqName: string) => string;
|
|
951
|
+
addedFailedAlreadyExists: (specName: string, reqName: string) => string;
|
|
952
|
+
applyingChangesTo: (specPath: string) => string;
|
|
953
|
+
wouldApplyChangesTo: (specPath: string) => string;
|
|
954
|
+
countAdded: (n: number) => string;
|
|
955
|
+
countModified: (n: number) => string;
|
|
956
|
+
countRemoved: (n: number) => string;
|
|
957
|
+
countRenamed: (n: number) => string;
|
|
958
|
+
skeletonPurpose: (changeName: string) => string;
|
|
959
|
+
changeNotFound: (changeName: string) => string;
|
|
960
|
+
validationErrorsInRebuiltSpec: (specName: string, errors: string) => string;
|
|
961
|
+
};
|
|
962
|
+
export declare const PROJECT_CONFIG_SUGGEST_MESSAGES: {
|
|
963
|
+
configNotValidYaml: string;
|
|
964
|
+
configFailedToParse: string;
|
|
965
|
+
unknownArtifactId: (artifactId: string, schemaName: string, validIds: string) => string;
|
|
966
|
+
schemaNotFound: (schemaName: string) => string;
|
|
967
|
+
didYouMean: string;
|
|
968
|
+
schemaType: (isBuiltIn: boolean) => "nativo" | "local do projeto";
|
|
969
|
+
availableSchemas: string;
|
|
970
|
+
builtInSchemas: (schemas: string) => string;
|
|
971
|
+
projectLocalSchemas: (schemas: string) => string;
|
|
972
|
+
noProjectLocalSchemas: string;
|
|
973
|
+
fixSuggestion: (invalidName: string) => string;
|
|
974
|
+
};
|
|
975
|
+
export declare const TOOLS_MANAGER_MESSAGES: {
|
|
976
|
+
toolDoesNotSupportSkills: (toolValue: string) => string;
|
|
977
|
+
};
|
|
978
|
+
export declare const ARTIFACT_GRAPH_MESSAGES: {
|
|
979
|
+
invalidSchema: (errors: string) => string;
|
|
980
|
+
duplicateArtifactId: (id: string) => string;
|
|
981
|
+
invalidDependencyReference: (artifactId: string, ref: string) => string;
|
|
982
|
+
cyclicDependency: (cycle: string) => string;
|
|
983
|
+
templateNotFound: (path: string) => string;
|
|
984
|
+
failedToReadTemplate: (error: string) => string;
|
|
985
|
+
artifactNotFound: (artifactId: string, schemaName: string) => string;
|
|
986
|
+
};
|
|
987
|
+
export declare const CHANGE_METADATA_MESSAGES: {
|
|
988
|
+
failedToWriteMetadata: (error: string) => string;
|
|
989
|
+
failedToReadMetadata: (error: string) => string;
|
|
990
|
+
invalidMetadata: (error: string) => string;
|
|
991
|
+
invalidYaml: (error: string) => string;
|
|
992
|
+
unknownSchema: (schema: string, available: string) => string;
|
|
993
|
+
};
|
|
994
|
+
export declare const CHANGE_UTILS_MESSAGES: {
|
|
995
|
+
changeAlreadyExists: (name: string, dir: string) => string;
|
|
996
|
+
nameEmpty: string;
|
|
997
|
+
nameMustBeLowercase: string;
|
|
998
|
+
nameNoSpaces: string;
|
|
999
|
+
nameNoUnderscores: string;
|
|
1000
|
+
nameNoStartHyphen: string;
|
|
1001
|
+
nameNoEndHyphen: string;
|
|
1002
|
+
nameNoConsecutiveHyphens: string;
|
|
1003
|
+
nameOnlyAllowedChars: string;
|
|
1004
|
+
nameMustStartWithLetter: string;
|
|
1005
|
+
nameKebabCase: string;
|
|
1006
|
+
};
|
|
1007
|
+
export declare const COMPLETIONS_FACTORY_MESSAGES: {
|
|
1008
|
+
unsupportedShell: (shell: string) => string;
|
|
1009
|
+
};
|
|
867
1010
|
//# sourceMappingURL=index.d.ts.map
|