okf-cli 0.6.0__tar.gz → 0.6.1__tar.gz

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.
Files changed (51) hide show
  1. okf_cli-0.6.1/.last-update.json +1 -0
  2. {okf_cli-0.6.0 → okf_cli-0.6.1}/AGENTS.md +6 -6
  3. {okf_cli-0.6.0 → okf_cli-0.6.1}/PKG-INFO +3 -3
  4. {okf_cli-0.6.0 → okf_cli-0.6.1}/README.md +1 -1
  5. {okf_cli-0.6.0 → okf_cli-0.6.1}/pyproject.toml +1 -1
  6. {okf_cli-0.6.0 → okf_cli-0.6.1}/src/okf/api.py +15 -2
  7. {okf_cli-0.6.0/openwiki → okf_cli-0.6.1/wiki}/architecture.md +1 -1
  8. {okf_cli-0.6.0/openwiki → okf_cli-0.6.1/wiki}/quickstart.md +3 -3
  9. {okf_cli-0.6.0/openwiki → okf_cli-0.6.1/wiki}/testing.md +5 -4
  10. okf_cli-0.6.0/.last-update.json +0 -1
  11. {okf_cli-0.6.0 → okf_cli-0.6.1}/.github/workflows/test.yml +0 -0
  12. {okf_cli-0.6.0 → okf_cli-0.6.1}/.gitignore +0 -0
  13. {okf_cli-0.6.0 → okf_cli-0.6.1}/LICENSE +0 -0
  14. {okf_cli-0.6.0 → okf_cli-0.6.1}/SPEC/OKF_SPEC_V0_1.md +0 -0
  15. {okf_cli-0.6.0 → okf_cli-0.6.1}/SPEC/OKF_SPEC_V0_2.md +0 -0
  16. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/.okfignore +0 -0
  17. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/README.md +0 -0
  18. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/blank-line/no-blank.md +0 -0
  19. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/blank-line/with-blank.md +0 -0
  20. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/computations/revenue.md +0 -0
  21. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/datasets/sales.md +0 -0
  22. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/domain.md +0 -0
  23. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/loose/deep/no-heading.md +0 -0
  24. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/loose/no-desc.md +0 -0
  25. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/loose/no-title.md +0 -0
  26. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/metrics/income-statement.md +0 -0
  27. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/playbooks/incident-response.md +0 -0
  28. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/playbooks/oncall-guide.md +0 -0
  29. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/references/revenue-recognition.md +0 -0
  30. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/smoke-ignore.md +0 -0
  31. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/tables/customers.md +0 -0
  32. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/tables/orders.md +0 -0
  33. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/tables/partitions/2026/q1/jan/january.md +0 -0
  34. {okf_cli-0.6.0 → okf_cli-0.6.1}/example/tables/partitions/daily.md +0 -0
  35. {okf_cli-0.6.0 → okf_cli-0.6.1}/skills/okf-cli/SKILL.md +0 -0
  36. {okf_cli-0.6.0 → okf_cli-0.6.1}/skills/writing-knowledge-base/SKILL.md +0 -0
  37. {okf_cli-0.6.0 → okf_cli-0.6.1}/src/okf/__init__.py +0 -0
  38. {okf_cli-0.6.0 → okf_cli-0.6.1}/src/okf/cli.py +0 -0
  39. {okf_cli-0.6.0 → okf_cli-0.6.1}/src/okf/commands/__init__.py +0 -0
  40. {okf_cli-0.6.0 → okf_cli-0.6.1}/src/okf/commands/bundle.py +0 -0
  41. {okf_cli-0.6.0 → okf_cli-0.6.1}/src/okf/commands/list.py +0 -0
  42. {okf_cli-0.6.0 → okf_cli-0.6.1}/src/okf/commands/read.py +0 -0
  43. {okf_cli-0.6.0 → okf_cli-0.6.1}/src/okf/commands/validate.py +0 -0
  44. {okf_cli-0.6.0 → okf_cli-0.6.1}/src/okf/core.py +0 -0
  45. {okf_cli-0.6.0 → okf_cli-0.6.1}/tests/test_api.py +0 -0
  46. {okf_cli-0.6.0 → okf_cli-0.6.1}/tests/test_cli.py +0 -0
  47. {okf_cli-0.6.0 → okf_cli-0.6.1}/tests/test_core.py +0 -0
  48. {okf_cli-0.6.0 → okf_cli-0.6.1}/uv.lock +0 -0
  49. {okf_cli-0.6.0/openwiki → okf_cli-0.6.1/wiki}/domain-model.md +0 -0
  50. {okf_cli-0.6.0/openwiki → okf_cli-0.6.1/wiki}/operations.md +0 -0
  51. {okf_cli-0.6.0/openwiki → okf_cli-0.6.1/wiki}/workflows.md +0 -0
