fewald-worklog 0.3.20 → 0.3.21
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.
- checksums.yaml +4 -4
- data/.version +1 -1
- data/assets/prompts/standup.system.md.erb +69 -0
- data/assets/prompts/standup.user.md.erb +5 -0
- data/lib/printer.rb +6 -0
- data/lib/project_storage.rb +9 -0
- data/lib/templates/index.html.erb +23 -23
- data/lib/webserver.rb +11 -4
- metadata +31 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c5bd93642e20a12893990ea68f16535293e71c3440d2f9028dacf57d9e783144
|
|
4
|
+
data.tar.gz: e0f080998b95a399cddf53ca28ed7fe98b10263990b54aeb8ec065ac0342de02
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 457e916ceeeddbfba203fd17d9e49862dafaf74fbd40e4b3a56f536a06e35f8d6aa3748f069a51990f2279e49e2164ffed57594cade9b6e0f6c34cb5f97fefbf
|
|
7
|
+
data.tar.gz: 0fe4178210f736b08415b460d16e741b84cc3977eb5c4bc4967bb34175fe6e845308d153f70653dc55882b43a28bb5d741c4ee8d6bed20ba2ad92a2c73ee8bf9
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.21
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
You prepare accurate, concise standup updates strictly from a provided YAML input that has already been filtered and ordered upstream.
|
|
2
|
+
You should make the information as clear and concise as possible, but do not add any information that is not explicitly present in the YAML.
|
|
3
|
+
|
|
4
|
+
SCOPE & GUARANTEES
|
|
5
|
+
- Use ONLY the fields present in the YAML. Do not add context, interpretations, or conclusions beyond what is explicitly given.
|
|
6
|
+
- The YAML input is guaranteed to be well-formed and valid according to the INPUT SCHEMA below.
|
|
7
|
+
- You can decide to remove entries if the message is personal or sensitive.
|
|
8
|
+
- You can split a message into multiple categories if it contains multiple distinct points, but do not add any new information.
|
|
9
|
+
- The information should be professional, concise, and factual, suited for a standup update. Do not include any personal opinions, feelings, or commentary.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
INPUT SCHEMA (per entry)
|
|
13
|
+
- key: Unique identifier (ignore for output)
|
|
14
|
+
- source: Source of the entry (ignore for output)
|
|
15
|
+
- time: Time of event in the format YYYY-MM-DD HH:MM:SS ±HH:MM
|
|
16
|
+
- tags: List of tags (ignore for output)
|
|
17
|
+
- ticket: JIRA ticket number if present (may be empty, in which case treat as absent)
|
|
18
|
+
- url: Relevant link (include if present)
|
|
19
|
+
- epic: Boolean big-achievement flag; make the bullet visually distinct if the value is true
|
|
20
|
+
- message: The exact description of what happened (use as the main text)
|
|
21
|
+
- project: Project key (ignore for output)
|
|
22
|
+
- day: Date of the entry (ignore for output)
|
|
23
|
+
|
|
24
|
+
EXPECTED INPUT SHAPE
|
|
25
|
+
The YAML will be provided in the following format, separated by triple dashes:
|
|
26
|
+
---
|
|
27
|
+
entry 1
|
|
28
|
+
---
|
|
29
|
+
entry 2
|
|
30
|
+
---
|
|
31
|
+
entry 3
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
OUTPUT
|
|
35
|
+
- Format in Markdown with exactly three sections, in this order and with these exact headings:
|
|
36
|
+
1. **What has been done since the last standup**
|
|
37
|
+
2. **What are the next steps**
|
|
38
|
+
3. **Discussion (Challenges/Risks/Suggestions/Kudos)**
|
|
39
|
+
- Each section is a bullet list.
|
|
40
|
+
- If a section has no items, output the line: "No updates."
|
|
41
|
+
- Each bullet must be a single line, concise, and factual, using only the provided `message` plus identifiers/links if present.
|
|
42
|
+
|
|
43
|
+
BULLET FORMAT
|
|
44
|
+
- Prefer this order and formatting:
|
|
45
|
+
- If both `ticket` and `url` exist: `- TICKET (URL) — MESSAGE`
|
|
46
|
+
- If only `ticket` exists: `- TICKET — MESSAGE`
|
|
47
|
+
- If only `url` exists: `- MESSAGE [link](URL)`
|
|
48
|
+
- If neither exists: `- MESSAGE`
|
|
49
|
+
- Do NOT include `time`, `tags`, `project`, or `day` in bullets.
|
|
50
|
+
- Prefix epic bullets, those items that have `epic: true`, with "⭐ " without altering the rest.
|
|
51
|
+
|
|
52
|
+
CATEGORIZATION
|
|
53
|
+
- If the input entries contain work that was done in the past or is completed, place those in the "What has been done since the last standup" section.
|
|
54
|
+
- If the input entries contain planned or upcoming work, place those in the "What are the next steps" section.
|
|
55
|
+
- If the input entries contain challenges, risks, suggestions, or kudos, place those in the "Discussion (Challenges/Risks/Suggestions/Kudos)" section.
|
|
56
|
+
- Do not use an entry in more than one section. If an entry contains multiple points, split it into multiple bullets and categorize each bullet appropriately.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
VALIDATION & SAFETY
|
|
60
|
+
- If `ticket` is empty or null, treat as absent.
|
|
61
|
+
- Do not invent tickets, links, statuses, or implications.
|
|
62
|
+
- Do not add commentary, apologies, or meta text.
|
|
63
|
+
- Preserve the input item order within each section.
|
|
64
|
+
|
|
65
|
+
STYLE
|
|
66
|
+
- Be precise and minimal. One-line bullets, no fluff.
|
|
67
|
+
- No extra sections, summaries, or conclusions.
|
|
68
|
+
- If something personal or sensitive appears in `message`, omit it entirely; do not rephrase or sanitize.
|
|
69
|
+
- Use proper Markdown syntax for links and formatting
|
data/lib/printer.rb
CHANGED
|
@@ -82,4 +82,10 @@ class Printer
|
|
|
82
82
|
print ' ' unless date_inline
|
|
83
83
|
puts "#{Rainbow(time_string).gold} #{entry.message_string(@people)}"
|
|
84
84
|
end
|
|
85
|
+
|
|
86
|
+
# Returns the width of the terminal.
|
|
87
|
+
# @return [Integer] The width of the terminal in number of characters.
|
|
88
|
+
def terminal_width
|
|
89
|
+
IO.console.winsize[1]
|
|
90
|
+
end
|
|
85
91
|
end
|
data/lib/project_storage.rb
CHANGED
|
@@ -77,6 +77,15 @@ module Worklog
|
|
|
77
77
|
projects.key?(key)
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
+
# Find project by given filters. Filters can be repository or
|
|
81
|
+
# @param filters [Hash] The filters to apply when searching for projects.
|
|
82
|
+
# @return [Array<Project>] An array of projects that match the given filters.
|
|
83
|
+
def find_by(filters = {})
|
|
84
|
+
projects.values.select do |project|
|
|
85
|
+
filters.all? { |k, v| project.respond_to?(k) && project.public_send(k) == v }
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
80
89
|
# Alias for exist? method.
|
|
81
90
|
# @param key [String] The key of the project to check.
|
|
82
91
|
# @return [Boolean] Returns true if the project exists, false otherwise.
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
50
50
|
<div class="navbar-nav me-auto"></div>
|
|
51
51
|
<div class="d-flex">
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
<% if presentation %>
|
|
53
|
+
<a href="<%= update_query.call({'presentation' => nil}) %>" class="btn btn-primary">
|
|
54
|
+
Screen
|
|
55
|
+
</a>
|
|
56
|
+
<% else %>
|
|
57
|
+
<a href="<%= update_query.call({'presentation' => true}) %>" class="btn btn-primary">
|
|
58
|
+
Presentation
|
|
59
|
+
</a>
|
|
60
|
+
<% end %>
|
|
61
|
+
</div>
|
|
62
62
|
</div>
|
|
63
63
|
</div>
|
|
64
64
|
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
<% end %>
|
|
77
77
|
</a>
|
|
78
78
|
<ul class="dropdown-menu">
|
|
79
|
-
<li><a class="dropdown-item" href="<%= update_query({'epics_only' => false}) %>">all items</a></li>
|
|
80
|
-
<li><a class="dropdown-item" href="<%= update_query({'epics_only' => true}) %>">only epics</a></li>
|
|
79
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'epics_only' => false}) %>">all items</a></li>
|
|
80
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'epics_only' => true}) %>">only epics</a></li>
|
|
81
81
|
</ul>
|
|
82
82
|
</div>
|
|
83
83
|
from the last
|
|
@@ -86,14 +86,14 @@
|
|
|
86
86
|
<%= days %> days
|
|
87
87
|
</a>
|
|
88
88
|
<ul class="dropdown-menu">
|
|
89
|
-
<li><a class="dropdown-item" href="<%= update_query({'days' => 7}) %>">7 days</a></li>
|
|
90
|
-
<li><a class="dropdown-item" href="<%= update_query({'days' => 14}) %>">2 weeks</a></li>
|
|
91
|
-
<li><a class="dropdown-item" href="<%= update_query({'days' => 21}) %>">3 weeks</a></li>
|
|
92
|
-
<li><a class="dropdown-item" href="<%= update_query({'days' => 28}) %>">4 weeks</a></li>
|
|
93
|
-
<li><a class="dropdown-item" href="<%= update_query({'days' => 60}) %>">2 months</a></li>
|
|
94
|
-
<li><a class="dropdown-item" href="<%= update_query({'days' => 90}) %>">3 months</a></li>
|
|
95
|
-
<li><a class="dropdown-item" href="<%= update_query({'days' => 180}) %>">6 months</a></li>
|
|
96
|
-
<li><a class="dropdown-item" href="<%= update_query({'days' => 365}) %>">1 year</a></li>
|
|
89
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'days' => 7}) %>">7 days</a></li>
|
|
90
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'days' => 14}) %>">2 weeks</a></li>
|
|
91
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'days' => 21}) %>">3 weeks</a></li>
|
|
92
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'days' => 28}) %>">4 weeks</a></li>
|
|
93
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'days' => 60}) %>">2 months</a></li>
|
|
94
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'days' => 90}) %>">3 months</a></li>
|
|
95
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'days' => 180}) %>">6 months</a></li>
|
|
96
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'days' => 365}) %>">1 year</a></li>
|
|
97
97
|
</ul>
|
|
98
98
|
</div>
|
|
99
99
|
of work with
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
<% end %>
|
|
107
107
|
</a>
|
|
108
108
|
<ul class="dropdown-menu">
|
|
109
|
-
<li><a class="dropdown-item" href="<%= update_query({'tags' => nil}) %>">all tags</a></li>
|
|
109
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'tags' => nil}) %>">all tags</a></li>
|
|
110
110
|
<% @tags.to_a.each do |tag| %>
|
|
111
|
-
<li><a class="dropdown-item" href="<%= update_query({'tags' => [tag]}) %>"><%= tag %> tags</a></li>
|
|
111
|
+
<li><a class="dropdown-item" href="<%= update_query.call({'tags' => [tag]}) %>"><%= tag %> tags</a></li>
|
|
112
112
|
<% end %>
|
|
113
113
|
</ul>
|
|
114
114
|
</div>
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
<p class="entries"><%= log.entries.size %> entries</p>
|
|
139
139
|
</section>
|
|
140
140
|
<%- end %>
|
|
141
|
-
<p><%=
|
|
141
|
+
<p><%= logs.sum { |log| log.entries.size } %> entries total</p>
|
|
142
142
|
</div>
|
|
143
143
|
<hr/>
|
|
144
144
|
<footer class="container pb-4 text-muted">
|
data/lib/webserver.rb
CHANGED
|
@@ -39,11 +39,18 @@ class WorkLogResponse
|
|
|
39
39
|
epics_only = @params['epics_only'] == 'true'
|
|
40
40
|
presentation = @params['presentation'] == 'true'
|
|
41
41
|
logs = @storage.days_between(Date.today - days, Date.today, epics_only, tags).reverse
|
|
42
|
-
total_entries = logs.sum { |entry| entry.entries.length }
|
|
43
|
-
_ = total_entries
|
|
44
|
-
_ = presentation
|
|
45
42
|
|
|
46
|
-
[200, {}, [template.
|
|
43
|
+
[200, {}, [template.result_with_hash(
|
|
44
|
+
{
|
|
45
|
+
days:,
|
|
46
|
+
tags: tags,
|
|
47
|
+
epics_only:,
|
|
48
|
+
presentation:,
|
|
49
|
+
logs:,
|
|
50
|
+
update_query: method(:update_query),
|
|
51
|
+
build_uri: method(:build_uri)
|
|
52
|
+
}
|
|
53
|
+
)]]
|
|
47
54
|
end
|
|
48
55
|
|
|
49
56
|
private
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fewald-worklog
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.21
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Friedrich Ewald
|
|
@@ -9,6 +9,20 @@ bindir: bin
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: faraday
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '2.14'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '2.14'
|
|
12
26
|
- !ruby/object:Gem::Dependency
|
|
13
27
|
name: httparty
|
|
14
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -23,6 +37,20 @@ dependencies:
|
|
|
23
37
|
- - "~>"
|
|
24
38
|
- !ruby/object:Gem::Version
|
|
25
39
|
version: 0.22.0
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: langchainrb
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 0.19.5
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: 0.19.5
|
|
26
54
|
- !ruby/object:Gem::Dependency
|
|
27
55
|
name: logger
|
|
28
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -135,6 +163,8 @@ extensions: []
|
|
|
135
163
|
extra_rdoc_files: []
|
|
136
164
|
files:
|
|
137
165
|
- ".version"
|
|
166
|
+
- assets/prompts/standup.system.md.erb
|
|
167
|
+
- assets/prompts/standup.user.md.erb
|
|
138
168
|
- bin/wl
|
|
139
169
|
- lib/cli.rb
|
|
140
170
|
- lib/configuration.rb
|