copilot-session-usage 0.2.2__tar.gz → 0.3.0__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 (115) hide show
  1. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/CHANGELOG.md +4 -0
  2. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/PKG-INFO +3 -2
  3. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/README.md +2 -1
  4. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/conf.py +5 -0
  5. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/index.md +4 -0
  6. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/tutorials/getting-started.md +24 -11
  7. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/justfile +1 -2
  8. copilot_session_usage-0.3.0/knowledge/_schema/Concept.schema.yaml +41 -0
  9. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/_schema/Experiment.schema.yaml +14 -3
  10. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/_schema/Finding.schema.yaml +16 -4
  11. copilot_session_usage-0.3.0/knowledge/_schema/Hypothesis.schema.yaml +45 -0
  12. copilot_session_usage-0.3.0/knowledge/_schema/Outcome.schema.yaml +40 -0
  13. copilot_session_usage-0.3.0/knowledge/_schema/Playbook.schema.yaml +41 -0
  14. copilot_session_usage-0.3.0/knowledge/_schema/Principle.schema.yaml +37 -0
  15. copilot_session_usage-0.3.0/knowledge/_schema/Reference.schema.yaml +34 -0
  16. copilot_session_usage-0.3.0/knowledge/_schema/Structure.schema.yaml +45 -0
  17. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/concepts/index.md +4 -1
  18. copilot_session_usage-0.3.0/knowledge/experiments/index.md +8 -0
  19. copilot_session_usage-0.2.2/knowledge/findings/subagent-logs-use-runsubagent-prefix.md → copilot_session_usage-0.3.0/knowledge/findings/2026.07.02-00.00-subagent-logs-runsubagent-prefix.md +2 -1
  20. copilot_session_usage-0.2.2/knowledge/findings/title-jsonl-not-counted-as-model-turn.md → copilot_session_usage-0.3.0/knowledge/findings/2026.07.02-22.00-title-generation-not-counted-as-model-turn.md +1 -0
  21. copilot_session_usage-0.2.2/knowledge/findings/cache-write-cost-not-tracked.md → copilot_session_usage-0.3.0/knowledge/findings/2026.07.02-23.00-cache-write-approximation.md +1 -0
  22. copilot_session_usage-0.3.0/knowledge/findings/index.md +10 -0
  23. copilot_session_usage-0.3.0/knowledge/guides/index.md +10 -0
  24. copilot_session_usage-0.3.0/knowledge/ideas/index.md +8 -0
  25. copilot_session_usage-0.3.0/knowledge/index.md +17 -0
  26. copilot_session_usage-0.3.0/knowledge/log.md +3 -0
  27. copilot_session_usage-0.3.0/knowledge/principles/index.md +8 -0
  28. copilot_session_usage-0.3.0/knowledge/reference/index.md +9 -0
  29. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/structures/cache-cost-approximation.md +4 -3
  30. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/structures/index.md +4 -1
  31. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/structures/subagent-cost-tracking.md +7 -4
  32. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/structures/vscode-copilot-extension.md +3 -2
  33. copilot_session_usage-0.3.0/skills/copilot-session-usage/SKILL.md +131 -0
  34. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/uv.lock +10 -10
  35. copilot_session_usage-0.2.2/knowledge/_schema/Concept.schema.yaml +0 -20
  36. copilot_session_usage-0.2.2/knowledge/_schema/Playbook.schema.yaml +0 -19
  37. copilot_session_usage-0.2.2/knowledge/_schema/Principle.schema.yaml +0 -25
  38. copilot_session_usage-0.2.2/knowledge/_schema/Reference.schema.yaml +0 -19
  39. copilot_session_usage-0.2.2/knowledge/_schema/Structure.schema.yaml +0 -26
  40. copilot_session_usage-0.2.2/knowledge/experiments/index.md +0 -5
  41. copilot_session_usage-0.2.2/knowledge/findings/index.md +0 -7
  42. copilot_session_usage-0.2.2/knowledge/guides/index.md +0 -7
  43. copilot_session_usage-0.2.2/knowledge/ideas/index.md +0 -5
  44. copilot_session_usage-0.2.2/knowledge/index.md +0 -16
  45. copilot_session_usage-0.2.2/knowledge/log.md +0 -114
  46. copilot_session_usage-0.2.2/knowledge/principles/index.md +0 -5
  47. copilot_session_usage-0.2.2/knowledge/reference/index.md +0 -6
  48. copilot_session_usage-0.2.2/skills/copilot-session-usage/SKILL.md +0 -98
  49. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/.editorconfig +0 -0
  50. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  51. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  52. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/.github/guidelines/knowledge-base.guidelines.md +0 -0
  53. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/.github/pull_request_template.md +0 -0
  54. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/.github/skills/consolidate-knowledge-base/SKILL.md +0 -0
  55. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/.github/skills/record-finding/SKILL.md +0 -0
  56. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/.github/workflows/ci.yml +0 -0
  57. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/.github/workflows/publish.yml +0 -0
  58. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/.gitignore +0 -0
  59. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/.readthedocs.yaml +0 -0
  60. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/AGENTS.md +0 -0
  61. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/CONTRIBUTING.md +0 -0
  62. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/LICENSE +0 -0
  63. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/_static/changelog.js +0 -0
  64. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/_static/custom.css +0 -0
  65. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/changelog.md +0 -0
  66. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/explanation/how-cost-estimation-works.md +0 -0
  67. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/explanation/index.md +0 -0
  68. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/how-to/analyze-specific-session.md +0 -0
  69. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/how-to/batch-and-spending.md +0 -0
  70. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/how-to/export-json.md +0 -0
  71. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/how-to/index.md +0 -0
  72. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/how-to/wsl2.md +0 -0
  73. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/installation.md +0 -0
  74. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/reference/api.md +0 -0
  75. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/reference/cli.md +0 -0
  76. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/reference/index.md +0 -0
  77. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/reference/pricing.md +0 -0
  78. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/docs/source/tutorials/index.md +0 -0
  79. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/_schema/Base.schema.yaml +0 -0
  80. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/concepts/copilot-cli.md +0 -0
  81. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/concepts/overview.md +0 -0
  82. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/concepts/session-cost-analysis.md +0 -0
  83. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/concepts/threshold-based-pricing.md +0 -0
  84. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/experiments/verify-subagent-cost-attribution.md +0 -0
  85. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/guides/automation-scripts.md +0 -0
  86. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/guides/cost-optimization.md +0 -0
  87. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/guides/wsl2-setup.md +0 -0
  88. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/ideas/multi-session-efficiency-analytics.md +0 -0
  89. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/principles/findings-are-immutable.md +0 -0
  90. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/reference/debug-log-format.md +0 -0
  91. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/reference/pricing-formats.md +0 -0
  92. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/structures/knowledge-base-information-types.md +0 -0
  93. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/knowledge/structures/session-discovery-algorithm.md +0 -0
  94. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/pyproject.toml +0 -0
  95. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/scripts/refresh_pricing.py +0 -0
  96. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/src/copilot_session_usage/__init__.py +0 -0
  97. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/src/copilot_session_usage/_internal/__init__.py +0 -0
  98. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/src/copilot_session_usage/_internal/copilot_cli.py +0 -0
  99. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/src/copilot_session_usage/_internal/core.py +0 -0
  100. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/src/copilot_session_usage/_internal/vscode.py +0 -0
  101. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/src/copilot_session_usage/api.py +0 -0
  102. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/src/copilot_session_usage/cli.py +0 -0
  103. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/src/copilot_session_usage/data/__init__.py +0 -0
  104. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/src/copilot_session_usage/data/custom-models-pricing.yml +0 -0
  105. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/src/copilot_session_usage/data/models-and-pricing.lock +0 -0
  106. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/src/copilot_session_usage/data/models-and-pricing.yml +0 -0
  107. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/tests/conftest.py +0 -0
  108. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/tests/test_api.py +0 -0
  109. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/tests/test_cli.py +0 -0
  110. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/tests/test_core.py +0 -0
  111. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/tests/test_coverage_gaps.py +0 -0
  112. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/tests/test_rendering.py +0 -0
  113. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/tests/test_vscode.py +0 -0
  114. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/tests/test_vscode_platform.py +0 -0
  115. {copilot_session_usage-0.2.2 → copilot_session_usage-0.3.0}/uv.toml +0 -0
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## v0.2.3 (2026-07-03)
4
+
5
+ ## v0.2.2 (2026-07-03)
6
+
3
7
  ### Feat
