Skip to content

Commit 9c2ee83

Browse files
committed
refactor: sharpen template scaffolding rules for skill conflict detection
The original three never entries surfaced false-positive conflicts with plugin setup instructions during integration testing against the databricks-apps skill (Track B PR databricks/databricks-agent-skills#79): - 'Modify files inside the template directory' caught every plugin must rule that edits scaffolded files (genie spaces config, lakebase migrations, analytics queries). The rule was either unreachable (if read as the SDK source-of-truth) or contradictory (if read as the scaffolded output, which the user owns post-init). Deleted. - 'Hardcode workspace-specific values in template files' conflated workspace IDs (which are correctly committed to bundle config) with credentials (which must not be). Replaced with a must/never pair that names the legitimate destinations (app.yaml, databricks.yml, .env) and the leak path (client bundle). - 'Skip resource configuration prompts' conflicted with the --set non-interactive path. Replaced with a should/never pair covering the actual decision-time failures: ask the user when uncertain; never guess when discovery returns zero or multiple options. Net: 0 must + 0 should + 3 never -> 1 must + 1 should + 2 never. All entries describe agent behaviors at decision points (substitutability gate passes), each under 120 chars, and the merged set is precedence- and phase-clean per the skill PR's protocol. Regression test in validate-manifest.test.ts updated to pin the new contents. Co-authored-by: Isaac Signed-off-by: Atila Fassina <atila@fassina.eu>
1 parent 440851c commit 9c2ee83

3 files changed

Lines changed: 31 additions & 15 deletions

File tree

packages/shared/src/cli/commands/plugin/validate/validate-manifest.test.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -970,12 +970,24 @@ describe("validate-manifest", () => {
970970
// because each was substitutable: skill content (1), derivable from
971971
// `requiredByTemplate` field (2), derivable from `field.env` enumeration
972972
// (3), or a discovery-descriptor concern (4 — A6 candidate (a)).
973-
expect(TEMPLATE_SCAFFOLDING.rules.must).toHaveLength(0);
974-
expect(TEMPLATE_SCAFFOLDING.rules.should).toHaveLength(0);
973+
//
974+
// The post-Track-B-design pass replaced the remaining never entries with
975+
// rules sharper against the conflict-detection step in databricks-apps
976+
// skill 0.1.2 (Track B PR #79). The original "Modify files inside the
977+
// template directory" rule conflicted with plugin setup instructions
978+
// that legitimately edit scaffolded files; "Hardcode workspace-specific
979+
// values" was reframed around credentials and runtime targets; "Skip
980+
// resource configuration prompts" was split into a should/never pair
981+
// covering the actual decision-time failures.
982+
expect(TEMPLATE_SCAFFOLDING.rules.must).toEqual([
983+
"Keep all secrets and credentials only in app.yaml, databricks.yml, and/or .env",
984+
]);
985+
expect(TEMPLATE_SCAFFOLDING.rules.should).toEqual([
986+
"ask user when in doubt of resource to use for plugin",
987+
]);
975988
expect(TEMPLATE_SCAFFOLDING.rules.never).toEqual([
976-
"Modify files inside the template directory",
977-
"Skip resource configuration prompts",
978-
"Hardcode workspace-specific values in template files",
989+
"guess resources when multiple or no options are available",
990+
"embed secrets in files that will go to the client-bundle",
979991
]);
980992
});
981993
});

packages/shared/src/schemas/manifest.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,12 +1062,13 @@ export const TEMPLATE_SCAFFOLDING = {
10621062
},
10631063
},
10641064
rules: {
1065-
must: [],
1066-
should: [],
1065+
must: [
1066+
"Keep all secrets and credentials only in app.yaml, databricks.yml, and/or .env",
1067+
],
1068+
should: ["ask user when in doubt of resource to use for plugin"],
10671069
never: [
1068-
"Modify files inside the template directory",
1069-
"Skip resource configuration prompts",
1070-
"Hardcode workspace-specific values in template files",
1070+
"guess resources when multiple or no options are available",
1071+
"embed secrets in files that will go to the client-bundle",
10711072
],
10721073
},
10731074
} satisfies z.infer<typeof scaffoldingDescriptorSchema>;

template/appkit.plugins.json

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)