@@ -0,0 +1 @@
1
+ {"head": "c5781415bec2d85faf741ccf92f5ab5d56448879", "timestamp": "2026-08-13T06:01:33Z"}
@@ -1,16 +1,16 @@
1
1
  # AGENTS.md — okf-cli contributor context
2
2
 
3
- ## OpenWiki
3
+ ## Wiki
4
4
 
5
- This repository has documentation located in the /openwiki directory.
5
+ This repository has documentation located in the /wiki directory.
6
6
 
7
7
  Start here:
8
8
 
9
- - [OpenWiki quickstart](openwiki/quickstart.md)
9
+ - [Wiki quickstart](wiki/quickstart.md)
10
10
 
11
- OpenWiki includes repository overview, architecture notes, workflows, domain concepts, operations, integrations, testing guidance, and source maps.
11
+ Wiki includes repository overview, architecture notes, workflows, domain concepts, operations, integrations, testing guidance, and source maps.
12
12
 
13
- When working in this repository, read the OpenWiki quickstart first, then follow its links to the relevant architecture, workflow, domain, operation, and testing notes.
13
+ When working in this repository, read the Wiki quickstart first, then follow its links to the relevant architecture, workflow, domain, operation, and testing notes.
14
14
 
15
15
  ## Tech stack
16
16
 
@@ -23,7 +23,7 @@ Python 3.11+, **uv**, **typer**, **pyyaml**, **rich**, **pytest**, **ruff**, **h
23
23
  - `src/okf/core.py` — shared parsing, formatting, and conformance helpers
24
24
  - `src/okf/commands/` — thin CLI wrappers (`bundle`, `list`, `read`, `validate`)
25
25
  - `tests/` — `test_api.py`, `test_cli.py`, `test_core.py`
26
- - `openwiki/` — architecture, workflows, domain model, operations, testing notes
26
+ - `wiki/` — architecture, workflows, domain model, operations, testing notes
27
27
  - `.github/workflows/test.yml` — CI (pytest + ruff on Python 3.11)
28
28
 
29
29
  ## Common tasks
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: okf-cli
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Open Knowledge Format tooling
5
5
  License: MIT License
6
6
 
@@ -70,6 +70,6 @@ uv run okf read example_knowledge_base tables/customers
70
70
 
71
71
  ## Documentation
72
72
 
73
- - Detailed user and contributor docs: [openwiki/quickstart.md](openwiki/quickstart.md)
73
+ - Detailed user and contributor docs: [wiki/quickstart.md](wiki/quickstart.md)
74
74
  - Agent contributor context: [AGENTS.md](AGENTS.md)
75
75
  - OKF v0.2 specification: [SPEC/OKF_SPEC_V0_2.md](SPEC/OKF_SPEC_V0_2.md)
@@ -38,6 +38,6 @@ uv run okf read example_knowledge_base tables/customers
38
38
 
39
39
  ## Documentation
40
40
 
41
- - Detailed user and contributor docs: [openwiki/quickstart.md](openwiki/quickstart.md)
41
+ - Detailed user and contributor docs: [wiki/quickstart.md](wiki/quickstart.md)
42
42
  - Agent contributor context: [AGENTS.md](AGENTS.md)
43
43
  - OKF v0.2 specification: [SPEC/OKF_SPEC_V0_2.md](SPEC/OKF_SPEC_V0_2.md)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "okf-cli"
3
- version = "0.6.0"
3
+ version = "0.6.1"
4
4
  description = "Open Knowledge Format tooling"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -129,10 +129,23 @@ def _load_okfignore(src: Path) -> set[str]:
129
129
  line = raw.strip()
130
130
  if not line or line.startswith("#"):
131
131
  continue
132
- entries.add(line.lstrip("./"))
132
+ entry = line.lstrip("./")
133
+ # Normalize folder globs: tables/foo/*, tables/foo/** -> tables/foo/
134
+ if entry.endswith("/**"):
135
+ entry = entry[:-3] + "/"
136
+ elif entry.endswith("/*"):
137
+ entry = entry[:-2] + "/"
138
+ entries.add(entry)
133
139
  return entries
134
140
 
135
141
 
142
+ def _is_ignored(rel_posix: str, ignored: set[str]) -> bool:
143
+ """Check exact match or folder-prefix match (entries ending with /)."""
144
+ if rel_posix in ignored:
145
+ return True
146
+ return any(pat.endswith("/") and rel_posix.startswith(pat) for pat in ignored)
147
+
148
+
136
149
  def _generate_indexes(processed: list[tuple[Path, dict]], dst: Path) -> None:
137
150
  """Generate index.md for every directory with concept files or subdirs."""
138
151
  dir_files: dict[Path, list[dict]] = {}
@@ -383,7 +396,7 @@ def bundle(
383
396
  rel = f.relative_to(src)
384
397
  rel_posix = rel.as_posix()
385
398
 
386
- if rel_posix in ignored:
399
+ if _is_ignored(rel_posix, ignored):
387
400
  warnings.append(f"Skipping {rel} — matched .okfignore")
388
401
  continue
389
402
  if f.name.lower() in RESERVED:
@@ -27,7 +27,7 @@ Public functions and return types:
27
27
  | `show_concept(bundle_dir, concept_id)` | `ConceptContent` | Conformance-gated concept read with path traversal guard |
28
28
  | `validate(bundle_dir)` | `ValidateResult` | Conformance check with `.ok` property |
29
29
 
30
- Internal helpers (not public API): `_iter_links`, `_resolve_md_target`, `_load_okfignore`, `_generate_indexes`, `_write_concept`.
30
+ Internal helpers (not public API): `_iter_links`, `_resolve_md_target`, `_load_okfignore`, `_generate_indexes`, `_merge_input_frontmatter`, `_write_concept`.
31
31
 
32
32
  ### `src/okf/core.py` — shared utilities
33
33
 
@@ -1,4 +1,4 @@
1
- # okf-cli OpenWiki quickstart
1
+ # okf-cli Wiki quickstart
2
2
 
3
3
  `okf-cli` converts plain markdown directories into Open Knowledge Format (OKF) bundles, then validates and reads those bundles.
4
4
 
@@ -58,7 +58,7 @@ Why this sequence:
58
58
  1. `--strict` catches broken local `.md` references at bundle time and skips `AGENTS.md` generation.
59
59
  1. `--dry-run` validates the source and reports warnings/errors without writing any files.
60
60
 
61
- ## OpenWiki map
61
+ ## Wiki map
62
62
 
63
63
  - [Architecture](architecture.md) — runtime shape, command wiring, extension points.
64
64
  - [Workflows](workflows.md) — day-to-day CLI and contributor workflows.
@@ -70,4 +70,4 @@ Why this sequence:
70
70
 
71
71
  - Add/modify CLI behavior: start at [Architecture](architecture.md), then [Testing](testing.md).
72
72
  - Change format/conformance rules: start at [Domain model](domain-model.md), then `src/okf/core.py` + validate/list/show tests.
73
- - Update docs/user guidance: check `README.md` and align with this OpenWiki.
73
+ - Update docs/user guidance: check `README.md` and align with this Wiki.
@@ -3,16 +3,16 @@
3
3
  ## Test suite map
4
4
 
5
5
  - API unit/integration tests: `tests/test_api.py`
6
- - `TestBundle` — bundling via `api.bundle()`, link checking, `.okfignore`, lenient parsing, `AGENTS.md` generation
6
+ - `TestBundle` — bundling via `api.bundle()`, input frontmatter merging, link checking, `.okfignore`, lenient parsing, `AGENTS.md` generation
7
7
  - `TestListConcepts` — listing via `api.list_concepts()`, reserved file handling
8
8
  - `TestListEntries` — listing metadata via `api.list_entries()` (ID, type, title, description)
9
9
  - `TestShowConcept` — reading via `api.show_concept()`, path traversal guard
10
10
  - `TestValidate` — conformance checks via `api.validate()`, all §11 rule variants
11
11
  - `TestWorkflow` — cross-command pipeline (bundle → validate/list/read)
12
- - `TestConvertFile` — single-file conversion via `api.convert_file()`, mtime `generated` block
13
- - `TestConvertContent` — raw markdown conversion via `api.convert_content()`, no `generated` block
12
+ - `TestConvertFile` — single-file conversion via `api.convert_file()`, mtime `generated` block, input frontmatter preservation
13
+ - `TestConvertContent` — raw markdown conversion via `api.convert_content()`, no `generated` block, input frontmatter preservation
14
14
  - Core unit tests: `tests/test_core.py`
15
- - parsing helpers (`parse_md`, `parse_frontmatter`)
15
+ - parsing helpers (`parse_md`, `parse_md_with_frontmatter`, `parse_frontmatter`)
16
16
  - frontmatter generation (`build_frontmatter`)
17
17
  - conformance engine (`check_conformance`)
18
18
  - CLI integration tests: `tests/test_cli.py`
@@ -69,6 +69,7 @@ uv run pytest -q
69
69
 
70
70
  - `.okfignore` parsing and skip semantics, including non-UTF-8 failure.
71
71
  - Lenient parsing fallback when strict markdown format is missing.
72
+ - Input frontmatter merging precedence: `type`/`generated` overwritten, `okf_version` dropped, input `title`/`description` override parsed body, malformed frontmatter fallback (normal) vs fatal (`--strict`).
72
73
  - Reserved filename differences between bundling and spec conformance.
73
74
  - Root `index.md` special allowance for `okf_version` only.
74
75
  - `list`/`read` hard failure on non-conformant bundles.
@@ -1 +0,0 @@
1
- {"head": "edbf961cebc0111bc42c88cff27f3ab83194f360", "timestamp": "2026-07-29T09:18:45Z"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes