baller-maester 0.2.1 → 0.3.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/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.0] - 2026-05-14
9
+
10
+ ### Added
11
+ - **`maester publish` per-document state prompt** — the publish walkthrough now asks per published document for a state choice: `draft`, `canon`, or "file header" (defer to inline state in the file). `draft` / `canon` are persisted as a `state:` field on the document entry in `maester.yaml`; "file header" omits the field so each file's own inline state (or the default `draft`) governs at sync time. Covers both the README.md auto-add path and explicit per-document additions, mirroring the `maester init` prompt added in v0.2.0.
12
+
8
13
  ## [0.2.1] - 2026-05-14
9
14
 
10
15
  ### Fixed
package/dist/cli/main.js CHANGED
@@ -1172,7 +1172,7 @@ function dedupeTargets(targets) {
1172
1172
 
1173
1173
  // package.json
1174
1174
  var package_default = {
1175
- version: "0.2.1"};
1175
+ version: "0.3.0"};
1176
1176
  var PACKAGE_VERSION = package_default.version;
1177
1177
 
1178
1178
  // src/core/skill/version.ts
@@ -1702,6 +1702,25 @@ function parseTags(value) {
1702
1702
  }
1703
1703
 
1704
1704
  // src/cli/commands/publish.ts
1705
+ function buildPublishedDocumentStateField(choice) {
1706
+ if (choice === "file-header") return {};
1707
+ return { state: choice };
1708
+ }
1709
+ async function askDocumentState(ctx, path5) {
1710
+ return ctx.prompts.select({
1711
+ message: `State for '${path5}'?`,
1712
+ initialValue: "file-header",
1713
+ options: [
1714
+ { value: "draft", label: "draft", hint: "tag this entry as draft" },
1715
+ { value: "canon", label: "canon", hint: "tag this entry as canon" },
1716
+ {
1717
+ value: "file-header",
1718
+ label: "file header",
1719
+ hint: "no rule; defer to inline state in the file"
1720
+ }
1721
+ ]
1722
+ });
1723
+ }
1705
1724
  function registerPublish(program, getContext) {
1706
1725
  program.command("publish").description("Configure this repository as a maester (walkthrough).").action(async () => {
1707
1726
  await runPublish(getContext());
@@ -1725,7 +1744,12 @@ async function runPublish(ctx) {
1725
1744
  initialValue: true
1726
1745
  });
1727
1746
  if (useReadme) {
1728
- documents.push({ path: "README.md", category: "readme" });
1747
+ const stateChoice = await askDocumentState(ctx, "README.md");
1748
+ documents.push({
1749
+ path: "README.md",
1750
+ category: "readme",
1751
+ ...buildPublishedDocumentStateField(stateChoice)
1752
+ });
1729
1753
  ctx.prompts.log.success("Added README.md");
1730
1754
  }
1731
1755
  }
@@ -1794,6 +1818,7 @@ async function collectOneDocument(ctx, repoRoot, existing) {
1794
1818
  ctx.prompts.log.warning(`'${trimmed}' does not yet exist in this repo. Saving anyway.`);
1795
1819
  }
1796
1820
  }
1821
+ const stateChoice = await askDocumentState(ctx, trimmed);
1797
1822
  const description = await ctx.prompts.text({
1798
1823
  message: "Description (optional)",
1799
1824
  placeholder: ""
@@ -1821,7 +1846,8 @@ async function collectOneDocument(ctx, repoRoot, existing) {
1821
1846
  path: trimmed,
1822
1847
  ...trimmedDesc ? { description: trimmedDesc } : {},
1823
1848
  ...trimmedCat ? { category: trimmedCat } : {},
1824
- ...tags.length > 0 ? { tags } : {}
1849
+ ...tags.length > 0 ? { tags } : {},
1850
+ ...buildPublishedDocumentStateField(stateChoice)
1825
1851
  };
1826
1852
  return doc;
1827
1853
  }