|
1 | 1 | # CodeAppsCompact |
2 | 2 |
|
3 | | -Experimental React/TypeScript record screens for Power Platform Code Apps. Configure fields, columns, validation, and a service adapter instead of repeatedly implementing list/editor state management. |
| 3 | +**Install the skill. Ask for a Code Apps record screen. The agent obtains the kit only when it is missing.** |
4 | 4 |
|
5 | | -**Status:** version 0.1.0, experimental and MIT-licensed. Live Power Apps-host and tenant compatibility remain unverified. npm publication is pending; use the local package workflow below until the registry release is available. |
| 5 | +CodeAppsCompact is a GitHub-hosted React/TypeScript kit and portable agent skill for Power Platform Code Apps. The agent configures fields, columns, validation, and generated-service mappings instead of regenerating list/editor behavior. |
6 | 6 |
|
7 | | -## What it does |
| 7 | +**Status:** 0.1.1, experimental, MIT-licensed. The kit and skill are distributed through [GitHub Releases](https://github.com/ilyafainberg/CodeAppsCompact/releases/tag/v0.1.1), not the npm registry. Live Power Apps-host and tenant compatibility remain unverified. Version 0.1.1 changes distribution and documentation; the 0.1.0 component behavior is unchanged. |
8 | 8 |
|
9 | | -`RecordScreen` provides a record table, local search over loaded records, cursor-based pagination and deduplication, accessible create/edit forms, primitive field validation, and explicit read/write errors. Failed writes preserve the form; writes are not automatically retried. A failed refresh after a successful save does not replay the write. |
| 9 | +## 1. Install the skill |
10 | 10 |
|
11 | | -The app supplies a `DataService<R, D>` with `getAll`, `create`, and `update` returning the Power Apps SDK's `IOperationResult<T>`, plus app-specific mappings. The component requires a caller-owned `QueryClientProvider`. |
| 11 | +This repository is a single-plugin skill marketplace named `codeappscompact`. It contains one plugin and one skill, both named `codeappscompact`. Register it explicitly in your agent; the repository is not automatically listed in every host's central catalog. |
12 | 12 |
|
13 | | -Supported drafts are flat objects with widened `string` and `number` values. There is no delete, relationship editor, upload support, nested draft schema, or cross-system transaction support. Authentication, SDK initialization, connection configuration, permissions, and deployment remain the host app's responsibility. Actual generated connector signatures must be inspected and adapted; do not assume they match the synthetic service. |
| 13 | +### GitHub Copilot CLI |
14 | 14 |
|
15 | | -## Develop and run the synthetic example |
16 | | - |
17 | | -Use Node.js 22.12 or newer; CI uses Node.js 24. The lockfile pins the development dependencies, including React 18 and Power Apps SDK 1.5.0. |
| 15 | +Run in your terminal: |
18 | 16 |
|
19 | 17 | ```powershell |
20 | | -git clone https://github.com/ilyafainberg/CodeAppsCompact.git |
21 | | -cd CodeAppsCompact |
22 | | -npm ci --ignore-scripts --no-audit --no-fund |
23 | | -npm run typecheck |
24 | | -npm test |
25 | | -npm run build |
26 | | -npm run dev |
| 18 | +copilot plugin marketplace add ilyafainberg/CodeAppsCompact |
| 19 | +copilot plugin install codeappscompact@codeappscompact |
27 | 20 | ``` |
28 | 21 |
|
29 | | -Open the local URL printed by Vite. The example uses in-memory synthetic service-request data: it makes no tenant requests, stores no credentials, and resets on reload. `npm run build:demo` creates a local demo build; it does not publish or deploy a Code App. |
| 22 | +### Claude Code |
30 | 23 |
|
31 | | -## Use the package locally |
| 24 | +Run inside a Claude Code session: |
32 | 25 |
|
33 | | -From this repository: |
34 | | - |
35 | | -```powershell |
36 | | -npm pack |
| 26 | +```text |
| 27 | +/plugin marketplace add ilyafainberg/CodeAppsCompact |
| 28 | +/plugin install codeappscompact@codeappscompact |
37 | 29 | ``` |
38 | 30 |
|
39 | | -The prepack script builds the JavaScript and declarations. The archive is `codeappscompact-0.1.0.tgz`. From a consuming Code App, install the archive using its actual local path, for example: |
| 31 | +### Other Agent Skills-compatible hosts |
40 | 32 |
|
41 | | -```powershell |
42 | | -npm install --save-exact "C:\path\to\CodeAppsCompact\codeappscompact-0.1.0.tgz" |
43 | | -``` |
| 33 | +Download [codeappscompact-skill-0.1.1.zip](https://github.com/ilyafainberg/CodeAppsCompact/releases/download/v0.1.1/codeappscompact-skill-0.1.1.zip) and import its `codeappscompact` folder through your host's supported skill mechanism. Alternatively, copy the complete [skill directory](plugins/codeappscompact/skills/codeappscompact), including `references`, to a supported skill location. Copying only `SKILL.md` loses the installation instructions and pinned kit manifest. |
44 | 34 |
|
45 | | -The required peers are React, TanStack React Query, and the Power Apps SDK; their supported ranges are in `package.json`. Then import `RecordScreen` and the public types from `codeappscompact`. The library does not inject styles or create a query client. Use the host application's styling and query provider, and adapt its generated services to the documented service contract. |
| 35 | +The skill is host-neutral guidance, not an executable installer or a grant of permissions. Installation does not run hooks, register MCP servers, download the runtime kit, change a Code App, or deploy anything. The agent performs those kit setup steps only when you invoke the skill for an authorized task. Reload your host if it requires a new session to discover installed skills. |
46 | 36 |
|
47 | | -`examples/App.tsx` is a complete configured screen; `examples/main.tsx` demonstrates the query provider, and `examples/service.ts` is the synthetic adapter used by the example and tests. Its strings, including the priority draft field, intentionally use widened primitive types; the select field configuration constrains accepted values. |
| 37 | +## 2. Ask for the feature |
48 | 38 |
|
49 | | -## API and agent workflow |
| 39 | +In an existing React/TypeScript Code App, for example: |
50 | 40 |
|
51 | | -Read [API.txt](API.txt) for the full version-matched contract. An agent should inspect the existing app and generated services, read that reference, and write only the fields, columns, mappings, and integration that are specific to the requested feature. Keep errors visible, preserve the stated paging/search semantics, and run the app's own checks. Do not create connections, change tenant data, or publish without authorization. |
| 41 | +> Use CodeAppsCompact to add a service-request screen using our existing generated service. Include summary, owner email, priority, and estimated hours. Support creating, editing, paging, and searching loaded records. Preserve the existing theme and do not deploy. |
52 | 42 |
|
53 | | -The reusable implementation is the token-saving mechanism. A dedicated portable agent skill is not included yet. This repository does not ship benchmark prompts, usage logs, or trial source. The original pilot artifacts are kept separately; synthetic tests do not establish live-tenant compatibility or savings across all Code Apps. |
| 43 | +The skill guides the agent to: |
54 | 44 |
|
55 | | -## Repository layout |
| 45 | +1. Inspect the app, package manager, generated service types, and requested behavior. |
| 46 | +2. Reuse a compatible installed `codeappscompact` package. If it is declared but not restored, restore the existing lockfile instead of replacing its origin or version. |
| 47 | +3. If absent, obtain any required permission, download the version-pinned kit from this repository's GitHub release, verify SHA-256, inspect its contents, and install it project-locally. No npm login is needed for the kit. |
| 48 | +4. Read the installed version's `API.txt` and write only the app-specific configuration and service adapter. |
| 49 | +5. Run the app's checks and report whether integration used synthetic data or authorized live services. A synthetic pass does not establish tenant compatibility. |
56 | 50 |
|
57 | | -- `src/index.tsx`: the original 0.1.0 library implementation. |
58 | | -- `API.txt`: complete public API and behavior contract. |
59 | | -- `examples/`: synthetic request-management screen and service. |
60 | | -- `tests/`: behavior checks and a separate inventory-schema example. |
61 | | -- `.github/workflows/ci.yml`: type checking, tests, library/demo builds, and package-content preview. No deployment or npm publishing. |
| 51 | +The default downloaded archive is kept inside the consuming app's `vendor` directory and installed as a local file dependency. Keep that archive, the dependency manifest, and the lockfile together in the app repository so a clean checkout can restore it. A valid existing installation is reused without another download or update check. Upgrades are explicit. |
62 | 52 |
|
63 | | -Build outputs, dependencies, archives, environment files, and npm configuration are ignored by Git. The npm file allowlist includes `dist` and `API.txt`; npm also includes its standard package metadata, README, and LICENSE. |
| 53 | +**GitHub replaces kit hosting, not dependency management.** The package import remains `codeappscompact`; npm, pnpm, or Yarn can install the verified archive. React, TanStack React Query, and the Power Apps SDK remain peer dependencies and may still require your configured package registry. The skill does not bypass registry, TLS, tenant, or tool-permission restrictions. |
64 | 54 |
|
65 | | -## Release and licensing status |
| 55 | +## What the kit handles |
66 | 56 |
|
67 | | -Licensed under the [MIT License](LICENSE), copyright 2026 Ilya Fainberg. |
| 57 | +`RecordScreen` provides a record table, search over loaded records, cursor-based pagination and deduplication, accessible create/edit forms, primitive field validation, and visible read/write errors. Failed writes preserve the form; writes are not automatically retried. Refresh failure after a committed save does not replay the write. |
| 58 | + |
| 59 | +The app supplies a `DataService<R, D>` with `getAll`, `create`, and `update` returning the Power Apps SDK's `IOperationResult<T>`, plus fields, columns, defaults, identity, and draft mappings. A caller-owned `QueryClientProvider` is required. The library injects no styles and creates no query client. |
| 60 | + |
| 61 | +Supported drafts are flat objects with widened `string` and `number` values. There is no delete, relationship editor, upload, nested draft schema, server-side search, or cross-system transaction support. Authentication, SDK setup, connections, permissions, and deployment remain the Code App's responsibility. Inspect real generated connector signatures rather than assuming they match the synthetic example. Unsupported requirements must stay visible, not be silently dropped. |
| 62 | + |
| 63 | +## Reference and manual use |
68 | 64 |
|
69 | | -The npm package name is `codeappscompact` (lowercase, as required by npm). Release metadata permits public publication to `https://registry.npmjs.org/` and defaults to the experimental `next` tag rather than `latest`. This configuration does not publish the package by itself. |
| 65 | +- [Portable skill](plugins/codeappscompact/skills/codeappscompact/SKILL.md): compact agent workflow. |
| 66 | +- [Kit installation and reuse](plugins/codeappscompact/skills/codeappscompact/references/install.md): host-neutral procedure and an npm example. |
| 67 | +- [Pinned kit manifest](plugins/codeappscompact/skills/codeappscompact/references/kit.json): release URL, supported installed versions, and SHA-256. |
| 68 | +- [API.txt](API.txt): complete public API and behavior contract; also included in the kit. |
| 69 | +- [examples/App.tsx](examples/App.tsx): configured screen. [examples/main.tsx](examples/main.tsx) supplies the query provider; [examples/service.ts](examples/service.ts) is explicitly synthetic. |
70 | 70 |
|
71 | | -Before publishing, confirm registry connectivity, npm sign-in, and name/version availability; run the repository checks and review `npm pack --dry-run`. An authorized release uses: |
| 71 | +The kit archive contains compiled JavaScript, TypeScript declarations, API documentation, synthetic examples, README, and LICENSE. It has no install lifecycle hook. After following the verification procedure, an npm project can install its local archive: |
72 | 72 |
|
73 | 73 | ```powershell |
74 | | -npm publish --access public --tag next --registry=https://registry.npmjs.org/ |
| 74 | +npm install --save-exact --ignore-scripts --no-audit --no-fund ".\vendor\codeappscompact-0.1.1.tgz" |
75 | 75 | ``` |
76 | 76 |
|
77 | | -Do not describe the npm release as available until its registry metadata has been verified. |
| 77 | +Import normally: |
| 78 | + |
| 79 | +```typescript |
| 80 | +import { RecordScreen, type DataService } from 'codeappscompact'; |
| 81 | +``` |
| 82 | + |
| 83 | +Do not use `npm install codeappscompact` without the archive path: this project does not publish the kit to the npm registry, and a registry name is not proof of this repository's provenance. |
| 84 | + |
| 85 | +## Evidence and limits |
| 86 | + |
| 87 | +The reusable implementation, rather than the skill's wording, is the token-saving mechanism. The earlier 0.1.0 pilot reported 78.6% fewer model-output tokens and 42.8% fewer total tokens across three paired authoring trials of one synthetic record-management feature. Input documentation was counted. This does not establish savings across all applications, against every existing framework, or for this newly packaged installation workflow. Skill discovery, downloads, and first-time dependency setup have their own costs; no new token benchmark is claimed here. |
| 88 | + |
| 89 | +Private benchmark prompts, usage logs, and trial sources are not included. The synthetic example and tests are not a connected or deployed Power Apps app. |
| 90 | + |
| 91 | +## Develop and run the synthetic example |
| 92 | + |
| 93 | +Use Node.js 22.12 or newer; CI uses Node.js 24. The lockfile pins development dependencies, including React 18 and Power Apps SDK 1.5.0. |
| 94 | + |
| 95 | +```powershell |
| 96 | +git clone https://github.com/ilyafainberg/CodeAppsCompact.git |
| 97 | +cd CodeAppsCompact |
| 98 | +npm ci --ignore-scripts --no-audit --no-fund |
| 99 | +npm run typecheck |
| 100 | +npm test |
| 101 | +npm run build |
| 102 | +npm run build:demo |
| 103 | +npm run dev |
| 104 | +``` |
| 105 | + |
| 106 | +Open Vite's printed loopback URL. The example uses in-memory synthetic data, makes no tenant requests, stores no credentials, and resets on reload. Neither build command publishes or deploys anything. |
| 107 | + |
| 108 | +## Distribution maintenance |
| 109 | + |
| 110 | +The root `marketplace.json` and `.claude-plugin/marketplace.json` expose the same catalog. `plugins/codeappscompact/plugin.json` uses the Agent Plugins 1.0 format; its `.claude-plugin/plugin.json` companion supports legacy hosts. The skill uses the standard `SKILL.md` format with local references and no host-specific tool requirements, hooks, or automatic updates. |
| 111 | + |
| 112 | +For a new release, update the package, lockfile, plugin manifests, skill version, installation filenames, and kit manifest together. Run the checks, build, then use `npm pack --ignore-scripts` to produce the kit. Review the archive's files and compute its SHA-256 before updating the pinned kit manifest. Archive the complete skill directory only after that hash is recorded. Publish both archives and `SHA256SUMS` on a new GitHub release tag pointing to the reviewed commit; never replace an existing version's artifacts. Verify anonymous downloads, checksums, marketplace discovery, and installation in a separate consumer before announcing availability. |
| 113 | + |
| 114 | +`"private": true` intentionally blocks npm publishing while allowing local packing and installation. CI checks types, behavior, distribution metadata, library/demo builds, and package contents; it does not publish to npm, deploy Code Apps, or change tenant data. |
| 115 | + |
| 116 | +Licensed under the [MIT License](LICENSE), copyright 2026 Ilya Fainberg. |
0 commit comments