@plainconceptsplatform/workflows 0.5.1 → 0.16.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 +105 -88
- package/dist/catalog-installation.d.ts +67 -0
- package/dist/catalog-installation.js +485 -0
- package/dist/catalog-listing.d.ts +13 -0
- package/dist/catalog-listing.js +70 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +273 -0
- package/dist/package-baseline.d.ts +25 -0
- package/dist/package-baseline.js +138 -0
- package/dist/repository-inspection.d.ts +23 -0
- package/dist/repository-inspection.js +113 -0
- package/dist/route-processing.d.ts +4 -0
- package/dist/route-processing.js +80 -0
- package/dist/stack-defaults.d.ts +11 -0
- package/dist/stack-defaults.js +110 -0
- package/dist/tui.d.ts +25 -0
- package/dist/tui.js +271 -0
- package/dist/worker-env.d.ts +46 -0
- package/dist/worker-env.js +179 -0
- package/dist/workflow-catalog.d.ts +27 -0
- package/dist/workflow-catalog.js +57 -0
- package/loops/actions/add-issue-labels/action.yml +22 -2
- package/loops/actions/apply-agent-bundle/apply-bundle.sh +14 -1
- package/loops/actions/audit-close/action.yml +180 -128
- package/loops/actions/classify-route/action.yml +7 -0
- package/loops/actions/classify-route/classify-route.sh +28 -7
- package/loops/actions/cleanup-artifacts/action.yml +38 -12
- package/loops/actions/housekeeping/action.yml +251 -0
- package/loops/actions/identify-gate-subject/action.yml +3 -1
- package/loops/actions/merge-agent-pr/action.yml +13 -0
- package/loops/actions/remove-issue-labels/action.yml +4 -2
- package/loops/actions/report-workflow-errors/action.yml +385 -0
- package/loops/actions/validate-merge-gate-output/validate-merge-gate-output.sh +13 -1
- package/loops/actions/validate-refine-output/validate-refine-output.sh +18 -2
- package/loops/actions/validate-triage-output/action.yml +1 -1
- package/loops/actions/validate-triage-output/validate-triage-output.sh +9 -5
- package/loops/actions/verify-composite-actions/verify-composite-actions.sh +53 -0
- package/loops/actions/verify-refine-output/verify-refine-output.sh +20 -0
- package/loops/actions/verify-route-matrix/verify-route-matrix.sh +1017 -56
- package/loops/scripts/compile-agent-workflows.mjs +96 -1
- package/loops/scripts/merge-changelog.mjs +76 -0
- package/loops/templates/agentics/actionlint.yaml +13 -0
- package/loops/templates/agentics/agentics-checks.yml +203 -86
- package/loops/templates/agentics/agentics-error-report.yml +97 -0
- package/loops/templates/ci/app-ci-dotnet-next.yml +64 -2
- package/loops/templates/ci/app-ci-node-monorepo.yml +52 -0
- package/loops/templates/opencode/opencode.ci.json +3 -3
- package/loops/templates/opencode/opencode.ci.json.md +4 -1
- package/loops/workflows/agent-apply-review.md +452 -465
- package/loops/workflows/agent-audit.md +201 -213
- package/loops/workflows/agent-implement.md +616 -538
- package/loops/workflows/agent-merge-gate.md +830 -730
- package/loops/workflows/agent-refine.md +599 -609
- package/loops/workflows/agent-release.md +244 -258
- package/loops/workflows/agent-triage.md +476 -447
- package/loops/workflows/authorize-bot-work.yml +26 -6
- package/loops/workflows/work-router.yml +1185 -862
- package/package.json +9 -8
- package/loops/actions/stale-recovery/action.yml +0 -288
- package/loops/actions/update-changelog/action.yml +0 -113
package/README.md
CHANGED
|
@@ -1,88 +1,105 @@
|
|
|
1
|
-
# Workflows CLI
|
|
2
|
-
|
|
3
|
-
Install and update shared GitHub Agentic Workflows for Plain Concepts Platform repositories.
|
|
4
|
-
|
|
5
|
-
## Quick start
|
|
6
|
-
|
|
7
|
-
The primary entrypoint is the interactive TUI. Run it with no arguments:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npx @plainconceptsplatform/workflows
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
The TUI lists all routes and templates with install status. Arrow keys navigate, space toggles, Enter installs.
|
|
14
|
-
|
|
15
|
-
## Install
|
|
16
|
-
|
|
17
|
-
Before installing workflows, install and configure [`PlainConceptsPlatform/agent-harness`](https://github.com/PlainConceptsPlatform/agent-harness) in the consumer repository. Loop workers invoke the skills and commands it provides. Verify the required skills and commands are available before compiling workflows.
|
|
18
|
-
|
|
19
|
-
For non-interactive use (advanced):
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npx @plainconceptsplatform/workflows@latest init
|
|
23
|
-
npx @plainconceptsplatform/workflows@latest add
|
|
24
|
-
npx @plainconceptsplatform/workflows@latest update
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
pnpm
|
|
32
|
-
pnpm exec workflows
|
|
33
|
-
pnpm exec workflows
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
workflows add
|
|
43
|
-
workflows add
|
|
44
|
-
workflows add
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
1
|
+
# Workflows CLI
|
|
2
|
+
|
|
3
|
+
Install and update shared GitHub Agentic Workflows for Plain Concepts Platform repositories.
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
The primary entrypoint is the interactive TUI. Run it with no arguments:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @plainconceptsplatform/workflows
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The TUI lists all routes and templates with install status. Arrow keys navigate, space toggles, Enter installs. The checked routes are the target set: checking adds a worker, unchecking removes it, and Enter on an unchanged selection refreshes every installed package file to this version. Selecting only templates installs just those templates.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
Before installing workflows, install and configure [`PlainConceptsPlatform/agent-harness`](https://github.com/PlainConceptsPlatform/agent-harness) in the consumer repository. Loop workers invoke the skills and commands it provides. Verify the required skills and commands are available before compiling workflows.
|
|
18
|
+
|
|
19
|
+
For non-interactive use (advanced):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx @plainconceptsplatform/workflows@latest init
|
|
23
|
+
npx @plainconceptsplatform/workflows@latest add refine implement
|
|
24
|
+
npx @plainconceptsplatform/workflows@latest update --dry-run
|
|
25
|
+
npx @plainconceptsplatform/workflows@latest update
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
For a project-local development dependency:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pnpm add -D @plainconceptsplatform/workflows
|
|
32
|
+
pnpm exec workflows # launch interactive TUI
|
|
33
|
+
pnpm exec workflows init
|
|
34
|
+
pnpm exec workflows add
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`init` inspects the repository and reports its stack and visibility. It does not create or manage repository configuration or a manifest.
|
|
38
|
+
|
|
39
|
+
`add` installs the mandatory files (opencode.ci.json, compile script, shared imports, actions, router, classifier, route matrix) and the workers named as positional arguments, on top of the workers already installed. With no routes it refreshes what is there:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
workflows add # refresh everything installed; in an empty repository, no workers
|
|
43
|
+
workflows add implement refine # those workers on top of the installed ones
|
|
44
|
+
workflows add --template agentics-checks # named template only (no mandatory files)
|
|
45
|
+
workflows add refine --template agentics-checks --force # routes + template + mandatory; --force also replaces a changed template
|
|
46
|
+
workflows remove audit # uninstall the audit worker and drop it from the router
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Route names: refine, implement, triage, apply-review, merge-gate, audit, release. Unknown arguments produce an error.
|
|
50
|
+
|
|
51
|
+
## Update
|
|
52
|
+
|
|
53
|
+
`update` is `add` with no routes: it refreshes exactly the installed set to this package version. Every package-managed file is replaced and its ownership header records the version it came from:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
# Managed by @plainconceptsplatform/workflows@0.7.0. Source: loops/workflows/work-router.yml. ...
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The `env:` block at the top of a worker is the repository's and survives: your values are kept, keys the package added arrive with their defaults, keys only you defined stay. When the header records the version you installed from, that release is fetched from npm and used as the merge baseline, so a value you never changed follows the package when its default changes. The agent runner pool and the engine gateway URL are kept as well. Everything else in the file is the package's.
|
|
60
|
+
|
|
61
|
+
- `update --dry-run` prints the plan as JSON and writes nothing.
|
|
62
|
+
- A file whose ownership header was removed is consumer-owned and is skipped unless `--force` is passed.
|
|
63
|
+
- Templates are consumer-owned after installation and are replaced only with `--force`.
|
|
64
|
+
- `--version` prints the package version.
|
|
65
|
+
|
|
66
|
+
## List and search
|
|
67
|
+
|
|
68
|
+
List all available workflows, routes, and templates with install status:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npx --yes --package @plainconceptsplatform/workflows@latest workflows list
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Each entry is marked `[x]` when the corresponding `.github/workflows/agent-*.md` file already exists in the current directory, or `[ ]` when it is not yet installed.
|
|
75
|
+
|
|
76
|
+
Search by name or description:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npx --yes --package @plainconceptsplatform/workflows@latest workflows search "ci"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Templates
|
|
83
|
+
|
|
84
|
+
Install optional standalone templates with `add --template`. Available templates are `agentics-checks`, `agentics-maintenance`, `app-ci-dotnet-next`, `app-ci-node-monorepo`, `bug-report`, `feature-request`, `github-release`, and `opencode.ci.json`. CI templates are stack-specific copies, not a combined template. `github-release` publishes generated release notes when a `v*` tag is pushed. Edit their top-level `env:` values for repository paths, package names, and commands.
|
|
85
|
+
|
|
86
|
+
## Manual installation
|
|
87
|
+
|
|
88
|
+
The package includes `loops/`, a copyable equivalent of `.github/`:
|
|
89
|
+
|
|
90
|
+
- `loops/actions/` maps to `.github/actions/`
|
|
91
|
+
- `loops/workflows/` maps to `.github/workflows/`
|
|
92
|
+
- `loops/scripts/` maps to `scripts/`
|
|
93
|
+
|
|
94
|
+
Copy these files manually if you do not use the CLI. Each worker is self-contained. Edit its
|
|
95
|
+
top-level `env:` defaults directly for consumer-specific endpoint, model, labels, paths, and checks.
|
|
96
|
+
|
|
97
|
+
## Compile
|
|
98
|
+
|
|
99
|
+
Consumer repositories generate and commit `*.lock.yml` files:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
node scripts/compile-agent-workflows.mjs --force
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Do not commit generated locks to this package source repository.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type RouteName, type TemplateName } from "./workflow-catalog.js";
|
|
2
|
+
import { type BaselineFetcher } from "./package-baseline.js";
|
|
3
|
+
import type { RepositoryInspection } from "./repository-inspection.js";
|
|
4
|
+
export type ChangeStatus = "added" | "updated" | "unchanged" | "skipped" | "removed";
|
|
5
|
+
export interface FileChange {
|
|
6
|
+
readonly target: string;
|
|
7
|
+
readonly status: ChangeStatus;
|
|
8
|
+
/** Why a file was skipped. */
|
|
9
|
+
readonly reason?: string;
|
|
10
|
+
/** Version the consumer's copy was installed from, when its header records one. */
|
|
11
|
+
readonly installedVersion?: string;
|
|
12
|
+
readonly keptEnv?: readonly string[];
|
|
13
|
+
readonly updatedDefaults?: readonly string[];
|
|
14
|
+
readonly consumerOnlyEnv?: readonly string[];
|
|
15
|
+
readonly droppedEnv?: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
export interface BaselineStatus {
|
|
18
|
+
readonly version: string;
|
|
19
|
+
readonly status: "used" | "unavailable";
|
|
20
|
+
}
|
|
21
|
+
export interface CatalogInstallResult {
|
|
22
|
+
/** Every package-managed target in the installed set, whether it changed or not. */
|
|
23
|
+
readonly installed: readonly string[];
|
|
24
|
+
/** Consumer-owned files that differ and were not overwritten. Only templates report these. */
|
|
25
|
+
readonly conflicts: readonly string[];
|
|
26
|
+
readonly changes: readonly FileChange[];
|
|
27
|
+
readonly packageVersion: string;
|
|
28
|
+
/** Versions found in the consumer's ownership headers before this run. */
|
|
29
|
+
readonly installedVersions: readonly string[];
|
|
30
|
+
readonly baselines: readonly BaselineStatus[];
|
|
31
|
+
readonly upToDate: boolean;
|
|
32
|
+
readonly dryRun: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface CatalogInstallOptions {
|
|
35
|
+
/** Also overwrite files whose ownership header was removed, and changed templates. */
|
|
36
|
+
readonly force?: boolean;
|
|
37
|
+
readonly sourcePath?: string;
|
|
38
|
+
readonly selectedRoutes?: readonly RouteName[];
|
|
39
|
+
readonly inspection?: RepositoryInspection;
|
|
40
|
+
readonly compile?: (repositoryPath: string) => Promise<void>;
|
|
41
|
+
/** Compute the plan and write nothing. */
|
|
42
|
+
readonly dryRun?: boolean;
|
|
43
|
+
/** Where the baseline release comes from. Defaults to npm. */
|
|
44
|
+
readonly baseline?: BaselineFetcher;
|
|
45
|
+
/** The version stamped into headers. Defaults to this package's. */
|
|
46
|
+
readonly packageVersion?: string;
|
|
47
|
+
}
|
|
48
|
+
interface CatalogFile {
|
|
49
|
+
readonly source: string;
|
|
50
|
+
readonly target: string;
|
|
51
|
+
readonly managed: boolean;
|
|
52
|
+
}
|
|
53
|
+
export declare function mandatoryFileSpecs(sourcePath: string): CatalogFile[];
|
|
54
|
+
export declare function catalogSourcePath(modulePath?: string): string;
|
|
55
|
+
export declare function installCatalog(repositoryPath: string, options?: CatalogInstallOptions): Promise<CatalogInstallResult>;
|
|
56
|
+
export interface TemplateInstallResult {
|
|
57
|
+
readonly installed: readonly string[];
|
|
58
|
+
readonly conflicts: readonly string[];
|
|
59
|
+
}
|
|
60
|
+
export declare function installTemplate(repositoryPath: string, template: TemplateName, options?: Pick<CatalogInstallOptions, "force" | "sourcePath" | "inspection">): Promise<TemplateInstallResult>;
|
|
61
|
+
export declare function installedRoutes(repositoryPath: string): Promise<RouteName[]>;
|
|
62
|
+
export declare function removeRouteFiles(repositoryPath: string, routes: readonly RouteName[]): Promise<string[]>;
|
|
63
|
+
export declare function isTemplateName(value: string): value is TemplateName;
|
|
64
|
+
export declare function ensurePreCommitHook(repositoryPath: string): Promise<void>;
|
|
65
|
+
export declare function runCompileIfAvailable(repositoryPath: string): Promise<void>;
|
|
66
|
+
export declare function exists(path: string): Promise<boolean>;
|
|
67
|
+
export {};
|