4
8
 
5
9
  - accurate AIC cost computation using nanoAiu and cache_write
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: copilot-session-usage
3
- Version: 0.2.2
3
+ Version: 0.3.0
4
4
  Summary: Usage and cost analytics for GitHub Copilot and Copilot-CLI session logs
5
5
  Project-URL: Homepage, https://github.com/gsemet/copilot-session-usage
6
6
  Project-URL: Documentation, https://copilot-session-usage.readthedocs.io/en/stable/
@@ -27,7 +27,7 @@ Description-Content-Type: text/markdown
27
27
 
28
28
  Extract VS Code Copilot session cost KPIs (tokens, estimated USD, model, duration) from local debug logs.
29
29
 
30
- **Full documentation:** [copilot-session-usage.readthedocs.io](https://copilot-session-usage.readthedocs.io/)
30
+ **Full documentation:** [copilot-session-usage.readthedocs.io](https://copilot-session-usage.readthedocs.io/en/stable/)
31
31
 
32
32
  ## Installation
33
33
 
@@ -58,6 +58,7 @@ copilot-session-usage batch 10
58
58
  - **Threshold-aware pricing** — long-context tier switching (e.g. GPT-5.4 > 272k tokens)
59
59
  - **Subagent cost attribution** — tracks `runSubagent` calls and their token usage
60
60
  - **Cross-platform** — macOS, Linux, Windows, WSL2
61
+ - **Three output formats** — `json` (default), `table`, `detailed`
61
62
  - **Three detail levels** — `minimal`, `compact`, `full`
62
63
  - **JSON and table output** — machine-readable or human-friendly
63
64
 
@@ -11,7 +11,7 @@
11
11
 
12
12
  Extract VS Code Copilot session cost KPIs (tokens, estimated USD, model, duration) from local debug logs.
13
13
 
14
- **Full documentation:** [copilot-session-usage.readthedocs.io](https://copilot-session-usage.readthedocs.io/)
14
+ **Full documentation:** [copilot-session-usage.readthedocs.io](https://copilot-session-usage.readthedocs.io/en/stable/)
15
15
 
16
16
  ## Installation
17
17
 
@@ -42,6 +42,7 @@ copilot-session-usage batch 10
42
42
  - **Threshold-aware pricing** — long-context tier switching (e.g. GPT-5.4 > 272k tokens)
43
43
  - **Subagent cost attribution** — tracks `runSubagent` calls and their token usage
44
44
  - **Cross-platform** — macOS, Linux, Windows, WSL2
45
+ - **Three output formats** — `json` (default), `table`, `detailed`
45
46
  - **Three detail levels** — `minimal`, `compact`, `full`
46
47
  - **JSON and table output** — machine-readable or human-friendly
47
48
 
@@ -24,6 +24,11 @@ extensions = [
24
24
  myst_enable_extensions = ["colon_fence", "deflist"]
25
25
 
26
26
  html_theme = "furo"
27
+ html_theme_options = {
28
+ "source_repository": "https://github.com/gsemet/copilot-session-usage",
29
+ "source_branch": "main",
30
+ "source_directory": "docs/source/",
31
+ }
27
32
  html_title = f"copilot-session-usage {version}"
28
33
  html_static_path = ["_static"]
29
34
  html_css_files = ["custom.css"]
@@ -1,5 +1,7 @@
1
1
  # copilot-session-usage
2
2
 
3
+ [![GitHub](https://img.shields.io/badge/GitHub-copilot--session--usage-181717?logo=github)](https://github.com/gsemet/copilot-session-usage)
4
+
3
5
  **copilot-session-usage** reads VS Code Copilot debug logs and tells you
4
6
  how much each AI coding session cost in USD.
5
7
 
@@ -11,6 +13,8 @@ prints a cost report in seconds.
11
13
  The most common use: after a heavy agentic session, run
12
14
  `copilot-session-usage latest` to see what it cost.
13
15
 
16
+ Links to source code: [gsemet/copilot-session-usage](https://github.com/gsemet/copilot-session-usage)
17
+
14
18
  ::::{grid} 1 1 2 2
15
19
  :gutter: 3
16
20
 
@@ -11,7 +11,7 @@ output. It assumes you have installed `copilot-session-usage` — see
11
11
  Run this after any VS Code Copilot chat session:
12
12
 
13
13
  ```bash
14
- copilot-session-usage latest
14
+ copilot-session-usage latest --format table
15
15
  ```
16
16
 
17
17
  Sample output:
@@ -41,19 +41,16 @@ Each field:
41
41
 
42
42
  ---
43
43
 
44
- ## Switch detail levels
44
+ ## Details Tables
45
45
 
46
- `--detail` controls how much data is shown:
46
+ `--format` controls the output type. Default is `json`:
47
47
 
48
48
  ```bash
49
49
  # Just cost and model names
50
- copilot-session-usage latest --detail minimal
50
+ copilot-session-usage latest --format table
51
51
 
52
- # Default: summary + per-model breakdown
53
- copilot-session-usage latest --detail compact
54
-
55
- # Everything: per-model + subagent attribution
56
- copilot-session-usage latest --detail full
52
+ # Default: summary + per-subagent breakdown
53
+ copilot-session-usage latest --format detailed
57
54
  ```
58
55
 
59
56
  ---
@@ -76,10 +73,16 @@ copilot-session-usage latest --format json --output session.json
76
73
 
77
74
  ## List recent sessions
78
75
 
79
- See which sessions exist without computing costs:
76
+ See which sessions exist without computing costs (limit set to 20 by default):
80
77
 
81
78
  ```bash
82
79
  copilot-session-usage list
80
+
81
+ # Limit to 5 sessions
82
+ copilot-session-usage list --limit 5
83
+
84
+ # Since a date
85
+ copilot-session-usage list --since 2026-07-01
83
86
  ```
84
87
 
85
88
  Output:
@@ -106,7 +109,14 @@ it lists them so you can pick the right UUID.
106
109
  ## Analyze a specific session by UUID
107
110
 
108
111
  ```bash
112
+ # Default json output
109
113
  copilot-session-usage id f5cbde8a-ec40-466f-86e6-f95c343b6c58
114
+
115
+ # Human readable summary
116
+ copilot-session-usage id f5cbde8a-ec40-466f-86e6-f95c343b6c58 --format table
117
+
118
+ # Human readable details with per-subagent breakdown
119
+ copilot-session-usage id f5cbde8a-ec40-466f-86e6-f95c343b6c58 --format detailed
110
120
  ```
111
121
 
112
122
  ---
@@ -114,8 +124,11 @@ copilot-session-usage id f5cbde8a-ec40-466f-86e6-f95c343b6c58
114
124
  ## Analyze multiple sessions at once
115
125
 
116
126
  ```bash
117
- # Last 10 sessions
127
+ # Last 10 sessions (json output)
118
128
  copilot-session-usage batch 10
129
+
130
+ # Summary table for last 10 sessions
131
+ copilot-session-usage batch 10 --format table
119
132
  ```
120
133
 
121
134
  Output includes a summary row with aggregate totals and a per-session table.
@@ -100,8 +100,7 @@ knowledge-validate:
100
100
 
101
101
  # Lint (format) OKF knowledge frontmatter in-place
102
102
  knowledge-lint:
103
- uv run -- okf-schema lint --path knowledge
104
- uv run -- okf-schema index --path knowledge
103
+ uv run -- okfkb update knowledge
105
104
 
106
105
  # Check OKF knowledge frontmatter without modifying files
107
106
  knowledge-lint-check:
@@ -0,0 +1,41 @@
1
+ $schema: "http://json-schema.org/draft-07/schema#"
2
+ title: Concept
3
+ description: >-
4
+ A stable, well-understood idea that explains "what is this." Concepts are
5
+ the semantic building blocks of the knowledge base.
6
+
7
+ Use Concept when an observation or hypothesis has converged into a durable
8
+ explanation. Do NOT use Concept for raw observations (use Finding), system
9
+ composition (use Structure), or human-agreed standards (use Principle).
10
+
11
+ Mutable. Concepts are updated to reflect new understanding as Findings
12
+ accumulate. They are never deleted; if entirely invalidated, they are
13
+ marked with `status: deprecated` and linked to replacement Concepts.
14
+
15
+ Belongs to the Semantic layer. Promoted from confirmed Hypotheses or
16
+ converged Findings. Supports Structures and Principles.
17
+ allOf:
18
+ - $ref: "Base.schema.yaml"
19
+ - type: object
20
+ properties:
21
+ type:
22
+ description: Document type — must be "Concept" for concept documents.
23
+ type: string
24
+ const: Concept
25
+ status:
26
+ description: Lifecycle state of the concept.
27
+ type: string
28
+ enum: [active, deprecated]
29
+ derived_from:
30
+ description: IDs of Findings or Hypotheses that support this Concept.
31
+ type: array
32
+ items: { type: string }
33
+ related_concepts:
34
+ description: IDs of other Concept documents that deepen or contrast this idea.
35
+ type: array
36
+ items: { type: string }
37
+ prerequisites:
38
+ description: Concepts a reader should understand before engaging with this one.
39
+ type: array
40
+ items: { type: string }
41
+ required: [type]
@@ -1,9 +1,20 @@
1
1
  $schema: "http://json-schema.org/draft-07/schema#"
2
2
  title: Experiment
3
3
  description: >-
4
- A reusable, prepared procedure that can be executed one or two times to test a
5
- hypothesis. Each execution produces one Finding. The Experiment is a template;
6
- its recorded outcomes live as Finding documents.
4
+ A reusable, prepared procedure designed to test a Hypothesis and produce
5
+ empirical Findings. Each execution yields one or more Finding documents.
6
+
7
+ Use Experiment when you need a reproducible test procedure. Do NOT use
8
+ Experiment for ad-hoc observations (write a Finding directly) or for
9
+ operational workflows (use Playbook).
10
+
11
+ The Experiment template itself is mutable while in `proposed` or `active`
12
+ status. Once `retired` or `superseded`, it should not be modified.
13
+ Outcomes are recorded as separate Finding documents, not by editing the
14
+ Experiment.
15
+
16
+ Belongs to the Testing layer. Tests Hypotheses. Produces Findings. May be
17
+ superseded by improved experimental designs.
7
18
  allOf:
8
19
  - $ref: "Base.schema.yaml"
9
20
  - type: object
@@ -1,10 +1,22 @@
1
1
  $schema: "http://json-schema.org/draft-07/schema#"
2
2
  title: Finding
3
3
  description: >-
4
- An empirical, dated, falsifiable record of what an agent or human truthfully
5
- observed and believed at a point in time. The body is immutable once written;
6
- only lifecycle frontmatter (status, contradicted_by, superseded_by) may be
7
- appended later.
4
+ A raw, dated, falsifiable observation recorded by an agent or human at a
5
+ specific point in time. Findings are the atomic unit of empirical knowledge.
6
+
7
+ Use Finding when you have observed something non-trivial during debugging,
8
+ investigation, or experimentation and want to preserve that observation for
9
+ future agents. Do NOT use Finding for stable truths (use Concept), procedures
10
+ (use Playbook), or human-agreed standards (use Principle).
11
+
12
+ The body and claim are immutable once written. To correct a Finding, write a
13
+ new Finding with `contradicts` or `supersedes` pointing to the old one. The
14
+ only permitted edits to an existing Finding are lifecycle frontmatter:
15
+ `status` (active, contradicted, superseded), `contradicted_by`, and
16
+ `superseded_by`, appended by review.
17
+
18
+ Belongs to the Storage layer. Findings are promoted into Concepts or
19
+ Structures when they converge and stabilize. They may also support Principles.
8
20
  allOf:
9
21
  - $ref: "Base.schema.yaml"
10
22
  - type: object
@@ -0,0 +1,45 @@
1
+ $schema: "http://json-schema.org/draft-07/schema#"
2
+ title: Hypothesis
3
+ description: >-
4
+ A testable proposition or educated guess derived from observations, intended
5
+ to be validated or falsified through experimentation.
6
+
7
+ Use Hypothesis when you have an idea that needs testing before it can be
8
+ treated as stable knowledge. Do NOT use Hypothesis for already-confirmed
9
+ truths (use Concept or Structure) or for planned deliverables (use Outcome).
10
+
11
+ Mutable until tested. Once tested, its status becomes `confirmed` or
12
+ `falsified`. A confirmed Hypothesis is promoted to Concept or Structure
13
+ (human decision). A falsified Hypothesis remains in the knowledge base with
14
+ `status: falsified` to preserve the record of what was tried.
15
+
16
+ Belongs to the Testing layer. Derived from Findings or direct observation.
17
+ Promoted to Concept or Structure when confirmed. Produces Experiments.
18
+ allOf:
19
+ - $ref: "Base.schema.yaml"
20
+ - type: object
21
+ properties:
22
+ type:
23
+ description: Document type — must be "Hypothesis".
24
+ type: string
25
+ const: Hypothesis
26
+ derived_from:
27
+ description: IDs of Findings or Concepts that motivated this hypothesis.
28
+ type: array
29
+ items: { type: string }
30
+ status:
31
+ description: Lifecycle state of the hypothesis.
32
+ type: string
33
+ enum: [proposed, under_test, confirmed, falsified]
34
+ confirmed_by:
35
+ description: IDs of Findings that confirm this hypothesis.
36
+ type: array
37
+ items: { type: string }
38
+ falsified_by:
39
+ description: IDs of Findings that falsify this hypothesis.
40
+ type: array
41
+ items: { type: string }
42
+ promoted_to:
43
+ description: ID of the Concept or Structure this hypothesis was promoted into.
44
+ type: string
45
+ required: [type, status]
@@ -0,0 +1,40 @@
1
+ $schema: "http://json-schema.org/draft-07/schema#"
2
+ title: Outcome
3
+ description: >-
4
+ A planned deliverable, project, or artifact to be built from the knowledge
5
+ base — "what I want to build."
6
+
7
+ Use Outcome when defining a concrete goal, feature, or deliverable that
8
+ emerges from stable knowledge. Do NOT use Outcome for procedures (use
9
+ Playbook), observations (use Finding), or testable guesses (use Hypothesis).
10
+
11
+ Mutable. Tracks progress from `planned` → `in_progress` → `done` or
12
+ `cancelled`. May reference Playbooks as execution paths and Concepts/
13
+ Structures as foundational knowledge.
14
+
15
+ Belongs to the Planning layer. Derived from Concepts, Structures, and
16
+ Principles. References Playbooks for execution.
17
+ allOf:
18
+ - $ref: "Base.schema.yaml"
19
+ - type: object
20
+ properties:
21
+ type:
22
+ description: Document type — must be "Outcome".
23
+ type: string
24
+ const: Outcome
25
+ status:
26
+ description: Progress state of the outcome.
27
+ type: string
28
+ enum: [planned, in_progress, done, cancelled]
29
+ deliverable:
30
+ description: Description of the concrete artifact or result to be produced.
31
+ type: string
32
+ derived_from:
33
+ description: IDs of Concepts, Structures, or Principles that motivate this outcome.
34
+ type: array
35
+ items: { type: string }
36
+ execution_playbooks:
37
+ description: IDs of Playbooks that describe how to achieve this outcome.
38
+ type: array
39
+ items: { type: string }
40
+ required: [type, status]
@@ -0,0 +1,41 @@
1
+ $schema: "http://json-schema.org/draft-07/schema#"
2
+ title: Playbook
3
+ description: >-
4
+ A reproducible, step-by-step workflow or procedure that produces a specific
5
+ result given the current understanding of the system.
6
+
7
+ Use Playbook when documenting "how to do X" — deployment steps, debugging
8
+ procedures, setup guides. Do NOT use Playbook for one-off observations
9
+ (use Finding), system architecture (use Structure), or planned deliverables
10
+ (use Outcome).
11
+
12
+ Mutable while active. When a better workflow is found, the old Playbook is
13
+ marked `status: deprecated` or `superseded` with `superseded_by` pointing to
14
+ the replacement. Playbooks are experienced until proven false or obsolete.
15
+
16
+ Belongs to the Operational layer. References Concepts and Structures for
17
+ context. May be referenced by Outcomes as execution paths.
18
+ allOf:
19
+ - $ref: "Base.schema.yaml"
20
+ - type: object
21
+ properties:
22
+ type:
23
+ description: Document type — must be "Playbook" for playbook documents.
24
+ type: string
25
+ const: Playbook
26
+ status:
27
+ description: Lifecycle state of the playbook.
28
+ type: string
29
+ enum: [active, deprecated, superseded]
30
+ superseded_by:
31
+ description: IDs of Playbooks that replace this one.
32
+ type: array
33
+ items: { type: string }
34
+ estimated_duration:
35
+ description: Approximate time to complete the playbook (e.g., "15 min", "2 h").
36
+ type: string
37
+ tools_required:
38
+ description: CLI tools, scripts, or external utilities the reader must have installed.
39
+ type: array
40
+ items: { type: string }
41
+ required: [type]
@@ -0,0 +1,37 @@
1
+ $schema: "http://json-schema.org/draft-07/schema#"
2
+ title: Principle
3
+ description: >-
4
+ A durable, normative statement agreed upon by humans — "we always…",
5
+ "never…", "must…". Principles include rules, conventions, and governance
6
+ directives.
7
+
8
+ Use Principle when establishing a team standard, coding convention, or
9
+ architectural rule that requires human agreement. Do NOT use Principle for
10
+ observations (use Finding), explanations (use Concept), or workflows
11
+ (use Playbook).
12
+
13
+ Stable. Changed only through explicit human review. Principles are supported
14
+ by Findings but are not dictated by them. Superseded Principles retain their
15
+ record with `superseded_by` linking to the replacement.
16
+
17
+ Belongs to the Governance layer. Supported by Findings. May reference
18
+ Concepts and Structures for context.
19
+ allOf:
20
+ - $ref: "Base.schema.yaml"
21
+ - type: object
22
+ properties:
23
+ type:
24
+ description: Document type — must be "Principle".
25
+ type: string
26
+ const: Principle
27
+ rationale:
28
+ description: Why this principle exists and what it protects against.
29
+ type: string
30
+ authority:
31
+ description: Who agreed this principle (e.g. "team", "human-reviewed").
32
+ type: string
33
+ supported_by:
34
+ description: IDs of Findings that provide empirical support for this principle.
35
+ type: array
36
+ items: { type: string }
37
+ required: [type]
@@ -0,0 +1,34 @@
1
+ $schema: "http://json-schema.org/draft-07/schema#"
2
+ title: Reference
3
+ description: >-
4
+ An external source document — scientific papers, API specifications, lookup
5
+ tables, or authoritative references — mirrored or linked within the knowledge
6
+ base.
7
+
8
+ Use Reference when bringing external information into the knowledge base for
9
+ easy agent access. Do NOT use Reference for your own observations (use
10
+ Finding), interpretations (use Concept), or workflows (use Playbook). Personal
11
+ notes on a paper belong in a Finding or Concept, not in Reference.
12
+
13
+ Immutable. References mirror or link to external sources. If the upstream
14
+ changes, create a new Reference with updated `schema_version` rather than
15
+ editing the old one.
16
+
17
+ Belongs to the Lookup layer. Referenced by Concepts, Structures, Principles,
18
+ and Findings for authoritative backing.
19
+ allOf:
20
+ - $ref: "Base.schema.yaml"
21
+ - type: object
22
+ properties:
23
+ type:
24
+ description: Document type — must be "Reference" for reference documents.
25
+ type: string
26
+ const: Reference
27
+ schema_version:
28
+ description: Version of the data schema or API documented here (e.g., "v2.1").
29
+ type: string
30
+ authoritative_source:
31
+ description: URL or identifier of the canonical upstream specification this reference mirrors.
32
+ type: string
33
+ format: uri
34
+ required: [type]
@@ -0,0 +1,45 @@
1
+ $schema: "http://json-schema.org/draft-07/schema#"
2
+ title: Structure
3
+ description: >-
4
+ A description of how an object, system, or artifact is composed and how its
5
+ parts relate — the "how it works" view.
6
+
7
+ Use Structure when documenting system architecture, component relationships,
8
+ or mechanical composition. Do NOT use Structure for abstract ideas (use
9
+ Concept), operational procedures (use Playbook), or human-agreed standards
10
+ (use Principle).
11
+
12
+ Mutable. Updated as the system evolves. Like Concepts, Structures are never
13
+ deleted; obsolete Structures are marked `status: deprecated` and linked to
14
+ replacements.
15
+
16
+ Belongs to the Semantic layer. Promoted from confirmed Hypotheses or
17
+ converged Findings. Cross-cuts multiple Concepts.
18
+ allOf:
19
+ - $ref: "Base.schema.yaml"
20
+ - type: object
21
+ properties:
22
+ type:
23
+ description: Document type — must be "Structure".
24
+ type: string
25
+ const: Structure
26
+ status:
27
+ description: Lifecycle state of the structure.
28
+ type: string
29
+ enum: [active, deprecated]
30
+ derived_from:
31
+ description: IDs of Findings or Hypotheses that support this Structure.
32
+ type: array
33
+ items: { type: string }
34
+ subject:
35
+ description: The object or system whose structure is described.
36
+ type: string
37
+ parts:
38
+ description: The components, fields, or sub-parts that make up the subject.
39
+ type: array
40
+ items: { type: string }
41
+ related_concepts:
42
+ description: IDs of Concept documents that explain the ideas behind this structure.
43
+ type: array
44
+ items: { type: string }
45
+ required: [type]
@@ -1,6 +1,9 @@
1
1
  # Concept
2
2
 
3
- A core concept or explanatory document in the knowledge base.
3
+ A stable, well-understood idea that explains "what is this." Concepts are the semantic building blocks of the knowledge base.
4
+ Use Concept when an observation or hypothesis has converged into a durable explanation. Do NOT use Concept for raw observations (use Finding), system composition (use Structure), or human-agreed standards (use Principle).
5
+ Mutable. Concepts are updated to reflect new understanding as Findings accumulate. They are never deleted; if entirely invalidated, they are marked with `status: deprecated` and linked to replacement Concepts.
6
+ Belongs to the Semantic layer. Promoted from confirmed Hypotheses or converged Findings. Supports Structures and Principles.
4
7
 
5
8
  - [Copilot CLI Differences](copilot-cli.md) — How session cost tracking differs when using copilot-cli instead of the VS Code extension. [Concept]
6
9
  - [Session Cost Analysis](session-cost-analysis.md) — Process of extracting token usage metrics from Copilot debug logs and estimating monetary cost based on per-model pricing. [Concept]
@@ -0,0 +1,8 @@
1
+ # Experiment
2
+
3
+ A reusable, prepared procedure designed to test a Hypothesis and produce empirical Findings. Each execution yields one or more Finding documents.
4
+ Use Experiment when you need a reproducible test procedure. Do NOT use Experiment for ad-hoc observations (write a Finding directly) or for operational workflows (use Playbook).
5
+ The Experiment template itself is mutable while in `proposed` or `active` status. Once `retired` or `superseded`, it should not be modified. Outcomes are recorded as separate Finding documents, not by editing the Experiment.
6
+ Belongs to the Testing layer. Tests Hypotheses. Produces Findings. May be superseded by improved experimental designs.
7
+
8
+ - [Verify Subagent Cost Attribution](verify-subagent-cost-attribution.md) — Check that subagent token costs are attributed to their runSubagent call and not double-counted in the parent session total. [Experiment]
@@ -14,7 +14,8 @@ context: >-
14
14
  future extension versions, which may not remain true.
15
15
  status: active
16
16
  links: []
17
- backlinks: []
17
+ backlinks: [structures/subagent-cost-tracking.md]
18
+ okf_version: "0.1"
18
19
  ---
19
20
 
20
21
  # Subagent Logs Use runSubagent Prefix
@@ -16,6 +16,7 @@ timestamp: 2026-07-02T22:00:00Z
16
16
  links: []
17
17
  backlinks: [structures/subagent-cost-tracking.md,
18
18
  structures/vscode-copilot-extension.md]
19
+ okf_version: "0.1"
19
20
  ---
20
21
 
21
22
  # Finding: title-*.jsonl not counted as "Model Turn" by VS Code panel
@@ -15,6 +15,7 @@ context: >-
15
15
  timestamp: 2026-07-02T23:00:00Z
16
16
  links: []
17
17
  backlinks: [structures/cache-cost-approximation.md]
18
+ okf_version: "0.1"
18
19
  ---
19
20
 
20
21
  # Finding: cache_write approximated via fresh_input — now implemented
@@ -0,0 +1,10 @@
1
+ # Finding
2
+
3
+ A raw, dated, falsifiable observation recorded by an agent or human at a specific point in time. Findings are the atomic unit of empirical knowledge.
4
+ Use Finding when you have observed something non-trivial during debugging, investigation, or experimentation and want to preserve that observation for future agents. Do NOT use Finding for stable truths (use Concept), procedures (use Playbook), or human-agreed standards (use Principle).
5
+ The body and claim are immutable once written. To correct a Finding, write a new Finding with `contradicts` or `supersedes` pointing to the old one. The only permitted edits to an existing Finding are lifecycle frontmatter: `status` (active, contradicted, superseded), `contradicted_by`, and `superseded_by`, appended by review.
6
+ Belongs to the Storage layer. Findings are promoted into Concepts or Structures when they converge and stabilize. They may also support Principles.
7
+
8
+ - [cache_write approximated via fresh_input — matches AIC panel exactly](2026.07.02-23.00-cache-write-approximation.md) — VS Code JSONL logs and agent-traces.db both lack cache_creation token counts. Approximating cache_creation as fresh_input = inputTokens - cachedTokens and billing only the incremental delta (cache_write - input) / 1M produces an exact match to the VS Code AIC panel. Implemented in estimate_cost since v0.3. [Finding]
9
+ - [Subagent Logs Use runSubagent Prefix](2026.07.02-00.00-subagent-logs-runsubagent-prefix.md) — Subagent activity is recorded in separate JSONL files prefixed with "runSubagent-" inside the session debug-logs directory. [Finding]
10
+ - [title-*.jsonl adds 1 LLM call and its tokens to tool totals; VS Code panel excludes it](2026.07.02-22.00-title-generation-not-counted-as-model-turn.md) — The VS Code Agent Debug panel "Model Turns" counter excludes title-generation calls. copilot-session-usage counts them. The delta is exactly the title-*.jsonl file's token counts. [Finding]
@@ -0,0 +1,10 @@
1
+ # Playbook
2
+
3
+ A reproducible, step-by-step workflow or procedure that produces a specific result given the current understanding of the system.
4
+ Use Playbook when documenting "how to do X" — deployment steps, debugging procedures, setup guides. Do NOT use Playbook for one-off observations (use Finding), system architecture (use Structure), or planned deliverables (use Outcome).
5
+ Mutable while active. When a better workflow is found, the old Playbook is marked `status: deprecated` or `superseded` with `superseded_by` pointing to the replacement. Playbooks are experienced until proven false or obsolete.
6
+ Belongs to the Operational layer. References Concepts and Structures for context. May be referenced by Outcomes as execution paths.
7
+
8
+ - [Automation Scripts for Cost Extraction](automation-scripts.md) — Reference Python patterns for extracting and aggregating session costs from Copilot debug logs. [Playbook]
9
+ - [Cost Optimization Patterns](cost-optimization.md) — Common patterns that inflate session costs and strategies to reduce them. [Playbook]
10
+ - [WSL2 Setup Guide](wsl2-setup.md) — Configure copilot-session-usage when running VS Code on Windows with WSL2, including path resolution and troubleshooting. [Playbook]
@@ -0,0 +1,8 @@
1
+ # Concept
2
+
3
+ A stable, well-understood idea that explains "what is this." Concepts are the semantic building blocks of the knowledge base.
4
+ Use Concept when an observation or hypothesis has converged into a durable explanation. Do NOT use Concept for raw observations (use Finding), system composition (use Structure), or human-agreed standards (use Principle).
5
+ Mutable. Concepts are updated to reflect new understanding as Findings accumulate. They are never deleted; if entirely invalidated, they are marked with `status: deprecated` and linked to replacement Concepts.
6
+ Belongs to the Semantic layer. Promoted from confirmed Hypotheses or converged Findings. Supports Structures and Principles.
7
+
8
+ - [Multi-Session Efficiency Analytics — Idea Specification](multi-session-efficiency-analytics.md) — Cross-session analytics that group related VS Code Copilot sessions into coding tasks, score subagent efficiency, and surface trends in cost, latency, and behavior over time. [Concept]
@@ -0,0 +1,17 @@
1
+ ---
2
+ okf_version: "0.1"
3
+ links: []
4
+ backlinks: []
5
+ ---
6
+
7
+ # knowledge
8
+
9
+ - [concepts](./concepts/) — A stable, well-understood idea that explains "what is this." Concepts are the semantic building blocks of the knowled...
10
+ - [experiments](./experiments/) — A reusable, prepared procedure designed to test a Hypothesis and produce empirical Findings. Each execution yields on...
11
+ - [findings](./findings/) — A raw, dated, falsifiable observation recorded by an agent or human at a specific point in time. Findings are the ato...
12
+ - [guides](./guides/) — A reproducible, step-by-step workflow or procedure that produces a specific result given the current understanding of...
13
+ - [ideas](./ideas/) — A stable, well-understood idea that explains "what is this." Concepts are the semantic building blocks of the knowled...
14
+ - [principles](./principles/) — A durable, normative statement agreed upon by humans — "we always…", "never…", "must…". Principles include rules, con...
15
+ - [reference](./reference/) — An external source document — scientific papers, API specifications, lookup tables, or authoritative references — mir...
16
+ - [structures](./structures/) — A description of how an object, system, or artifact is composed and how its parts relate — the "how it works" view.
17
+ U...
@@ -0,0 +1,3 @@
1
+ # Update Log
2
+
3
+ ## 2026-07-06
@@ -0,0 +1,8 @@
1
+ # Principle
2
+
3
+ A durable, normative statement agreed upon by humans — "we always…", "never…", "must…". Principles include rules, conventions, and governance directives.
4
+ Use Principle when establishing a team standard, coding convention, or architectural rule that requires human agreement. Do NOT use Principle for observations (use Finding), explanations (use Concept), or workflows (use Playbook).
5
+ Stable. Changed only through explicit human review. Principles are supported by Findings but are not dictated by them. Superseded Principles retain their record with `superseded_by` linking to the replacement.
6
+ Belongs to the Governance layer. Supported by Findings. May reference Concepts and Structures for context.
7
+
8
+ - [Findings Are Immutable](findings-are-immutable.md) — A recorded Finding's body is never reworded or deleted — only linked. [Principle]