mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-06 23:26:55 +01:00
Add knowledge-backed AL development
Add read-only planning and repository-changing development skills so BCQuality knowledge can guide features, bug fixes, refactors, upgrades, and maintenance before the existing AL review gate runs. Track Microsoft Learn ingestion and add development and BCApps-shaped guidance evaluation fixtures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 638b66d2-9f06-4f60-8781-808709e1485c
This commit is contained in:
parent
1a5afdc0eb
commit
56b80e6dcf
50 changed files with 11589 additions and 79 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# BCQuality global skills
|
||||
|
||||
This folder contains BCQuality's layer-independent protocol files and the
|
||||
host-native adapter used by standalone plugin installations.
|
||||
host-native adapters used by standalone plugin installations.
|
||||
|
||||
The protocol files have two kinds:
|
||||
|
||||
|
|
@ -31,8 +31,9 @@ READ and DO are read on demand — typically by the first action skill the agent
|
|||
| Path | Role |
|
||||
|---|---|
|
||||
| [`al-code-review/SKILL.md`](al-code-review/SKILL.md) | Exposes BCQuality through the standard `SKILL.md` format when this repository is installed as a plugin. |
|
||||
| [`al-development/SKILL.md`](al-development/SKILL.md) | Exposes knowledge-backed AL development through the standard `SKILL.md` format. |
|
||||
|
||||
The adapter is deliberately thin. It translates the caller's request into an
|
||||
Each adapter is deliberately thin. It translates the caller's request into an
|
||||
Entry task context, then follows Entry's dispatch without owning routing,
|
||||
review, index, or output policy. It is not an action skill, is not considered
|
||||
by Entry, and should not accumulate behavior already defined by `entry.md`,
|
||||
|
|
@ -40,20 +41,23 @@ by Entry, and should not accumulate behavior already defined by `entry.md`,
|
|||
|
||||
This gives the two skill formats distinct roles:
|
||||
|
||||
- `skills/al-code-review/SKILL.md` is the public host integration surface for a
|
||||
standalone plugin installation.
|
||||
- `skills/al-code-review/SKILL.md` and
|
||||
`skills/al-development/SKILL.md` are the public host integration
|
||||
surfaces for a standalone plugin installation.
|
||||
- `microsoft/skills/review/al-code-review.md` is BCQuality's internal
|
||||
Microsoft-layer super-skill for coordinating a broad AL review.
|
||||
- `microsoft/skills/development/al-development.md` is the internal
|
||||
Microsoft-layer implementation skill for all supported development modes.
|
||||
- `microsoft/skills/development/al-development-plan.md` is the read-only
|
||||
planning interface for repository-specific orchestrators that retain
|
||||
implementation ownership.
|
||||
|
||||
The host adapter and internal coordinator deliberately share the
|
||||
`al-code-review` name because they represent the same user-facing operation in
|
||||
their respective formats. Their locations distinguish their roles. The
|
||||
adapter remains distinct from BC-ALAgents' separately installed `al-review`
|
||||
skill, avoiding a collision in hosts that use one shared skill inventory. The
|
||||
reference from the adapter to Entry, and from a dispatched super-skill to its
|
||||
leaf skills, is intentional progressive disclosure. It avoids registering
|
||||
every internal BCQuality protocol file as an ambient host skill while allowing
|
||||
each review domain to run in an isolated context.
|
||||
Each host adapter deliberately shares its name with the internal action skill
|
||||
for the same operation. Their locations distinguish the host integration from
|
||||
the layered policy. `al-code-review` remains distinct from BC-ALAgents'
|
||||
separately installed `al-review` skill, avoiding a collision in hosts that use
|
||||
one shared skill inventory. References from adapters to Entry, and from a
|
||||
dispatched super-skill to its leaves, are intentional progressive disclosure.
|
||||
|
||||
These contracts are stable. Changes require a PR approved by both maintainers.
|
||||
|
||||
|
|
|
|||
29
skills/al-development/SKILL.md
Normal file
29
skills/al-development/SKILL.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
name: al-development
|
||||
description: Implement Business Central AL features, bug fixes, refactors, upgrades, and maintenance changes using BCQuality's curated platform knowledge.
|
||||
---
|
||||
|
||||
# AL development
|
||||
|
||||
This is BCQuality's host-native adapter for standalone plugin installations. It translates a coding request into Entry's task context; the internal action skill owns classification, investigation, design, implementation, validation, and review policy.
|
||||
|
||||
When the target repository exposes a more specific local workflow for the request, such as an end-to-end bug-fix skill with its own environment and delivery gates, prefer that repository workflow unless the caller explicitly asks to use BCQuality's generic development skill.
|
||||
|
||||
## Execute
|
||||
|
||||
1. Resolve `PLUGIN_ROOT` to the directory containing this plugin's root `plugin.json`. This file is `PLUGIN_ROOT/skills/al-development/SKILL.md`; when the host does not expose the plugin root, resolve it two levels above this file.
|
||||
2. Build the `task-context` required by `PLUGIN_ROOT/skills/entry.md`:
|
||||
- Copy the caller's request verbatim into `goal`.
|
||||
- Set `inputs-available: [development-request, repository]`.
|
||||
- Set `technologies: [al]` when the repository is an AL project.
|
||||
- Pass `bc-version`, `countries`, and `application-area` only when supplied or reliably determined.
|
||||
- Apply `BCQUALITY_ENABLED_LAYERS` and `BCQUALITY_DISABLED_SKILLS` exactly as the `al-code-review` adapter does.
|
||||
3. Read and execute `PLUGIN_ROOT/skills/entry.md`, including Preparation. Resolve every path it names against `PLUGIN_ROOT`, not the user's repository. If knowledge-index generation is unavailable, use READ's path-based fallback.
|
||||
4. Follow Entry's dispatch exactly. The normal result is `microsoft/skills/development/al-development.md`; do not select it directly or duplicate its behavior in this adapter.
|
||||
5. Normalize the caller's input as `development-request`:
|
||||
- Plain text becomes `{ kind: auto, description: <verbatim text> }`.
|
||||
- Preserve an explicit `kind`, supplied plan, and `acceptance-criteria`.
|
||||
- A plan-only input becomes `{ kind: auto, description: "Implement the supplied development plan.", plan: <verbatim plan> }`.
|
||||
Pass the writable current workspace as `repository`, execute the dispatched skill, and return its `implementation-report` unchanged.
|
||||
|
||||
The adapter never edits BCQuality itself unless BCQuality is the caller's target repository. The target of implementation is the repository supplied by the caller.
|
||||
148
skills/do.md
148
skills/do.md
|
|
@ -19,7 +19,7 @@ An action skill is a single markdown file with YAML frontmatter. It lives inside
|
|||
- `/community/skills/` — community-contributed action skills.
|
||||
- `/custom/skills/` — partner or customer action skills (typically in a consumer repo, not in BCQuality itself).
|
||||
|
||||
Action skills do not live at the repo root. The files in `/skills/` — the three meta-skill contracts (READ, DO, WRITE) and the entry-point skill (`entry.md`, `kind: entry-point`) — are the only skills that sit outside a layer. The entry-point skill structurally follows this same four-step pattern but produces a dispatch record rather than a findings-report; see `skills/entry.md` for its contract.
|
||||
Action skills do not live at the repo root. The files in `/skills/` — the three meta-skill contracts (READ, DO, WRITE) and the entry-point skill (`entry.md`, `kind: entry-point`) — are the only skills that sit outside a layer. The entry-point skill structurally follows this same four-step pattern but produces a dispatch record rather than an action-skill report; see `skills/entry.md` for its contract.
|
||||
|
||||
## Skills hold mechanics; knowledge files hold BC facts
|
||||
|
||||
|
|
@ -56,10 +56,20 @@ application-area: [all]
|
|||
|
||||
`bc-version`, `technologies`, `countries`, `application-area` are optional filters that let an orchestrator pre-select applicable skills for a task. They follow the same semantics as in READ.
|
||||
|
||||
`inputs` is a list of abstract input types the skill **accepts**. Standard values: `pr-diff`, `object-list`, `file-path`, `repository`, `telemetry-query`. Semantics are any-of: the orchestrator supplies whichever listed input types it has, and the skill is invoked with a non-empty subset of its declared `inputs`. A skill that cannot proceed with the supplied subset MUST return `outcome: "not-applicable"`. `outputs` is always a single-element list naming the output kind; today only `findings-report` is defined.
|
||||
`inputs` is a list of abstract input types the skill **accepts**. Standard values: `pr-diff`, `object-list`, `file-path`, `repository`, `telemetry-query`, `development-request`, `development-plan`. Semantics are any-of: the orchestrator supplies whichever listed input types it has, and the skill is invoked with a non-empty subset of its declared `inputs`. A skill that cannot proceed with the supplied subset MUST return `outcome: "not-applicable"`.
|
||||
|
||||
`outputs` is always a single-element list naming the output kind:
|
||||
|
||||
- `findings-report` — evaluates an input and reports defects or observations.
|
||||
- `implementation-report` — changes a repository to satisfy a development request and reports the plan, knowledge used, changed files, validation, and post-implementation review.
|
||||
- `development-guidance-report` — selects and summarizes applicable BCQuality knowledge for an existing development plan without changing the target repository.
|
||||
|
||||
`sub-skills` is an optional field. When present and non-empty, the skill is a **super-skill** that composes other action skills; see *Composition* below. Values are repo-relative paths to action-skill files.
|
||||
|
||||
`quality-skill` is optional on an action skill that emits an `implementation-report`. It names one repo-relative review action skill to run over the completed diff. It is a post-implementation gate, not a composed sub-skill: Entry does not route through it, and its complete findings-report is returned in `review`. Consumer configuration still applies; if the named quality skill is disabled or unavailable, record its validation as `not-run` and do not claim `completed`.
|
||||
|
||||
`guidance-skill` is optional on an action skill that emits an `implementation-report`. It names one repo-relative read-only action skill that accepts a `development-plan` and emits a `development-guidance-report`. The implementation skill invokes it after forming its plan and before editing product code. Consumer configuration still applies; when guidance is disabled or unavailable, the implementation skill must not claim knowledge-backed development.
|
||||
|
||||
## Required sections
|
||||
|
||||
Every action skill MUST contain these five sections, in order:
|
||||
|
|
@ -80,7 +90,7 @@ Every action skill MUST contain these five sections, in order:
|
|||
|
||||
**Action.** Execute the skill's work against the worklist. Evaluate each item in the worklist against the task input and emit findings. The action step is where skill behavior differs; the preceding three steps are uniform.
|
||||
|
||||
## Output contract
|
||||
## Findings-report contract
|
||||
|
||||
Every action skill emits a single JSON document that conforms to this schema:
|
||||
|
||||
|
|
@ -242,6 +252,136 @@ Severity taxonomy:
|
|||
- `minor` — quality concern; worth flagging but not a gate.
|
||||
- `info` — observation or context; not actionable on its own.
|
||||
|
||||
## Development-guidance-report contract
|
||||
|
||||
An action skill with `outputs: [development-guidance-report]` emits one JSON document:
|
||||
|
||||
```json
|
||||
{
|
||||
"skill": { "id": "string", "version": 1 },
|
||||
"outcome": "completed | not-applicable | no-knowledge | partial | failed",
|
||||
"outcome-reason": "string",
|
||||
"summary": {
|
||||
"request": "string",
|
||||
"kind": "feature | bug | refactor | upgrade | maintenance",
|
||||
"candidates": 0,
|
||||
"selected": 0
|
||||
},
|
||||
"context": {
|
||||
"bc-version": "string",
|
||||
"technologies": ["string"],
|
||||
"countries": ["string"],
|
||||
"application-area": ["string"],
|
||||
"unknown": ["bc-version | technologies | countries | application-area"]
|
||||
},
|
||||
"knowledge": [
|
||||
{
|
||||
"path": "string",
|
||||
"sha": "string",
|
||||
"used-for": "string",
|
||||
"constraints": ["string"],
|
||||
"sample-paths": ["string"]
|
||||
}
|
||||
],
|
||||
"validation-considerations": [
|
||||
{
|
||||
"id": "string",
|
||||
"reason": "string",
|
||||
"evidence": "string"
|
||||
}
|
||||
],
|
||||
"suppressed": [
|
||||
{
|
||||
"reference": { "path": "string", "sha": "string" },
|
||||
"reason": "layer-precedence | configuration"
|
||||
}
|
||||
],
|
||||
"unresolved": ["string"]
|
||||
}
|
||||
```
|
||||
|
||||
The skill is read-only with respect to the target repository. `completed` means every selected article was opened and converted into faithful implementation constraints. `no-knowledge` means no applicable article survived filtering; `knowledge` is empty. `partial` means candidate evaluation stopped early, with the gap named in `outcome-reason` and `unresolved`.
|
||||
|
||||
`knowledge[].constraints` summarizes only normative `## Best Practice` and `## Anti Pattern` content from the referenced article. It must not introduce a Business Central fact absent from that article. `sample-paths` contains only sibling samples that exist and were opened. Every path is subject to the reference-integrity gate.
|
||||
|
||||
`validation-considerations` states evidence the implementation workflow should obtain; it does not claim that a command or test has run. `unresolved` records missing repository context or plan decisions that prevent a reliable constraint. Unknown applicability dimensions must appear in both `context.unknown` and a relevant unresolved entry.
|
||||
|
||||
## Implementation-report contract
|
||||
|
||||
An action skill with `outputs: [implementation-report]` emits one JSON document:
|
||||
|
||||
```json
|
||||
{
|
||||
"skill": { "id": "string", "version": 1 },
|
||||
"outcome": "completed | not-applicable | no-knowledge | partial | failed",
|
||||
"outcome-reason": "string",
|
||||
"summary": {
|
||||
"request": "string",
|
||||
"files-created": 0,
|
||||
"files-modified": 0,
|
||||
"files-deleted": 0
|
||||
},
|
||||
"plan": {
|
||||
"kind": "feature | bug | refactor | upgrade | maintenance",
|
||||
"assumptions": ["string"],
|
||||
"decisions": ["string"],
|
||||
"objects": ["string"]
|
||||
},
|
||||
"knowledge": [
|
||||
{ "path": "string", "sha": "string", "used-for": "string" }
|
||||
],
|
||||
"changes": [
|
||||
{
|
||||
"path": "string",
|
||||
"action": "created | modified | deleted",
|
||||
"purpose": "string"
|
||||
}
|
||||
],
|
||||
"validation": [
|
||||
{
|
||||
"id": "string",
|
||||
"command": "string",
|
||||
"status": "passed | failed | not-run",
|
||||
"details": "string"
|
||||
}
|
||||
],
|
||||
"review": { "...full findings-report from the post-implementation review..." : null },
|
||||
"suppressed": [
|
||||
{
|
||||
"reference": { "path": "string", "sha": "string" },
|
||||
"reason": "layer-precedence | configuration"
|
||||
}
|
||||
],
|
||||
"remaining": ["string"]
|
||||
}
|
||||
```
|
||||
|
||||
### Implementation outcome semantics
|
||||
|
||||
- `completed` — the requested change is persisted in the repository, required validation passed, and the post-implementation review has no unresolved `blocker` or `major` finding.
|
||||
- `not-applicable` — the request is not an implementation task accepted by the skill, or the supplied repository does not contain the required technology.
|
||||
- `no-knowledge` — no applicable BCQuality knowledge survived filtering and the skill cannot safely implement the Business Central-specific request. No request changes are made.
|
||||
- `partial` — useful changes were persisted, but part of the requested scope, validation, or post-implementation review could not be completed. `outcome-reason` and `remaining` identify the unfinished work.
|
||||
- `failed` — the skill could not produce a reliable implementation. `outcome-reason` is required. Any working-tree changes remain visible and MUST still be listed in `changes`.
|
||||
|
||||
### Implementation field semantics
|
||||
|
||||
**`summary.request`** is a concise statement of the implemented change. File counts describe only changes made by this skill; pre-existing user changes are excluded.
|
||||
|
||||
**`plan`** records the implementation decisions needed to understand the result. `kind` is the classified development mode: `feature`, `bug`, `refactor`, `upgrade`, or `maintenance`. `assumptions` contains only assumptions actually made; `decisions` captures consequential design choices; `objects` names the Business Central objects or other artifacts created or changed.
|
||||
|
||||
**`knowledge`** lists every knowledge file whose normative guidance materially shaped the implementation. `path` and optional `sha` follow the same reference format as a findings-report. `used-for` briefly names the design or implementation decision. The reference-integrity gate applies: every path must exist in the live checkout, be copied verbatim from discovery, and have been opened in full. Applicability alone is not enough to list an article.
|
||||
|
||||
**`changes`** is an exhaustive list of files created, modified, or deleted by the skill. Paths are repository-relative and use forward slashes. Do not include unrelated pre-existing changes.
|
||||
|
||||
**`validation`** records commands actually run. `passed` and `failed` require a real command result; unavailable tooling or an intentionally skipped check is `not-run` with `details`. A skill MUST NOT manufacture a successful check or replace a failed command with a success-shaped fallback.
|
||||
|
||||
**`review`** is optional for generic implementation skills and required when a skill's instructions mandate post-implementation review. When present, it is the complete findings-report returned by that review skill, not a rewritten summary.
|
||||
|
||||
**`suppressed`** has the same semantics as in a findings-report and records applicable knowledge excluded by layer precedence or configuration.
|
||||
|
||||
**`remaining`** contains concrete unfinished work only. It is empty for `completed`.
|
||||
|
||||
## Composition (super-skills)
|
||||
|
||||
A **super-skill** is an action skill whose frontmatter declares a non-empty `sub-skills: [...]`. A super-skill does not evaluate knowledge files directly; it invokes other action skills and composes their output.
|
||||
|
|
@ -316,4 +456,4 @@ Conforms to the DO output contract.
|
|||
|
||||
## How orchestrators consume output
|
||||
|
||||
An orchestrator invokes an action skill with an input appropriate to the skill's declared `inputs`, receives the JSON output, and maps findings to its delivery surface (PR comments, build gates, IDE diagnostics). The orchestrator MUST NOT interpret skill-specific fields beyond the schema above. Skills that need richer semantics MUST encode them within the schema (for example, by adding structured `message` text) rather than extending the output shape.
|
||||
An orchestrator invokes an action skill with an input appropriate to the skill's declared `inputs` and uses the single output kind declared in frontmatter. It maps a `findings-report` to PR comments, build gates, or IDE diagnostics; a `development-guidance-report` to constraints for a downstream implementation workflow; and an `implementation-report` to a coding-session summary, changed-file view, validation status, and any remaining work. The orchestrator MUST NOT interpret fields beyond the three schemas above.
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ The agent invokes Entry with a **task context** supplied by the orchestrator:
|
|||
task-context:
|
||||
goal: string # free-text description of what needs doing
|
||||
inputs-available: # values the orchestrator has ready to pass to a chosen skill
|
||||
- development-request
|
||||
- development-plan
|
||||
- repository
|
||||
- pr-diff
|
||||
- file-path
|
||||
technologies: [al]
|
||||
|
|
@ -174,7 +177,7 @@ Populated example (PR review on a repo where only `al-performance-review` is ena
|
|||
|
||||
1. Invoke Entry with the orchestrator-supplied task context.
|
||||
2. Receive the dispatch record.
|
||||
3. For each entry in `dispatch[]`, read the referenced action skill, execute its Source → Relevance → Worklist → Action steps per DO, and produce a findings-report.
|
||||
4. Return the findings-reports to the orchestrator. When `outcome` is `no-match` or `failed`, return the dispatch record itself so the orchestrator can log the reason.
|
||||
3. For each entry in `dispatch[]`, read the referenced action skill, execute its Source → Relevance → Worklist → Action steps per DO, and produce the report kind declared by that skill's single `outputs` value.
|
||||
4. Return the action-skill reports to the orchestrator. When Entry's `outcome` is `no-match` or `failed`, return the dispatch record itself so the orchestrator can log the reason.
|
||||
|
||||
READ and DO are the contracts that govern what the dispatched skills do. An agent that has not yet read READ and DO reads them when it executes the first dispatched skill — they are not prerequisites for invoking Entry.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue